Version in base suite: 25.0.2+10-1~deb13u2 Base version: openjdk-25_25.0.2+10-1~deb13u2 Target version: openjdk-25_25.0.3+9-2~deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/o/openjdk-25/openjdk-25_25.0.2+10-1~deb13u2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/o/openjdk-25/openjdk-25_25.0.3+9-2~deb13u1.dsc .jcheck/conf | 2 README.md | 9 debian/JB-jvmci-jdk.overrides.in | 15 debian/changelog | 123 debian/control | 15 debian/control.in | 15 debian/copyright | 2878 ++- debian/copyright-generator/copyright-gen.py | 50 debian/copyright-generator/strip-common-licenses.sh | 18 debian/dbg.py | 448 debian/man/jar.1 | 367 debian/man/jarsigner.1 | 1347 + debian/man/java.1 | 5590 ++++++ debian/man/javac.1 | 2276 ++ debian/man/javadoc.1 | 1482 + debian/man/javap.1 | 211 debian/man/jcmd.1 | 1328 + debian/man/jconsole.1 | 66 debian/man/jdb.1 | 233 debian/man/jdeprscan.1 | 218 debian/man/jdeps.1 | 293 debian/man/jfr.1 | 396 debian/man/jhsdb.1 | 179 debian/man/jinfo.1 | 63 debian/man/jlink.1 | 350 debian/man/jmap.1 | 68 debian/man/jmod.1 | 362 debian/man/jnativescan.1 | 169 debian/man/jpackage.1 | 834 debian/man/jps.1 | 189 debian/man/jrunscript.1 | 123 debian/man/jshell.1 | 1223 + debian/man/jstack.1 | 50 debian/man/jstat.1 | 634 debian/man/jstatd.1 | 166 debian/man/jwebserver.1 | 138 debian/man/keytool.1 | 2945 +++ debian/man/rmiregistry.1 | 61 debian/man/serialver.1 | 37 debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch | 2 debian/patches/default-jvm-cfg.diff | 4 debian/patches/dnd-files.diff | 2 debian/patches/hotspot-mips-align.diff | 2 debian/patches/icc_loading_with_symlink.diff | 2 debian/patches/icedtea-override-redirect-compiz.diff | 2 debian/patches/jdk-8369817.diff | 30 debian/patches/jdk-8381555.diff | 29 debian/patches/jdk-getAccessibleValue.diff | 20 debian/patches/ldap-timeout-test-use-ip.patch | 4 debian/patches/m68k-support.diff | 8 debian/patches/make-debug-print.diff | 2 debian/patches/multiple-pkcs11-library-init.diff | 6 debian/patches/reproducible-properties-timestamp.diff | 4 debian/patches/s390x-opt.diff | 2 debian/patches/series | 2 debian/patches/system-pcsclite.diff | 4 debian/rules | 166 debian/tests/dependencies.in | 2 debian/tests/jtreg-autopkgtest.in | 13 debian/tests/jtreg-autopkgtest.sh | 15 debian/tests/problems.csv | 74 doc/building.html | 2 doc/building.md | 2 make/autoconf/lib-bundled.m4 | 4 make/autoconf/platform.m4 | 8 make/autoconf/toolchain_microsoft.m4 | 17 make/common/Utils.gmk | 2 make/conf/version-numbers.conf | 6 make/hotspot/lib/CompileJvm.gmk | 5 make/modules/java.base/Copy.gmk | 6 make/modules/java.desktop/lib/ClientLibraries.gmk | 6 src/hotspot/cpu/aarch64/aarch64.ad | 3 src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp | 23 src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp | 8 src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp | 3 src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp | 2 src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp | 2 src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 17 src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp | 4 src/hotspot/cpu/arm/arm.ad | 8 src/hotspot/cpu/ppc/atomicAccess_ppc.hpp | 649 src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp | 8 src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp | 3 src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp | 2 src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp | 4 src/hotspot/cpu/ppc/methodHandles_ppc.cpp | 9 src/hotspot/cpu/ppc/orderAccess_ppc.hpp | 86 src/hotspot/cpu/ppc/ppc.ad | 59 src/hotspot/cpu/ppc/vm_version_ppc.cpp | 4 src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp | 4 src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp | 3 src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp | 2 src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp | 2 src/hotspot/cpu/riscv/icache_riscv.cpp | 3 src/hotspot/cpu/riscv/methodHandles_riscv.cpp | 55 src/hotspot/cpu/riscv/methodHandles_riscv.hpp | 4 src/hotspot/cpu/riscv/nativeInst_riscv.cpp | 13 src/hotspot/cpu/riscv/nativeInst_riscv.hpp | 34 src/hotspot/cpu/riscv/riscv.ad | 32 src/hotspot/cpu/riscv/riscv_v.ad | 19 src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp | 4 src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp | 4 src/hotspot/cpu/riscv/templateTable_riscv.cpp | 11 src/hotspot/cpu/riscv/vm_version_riscv.cpp | 10 src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp | 8 src/hotspot/cpu/x86/macroAssembler_x86.cpp | 12 src/hotspot/cpu/x86/macroAssembler_x86.hpp | 3 src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp | 7 src/hotspot/cpu/x86/x86.ad | 1 src/hotspot/cpu/x86/x86_64.ad | 12 src/hotspot/os/aix/os_perf_aix.cpp | 6 src/hotspot/os/bsd/os_bsd.cpp | 3 src/hotspot/os/linux/cgroupSubsystem_linux.cpp | 15 src/hotspot/os/linux/cgroupSubsystem_linux.hpp | 30 src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp | 44 src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp | 38 src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp | 57 src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp | 34 src/hotspot/os/linux/osContainer_linux.cpp | 12 src/hotspot/os/linux/osContainer_linux.hpp | 5 src/hotspot/os/linux/os_linux.cpp | 36 src/hotspot/os/posix/os_posix.cpp | 39 src/hotspot/os/posix/perfMemory_posix.cpp | 6 src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp | 398 src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp | 65 src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp | 376 src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp | 69 src/hotspot/share/c1/c1_Runtime1.cpp | 8 src/hotspot/share/cds/dynamicArchive.cpp | 1 src/hotspot/share/cds/filemap.cpp | 2 src/hotspot/share/cds/filemap.hpp | 1 src/hotspot/share/cds/lambdaFormInvokers.cpp | 2 src/hotspot/share/cds/metaspaceShared.cpp | 65 src/hotspot/share/cds/metaspaceShared.hpp | 5 src/hotspot/share/ci/ciReplay.cpp | 2 src/hotspot/share/classfile/classLoader.cpp | 6 src/hotspot/share/classfile/resolutionErrors.cpp | 11 src/hotspot/share/classfile/resolutionErrors.hpp | 7 src/hotspot/share/classfile/systemDictionary.cpp | 23 src/hotspot/share/classfile/systemDictionary.hpp | 2 src/hotspot/share/code/codeBlob.cpp | 1 src/hotspot/share/code/codeCache.cpp | 88 src/hotspot/share/code/nmethod.cpp | 56 src/hotspot/share/code/nmethod.hpp | 108 src/hotspot/share/compiler/compilationPolicy.cpp | 4 src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 114 src/hotspot/share/gc/g1/g1CollectedHeap.hpp | 32 src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp | 2 src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp | 4 src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp | 4 src/hotspot/share/gc/shared/collectedHeap.cpp | 2 src/hotspot/share/gc/shared/gc_globals.hpp | 2 src/hotspot/share/gc/shared/stringdedup/stringDedupStat.cpp | 22 src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp | 9 src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp | 2 src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp | 2 src/hotspot/share/gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp | 1 src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp | 2 src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp | 7 src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp | 4 src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp | 9 src/hotspot/share/gc/shenandoah/shenandoahGeneration.hpp | 5 src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp | 19 src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp | 8 src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.hpp | 5 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp | 6 src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp | 1 src/hotspot/share/gc/shenandoah/shenandoahInitLogger.cpp | 1 src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.cpp | 20 src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.hpp | 24 src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.inline.hpp | 90 src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.hpp | 4 src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.inline.hpp | 4 src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp | 2 src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp | 4 src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp | 2 src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp | 142 src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp | 33 src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.inline.hpp | 34 src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp | 4 src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.hpp | 2 src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp | 6 src/hotspot/share/jfr/jfr.cpp | 14 src/hotspot/share/jfr/jfr.hpp | 5 src/hotspot/share/jfr/jni/jfrJniMethod.cpp | 5 src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp | 92 src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp | 17 src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp | 101 src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp | 4 src/hotspot/share/jfr/recorder/jfrRecorder.cpp | 4 src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp | 114 src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp | 4 src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp | 7 src/hotspot/share/jfr/recorder/service/jfrPostBox.hpp | 25 src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp | 181 src/hotspot/share/jfr/recorder/service/jfrRecorderService.hpp | 20 src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp | 8 src/hotspot/share/jfr/support/jfrThreadLocal.cpp | 2 src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 26 src/hotspot/share/jvmci/jvmciEnv.cpp | 6 src/hotspot/share/jvmci/jvmciEnv.hpp | 2 src/hotspot/share/jvmci/jvmciJavaClasses.hpp | 1 src/hotspot/share/jvmci/jvmciRuntime.cpp | 12 src/hotspot/share/jvmci/jvmciRuntime.hpp | 2 src/hotspot/share/jvmci/vmStructs_jvmci.cpp | 26 src/hotspot/share/oops/instanceKlass.cpp | 12 src/hotspot/share/oops/method.cpp | 2 src/hotspot/share/opto/addnode.cpp | 4 src/hotspot/share/opto/chaitin.cpp | 2 src/hotspot/share/opto/macro.cpp | 41 src/hotspot/share/opto/superword.cpp | 12 src/hotspot/share/prims/jvmtiAgentList.cpp | 5 src/hotspot/share/prims/jvmtiEventController.cpp | 7 src/hotspot/share/prims/whitebox.cpp | 38 src/hotspot/share/runtime/abstract_vm_version.cpp | 2 src/hotspot/share/runtime/continuationEntry.hpp | 1 src/hotspot/share/runtime/deoptimization.cpp | 10 src/hotspot/share/runtime/java.cpp | 7 src/hotspot/share/runtime/javaThread.cpp | 2 src/hotspot/share/runtime/os.cpp | 4 src/hotspot/share/runtime/os.hpp | 2 src/hotspot/share/runtime/sharedRuntime.cpp | 2 src/hotspot/share/runtime/vmStructs.cpp | 5 src/hotspot/share/services/diagnosticCommand.cpp | 25 src/hotspot/share/services/diagnosticCommand.hpp | 15 src/hotspot/share/utilities/debug.cpp | 75 src/hotspot/share/utilities/vmError.cpp | 4 src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java | 31 src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java | 50 src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java | 4 src/java.base/share/classes/com/sun/crypto/provider/RSACipherAdaptor.java | 146 src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java | 9 src/java.base/share/classes/java/io/Console.java | 28 src/java.base/share/classes/java/lang/System.java | 3 src/java.base/share/classes/java/lang/VirtualThread.java | 35 src/java.base/share/classes/java/security/KeyStore.java | 34 src/java.base/share/classes/java/security/MessageDigest.java | 26 src/java.base/share/classes/java/security/Signature.java | 203 src/java.base/share/classes/java/text/CompactNumberFormat.java | 27 src/java.base/share/classes/java/text/DigitList.java | 10 src/java.base/share/classes/java/util/GregorianCalendar.java | 8 src/java.base/share/classes/java/util/concurrent/DelayScheduler.java | 69 src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java | 2 src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java | 19 src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java | 6 src/java.base/share/classes/java/util/zip/GZIPInputStream.java | 56 src/java.base/share/classes/javax/crypto/Cipher.java | 85 src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java | 3 src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java | 10 src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java | 47 src/java.base/share/classes/sun/security/provider/X509Factory.java | 11 src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java | 6 src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java | 8 src/java.base/share/classes/sun/security/ssl/HelloCookieManager.java | 4 src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java | 34 src/java.base/share/classes/sun/security/util/CryptoAlgorithmConstraints.java | 154 src/java.base/share/classes/sun/security/util/KnownOIDs.java | 2 src/java.base/share/classes/sun/security/util/Password.java | 140 src/java.base/share/classes/sun/security/util/resources/security.properties | 3 src/java.base/share/classes/sun/security/validator/CADistrustPolicy.java | 18 src/java.base/share/classes/sun/security/validator/ChunghwaTLSPolicy.java | 103 src/java.base/share/conf/security/java.security | 54 src/java.base/share/data/tzdata/VERSION | 2 src/java.base/share/data/tzdata/africa | 9 src/java.base/share/data/tzdata/antarctica | 12 src/java.base/share/data/tzdata/asia | 6 src/java.base/share/data/tzdata/australasia | 10 src/java.base/share/data/tzdata/etcetera | 3 src/java.base/share/data/tzdata/europe | 126 src/java.base/share/data/tzdata/iso3166.tab | 18 src/java.base/share/data/tzdata/leapseconds | 19 src/java.base/share/data/tzdata/northamerica | 53 src/java.base/share/data/tzdata/southamerica | 6 src/java.base/share/legal/gcc.md | 2084 ++ src/java.base/share/legal/zlib.md | 4 src/java.base/share/man/java.md | 40 src/java.base/share/native/libzip/zip_util.c | 149 src/java.base/share/native/libzip/zip_util.h | 18 src/java.base/unix/native/libjava/Console_md.c | 19 src/java.base/unix/native/libjava/java_props_md.c | 8 src/java.base/unix/native/libnet/net_util_md.c | 2 src/java.base/windows/native/libjava/Console_md.c | 27 src/java.base/windows/native/libjava/java_props_md.c | 55 src/java.base/windows/native/libnet/net_util_md.c | 2 src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m | 16 src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.h | 3 src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.m | 27 src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m | 27 src/java.desktop/share/classes/com/sun/beans/WildcardTypeImpl.java | 4 src/java.desktop/share/classes/com/sun/beans/decoder/NullElementHandler.java | 4 src/java.desktop/share/classes/com/sun/beans/decoder/ValueObjectImpl.java | 4 src/java.desktop/share/classes/com/sun/beans/editors/BooleanEditor.java | 6 src/java.desktop/share/classes/com/sun/beans/editors/ByteEditor.java | 4 src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java | 17 src/java.desktop/share/classes/com/sun/beans/editors/DoubleEditor.java | 3 src/java.desktop/share/classes/com/sun/beans/editors/EnumEditor.java | 14 src/java.desktop/share/classes/com/sun/beans/editors/FloatEditor.java | 4 src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java | 16 src/java.desktop/share/classes/com/sun/beans/editors/IntegerEditor.java | 3 src/java.desktop/share/classes/com/sun/beans/editors/LongEditor.java | 4 src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java | 3 src/java.desktop/share/classes/com/sun/beans/editors/ShortEditor.java | 4 src/java.desktop/share/classes/com/sun/beans/editors/StringEditor.java | 4 src/java.desktop/share/classes/com/sun/beans/infos/ComponentBeanInfo.java | 3 src/java.desktop/share/classes/com/sun/beans/util/Cache.java | 17 src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java | 11 src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/common/InputStreamAdapter.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java | 8 src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java | 22 src/java.desktop/share/classes/com/sun/imageio/plugins/common/SingleTileRenderedImage.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/common/SubImageInputStream.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java | 14 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFMetadata.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java | 15 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.java | 7 src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.java | 8 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/COMMarkerSegment.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java | 7 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java | 7 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java | 39 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java | 11 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java | 1 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java | 7 src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java | 7 src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java | 14 src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFCIELabColorConverter.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflateDecompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflater.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFExifJPEGCompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxCompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFieldNode.java | 13 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java | 13 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageReaderSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriterSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBCompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBDecompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWCompressor.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWDecompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFMetadataFormat.java | 27 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullCompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullDecompressor.java | 5 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsCompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsDecompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRLECompressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRenderedImage.java | 23 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadata.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormatResources.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT4Compressor.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT6Compressor.java | 3 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java | 4 src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrDecompressor.java | 36 src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java | 9 src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.java | 3 src/java.desktop/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java | 4 src/java.desktop/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java | 4 src/java.desktop/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java | 6 src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java | 4 src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java | 4 src/java.desktop/share/classes/com/sun/imageio/stream/CloseableDisposerRecord.java | 3 src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java | 3 src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java | 10 src/java.desktop/share/classes/sun/awt/geom/AreaOp.java | 50 src/java.desktop/share/classes/sun/awt/geom/Curve.java | 7 src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java | 132 src/java.desktop/share/classes/sun/font/CompositeFont.java | 8 src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java | 10 src/java.desktop/share/legal/freetype.md | 40 src/java.desktop/share/legal/giflib.md | 10 src/java.desktop/share/legal/harfbuzz.md | 2 src/java.desktop/share/legal/libpng.md | 23 src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/config/ftheader.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h | 57 src/java.desktop/share/native/libfreetype/include/freetype/config/ftstdlib.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/config/integer-types.h | 31 src/java.desktop/share/native/libfreetype/include/freetype/config/mac-support.h | 4 src/java.desktop/share/native/libfreetype/include/freetype/config/public-macros.h | 6 src/java.desktop/share/native/libfreetype/include/freetype/freetype.h | 121 src/java.desktop/share/native/libfreetype/include/freetype/ftadvanc.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftbbox.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h | 14 src/java.desktop/share/native/libfreetype/include/freetype/ftbitmap.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftcid.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftcolor.h | 17 src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h | 6 src/java.desktop/share/native/libfreetype/include/freetype/fterrdef.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/fterrors.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftfntfmt.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftglyph.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftgzip.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h | 10 src/java.desktop/share/native/libfreetype/include/freetype/ftincrem.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftlcdfil.h | 12 src/java.desktop/share/native/libfreetype/include/freetype/ftlist.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftlogging.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftmac.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftmm.h | 256 src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftmoderr.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftoutln.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h | 9 src/java.desktop/share/native/libfreetype/include/freetype/ftrender.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftsizes.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftsnames.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftstroke.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftsynth.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/ftsystem.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/fttrigon.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/fttypes.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/autohint.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/cffotypes.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/cfftypes.h | 6 src/java.desktop/share/native/libfreetype/include/freetype/internal/compiler-macros.h | 6 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftcalc.h | 296 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdebug.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdrv.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftgloadr.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/fthash.h | 23 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmemory.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmmtypes.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h | 60 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpsprop.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftrfork.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftserv.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftstream.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h | 5 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/psaux.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/pshints.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svbdf.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcfftl.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcid.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svfntfmt.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgldict.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgxval.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svkern.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmetric.h | 4 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svotval.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpfr.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpostnm.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svprop.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpscmap.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpsinfo.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svsfnt.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttcmap.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svtteng.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttglyf.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svwinfnt.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h | 8 src/java.desktop/share/native/libfreetype/include/freetype/internal/svginterface.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/t1types.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h | 41 src/java.desktop/share/native/libfreetype/include/freetype/internal/wofftypes.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/otsvg.h | 2 src/java.desktop/share/native/libfreetype/include/freetype/t1tables.h | 6 src/java.desktop/share/native/libfreetype/include/freetype/ttnameid.h | 258 src/java.desktop/share/native/libfreetype/include/freetype/tttables.h | 13 src/java.desktop/share/native/libfreetype/include/freetype/tttags.h | 2 src/java.desktop/share/native/libfreetype/include/ft2build.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c | 1621 + src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h | 130 src/java.desktop/share/native/libfreetype/src/autofit/afblue.c | 194 src/java.desktop/share/native/libfreetype/src/autofit/afblue.cin | 2 src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat | 194 src/java.desktop/share/native/libfreetype/src/autofit/afblue.h | 11 src/java.desktop/share/native/libfreetype/src/autofit/afblue.hin | 11 src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c | 49 src/java.desktop/share/native/libfreetype/src/autofit/afcjk.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afcover.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afdummy.c | 2 src/java.desktop/share/native/libfreetype/src/autofit/afdummy.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/aferrors.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c | 40 src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h | 17 src/java.desktop/share/native/libfreetype/src/autofit/afhints.c | 23 src/java.desktop/share/native/libfreetype/src/autofit/afhints.h | 19 src/java.desktop/share/native/libfreetype/src/autofit/afindic.c | 2 src/java.desktop/share/native/libfreetype/src/autofit/afindic.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/aflatin.c | 1561 + src/java.desktop/share/native/libfreetype/src/autofit/aflatin.h | 25 src/java.desktop/share/native/libfreetype/src/autofit/afloader.c | 16 src/java.desktop/share/native/libfreetype/src/autofit/afloader.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afmodule.c | 14 src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h | 8 src/java.desktop/share/native/libfreetype/src/autofit/afranges.c | 63 src/java.desktop/share/native/libfreetype/src/autofit/afranges.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afscript.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afshaper.c | 340 src/java.desktop/share/native/libfreetype/src/autofit/afshaper.h | 19 src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h | 58 src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h | 6 src/java.desktop/share/native/libfreetype/src/autofit/afws-decl.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/afws-iter.h | 2 src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c | 197 src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h | 82 src/java.desktop/share/native/libfreetype/src/base/ftadvanc.c | 68 src/java.desktop/share/native/libfreetype/src/base/ftbase.h | 4 src/java.desktop/share/native/libfreetype/src/base/ftbbox.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c | 26 src/java.desktop/share/native/libfreetype/src/base/ftcalc.c | 146 src/java.desktop/share/native/libfreetype/src/base/ftcid.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftcolor.c | 21 src/java.desktop/share/native/libfreetype/src/base/ftdbgmem.c | 3 src/java.desktop/share/native/libfreetype/src/base/ftdebug.c | 4 src/java.desktop/share/native/libfreetype/src/base/ftfntfmt.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftfstype.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftgasp.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftgloadr.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftglyph.c | 17 src/java.desktop/share/native/libfreetype/src/base/fthash.c | 104 src/java.desktop/share/native/libfreetype/src/base/ftinit.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c | 273 src/java.desktop/share/native/libfreetype/src/base/ftmac.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftmm.c | 37 src/java.desktop/share/native/libfreetype/src/base/ftobjs.c | 118 src/java.desktop/share/native/libfreetype/src/base/ftoutln.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftpatent.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftpsprop.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftrfork.c | 10 src/java.desktop/share/native/libfreetype/src/base/ftsnames.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftstream.c | 4 src/java.desktop/share/native/libfreetype/src/base/ftstroke.c | 24 src/java.desktop/share/native/libfreetype/src/base/ftsynth.c | 4 src/java.desktop/share/native/libfreetype/src/base/ftsystem.c | 4 src/java.desktop/share/native/libfreetype/src/base/fttrigon.c | 2 src/java.desktop/share/native/libfreetype/src/base/fttype1.c | 2 src/java.desktop/share/native/libfreetype/src/base/ftutil.c | 5 src/java.desktop/share/native/libfreetype/src/cff/cffcmap.c | 2 src/java.desktop/share/native/libfreetype/src/cff/cffcmap.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c | 168 src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cfferrs.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cffgload.c | 70 src/java.desktop/share/native/libfreetype/src/cff/cffgload.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cffload.c | 20 src/java.desktop/share/native/libfreetype/src/cff/cffload.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c | 22 src/java.desktop/share/native/libfreetype/src/cff/cffobjs.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cffparse.c | 10 src/java.desktop/share/native/libfreetype/src/cff/cffparse.h | 2 src/java.desktop/share/native/libfreetype/src/cff/cfftoken.h | 6 src/java.desktop/share/native/libfreetype/src/cid/ciderrs.h | 2 src/java.desktop/share/native/libfreetype/src/cid/cidgload.c | 46 src/java.desktop/share/native/libfreetype/src/cid/cidgload.h | 2 src/java.desktop/share/native/libfreetype/src/cid/cidload.c | 2 src/java.desktop/share/native/libfreetype/src/cid/cidload.h | 2 src/java.desktop/share/native/libfreetype/src/cid/cidobjs.c | 2 src/java.desktop/share/native/libfreetype/src/cid/cidobjs.h | 2 src/java.desktop/share/native/libfreetype/src/cid/cidparse.c | 2 src/java.desktop/share/native/libfreetype/src/cid/cidparse.h | 2 src/java.desktop/share/native/libfreetype/src/cid/cidriver.c | 2 src/java.desktop/share/native/libfreetype/src/cid/cidriver.h | 2 src/java.desktop/share/native/libfreetype/src/cid/cidtoken.h | 4 src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c | 2 src/java.desktop/share/native/libfreetype/src/psaux/afmparse.h | 2 src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.c | 6 src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.h | 2 src/java.desktop/share/native/libfreetype/src/psaux/psauxerr.h | 2 src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.c | 2 src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.h | 5 src/java.desktop/share/native/libfreetype/src/psaux/psconv.c | 2 src/java.desktop/share/native/libfreetype/src/psaux/psconv.h | 2 src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c | 2 src/java.desktop/share/native/libfreetype/src/psaux/psobjs.c | 9 src/java.desktop/share/native/libfreetype/src/psaux/psobjs.h | 2 src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.c | 2 src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.h | 2 src/java.desktop/share/native/libfreetype/src/psaux/t1decode.c | 4 src/java.desktop/share/native/libfreetype/src/psaux/t1decode.h | 2 src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c | 244 src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.h | 2 src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c | 52 src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.h | 2 src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.c | 2 src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.h | 2 src/java.desktop/share/native/libfreetype/src/pshinter/pshnterr.h | 2 src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.c | 12 src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.h | 2 src/java.desktop/share/native/libfreetype/src/psnames/psmodule.c | 2 src/java.desktop/share/native/libfreetype/src/psnames/psmodule.h | 2 src/java.desktop/share/native/libfreetype/src/psnames/psnamerr.h | 2 src/java.desktop/share/native/libfreetype/src/psnames/pstables.h | 2 src/java.desktop/share/native/libfreetype/src/raster/ftmisc.h | 2 src/java.desktop/share/native/libfreetype/src/raster/ftraster.c | 18 src/java.desktop/share/native/libfreetype/src/raster/ftraster.h | 2 src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c | 2 src/java.desktop/share/native/libfreetype/src/raster/ftrend1.h | 2 src/java.desktop/share/native/libfreetype/src/raster/rasterrs.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.c | 7 src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c | 11 src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/sferrors.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c | 9 src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.c | 2 src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.c | 18 src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c | 22 src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttcmapc.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.c | 14 src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.c | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.c | 5 src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.h | 8 src/java.desktop/share/native/libfreetype/src/sfnt/ttload.c | 32 src/java.desktop/share/native/libfreetype/src/sfnt/ttload.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c | 4 src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c | 66 src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.h | 2 src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.c | 2 src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.h | 2 src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c | 90 src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.h | 13 src/java.desktop/share/native/libfreetype/src/smooth/ftsmerrs.h | 2 src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c | 167 src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.h | 2 src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.c | 6 src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.h | 2 src/java.desktop/share/native/libfreetype/src/truetype/tterrors.h | 2 src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c | 410 src/java.desktop/share/native/libfreetype/src/truetype/ttgload.h | 2 src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c | 710 src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h | 7 src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c | 1589 - src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.h | 134 src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c | 445 src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.h | 127 src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c | 18 src/java.desktop/share/native/libfreetype/src/truetype/ttpload.h | 2 src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c | 1013 - src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h | 110 src/java.desktop/share/native/libfreetype/src/type1/t1afm.c | 2 src/java.desktop/share/native/libfreetype/src/type1/t1afm.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1driver.c | 2 src/java.desktop/share/native/libfreetype/src/type1/t1driver.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1errors.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1gload.c | 44 src/java.desktop/share/native/libfreetype/src/type1/t1gload.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1load.c | 8 src/java.desktop/share/native/libfreetype/src/type1/t1load.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1objs.c | 2 src/java.desktop/share/native/libfreetype/src/type1/t1objs.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1parse.c | 2 src/java.desktop/share/native/libfreetype/src/type1/t1parse.h | 2 src/java.desktop/share/native/libfreetype/src/type1/t1tokens.h | 4 src/java.desktop/share/native/libharfbuzz/OT/Color/COLR/COLR.hh | 92 src/java.desktop/share/native/libharfbuzz/OT/Color/CPAL/CPAL.hh | 1 src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/Coverage.hh | 58 src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat1.hh | 4 src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat2.hh | 2 src/java.desktop/share/native/libharfbuzz/OT/Layout/GDEF/GDEF.hh | 58 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/Anchor.hh | 14 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorFormat3.hh | 15 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorMatrix.hh | 7 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePos.hh | 8 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePosFormat1.hh | 15 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/GPOS.hh | 66 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/LigatureArray.hh | 19 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkArray.hh | 10 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePos.hh | 8 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePosFormat1.hh | 33 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPos.hh | 8 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPosFormat1.hh | 18 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPos.hh | 8 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPosFormat1.hh | 32 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPos.hh | 8 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat1.hh | 41 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat2.hh | 52 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/SinglePos.hh | 14 src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/ValueFormat.hh | 13 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSet.hh | 13 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubst.hh | 14 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubstFormat1.hh | 13 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Ligature.hh | 31 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSet.hh | 30 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubst.hh | 14 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubstFormat1.hh | 52 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/MultipleSubst.hh | 14 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/ReverseChainSingleSubst.hh | 8 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Sequence.hh | 2 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubst.hh | 14 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat1.hh | 15 src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat2.hh | 11 src/java.desktop/share/native/libharfbuzz/OT/Layout/types.hh | 7 src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.cc | 421 src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.hh | 22 src/java.desktop/share/native/libharfbuzz/OT/glyf/Glyph.hh | 38 src/java.desktop/share/native/libharfbuzz/OT/glyf/SimpleGlyph.hh | 2 src/java.desktop/share/native/libharfbuzz/OT/glyf/glyf.hh | 147 src/java.desktop/share/native/libharfbuzz/graph/classdef-graph.hh | 4 src/java.desktop/share/native/libharfbuzz/graph/coverage-graph.hh | 74 src/java.desktop/share/native/libharfbuzz/graph/graph.hh | 334 src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-context.hh | 1 src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-graph.hh | 116 src/java.desktop/share/native/libharfbuzz/graph/markbasepos-graph.hh | 12 src/java.desktop/share/native/libharfbuzz/graph/pairpos-graph.hh | 19 src/java.desktop/share/native/libharfbuzz/graph/serialize.hh | 45 src/java.desktop/share/native/libharfbuzz/graph/split-helpers.hh | 4 src/java.desktop/share/native/libharfbuzz/hb-aat-layout-common.hh | 134 src/java.desktop/share/native/libharfbuzz/hb-aat-layout-kerx-table.hh | 74 src/java.desktop/share/native/libharfbuzz/hb-aat-layout-morx-table.hh | 23 src/java.desktop/share/native/libharfbuzz/hb-algs.hh | 288 src/java.desktop/share/native/libharfbuzz/hb-alloc-pool.hh | 105 src/java.desktop/share/native/libharfbuzz/hb-array.hh | 7 src/java.desktop/share/native/libharfbuzz/hb-atomic.hh | 96 src/java.desktop/share/native/libharfbuzz/hb-bimap.hh | 2 src/java.desktop/share/native/libharfbuzz/hb-bit-page.hh | 33 src/java.desktop/share/native/libharfbuzz/hb-bit-set-invertible.hh | 2 src/java.desktop/share/native/libharfbuzz/hb-bit-set.hh | 13 src/java.desktop/share/native/libharfbuzz/hb-buffer-deserialize-text-unicode.hh | 10 src/java.desktop/share/native/libharfbuzz/hb-buffer-serialize.cc | 2 src/java.desktop/share/native/libharfbuzz/hb-buffer-verify.cc | 6 src/java.desktop/share/native/libharfbuzz/hb-buffer.cc | 36 src/java.desktop/share/native/libharfbuzz/hb-buffer.hh | 73 src/java.desktop/share/native/libharfbuzz/hb-cache.hh | 33 src/java.desktop/share/native/libharfbuzz/hb-cff2-interp-cs.hh | 4 src/java.desktop/share/native/libharfbuzz/hb-common.cc | 47 src/java.desktop/share/native/libharfbuzz/hb-config.hh | 16 src/java.desktop/share/native/libharfbuzz/hb-debug.hh | 48 src/java.desktop/share/native/libharfbuzz/hb-deprecated.h | 8 src/java.desktop/share/native/libharfbuzz/hb-draw.cc | 20 src/java.desktop/share/native/libharfbuzz/hb-face-builder.cc | 3 src/java.desktop/share/native/libharfbuzz/hb-face.cc | 5 src/java.desktop/share/native/libharfbuzz/hb-font.cc | 248 src/java.desktop/share/native/libharfbuzz/hb-font.h | 129 src/java.desktop/share/native/libharfbuzz/hb-font.hh | 365 src/java.desktop/share/native/libharfbuzz/hb-free-pool.hh | 107 src/java.desktop/share/native/libharfbuzz/hb-ft.cc | 30 src/java.desktop/share/native/libharfbuzz/hb-geometry.hh | 251 src/java.desktop/share/native/libharfbuzz/hb-iter.hh | 11 src/java.desktop/share/native/libharfbuzz/hb-kern.hh | 2 src/java.desktop/share/native/libharfbuzz/hb-limits.hh | 8 src/java.desktop/share/native/libharfbuzz/hb-machinery.hh | 24 src/java.desktop/share/native/libharfbuzz/hb-map.hh | 51 src/java.desktop/share/native/libharfbuzz/hb-number-parser.hh | 8 src/java.desktop/share/native/libharfbuzz/hb-open-file.hh | 14 src/java.desktop/share/native/libharfbuzz/hb-open-type.hh | 207 src/java.desktop/share/native/libharfbuzz/hb-ot-cff-common.hh | 2 src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-std-str.hh | 782 src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-table.hh | 4 src/java.desktop/share/native/libharfbuzz/hb-ot-cff2-table.cc | 6 src/java.desktop/share/native/libharfbuzz/hb-ot-cmap-table.hh | 53 src/java.desktop/share/native/libharfbuzz/hb-ot-font.cc | 568 src/java.desktop/share/native/libharfbuzz/hb-ot-hmtx-table.hh | 79 src/java.desktop/share/native/libharfbuzz/hb-ot-kern-table.hh | 20 src/java.desktop/share/native/libharfbuzz/hb-ot-layout-base-table.hh | 20 src/java.desktop/share/native/libharfbuzz/hb-ot-layout-common.hh | 714 src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh | 10 src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsub-table.hh | 10 src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsubgpos.hh | 1096 - src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc | 162 src/java.desktop/share/native/libharfbuzz/hb-ot-layout.h | 6 src/java.desktop/share/native/libharfbuzz/hb-ot-layout.hh | 32 src/java.desktop/share/native/libharfbuzz/hb-ot-math-table.hh | 6 src/java.desktop/share/native/libharfbuzz/hb-ot-post-macroman.hh | 516 src/java.desktop/share/native/libharfbuzz/hb-ot-shape-fallback.cc | 29 src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.cc | 12 src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.hh | 2 src/java.desktop/share/native/libharfbuzz/hb-ot-shape.cc | 216 src/java.desktop/share/native/libharfbuzz/hb-ot-shape.hh | 2 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-joining-list.hh | 8 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-table.hh | 22 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic.cc | 2 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-hangul.cc | 2 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-machine.hh | 14 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-table.cc | 12 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic.cc | 48 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer-machine.hh | 14 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer.cc | 6 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-myanmar-machine.hh | 14 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-thai.cc | 6 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-machine.hh | 14 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-table.hh | 727 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-vowel-constraints.cc | 4 src/java.desktop/share/native/libharfbuzz/hb-ot-shaper.hh | 6 src/java.desktop/share/native/libharfbuzz/hb-ot-stat-table.hh | 20 src/java.desktop/share/native/libharfbuzz/hb-ot-tag-table.hh | 8 src/java.desktop/share/native/libharfbuzz/hb-ot-var-avar-table.hh | 178 src/java.desktop/share/native/libharfbuzz/hb-ot-var-common.hh | 719 src/java.desktop/share/native/libharfbuzz/hb-ot-var-cvar-table.hh | 7 src/java.desktop/share/native/libharfbuzz/hb-ot-var-fvar-table.hh | 25 src/java.desktop/share/native/libharfbuzz/hb-ot-var-gvar-table.hh | 165 src/java.desktop/share/native/libharfbuzz/hb-ot-var-hvar-table.hh | 101 src/java.desktop/share/native/libharfbuzz/hb-ot-var.cc | 20 src/java.desktop/share/native/libharfbuzz/hb-ot-vorg-table.hh | 1 src/java.desktop/share/native/libharfbuzz/hb-outline.cc | 9 src/java.desktop/share/native/libharfbuzz/hb-outline.hh | 1 src/java.desktop/share/native/libharfbuzz/hb-paint-extents.cc | 14 src/java.desktop/share/native/libharfbuzz/hb-paint-extents.hh | 38 src/java.desktop/share/native/libharfbuzz/hb-paint.hh | 74 src/java.desktop/share/native/libharfbuzz/hb-pool.hh | 107 src/java.desktop/share/native/libharfbuzz/hb-priority-queue.hh | 12 src/java.desktop/share/native/libharfbuzz/hb-repacker.hh | 27 src/java.desktop/share/native/libharfbuzz/hb-sanitize.hh | 98 src/java.desktop/share/native/libharfbuzz/hb-script-list.h | 12 src/java.desktop/share/native/libharfbuzz/hb-serialize.hh | 9 src/java.desktop/share/native/libharfbuzz/hb-set-digest.hh | 6 src/java.desktop/share/native/libharfbuzz/hb-shape.cc | 8 src/java.desktop/share/native/libharfbuzz/hb-shaper-list.hh | 8 src/java.desktop/share/native/libharfbuzz/hb-static.cc | 23 src/java.desktop/share/native/libharfbuzz/hb-string-array.hh | 12 src/java.desktop/share/native/libharfbuzz/hb-subset-cff-common.hh | 6 src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-iup.hh | 15 src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.cc | 38 src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.hh | 22 src/java.desktop/share/native/libharfbuzz/hb-subset-plan-member-list.hh | 4 src/java.desktop/share/native/libharfbuzz/hb-subset-plan.cc | 19 src/java.desktop/share/native/libharfbuzz/hb-subset-plan.hh | 3 src/java.desktop/share/native/libharfbuzz/hb-subset.cc | 578 src/java.desktop/share/native/libharfbuzz/hb-subset.h | 5 src/java.desktop/share/native/libharfbuzz/hb-subset.hh | 1 src/java.desktop/share/native/libharfbuzz/hb-ucd-table.hh | 9223 ++++------ src/java.desktop/share/native/libharfbuzz/hb-unicode-emoji-table.hh | 86 src/java.desktop/share/native/libharfbuzz/hb-unicode.hh | 51 src/java.desktop/share/native/libharfbuzz/hb-utf.hh | 20 src/java.desktop/share/native/libharfbuzz/hb-vector.hh | 187 src/java.desktop/share/native/libharfbuzz/hb-version.h | 8 src/java.desktop/share/native/libharfbuzz/hb.hh | 29 src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java | 25 src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java | 6 src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java | 8 src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java | 25 src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c | 21 src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.h | 6 src/java.management/share/classes/sun/management/ThreadImpl.java | 4 src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java | 48 src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java | 4 src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java | 24 src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java | 24 src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java | 41 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java | 828 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java | 7 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java | 232 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java | 15 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java | 15 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java | 45 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java | 31 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java | 7 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java | 29 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java | 23 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java | 41 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java | 7 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java | 9 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java | 11 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java | 38 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java | 38 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InvalidMethodSignatureException.java | 53 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java | 152 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java | 23 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java | 11 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java | 49 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java | 66 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java | 49 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java | 49 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java | 11 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java | 45 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java | 39 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestMembers.java | 11 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java | 18 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Record.java | 153 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RecordComponentInfo.java | 139 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleAnnotations.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleParameterAnnotations.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleAnnotations.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleParameterAnnotations.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java | 20 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java | 13 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java | 29 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java | 60 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java | 32 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/package-info.java | 25 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java | 7 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationEntryGen.java | 22 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java | 15 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassElementValueGen.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java | 82 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java | 42 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java | 12 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java | 1 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConst.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java | 28 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java | 15 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java | 69 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java | 9 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java | 1 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java | 9 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java | 53 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java | 62 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java | 14 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SimpleElementValueGen.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java | 28 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java | 70 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/package-info.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/package-info.java | 26 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELComparator.java | 23 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java | 8 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java | 91 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java | 10 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java | 4 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java | 2 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java | 7 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java | 6 src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/package-info.java | 32 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java | 17 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java | 5 src/java.xml/share/classes/jdk/xml/internal/Utils.java | 60 src/java.xml/share/legal/bcel.md | 2 src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java | 12 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/RSACipherAdaptor.java | 155 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java | 4 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java | 5 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ContinuationEntry.java | 63 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java | 6 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java | 18 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java | 17 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java | 18 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java | 18 src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java | 2 src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java | 4 src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java | 14 src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java | 38 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchWriter.java | 1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties | 3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java | 3 src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java | 16 src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java | 6 src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java | 5 src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventFileStream.java | 6 src/jdk.jfr/share/classes/jdk/jfr/internal/periodic/PeriodicEvents.java | 6 src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c | 99 test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp | 571 test/hotspot/gtest/gc/shenandoah/test_shenandoahOldGeneration.cpp | 2 test/hotspot/gtest/gc/shenandoah/test_shenandoahOldHeuristic.cpp | 2 test/hotspot/gtest/runtime/test_os_reserve_between.cpp | 3 test/hotspot/jtreg/ProblemList-Xcomp.txt | 2 test/hotspot/jtreg/ProblemList.txt | 1 test/hotspot/jtreg/compiler/c2/TestBit.java | 2 test/hotspot/jtreg/compiler/c2/TestMergeStoresAndAllocationElimination.java | 123 test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeIntIdealizationTests.java | 4 test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeLongIdealizationTests.java | 4 test/hotspot/jtreg/compiler/calls/common/InvokeDynamicPatcher.java | 217 test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java | 2 test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java | 2 test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java | 2 test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java | 2 test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java | 2 test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java | 2 test/hotspot/jtreg/compiler/cha/TypeProfileFinalMethod.java | 33 test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java | 11 test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java | 12 test/hotspot/jtreg/compiler/escapeAnalysis/TestRematerializeObjects.java | 195 test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java | 8 test/hotspot/jtreg/compiler/intrinsics/sha/cli/DigestOptionsBase.java | 4 test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java | 3 test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java | 42 test/hotspot/jtreg/compiler/jvmci/common/CTVMUtilities.java | 125 test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java | 4 test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInvalidationReasonTest.java | 77 test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java | 6 test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestHotSpotVMConfig.java | 6 test/hotspot/jtreg/compiler/lib/generators/UniformDoubleGenerator.java | 3 test/hotspot/jtreg/compiler/lib/generators/UniformFloatGenerator.java | 3 test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java | 43 test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java | 114 test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Long.java | 95 test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVectorFuzzer.java | 19 test/hotspot/jtreg/compiler/loopstripmining/CheckLoopStripMining.java | 8 test/hotspot/jtreg/compiler/startup/StartupOutput.java | 8 test/hotspot/jtreg/compiler/vectorization/TestSubwordTruncation.java | 120 test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java | 8 test/hotspot/jtreg/containers/docker/TestJcmd.java | 2 test/hotspot/jtreg/containers/docker/TestMemoryInvisibleParent.java | 121 test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java | 15 test/hotspot/jtreg/containers/docker/TestMisc.java | 56 test/hotspot/jtreg/containers/docker/TestPids.java | 2 test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java | 35 test/hotspot/jtreg/gc/TestObjectAlignmentCardSize.java | 3 test/hotspot/jtreg/gc/TestUseGCOverheadLimit.java | 98 test/hotspot/jtreg/gc/arguments/TestParallelGCErgo.java | 2 test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java | 5 test/hotspot/jtreg/gc/shenandoah/TestDynamicSoftMaxHeapSize.java | 168 test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java | 1 test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java | 1 test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java | 76 test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java | 2 test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java | 15 test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java | 6 test/hotspot/jtreg/runtime/MirrorFrame/Asmator.java | 47 test/hotspot/jtreg/runtime/MirrorFrame/Test8003720.java | 1 test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java | 17 test/hotspot/jtreg/runtime/NMT/CommandLineDetail.java | 21 test/hotspot/jtreg/runtime/NMT/CommandLineSummary.java | 21 test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java | 41 test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java | 23 test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java | 2 test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java | 4 test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java | 39 test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheSupportForCustomLoaders.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/CloseSystemOut.java | 82 test/hotspot/jtreg/runtime/cds/appcds/aotCache/DiagnosticCommandMBeanTest.java | 162 test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/HelloAOTCache.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/JNIDefineClass.java | 138 test/hotspot/jtreg/runtime/cds/appcds/aotCache/JavaAgent.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdAOTEndRecordingTest.java | 93 test/hotspot/jtreg/runtime/cds/appcds/aotCache/ManagementAgent.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/PackageInfoClass.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/SpecialCacheNames.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/VerifierFailOver.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotCache/libJNIDefineClassApp.c | 36 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTCacheWithZGC.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTLoaderConstraintsTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddExports.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddOpens.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddReads.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java | 6 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/FakeCodeLocation.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/GeneratedInternedString.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/LambdaInExcludedClass.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/MethodHandleTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/NonFinalStaticWithInitVal.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/StringConcatStress.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TestSetupAOTTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TrainingRun.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/WeakReferenceTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java | 2 test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java | 2 test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java | 2 test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java | 2 test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java | 2 test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/InternSharedString.java | 2 test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE78_A.java | 2 test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE_Loader2.java | 2 test/hotspot/jtreg/runtime/execstack/Test.java | 2 test/hotspot/jtreg/runtime/execstack/TestMT.java | 2 test/hotspot/jtreg/runtime/execstack/libtest-rw.c | 2 test/hotspot/jtreg/runtime/execstack/libtest-rwx.c | 2 test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java | 4 test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java | 1 test/hotspot/jtreg/runtime/logging/StressAsyncUL.java | 8 test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java | 7 test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/EarlyDynamicLoad.java | 102 test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/libEarlyDynamicLoad.cpp | 59 test/hotspot/jtreg/serviceability/attach/RemovingUnixDomainSocketTest.java | 4 test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/ClassVersionAfterRedefine.java | 49 test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/MissedStackMapFrames/MissedStackMapFrames.java | 45 test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineAnnotations.java | 77 test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineGenericSignatureTest.java | 30 test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineObject.java | 46 test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/RedefineRetransform.java | 86 test/hotspot/jtreg/serviceability/sa/ClhsdbJstackXcompStress.java | 2 test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java | 4 test/hotspot/jtreg/serviceability/sa/LingeredAppWithVirtualThread.java | 87 test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java | 4 test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackWithVirtualThread.java | 82 test/hotspot/jtreg/testlibrary_tests/generators/tests/TestGenerators.java | 22 test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java | 237 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java | 35 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java | 1 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java | 8 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Target.java | 6 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java | 6 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Target.java | 6 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java | 6 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Target.java | 6 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001.java | 11 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002.java | 11 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007.java | 57 test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001.java | 10 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp | 2 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TEST.properties | 24 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java | 5 test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp | 6 test/hotspot/jtreg/vmTestbase/nsk/share/ClassUnloader.java | 51 test/hotspot/jtreg/vmTestbase/nsk/share/gc/GC.java | 3 test/hotspot/jtreg/vmTestbase/nsk/share/jpda/AbstractDebuggeeTest.java | 12 test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java | 25 test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/StressTest.java | 23 test/jdk/ProblemList.txt | 15 test/jdk/com/sun/crypto/provider/Cipher/AES/TestGCMSplitBound.java | 145 test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java | 11 test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java | 21 test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java | 17 test/jdk/com/sun/java/swing/plaf/gtk/4928019/bug4928019.java | 20 test/jdk/com/sun/java/swing/plaf/gtk/Test6635110.java | 36 test/jdk/com/sun/java/swing/plaf/gtk/Test6963870.java | 30 test/jdk/com/sun/jdi/TwoThreadsTest.java | 9 test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java | 90 test/jdk/com/sun/net/httpserver/HttpsParametersClientAuthTest.java | 5 test/jdk/com/sun/net/httpserver/SANTest.java | 5 test/jdk/com/sun/net/httpserver/SelCacheTest.java | 3 test/jdk/com/sun/net/httpserver/ServerStopTerminationTest.java | 31 test/jdk/com/sun/net/httpserver/Test1.java | 3 test/jdk/com/sun/net/httpserver/Test12.java | 3 test/jdk/com/sun/net/httpserver/Test13.java | 3 test/jdk/com/sun/net/httpserver/Test6a.java | 4 test/jdk/com/sun/net/httpserver/Test7a.java | 2 test/jdk/com/sun/net/httpserver/Test8a.java | 4 test/jdk/com/sun/net/httpserver/Test9.java | 16 test/jdk/com/sun/net/httpserver/Test9a.java | 6 test/jdk/com/sun/net/httpserver/bugs/HandlerConnectionClose.java | 5 test/jdk/com/sun/net/httpserver/simpleserver/CustomFileSystemTest.java | 106 test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerAlertTest.java | 10 test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerTest.java | 11 test/jdk/com/sun/net/httpserver/simpleserver/SimpleFileServerTest.java | 134 test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java | 6 test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java | 4 test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java | 73 test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java | 73 test/jdk/java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java | 5 test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest.java | 73 test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest1.java | 84 test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java | 2 test/jdk/java/awt/Frame/FrameSetMinimumSizeTest.java | 85 test/jdk/java/awt/Frame/FrameVisualTest.java | 73 test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java | 205 test/jdk/java/awt/Frame/MultiScreenTest.java | 639 test/jdk/java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java | 19 test/jdk/java/awt/LightweightComponent/LightWeightTabFocus/LightWeightTabFocus.java | 3 test/jdk/java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java | 63 test/jdk/java/awt/Modal/PrintDialogsTest/Test.java | 1 test/jdk/java/awt/Modal/ToFront/DialogToFrontModeless1Test.java | 17 test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java | 212 test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java | 4 test/jdk/java/awt/color/ICC_Profile/SerializedFormSize.java | 72 test/jdk/java/awt/font/GlyphVector/GetGlyphCharIndexTest.java | 19 test/jdk/java/awt/font/LineBreakMeasurer/KhmerLineBreakTest.java | 115 test/jdk/java/awt/font/TextLayout/FormatCharAdvanceTest.java | 33 test/jdk/java/awt/font/TextLayout/TestLayoutVsICU.java | 889 test/jdk/java/awt/font/TextLayout/TestLayoutVsICU_jdkbase.xml | 1827 - test/jdk/java/awt/image/VolatileImage/DrawBufImgOp.java | 484 test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java | 28 test/jdk/java/awt/image/XBMDecoder/invalid_empty.xbm | 6 test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm | 4 test/jdk/java/awt/image/XBMDecoder/invalid_plus.xbm | 3 test/jdk/java/awt/image/XBMDecoder/valid_multiline.xbm | 8 test/jdk/java/awt/print/PrinterJob/PageDialogTest.java | 11 test/jdk/java/awt/print/PrinterJob/PageRanges.java | 61 test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java | 179 test/jdk/java/awt/print/PrinterJob/SwingUIText.java | 218 test/jdk/java/awt/regtesthelpers/PassFailJFrame.java | 69 test/jdk/java/io/Console/DefaultCharsetTest.java | 69 test/jdk/java/io/Console/LocaleTest.java | 125 test/jdk/java/io/Console/ModuleSelectionTest.java | 80 test/jdk/java/io/Console/defaultCharset.exp | 32 test/jdk/java/io/Console/locale.exp | 37 test/jdk/java/io/Console/moduleSelection.exp | 30 test/jdk/java/io/File/MaxPath.java | 9 test/jdk/java/io/Serializable/cloneArray/CloneArray.java | 3 test/jdk/java/io/Serializable/records/AbsentStreamValuesTest.java | 48 test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java | 30 test/jdk/java/io/Serializable/records/BadValues.java | 17 test/jdk/java/io/Serializable/records/BasicRecordSer.java | 56 test/jdk/java/io/Serializable/records/ConstructorAccessTest.java | 19 test/jdk/java/io/Serializable/records/CycleTest.java | 33 test/jdk/java/io/Serializable/records/DifferentStreamFieldsTest.java | 95 test/jdk/java/io/Serializable/records/ProhibitedMethods.java | 46 test/jdk/java/io/Serializable/records/ReadResolveTest.java | 22 test/jdk/java/io/Serializable/records/RecordClassTest.java | 36 test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java | 28 test/jdk/java/io/Serializable/records/SerialVersionUIDTest.java | 37 test/jdk/java/io/Serializable/records/StreamRefTest.java | 23 test/jdk/java/io/Serializable/records/ThrowingConstructorTest.java | 33 test/jdk/java/io/Serializable/records/UnsharedTest.java | 29 test/jdk/java/io/Serializable/records/WriteReplaceTest.java | 24 test/jdk/java/io/Serializable/records/migration/AbstractTest.java | 9 test/jdk/java/io/Serializable/records/migration/AssignableFromTest.java | 25 test/jdk/java/io/Serializable/records/migration/DefaultValuesTest.java | 23 test/jdk/java/io/Serializable/records/migration/SuperStreamFieldsTest.java | 34 test/jdk/java/lang/Byte/Decode.java | 4 test/jdk/java/lang/Class/IsAnnotationType.java | 3 test/jdk/java/lang/Class/IsEnum.java | 3 test/jdk/java/lang/Class/IsSynthetic.java | 3 test/jdk/java/lang/Class/getEnclosingConstructor/EnclosingConstructorTests.java | 3 test/jdk/java/lang/Class/getEnclosingMethod/EnclosingMethodTests.java | 3 test/jdk/java/lang/Double/BitwiseConversion.java | 3 test/jdk/java/lang/Double/Constants.java | 3 test/jdk/java/lang/Double/Extrema.java | 3 test/jdk/java/lang/Double/NaNInfinityParsing.java | 3 test/jdk/java/lang/Double/ParseHexFloatingPoint.java | 3 test/jdk/java/lang/Double/ToHexString.java | 3 test/jdk/java/lang/Float/BitwiseConversion.java | 3 test/jdk/java/lang/Float/Constants.java | 3 test/jdk/java/lang/Float/Extrema.java | 3 test/jdk/java/lang/Float/NaNInfinityParsing.java | 3 test/jdk/java/lang/IO/IO.java | 54 test/jdk/java/lang/Integer/Decode.java | 4 test/jdk/java/lang/Integer/ParsingTest.java | 3 test/jdk/java/lang/Integer/Unsigned.java | 3 test/jdk/java/lang/Long/Decode.java | 4 test/jdk/java/lang/Long/ParsingTest.java | 3 test/jdk/java/lang/Long/Unsigned.java | 3 test/jdk/java/lang/ProcessBuilder/Basic.java | 4 test/jdk/java/lang/ProcessHandle/TEST.properties | 1 test/jdk/java/lang/Short/Decode.java | 4 test/jdk/java/lang/String/IndexOf.java | 19 test/jdk/java/lang/StringBuilder/RacingSBThreads.java | 2 test/jdk/java/lang/Thread/virtual/Starvation.java | 13 test/jdk/java/lang/Thread/virtual/stress/ParkAfterTimedPark.java | 120 test/jdk/java/lang/Thread/virtual/stress/TimedWaitALot.java | 21 test/jdk/java/lang/Throwable/SuppressedExceptions.java | 3 test/jdk/java/lang/annotation/Missing/MissingTest.java | 3 test/jdk/java/lang/annotation/TestIncompleteAnnotationExceptionNPE.java | 3 test/jdk/java/lang/invoke/MethodHandleProxies/Driver.java | 6 test/jdk/java/lang/invoke/MethodHandleProxies/Unnamed.java | 6 test/jdk/java/lang/invoke/TestVHInvokerCaching.java | 8 test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java | 4 test/jdk/java/lang/reflect/AnnotatedElement/TestAnnotatedElementDefaults.java | 3 test/jdk/java/lang/reflect/Constructor/GenericStringTest.java | 3 test/jdk/java/lang/reflect/Constructor/TestParameterAnnotations.java | 3 test/jdk/java/lang/reflect/DefaultAccessibility.java | 3 test/jdk/java/lang/reflect/Field/GenericStringTest.java | 3 test/jdk/java/lang/reflect/Generics/HashCodeTest.java | 3 test/jdk/java/lang/reflect/Generics/Probe.java | 3 test/jdk/java/lang/reflect/Generics/StringsAndBounds.java | 3 test/jdk/java/lang/reflect/Generics/TestParameterizedType.java | 3 test/jdk/java/lang/reflect/Generics/exceptionCauseTest.java | 3 test/jdk/java/lang/reflect/Generics/getAnnotationTest.java | 3 test/jdk/java/lang/reflect/Method/GenericStringTest.java | 3 test/jdk/java/lang/reflect/Method/IsDefaultTest.java | 3 test/jdk/java/lang/reflect/Method/defaultMethodModeling/DefaultMethodModeling.java | 3 test/jdk/java/lang/reflect/TypeVariable/TestAnnotatedElement.java | 3 test/jdk/java/math/BigDecimal/AddTests.java | 3 test/jdk/java/math/BigDecimal/CompareToTests.java | 3 test/jdk/java/math/BigDecimal/DivideTests.java | 3 test/jdk/java/math/BigDecimal/IntegralDivisionTests.java | 3 test/jdk/java/math/BigDecimal/NegateTests.java | 3 test/jdk/java/math/BigDecimal/PowTests.java | 3 test/jdk/java/math/BigDecimal/PrecisionTests.java | 3 test/jdk/java/math/BigDecimal/RoundingTests.java | 3 test/jdk/java/math/BigDecimal/ScaleByPowerOfTenTests.java | 3 test/jdk/java/math/BigDecimal/StrippingZerosTest.java | 3 test/jdk/java/math/BigDecimal/ToPlainStringTests.java | 3 test/jdk/java/math/BigDecimal/ZeroScalingTests.java | 3 test/jdk/java/math/BigInteger/CompareToTests.java | 3 test/jdk/java/math/BigInteger/ExtremeShiftingTests.java | 3 test/jdk/java/math/BigInteger/OperatorNpeTests.java | 3 test/jdk/java/math/BigInteger/StringConstructor.java | 3 test/jdk/java/math/BigInteger/TestValueExact.java | 3 test/jdk/java/math/RoundingMode/RoundingModeTests.java | 3 test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java | 138 test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java | 10 test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java | 10 test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java | 10 test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java | 10 test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java | 10 test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java | 10 test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java | 10 test/jdk/java/net/httpclient/http2/BadHeadersTest.java | 47 test/jdk/java/net/httpclient/http2/BadPushPromiseTest.java | 27 test/jdk/java/net/httpclient/http2/BasicTest.java | 7 test/jdk/java/net/httpclient/http2/ConnectionFlowControlTest.java | 102 test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java | 57 test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java | 9 test/jdk/java/net/httpclient/whitebox/RawChannelTestDriver.java | 9 test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/RawChannelTest.java | 82 test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java | 3 test/jdk/java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java | 8 test/jdk/java/rmi/server/RemoteServer/AddrInUse.java | 96 test/jdk/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java | 123 test/jdk/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java | 3 test/jdk/java/security/KeyStore/TestDisabledAlgorithms.java | 120 test/jdk/java/security/MessageDigest/TestDisabledAlgorithms.java | 93 test/jdk/java/security/Provider/NewInstance.java | 29 test/jdk/java/security/Provider/ProviderVersionCheck.java | 7 test/jdk/java/security/Signature/TestDisabledAlgorithms.java | 91 test/jdk/java/security/cert/CertStore/NoLDAP.java | 11 test/jdk/java/text/Collator/RuleBasedCollatorTest.java | 95 test/jdk/java/text/Format/CompactNumberFormat/CompactFormatAndParseHelper.java | 11 test/jdk/java/text/Format/CompactNumberFormat/TestCNFRounding.java | 55 test/jdk/java/text/Format/CompactNumberFormat/TestClone.java | 95 test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java | 84 test/jdk/java/text/Format/CompactNumberFormat/TestCompactPatternsValidity.java | 50 test/jdk/java/text/Format/CompactNumberFormat/TestEquality.java | 15 test/jdk/java/text/Format/CompactNumberFormat/TestFormatToCharacterIterator.java | 34 test/jdk/java/text/Format/CompactNumberFormat/TestMutatingInstance.java | 31 test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java | 23 test/jdk/java/text/Format/CompactNumberFormat/TestPlurals.java | 59 test/jdk/java/text/Format/CompactNumberFormat/TestSpecialValues.java | 25 test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java | 25 test/jdk/java/text/Format/CompactNumberFormat/serialization/TestDeserializeCNF.java | 23 test/jdk/java/text/Format/CompactNumberFormat/serialization/TestSerialization.java | 24 test/jdk/java/text/Format/DateFormat/Bug8193444.java | 22 test/jdk/java/text/Format/DateFormat/CaseInsensitiveParseTest.java | 32 test/jdk/java/text/Format/DateFormat/LocaleDateFormats.java | 24 test/jdk/java/text/Format/DateFormat/SimpleDateFormatPatternTest.java | 120 test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt | 54 test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.114.txt | 39 test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.142.txt | 42 test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761a.ser.txt | 57 test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761b.ser.txt | 57 test/jdk/java/text/Format/DecimalFormat/RoundingTiesNearZeroTest.java | 83 test/jdk/java/text/Format/DecimalFormat/SerializationTest.java | 351 test/jdk/java/text/Format/DecimalFormat/SetGroupingSizeTest.java | 38 test/jdk/java/text/Format/NumberFormat/Bug4944439.java | 25 test/jdk/java/text/Format/NumberFormat/DFSDeserialization142.java | 56 test/jdk/java/text/Format/NumberFormat/DFSMinusPerCentMill.java | 55 test/jdk/java/text/Format/NumberFormat/DFSSerialization.java | 162 test/jdk/java/text/Format/NumberFormat/DFSSerialization142.java | 54 test/jdk/java/text/Format/NumberFormat/DecimalFormat.114.txt | 54 test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.114.txt | 39 test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.142.txt | 42 test/jdk/java/text/Format/NumberFormat/NumberFormat4185761a.ser.txt | 57 test/jdk/java/text/Format/NumberFormat/NumberFormat4185761b.ser.txt | 57 test/jdk/java/text/Format/NumberFormat/NumberRegression.java | 104 test/jdk/java/text/Format/NumberFormat/SerializationLoadTest.java | 89 test/jdk/java/text/Format/NumberFormat/SerializationSaveTest.java | 81 test/jdk/java/text/Normalizer/SquareEraCharacterTest.java | 24 test/jdk/java/util/Calendar/CalendarDisplayNamesTest.java | 12 test/jdk/java/util/Calendar/JapaneseLenientEraTest.java | 21 test/jdk/java/util/Calendar/RollHoursTest.java | 139 test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java | 16 test/jdk/java/util/Locale/LocaleMatchingTest.java | 186 test/jdk/java/util/Locale/PreserveTagCase.java | 6 test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java | 33 test/jdk/java/util/Locale/TestOf.java | 58 test/jdk/java/util/Locale/bcp47u/CalendarTests.java | 63 test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java | 19 test/jdk/java/util/Locale/bcp47u/CurrencyTests.java | 31 test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java | 19 test/jdk/java/util/Locale/bcp47u/FormatTests.java | 49 test/jdk/java/util/Locale/bcp47u/SymbolsTests.java | 33 test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java | 25 test/jdk/java/util/Properties/CompatibilityTest.java | 19 test/jdk/java/util/Properties/EncodingTest.java | 18 test/jdk/java/util/Properties/InitialCapacity.java | 14 test/jdk/java/util/Properties/PropertiesEntrySetTest.java | 38 test/jdk/java/util/Properties/PropertiesStoreTest.java | 38 test/jdk/java/util/ResourceBundle/modules/basic/BasicTest.java | 18 test/jdk/java/util/ResourceBundle/modules/cache/CacheTest.java | 15 test/jdk/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java | 14 test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java | 36 test/jdk/java/util/ServiceLoader/BadProvidersTest.java | 79 test/jdk/java/util/ServiceLoader/CachingTest.java | 18 test/jdk/java/util/ServiceLoader/ModulesTest.java | 42 test/jdk/java/util/ServiceLoader/NoInterferenceTest.java | 14 test/jdk/java/util/ServiceLoader/ReloadTest.java | 31 test/jdk/java/util/ServiceLoader/TwoIterators.java | 19 test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java | 40 test/jdk/java/util/StringJoiner/MergeTest.java | 55 test/jdk/java/util/StringJoiner/StringJoinerOomUtf16Test.java | 19 test/jdk/java/util/StringJoiner/StringJoinerTest.java | 182 test/jdk/java/util/TimeZone/NegativeDSTTest.java | 23 test/jdk/java/util/TimeZone/TimeZoneData/VERSION | 2 test/jdk/java/util/TimeZone/ZoneIdRoundTripTest.java | 21 test/jdk/java/util/Vector/ArrayManagement.java | 81 test/jdk/java/util/concurrent/DelayScheduler/AscendingOrderAfterReplace.java | 140 test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java | 56 test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java | 61 test/jdk/javax/accessibility/JSpinner/CustomSpinnerAccessibilityTest.java | 86 test/jdk/javax/crypto/Cipher/TestDisabledAlgorithms.java | 116 test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java | 47 test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java | 86 test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java | 5 test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java | 86 test/jdk/javax/net/ssl/TLSCommon/interop/AbstractPeer.java | 9 test/jdk/javax/net/ssl/TLSCommon/interop/JdkClient.java | 13 test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcClient.java | 3 test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java | 3 test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java | 14 test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java | 2 test/jdk/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java | 1 test/jdk/javax/sound/midi/Sequencer/Looping.java | 2 test/jdk/javax/sound/midi/SysexMessage/SendRawSysexMessage.java | 1 test/jdk/javax/sound/midi/spi/MidiDeviceProvider/ExpectedNPEOnNull.java | 1 test/jdk/javax/sound/midi/spi/MidiDeviceProvider/FakeInfo.java | 1 test/jdk/javax/sound/midi/spi/MidiDeviceProvider/UnsupportedInfo.java | 1 test/jdk/javax/sound/sampled/Clip/AutoCloseTimeCheck.java | 1 test/jdk/javax/sound/sampled/Clip/IsRunningHang.java | 1 test/jdk/javax/sound/sampled/DataLine/LongFramePosition.java | 1 test/jdk/javax/sound/sampled/DirectAudio/bug6372428.java | 1 test/jdk/javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java | 69 test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java | 9 test/jdk/javax/swing/JEditorPane/TestBrowserBGColor.java | 133 test/jdk/javax/swing/JFileChooser/FileSizeCheck.java | 27 test/jdk/javax/swing/JFileChooser/bug4759934.java | 16 test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java | 108 test/jdk/javax/swing/JSlider/bug4382876.java | 11 test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java | 29 test/jdk/javax/swing/plaf/basic/BasicHTML/bug4248210.java | 4 test/jdk/javax/swing/plaf/nimbus/TestNimbusProgressBarBorder.java | 123 test/jdk/javax/swing/regtesthelpers/Util.java | 68 test/jdk/javax/swing/text/GlyphView/bug4188841.java | 2 test/jdk/javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java | 18 test/jdk/jdk/internal/jline/JLineConsoleProviderTest.java | 30 test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java | 40 test/jdk/jdk/internal/jline/RedirectedStdOut.java | 181 test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java | 10 test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java | 4 test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java | 16 test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java | 15 test/jdk/jdk/internal/vm/Continuation/Fuzz.java | 3 test/jdk/jdk/internal/vm/Continuation/OSRWithManyLocals.java | 90 test/jdk/jdk/jfr/api/consumer/streaming/TestFilledChunks.java | 2 test/jdk/jdk/jfr/api/consumer/streaming/TestStartMultiChunk.java | 4 test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java | 7 test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java | 6 test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java | 10 test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java | 179 test/jdk/jdk/jfr/event/profiling/TestFullStackTrace.java | 1 test/jdk/jdk/jfr/event/runtime/StressJavaMonitorEvents.java | 2 test/jdk/jdk/jfr/event/runtime/TestBackToBackSensitive.java | 132 test/jdk/jdk/jfr/jmx/streaming/TestMaxSize.java | 6 test/jdk/jdk/jfr/jmx/streaming/TestRemoteDump.java | 16 test/jdk/jdk/jfr/jvm/TestWaste.java | 2 test/jdk/jdk/jfr/startupargs/TestMultipleStartupRecordings.java | 8 test/jdk/jdk/nio/zipfs/TestPosix.java | 4 test/jdk/sun/java2d/OpenGL/DrawBitmaskImage.java | 173 test/jdk/sun/java2d/OpenGL/DrawBufImgOp.java | 514 test/jdk/sun/java2d/OpenGL/DrawImageBg.java | 145 test/jdk/sun/java2d/OpenGL/LargeOps.java | 138 test/jdk/sun/java2d/OpenGL/OpaqueDest.java | 186 test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java | 210 test/jdk/sun/java2d/OpenGL/ShapeClip.java | 140 test/jdk/sun/java2d/OpenGL/SrcMaskOps.java | 188 test/jdk/sun/java2d/OpenGL/VolatileSubRegion.java | 166 test/jdk/sun/java2d/OpenGL/XformVolatile.java | 146 test/jdk/sun/java2d/marlin/ClipShapeTest.java | 5 test/jdk/sun/security/krb5/RFC396xTest.java | 3 test/jdk/sun/security/krb5/auto/DiffSaltParams.java | 6 test/jdk/sun/security/krb5/auto/KDC.java | 43 test/jdk/sun/security/krb5/auto/UserIterCount.java | 61 test/jdk/sun/security/krb5/config/native/TestDynamicStore.java | 15 test/jdk/sun/security/pkcs11/Cipher/KeyWrap/NISTWrapKAT.java | 77 test/jdk/sun/security/pkcs11/Cipher/KeyWrap/TestGeneral.java | 46 test/jdk/sun/security/pkcs11/Cipher/KeyWrap/XMLEncKAT.java | 19 test/jdk/sun/security/pkcs11/Cipher/TestDisabledAlgorithms.java | 81 test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java | 13 test/jdk/sun/security/pkcs11/KeyStore/SecretKeysBasic.java | 17 test/jdk/sun/security/pkcs11/PKCS11Test.java | 88 test/jdk/sun/security/pkcs11/Provider/Absolute.java | 9 test/jdk/sun/security/pkcs11/Provider/ConfigShortPath.java | 19 test/jdk/sun/security/pkcs11/Provider/LoginISE.java | 19 test/jdk/sun/security/pkcs11/Secmod/AddTrustedCert.java | 10 test/jdk/sun/security/pkcs11/Signature/InitAgainPSS.java | 17 test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java | 36 test/jdk/sun/security/pkcs11/Signature/SigInteropPSS.java | 18 test/jdk/sun/security/pkcs11/Signature/SigInteropPSS2.java | 19 test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java | 76 test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java | 47 test/jdk/sun/security/pkcs11/Signature/TestDSA.java | 7 test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java | 18 test/jdk/sun/security/pkcs11/Signature/TestNONEwithRSA.java | 96 test/jdk/sun/security/pkcs11/ec/TestECDH.java | 1 test/jdk/sun/security/provider/acvp/Launcher.java | 11 test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksClient.java | 222 test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksServer.java | 342 test/jdk/sun/security/ssl/SSLSocketImpl/ReuseAddr.java | 5 test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java | 69 test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/chunghwa/chunghwaepkirootca-chain.pem | 50 test/jdk/sun/security/tools/jarsigner/DefaultOptions.java | 7 test/jdk/sun/security/tools/keytool/EchoPassword.java | 182 test/jdk/sun/security/tools/keytool/SetInPassword.java | 44 test/jdk/sun/security/tools/keytool/i18n.java | 52 test/jdk/sun/security/util/AlgorithmConstraints/InvalidCryptoDisabledAlgos.java | 63 test/jdk/sun/security/util/Debug/DebugOptions.java | 171 test/jdk/sun/security/util/Password/EmptyIn.java | 74 test/jdk/sun/security/util/Resources/Usages.java | 4 test/jdk/sun/security/x509/URICertStore/CRLReadTimeout.java | 87 test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java | 7 test/jdk/tools/jar/ReproducibleJar.java | 17 test/jdk/tools/launcher/ChangeDataModel.java | 3 test/jdk/tools/launcher/I18NTest.java | 3 test/jdk/tools/launcher/UnresolvedExceptions.java | 3 test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java | 6 test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java | 34 test/langtools/jdk/jshell/AbstractStopExecutionTest.java | 2 test/langtools/jdk/jshell/AnalysisTest.java | 11 test/langtools/jdk/jshell/AnalyzeSnippetTest.java | 81 test/langtools/jdk/jshell/BadExecutionControlSpecTest.java | 11 test/langtools/jdk/jshell/ClassMembersTest.java | 26 test/langtools/jdk/jshell/ClassPathTest.java | 13 test/langtools/jdk/jshell/ClassesTest.java | 55 test/langtools/jdk/jshell/CommandCompletionTest.java | 20 test/langtools/jdk/jshell/CompilerOptionsTest.java | 13 test/langtools/jdk/jshell/CompletenessStressTest.java | 10 test/langtools/jdk/jshell/CompletenessTest.java | 26 test/langtools/jdk/jshell/CompletionSuggestionTest.java | 59 test/langtools/jdk/jshell/ComputeFQNsTest.java | 20 test/langtools/jdk/jshell/ConsoleTest.java | 18 test/langtools/jdk/jshell/ConsoleToolTest.java | 4 test/langtools/jdk/jshell/CustomInputToolBuilder.java | 12 test/langtools/jdk/jshell/DropTest.java | 18 test/langtools/jdk/jshell/EditorTestBase.java | 28 test/langtools/jdk/jshell/EmptyTest.java | 13 test/langtools/jdk/jshell/ErrorRecoveryTest.java | 11 test/langtools/jdk/jshell/ErrorTranslationTest.java | 25 test/langtools/jdk/jshell/ExceptionMessageTest.java | 19 test/langtools/jdk/jshell/ExceptionsTest.java | 46 test/langtools/jdk/jshell/ExecutionControlSpecTest.java | 14 test/langtools/jdk/jshell/ExecutionControlTestBase.java | 4 test/langtools/jdk/jshell/ExpectedDiagnostic.java | 14 test/langtools/jdk/jshell/ExternalEditorTest.java | 37 test/langtools/jdk/jshell/FailOverDirectExecutionControlTest.java | 28 test/langtools/jdk/jshell/FailOverExecutionControlDyingLaunchTest.java | 10 test/langtools/jdk/jshell/FailOverExecutionControlHangingLaunchTest.java | 10 test/langtools/jdk/jshell/FailOverExecutionControlHangingListenTest.java | 10 test/langtools/jdk/jshell/FailOverExecutionControlTest.java | 10 test/langtools/jdk/jshell/FileManagerTest.java | 15 test/langtools/jdk/jshell/ForwardReferenceImportTest.java | 24 test/langtools/jdk/jshell/ForwardReferenceTest.java | 33 test/langtools/jdk/jshell/GetResourceTest.java | 13 test/langtools/jdk/jshell/HighlightUITest.java | 6 test/langtools/jdk/jshell/HistoryTest.java | 34 test/langtools/jdk/jshell/HistoryUITest.java | 9 test/langtools/jdk/jshell/IOTest.java | 17 test/langtools/jdk/jshell/IdGeneratorTest.java | 19 test/langtools/jdk/jshell/IgnoreTest.java | 16 test/langtools/jdk/jshell/IllegalArgumentExceptionTest.java | 15 test/langtools/jdk/jshell/ImportTest.java | 27 test/langtools/jdk/jshell/InaccessibleExpressionTest.java | 24 test/langtools/jdk/jshell/IndentUITest.java | 8 test/langtools/jdk/jshell/InferTypeTest.java | 8 test/langtools/jdk/jshell/InputUITest.java | 8 test/langtools/jdk/jshell/JLCollisionTest.java | 10 test/langtools/jdk/jshell/JShellQueryTest.java | 18 test/langtools/jdk/jshell/JShellStateClosedTest.java | 21 test/langtools/jdk/jshell/JavadocTest.java | 10 test/langtools/jdk/jshell/JdiBadOptionLaunchExecutionControlTest.java | 12 test/langtools/jdk/jshell/JdiBadOptionListenExecutionControlTest.java | 12 test/langtools/jdk/jshell/JdiBogusHostListenExecutionControlTest.java | 12 test/langtools/jdk/jshell/JdiFailingLaunchExecutionControlTest.java | 12 test/langtools/jdk/jshell/JdiFailingListenExecutionControlTest.java | 12 test/langtools/jdk/jshell/JdiHangingLaunchExecutionControlTest.java | 10 test/langtools/jdk/jshell/JdiHangingListenExecutionControlTest.java | 10 test/langtools/jdk/jshell/JdiLaunchingExecutionControlTest.java | 10 test/langtools/jdk/jshell/JdiListeningExecutionControlTest.java | 10 test/langtools/jdk/jshell/JdiListeningLocalhostExecutionControlTest.java | 10 test/langtools/jdk/jshell/JdiStarterTest.java | 18 test/langtools/jdk/jshell/KullaCompletenessStressTest.java | 20 test/langtools/jdk/jshell/KullaTesting.java | 150 test/langtools/jdk/jshell/LocalExecutionClassPathTest.java | 8 test/langtools/jdk/jshell/LocalExecutionContextLoaderParentTest.java | 12 test/langtools/jdk/jshell/LocalExecutionTestSupport.java | 6 test/langtools/jdk/jshell/LocalStopExecutionTest.java | 12 test/langtools/jdk/jshell/MethodsTest.java | 49 test/langtools/jdk/jshell/ModifiersTest.java | 23 test/langtools/jdk/jshell/MultipleDocumentationTest.java | 12 test/langtools/jdk/jshell/MyExecutionControl.java | 4 test/langtools/jdk/jshell/NullTest.java | 8 test/langtools/jdk/jshell/PasteAndMeasurementsUITest.java | 10 test/langtools/jdk/jshell/PipeInputStreamTest.java | 22 test/langtools/jdk/jshell/PrimitiveInstanceOfTest.java | 16 test/langtools/jdk/jshell/RecordsTest.java | 20 test/langtools/jdk/jshell/RejectedFailedTest.java | 29 test/langtools/jdk/jshell/ReplToolTesting.java | 21 test/langtools/jdk/jshell/ReplaceTest.java | 29 test/langtools/jdk/jshell/SealedClassesTest.java | 12 test/langtools/jdk/jshell/ShutdownTest.java | 83 test/langtools/jdk/jshell/SimpleRegressionTest.java | 48 test/langtools/jdk/jshell/SnippetEventToStringTest.java | 18 test/langtools/jdk/jshell/SnippetHighlightTest.java | 13 test/langtools/jdk/jshell/SnippetStatusListenerTest.java | 45 test/langtools/jdk/jshell/SnippetTest.java | 31 test/langtools/jdk/jshell/SourceLevelTest.java | 14 test/langtools/jdk/jshell/StartOptionTest.java | 88 test/langtools/jdk/jshell/StartupWithFormatSpecifierTest.java | 8 test/langtools/jdk/jshell/StopExecutionTest.java | 22 test/langtools/jdk/jshell/T8146368/JShellTest8146368.java | 8 test/langtools/jdk/jshell/T8146368/JShellToolTest8146368.java | 8 test/langtools/jdk/jshell/Test8294583.java | 13 test/langtools/jdk/jshell/Test8296012.java | 13 test/langtools/jdk/jshell/ToolBasicTest.java | 84 test/langtools/jdk/jshell/ToolCommandOptionTest.java | 23 test/langtools/jdk/jshell/ToolEnableNativeAccessTest.java | 9 test/langtools/jdk/jshell/ToolEnablePreviewTest.java | 9 test/langtools/jdk/jshell/ToolFormatTest.java | 42 test/langtools/jdk/jshell/ToolLocalSimpleTest.java | 10 test/langtools/jdk/jshell/ToolLocaleMessageTest.java | 16 test/langtools/jdk/jshell/ToolMultilineSnippetHistoryTest.java | 8 test/langtools/jdk/jshell/ToolProviderTest.java | 8 test/langtools/jdk/jshell/ToolReloadTest.java | 19 test/langtools/jdk/jshell/ToolRetainTest.java | 17 test/langtools/jdk/jshell/ToolShiftTabTest.java | 13 test/langtools/jdk/jshell/ToolSimpleTest.java | 13 test/langtools/jdk/jshell/ToolTabCommandTest.java | 10 test/langtools/jdk/jshell/ToolTabSnippetTest.java | 12 test/langtools/jdk/jshell/ToolingTest.java | 5 test/langtools/jdk/jshell/TypeNameTest.java | 23 test/langtools/jdk/jshell/UITesting.java | 6 test/langtools/jdk/jshell/UndefinedClassTest.java | 9 test/langtools/jdk/jshell/UnicodeTest.java | 13 test/langtools/jdk/jshell/UnnamedTest.java | 12 test/langtools/jdk/jshell/UserExecutionControlTest.java | 18 test/langtools/jdk/jshell/UserInputTest.java | 12 test/langtools/jdk/jshell/UserJdiUserRemoteTest.java | 22 test/langtools/jdk/jshell/VariablesTest.java | 71 test/langtools/jdk/jshell/WrapperTest.java | 72 test/langtools/tools/javac/HexThree.java | 3 test/langtools/tools/javac/StringsInSwitch/OneCaseSwitches.java | 1 test/langtools/tools/javac/StringsInSwitch/StringSwitches.java | 3 test/langtools/tools/javac/TryWithResources/BadTwr.java | 1 test/langtools/tools/javac/TryWithResources/BadTwr.out | 8 test/langtools/tools/javac/TryWithResources/BadTwrSyntax.java | 1 test/langtools/tools/javac/TryWithResources/BadTwrSyntax.out | 2 test/langtools/tools/javac/TryWithResources/ExplicitFinal.java | 3 test/langtools/tools/javac/TryWithResources/PlainTry.java | 3 test/langtools/tools/javac/TryWithResources/PlainTry.out | 2 test/langtools/tools/javac/TryWithResources/TwrFlow.java | 1 test/langtools/tools/javac/TryWithResources/TwrFlow.out | 4 test/langtools/tools/javac/TryWithResources/TwrLint.java | 1 test/langtools/tools/javac/TryWithResources/TwrLint.out | 4 test/langtools/tools/javac/TryWithResources/TwrMultiCatch.java | 3 test/langtools/tools/javac/TryWithResources/TwrOnNonResource.java | 1 test/langtools/tools/javac/TryWithResources/TwrOnNonResource.out | 6 test/langtools/tools/javac/TryWithResources/TwrSuppression.java | 3 test/langtools/tools/javac/TryWithResources/WeirdTwr.java | 1 test/langtools/tools/javac/annotations/pos/TrailingComma.java | 3 test/langtools/tools/javac/boxing/BoxingCaching.java | 3 test/langtools/tools/javac/enum/6350057/T6350057.java | 3 test/langtools/tools/javac/enum/AbstractEmptyEnum.java | 1 test/langtools/tools/javac/enum/AbstractEmptyEnum.out | 2 test/langtools/tools/javac/enum/EnumImplicitPrivateConstructor.java | 3 test/langtools/tools/javac/enum/EnumPrivateConstructor.java | 3 test/langtools/tools/javac/enum/EnumProtectedConstructor.java | 1 test/langtools/tools/javac/enum/EnumProtectedConstructor.out | 2 test/langtools/tools/javac/enum/EnumPublicConstructor.java | 1 test/langtools/tools/javac/enum/EnumPublicConstructor.out | 2 test/langtools/tools/javac/enum/ExplicitlyAbstractEnum1.java | 1 test/langtools/tools/javac/enum/ExplicitlyAbstractEnum1.out | 2 test/langtools/tools/javac/enum/ExplicitlyAbstractEnum2.java | 1 test/langtools/tools/javac/enum/ExplicitlyAbstractEnum2.out | 2 test/langtools/tools/javac/enum/ExplicitlyFinalEnum1.java | 1 test/langtools/tools/javac/enum/ExplicitlyFinalEnum1.out | 2 test/langtools/tools/javac/enum/ExplicitlyFinalEnum2.java | 1 test/langtools/tools/javac/enum/ExplicitlyFinalEnum2.out | 2 test/langtools/tools/javac/enum/FauxEnum1.java | 1 test/langtools/tools/javac/enum/FauxEnum1.out | 2 test/langtools/tools/javac/enum/FauxEnum3.java | 1 test/langtools/tools/javac/enum/FauxEnum3.out | 2 test/langtools/tools/javac/enum/FauxSpecialEnum1.java | 1 test/langtools/tools/javac/enum/FauxSpecialEnum1.out | 2 test/langtools/tools/javac/enum/FauxSpecialEnum2.java | 1 test/langtools/tools/javac/enum/FauxSpecialEnum2.out | 2 test/langtools/tools/javac/generics/InheritanceConflict3.java | 1 test/langtools/tools/javac/generics/InheritanceConflict3.out | 4 test/langtools/tools/javac/multicatch/Neg01.java | 1 test/langtools/tools/javac/multicatch/Neg01.out | 2 test/langtools/tools/javac/multicatch/Neg01eff_final.java | 1 test/langtools/tools/javac/multicatch/Neg01eff_final.out | 2 test/langtools/tools/javac/multicatch/Neg07.java | 1 test/langtools/tools/javac/multicatch/Neg07.out | 2 test/langtools/tools/javac/multicatch/Pos10.java | 1 test/langtools/tools/javac/patterns/T8358801.java | 132 test/langtools/tools/javac/processing/6365040/T6365040.java | 4 test/langtools/tools/javac/processing/6378728/T6378728.java | 3 test/langtools/tools/javac/processing/6634138/T6634138.java | 3 test/langtools/tools/javac/processing/completion/TestCompletions.java | 3 test/langtools/tools/javac/processing/environment/TestSourceVersion.java | 3 test/langtools/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java | 3 test/langtools/tools/javac/processing/errors/TestFatalityOfParseErrors.java | 1 test/langtools/tools/javac/processing/errors/TestOptionSyntaxErrors.java | 3 test/langtools/tools/javac/processing/errors/TestReturnCode.java | 1 test/langtools/tools/javac/processing/filer/TestFilerConstraints.java | 3 test/langtools/tools/javac/processing/filer/TestGetResource.java | 3 test/langtools/tools/javac/processing/filer/TestPackageInfo.java | 1 test/langtools/tools/javac/processing/messager/MessagerBasics.java | 1 test/langtools/tools/javac/processing/model/TestExceptions.java | 3 test/langtools/tools/javac/processing/model/TestSourceVersion.java | 3 test/langtools/tools/javac/processing/model/element/TestAnonClassNames.java | 3 test/langtools/tools/javac/processing/model/element/TestElement.java | 3 test/langtools/tools/javac/processing/model/element/TestExecutableElement.java | 3 test/langtools/tools/javac/processing/model/element/TestNames.java | 3 test/langtools/tools/javac/processing/model/element/TestPackageElement.java | 3 test/langtools/tools/javac/processing/model/element/TestResourceVariable.java | 3 test/langtools/tools/javac/processing/model/type/MirroredTypeEx/NpeTest.java | 3 test/langtools/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java | 3 test/langtools/tools/javac/processing/model/type/TestTypeKind.java | 3 test/langtools/tools/javac/processing/model/util/deprecation/TestDeprecation.java | 3 test/langtools/tools/javac/processing/model/util/elements/TestGetConstantExpression.java | 3 test/langtools/tools/javac/processing/model/util/elements/TestGetPackageOf.java | 3 test/langtools/tools/javac/processing/model/util/elements/TestIsFunctionalInterface.java | 3 test/langtools/tools/javac/processing/model/util/elements/VacuousEnum.java | 3 test/langtools/tools/javac/processing/model/util/filter/TestIterables.java | 3 test/langtools/tools/javac/processing/model/util/types/TestPseudoTypeHandling.java | 3 test/langtools/tools/javac/processing/warnings/TestSourceVersionWarnings.java | 4 test/lib/RedefineClassHelper.java | 46 test/lib/jdk/test/lib/artifacts/ArtifactResolver.java | 9 test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java | 5 test/lib/jdk/test/lib/containers/docker/DockerRunOptions.java | 6 test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java | 31 test/lib/jdk/test/lib/net/SimpleSSLContext.java | 134 test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java | 39 test/lib/jdk/test/whitebox/WhiteBox.java | 9 test/micro/org/openjdk/bench/java/text/DateFormatterBench.java | 79 test/micro/org/openjdk/bench/java/text/SimpleDateFormatterBench.java | 111 1811 files changed, 70492 insertions(+), 31389 deletions(-) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp4gnrjuaf/openjdk-25_25.0.2+10-1~deb13u2.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp4gnrjuaf/openjdk-25_25.0.3+9-2~deb13u1.dsc: no acceptable signature found diff -Nru openjdk-25-25.0.2+10/.jcheck/conf openjdk-25-25.0.3+9/.jcheck/conf --- openjdk-25-25.0.2+10/.jcheck/conf 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/.jcheck/conf 2026-04-17 19:08:13.000000000 +0000 @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=25.0.2 +version=25.0.3 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright diff -Nru openjdk-25-25.0.2+10/README.md openjdk-25-25.0.3+9/README.md --- openjdk-25-25.0.2+10/README.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/README.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,4 +1,11 @@ -# Welcome to the JDK! +# Welcome to OpenJDK 25 Updates! + +The JDK 25 Updates project uses two GitHub repositories. +Updates are continuously developed in the repository [jdk25u-dev](https://github.com/openjdk/jdk25u-dev). This is the repository usually targeted by contributors. +The [jdk25u](https://github.com/openjdk/jdk25u) repository is used for rampdown of the update releases of jdk25u and only accepts critical changes that must make the next release during rampdown. (You probably do not want to target jdk25u). + +For more OpenJDK 25 updates specific information such as timelines and contribution guidelines see the [project wiki page](https://wiki.openjdk.org/display/JDKUpdates/JDK+25u/). + For build instructions please see the [online documentation](https://openjdk.org/groups/build/doc/building.html), diff -Nru openjdk-25-25.0.2+10/debian/JB-jvmci-jdk.overrides.in openjdk-25-25.0.3+9/debian/JB-jvmci-jdk.overrides.in --- openjdk-25-25.0.2+10/debian/JB-jvmci-jdk.overrides.in 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/JB-jvmci-jdk.overrides.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# keep symbols so that native memory tracking works -# See https://bugs.launchpad.net/ubuntu/+source/openjdk-20/+bug/2012326 -@basename@-jvmci-jdk binary: unstripped-binary-or-object - -# override warning for the old mailing address in upstream copyright -@basename@-jvmci-jdk binary: old-fsf-address-in-copyright-file - -# repeated lib due to upstream implementation directory layout -@basename@-jvmci-jdk binary: repeated-path-segment - -# Override due to upstream copyright -@basename@-jvmci-jdk binary: spelling-error-in-copyright "GNU Public License" "GNU General Public License" - -# False positive https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1115545 -@basename@-jvmci-jdk binary: arch-dependent-file-not-in-arch-specific-directory diff -Nru openjdk-25-25.0.2+10/debian/changelog openjdk-25-25.0.3+9/debian/changelog --- openjdk-25-25.0.2+10/debian/changelog 2026-01-31 22:41:06.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/changelog 2026-04-29 16:35:30.000000000 +0000 @@ -1,9 +1,124 @@ -openjdk-25 (25.0.2+10-1~deb13u2) trixie-security; urgency=medium +openjdk-25 (25.0.3+9-2~deb13u1) trixie-security; urgency=medium - * Rebuild for trixie, now with jtreg8 re-enabled (since it's now - been available via a backport released via trixie-security) + * Rebuild for trixie - -- Moritz Mühlenhoff Sat, 31 Jan 2026 23:41:06 +0100 + -- Moritz Muehlenhoff Wed, 29 Apr 2026 18:35:30 +0200 + +openjdk-25 (25.0.3+9-2) unstable; urgency=medium + + * d/rules: Strip man page formatting before comparing d/man and + generated content. + * d/man: Regenerate man pages. + + -- Vladimir Petko Sat, 25 Apr 2026 22:29:23 +1200 + +openjdk-25 (25.0.3+9-1) unstable; urgency=medium + + * OpenJDK 25.0.3 release, Build 9. + - CVEs: + + CVE-2026-22016: 8370529: Enhance Path Factories Redux + + CVE-2026-34282: 8374557: Enhance TLS connection handling + + CVE-2026-22021: 8371830: Enhance certificate chain validation + + CVE-2026-22013: 8370615: Improve Kerberos credentialing + + CVE-2026-23865: 8379158: Update FreeType to 2.14.2 + + CVE-2026-22008: 8367463: Improved Arena allocations + + CVE-2026-22018: 8370986: Enhance Zip file reading + + CVE-2026-22007: 8369575: Enhance crypto algorithm support + + CVE-2026-34268: 8371935: Enhance key generation + * d/rules: Check generated files only on amd64. This resolves riscv64 + ftbfs, as some architectures change with_check flag. + * Remove openjdk-25-jvmci-jdk binary package. + * d/t/problems.csv: Fix typo in loong64 excluded tests lists. + * Add common GPL and Apache license headers to copyright generator. + * d/copyright: Regenerate. + + -- Vladimir Petko Fri, 24 Apr 2026 11:53:29 +1200 + +openjdk-25 (25.0.3~8ea-2) unstable; urgency=medium + + * Ensure that all generated files are up to date: + - The copyright generator now checks if the current directory contains + an unpacked OpenJDK tree by verifying the presence of the + ASSEMBLY_EXCEPTION file. + - The copyright generator now drops common license text in-memory, + without running a shell script that modifies the source tree. + - d/rules: Add targets to generate all files and check that they match + the ones provided in the source package. + - d/rules: Add nogen DEB_BUILD_OPTION to disable file regeneration. + * d/rules: Use '-' instead of '~' in opt version string, swap package + version and distribution. + + -- Vladimir Petko Fri, 17 Apr 2026 09:59:57 +1200 + +openjdk-25 (25.0.3~8ea-1) unstable; urgency=medium + + * OpenJDK 25.0.3 snapshot, Build 8. + * d/p/jdk-8369817.diff: Apply upstream patch to resolve failing + EmptyPath test (JDK-8369817). + * d/p/jdk-8381555.diff: Apply upstream patch to disable G1 Compressed + Oops test on 32 bit architectures (JDK-8381555). + * d/t/problems.csv: Update problem list. + + -- Vladimir Petko Fri, 10 Apr 2026 19:30:54 +1200 + +openjdk-25 (25.0.3~7ea-2) unstable; urgency=medium + + * d/t/dependencies.sh: Regenerate. + + -- Vladimir Petko Mon, 30 Mar 2026 21:37:55 +1300 + +openjdk-25 (25.0.3~7ea-1) unstable; urgency=medium + + * OpenJDK 25.0.3 snapshot, Build 7. + + [ Vladimir Petko ] + * d/rules: Revert optional version string changes. + This should be resolved upstream. + + [ Matthias Klose ] + * d/t/jtreg-autopkgtest.in: Increase the timeout from 10 to 30 seconds + on loong64 (zero VM). + + -- Matthias Klose Sun, 29 Mar 2026 11:53:45 +0200 + +openjdk-25 (25.0.3~5ea-2) unstable; urgency=medium + + [ Vladimir Petko ] + * d/rules: Remove '[' separator in version string, it makes the version + string invalid. + * d/t/dependencies.{in,sh}: Relax test assertion and regenerate. + + [ Matthias Klose ] + * Regenerate test scripts. Closes: #1127309. + * Move pandoc and graphviz to general build dependencies, needed for + man page generation. + * Use pre-generated man pages on architectures where pandoc is not + available. Closes: #1128485. + + -- Matthias Klose Sat, 14 Mar 2026 14:57:57 +0100 + +openjdk-25 (25.0.3~5ea-1) unstable; urgency=medium + + * OpenJDK 25.0.3 snapshot, Build 5. + + [ Miao Wang ] + * d/t/problems.csv: Add tests which take too long to finish on + loong64. + + [ Vladimir Petko ] + * d/rules: Separate package version in version string. + * d/dbg.py: Fix syntax errors in gdb unwinder, do not install unwinder + for zero, install hotspot unwinder in the correct directory. + * d/t/jtreg-autopkgtest.{in,sh}: Do not force agentvm for s390x jtreg + tests to resolve the build crash on Launchpad. + Disable debug traces. Load unwinder in the disabled state. + Return iterator rather than list from OpenJDKFrameFilter.flatten(). + Remove unused code from NativeMethodInfo. + + [ Matthias Klose ] + * Refresh patches. + + -- Matthias Klose Fri, 06 Mar 2026 10:18:55 +0100 openjdk-25 (25.0.2+10-1) unstable; urgency=medium diff -Nru openjdk-25-25.0.2+10/debian/control openjdk-25-25.0.3+9/debian/control --- openjdk-25-25.0.2+10/debian/control 2026-01-31 22:40:44.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/control 2026-04-29 16:35:18.000000000 +0000 @@ -16,7 +16,8 @@ zlib1g-dev:native, zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, systemtap-sdt-dev [!powerpc !ppc64 !ppc64el !sh4 !s390x], libnss3-dev (>= 2:3.17.1), openjdk-25-jdk-headless , -Build-Depends-Indep: graphviz, pandoc, + graphviz [alpha amd64 armhf arm64 ppc64el riscv64 sparc64 s390x], + pandoc [alpha amd64 armhf arm64 ppc64el riscv64 sparc64 s390x], Rules-Requires-Root: no Standards-Version: 4.7.2 Homepage: https://openjdk.java.net/ @@ -153,18 +154,6 @@ This package contains all the binary files needed to run the OpenJDK autopkg tests. -Package: openjdk-25-jvmci-jdk -Architecture: amd64 -Multi-Arch: same -Priority: optional -Pre-Depends: ${dpkg:Depends} -Depends: ${jredefault:Depends}, ${cacert:Depends}, - ${jcommon:Depends}, ${dlopenhl:Depends}, - ${mountpoint:Depends}, - ${shlibs:Depends}, ${misc:Depends} -Description: JVMCI-enabled SDK for building graalvm - This package provides a JVMCI-enabled GraalVM builder Java SDK. - Package: openjdk-25-jre-zero Architecture: amd64 arm64 ppc64 ppc64el riscv64 s390x Multi-Arch: same diff -Nru openjdk-25-25.0.2+10/debian/control.in openjdk-25-25.0.3+9/debian/control.in --- openjdk-25-25.0.2+10/debian/control.in 2026-01-31 22:40:35.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/control.in 2026-04-29 16:35:09.000000000 +0000 @@ -16,7 +16,8 @@ @bd_syslibs@ @bd_systemtap@ @bd_nss@ @bd_cross@ -Build-Depends-Indep: graphviz, pandoc, + graphviz [@pandoc_archs@], + pandoc [@pandoc_archs@], Rules-Requires-Root: no Standards-Version: 4.7.2 Homepage: https://openjdk.java.net/ @@ -152,15 +153,3 @@ . This package contains all the binary files needed to run the OpenJDK autopkg tests. - -Package: @basename@-jvmci-jdk -Architecture: amd64 -Multi-Arch: same -Priority: optional -Pre-Depends: ${dpkg:Depends} -Depends: ${jredefault:Depends}, ${cacert:Depends}, - ${jcommon:Depends}, ${dlopenhl:Depends}, - ${mountpoint:Depends}, - ${shlibs:Depends}, ${misc:Depends} -Description: JVMCI-enabled SDK for building graalvm - This package provides a JVMCI-enabled GraalVM builder Java SDK. diff -Nru openjdk-25-25.0.2+10/debian/copyright openjdk-25-25.0.3+9/debian/copyright --- openjdk-25-25.0.2+10/debian/copyright 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/copyright 2026-04-25 10:29:02.000000000 +0000 @@ -424,7 +424,7 @@ ------------------------------------------------------------------------------ . %% This notice is provided with respect to Cryptix AES v3.2.0, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -466,51 +466,8 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to ASM Bytecode Manipulation Framework v9.3, - which may be included with JRE 23, JDK 23 and OpenJDK 23 - . - --- begin of LICENSE --- - . - ASM License - . - . - Copyright (c) 2000-2011 France Télécom - 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. 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. - . - 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. - . - . - . - --- end of LICENSE --- - . - ------------------------------------------------------------------------------ %% This notice is provided with respect to c-libutl 20160225, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -551,8 +508,8 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to Unicode Common Local Data Repository (CLDR) v44, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to Unicode Common Local Data Repository (CLDR) v47, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -560,11 +517,12 @@ . . . + . UNICODE LICENSE V3 . COPYRIGHT AND PERMISSION NOTICE . - Copyright © 2019-2023 Unicode, Inc. + Copyright © 1991-2025 Unicode, Inc. . NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -600,13 +558,1143 @@ dealings in these Data Files or Software without prior written authorization of the copyright holder. . + SPDX-License-Identifier: Unicode-3.0 + . + ———————————— + . + Unicode® Copyright and Terms of Use + For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + . + Unicode Copyright + Copyright © 1991-2025 Unicode, Inc. All rights reserved. + Definitions + Unicode Data Files ("DATA FILES") include all data files under the directories: + https://www.unicode.org/Public/ + https://www.unicode.org/reports/ + https://www.unicode.org/ivd/data/ + . + Unicode Data Files do not include PDF online code charts under the directory: + https://www.unicode.org/Public/ + . + Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard + or any source code or compiled code under the directories: + https://www.unicode.org/Public/PROGRAMS/ + https://www.unicode.org/Public/cldr/ + http://site.icu-project.org/download/ + Terms of Use + 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. + Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. + Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. + 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 Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. + All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. + No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. + Modification is not permitted with respect to this document. All copies of this document must be verbatim. + 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. + Warranties and Disclaimers + 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, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. + 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. + EXCEPT AS PROVIDED IN SECTION E.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, INC. 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. + Waiver of Damages + In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. 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. + Trademarks & Logos + 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. + 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. + All third party trademarks referenced herein are the property of their respective owners. + Miscellaneous + Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website 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 website 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. + Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. + 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. + Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. + Entire Agreement. This Agreement constitutes the entire agreement between the parties. + . + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to GCC - libgcc and libstdc++ 14.2.0, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + GNU GENERAL PUBLIC LICENSE v3: Refer to the copy under /usr/share/common-licenses + . + GCC RUNTIME LIBRARY EXCEPTION v3.1 + . + . + Version 3.1, 31 March 2009 + Copyright (C) 2009 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies of this + license document, but changing it is not allowed. + This GCC Runtime Library Exception ("Exception") is an additional + permission under section 7 of the GNU General Public License, version + 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that + bears a notice placed by the copyright holder of the file stating that + the file is governed by GPLv3 along with this Exception. + When you use GCC to compile a program, GCC may combine portions of + certain GCC header files and runtime libraries with the compiled + program. The purpose of this Exception is to allow compilation of + non-GPL (including proprietary) programs to use, in this way, the + header files and runtime libraries covered by this Exception. + 0. Definitions. + A file is an "Independent Module" if it either requires the Runtime + Library for execution after a Compilation Process, or makes use of an + interface provided by the Runtime Library, but is not otherwise based + on the Runtime Library. + "GCC" means a version of the GNU Compiler Collection, with or without + modifications, governed by version 3 (or a specified later version) of + the GNU General Public License (GPL) with the option of using any + subsequent versions published by the FSF. + "GPL-compatible Software" is software whose conditions of propagation, + modification and use would permit combination with GCC in accord with + the license of GCC. + "Target Code" refers to output from any compiler for a real or virtual + target processor architecture, in executable form or suitable for + input to an assembler, loader, linker and/or execution + phase. Notwithstanding that, Target Code does not include data in any + format that is used as a compiler intermediate representation, or used + for producing a compiler intermediate representation. + The "Compilation Process" transforms code entirely represented in + non-intermediate languages designed for human-written code, and/or in + Java Virtual Machine byte code, into Target Code. Thus, for example, + use of source code generators and preprocessors need not be considered + part of the Compilation Process, since the Compilation Process can be + understood as starting with the output of the generators or + preprocessors. + A Compilation Process is "Eligible" if it is done using GCC, alone or + with other GPL-compatible software, or if it is done without using any + work based on GCC. For example, using non-GPL-compatible Software to + optimize any GCC intermediate representations would not qualify as an + Eligible Compilation Process. + 1. Grant of Additional Permission. + You have permission to propagate a work of Target Code formed by + combining the Runtime Library with Independent Modules, even if such + propagation would otherwise violate the terms of GPLv3, provided that + all Target Code was generated by Eligible Compilation Processes. You + may then convey such a combination under terms of your choice, + consistent with the licensing of the Independent Modules. + 2. No Weakening of GCC Copyleft. + The availability of this Exception does not imply any general + presumption that third-party software is unaffected by the copyleft + requirements of the license of GCC. + . + . + GNU GENERAL PUBLIC LICENSE v2: Refer to the copy under /usr/share/common-licenses + . + GNU LESSER GENERAL PUBLIC LICENSE v3 + . + . + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + 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. + This version of the GNU Lesser General Public License incorporates + the terms and conditions of version 3 of the GNU General Public + License, supplemented by the additional permissions listed below. + 0. Additional Definitions. + As used herein, "this License" refers to version 3 of the GNU Lesser + General Public License, and the "GNU GPL" refers to version 3 of the GNU + General Public License. + "The Library" refers to a covered work governed by this License, + other than an Application or a Combined Work as defined below. + An "Application" is any work that makes use of an interface provided + by the Library, but which is not otherwise based on the Library. + Defining a subclass of a class defined by the Library is deemed a mode + of using an interface provided by the Library. + A "Combined Work" is a work produced by combining or linking an + Application with the Library. The particular version of the Library + with which the Combined Work was made is also called the "Linked + Version". + The "Minimal Corresponding Source" for a Combined Work means the + Corresponding Source for the Combined Work, excluding any source code + for portions of the Combined Work that, considered in isolation, are + based on the Application, and not on the Linked Version. + The "Corresponding Application Code" for a Combined Work means the + object code and/or source code for the Application, including any data + and utility programs needed for reproducing the Combined Work from the + Application, but excluding the System Libraries of the Combined Work. + 1. Exception to Section 3 of the GNU GPL. + You may convey a covered work under sections 3 and 4 of this License + without being bound by section 3 of the GNU GPL. + 2. Conveying Modified Versions. + If you modify a copy of the Library, and, in your modifications, a + facility refers to a function or data to be supplied by an Application + that uses the facility (other than as an argument passed when the + facility is invoked), then you may convey a copy of the modified + version: + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + 3. Object Code Incorporating Material from Library Header Files. + The object code form of an Application may incorporate material from + a header file that is part of the Library. You may convey such object + code under terms of your choice, provided that, if the incorporated + material is not limited to numerical parameters, data structure + layouts and accessors, or small macros, inline functions and templates + (ten or fewer lines in length), you do both of the following: + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + b) Accompany the object code with a copy of the GNU GPL and this license + document. + 4. Combined Works. + You may convey a Combined Work under terms of your choice that, + taken together, effectively do not restrict modification of the + portions of the Library contained in the Combined Work and reverse + engineering for debugging such modifications, if you also do each of + the following: + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + d) Do one of the following: + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + 5. Combined Libraries. + You may place library facilities that are a work based on the + Library side by side in a single library together with other library + facilities that are not Applications and are not covered by this + License, and convey such a combined library under terms of your + choice, if you do both of the following: + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + 6. Revised Versions of the GNU Lesser General Public License. + The Free Software Foundation may publish revised and/or new versions + of the GNU Lesser 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 + Library as you received it specifies that a certain numbered version + of the GNU Lesser General Public License "or any later version" + applies to it, you have the option of following the terms and + conditions either of that published version or of any later version + published by the Free Software Foundation. If the Library as you + received it does not specify a version number of the GNU Lesser + General Public License, you may choose any version of the GNU Lesser + General Public License ever published by the Free Software Foundation. + If the Library as you received it specifies that a proxy can decide + whether future versions of the GNU Lesser General Public License shall + apply, that proxy's public statement of acceptance of any version is + permanent authorization for you to choose that version for the + Library. + . + . + GNU LESSER GENERAL PUBLIC LICENSE v2.1 + . + . + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, 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.] + Preamble + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + Licenses are intended to guarantee your freedom to share and change + free software--to make sure the software is free for all its users. + This license, the Lesser General Public License, applies to some + specially designated software packages--typically libraries--of the + Free Software Foundation and other authors who decide to use it. You + can use it too, but we suggest you first think carefully about whether + this license or the ordinary General Public License is the better + strategy to use in any particular case, based on the explanations + below. + When we speak of free software, we are referring to freedom of use, + 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 and use pieces of + it in new free programs; and that you are informed that you can do + these things. + To protect your rights, we need to make restrictions that forbid + distributors to deny you these rights or to ask you to surrender these + rights. These restrictions translate to certain responsibilities for + you if you distribute copies of the library or if you modify it. + For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link other code with the library, you must provide + complete object files to the recipients, so that they can relink them + with the library after making changes to the library and recompiling + it. And you must show them these terms so they know their rights. + We protect your rights with a two-step method: (1) we copyright the + library, and (2) we offer you this license, which gives you legal + permission to copy, distribute and/or modify the library. + To protect each distributor, we want to make it very clear that + there is no warranty for the free library. Also, if the library is + modified by someone else and passed on, the recipients should know + that what they have is not the original version, so that the original + author's reputation will not be affected by problems that might be + introduced by others. + Finally, software patents pose a constant threat to the existence of + any free program. We wish to make sure that a company cannot + effectively restrict the users of a free program by obtaining a + restrictive license from a patent holder. Therefore, we insist that + any patent license obtained for a version of the library must be + consistent with the full freedom of use specified in this license. + Most GNU software, including some libraries, is covered by the + ordinary GNU General Public License. This license, the GNU Lesser + General Public License, applies to certain designated libraries, and + is quite different from the ordinary General Public License. We use + this license for certain libraries in order to permit linking those + libraries into non-free programs. + When a program is linked with a library, whether statically or using + a shared library, the combination of the two is legally speaking a + combined work, a derivative of the original library. The ordinary + General Public License therefore permits such linking only if the + entire combination fits its criteria of freedom. The Lesser General + Public License permits more lax criteria for linking other code with + the library. + We call this license the "Lesser" General Public License because it + does Less to protect the user's freedom than the ordinary General + Public License. It also provides other free software developers Less + of an advantage over competing non-free programs. These disadvantages + are the reason we use the ordinary General Public License for many + libraries. However, the Lesser license provides advantages in certain + special circumstances. + For example, on rare occasions, there may be a special need to + encourage the widest possible use of a certain library, so that it + becomes a de-facto standard. To achieve this, non-free programs must + be allowed to use the library. A more frequent case is that a free + library does the same job as widely used non-free libraries. In this + case, there is little to gain by limiting the free library to free + software only, so we use the Lesser General Public License. + In other cases, permission to use a particular library in non-free + programs enables a greater number of people to use a large body of + free software. For example, permission to use the GNU C Library in + non-free programs enables many more people to use the whole GNU + operating system, as well as its variant, the GNU/Linux operating + system. + Although the Lesser General Public License is Less protective of the + users' freedom, it does ensure that the user of a program that is + linked with the Library has the freedom and the wherewithal to run + that program using a modified version of the Library. + The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the library" and a "work that uses the library". The + former contains code derived from the library, whereas the latter must + be combined with the library in order to run. + . + GNU LESSER GENERAL PUBLIC LICENSE + 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 + other authorized party saying it may be distributed under the terms of + this Lesser General Public License (also called "this License"). + Each licensee is addressed as "you". + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".) + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, 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 library. + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running a program using the Library is not restricted, and output from + such a program is covered only if its contents constitute a work based + on the Library (independent of the use of the Library in a tool for + writing it). Whether that is true depends on what the Library does + and what the program that uses the Library does. + 1. You may copy and distribute verbatim copies of the Library's + complete 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 distribute a copy of this License along with the + Library. + 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 Library or any portion + of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + 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 Library, 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 Library. + In addition, mere aggregation of another work not based on the Library + with the Library (or with a work based on the Library) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To do + this, you must alter all the notices that refer to this License, so + that they refer to the ordinary GNU General Public License, version 2, + instead of to this License. (If a newer version than version 2 of the + ordinary GNU General Public License has appeared, then you can specify + that version instead if you wish.) Do not make any other change in + these notices. + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy. + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable form + under the terms of Sections 1 and 2 above provided that you 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. + If distribution of 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 satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled or + linked with it, is called a "work that uses the Library". Such a + work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be + linked without the Library, or if the work is itself a library. The + threshold for this to be true is not precisely defined by law. + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a derivative + work. (Executables containing this object code plus portions of the + Library will still fall under Section 6.) + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + 6. As an exception to the Sections above, you may also combine or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work + during execution displays copyright notices, you must include the + copyright notice for the Library among them, as well as a reference + directing the user to the copy of this License. Also, you must do one + of these things: + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, + the materials to be 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. + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute. + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other library + facilities not covered by this License, and distribute such a combined + library, provided that the separate distribution of the work based on + the Library and of the other library facilities is otherwise + permitted, and provided that you do these two things: + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + 8. You may not copy, modify, sublicense, link with, or distribute + the Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library 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. + 9. 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 Library or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Library (or any work based on the + Library), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Library or works based on it. + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the Library + 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 with + this License. + 11. 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 Library at all. For example, if a patent + license would not permit royalty-free redistribution of the Library 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 Library. + 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. + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Library 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. + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser 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 Library + 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 Library does not specify a + license version number, you may choose any version ever published by + the Free Software Foundation. + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + 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 + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE LIBRARY "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 + LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. 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 LIBRARY 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 + LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 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 + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms + of the ordinary General Public License). + To apply these terms, attach the following notices to the library. + 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. + + Copyright (C) + This library 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 library is distributed in the hope that 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. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Also add information on how to contact you by electronic and paper mail. + You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the library, + if necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + , 1 April 1990 + Ty Coon, President of Vice + That's all there is to it! + . + . + GNU Free Documentation License v1.3 + . + . + GNU Free Documentation License + Version 1.3, 3 November 2008 + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + 0. PREAMBLE + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or noncommercially. + Secondarily, this License preserves for the author and publisher a way + to get credit for their work, while not being considered responsible + for modifications made by others. + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. It + complements the GNU General Public License, which is a copyleft + license designed for free software. + We have designed this License in order to use it for manuals for free + software, because free software needs free documentation: a free + program should come with manuals providing the same freedoms that the + software does. But this License is not limited to software manuals; + it can be used for any textual work, regardless of subject matter or + whether it is published as a printed book. We recommend this License + principally for works whose purpose is instruction or reference. + 1. APPLICABILITY AND DEFINITIONS + This License applies to any manual or other work, in any medium, that + contains a notice placed by the copyright holder saying it can be + distributed under the terms of this License. Such a notice grants a + world-wide, royalty-free license, unlimited in duration, to use that + work under the conditions stated herein. The "Document", below, + refers to any such manual or work. Any member of the public is a + licensee, and is addressed as "you". You accept the license if you + copy, modify or distribute the work in a way requiring permission + under copyright law. + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + A "Secondary Section" is a named appendix or a front-matter section of + the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could fall + directly within that overall subject. (Thus, if the Document is in + part a textbook of mathematics, a Secondary Section may not explain + any mathematics.) The relationship could be a matter of historical + connection with the subject or with related matters, or of legal, + commercial, philosophical, ethical or political position regarding + them. + The "Invariant Sections" are certain Secondary Sections whose titles + are designated, as being those of Invariant Sections, in the notice + that says that the Document is released under this License. If a + section does not fit the above definition of Secondary then it is not + allowed to be designated as Invariant. The Document may contain zero + Invariant Sections. If the Document does not identify any Invariant + Sections then there are none. + The "Cover Texts" are certain short passages of text that are listed, + as Front-Cover Texts or Back-Cover Texts, in the notice that says that + the Document is released under this License. A Front-Cover Text may + be at most 5 words, and a Back-Cover Text may be at most 25 words. + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed of + pixels) generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text formatters or + for automatic translation to a variety of formats suitable for input + to text formatters. A copy made in an otherwise Transparent file + format whose markup, or absence of markup, has been arranged to thwart + or discourage subsequent modification by readers is not Transparent. + An image format is not Transparent if used for any substantial amount + of text. A copy that is not "Transparent" is called "Opaque". + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, SGML + or XML using a publicly available DTD, and standard-conforming simple + HTML, PostScript or PDF designed for human modification. Examples of + transparent image formats include PNG, XCF and JPG. Opaque formats + include proprietary formats that can be read and edited only by + proprietary word processors, SGML or XML for which the DTD and/or + processing tools are not generally available, and the + machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the material + this License requires to appear in the title page. For works in + formats which do not have any title page as such, "Title Page" means + the text near the most prominent appearance of the work's title, + preceding the beginning of the body of the text. + The "publisher" means any person or entity that distributes copies of + the Document to the public. + A section "Entitled XYZ" means a named subunit of the Document whose + title either is precisely XYZ or contains XYZ in parentheses following + text that translates XYZ in another language. (Here XYZ stands for a + specific section name mentioned below, such as "Acknowledgements", + "Dedications", "Endorsements", or "History".) To "Preserve the Title" + of such a section when you modify the Document means that it remains a + section "Entitled XYZ" according to this definition. + The Document may include Warranty Disclaimers next to the notice which + states that this License applies to the Document. These Warranty + Disclaimers are considered to be included by reference in this + License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and has + no effect on the meaning of this License. + 2. VERBATIM COPYING + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License applies + to the Document are reproduced in all copies, and that you add no + other conditions whatsoever to those of this License. You may not use + technical measures to obstruct or control the reading or further + copying of the copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a large enough + number of copies you must also follow the conditions in section 3. + You may also lend copies, under the same conditions stated above, and + you may publicly display copies. + 3. COPYING IN QUANTITY + If you publish printed copies (or copies in media that commonly have + printed covers) of the Document, numbering more than 100, and the + Document's license notice requires Cover Texts, you must enclose the + copies in covers that carry, clearly and legibly, all these Cover + Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on + the back cover. Both covers must also clearly and legibly identify + you as the publisher of these copies. The front cover must present + the full title with all words of the title equally prominent and + visible. You may add other material on the covers in addition. + Copying with changes limited to the covers, as long as they preserve + the title of the Document and satisfy these conditions, can be treated + as verbatim copying in other respects. + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto adjacent + pages. + If you publish or distribute Opaque copies of the Document numbering + more than 100, you must either include a machine-readable Transparent + copy along with each Opaque copy, or state in or with each Opaque copy + a computer-network location from which the general network-using + public has access to download using public-standard network protocols + a complete Transparent copy of the Document, free of added material. + If you use the latter option, you must take reasonably prudent steps, + when you begin distribution of Opaque copies in quantity, to ensure + that this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you distribute an + Opaque copy (directly or through your agents or retailers) of that + edition to the public. + It is requested, but not required, that you contact the authors of the + Document well before redistributing any large number of copies, to + give them a chance to provide you with an updated version of the + Document. + 4. MODIFICATIONS + You may copy and distribute a Modified Version of the Document under + the conditions of sections 2 and 3 above, provided that you release + the Modified Version under precisely this License, with the Modified + Version filling the role of the Document, thus licensing distribution + and modification of the Modified Version to whoever possesses a copy + of it. In addition, you must do these things in the Modified Version: + A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no material + copied from the Document, you may at your option designate some or all + of these sections as invariant. To do this, add their titles to the + list of Invariant Sections in the Modified Version's license notice. + These titles must be distinct from any other section titles. + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of a + standard. + You may add a passage of up to five words as a Front-Cover Text, and a + passage of up to 25 words as a Back-Cover Text, to the end of the list + of Cover Texts in the Modified Version. Only one passage of + Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document already + includes a cover text for the same cover, previously added by you or + by arrangement made by the same entity you are acting on behalf of, + you may not add another; but you may replace the old one, on explicit + permission from the previous publisher that added the old one. + The author(s) and publisher(s) of the Document do not by this License + give permission to use their names for publicity for or to assert or + imply endorsement of any Modified Version. + 5. COMBINING DOCUMENTS + You may combine the Document with other documents released under this + License, under the terms defined in section 4 above for modified + versions, provided that you include in the combination all of the + Invariant Sections of all of the original documents, unmodified, and + list them all as Invariant Sections of your combined work in its + license notice, and that you preserve all their Warranty Disclaimers. + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name but + different contents, make the title of each such section unique by + adding at the end of it, in parentheses, the name of the original + author or publisher of that section if known, or else a unique number. + Make the same adjustment to the section titles in the list of + Invariant Sections in the license notice of the combined work. + In the combination, you must combine any sections Entitled "History" + in the various original documents, forming one section Entitled + "History"; likewise combine any sections Entitled "Acknowledgements", + and any sections Entitled "Dedications". You must delete all sections + Entitled "Endorsements". + 6. COLLECTIONS OF DOCUMENTS + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the rules + of this License for verbatim copying of each of the documents in all + other respects. + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert a + copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + 7. AGGREGATION WITH INDEPENDENT WORKS + A compilation of the Document or its derivatives with other separate + and independent documents or works, in or on a volume of a storage or + distribution medium, is called an "aggregate" if the copyright + resulting from the compilation is not used to limit the legal rights + of the compilation's users beyond what the individual works permit. + When the Document is included in an aggregate, this License does not + apply to the other works in the aggregate which are not themselves + derivative works of the Document. + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half of + the entire aggregate, the Document's Cover Texts may be placed on + covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic form. + Otherwise they must appear on printed covers that bracket the whole + aggregate. + 8. TRANSLATION + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section 4. + Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also include + the original English version of this License and the original versions + of those notices and disclaimers. In case of a disagreement between + the translation and the original version of this License or a notice + or disclaimer, the original version will prevail. + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to Preserve + its Title (section 1) will typically require changing the actual + title. + 9. TERMINATION + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, and + will automatically terminate your rights under this License. + 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, receipt of a copy of some or all of the same material does + not give you any rights to use it. + 10. FUTURE REVISIONS OF THIS LICENSE + The Free Software Foundation may publish new, revised versions of the + GNU Free Documentation 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. See + http://www.gnu.org/copyleft/. + Each version of the License is given a distinguishing version number. + If the Document specifies that a particular numbered version of this + License "or any later version" applies to it, you have the option of + following the terms and conditions either of that specified version or + of any later version that has been published (not as a draft) by the + Free Software Foundation. If the Document does not specify a version + number of this License, you may choose any version ever published (not + as a draft) by the Free Software Foundation. If the Document + specifies that a proxy can decide which future versions of this + License can be used, that proxy's public statement of acceptance of a + version permanently authorizes you to choose that version for the + Document. + 11. RELICENSING + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. A + "Massive Multiauthor Collaboration" (or "MMC") contained in the site + means any set of copyrightable works thus published on the MMC site. + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + "Incorporate" means to publish or republish a Document, in whole or in + part, as part of another Document. + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this License + somewhere other than this MMC, and subsequently incorporated in whole or + in part into the MMC, (1) had no cover texts or invariant sections, and + (2) were thus incorporated prior to November 1, 2008. + The operator of an MMC Site may republish an MMC contained in the site + under CC-BY-SA on the same site at any time before August 1, 2009, + provided the MMC is eligible for relicensing. + ADDENDUM: How to use this License for your documents + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and + license notices just after the title page: + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, + replace the "with...Texts." line with this: + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + If you have Invariant Sections without Cover Texts, or some other + combination of the three, merge those two alternatives to suit the + situation. + If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of + free software license, such as the GNU General Public License, + to permit their use in free software. + . + . + The Regents of the University of California + . + . + /*- + * Copyright (c) 1991 The Regents of the University of California. + * 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. [rescinded 22 July 1999] + * 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. + */ + . + . + The Go Authors + . + . + Copyright (c) 2009 The Go 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: + * 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. + . + . + Apache License v2.0: Refer to the copy under /usr/share/common-licenses . . --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to International Components for Unicode (ICU4J) v74.1, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to International Components for Unicode (ICU4J) v76.1, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -616,7 +1704,7 @@ . COPYRIGHT AND PERMISSION NOTICE . - Copyright © 2016-2023 Unicode, Inc. + Copyright © 2016-2024 Unicode, Inc. . NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -652,6 +1740,8 @@ dealings in these Data Files or Software without prior written authorization of the copyright holder. . + SPDX-License-Identifier: Unicode-3.0 + . ---------------------------------------------------------------------- . Third-Party Software Licenses @@ -697,87 +1787,6 @@ All trademarks and registered trademarks mentioned herein are the property of their respective owners. . - ---------------------------------------------------------------------- - . - . - Time Zone Database - . - ICU uses the public domain data and code derived from Time Zone - Database for its time zone support. The ownership of the TZ database - is explained in BCP 175: Procedure for Maintaining the Time Zone - Database section 7. - . - # 7. Database Ownership - # - # The TZ database itself is not an IETF Contribution or an IETF - # document. Rather it is a pre-existing and regularly updated work - # that is in the public domain, and is intended to remain in the - # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do - # not apply to the TZ Database or contributions that individuals make - # to it. Should any claims be made and substantiated against the TZ - # Database, the organization that is providing the IANA - # Considerations defined in this RFC, under the memorandum of - # understanding with the IETF, currently ICANN, may act in accordance - # with all competent court orders. No ownership claims will be made - # by ICANN or the IETF Trust on the database or the code. Any person - # making a contribution to the database or code waives all rights to - # future claims in that contribution or in the TZ Database. - . - ---------------------------------------------------------------------- - . - ====================================================================== - . - . - From: https://www.unicode.org/copyright.html - . - For the general privacy policy governing access to this site, see the Unicode Privacy Policy. - . - Unicode Copyright - Copyright © 1991-2023 Unicode, Inc. All rights reserved. - Definitions - . - Unicode Data Files ("DATA FILES") include all data files under the directories: - https://www.unicode.org/Public/ - https://www.unicode.org/reports/ - https://www.unicode.org/ivd/data/ - . - Unicode Data Files do not include PDF online code charts under the directory: - https://www.unicode.org/Public/ - . - Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard - or any source code or compiled code under the directories: - https://www.unicode.org/Public/PROGRAMS/ - https://www.unicode.org/Public/cldr/ - http://site.icu-project.org/download/ - . - Terms of Use - 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. - Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. - Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. - 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 Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. - All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. - No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. - Modification is not permitted with respect to this document. All copies of this document must be verbatim. - 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. - Warranties and Disclaimers - 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, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. - 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. - EXCEPT AS PROVIDED IN SECTION E.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, INC. 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. - Waiver of Damages - In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. 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. - Trademarks & Logos - 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. - 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. - All third party trademarks referenced herein are the property of their respective owners. - Miscellaneous - Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website 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 website 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. - Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. - 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. - Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. - Entire Agreement. This Agreement constitutes the entire agreement between the parties. - . . . . @@ -785,7 +1794,7 @@ . ------------------------------------------------------------------------------ %% This notice is provided with respect to Mozilla Public Suffix List, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -800,7 +1809,7 @@ . 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/b5bf572c52988dbe9d865b8f090ea819024a9936/public_suffix_list.dat. + https://raw.githubusercontent.com/publicsuffix/list/823beb1425def931c8b0b170a6bc33b424c3f9b0/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/. . @@ -1190,8 +2199,165 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to The Unicode Standard, Unicode Character Database, Version 15.1.0, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to SipHash v1.0-68c8a7c, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + Notice + SipHash reference C implementation + . + . + Copyright (c) 2016 Jean-Philippe Aumasson + . + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + . + You should have received a copy of the CC0 Public Domain Dedication along + with + this software. If not, see + . + . + . + Licenses + The code is dual-licensed CCO and MIT + . + #MIT License + . + Copyright 2012-2024 JP Aumasson + . + 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. + . + . + #CC0 1.0 Universal + . + Statement of Purpose + . + The laws of most jurisdictions throughout the world automatically confer + exclusive Copyright and Related Rights (defined below) upon the creator and + subsequent owner(s) (each and all, an "owner") of an original work of + authorship and/or a database (each, a "Work"). + . + Certain owners wish to permanently relinquish those rights to a Work for the + purpose of contributing to a commons of creative, cultural and scientific + works ("Commons") that the public can reliably and without fear of later + claims of infringement build upon, modify, incorporate in other works, reuse + and redistribute as freely as possible in any form whatsoever and for any + purposes, including without limitation commercial purposes. These owners may + contribute to the Commons to promote the ideal of a free culture and the + further production of creative, cultural and scientific works, or to gain + reputation or greater distribution for their Work in part through the use and + efforts of others. + . + For these and/or other purposes and motivations, and without any expectation + of additional consideration or compensation, the person associating CC0 with a + Work (the "Affirmer"), to the extent that he or she is an owner of Copyright + and Related Rights in the Work, voluntarily elects to apply CC0 to the Work + and publicly distribute the Work under its terms, with knowledge of his or her + Copyright and Related Rights in the Work and the meaning and intended legal + effect of CC0 on those rights. + . + 1. Copyright and Related Rights. A Work made available under CC0 may be + protected by copyright and related or neighboring rights ("Copyright and + Related Rights"). Copyright and Related Rights include, but are not limited + to, the following: + . + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + . + ii. moral rights retained by the original author(s) and/or performer(s); + . + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + . + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + . + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + . + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + . + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + . + 2. Waiver. To the greatest extent permitted by, but not in contravention of, + applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and + unconditionally waives, abandons, and surrenders all of Affirmer's Copyright + and Related Rights and associated claims and causes of action, whether now + known or unknown (including existing as well as future claims and causes of + action), in the Work (i) in all territories worldwide, (ii) for the maximum + duration provided by applicable law or treaty (including future time + extensions), (iii) in any current or future medium and for any number of + copies, and (iv) for any purpose whatsoever, including without limitation + commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes + the Waiver for the benefit of each member of the public at large and to the + detriment of Affirmer's heirs and successors, fully intending that such Waiver + shall not be subject to revocation, rescission, cancellation, termination, or + any other legal or equitable action to disrupt the quiet enjoyment of the Work + by the public as contemplated by Affirmer's express Statement of Purpose. + . + 3. Public License Fallback. Should any part of the Waiver for any reason be + judged legally invalid or ineffective under applicable law, then the Waiver + shall be preserved to the maximum extent permitted taking into account + Affirmer's express Statement of Purpose. In addition, to the extent the Waiver + is so judged Affirmer hereby grants to each affected person a royalty-free, + non transferable, non sublicensable, non exclusive, irrevocable and + unconditional license to exercise Affirmer's Copyright and Related Rights in + the Work (i) in all territories worldwide, (ii) for the maximum duration + provided by applicable law or treaty (including future time extensions), (iii) + in any current or future medium and for any number of copies, and (iv) for any + purpose whatsoever, including without limitation commercial, advertising or + promotional purposes (the "License"). The License shall be deemed effective as + of the date CC0 was applied by Affirmer to the Work. Should any part of the + License for any reason be judged legally invalid or ineffective under + applicable law, such partial invalidity or ineffectiveness shall not + invalidate the remainder of the License, and in such case Affirmer hereby + affirms that he or she will not (i) exercise any of his or her remaining + Copyright and Related Rights in the Work or (ii) assert any associated claims + and causes of action with respect to the Work, in either case contrary to + Affirmer's express Statement of Purpose. + . + 4. Limitations and Disclaimers. + . + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + . + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + . + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + . + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + . + For more information, please see + + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to The Unicode Standard, Unicode Character Database, Version 16.0.0, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -1202,7 +2368,7 @@ . COPYRIGHT AND PERMISSION NOTICE . - Copyright © 1991-2023 Unicode, Inc. + Copyright © 1991-2024 Unicode, Inc. . NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -1241,68 +2407,233 @@ . ------------------ . - Unicode® Copyright and Terms of Use - For the general privacy policy governing access to this site, see the Unicode Privacy Policy. - . - A. Unicode Copyright - Copyright © 1991-2023 Unicode, Inc. All rights reserved. - . - B. Definitions - Unicode Data Files ("DATA FILES") include all data files under the directories: - https://www.unicode.org/Public/ - https://www.unicode.org/reports/ - https://www.unicode.org/ivd/data/ - . - Unicode Data Files do not include PDF online code charts under the directory: - https://www.unicode.org/Public/ - . - Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard - or any source code or compiled code under the directories: - https://www.unicode.org/Public/PROGRAMS/ - https://www.unicode.org/Public/cldr/ - http://site.icu-project.org/download/ - . - C. Terms of Use - 1. 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. - 2. Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. - 3. Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. - 4. 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. - 5. The Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. - 6. All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. - 7. No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. - 8. Modification is not permitted with respect to this document. All copies of this document must be verbatim. - . - D. Restricted Rights Legend - 1. 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. - . - E. 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, Inc. 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 E.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, INC. 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. - . - F. Waiver of Damages - 1. In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. 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. - . - G. 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. - All third party trademarks referenced herein are the property of their respective owners. - . - H. Miscellaneous - 1. Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website 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 website 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, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.'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. - . + Unicode® Consortium Copyright, Terms of Use, and Licenses . + Welcome to the website of Unicode, Inc. (dba The Unicode Consortium) + (“Unicode”). Except as otherwise noted herein, these terms and conditions + (“Terms of Use”) govern your use of the Unicode website and Unicode Products. + Your use of this website and/or Unicode Products constitutes your agreement + to follow and be bound by these Terms of Use. Unicode provides you with + access to and use of this website and Unicode Products subject to your + compliance with these Terms of Use. If you do not agree to these Terms + of Use, you should not access or use this website or Unicode Products. + Unicode reserves the right to make changes to the website, to Unicode + Products, and to these Terms of Use at any time in its sole d iscretion. + . + 1. Unicode Copyright: Copyright © 1991-Present Unicode, Inc. + . + 2. Definitions + . + a. “Unicode Products” includes the Unicode website and its content, + Data Files, Software, the Unicode Standard, all other Unicode + standards, specifications, technical reports, technical notes, + annexes, code charts, data files, software, publications, + webinars, videos, course materials, online and in-person events, + and all other Unicode products and services made available via + this website or any other channel of distribution, including but + not limited to Github, Maven, YouTube, and other third-party + sites where Unicode maintains and provides products, materials, + and services. + . + b. “Unicode Data Files” or "Data Files" include all computer data + files under the following directories: + . + i. https://www.unicode.org/Public/ + ii. https://www.unicode.org/reports/ + iii. https://www.unicode.org/ivd/data/ + iv. https://github.com/unicode-org/ + . + but exclude any materials present in the above directories that + are not computer data files, such as PDF code charts and + Technical Reports. + . + c. “Unicode Software” or "Software" includes any source code or + compiled code in any Unicode Product including but not limited to + the code included in the following directories: + . + i. https://www.unicode.org/Public/PROGRAMS/ + ii. https://www.unicode.org/Public/cldr/ + iii. https://github.com/unicode-org/ + . + 3. Permissions, Licenses, and Restrictions on Use + . + a. You are authorized to freely access and use this website and its + content and all Unicode Products subject to these Terms of Use and + subject to any restriction, permission, or license specifically + associated with any specific material or content. No license is + granted to copy or "mirror" this website. Linking to this website + is permitted. + . + b. Except where otherwise more broadly permitted or licensed: + . + 1. you may not make copies of or modifications to Unicode + Products for public distribution, or incorporate Unicode + Products in whole or in part into any product or publication, + or otherwise publicly distribute them, without the express + written permission of Unicode, and + . + 2. you may not copy or extract fonts or font data from any + Unicode Products, including but not limited to Unicode Code + Charts. + . + c. All Unicode Data Files and Unicode Software are subject to the + terms and conditions of the free and open-source Unicode License + v3, unless otherwise indicated by specific restriction, + permission, or license identified at the point of release or in + such software, data file, or other documentation. + . + d. You may freely download and make copies of the Unicode® Standard + Core Specification, Unicode Technical Reports, Unicode Technical + Notes, Unicode Code Charts, and other portions of this website + and may annotate and translate such permitted downloads and + copies, provided that such downloads, copies, annotations, and + translations are solely for personal or internal business + purposes and not for public distribution, and further provided + that any permitted copies and modifications fully reproduce all + copyright and other legal notices contained in the original. + Notwithstanding the foregoing, specific versions of the Unicode® + Standard Core Specification, Unicode Technical Reports, Unicode + Technical Notes, and Unicode Code Charts, as well as other Unicode + publications, materials, and portions of this website may be + subject to broader permissions and/or further reservations of + rights and restrictions on use found in the title pages, cover + sheets, front matter, and/or footnotes for each such version, + report, chart, or other publication or material. Consult each + version, report, chart, or other publication or material for any + such permissions and further reservations of rights and + restrictions on use. + . + 4. Restricted Rights Legend. Any Unicode Data Files or Software that are + licensed to the United States of America, its agencies and/or + instrumentalities under these Terms of Use is commercial technical + data or commercial computer software developed exclusively at private + expense as defined in FAR 2.101, or DFARS 252.227-7014, as applicable. + For Unicode Data Files, use, duplication, or disclosure by the + Government is subject to restrictions as set forth in DFARS + 202.227-7015 Technical Data, Commercial and Items and these Terms of + Use. For Unicode 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 these Terms + of Use. + . + 5. Disclaimer of Warranties & Limitation of Liability + . + a. This website and the Unicode Products are provided “AS-IS” without + charge as a convenience to visitors and users. While Unicode + attempts to provide accurate, error-free, and timely information, + there may be technical or factual inaccuracies and typographical + or other errors in this website and in the Unicode Products. + Unicode reserves the right to make corrections and changes to the + website and the Unicode Products at any time without notice. + . + b. YOU ASSUME ALL RESPONSIBILITY AND RISK WITH RESPECT TO YOUR USE + OF THIS WEBSITE AND THE UNICODE PRODUCTS, WHICH ARE PROVIDED "AS + IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR + STATUTORY, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF + ACCURACY, COMPLETENESS, TITLE, MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE, OR NON-INFRINGEMENT OF THIRD PARTY RIGHTS. + UNICODE AND ITS LICENSORS AND CONTRIBUTORS ASSUME NO + RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS WEBSITE AND/OR THE + UNICODE PRODUCTS. IF YOU ARE DISSATISFIED WITH THIS WEBSITE OR THE + UNICODE PRODUCTS, YOUR SOLE REMEDY IS TO DISCONTINUE USE OF THE + WEBSITE AND THE UNICODE PRODUCTS. + . + c. IN NO EVENT SHALL UNICODE, ITS MEMBERS, OR ITS LICENSORS OR + CONTRIBUTORS BE LIABLE FOR ANY CLAIM OR DAMAGES WHATSOEVER OF ANY + KIND, WHETHER DIRECT, INDIRECT, SPECIAL, INCIDENTAL, + CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, WHETHER OR NOT + UNICODE WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE, INCLUDING + BUT NOT LIMITED TO DAMAGE 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, + INABILITY TO USE, PERFORMANCE, FUNCTIONALITY, MODIFICATION, OR + DISTRIBUTION OF THIS WEBSITE, THE UNICODE PRODUCTS, OR ANY + DERIVATIVES THEREOF. + . + d. Unicode makes no warranties or representations of any kind + regarding any non-Unicode sites to which you may be directed or + hyperlinked from this website. Hyperlinks are included solely for + your convenience and Unicode makes no warranties or + representations with regard to the accuracy, availability, + suitability, or safety of information, products, or services + provided on such non-Unicode sites. + . + 6. Intellectual Property Contributions to Unicode. All contributions or + submissions to Unicode are governed by The Unicode Consortium + Intellectual Property, Licensing & Technical Contribution Policies. + If you wish to make any contribution or submission to Unicode, refer + to the foregoing Policies for further information on how to do so. + In the absence of a signed contributor license or other agreement with + Unicode that expressly governs a particular contribution or + submission, the act of making a contribution or submission of any kind + to Unicode by any communication channel constitutes a binding legal + agreement by the contributor or submitter that they: + . + a. represent and agree that the contributed matter is not + proprietary or confidential to the contributor or any third + party, and + . + b. grant to Unicode and to recipients of products distributed by + Unicode a perpetual, irrevocable, unrestricted, worldwide, + nonexclusive, no-charge, royalty-free license, without + obligation for accounting, to reproduce, prepare derivative + works of, publicly display, publicly perform, distribute, + make, use, sell, offer to sell, or import that matter for any + purpose, with the unrestricted right to sublicense those + rights. + . + 7. Compliance with Unicode Policies. These Terms of Use hereby + incorporate by reference the following Unicode Policies. Your use of + this website and/or Unicode Products and/or your participation in + Unicode activities constitutes your agreement to these Policies + which may be modified at any time in Unicode’s sole discretion: + . + a. The Unicode Consortium Code of Conduct + b. The Unicode Consortium Antitrust Policy & Guidelines + c. The Unicode Consortium Intellectual Property, Licensing & + Technical Contribution Policies + d. The Unicode Consortium Name and Trademark Usage Policy + e. The Unicode Consortium Policy on Handling of Confidential + Business Data + f. The Unicode Consortium General Privacy Policy + g. The Unicode Technical Group Procedures + . + 8. Trademarks & Logos. 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. You hereby acknowledge and + agree to respect Unicode’s exclusive worldwide rights in the Unicode + Word Mark, the Unicode Logo, and the Unicode trade names. The Unicode + Consortium Name and Trademark Usage Policy is incorporated herein by + reference and you agree to abide by its provisions, which may be + changed from time to time in Unicode’s sole discretion. + . + 9. Jurisdiction and Venue. This website is operated from, and the + Unicode Products are made available from, locations in the United + States of America. Unicode makes no representation that this website + or Unicode Products are appropriate for use in other locations. If + you access this website or the Unicode Products from other locations, + you are responsible for compliance with local laws. These Terms of + Use, all use of this website and Unicode Products, and any claims and + damages resulting from use of this website or Unicode Products, are + governed by the applicable laws of the United States of America and + the State of California without regard to any principles which would + apply the laws of different jurisdictions. You agree that any disputes + regarding this website and the Unicode Products shall be resolved + solely in the appropriate state and federal courts located in the + counties of San Francisco, San Mateo, or Santa Clara, California. + You agree that these courts have personal jurisdiction over you and + agree to waive any right to transfer the dispute to any other forum. + . + 10. Severability. If any provision of these Terms of Use is declared + invalid or unenforceable, the remaining provisions of these Terms of + Use shall remain in effect. . . --- 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 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -1315,8 +2646,8 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to The FreeType Project: Freetype v2.13.2, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to The FreeType Project: Freetype v2.14.2, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -1341,25 +2672,24 @@ 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. - . - . + Copyright (C) 1996-2025 by David Turner, Robert Wilhelm, and Werner Lemberg. + Copyright (C) 2007-2025 by Dereg Clegg and Michael Toftdal. + Copyright (C) 1996-2025 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. + Copyright (C) 2022-2025 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and + Copyright (C) 2004-2025 by Masatake YAMATO and Redhat K.K. + Copyright (C) 2007-2025 by Derek Clegg and Michael Toftdal. + Copyright (C) 2003-2025 by Masatake YAMATO, Red Hat K.K., + Copyright (C) 1996-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. + Copyright (C) 2007-2025 by David Turner. + Copyright (C) 2022-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. + Copyright (C) 2007-2025 by Rahul Bhalerao , . + Copyright (C) 2025 by Behdad Esfahbod. + Copyright (C) 2008-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. + Copyright (C) 2013-2025 by Google, Inc. + Copyright (C) 2019-2025 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. + Copyright (C) 2009-2025 by Oran Agra and Mickey Gabel. + Copyright (C) 2018-2025 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. + Copyright (C) 2004-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. The FreeType Project LICENSE ---------------------------- . @@ -1529,13 +2859,14 @@ . . . + . GPL v2: Refer to the copy under /usr/share/common-licenses . Additional Freetype Attributions . . --------------------------------- - The below license applies to the following files: + The below applies to the following file(s): libfreetype/src/psaux/psarrst.c libfreetype/src/psaux/psarrst.h libfreetype/src/psaux/psblues.c @@ -1558,7 +2889,7 @@ libfreetype/src/psaux/psstack.h libfreetype/src/psaux/pstypes.h . - Copyright 2006-2014 Adobe Systems Incorporated. + Copyright (C) 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 @@ -1594,12 +2925,12 @@ . . --------------------------------- - The below license applies to the following files: + The below applies to the following file(s): libfreetype/include/freetype/internal/fthash.h libfreetype/src/base/fthash.c . - Copyright 2000 Computing Research Labs, New Mexico State University - Copyright 2001-2015 + Copyright (C) 2000 Computing Research Labs, New Mexico State University + Copyright (C) 2001-2015 . Francesco Zappa Nardelli . @@ -1627,8 +2958,8 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to Harfbuzz v8.2.2, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to Harfbuzz 12.3.2, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -1640,14 +2971,14 @@ 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 © 2010-2024 Google, Inc. Copyright © 2018-2020 Ebrahim Byagowi Copyright © 2004-2013 Red Hat, Inc. Copyright © 2019 Facebook, Inc. Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com) Copyright © 2007 Chris Wilson Copyright © 2018-2019 Adobe Inc. - Copyright © 2006-2023 Behdad Esfahbod + Copyright © 2006-2025 Behdad Esfahbod Copyright © 1998-2004 David Turner and Werner Lemberg Copyright © 2009 Keith Stribley Copyright © 2018 Khaled Hosny @@ -1686,7 +3017,7 @@ The contents of this directory are licensed under the following terms: . --------------------------------- - The below license applies to the following files: + The below applies to the following file(s): libharfbuzz/hb-ucd.cc . Copyright (C) 2012 Grigori Goronzy @@ -1704,13 +3035,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. . --------------------------------- - The below license applies to the following files: + The below applies to the following file(s): libharfbuzz/hb-unicode-emoji-table.hh . - © 2023 Unicode®, Inc. + © 2024 Unicode®, Inc. + . Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. - For terms of use, see https://www.unicode.org/terms_of_use.html + For terms of use and license, see https://www.unicode.org/terms_of_use.html . . . @@ -1737,46 +3069,41 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to Little Color Management System (LCMS) v2.15, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to Little Color Management System (LCMS) v2.17, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . LCMS License . - README.1ST file information - . - LittleCMS core is released under MIT License . - --------------------------------- + MIT License . - Little CMS - Copyright (c) 1998-2023 Marti Maria Saguer + Copyright (C) 1998-2025 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: + 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 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. + 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: + The below applies to the following file(s): liblcms/cmssm.c . - Copyright 2001, softSurfer (www.softsurfer.com) + Copyright (C) 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. @@ -1789,7 +3116,6 @@ AUTHORS File Information . . - . Main Author ------------ Marti Maria @@ -1809,7 +3135,7 @@ Shawn Pedersen Andrew Brygin Samuli Suominen - Florian Hˆch + Florian Höch Aurelien Jarno Claudiu Cebuc Michael Vhrel (Artifex) @@ -1817,7 +3143,7 @@ Daniel Kaneider Mateusz Jurczyk (Google) Paul Miller - SÈbastien LÈon + Sébastien Léon Christian Schmitz XhmikosR Stanislav Brabec (SuSe) @@ -1833,6 +3159,7 @@ Amyspark Lovell Fuller Eli Schwartz + Diogo Teles Sant'Anna . Special Thanks -------------- @@ -1846,14 +3173,14 @@ Dimitrios Anastassakis Lemke Software Tim Zaman - . + Amir Montazery and Open Source Technology Improvement Fund (ostif.org), Google, for fuzzer fundings. . . --- end of LICENSE --- . ------------------------------------------------------------------------------ %% This notice is provided with respect to Mesa 3-D Graphics Library v21.0.3, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -1993,8 +3320,8 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to PipeWire 0.3.68, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to PipeWire 1.3.81, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2038,11 +3365,16 @@ Copyright © 2021 Red Hat, Inc. . . + spa/utils/cleanup.h: + . + Copyright © 2023 PipeWire authors + . + . --- end of LICENSE --- . ------------------------------------------------------------------------------ %% This notice is provided with respect to xwd v1.0.7, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2082,8 +3414,8 @@ --- 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 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to Apache Commons Byte Code Engineering Library (BCEL) Version 6.10.0, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2105,7 +3437,7 @@ . ------------------------------------------------------------------------------ %% This notice is provided with respect to DOM Level 3 Core Specification v1.0, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2189,7 +3521,7 @@ . ------------------------------------------------------------------------------ %% This notice is provided with respect to CUP Parser Generator for Java v 0.11b, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2226,8 +3558,123 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ + %% This notice is provided with respect to XML Schema Part 1: Structures Second Edition, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C Software and Document license + . + Software and Document license - 2023 version + . + Copied from: https://www.w3.org/copyright/software-license-2023 + . + License + . + By obtaining and/or copying this work, you (the licensee) agree that you have + read, understood, and will comply with the following terms and conditions. + . + Permission to copy, modify, and distribute this work, with or without modification, + for any purpose and without fee or royalty is hereby granted, provided that you + include the following on ALL copies of the work or portions thereof, including + modifications: + . + The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. + Any pre-existing intellectual property disclaimers, notices, or terms and + conditions. If none exist, the W3C software and document short notice should + be included. + Notice of any changes or modifications, through a copyright statement on the + new code or document such as "This software or document includes material + copied from or derived from [title and URI of the W3C document]. Copyright © + [$year-of-document] World Wide Web Consortium. + https://www.w3.org/copyright/software-license-2023/" + . + Disclaimers + . + THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE + SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + . + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. + . + The name and trademarks of copyright holders may NOT be used in advertising or + publicity pertaining to the work without specific, written prior permission. + Title to copyright in this work will at all times remain with copyright holders. + . + ------ + . + Copyright © 2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, + trademark and document use rules apply. + . + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to XML Schema Part 2: Datatypes Second Edition, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C Software and Document license + . + Software and Document license - 2023 version + . + Copied from: https://www.w3.org/copyright/software-license-2023 + . + License + . + By obtaining and/or copying this work, you (the licensee) agree that you have + read, understood, and will comply with the following terms and conditions. + . + Permission to copy, modify, and distribute this work, with or without modification, + for any purpose and without fee or royalty is hereby granted, provided that you + include the following on ALL copies of the work or portions thereof, including + modifications: + . + The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. + Any pre-existing intellectual property disclaimers, notices, or terms and + conditions. If none exist, the W3C software and document short notice should + be included. + Notice of any changes or modifications, through a copyright statement on the + new code or document such as "This software or document includes material + copied from or derived from [title and URI of the W3C document]. Copyright © + [$year-of-document] World Wide Web Consortium. + https://www.w3.org/copyright/software-license-2023/" + . + Disclaimers + . + THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE + SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + . + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. + . + The name and trademarks of copyright holders may NOT be used in advertising or + publicity pertaining to the work without specific, written prior permission. + Title to copyright in this work will at all times remain with copyright holders. + . + ------ + . + Copyright © 2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, + trademark and document use rules apply. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ %% This notice is provided with respect to Apache Xalan v2.7.3, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2264,7 +3711,7 @@ . ------------------------------------------------------------------------------ %% This notice is provided with respect to Apache Xerces v2.12.2, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2295,8 +3742,491 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to Apache Santuario v3.0.3, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to XHTML™ 1.0 The Extensible HyperText Markup Language, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C Software Notice and License + . + W3C(R) SOFTWARE NOTICE AND LICENSE + . + Copyright (c) 1994-2002 World Wide Web Consortium, (Massachusetts + Institute of Technology, Institut National de Recherche en + Informatique et en Automatique, Keio University). All Rights + Reserved. http://www.w3.org/Consortium/Legal/ + . + This W3C work (including software, documents, or other related items) + is being provided by the copyright holders under the following + license. By obtaining, using and/or copying this work, you (the + licensee) agree that you have read, understood, and will comply with + the following terms and conditions: + . + Permission to use, copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and + without fee or royalty is hereby granted, provided that you include + the following on ALL copies of the software and documentation or + portions thereof, including modifications, that you make: + . + The full text of this NOTICE in a location viewable to users of + the redistributed or derivative work. + . + Any pre-existing intellectual property disclaimers, notices, or + terms and conditions. If none exist, a short notice of the following + form (hypertext is preferred, text is permitted) should be used within + the body of any redistributed or derivative code: "Copyright (C) + [$date-of-software] World Wide Web Consortium, (Massachusetts + Institute of Technology, Institut National de Recherche en + Informatique et en Automatique, Keio University). All Rights + Reserved. http://www.w3.org/Consortium/Legal/" + . + Notice of any changes or modifications to the W3C 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 LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR + DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + . + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL + OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. + . + The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, + written prior permission. Title to copyright in this software and any + associated documentation will at all times remain with copyright + holders. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to XHTML™ 1.0 in XML Schema, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C® Intellectual Rights Notice and Legal Disclaimers + . + Copyright © 1994-2002 W3C ® (Massachusetts Institute of Technology, + Institut National de Recherche en Informatique et en Automatique, Keio University), + All Rights Reserved. + . + World Wide Web Consortium (W3C®) web site pages may contain other proprietary + notices and copyright information, the terms of which must be observed and + followed. Specific notices do exist for W3C documents and software. Also, there + are specific usage policies associated with some of the W3C Icons. Please see + our Intellectual Rights FAQ for common questions about using materials from our site. + . + Notice and Disclaimers + . + 1. Unless otherwise noted, all materials contained in this Site are copyrighted + and may not be used except as provided in these terms and conditions or in the + copyright notice (documents and software) or other proprietary notice provided + with the relevant materials. + . + 2. The materials contained in the Site may be downloaded or copied provided that + ALL copies retain the copyright and any other proprietary notices contained on + the materials. No material may be modified, edited or taken out of context such + that its use creates a false or misleading statement or impression as to the + positions, statements or actions of W3C. + . + 3. The name and trademarks of copyright holders may NOT be used in advertising + or publicity pertaining to the Web site, its content, specifications, or + software without specific, written prior permission. Title to copyright in + Web site documents will at all times remain with copyright holders. Use of W3C + trademarks and service marks is covered by the W3C Trademark and Servicemark + License. + . + 4. Caches of W3C materials should comply with the "maximum time to live" + information provided with the materials. After such materials have expired + they should not be served from caches without first validating the contents + of the W3C Site. Organizations that want to mirror W3C content must abide by + the W3C Mirroring Policy. + . + W3C®Trademarks and Generic Terms + Trademarks owned by W3C host institutions on behalf of W3C and generic terms + used by the W3C + . + 5. The trademarks, logos, and service marks (collectively the "Trademarks") + displayed on the Site are registered and unregistered Trademarks of the + Massachusetts Institute of Technology (MIT), Institut National de Recherche + en Informatique et en Automatique (INRIA), or Keio University (Keio). All use + of the W3C Trademarks is governed by the W3C Trademark and Servicemark License. + No additional rights are granted by implication, estoppel, or otherwise. Terms + which claimed as generic are not governed by any W3C license and are used as + common descriptors by the W3C. + . + The following is a list of W3C terms claimed as a trademark or generic term + by MIT, INRIA, and/or Keio on behalf of the W3C: + . + W3C®, World Wide Web Consortium (registered in numerous countries) + Amaya™, a Web Browser + CSS™, Cascading Style Sheets Specification + DOM™, Document Object Model + HTML (generic), HyperText Markup Language + HTTP (generic), Hypertext Transfer Protocol + MathML™, Mathematical Markup Language + Metadata (generic) + P3P™, Platform for Privacy Preferences Project + PICS™, Platform for Internet Content Selection + RDF (generic), Resource Description Framework + SMIL™, Synchronized Multimedia Integration Language + SVG™, Scalable Vector Graphics + WAI™, Web Accessibility Initiative + XENC (generic), XML Encryption + XHTML™, The Extensible HyperText Markup Language + XML (generic), Extensible Markup Language + XSL™, Extensible Stylesheet Language + . + ACSS™, Aural Cascading Style Sheets + DSig™, Digital Signature Initiative + JEPI™, Joint Electronic Payment Initiative + Jigsaw™ + PICSRules™ + WebFonts™ + . + The absence of a product or service name or logo from this list does not + constitute a waiver of MIT's, INRIA's, or Keio's trademark or other intellectual + rights concerning that name or logo. + . + Any questions concerning the use, status, or standing of W3C trademarks should + be directed to: site-policy@w3.org or to W3C (c/o Joseph Reagle), Laboratory + for Computer Science NE43-358, Massachusetts Institute of Technology, 200 + Technology Square, Cambridge, MA 02139. + . + Non-W3C Trademarks; Member Trademarks + . + The trademarks, logos, and service marks not owned on behalf of the W3C and + that are displayed on the Site are the registered and unregistered marks of + their respective owners. No rights are granted by the W3C to use such marks, + whether by implication, estoppel, or otherwise. + . + "METADATA" is a trademark of the Metadata Company. W3C uses the term "metadata" + in a descriptive sense, meaning "data about data". W3C is not in any way + affiliated with the Metadata Company. + Legal Disclaimers + . + 6. W3C has not reviewed any or all of the web sites linked to this Site and is + not responsible for the content of any off-site pages or any other web sites + linked to this Site. Please understand that any non-W3C web site is independent + from W3C, and W3C has no control over the content on that web site. + In addition, a link to a non-W3C web site does not mean that W3C endorses or + accepts any responsibility for the content, or the use, of such site. It is + the user's responsibility to take precautions to ensure that whatever is + selected is free of such items as viruses, worms, Trojan horses and other + items of a destructive nature. + . + 7. Information W3C publishes on its Site may contain references or cross + references to W3C specifications, projects, programs and services that are + not announced or available in your country. Such references do not imply that + W3C intends to announce such specifications, projects, programs or services + in your country. + . + 8. Information on this Site may contain technical inaccuracies or typographical + errors. Information may be changed or updated without notice. W3C may make + improvements and/or changes in the materials contained in or described on this + site at any time without notice. W3C may also make changes in these Terms and + Conditions without notice. User is bound by such revisions and should therefore + periodically visit this page to review the then current Terms and Conditions. + . + 9. Limitation on Warranties. + . + ALL MATERIALS ON THE W3C SITE ARE PROVIDED "AS IS." W3C, MIT, INRIA, AND KEIO + MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT + LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, + TITLE OR NON-INFRINGEMENT. AS TO DOCUMENTS AND GRAPHICS PUBLISHED ON THIS SITE, + W3C, MIT, INRIA, AND KEIO MAKE NO REPRESENTATION OR WARRANTY THAT THE CONTENTS + OF SUCH DOCUMENT OR GRAPHICS ARE FREE FROM ERROR OR SUITABLE FOR ANY PURPOSE; + NOR THAT IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY + PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + . + Please note that some jurisdictions may not allow the exclusion of implied + warranties, so some of the above exclusions may not apply to you. + . + 10. Limitation on Liability. + . + IN NO EVENT WILL W3C, MIT, INRIA, AND KEIO BE LIABLE TO ANY PARTY FOR ANY + DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES FOR ANY USE OF THIS SITE, + OR ON ANY OTHER HYPERLINKED WEB SITE, INCLUDING, WITHOUT LIMITATION, ANY LOST + PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR OTHER DATA ON YOUR + INFORMATION HANDLING SYSTEM OR OTHERWISE, EVEN IF W3C, MIT, INRIA, OR KEIO + IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to XHTML™ 1.1 - Module-based XHTML - Second Edition, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C Document license + . + From: https://www.w3.org/copyright/document-license-2023 + . + Copied 10/15/2024 + . + License + . + By using and/or copying this document, or the W3C document from which this + statement is linked, you (the licensee) agree that you have read, understood, + and will comply with the following terms and conditions: + . + Permission to copy, and distribute the contents of this document, or the W3C + document from which this statement is linked, in any medium for any purpose + and without fee or royalty is hereby granted, provided that you include the + following on ALL copies of the document, or portions thereof, that you use: + . + A link or URL to the original W3C document. + The pre-existing copyright notice of the original author, or if it doesn't + exist, a notice (hypertext is preferred, but a textual representation is + permitted) of the form: "Copyright © [$date-of-document] World Wide Web + Consortium. https://www.w3.org/copyright/document-license-2023/" + If it exists, the STATUS of the W3C document. + . + When space permits, inclusion of the full text of this NOTICE should be provided. + We request that authorship attribution be provided in any software, documents, + or other items or products that you create pursuant to the implementation of the + contents of this document, or any portion thereof. + . + No right to create modifications or derivatives of W3C documents is granted + pursuant to this license, except as follows: To facilitate implementation of + the technical specifications set forth in this document, anyone may prepare + and distribute derivative works and portions of this document in software, + in supporting materials accompanying software, and in documentation of software, + PROVIDED that all such works include the notice below. HOWEVER, the publication + of derivative works of this document for use as a technical specification is + expressly prohibited. + . + In addition, "Code Components" —Web IDL in sections clearly marked as Web IDL; + and W3C-defined markup (HTML, CSS, etc.) and computer programming language code + clearly marked as code examples— are licensed under the W3C Software License. + . + The notice is: + . + "Copyright © 2023 W3C®. This software or document includes material copied from + or derived from [title and URI of the W3C document]." + . + Disclaimers + . + THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS + OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; + THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE + IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, + COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + . + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE + OR IMPLEMENTATION OF THE CONTENTS THEREOF. + . + The name and trademarks of copyright holders may NOT be used in advertising or + publicity pertaining to this document or its contents without specific, written + prior permission. Title to copyright in this document will at all times remain + with copyright holders. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to XHTML 1.1 XML Schema Definition, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C® SOFTWARE NOTICE AND LICENSE + . + http://www.w3.org/Consortium/Legal/copyright-software-19980720 + . + W3C® SOFTWARE NOTICE AND LICENSE + . + Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute of + Technology, Institut National de Recherche en Informatique et en Automatique, + Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ + . + This W3C work (including software, documents, or other related items) is + being provided by the copyright holders under the following license. By + obtaining, using and/or copying this work, you (the licensee) agree that you + have read, understood, and will comply with the following terms and conditions: + Permission to use, copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and without fee + or royalty is hereby granted, provided that you include the following on ALL + copies of the software and documentation or portions thereof, including + modifications, that you make: + . + 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, a short notice of the following form (hypertext + is preferred, text is permitted) should be used within the body of any + redistributed or derivative code: "Copyright © [$date-of-software] World Wide + Web Consortium, (Massachusetts Institute of Technology, Institut National de + Recherche en Informatique et en Automatique, Keio University). All Rights + Reserved. http://www.w3.org/Consortium/Legal/" + . + 3. Notice of any changes or modifications to the W3C 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 LIMITED + TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT + THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY + PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. + . + The name and trademarks of copyright holders may NOT be used in advertising or + publicity pertaining to the software without specific, written prior permission. + Title to copyright in this software and any associated documentation will at all + times remain with copyright holders. + . + The formulation of W3C's notice and license became active on August 14 1998 so + as to improve compatibility with GPL. This version ensures that W3C software + licensing terms are no more restrictive than GPL and consequently W3C software + may be distributed in GPL packages. See the older formulation for the policy + prior to this date. Please see our Copyright FAQ for common questions about + using materials from our site, including specific terms and conditions for + packages like libwww, Amaya, and Jigsaw. Other questions about this notice can + be directed to site-policy@w3.org. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to XML DTD for W3C specifications, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C Software Notice and License + . + W3C(R) SOFTWARE NOTICE AND LICENSE + . + Copyright (c) 1994-2002 World Wide Web Consortium, (Massachusetts + Institute of Technology, Institut National de Recherche en + Informatique et en Automatique, Keio University). All Rights + Reserved. http://www.w3.org/Consortium/Legal/ + . + This W3C work (including software, documents, or other related items) + is being provided by the copyright holders under the following + license. By obtaining, using and/or copying this work, you (the + licensee) agree that you have read, understood, and will comply with + the following terms and conditions: + . + Permission to use, copy, modify, and distribute this software and its + documentation, with or without modification, for any purpose and + without fee or royalty is hereby granted, provided that you include + the following on ALL copies of the software and documentation or + portions thereof, including modifications, that you make: + . + The full text of this NOTICE in a location viewable to users of + the redistributed or derivative work. + . + Any pre-existing intellectual property disclaimers, notices, or + terms and conditions. If none exist, a short notice of the following + form (hypertext is preferred, text is permitted) should be used within + the body of any redistributed or derivative code: "Copyright (C) + [$date-of-software] World Wide Web Consortium, (Massachusetts + Institute of Technology, Institut National de Recherche en + Informatique et en Automatique, Keio University). All Rights + Reserved. http://www.w3.org/Consortium/Legal/" + . + Notice of any changes or modifications to the W3C 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 LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR + DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + . + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL + OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. + . + The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, + written prior permission. Title to copyright in this software and any + associated documentation will at all times remain with copyright + holders. + . + ---------- + . + COPYRIGHT: + . + Copyright (C) 2000, 2001, 2002, 2003 Sun Microsystems, Inc. All Rights Reserved. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to The "xml:" Namespace, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + W3C Software and Document license + . + From: https://www.w3.org/copyright/software-license-2023/ + Copied on 2024/10/15 + . + License + . + By obtaining and/or copying this work, you (the licensee) agree that you have + read, understood, and will comply with the following terms and conditions. + . + Permission to copy, modify, and distribute this work, with or without modification, + for any purpose and without fee or royalty is hereby granted, provided that you + include the following on ALL copies of the work or portions thereof, including + modifications: + . + The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. + Any pre-existing intellectual property disclaimers, notices, or terms and + conditions. If none exist, the W3C software and document short notice should + be included. + Notice of any changes or modifications, through a copyright statement on the + new code or document such as "This software or document includes material + copied from or derived from [title and URI of the W3C document]. Copyright © + [$year-of-document] World Wide Web Consortium. + https://www.w3.org/copyright/software-license-2023/" + . + Disclaimers + . + THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE + SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. + . + COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. + . + The name and trademarks of copyright holders may NOT be used in advertising or + publicity pertaining to the work without specific, written prior permission. + Title to copyright in this work will at all times remain with copyright holders. + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Apache Santuario v3.0.5, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2306,7 +4236,7 @@ . . Apache Santuario - XML Security for Java - Copyright 1999-2023 The Apache Software Foundation + Copyright 1999-2024 The Apache Software Foundation . This product includes software developed at The Apache Software Foundation (http://www.apache.org/). @@ -2318,28 +4248,28 @@ Commission in the project in the ISIS Programme. . This product contains software that is - copyright (c) 2021, Oracle and/or its affiliates. + copyright (c) 2021, 2023, Oracle and/or its affiliates. . . --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to OASIS PKCS #11 Cryptographic Token Interface v3.0, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to OASIS PKCS #11 Cryptographic Token Interface v3.1, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . OASIS PKCS #11 Cryptographic Token Interface License . . - Copyright © OASIS Open 2020. All Rights Reserved. + Copyright © OASIS Open 2023. All Rights Reserved. . - All capitalized terms in the following text have the meanings + 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] + [https://www.oasis-open.org/policies-guidelines/ipr/]. . - This document and translations of it may be copied and furnished to + 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, @@ -2352,10 +4282,10 @@ 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 + 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 + 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 @@ -2364,7 +4294,11 @@ 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 + As stated in the OASIS IPR Policy, the following three paragraphs in + brackets apply to OASIS Standards Final Deliverable documents (Committee + Specifications, OASIS Standards, or Approved Errata). + . + [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 @@ -2372,7 +4306,7 @@ the IPR Mode of the OASIS Technical Committee that produced this deliverable.] . - [OASIS invites any party to contact the OASIS TC Administrator if it + [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 @@ -2381,7 +4315,7 @@ 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 + [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 @@ -2404,7 +4338,7 @@ . ------------------------------------------------------------------------------ %% 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 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2457,7 +4391,7 @@ . ------------------------------------------------------------------------------ %% This notice is provided with respect to Dynalink v.5, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2495,15 +4429,15 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to JLine v3.22.0, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to JLine v3.29.0, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . JLine License . . - Copyright (c) 2002-2018, the original author or authors. + Copyright (c) 2002-2023, the original author or authors. All rights reserved. . https://opensource.org/licenses/BSD-3-Clause @@ -2543,8 +4477,44 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ + %% This notice is provided with respect to CommonMark 0.22.0, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + CommonMark License + . + Copyright (c) 2015, Atlassian Pty Ltd + 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. + . + 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 THE POSSIBILITY OF SUCH DAMAGE. + . + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ %% This notice is provided with respect to jopt-simple v5.0.4, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2577,51 +4547,254 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to jQuery v3.6.1, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to DejaVu fonts v2.37, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . - jQuery License + DejaVu License . - jQuery v 3.6.1 - Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. + Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + . + . + Bitstream Vera Fonts 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. + . + Arev Fonts Copyright + ------------------------------ + . + Copyright (c) 2006 by Tavmjong Bah. 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 + a copy of the fonts accompanying this license ("Fonts") and + associated documentation files (the "Font Software"), to reproduce + and distribute the modifications to the Bitstream Vera 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 notice and this permission notice shall be - included in all copies or substantial portions of the Software. + 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 "Tavmjong Bah" or the word "Arev". + . + This License becomes null and void to the extent applicable to Fonts + or Font Software that has been modified and is distributed under the + "Tavmjong Bah Arev" 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 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 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 + TAVMJONG BAH 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 name of Tavmjong Bah 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 Tavmjong Bah. For further information, contact: tavmjong @ free + . fr. . - ****************************************** + TeX Gyre DJV Math + ----------------- + Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. . - The jQuery JavaScript Library v3.6.1 also includes Sizzle.js + Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski + (on behalf of TeX users groups) are in public domain. . - Sizzle.js includes the following license: + Letters imported from Euler Fraktur from AMSfonts are (c) American + Mathematical Society (see below). + Bitstream Vera Fonts 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. + . + AMSFonts (v. 2.2) copyright + . + The PostScript Type 1 implementation of the AMSFonts produced by and + previously distributed by Blue Sky Research and Y&Y, Inc. are now freely + available for general use. This has been accomplished through the + cooperation + of a consortium of scientific publishers with Blue Sky Research and Y&Y. + Members of this consortium include: + . + Elsevier Science IBM Corporation Society for Industrial and Applied + Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS) + . + In order to assure the authenticity of these fonts, copyright will be + held by + the American Mathematical Society. This is not meant to restrict in any way + the legitimate use of the fonts, such as (but not limited to) electronic + distribution of documents containing these fonts, inclusion of these fonts + into other public domain or commercial font collections or computer + applications, use of the outline data to create derivative fonts and/or + faces, etc. However, the AMS does require that the AMS copyright notice be + removed from any derivative versions of the fonts which have been altered in + any way. In addition, to ensure the fidelity of TeX documents using Computer + Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces, + has requested that any alterations which yield different font metrics be + given a different name. . - Copyright JS Foundation and other contributors, https://js.foundation/ . - 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 . - The following license applies to all parts of this software except as - documented below: + --- end of LICENSE --- . - ==== + ------------------------------------------------------------------------------ + %% This notice is provided with respect to Highlight.js v11.11.1, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + Highlight.js License + . + BSD 3-Clause License + . + Copyright (c) 2006, Ivan Sagalaev. + 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 the copyright holder 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 THE POSSIBILITY OF SUCH DAMAGE. + . + . + --- end of LICENSE --- + . + ------------------------------------------------------------------------------ + %% This notice is provided with respect to jQuery v3.7.1, + which may be included with JRE 25, JDK 25 and OpenJDK 25 + . + --- begin of LICENSE --- + . + jQuery License + . + jQuery v 3.7.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 @@ -2642,28 +4815,18 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. . - ==== - . - 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. - . - ********************* - . - . . --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to jQuery UI v1.13.2, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to jQuery UI v1.14.1, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . jQuery UI License . - Copyright jQuery Foundation and other contributors, https://jquery.org/ + Copyright OpenJS Foundation and other contributors, https://openjsf.org/ . This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history @@ -2712,8 +4875,8 @@ --- end of LICENSE --- . ------------------------------------------------------------------------------ - %% This notice is provided with respect to Unicode Common Local Data Repository (CLDR) v44, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + %% This notice is provided with respect to Unicode Common Local Data Repository (CLDR) v47, + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . @@ -2721,11 +4884,12 @@ . . . + . UNICODE LICENSE V3 . COPYRIGHT AND PERMISSION NOTICE . - Copyright © 2019-2023 Unicode, Inc. + Copyright © 1991-2025 Unicode, Inc. . NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR @@ -2761,13 +4925,65 @@ dealings in these Data Files or Software without prior written authorization of the copyright holder. . + SPDX-License-Identifier: Unicode-3.0 + . + ———————————— + . + Unicode® Copyright and Terms of Use + For the general privacy policy governing access to this site, see the Unicode Privacy Policy. + . + Unicode Copyright + Copyright © 1991-2025 Unicode, Inc. All rights reserved. + Definitions + Unicode Data Files ("DATA FILES") include all data files under the directories: + https://www.unicode.org/Public/ + https://www.unicode.org/reports/ + https://www.unicode.org/ivd/data/ + . + Unicode Data Files do not include PDF online code charts under the directory: + https://www.unicode.org/Public/ + . + Unicode Software ("SOFTWARE") includes any source code published in the Unicode Standard + or any source code or compiled code under the directories: + https://www.unicode.org/Public/PROGRAMS/ + https://www.unicode.org/Public/cldr/ + http://site.icu-project.org/download/ + Terms of Use + 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. + Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files, subject to the Terms and Conditions herein. + Further specifications of rights and restrictions pertaining to the use of the Unicode DATA FILES and SOFTWARE can be found in the Unicode Data Files and Software License. + 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 Unicode PDF online code charts carry specific restrictions. Those restrictions are incorporated as the first page of each PDF code chart. + All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. + No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. + Modification is not permitted with respect to this document. All copies of this document must be verbatim. + 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. + Warranties and Disclaimers + 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, Inc. may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. + 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. + EXCEPT AS PROVIDED IN SECTION E.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, INC. 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. + Waiver of Damages + In no event shall Unicode, Inc. or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode, Inc. 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. + Trademarks & Logos + 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. + 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. + All third party trademarks referenced herein are the property of their respective owners. + Miscellaneous + Jurisdiction and Venue. This website is operated from a location in the State of California, United States of America. Unicode, Inc. makes no representation that the materials are appropriate for use in other locations. If you access this website from other locations, you are responsible for compliance with local laws. This Agreement, all use of this website and any claims and damages resulting from use of this website 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 website 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. + Modification by Unicode, Inc. Unicode, Inc. shall have the right to modify this Agreement at any time by posting it to this website. The user may not assign any part of this Agreement without Unicode, Inc.’s prior written consent. + 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. + Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. + Entire Agreement. This Agreement constitutes the entire agreement between the parties. + . + . . . --- end of LICENSE --- . ------------------------------------------------------------------------------ %% This notice is provided with respect to Thai Dictionary, - which may be included with JRE 23, JDK 23 and OpenJDK 23 + which may be included with JRE 25, JDK 25 and OpenJDK 25 . --- begin of LICENSE --- . diff -Nru openjdk-25-25.0.2+10/debian/copyright-generator/copyright-gen.py openjdk-25-25.0.3+9/debian/copyright-generator/copyright-gen.py --- openjdk-25-25.0.2+10/debian/copyright-generator/copyright-gen.py 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/copyright-generator/copyright-gen.py 2026-04-25 10:29:02.000000000 +0000 @@ -79,7 +79,7 @@ ] ## TODO: Can the script deduce this list? -upstream_authors = [ +upstream_authors = [ "Oracle and/or its affiliates", "Sun Microsystems, Inc", "Red Hat, Inc", @@ -114,7 +114,7 @@ def print_file_stanza(files, copyrights, license, comments): print_field("Files", True, files) print_field("Copyright", False, copyrights) - print_field("License", True, license) + print_field("License", True, license) if (comments is not None and len(comments) != 0): print_field("Comments", True, comments) print() # an empty line @@ -129,7 +129,7 @@ {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() @@ -137,18 +137,34 @@ comment = generate_comment_str() print_header_stanza(format, excluded, source, comment) +def strip_license_line(line:str): + return line.replace("### ","").replace("```", "").replace("
", "").replace("
", "") + def get_content(path): lines = [] + COMMON_LICENSES = ["### Apache 2.0 License", + "### GNU GENERAL PUBLIC LICENSE v2", + "### GPL v2", + "### GPL version 3", + "### GNU GENERAL PUBLIC LICENSE v3", + "### Apache License v2.0"] + skip = False with open(path, 'r') as file: for line in file: - lines.append(line - .replace("### ","") - .replace("```", "") - .replace("
", "")
-        .replace("
", "")) - + if skip: + if line.startswith("### "): + skip = False + else: + continue + stripped = line.strip("\n") + if stripped in COMMON_LICENSES: + line = stripped + ": Refer to the copy under /usr/share/common-licenses\n\n" + lines.append(strip_license_line(line)) + skip = True + if not skip: + lines.append(strip_license_line(line)) return lines[0], "".join(lines[1:]) - + def fill_with_dots_and_indent(text): indentation = " " * 2 @@ -179,7 +195,7 @@ ------------------------------------------------------------------------------""" - + def gather_legal_dirs(path): legal_dirs = [] for root, dirs, files in os.walk(path): @@ -210,12 +226,17 @@ return file.path def search_source_rootdir(level, path = '.'): + if os.path.exists(path + "/ASSEMBLY_EXCEPTION"): + print("Assembly exception found. Skipping source package search.", file=sys.stderr) + return "." + # 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 @@ -244,9 +265,8 @@ 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"; + 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 @@ -269,7 +289,7 @@ # clean-up if needs_cleanup: os.system(f"rm -rf *.debian.tar.xz *.orig.tar.xz *.dsc *googletest.tar.xz"); - + def detect_version(): @@ -293,4 +313,4 @@ print("Version not supported.") if __name__ == "__main__": - main() + main() diff -Nru openjdk-25-25.0.2+10/debian/copyright-generator/strip-common-licenses.sh openjdk-25-25.0.3+9/debian/copyright-generator/strip-common-licenses.sh --- openjdk-25-25.0.2+10/debian/copyright-generator/strip-common-licenses.sh 2026-01-20 20:31:32.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/copyright-generator/strip-common-licenses.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -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" "### GPL version 3"; 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 - 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-25-25.0.2+10/debian/dbg.py openjdk-25-25.0.3+9/debian/dbg.py --- openjdk-25-25.0.2+10/debian/dbg.py 2024-10-16 11:04:16.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/dbg.py 2026-03-01 21:52:24.000000000 +0000 @@ -1,29 +1,39 @@ # 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. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this software; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA, or see the FSF site: http://www.fsf.org. -# +# # @authors Andrew Dinn import gdb - +import traceback import re from gdb.FrameDecorator import FrameDecorator # we rely on the unwinder API provided by gdb.7.10 +_debug = False +_warning = False + +def warning(*args, **kwargs): + if _warning: + gdb.write(*args, **kwargs) + +def debug(*args, **kwargs): + if _debug: + gdb.write(*args, **kwargs) _dump_frame = False _have_unwinder = True @@ -38,14 +48,14 @@ def debug_write(msg): - gdb.write(msg) + debug(msg) # pass def t(msg): - gdb.write("%s\n" % msg) + debug("%s\n" % msg) # pass -# debug_write("dbg.py\n") +debug("dbg.py\n") # class providing various type conversions for gdb Value instances @@ -56,7 +66,7 @@ int_t = gdb.lookup_type('int') long_t = gdb.lookup_type('long') void_t = gdb.lookup_type('void') - + bytep_t = byte_t.pointer() charp_t = char_t.pointer() intp_t = int_t.pointer() @@ -64,7 +74,6 @@ voidp_t = void_t.pointer() codeblobp_t = gdb.lookup_type('CodeBlob').pointer() - cmethodp_t = gdb.lookup_type('CompiledMethod').pointer() nmethodp_t = gdb.lookup_type('nmethod').pointer() ptrp_t = voidp_t.pointer() @@ -162,7 +171,7 @@ @classmethod def class_init(cls): - # t("CodeHeap.class_init") + t("CodeHeap.class_init") if cls.class_inited: return # we can only proceed if we have the necessary heap symbols @@ -170,9 +179,9 @@ cls.heap_block_type = gdb.lookup_type("HeapBlock").pointer() cls.code_blob_type = gdb.lookup_type("CodeBlob").pointer() cls.class_inited = True - + def __init__(self, heap): - # t("CodeHeap.__init__") + t("CodeHeap.__init__") # make sure we have static inited successfuly self.class_init() # if we got here we are ok to create a new instance @@ -184,73 +193,73 @@ self.segmap_lo = self.segmap['_low'] self.segment_size = int(heap['_segment_size']) self.log2_segment_size = int(heap['_log2_segment_size']) - # debug_write("@@ heap.name = %s\n" % self.name) - # debug_write("@@ heap.lo = 0x%x\n" % self.lo) - # debug_write("@@ heap.hi = 0x%x\n" % self.hi) + debug("@@ heap.name = %s\n" % self.name) + debug("@@ heap.lo = 0x%x\n" % self.lo) + debug("@@ heap.hi = 0x%x\n" % self.hi) def inrange(self, x): - # t("CodeHeap.inrange") - return self.lo <= x and self.hi > x + debug("CodeHeap.inrange") + return self.lo <= x and self.hi > x def findblob(self, pc): - # t("CodeHeap.findblob") + debug("CodeHeap.findblob") x = Types.as_long(pc) - # debug_write("@@ findblob(%s, 0x%x)\n" % (self.name, pc)) - # debug_write("@@ pc (%s) = 0x%x \n" % (str(pc.type), pc)) - # debug_write("@@ self.lo = 0x%x\n" % self.lo) - # debug_write("@@ self.hi = 0x%x\n" % self.hi) + debug("@@ findblob(%s, 0x%x)\n" % (self.name, pc)) + debug("@@ pc (%s) = 0x%x \n" % (str(pc.type), pc)) + debug("@@ self.lo = 0x%x\n" % self.lo) + debug("@@ self.hi = 0x%x\n" % self.hi) # check pc is in this heap's range - # t("if not self.inrange(x):") + t("if not self.inrange(x):") if not self.inrange(x): return None - # debug_write("@@ pc in range\n") - # t("segments = 0") + debug("@@ pc in range\n") + t("segments = 0") segments = 0 - # debug_write("@@ segmap_lo (%s) = 0x%x\n" % (str(self.segmap_lo.type), self.segmap_lo)) - # debug_write("@@ self.lo = 0x%x \n" % self.lo) - # debug_write("@@ self.log2_segment_size = 0x%x \n" % self.log2_segment_size) - # t("offset = Types.as_long(pc - self.lo)") + debug("@@ segmap_lo (%s) = 0x%x\n" % (str(self.segmap_lo.type), self.segmap_lo)) + debug("@@ self.lo = 0x%x \n" % self.lo) + debug("@@ self.log2_segment_size = 0x%x \n" % self.log2_segment_size) + t("offset = Types.as_long(pc - self.lo)") offset = Types.as_long(pc - self.lo) - # debug_write("@@ offset = 0x%x\n" % offset) - # t("shift = self.log2_segment_size") + debug("@@ offset = 0x%x\n" % offset) + t("shift = self.log2_segment_size") shift = self.log2_segment_size - # debug_write("@@ shift = 0x%x\n" % shift) - # t("segment = offset >> shift") + debug("@@ shift = 0x%x\n" % shift) + t("segment = offset >> shift") segment = offset >> shift # segment = (offset >> self.log2_segment_size) #segment = offset >> (self.log2_segment_size & 0x31) - # debug_write("@@ segment = 0x%x\n" % segment) - # t("tag = (self.segmap_lo + segment).dereference() & 0xff") + debug("@@ segment = 0x%x\n" % segment) + t("tag = (self.segmap_lo + segment).dereference() & 0xff") tag = (self.segmap_lo + segment).dereference() & 0xff # tag = Types.load_byte(self.segmap_lo + segment) & 0xff - # debug_write("@@ tag (%s) = 0x%x\n" % (str(tag.type), tag)) - # t("while tag > 0 and segments < 64:") + debug("@@ tag (%s) = 0x%x\n" % (str(tag.type), tag)) + t("while tag > 0 and segments < 64:") while tag > 0 and segments < 64: - # t("segment = segment - tag") + t("segment = segment - tag") segment = segment - tag - # debug_write("@@ segment = 0x%x\n" % segment) - # t("tag = (self.segmap_lo + segment).dereference() & 0xff") + debug("@@ segment = 0x%x\n" % segment) + t("tag = (self.segmap_lo + segment).dereference() & 0xff") tag = (self.segmap_lo + segment).dereference() & 0xff - # debug_write("@@ tag (%s) = 0x%x\n" % (str(tag.type), tag)) - # t("segments += 1") + debug("@@ tag (%s) = 0x%x\n" % (str(tag.type), tag)) + t("segments += 1") segments += 1 - # t("if tag != 0:") + t("if tag != 0:") if tag != 0: - # t("return None") + t("return None") return None - # debug_write("@@ lo = 0x%x\n" % self.lo) - # debug_write("@@ segment << self.log2_segment_size = 0x%x\n" % (segment << self.log2_segment_size)) - # t("block_addr = self.lo + (segment << self.log2_segment_size)") + debug("@@ lo = 0x%x\n" % self.lo) + debug("@@ segment << self.log2_segment_size = 0x%x\n" % (segment << self.log2_segment_size)) + t("block_addr = self.lo + (segment << self.log2_segment_size)") block_addr = self.lo + (segment << self.log2_segment_size) - # debug_write("@@ block_addr (%s) = 0x%x\n" % (str(block_addr.type), block_addr)) - # t("heap_block = gdb.Value(block_addr).cast(CodeHeap.heap_block_type)") + debug("@@ block_addr (%s) = 0x%x\n" % (str(block_addr.type), block_addr)) + t("heap_block = gdb.Value(block_addr).cast(CodeHeap.heap_block_type)") heap_block = gdb.Value(block_addr).cast(CodeHeap.heap_block_type) - # debug_write("@@ heap_block (%s) = 0x%x\n" % (str(heap_block.type), heap_block)) - # t("if heap_block['_header']['_used'] != 1:") + debug("@@ heap_block (%s) = 0x%x\n" % (str(heap_block.type), heap_block)) + t("if heap_block['_header']['_used'] != 1:") if heap_block['_header']['_used'] != 1: # hmm, this is not meant to happen - # t("return None") + t("return None") return None - # t("blob = (heap_block + 1).cast(CodeHeap.code_blob_type)") + t("blob = (heap_block + 1).cast(CodeHeap.code_blob_type)") blob = (heap_block + 1).cast(CodeHeap.code_blob_type) return blob @@ -268,53 +277,53 @@ @classmethod def class_init(cls): - # t("CodeCache.class_init") + t("CodeCache.class_init") if cls.class_inited: return - # t("if cls.lo == 0 or cls.hi == 0:") + t("if cls.lo == 0 or cls.hi == 0:") if cls.lo == 0 or cls.hi == 0: try: - # t("cls.lo = gdb.parse_and_eval(\"CodeCache::_low_bound\")") + t("cls.lo = gdb.parse_and_eval(\"CodeCache::_low_bound\")") lo = gdb.parse_and_eval("CodeCache::_low_bound") cls.lo = Types.as_long(lo) - # debug_write("@@ CodeCache::_low_bound = 0x%x\n" % cls.lo) + debug("@@ CodeCache::_low_bound = 0x%x\n" % cls.lo) if cls.lo == 0: return - # t("cls.hi = gdb.parse_and_eval(\"CodeCache::_high_bound\")") + t("cls.hi = gdb.parse_and_eval(\"CodeCache::_high_bound\")") hi = gdb.parse_and_eval("CodeCache::_high_bound") cls.hi = Types.as_long(hi) - # debug_write("@@ CodeCache::_high_bound = 0x%x\n" % cls.hi) + debug("@@ CodeCache::_high_bound = 0x%x\n" % cls.hi) if cls.hi == 0: return except Exception as arg: - # debug_write("@@ %s\n" % arg) + debug("@@ %s\n" % arg) cls.lo = 0 cls.hi = 0 cls.class_inited = False raise - # t("f cls.heap_list == []:") + t("f cls.heap_list == []:") if cls.heap_list == []: try: - # t("heaps = gdb.parse_and_eval(\"CodeCache::_heaps\")") + t("heaps = gdb.parse_and_eval(\"CodeCache::_heaps\")") heaps = gdb.parse_and_eval("CodeCache::_heaps") - # debug_write("@@ CodeCache::_heaps (%s) = 0x%x\n" % (heaps.type, heaps)) - # t("len = int(heaps['_len'])") + debug("@@ CodeCache::_heaps (%s) = 0x%x\n" % (heaps.type, heaps)) + t("len = int(heaps['_len'])") len = int(heaps['_len']) - # debug_write("@@ CodeCache::_heaps->_len = %d\n" % len) - # t("data = heaps['_data']") + debug("@@ CodeCache::_heaps->_len = %d\n" % len) + t("data = heaps['_data']") data = heaps['_data'] - # debug_write("@@ CodeCache::_heaps->_data = 0x%x\n" % data) - # t("for i in range(0, len):") + debug("@@ CodeCache::_heaps->_data = 0x%x\n" % data) + t("for i in range(0, len):") for i in range(0, len): - # t("heap = CodeHeap((data + i).dereference())") + t("heap = CodeHeap((data + i).dereference())") heap = CodeHeap((data + i).dereference()) - # t("cls.heap_list.append(heap)") + t("cls.heap_list.append(heap)") cls.heap_list.append(heap) - # t("cls.heap_count += 1") + t("cls.heap_count += 1") cls.heap_count += 1 except Exception as arg: - # debug_write("@@ %s\n" % arg) + debug("@@ %s\n" % arg) cls.heap_list = [] cls.heap_count = 0 cls.class_inited = False @@ -323,29 +332,29 @@ @classmethod def inrange(cls, pc): - # t("CodeCache.inrange") + t("CodeCache.inrange") # make sure we are initialized cls.class_init() # if we got here we can use the heaps x = Types.as_long(pc) - # t("return cls.lo <= x and cls.hi > x") + t("return cls.lo <= x and cls.hi > x") return cls.lo <= x and cls.hi > x @classmethod def makestr(cls, charcnt, charptr): - # t("CodeCache.makestr") + t("CodeCache.makestr") #res = "" #for i in range(0, charcnt): # c = (charptr + i).dereference() # res = ("%s%c" % (res, c)) #return res - # debug_write("charcnt = %d charptr = %s\n" % (charcnt, str(charptr))) + debug("charcnt = %d charptr = %s\n" % (charcnt, str(charptr))) return charptr.string("ascii", "ignore", charcnt) # given a PC find the associated OpenJDK code blob instance @classmethod def findblob(cls, pc): - # t("CodeCache.findblob") + t("CodeCache.findblob") # make sure we are initialized cls.class_init() # if we got here we can use the heaps @@ -353,20 +362,20 @@ raise gdb.GdbError("dbg.findblob : address 0x%x is not in range!" % pc) for heap in cls.heap_list: try: - # t("blob = heap.findblob(pc)") + t("blob = heap.findblob(pc)") blob = heap.findblob(pc) except Exception as arg: - # debug_write("@@ findblob excepted %s\n" % str(arg)) - # t("blob = None") + debug("@@ findblob excepted %s\n" % str(arg)) + t("blob = None") blob = None - # t("if blob != None:") + t("if blob != None:") if blob != None: - # t("name=str(blob['_name'])") + t("name=str(blob['_name'])") name=str(blob['_name']) - # debug_write("@@ blob(0x%x) -> %s\n" % (pc, name)) - # t("return blob") + debug("@@ blob(0x%x) -> %s\n" % (pc, name)) + t("return blob") return blob - # t("raise gdb.GdbError") + t("raise gdb.GdbError") raise gdb.GdbError("dbg.findblob : no blob for inrange address 0x%x!" % pc) # abstract over some constants for stack frame layout @@ -424,41 +433,41 @@ return int(Types.load_byte(self.data + pos)) # read and return the next byte def read(self): - # t("CompressedStream.read()") + t("CompressedStream.read()") pos = self.pos b = self.at(pos) self.pos = pos+1 return b def read_int(self): - # t("CompressedStream.read_int()") + t("CompressedStream.read_int()") b0 = self.read() - # debug_write("b0 = 0x%x\n" % b0) + debug("b0 = 0x%x\n" % b0) if b0 < CompressedStream.L: return b0 return self.read_int_mb(b0) def read_signed_int(self): - # t("CompressedStream.read_signed_int()") + t("CompressedStream.read_signed_int()") return self.decode_sign(self.read_int()) def decode_sign(self, x): - # t("CompressedStream.decode_sign()") + t("CompressedStream.decode_sign()") return (x >> 1) ^ (0 - (x & 1)) def read_int_mb(self, b): t# ("CompressedStream.read_int_mb()") sum = b pos = self.pos - # debug_write("pos = %d\n" % pos) - # debug_write("sum = 0x%x\n" % sum) + debug("pos = %d\n" % pos) + debug("sum = 0x%x\n" % sum) lg_H_i = CompressedStream.lg_H i = 0 while (True): b_i = self.at(pos + i) - # debug_write("b_%d = %d\n" % (i, b_i)) + debug("b_%d = %d\n" % (i, b_i)) sum += (b_i << lg_H_i) - # debug_write("sum = 0x%x\n" % sum) + debug("sum = 0x%x\n" % sum) i += 1 if b_i < CompressedStream.L or i == CompressedStream.MAX_i: self.pos = pos + i - # debug_write("self.pos = %d\n" % self.pos) + debug("self.pos = %d\n" % self.pos) return sum lg_H_i += CompressedStream.lg_H @@ -473,7 +482,7 @@ class_inited = False @classmethod def class_init(cls): - # t("MethodBCIReader.class_init") + t("MethodBCIReader.class_init") if cls.class_inited: return # cache some useful types @@ -488,25 +497,25 @@ return Types.to_type(val, cls.pcdesc_p) def __init__(self, nmethod, method): - # t("MethodBCIReader.__init__") + t("MethodBCIReader.__init__") # ensure we have cached the necessary types self.class_init() # need to unpack pc scopes self.nmethod = nmethod self.method = method - # debug_write("nmethod (%s) = 0x%x\n" % (str(nmethod.type), Types.as_long(nmethod))) + debug("nmethod (%s) = 0x%x\n" % (str(nmethod.type), Types.as_long(nmethod))) blob = Types.to_type(nmethod, Types.codeblobp_t); self.code_begin = Types.as_long(blob['_code_begin']) self.code_end = Types.as_long(blob['_code_end']) scopes_pcs_begin_offset = Types.as_int(nmethod['_scopes_pcs_offset']) - # debug_write("scopes_pcs_begin_offset = 0x%x\n" % scopes_pcs_begin_offset) + debug("scopes_pcs_begin_offset = 0x%x\n" % scopes_pcs_begin_offset) scopes_pcs_end_offset = Types.as_int(nmethod['_dependencies_offset']) - # debug_write("scopes_pcs_end_offset = 0x%x\n" % scopes_pcs_end_offset) + debug("scopes_pcs_end_offset = 0x%x\n" % scopes_pcs_end_offset) header_begin = Types.cast_bytep(nmethod) self.scopes_pcs_begin = self.as_pcdesc_p(header_begin + scopes_pcs_begin_offset) - # debug_write("scopes_pcs_begin (%s) = 0x%x\n" % (str(self.scopes_pcs_begin.type), Types.as_long(self.scopes_pcs_begin))) + debug("scopes_pcs_begin (%s) = 0x%x\n" % (str(self.scopes_pcs_begin.type), Types.as_long(self.scopes_pcs_begin))) self.scopes_pcs_end = self.as_pcdesc_p(header_begin + scopes_pcs_end_offset) - # debug_write("scopes_pcs_end (%s) = 0x%x\n" % (str(self.scopes_pcs_end.type), Types.as_long(self.scopes_pcs_end))) + debug("scopes_pcs_end (%s) = 0x%x\n" % (str(self.scopes_pcs_end.type), Types.as_long(self.scopes_pcs_end))) def find_pc_desc(self, pc_off): lower = self.scopes_pcs_begin @@ -526,22 +535,22 @@ if scope_decode_offset == 0: return [ { 'method': self.method, 'bci': 0 } ] nmethod = self.nmethod - # debug_write("nmethod = 0x%x\n" % nmethod) - # debug_write("pc_desc = 0x%x\n" % Types.as_long(pc_desc)) + debug("nmethod = 0x%x\n" % nmethod) + debug("pc_desc = 0x%x\n" % Types.as_long(pc_desc)) base = Types.cast_bytep(nmethod) # scopes_data_offset = Types.as_int(nmethod['_scopes_data_offset']) # scopes_base = base + scopes_data_offset scopes_base = nmethod['_scopes_data_begin'] - # debug_write("scopes_base = 0x%x\n" % Types.as_long(scopes_base)) + debug("scopes_base = 0x%x\n" % Types.as_long(scopes_base)) metadata_offset = Types.as_int(nmethod['_metadata_offset']) metadata_base = Types.to_type(base + metadata_offset, self.metadata_pp) - # debug_write("metadata_base = 0x%x\n" % Types.as_long(metadata_base)) + debug("metadata_base = 0x%x\n" % Types.as_long(metadata_base)) scope = scopes_base + scope_decode_offset - # debug_write("scope = 0x%x\n" % Types.as_long(scope)) + debug("scope = 0x%x\n" % Types.as_long(scope)) stream = CompressedStream(scope) - # debug_write("stream = %s\n" % stream) + debug("stream = %s\n" % stream) sender = stream.read_int() - # debug_write("sender = %s\n" % sender) + debug("sender = %s\n" % sender) # method name is actually in metadata method_idx = stream.read_int() method_md = (metadata_base + (method_idx - 1)).dereference() @@ -549,10 +558,10 @@ method = Method(methodptr) # bci is offset by -1 to allow range [-1, ..., MAX_UINT) bci = stream.read_int() - 1 - # debug_write("method,bci = %s,0x%x\n" % (method.get_name(), bci)) + debug("method,bci = %s,0x%x\n" % (method.get_name(), bci)) result = [ { 'method': method, 'bci': bci } ] while sender > 0: - # debug_write("\nsender = 0x%x\n" % sender) + debug("\nsender = 0x%x\n" % sender) stream = CompressedStream(scopes_base + sender) sender = stream.read_int() method_idx = stream.read_int() @@ -561,7 +570,7 @@ method = Method(methodptr) # bci is offset by -1 to allow range [-1, ..., MAX_UINT) bci = stream.read_int() - 1 - # debug_write("method,bci = %s,0x%x\n" % (method.get_name(), bci)) + debug("method,bci = %s,0x%x\n" % (method.get_name(), bci)) result.append( { 'method': method, 'bci': bci } ) return result @@ -570,7 +579,7 @@ if pc < self.code_begin or pc >= self.code_end: return None pc_off = pc - self.code_begin - # debug_write("\npc_off = 0x%x\n" % pc_off) + debug("\npc_off = 0x%x\n" % pc_off) pc_desc = self.find_pc_desc(pc_off) if pc_desc is None: return None @@ -581,11 +590,11 @@ class LineReader: # table is a gdb.Value of type 'byte *' (strictly 'u_char *' in JVM code) def __init__(self, table): - # t("LineReader.init") + t("LineReader.init") self.table = table self.translations = {} def bc_to_line(self, bci): - # t("LineReader.bc_to_line()") + t("LineReader.bc_to_line()") try: return self.translations[bci] except Exception as arg: @@ -594,8 +603,8 @@ self.translations[bci] = line return line def compute_line(self, bci): - # t("LineReader.compute_line()") - # debug_write("table = 0x%x\n" % self.table) + t("LineReader.compute_line()") + debug("table = 0x%x\n" % self.table) bestline = -1 self.stream = CompressedStream(self.table) self._bci = 0 @@ -609,9 +618,9 @@ bestline = nextline return bestline def read_pair(self): - # t("LineReader.read_pair()") + t("LineReader.read_pair()") next = self.stream.read() - # debug_write("next = 0x%x\n" % next) + debug("next = 0x%x\n" % next) if next == 0: return False if next == 0xff: @@ -620,8 +629,8 @@ else: self._bci = self._bci + (next >> 3) self._line = self._line + (next & 0x7) - # debug_write("_bci = %d\n" % self._bci) - # debug_write("_line = %d\n" % self._line) + debug("_bci = %d\n" % self._bci) + debug("_line = %d\n" % self._line) return True # class to provide access to data relating to a Method object @@ -639,12 +648,12 @@ if self.name == None: self.make_name(self.methodptr) return self.name - + def get_klass_path(self): if self.name == None: self.make_name(self.methodptr) return self.klass_path - + def get_line(self, bci): if bci < 0: bci = 0 @@ -676,7 +685,7 @@ sig_str = CodeCache.makestr(sig_name_length, sig_name) self.sig_str = self.make_sig_str(sig_str) self.name = self.klass_str + "." + self.method_str + self.sig_str - + def make_sig_str(self, sig): in_sym_name = False sig_str = "" @@ -734,7 +743,7 @@ # frame PC address. class OpenJDKFrameDecorator(FrameDecorator): def __init__(self, base, methodname, filename, line): - super(FrameDecorator, self).__init__() + super(FrameDecorator, self).__init__(base) self._base = base self._methodname = methodname self._filename = filename @@ -742,87 +751,89 @@ def function(self): try: - # t("OpenJDKFrameDecorator.function") + t("OpenJDKFrameDecorator.function") return self._methodname except Exception as arg: - gdb.write("!!! function oops !!! %s\n" % arg) + debug("!!! function oops !!! %s\n" % arg) return None def method_name(self): - return _methodname + return self._methodname def filename(self): try: return self._filename except Exception as arg: - gdb.write("!!! filename oops !!! %s\n" % arg) + debug("!!! filename oops !!! %s\n" % arg) return None def line(self): try: return self._line except Exception as arg: - gdb.write("!!! line oops !!! %s\n" % arg) + debug("!!! line oops !!! %s\n" % arg) return None # A frame filter for OpenJDK. class OpenJDKFrameFilter(object): def __init__(self, unwinder): self.name="OpenJDK" - self.enabled = True + self.enabled = False self.priority = 100 self.unwinder = unwinder + self.unwinder.set_filter(self) def maybe_wrap_frame(self, frame): - # t("OpenJDKFrameFilter.maybe_wrap_frame") + t("OpenJDKFrameFilter.maybe_wrap_frame") if self.unwinder is None: return [ frame ] - # t("unwindercache = self.unwinder.unwindercache") + t("unwindercache = self.unwinder.unwindercache") unwindercache = self.unwinder.unwindercache if unwindercache is None: return [ frame ] - # t("base = frame.inferior_frame()") + t("base = frame.inferior_frame()") base = frame.inferior_frame() - # t("sp = Types.as_long(base.read_register('rsp'))") + t("sp = Types.as_long(base.read_register('rsp'))") sp = base.read_register('rsp') x = Types.as_long(sp) - # debug_write("@@ get info at unwindercache[0x%x]\n" % x) + debug("@@ get info at unwindercache[0x%x]\n" % x) try: cache_entry = unwindercache[x] except Exception as arg: + debug("@@ unwindercache lookup excepted %s\n" % str(arg)) # n.b. no such entry throws an exception # just ignore and use existing frame return [ frame ] try: if cache_entry is None: - # debug_write("@@ lookup found no cache_entry\n") + debug("@@ lookup found no cache_entry\n") return [ frame ] elif cache_entry.codetype == "unknown": - # debug_write("@@ lookup found unknown cache_entry\n") + debug("@@ lookup found unknown cache_entry\n") return [ frame ] else: - # debug_write("@@ got cache_entry for blob 0x%x at unwindercache[0x%x]\n" % (cache_entry.blob, x)) + debug("@@ got cache_entry for blob 0x%x at unwindercache[0x%x]\n" % (cache_entry.blob, x)) method_info = cache_entry.method_info if method_info == None: return [ frame ] else: return method_info.decorate(frame) except Exception as arg: - gdb.write("!!! maybe_wrap_frame oops !!! %s\n" % arg) + warning("!!! maybe_wrap_frame oops !!! %s / %s\n" % (arg, traceback.format_exc())) return [ frame ] def flatten(self, list_of_lists): - return [x for y in list_of_lists for x in y ] + return iter([x for y in list_of_lists for x in y ]) def filter(self, frame_iter): # return map(self.maybe_wrap_frame, frame_iter) return self.flatten( map(self.maybe_wrap_frame, frame_iter) ) - + # A frame id class, as specified by the gdb unwinder API. class OpenJDKFrameId(object): def __init__(self, sp, pc): - # t("OpenJDKFrameId.__init__") + t("OpenJDKFrameId.__init__") self.sp = sp self.pc = pc @@ -880,12 +891,11 @@ class CompiledMethodInfo(JavaMethodInfo): def __init__(self, entry): - # t("CompiledMethodInfo.__init__") + t("CompiledMethodInfo.__init__") super(CompiledMethodInfo,self).__init__(entry) blob = self.blob - cmethod = Types.to_type(blob, Types.cmethodp_t) nmethod = Types.to_type(blob, Types.nmethodp_t) - self.methodptr = cmethod['_method'] + self.methodptr = nmethod['_method'] const_method = self.methodptr['_constMethod'] bcbase = Types.cast_bytep(const_method + 1) self.code_begin = Types.as_long(blob['_code_begin']) @@ -893,7 +903,7 @@ self.cache_method_info() # get PC to BCI translator from the nmethod self.bytecode_index_reader = MethodBCIReader(nmethod, self.method) - # t("self.method_bci_stack = self.bytecode_index_reader.pc_to_method_bci_stack(self.pc)") + t("self.method_bci_stack = self.bytecode_index_reader.pc_to_method_bci_stack(self.pc)") self.method_bci_stack = self.bytecode_index_reader.pc_to_method_bci_stack(self.pc) # subclasses need to compute their method pointer @@ -909,7 +919,7 @@ return ("[inlined] %s" % name) def make_decorator(self, frame, pair, is_outer): - # t("make_decorator") + t("make_decorator") method = pair['method'] bci = pair['bci'] methodname = self.format_method_name(method, is_outer) @@ -927,16 +937,16 @@ try: decorators = [] pairs = self.method_bci_stack - # debug_write("converting method_bci_stack = %s\n" % self.method_bci_stack) + debug("converting method_bci_stack = %s\n" % self.method_bci_stack) l = len(pairs) for i in range(l): pair = pairs[i] - # debug_write("decorating pair %s\n" % pair) + debug("decorating pair %s\n" % pair) decorator = self.make_decorator(frame, pair, i == (l - 1)) decorators.append(decorator) return decorators except Exception as arg: - gdb.write("!!! decorate oops %s !!!\n" % arg) + debug("!!! decorate oops %s / %s !!!\n" % (arg, traceback.format_exc())) return [ frame ] # info for native frame @@ -944,14 +954,11 @@ class NativeMethodInfo(JavaMethodInfo): def __init__(self, entry): - # t("NativeMethodInfo.__init__") + t("NativeMethodInfo.__init__") super(NativeMethodInfo,self).__init__(entry) blob = self.blob - cmethod = Types.to_type(blob, Types.cmethodp_t) nmethod = Types.to_type(blob, Types.nmethodp_t) - self.methodptr = cmethod['_method'] - const_method = self.methodptr['_constMethod'] - bcbase = Types.cast_bytep(const_method + 1) + self.methodptr = nmethod['_method'] self.code_begin = Types.as_long(blob['_code_begin']) # get bc and line number info from method self.cache_method_info() @@ -982,7 +989,7 @@ # bytecode immediately follows const method const_method = self.methodptr['_constMethod'] bcbase = Types.cast_bytep(const_method + 1) - # debug_write("@@ bcbase = 0x%x\n" % Types.as_long(bcbase)) + debug("@@ bcbase = 0x%x\n" % Types.as_long(bcbase)) bcp_offset = FrameConstants.interpreter_frame_bcp_offset() * 8 if bcp is None: # interpreter frames store bytecodeptr in slot 8 @@ -998,14 +1005,14 @@ bcp_addr = gdb.Value((self.bp + bcp_offset) & 0xffffffffffffffff) bcp_val = Types.cast_bytep(Types.load_ptr(bcp_addr)) self.bcoff = Types.as_long(bcp_val - bcbase) - # debug_write("@@ bcoff = 0x%x\n" % self.bcoff) + debug("@@ bcoff = 0x%x\n" % self.bcoff) # line number table immediately following bytecode bytecode_size = Types.as_int(const_method['_code_size']) self.is_native = (bytecode_size == 0) # n.b. data in compressed line_number_table block is u_char - # debug_write("bytecode_size = 0x%x\n" % bytecode_size) + debug("bytecode_size = 0x%x\n" % bytecode_size) lnbase = Types.cast_bytep(bcbase + bytecode_size) - # debug_write("lnbase = 0x%x\n" % Types.as_long(lnbase)) + debug("lnbase = 0x%x\n" % Types.as_long(lnbase)) self.line_number_reader = LineReader(lnbase) self.cache_method_info() @@ -1021,7 +1028,7 @@ def line(self): line = self.line_number_reader.bc_to_line(self.bcoff) - # debug_write("bc_to_line(%d) = %d\n" % (self.bcoff, line)) + debug("bc_to_line(%d) = %d\n" % (self.bcoff, line)) if line < 0: line = None return line @@ -1033,7 +1040,7 @@ class OpenJDKUnwinderCacheEntry(object): def __init__(self, blob, sp, pc, bp, bcp, name, codetype): - # t("OpenJDKUnwinderCacheEntry.__init__") + t("OpenJDKUnwinderCacheEntry.__init__") self.blob = blob self.sp = sp self.pc = pc @@ -1051,7 +1058,7 @@ else: self.method_info = None except Exception as arg: - gdb.write("!!! failed to cache info for %s frame [pc: 0x%x sp:0x%x bp 0x%x] !!!\n!!! %s !!!\n" % (codetype, pc, sp, bp, arg)) + debug("!!! failed to cache info for %s frame [pc: 0x%x sp:0x%x bp 0x%x] !!!\n!!! %s !!!\n" % (codetype, pc, sp, bp, arg)) self.method_info = None # an unwinder class, an instance of which can be registered with gdb @@ -1059,13 +1066,28 @@ class OpenJDKUnwinder(Unwinder): def __init__(self): - # t("OpenJDKUnwinder.__init__") + t("OpenJDKUnwinder.__init__") super(OpenJDKUnwinder, self).__init__("OpenJDKUnwinder") # blob name will be in format '0xHexDigits "AlphaNumSpaces"' self.matcher=re.compile('^0x[a-fA-F0-9]+ "(.*)"$') self.unwindercache = {} self.invocations = {} + def set_filter(self, filter): + self.filter = filter + + @property + def enabled(self): + return self._enabled + + # Intercept when the user runs `enable/disable unwinder` + @enabled.setter + def enabled(self, value): + self._enabled = value + + if self.filter and value: + self.filter.enabled = value + # the method that gets called by the pyuw_sniffer def __call__(self, pending_frame): # sometimes when we call into python gdb routines @@ -1073,39 +1095,39 @@ # up calling the frame sniffer recursively # # so use a list keyed by thread to avoid recursive calls - # t("OpenJDKUnwinder.__call__") + t("OpenJDKUnwinder.__call__") thread = gdb.selected_thread() if self.invocations.get(thread) != None: - # debug_write("!!! blocked %s !!!\n" % str(thread)) + debug("!!! blocked %s !!!\n" % str(thread)) return None try: - # debug_write("!!! blocking %s !!!\n" % str(thread)) + debug("!!! blocking %s !!!\n" % str(thread)) self.invocations[thread] = thread result = self.call_sub(pending_frame) - # debug_write("!!! unblocking %s !!!\n" % str(thread)) + debug("!!! unblocking %s !!!\n" % str(thread)) self.invocations[thread] = None return result except Exception as arg: - gdb.write("!!! __call__ oops %s !!!\n" % arg) - # debug_write("!!! unblocking %s !!!\n" % str(thread)) + debug("!!! __call__ oops %s !!!\n" % arg) + debug("!!! unblocking %s !!!\n" % str(thread)) self.invocations[thread] = None return None def call_sub(self, pending_frame): - # t("OpenJDKUnwinder.__call_sub__") - # debug_write("@@ reading pending frame registers\n") + t("OpenJDKUnwinder.__call_sub__") + debug("@@ reading pending frame registers\n") pc = pending_frame.read_register('rip') - # debug_write("@@ pc = 0x%x\n" % Types.as_long(pc)) + debug("@@ pc = 0x%x\n" % Types.as_long(pc)) sp = pending_frame.read_register('rsp') - # debug_write("@@ sp = 0x%x\n" % Types.as_long(sp)) + debug("@@ sp = 0x%x\n" % Types.as_long(sp)) bp = pending_frame.read_register('rbp') - # debug_write("@@ bp = 0x%x\n" % Types.as_long(bp)) + debug("@@ bp = 0x%x\n" % Types.as_long(bp)) try: if not CodeCache.inrange(pc): - # t("not CodeCache.inrange(0x%x)\n" % pc) + t("not CodeCache.inrange(0x%x)\n" % pc) return None except Exception as arg: - # debug_write("@@ %s\n" % arg) + debug("@@ %s\n" % arg) return None if _dump_frame: debug_write(" pc = 0x%x\n" % Types.as_long(pc)) @@ -1130,59 +1152,59 @@ # convert returned value to a python int to force a check that # the register is defined. if not this will except bcp = gdb.Value(int(bcp)) - # debug_write("@@ bcp = 0x%x\n" % Types.as_long(bcp)) + debug("@@ bcp = 0x%x\n" % Types.as_long(bcp)) except Exception as arg: - # debug_write("@@ !!! call_sub oops %s !!! \n" % arg) + debug("@@ !!! call_sub oops %s !!! \n" % arg) bcp = None - # debug_write("@@ bcp = None\n") - # t("blob = CodeCache.findblob(pc)") + debug("@@ bcp = None\n") + t("blob = CodeCache.findblob(pc)") blob = CodeCache.findblob(pc) - # t("if blob is None:") + t("if blob is None:") if blob is None: - # t("return None") + t("return None") return None # if the blob is an nmethod then we use the frame # size to identify the frame base otherwise we # use the value in rbp - # t("name = str(blob['_name'])") + t("name = str(blob['_name'])") name = str(blob['_name']) # blob name will be in format '0xHexDigits "AlphaNumSpaces"' # and we just want the bit between the quotes m = self.matcher.match(name) if not m is None: - # debug_write("@@ m.group(1) == %s\n" % m.group(1)) + debug("@@ m.group(1) == %s\n" % m.group(1)) name = m.group(1) if name == "nmethod": - # debug_write("@@ compiled %s\n" % name) + debug("@@ compiled %s\n" % name) codetype = 'compiled' # TODO -- need to check if frame is complete # i.e. if ((char *)pc - (char *)blob) > blob['_code_begin'] + blob['_frame_complete_offset'] # if not then we have not pushed a frame. # what do we do then? use SP as BP??? frame_size = blob['_frame_size'] - # debug_write("@@ frame_size = 0x%x\n" % int(frame_size)) + debug("@@ frame_size = 0x%x\n" % int(frame_size)) # n.b. frame_size includes stacked rbp and rip hence the -2 bp = sp + ((frame_size - 2) * 8) - # debug_write("@@ revised bp = 0x%x\n" % Types.as_long(bp)) + debug("@@ revised bp = 0x%x\n" % Types.as_long(bp)) elif name == "native nmethod": - # debug_write("@@ native %s \n" % name) + debug("@@ native %s \n" % name) codetype = "native" elif name == "Interpreter": - # debug_write("@@ interpreted %s\n" %name) + debug("@@ interpreted %s\n" %name) codetype = "interpreted" elif name[:4] == "Stub": - # debug_write("@@ stub %s\n" % name) + debug("@@ stub %s\n" % name) codetype = "stub" else: - # debug_write("@@ unknown %s\n" % name) + debug("@@ unknown %s\n" % name) codetype = "unknown" # cache details of the current frame x = Types.as_long(sp) - # debug_write("@@ add %s cache entry for blob 0x%x at unwindercache[0x%x]\n" % (codetype, blob, x)) + debug("@@ add %s cache entry for blob 0x%x at unwindercache[0x%x]\n" % (codetype, blob, x)) self.unwindercache[x] = OpenJDKUnwinderCacheEntry(blob, sp, pc, bp, bcp, name, codetype) - # t("next_bp = Types.load_long(bp)") + t("next_bp = Types.load_long(bp)") next_bp = Types.load_long(bp) - # t("next_pc = Types.load_long(bp + 8)") + t("next_pc = Types.load_long(bp + 8)") next_pc = Types.load_long(bp + 8) # next_sp is normally just 2 words below current bp # but for interpreted frames we need to skip locals @@ -1195,16 +1217,16 @@ sender_sp_offset = FrameConstants.sender_sp_offset() * 8 next_sp = bp + sender_sp_offset # create unwind info for this frame - # t("frameid = OpenJDKFrameId(...)") + t("frameid = OpenJDKFrameId(...)") frameid = OpenJDKFrameId(Types.to_voidp(next_sp), Types.to_type(next_pc, pc.type)) - # debug_write("@@ created frame id\n") - # t("unwind_info = pending_frame.create_unwind_info(frameid)") + debug("@@ created frame id\n") + t("unwind_info = pending_frame.create_unwind_info(frameid)") unwind_info = pending_frame.create_unwind_info(frameid) - # debug_write("@@ created unwind info\n") - # debug_write("@@ next_bp = 0x%x\n" % next_bp) - # debug_write("@@ next_pc = 0x%x\n" % next_pc) - # debug_write("@@ next_sp = 0x%x\n" % next_sp) + debug("@@ created unwind info\n") + debug("@@ next_bp = 0x%x\n" % next_bp) + debug("@@ next_pc = 0x%x\n" % next_pc) + debug("@@ next_sp = 0x%x\n" % next_sp) # we must calculate pc, sp and bp. # # for now we only add the minimum of registers that we know @@ -1216,17 +1238,23 @@ debug_write("next pc = 0x%x\n" % Types.as_long(next_pc)) debug_write("next sp = 0x%x\n" % Types.as_long(next_sp)) debug_write("next bp = 0x%x\n" % Types.as_long(next_bp)) - # t("return unwind_info") + t("return unwind_info") return unwind_info # register the unwinder globally [probably really needs to be # registered solely with libjvm.so] def register_unwinder(): - unwinder = None - if _have_unwinder: - unwinder = OpenJDKUnwinder() - gdb.unwinder.register_unwinder(None, unwinder, replace=True) - filt = OpenJDKFrameFilter(unwinder) - gdb.frame_filters[filt.name] = filt + try: + unwinder = None + if _have_unwinder: + unwinder = OpenJDKUnwinder() + gdb.unwinder.register_unwinder(None, unwinder, replace=True) + filt = OpenJDKFrameFilter(unwinder) + gdb.frame_filters[filt.name] = filt + except Exception as arg: + traceback.format_exc() + debug("!!! register_unwinder failed %s / %s !!!\n" % (arg, traceback.format_exc())) + gdb.write("Failed to register OpenJDK unwinder and frame filter: %s\n" % arg) + gdb.write("Is openjdk-*-dbg package installed?\n") register_unwinder() diff -Nru openjdk-25-25.0.2+10/debian/man/jar.1 openjdk-25-25.0.3+9/debian/man/jar.1 --- openjdk-25-25.0.2+10/debian/man/jar.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jar.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,367 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JAR" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jar \- create an archive for classes and resources, and manipulate or +restore individual classes or resources from an archive +.SH SYNOPSIS +\f[CR]jar\f[R] [\f[I]OPTION\f[R] ...] +[ [\f[CR]\-\-release\f[R] \f[I]VERSION\f[R]] [\f[CR]\-C\f[R] +\f[I]dir\f[R]] \f[I]files\f[R]] ... +.SH DESCRIPTION +The \f[CR]jar\f[R] command is a general\-purpose archiving and +compression tool, based on the ZIP and ZLIB compression formats. +Initially, the \f[CR]jar\f[R] command was designed to package Java +applets (not supported since JDK 11) or applications; however, beginning +with JDK 9, users can use the \f[CR]jar\f[R] command to create modular +JARs. +For transportation and deployment, it\[aq]s usually more convenient to +package modules as modular JARs. +.PP +The syntax for the \f[CR]jar\f[R] command resembles the syntax for the +\f[CR]tar\f[R] command. +It has several main operation modes, defined by one of the mandatory +operation arguments. +Other arguments are either options that modify the behavior of the +operation or are required to perform the operation. +.PP +When modules or the components of an application (files, images and +sounds) are combined into a single archive, they can be downloaded by a +Java agent (such as a browser) in a single HTTP transaction, rather than +requiring a new connection for each piece. +This dramatically improves download times. +The \f[CR]jar\f[R] command also compresses files, which further improves +download time. +The \f[CR]jar\f[R] command also enables individual entries in a file to +be signed so that their origin can be authenticated. +A JAR file can be used as a class path entry, whether or not it\[aq]s +compressed. +.PP +An archive becomes a modular JAR when you include a module descriptor, +\f[CR]module\-info.class\f[R], in the root of the given directories or +in the root of the \f[CR].jar\f[R] archive. +The following operations described in \f[B]Operation Modifiers Valid +Only in Create and Update Modes\f[R] are valid only when creating or +updating a modular jar or updating an existing non\-modular jar: +.IP \[bu] 2 +\f[CR]\-\-module\-version\f[R] +.IP \[bu] 2 +\f[CR]\-\-hash\-modules\f[R] +.IP \[bu] 2 +\f[CR]\-\-module\-path\f[R] +.PP +\f[B]Note:\f[R] +.PP +All mandatory or optional arguments for long options are also mandatory +or optional for any corresponding short options. +.SH MAIN OPERATION MODES +When using the \f[CR]jar\f[R] command, you must specify the operation +for it to perform. +You specify the operation mode for the \f[CR]jar\f[R] command by +including the appropriate operation arguments described in this section. +You can mix an operation argument with other one\-letter options. +Generally the operation argument is the first argument specified on the +command line. +.TP +\f[CR]\-c\f[R] or \f[CR]\-\-create\f[R] +Creates the archive. +.TP +\f[CR]\-i\f[R] \f[I]FILE\f[R] or \f[CR]\-\-generate\-index=\f[R]\f[I]FILE\f[R] +Generates index information for the specified JAR file. +This option is deprecated and may be removed in a future release. +.TP +\f[CR]\-t\f[R] or \f[CR]\-\-list\f[R] +Lists the table of contents for the archive. +.TP +\f[CR]\-u\f[R] or \f[CR]\-\-update\f[R] +Updates an existing JAR file. +.TP +\f[CR]\-x\f[R] or \f[CR]\-\-extract\f[R] +Extracts the named (or all) files from the archive. +If a file with the same name appears more than once in the archive, each +copy will be extracted, with later copies overwriting (replacing) +earlier copies unless \-k is specified. +.TP +\f[CR]\-d\f[R] or \f[CR]\-\-describe\-module\f[R] +Prints the module descriptor or automatic module name. +.TP +\f[CR]\-\-validate\f[R] +Validate the contents of the JAR file. +See \f[CR]Integrity of a JAR File\f[R] section below for more details. +.SH OPERATION MODIFIERS VALID IN ANY MODE +You can use the following options to customize the actions of any +operation mode included in the \f[CR]jar\f[R] command. +.TP +\f[CR]\-C\f[R] \f[I]DIR\f[R] +When used with the create operation mode, changes the specified +directory and includes the \f[I]files\f[R] specified at the end of the +command line. +.RS +.PP +\f[CR]jar\f[R] [\f[I]OPTION\f[R] ...] +[ [\f[CR]\-\-release\f[R] \f[I]VERSION\f[R]] [\f[CR]\-C\f[R] +\f[I]dir\f[R]] \f[I]files\f[R]] +.PP +When used with the extract operation mode, specifies the destination +directory where the JAR file will be extracted. +Unlike with the create operation mode, this option can be specified only +once with the extract operation mode. +.RE +.TP +\f[CR]\-f\f[R] \f[I]FILE\f[R] or \f[CR]\-\-file=\f[R]\f[I]FILE\f[R] +Specifies the archive file name. +.TP +\f[CR]\-\-release\f[R] \f[I]VERSION\f[R] +Creates a multirelease JAR file. +Places all files specified after the option into a versioned directory +of the JAR file named +\f[CR]META\-INF/versions/\f[R]\f[I]VERSION\f[R]\f[CR]/\f[R], where +\f[I]VERSION\f[R] must be must be a positive integer whose value is 9 or +greater. +.RS +.PP +At run time, where more than one version of a class exists in the JAR, +the JDK will use the first one it finds, searching initially in the +directory tree whose \f[I]VERSION\f[R] number matches the JDK\[aq]s +major version number. +It will then look in directories with successively lower +\f[I]VERSION\f[R] numbers, and finally look in the root of the JAR. +.RE +.TP +\f[CR]\-v\f[R] or \f[CR]\-\-verbose\f[R] +Sends or prints verbose output to standard output. +.SH OPERATION MODIFIERS VALID ONLY IN CREATE AND UPDATE MODES +You can use the following options to customize the actions of the create +and the update main operation modes: +.TP +\f[CR]\-e\f[R] \f[I]CLASSNAME\f[R] or \f[CR]\-\-main\-class=\f[R]\f[I]CLASSNAME\f[R] +Specifies the application entry point for standalone applications +bundled into a modular or executable modular JAR file. +.TP +\f[CR]\-m\f[R] \f[I]FILE\f[R] or \f[CR]\-\-manifest=\f[R]\f[I]FILE\f[R] +Includes the manifest information from the given manifest file. +.TP +\f[CR]\-M\f[R] or \f[CR]\-\-no\-manifest\f[R] +Doesn\[aq]t create a manifest file for the entries. +.TP +\f[CR]\-\-module\-version=\f[R]\f[I]VERSION\f[R] +Specifies the module version, when creating or updating a modular JAR +file, or updating a non\-modular JAR file. +.TP +\f[CR]\-\-hash\-modules=\f[R]\f[I]PATTERN\f[R] +Computes and records the hashes of modules matched by the given pattern +and that depend upon directly or indirectly on a modular JAR file being +created or a non\-modular JAR file being updated. +.TP +\f[CR]\-p\f[R] or \f[CR]\-\-module\-path\f[R] +Specifies the location of module dependence for generating the hash. +.TP +\f[CR]\[at]\f[R]\f[I]file\f[R] +Reads \f[CR]jar\f[R] options and file names from a text file as if they +were supplied on the command line +.SH OPERATION MODIFIERS VALID ONLY IN CREATE, UPDATE, AND GENERATE\-INDEX MODES +You can use the following options to customize the actions of the create +(\f[CR]\-c\f[R] or \f[CR]\-\-create\f[R]) the update (\f[CR]\-u\f[R] or +\f[CR]\-\-update\f[R] ) and the generate\-index (\f[CR]\-i\f[R] or +\f[CR]\-\-generate\-index=\f[R]\f[I]FILE\f[R]) main operation modes: +.TP +\f[CR]\-0\f[R] or \f[CR]\-\-no\-compress\f[R] +Stores without using ZIP compression. +.TP +\f[CR]\-\-date=\f[R]\f[I]TIMESTAMP\f[R] +The timestamp in ISO\-8601 extended offset date\-time with optional +time\-zone format, to use for the timestamp of the entries, e.g. +\[dq]2022\-02\-12T12:30:00\-05:00\[dq]. +.SH OPERATION MODIFIERS VALID ONLY IN EXTRACT MODE +.TP +\f[CR]\-\-dir\f[R] \f[I]DIR\f[R] +Directory into which the JAR file will be extracted. +.TP +\f[CR]\-k\f[R] or \f[CR]\-\-keep\-old\-files\f[R] +Do not overwrite existing files. +If a Jar file entry with the same name exists in the target directory, +the existing file will not be overwritten. +As a result, if a file appears more than once in an archive, later +copies will not overwrite earlier copies. +Also note that some file system can be case insensitive. +.SH OTHER OPTIONS +The following options are recognized by the \f[CR]jar\f[R] command and +not used with operation modes: +.TP +\f[CR]\-h\f[R] or \f[CR]\-\-help\f[R][\f[CR]:compat\f[R]] +Displays the command\-line help for the \f[CR]jar\f[R] command or +optionally the compatibility help. +.TP +\f[CR]\-\-help\-extra\f[R] +Displays help on extra options. +.TP +\f[CR]\-\-version\f[R] +Prints the program version. +.SH INTEGRITY OF A JAR FILE +As a JAR file is based on ZIP format, it is possible to create a JAR +file using tools other than the \f[CR]jar\f[R] command. +The \-\-validate option may be used to perform the following integrity +checks against a JAR file: +.IP \[bu] 2 +That there are no duplicate Zip entry file names +.IP \[bu] 2 +Verify that the Zip entry file name: +.RS 2 +.IP \[bu] 2 +is not an absolute path +.IP \[bu] 2 +the file name is not \[aq].\[aq] or \[aq]..\[aq] +.IP \[bu] 2 +does not contain a backslash, \[aq]\[rs]\[aq] +.IP \[bu] 2 +does not contain a drive letter +.IP \[bu] 2 +path element does not include \[aq].\[aq] or \[aq].. +.RE +.IP \[bu] 2 +The API exported by a multi\-release jar archive is consistent across +all different release versions. +.PP +The jar tool exits with a status of 0 if there were no integrity issues +encountered and >0 if an error/warning occurred. +.PP +When an integrity issue is reported, it will often require that the JAR +file is re\-created by the original source of the JAR file. +.SH EXAMPLES OF JAR COMMAND SYNTAX +.IP \[bu] 2 +Create an archive, \f[CR]classes.jar\f[R], that contains two class +files, \f[CR]Foo.class\f[R] and \f[CR]Bar.class\f[R]. +.RS 2 +.RS +.PP +\f[CR]jar \-\-create \-\-file classes.jar Foo.class Bar.class\f[R] +.RE +.RE +.IP \[bu] 2 +Create an archive, \f[CR]classes.jar\f[R], that contains two class +files, \f[CR]Foo.class\f[R] and \f[CR]Bar.class\f[R] setting the last +modified date and time to \f[CR]2021 Jan 6 12:36:00\f[R]. +.RS 2 +.RS +.PP +\f[CR]jar \-\-create \-\-date=\[dq]2021\-01\-06T14:36:00+02:00\[dq] \-\-file=classes.jar Foo.class Bar.class\f[R] +.RE +.RE +.IP \[bu] 2 +Create an archive, \f[CR]classes.jar\f[R], by using an existing +manifest, \f[CR]mymanifest\f[R], that contains all of the files in the +directory \f[CR]foo/\f[R]. +.RS 2 +.RS +.PP +\f[CR]jar \-\-create \-\-file classes.jar \-\-manifest mymanifest \-C foo/\f[R] +.RE +.RE +.IP \[bu] 2 +Create a modular JAR archive,\f[CR]foo.jar\f[R], where the module +descriptor is located in \f[CR]classes/module\-info.class\f[R]. +.RS 2 +.RS +.PP +\f[CR]jar \-\-create \-\-file foo.jar \-\-main\-class com.foo.Main \-\-module\-version 1.0 \-C foo/classes resources\f[R] +.RE +.RE +.IP \[bu] 2 +Update an existing non\-modular JAR, \f[CR]foo.jar\f[R], to a modular +JAR file. +.RS 2 +.RS +.PP +\f[CR]jar \-\-update \-\-file foo.jar \-\-main\-class com.foo.Main \-\-module\-version 1.0 \-C foo/module\-info.class\f[R] +.RE +.RE +.IP \[bu] 2 +Create a versioned or multi\-release JAR, \f[CR]foo.jar\f[R], that +places the files in the \f[CR]classes\f[R] directory at the root of the +JAR, and the files in the \f[CR]classes\-10\f[R] directory in the +\f[CR]META\-INF/versions/10\f[R] directory of the JAR. +.RS 2 +.PP +In this example, the \f[CR]classes/com/foo\f[R] directory contains two +classes, \f[CR]com.foo.Hello\f[R] (the entry point class) and +\f[CR]com.foo.NameProvider\f[R], both compiled for JDK 8. +The \f[CR]classes\-10/com/foo\f[R] directory contains a different +version of the \f[CR]com.foo.NameProvider\f[R] class, this one +containing JDK 10 specific code and compiled for JDK 10. +.PP +Given this setup, create a multirelease JAR file \f[CR]foo.jar\f[R] by +running the following command from the directory containing the +directories \f[CR]classes\f[R] and \f[CR]classes\-10\f[R] . +.RS +.PP +\f[CR]jar \-\-create \-\-file foo.jar \-\-main\-class com.foo.Hello \-C classes . \-\-release 10 \-C classes\-10 .\f[R] +.RE +.PP +The JAR file \f[CR]foo.jar\f[R] now contains: +.IP +.EX +% jar \-tf foo.jar + +META\-INF/ +META\-INF/MANIFEST.MF +com/ +com/foo/ +com/foo/Hello.class +com/foo/NameProvider.class +META\-INF/versions/10/com/ +META\-INF/versions/10/com/foo/ +META\-INF/versions/10/com/foo/NameProvider.class +.EE +.PP +As well as other information, the file \f[CR]META\-INF/MANIFEST.MF\f[R], +will contain the following lines to indicate that this is a multirelease +JAR file with an entry point of \f[CR]com.foo.Hello\f[R]. +.IP +.EX +\&... +Main\-Class: com.foo.Hello +Multi\-Release: true +.EE +.PP +Assuming that the \f[CR]com.foo.Hello\f[R] class calls a method on the +\f[CR]com.foo.NameProvider\f[R] class, running the program using JDK 10 +will ensure that the \f[CR]com.foo.NameProvider\f[R] class is the one in +\f[CR]META\-INF/versions/10/com/foo/\f[R]. +Running the program using JDK 8 will ensure that the +\f[CR]com.foo.NameProvider\f[R] class is the one at the root of the JAR, +in \f[CR]com/foo\f[R]. +.RE +.IP \[bu] 2 +Create an archive, \f[CR]my.jar\f[R], by reading options and lists of +class files from the file \f[CR]classes.list\f[R]. +.RS 2 +.PP +\f[B]Note:\f[R] +.PP +To shorten or simplify the \f[CR]jar\f[R] command, you can provide an +arg file that lists the files to include in the JAR file and pass it to +the \f[CR]jar\f[R] command with the at sign (\f[CR]\[at]\f[R]) as a +prefix. +.RS +.PP +\f[CR]jar \-\-create \-\-file my.jar \[at]classes.list\f[R] +.RE +.PP +If one or more entries in the arg file cannot be found then the jar +command fails without creating the JAR file. +.RE +.IP \[bu] 2 +Extract the JAR file \f[CR]foo.jar\f[R] to \f[CR]/tmp/bar/\f[R] +directory: +.RS 2 +.RS +.PP +\f[CR]jar \-xf foo.jar \-C /tmp/bar/\f[R] +.RE +.PP +Alternatively, you can also do: +.RS +.PP +\f[CR]jar \-\-extract \-\-file foo.jar \-\-dir /tmp/bar/\f[R] +.RE +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jarsigner.1 openjdk-25-25.0.3+9/debian/man/jarsigner.1 --- openjdk-25-25.0.2+10/debian/man/jarsigner.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jarsigner.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,1347 @@ +'\" t +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JARSIGNER" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jarsigner \- sign and verify Java Archive (JAR) files +.SH SYNOPSIS +\f[CR]jarsigner\f[R] [\f[I]options\f[R]] \f[I]jar\-file\f[R] +\f[I]alias\f[R] +.PP +\f[CR]jarsigner\f[R] \f[CR]\-verify\f[R] [\f[I]options\f[R]] +\f[I]jar\-file\f[R] [\f[I]alias\f[R] ...] +.PP +\f[CR]jarsigner\f[R] \f[CR]\-version\f[R] +.TP +\f[I]options\f[R] +The command\-line options. +See \f[B]Options for jarsigner\f[R]. +.TP +\f[CR]\-verify\f[R] +The \f[CR]\-verify\f[R] option can take zero or more keystore alias +names after the JAR file name. +When the \f[CR]\-verify\f[R] option is specified, the +\f[CR]jarsigner\f[R] command checks that the certificate used to verify +each signed entry in the JAR file matches one of the keystore aliases. +The aliases are defined in the keystore specified by +\f[CR]\-keystore\f[R] or the default keystore. +.RS +.PP +If you also specify the \f[CR]\-strict\f[R] option, and the +\f[CR]jarsigner\f[R] command detects severe warnings, the message, +\[dq]jar verified, with signer errors\[dq] is displayed. +.RE +.TP +\f[I]jar\-file\f[R] +The JAR file to be signed. +.RS +.PP +If you also specified the \f[CR]\-strict\f[R] option, and the +\f[CR]jarsigner\f[R] command detected severe warnings, the message, +\[dq]jar signed, with signer errors\[dq] is displayed. +.RE +.TP +\f[I]alias\f[R] +The aliases are defined in the keystore specified by +\f[CR]\-keystore\f[R] or the default keystore. +.TP +\f[CR]\-version\f[R] +The \f[CR]\-version\f[R] option prints the program version of +\f[CR]jarsigner\f[R]. +.SH DESCRIPTION +The \f[CR]jarsigner\f[R] tool has two purposes: +.IP \[bu] 2 +To sign Java Archive (JAR) files. +.IP \[bu] 2 +To verify the signatures and integrity of signed JAR files. +.PP +The JAR feature enables the packaging of class files, images, sounds, +and other digital data in a single file for faster and easier +distribution. +A tool named \f[CR]jar\f[R] enables developers to produce JAR files. +(Technically, any ZIP file can also be considered a JAR file, although +when created by the \f[CR]jar\f[R] command or processed by the +\f[CR]jarsigner\f[R] command, JAR files also contain a +\f[CR]META\-INF/MANIFEST.MF\f[R] file.) +.PP +A digital signature is a string of bits that is computed from some data +(the data being signed) and the private key of an entity (a person, +company, and so on). +Similar to a handwritten signature, a digital signature has many useful +characteristics: +.IP \[bu] 2 +Its authenticity can be verified by a computation that uses the public +key corresponding to the private key used to generate the signature. +.IP \[bu] 2 +It can\[aq]t be forged, assuming the private key is kept secret. +.IP \[bu] 2 +It is a function of the data signed and thus can\[aq]t be claimed to be +the signature for other data as well. +.IP \[bu] 2 +The signed data can\[aq]t be changed. +If the data is changed, then the signature can\[aq]t be verified as +authentic. +.PP +To generate an entity\[aq]s signature for a file, the entity must first +have a public/private key pair associated with it and one or more +certificates that authenticate its public key. +A certificate is a digitally signed statement from one entity that says +that the public key of another entity has a particular value. +.PP +The \f[CR]jarsigner\f[R] command uses key and certificate information +from a keystore to generate digital signatures for JAR files. +A keystore is a database of private keys and their associated X.509 +certificate chains that authenticate the corresponding public keys. +The \f[CR]keytool\f[R] command is used to create and administer +keystores. +.PP +The \f[CR]jarsigner\f[R] command uses an entity\[aq]s private key to +generate a signature. +The signed JAR file contains, among other things, a copy of the +certificate from the keystore for the public key corresponding to the +private key used to sign the file. +The \f[CR]jarsigner\f[R] command can verify the digital signature of the +signed JAR file using the certificate inside it (in its signature block +file). +.PP +The \f[CR]jarsigner\f[R] command can generate signatures that include a +time stamp that enables a systems or deployer to check whether the JAR +file was signed while the signing certificate was still valid. +.PP +In addition, APIs allow applications to obtain the timestamp +information. +.PP +At this time, the \f[CR]jarsigner\f[R] command can only sign JAR files +created by the \f[CR]jar\f[R] command or zip files. +JAR files are the same as zip files, except they also have a +\f[CR]META\-INF/MANIFEST.MF\f[R] file. +A \f[CR]META\-INF/MANIFEST.MF\f[R] file is created when the +\f[CR]jarsigner\f[R] command signs a zip file. +.PP +The default \f[CR]jarsigner\f[R] command behavior is to sign a JAR or +zip file. +Use the \f[CR]\-verify\f[R] option to verify a signed JAR file. +.PP +The \f[CR]jarsigner\f[R] command also attempts to validate the +signer\[aq]s certificate after signing or verifying. +During validation, it checks the revocation status of each certificate +in the signer\[aq]s certificate chain when the \f[CR]\-revCheck\f[R] +option is specified. +If there is a validation error or any other problem, the command +generates warning messages. +If you specify the \f[CR]\-strict\f[R] option, then the command treats +severe warnings as errors. +See \f[B]Errors and Warnings\f[R]. +.SH KEYSTORE ALIASES +All keystore entities are accessed with unique aliases. +.PP +When you use the \f[CR]jarsigner\f[R] command to sign a JAR file, you +must specify the alias for the keystore entry that contains the private +key needed to generate the signature. +If no output file is specified, it overwrites the original JAR file with +the signed JAR file. +.PP +Keystores are protected with a password, so the store password must be +specified. +You are prompted for it when you don\[aq]t specify it on the command +line. +Similarly, private keys are protected in a keystore with a password, so +the private key\[aq]s password must be specified, and you are prompted +for the password when you don\[aq]t specify it on the command line and +it isn\[aq]t the same as the store password. +.SH KEYSTORE LOCATION +The \f[CR]jarsigner\f[R] command has a \f[CR]\-keystore\f[R] option for +specifying the URL of the keystore to be used. +The keystore is by default stored in a file named \f[CR].keystore\f[R] +in the user\[aq]s home directory, as determined by the +\f[CR]user.home\f[R] system property. +.PP +\f[B]Linux and macOS:\f[R] \f[CR]user.home\f[R] defaults to the +user\[aq]s home directory. +.PP +The input stream from the \f[CR]\-keystore\f[R] option is passed to the +\f[CR]KeyStore.load\f[R] method. +If \f[CR]NONE\f[R] is specified as the URL, then a null stream is passed +to the \f[CR]KeyStore.load\f[R] method. +\f[CR]NONE\f[R] should be specified when the \f[CR]KeyStore\f[R] class +isn\[aq]t file based, for example, when it resides on a hardware token +device. +.SH KEYSTORE IMPLEMENTATION +The \f[CR]KeyStore\f[R] class provided in the \f[CR]java.security\f[R] +package supplies a number of well\-defined interfaces to access and +modify the information in a keystore. +You can have multiple different concrete implementations, where each +implementation is for a particular type of keystore. +.PP +Currently, there are two command\-line tools that use keystore +implementations (\f[CR]keytool\f[R] and \f[CR]jarsigner\f[R]). +.PP +The default keystore implementation is \f[CR]PKCS12\f[R]. +This is a cross platform keystore based on the RSA PKCS12 Personal +Information Exchange Syntax Standard. +This standard is primarily meant for storing or transporting a +user\[aq]s private keys, certificates, and miscellaneous secrets. +There is another built\-in implementation, provided by Oracle. +It implements the keystore as a file with a proprietary keystore type +(format) named \f[CR]JKS\f[R]. +It protects each private key with its individual password, and also +protects the integrity of the entire keystore with a (possibly +different) password. +.PP +Keystore implementations are provider\-based, which means the +application interfaces supplied by the \f[CR]KeyStore\f[R] class are +implemented in terms of a Service Provider Interface (SPI). +There is a corresponding abstract \f[CR]KeystoreSpi\f[R] class, also in +the \f[CR]java.security package\f[R], that defines the Service Provider +Interface methods that providers must implement. +The term provider refers to a package or a set of packages that supply a +concrete implementation of a subset of services that can be accessed by +the Java Security API. +To provide a keystore implementation, clients must implement a provider +and supply a \f[CR]KeystoreSpi\f[R] subclass implementation, as +described in \f[B]How to Implement a Provider in the Java Cryptography +Architecture\f[R] +[https://www.oracle.com/pls/topic/lookup?ctx=en/java/javase&id=security_guide_implement_provider_jca]. +.PP +Applications can choose different types of keystore implementations from +different providers, with the \f[CR]getInstance\f[R] factory method in +the \f[CR]KeyStore\f[R] class. +A keystore type defines the storage and data format of the keystore +information and the algorithms used to protect private keys in the +keystore and the integrity of the keystore itself. +Keystore implementations of different types aren\[aq]t compatible. +.PP +The \f[CR]jarsigner\f[R] commands can read file\-based keystores from +any location that can be specified using a URL. +In addition, these commands can read non\-file\-based keystores such as +those provided by MSCAPI on Windows and PKCS11 on all platforms. +.PP +For the \f[CR]jarsigner\f[R] and \f[CR]keytool\f[R] commands, you can +specify a keystore type at the command line with the +\f[CR]\-storetype\f[R] option. +.PP +If you don\[aq]t explicitly specify a keystore type, then the tools +choose a keystore implementation based on the value of the +\f[CR]keystore.type\f[R] property specified in the security properties +file. +The security properties file is called \f[CR]java.security\f[R], and it +resides in the JDK security properties directory, +\f[CR]java.home/conf/security\f[R]. +.PP +Each tool gets the \f[CR]keystore.type\f[R] value and then examines all +the installed providers until it finds one that implements keystores of +that type. +It then uses the keystore implementation from that provider. +.PP +The \f[CR]KeyStore\f[R] class defines a static method named +\f[CR]getDefaultType\f[R] that lets applications retrieve the value of +the \f[CR]keystore.type\f[R] property. +The following line of code creates an instance of the default keystore +type as specified in the \f[CR]keystore.type\f[R] property: +.RS +.PP +\f[CR]KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\f[R] +.RE +.PP +The default keystore type is \f[CR]pkcs12\f[R], which is a cross +platform keystore based on the RSA PKCS12 Personal Information Exchange +Syntax Standard. +This is specified by the following line in the security properties file: +.RS +.PP +\f[CR]keystore.type=pkcs12\f[R] +.RE +.PP +Case doesn\[aq]t matter in keystore type designations. +For example, \f[CR]JKS\f[R] is the same as \f[CR]jks\f[R]. +.PP +To have the tools utilize a keystore implementation other than the +default, you can change that line to specify a different keystore type. +For example, if you want to use the Oracle\[aq]s \f[CR]jks\f[R] keystore +implementation, then change the line to the following: +.RS +.PP +\f[CR]keystore.type=jks\f[R] +.RE +.SH SUPPORTED ALGORITHMS +By default, the \f[CR]jarsigner\f[R] command signs a JAR file using one +of the following algorithms and block file extensions depending on the +type and size of the private key: +.PP +Default Signature Algorithms and Block File Extensions +.TS +tab(@); +l l l l. +T{ +keyalg +T}@T{ +key size +T}@T{ +default sigalg +T}@T{ +block file extension +T} +_ +T{ +DSA +T}@T{ +any size +T}@T{ +SHA256withDSA +T}@T{ +\&.DSA +T} +T{ +RSA +T}@T{ +< 624 +T}@T{ +SHA256withRSA +T}@T{ +\&.RSA +T} +T{ +T}@T{ +<= 7680 +T}@T{ +SHA384withRSA +T}@T{ +T} +T{ +T}@T{ +> 7680 +T}@T{ +SHA512withRSA +T}@T{ +T} +T{ +EC +T}@T{ +< 512 +T}@T{ +SHA384withECDSA +T}@T{ +\&.EC +T} +T{ +T}@T{ +>= 512 +T}@T{ +SHA512withECDSA +T}@T{ +T} +T{ +RSASSA\-PSS +T}@T{ +< 624 +T}@T{ +RSASSA\-PSS (with SHA\-256) +T}@T{ +\&.RSA +T} +T{ +T}@T{ +<= 7680 +T}@T{ +RSASSA\-PSS (with SHA\-384) +T}@T{ +T} +T{ +T}@T{ +> 7680 +T}@T{ +RSASSA\-PSS (with SHA\-512) +T}@T{ +T} +T{ +EdDSA +T}@T{ +255 +T}@T{ +Ed25519 +T}@T{ +\&.EC +T} +T{ +T}@T{ +448 +T}@T{ +Ed448 +T}@T{ +T} +.TE +.IP \[bu] 2 +If an RSASSA\-PSS key is encoded with parameters, then jarsigner will +use the same parameters in the signature. +Otherwise, jarsigner will use parameters that are determined by the size +of the key as specified in the table above. +For example, an 3072\-bit RSASSA\-PSS key will use RSASSA\-PSS as the +signature algorithm and SHA\-384 as the hash and MGF1 algorithms. +.IP \[bu] 2 +If a key algorithm is not listed in this table, the \f[CR].DSA\f[R] +extension is used when signing a JAR file. +.PP +These default signature algorithms can be overridden by using the +\f[CR]\-sigalg\f[R] option. +.PP +The \f[CR]jarsigner\f[R] command uses the +\f[CR]jdk.jar.disabledAlgorithms\f[R] and +\f[CR]jdk.security.legacyAlgorithms\f[R] security properties to +determine which algorithms are considered a security risk. +If the JAR file was signed with any algorithms that are disabled, it +will be treated as an unsigned JAR file. +If the JAR file was signed with any legacy algorithms, it will be +treated as signed with an informational warning to inform users that the +legacy algorithm will be disabled in a future update. +For detailed verification output, include +\f[CR]\-J\-Djava.security.debug=jar\f[R]. +The \f[CR]jdk.jar.disabledAlgorithms\f[R] and +\f[CR]jdk.security.legacyAlgorithms\f[R] security properties are defined +in the \f[CR]java.security\f[R] file (located in the JDK\[aq]s +\f[CR]$JAVA_HOME/conf/security\f[R] directory). +.PP +\f[B]Note:\f[R] +.PP +In order to improve out of the box security, default key size and +signature algorithm names are periodically updated to stronger values +with each release of the JDK. +If interoperability with older releases of the JDK is important, please +make sure the defaults are supported by those releases, or alternatively +use the \f[CR]\-sigalg\f[R] option to override the default values at +your own risk. +.SH THE SIGNED JAR FILE +When the \f[CR]jarsigner\f[R] command is used to sign a JAR file, the +output signed JAR file is exactly the same as the input JAR file, except +that it has two additional files placed in the META\-INF directory: +.IP \[bu] 2 +A signature file with an \f[CR].SF\f[R] extension +.IP \[bu] 2 +A signature block file with a \f[CR].DSA\f[R], \f[CR].RSA\f[R], or +\f[CR].EC\f[R] extension +.PP +The base file names for these two files come from the value of the +\f[CR]\-sigfile\f[R] option. +For example, when the option is \f[CR]\-sigfile MKSIGN\f[R], the files +are named \f[CR]MKSIGN.SF\f[R] and \f[CR]MKSIGN.RSA\f[R]. +In this document, we assume the signer always uses an RSA key. +.PP +If no \f[CR]\-sigfile\f[R] option appears on the command line, then the +base file name for the \f[CR].SF\f[R] and the signature block files is +the first 8 characters of the alias name specified on the command line, +all converted to uppercase. +If the alias name has fewer than 8 characters, then the full alias name +is used. +If the alias name contains any characters that aren\[aq]t allowed in a +signature file name, then each such character is converted to an +underscore (_) character in forming the file name. +Valid characters include letters, digits, underscores, and hyphens. +.SH SIGNATURE FILE +A signature file (\f[CR].SF\f[R] file) looks similar to the manifest +file that is always included in a JAR file when the \f[CR]jarsigner\f[R] +command is used to sign the file. +For each source file included in the JAR file, the \f[CR].SF\f[R] file +has two lines, such as in the manifest file, that list the following: +.IP \[bu] 2 +File name +.IP \[bu] 2 +Name of the digest algorithm (SHA) +.IP \[bu] 2 +SHA digest value +.PP +\f[B]Note:\f[R] +.PP +The name of the digest algorithm (SHA) and the SHA digest value are on +the same line. +.PP +In the manifest file, the SHA digest value for each source file is the +digest (hash) of the binary data in the source file. +In the \f[CR].SF\f[R] file, the digest value for a specified source file +is the hash of the two lines in the manifest file for the source file. +.PP +The signature file, by default, includes a header with a hash of the +whole manifest file. +The header also contains a hash of the manifest header. +The presence of the header enables verification optimization. +See \f[B]JAR File Verification\f[R]. +.SH SIGNATURE BLOCK FILE +The \f[CR].SF\f[R] file is signed and the signature is placed in the +signature block file. +This file also contains, encoded inside it, the certificate or +certificate chain from the keystore that authenticates the public key +corresponding to the private key used for signing. +The file has the extension \f[CR].DSA\f[R], \f[CR].RSA\f[R], or +\f[CR].EC\f[R], depending on the key algorithm used. +See the table in \f[B]Supported Algorithms\f[R]. +.SH SIGNATURE TIME STAMP +The \f[CR]jarsigner\f[R] command used with the following options +generates and stores a signature time stamp when signing a JAR file: +.IP \[bu] 2 +\f[CR]\-tsa\f[R] \f[I]url\f[R] +.IP \[bu] 2 +\f[CR]\-tsacert\f[R] \f[I]alias\f[R] +.IP \[bu] 2 +\f[CR]\-tsapolicyid\f[R] \f[I]policyid\f[R] +.IP \[bu] 2 +\f[CR]\-tsadigestalg\f[R] \f[I]algorithm\f[R] +.PP +See \f[B]Options for jarsigner\f[R]. +.SH JAR FILE VERIFICATION +A successful JAR file verification occurs when the signatures are valid, +and none of the files that were in the JAR file when the signatures were +generated have changed since then. +JAR file verification involves the following steps: +.IP "1." 3 +Verify the signature of the \f[CR].SF\f[R] file. +.RS 4 +.PP +The verification ensures that the signature stored in each signature +block file was generated using the private key corresponding to the +public key whose certificate (or certificate chain) also appears in the +signature block file. +It also ensures that the signature is a valid signature of the +corresponding signature (\f[CR].SF\f[R]) file, and thus the +\f[CR].SF\f[R] file wasn\[aq]t tampered with. +.RE +.IP "2." 3 +Verify the digest listed in each entry in the \f[CR].SF\f[R] file with +each corresponding section in the manifest. +.RS 4 +.PP +The \f[CR].SF\f[R] file by default includes a header that contains a +hash of the entire manifest file. +When the header is present, the verification can check to see whether or +not the hash in the header matches the hash of the manifest file. +If there is a match, then verification proceeds to the next step. +.PP +If there is no match, then a less optimized verification is required to +ensure that the hash in each source file information section in the +\f[CR].SF\f[R] file equals the hash of its corresponding section in the +manifest file. +See Signature File. +.PP +One reason the hash of the manifest file that is stored in the +\f[CR].SF\f[R] file header might not equal the hash of the current +manifest file is that it might contain sections for newly added files +after the file was signed. +For example, suppose one or more files were added to the signed JAR file +(using the \f[CR]jar\f[R] tool) that already contains a signature and a +\f[CR].SF\f[R] file. +If the JAR file is signed again by a different signer, then the manifest +file is changed (sections are added to it for the new files by the +\f[CR]jarsigner\f[R] tool) and a new \f[CR].SF\f[R] file is created, but +the original \f[CR].SF\f[R] file is unchanged. +A verification is still considered successful if none of the files that +were in the JAR file when the original signature was generated have been +changed since then. +This is because the hashes in the non\-header sections of the +\f[CR].SF\f[R] file equal the hashes of the corresponding sections in +the manifest file. +.RE +.IP "3." 3 +Read each file in the JAR file that has an entry in the \f[CR].SF\f[R] +file. +While reading, compute the file\[aq]s digest and compare the result with +the digest for this file in the manifest section. +The digests should be the same or verification fails. +.RS 4 +.PP +If any serious verification failures occur during the verification +process, then the process is stopped and a security exception is thrown. +The \f[CR]jarsigner\f[R] command catches and displays the exception. +.RE +.IP "4." 3 +Check for disabled algorithm usage. +See \f[B]Supported Algorithms\f[R]. +.PP +\f[B]Note:\f[R] +.PP +You should read any addition warnings (or errors if you specified the +\f[CR]\-strict\f[R] option), as well as the content of the certificate +(by specifying the \f[CR]\-verbose\f[R] and \f[CR]\-certs\f[R] options) +to determine if the signature can be trusted. +.SH MULTIPLE SIGNATURES FOR A JAR FILE +A JAR file can be signed by multiple people by running the +\f[CR]jarsigner\f[R] command on the file multiple times and specifying +the alias for a different person each time, as follows: +.IP +.EX +jarsigner myBundle.jar susan +jarsigner myBundle.jar kevin +.EE +.PP +When a JAR file is signed multiple times, there are multiple +\f[CR].SF\f[R] and signature block files in the resulting JAR file, one +pair for each signature. +In the previous example, the output JAR file includes files with the +following names: +.IP +.EX +SUSAN.SF +SUSAN.RSA +KEVIN.SF +KEVIN.RSA +.EE +.SH OPTIONS FOR JARSIGNER +The following sections describe the options for the +\f[CR]jarsigner\f[R]. +Be aware of the following standards: +.IP \[bu] 2 +All option names are preceded by a hyphen sign (\-). +.IP \[bu] 2 +The options can be provided in any order. +.IP \[bu] 2 +Items that are in italics or underlined (option values) represent the +actual values that must be supplied. +.IP \[bu] 2 +The \f[CR]\-storepass\f[R], \f[CR]\-keypass\f[R], \f[CR]\-sigfile\f[R], +\f[CR]\-sigalg\f[R], \f[CR]\-digestalg\f[R], \f[CR]\-signedjar\f[R], and +TSA\-related options are only relevant when signing a JAR file; they +aren\[aq]t relevant when verifying a signed JAR file. +The \f[CR]\-keystore\f[R] option is relevant for signing and verifying a +JAR file. +In addition, aliases are specified when signing and verifying a JAR +file. +.TP +\f[CR]\-keystore\f[R] \f[I]url\f[R] +Specifies the URL that tells the keystore location. +This defaults to the file \f[CR].keystore\f[R] in the user\[aq]s home +directory, as determined by the \f[CR]user.home\f[R] system property. +.RS +.PP +A keystore is required when signing. +You must explicitly specify a keystore when the default keystore +doesn\[aq]t exist or if you want to use one other than the default. +.PP +A keystore isn\[aq]t required when verifying, but if one is specified or +the default exists and the \f[CR]\-verbose\f[R] option was also +specified, then additional information is output regarding whether or +not any of the certificates used to verify the JAR file are contained in +that keystore. +.PP +The \f[CR]\-keystore\f[R] argument can be a file name and path +specification rather than a URL, in which case it is treated the same as +a file: URL, for example, the following are equivalent: +.IP \[bu] 2 +\f[CR]\-keystore\f[R] \f[I]filePathAndName\f[R] +.IP \[bu] 2 +\f[CR]\-keystore file:\f[R]\f[I]filePathAndName\f[R] +.PP +If the Sun PKCS #11 provider was configured in the +\f[CR]java.security\f[R] security properties file (located in the +JDK\[aq]s \f[CR]$JAVA_HOME/conf/security\f[R] directory), then the +\f[CR]keytool\f[R] and \f[CR]jarsigner\f[R] tools can operate on the +PKCS #11 token by specifying these options: +.RS +.PP +\f[CR]\-keystore NONE \-storetype PKCS11\f[R] +.RE +.PP +For example, the following command lists the contents of the configured +PKCS#11 token: +.RS +.PP +\f[CR]keytool \-keystore NONE \-storetype PKCS11 \-list\f[R] +.RE +.RE +.TP +\f[CR]\-storepass\f[R] [\f[CR]:env\f[R] | \f[CR]:file\f[R]] \f[I]argument\f[R] +Specifies the password that is required to access the keystore. +This is only needed when signing (not verifying) a JAR file. +In that case, if a \f[CR]\-storepass\f[R] option isn\[aq]t provided at +the command line, then the user is prompted for the password. +.RS +.PP +If the modifier \f[CR]env\f[R] or \f[CR]file\f[R] isn\[aq]t specified, +then the password has the value \f[CR]argument\f[R]. +Otherwise, the password is retrieved as follows: +.IP \[bu] 2 +\f[CR]env\f[R]: Retrieve the password from the environment variable +named \f[I]argument\f[R]. +.IP \[bu] 2 +\f[CR]file\f[R]: Retrieve the password from the file named +\f[I]argument\f[R]. +.PP +\f[B]Note:\f[R] +.PP +The password shouldn\[aq]t be specified on the command line or in a +script unless it is for testing purposes, or you are on a secure system. +.RE +.TP +\f[CR]\-storetype\f[R] \f[I]storetype\f[R] +Specifies the type of keystore to be instantiated. +The default keystore type is the one that is specified as the value of +the \f[CR]keystore.type\f[R] property in the security properties file, +which is returned by the static \f[CR]getDefaultType\f[R] method in +\f[CR]java.security.KeyStore\f[R]. +.RS +.PP +The PIN for a PKCS #11 token can also be specified with the +\f[CR]\-storepass\f[R] option. +If none is specified, then the \f[CR]keytool\f[R] and +\f[CR]jarsigner\f[R] commands prompt for the token PIN. +If the token has a protected authentication path (such as a dedicated +PIN\-pad or a biometric reader), then the \f[CR]\-protected\f[R] option +must be specified and no password options can be specified. +.RE +.TP +\f[CR]\-keypass\f[R] [\f[CR]:env\f[R] | \f[CR]:file\f[R]] \f[I]argument\f[R] \f[CR]\-certchain\f[R] \f[I]file\f[R] +Specifies the password used to protect the private key of the keystore +entry addressed by the alias specified on the command line. +The password is required when using \f[CR]jarsigner\f[R] to sign a JAR +file. +If no password is provided on the command line, and the required +password is different from the store password, then the user is prompted +for it. +.RS +.PP +If the modifier \f[CR]env\f[R] or \f[CR]file\f[R] isn\[aq]t specified, +then the password has the value \f[CR]argument\f[R]. +Otherwise, the password is retrieved as follows: +.IP \[bu] 2 +\f[CR]env\f[R]: Retrieve the password from the environment variable +named \f[I]argument\f[R]. +.IP \[bu] 2 +\f[CR]file\f[R]: Retrieve the password from the file named +\f[I]argument\f[R]. +.PP +\f[B]Note:\f[R] +.PP +The password shouldn\[aq]t be specified on the command line or in a +script unless it is for testing purposes, or you are on a secure system. +.RE +.TP +\f[CR]\-certchain\f[R] \f[I]file\f[R] +Specifies the certificate chain to be used when the certificate chain +associated with the private key of the keystore entry that is addressed +by the alias specified on the command line isn\[aq]t complete. +This can happen when the keystore is located on a hardware token where +there isn\[aq]t enough capacity to hold a complete certificate chain. +The file can be a sequence of concatenated X.509 certificates, or a +single PKCS#7 formatted data block, either in binary encoding format or +in printable encoding format (also known as Base64 encoding) as defined +by \f[B]Internet RFC 1421 Certificate Encoding Standard\f[R] +[http://tools.ietf.org/html/rfc1421]. +.TP +\f[CR]\-sigfile\f[R] \f[I]file\f[R] +Specifies the base file name to be used for the generated \f[CR].SF\f[R] +and signature block files. +For example, if file is \f[CR]DUKESIGN\f[R], then the generated +\f[CR].SF\f[R] and signature block files are named +\f[CR]DUKESIGN.SF\f[R] and \f[CR]DUKESIGN.RSA\f[R], and placed in the +\f[CR]META\-INF\f[R] directory of the signed JAR file. +.RS +.PP +The characters in the file must come from the set +\f[CR]a\-zA\-Z0\-9_\-\f[R]. +Only letters, numbers, underscore, and hyphen characters are allowed. +All lowercase characters are converted to uppercase for the +\f[CR].SF\f[R] and signature block file names. +.PP +If no \f[CR]\-sigfile\f[R] option appears on the command line, then the +base file name for the \f[CR].SF\f[R] and signature block files is the +first 8 characters of the alias name specified on the command line, all +converted to upper case. +If the alias name has fewer than 8 characters, then the full alias name +is used. +If the alias name contains any characters that aren\[aq]t valid in a +signature file name, then each such character is converted to an +underscore (_) character to form the file name. +.RE +.TP +\f[CR]\-signedjar\f[R] \f[I]file\f[R] +Specifies the name of signed JAR file. +.TP +\f[CR]\-digestalg\f[R] \f[I]algorithm\f[R] +Specifies the name of the message digest algorithm to use when digesting +the entries of a JAR file. +.RS +.PP +For a list of standard message digest algorithm names, see the Java +Security Standard Algorithm Names Specification. +.PP +If this option isn\[aq]t specified, then \f[CR]SHA\-384\f[R] is used. +There must either be a statically installed provider supplying an +implementation of the specified algorithm or the user must specify one +with the \f[CR]\-addprovider\f[R] or \f[CR]\-providerClass\f[R] options; +otherwise, the command will not succeed. +.RE +.TP +\f[CR]\-sigalg\f[R] \f[I]algorithm\f[R] +Specifies the name of the signature algorithm to use to sign the JAR +file. +.RS +.PP +This algorithm must be compatible with the private key used to sign the +JAR file. +If this option isn\[aq]t specified, then use a default algorithm +matching the private key as described in the \f[B]Supported +Algorithms\f[R] section. +There must either be a statically installed provider supplying an +implementation of the specified algorithm or you must specify one with +the \f[CR]\-addprovider\f[R] or \f[CR]\-providerClass\f[R] option; +otherwise, the command doesn\[aq]t succeed. +.PP +For a list of standard signature algorithm names, see the Java Security +Standard Algorithm Names Specification. +.RE +.TP +\f[CR]\-verify\f[R] +Verifies a signed JAR file. +.TP +\f[CR]\-verbose\f[R][\f[CR]:\f[R]\f[I]suboptions\f[R]] +When the \f[CR]\-verbose\f[R] option appears on the command line, it +indicates that the \f[CR]jarsigner\f[R] use the verbose mode when +signing or verifying with the suboptions determining how much +information is shown. +This causes the , which causes \f[CR]jarsigner\f[R] to output extra +information about the progress of the JAR signing or verification. +The \f[I]suboptions\f[R] can be \f[CR]all\f[R], \f[CR]grouped\f[R], or +\f[CR]summary\f[R]. +.RS +.PP +If the \f[CR]\-certs\f[R] option is also specified, then the default +mode (or suboption \f[CR]all\f[R]) displays each entry as it is being +processed, and after that, the certificate information for each signer +of the JAR file. +.PP +If the \f[CR]\-certs\f[R] and the \f[CR]\-verbose:grouped\f[R] +suboptions are specified, then entries with the same signer info are +grouped and displayed together with their certificate information. +.PP +If \f[CR]\-certs\f[R] and the \f[CR]\-verbose:summary\f[R] suboptions +are specified, then entries with the same signer information are grouped +and displayed together with their certificate information. +.PP +Details about each entry are summarized and displayed as \f[I]one entry +(and more)\f[R]. +See \f[B]Example of Verifying a Signed JAR File\f[R] and \f[B]Example of +Verification with Certificate Information\f[R]. +.RE +.TP +\f[CR]\-certs\f[R] +If the \f[CR]\-certs\f[R] option appears on the command line with the +\f[CR]\-verify\f[R] and \f[CR]\-verbose\f[R] options, then the output +includes certificate information for each signer of the JAR file. +This information includes the name of the type of certificate (stored in +the signature block file) that certifies the signer\[aq]s public key, +and if the certificate is an X.509 certificate (an instance of the +\f[CR]java.security.cert.X509Certificate\f[R]), then the distinguished +name of the signer. +.RS +.PP +The keystore is also examined. +If no keystore value is specified on the command line, then the default +keystore file (if any) is checked. +If the public key certificate for a signer matches an entry in the +keystore, then the alias name for the keystore entry for that signer is +displayed in parentheses. +.RE +.TP +\f[CR]\-revCheck\f[R] +This option enables revocation checking of certificates when signing or +verifying a JAR file. +The \f[CR]jarsigner\f[R] command attempts to make network connections to +fetch OCSP responses and CRLs if the \f[CR]\-revCheck\f[R] option is +specified on the command line. +Note that revocation checks are not enabled unless this option is +specified. +.TP +\f[CR]\-tsa\f[R] \f[I]url\f[R] +If \f[CR]\-tsa http://example.tsa.url\f[R] appears on the command line +when signing a JAR file then a time stamp is generated for the +signature. +The URL, \f[CR]http://example.tsa.url\f[R], identifies the location of +the Time Stamping Authority (TSA) and overrides any URL found with the +\f[CR]\-tsacert\f[R] option. +The \f[CR]\-tsa\f[R] option doesn\[aq]t require the TSA public key +certificate to be present in the keystore. +.RS +.PP +To generate the time stamp, \f[CR]jarsigner\f[R] communicates with the +TSA with the Time\-Stamp Protocol (TSP) defined in RFC 3161. +When successful, the time stamp token returned by the TSA is stored with +the signature in the signature block file. +.RE +.TP +\f[CR]\-tsacert\f[R] \f[I]alias\f[R] +When \f[CR]\-tsacert\f[R] \f[I]alias\f[R] appears on the command line +when signing a JAR file, a time stamp is generated for the signature. +The alias identifies the TSA public key certificate in the keystore that +is in effect. +The entry\[aq]s certificate is examined for a Subject Information Access +extension that contains a URL identifying the location of the TSA. +.RS +.PP +The TSA public key certificate must be present in the keystore when +using the \f[CR]\-tsacert\f[R] option. +.RE +.TP +\f[CR]\-tsapolicyid\f[R] \f[I]policyid\f[R] +Specifies the object identifier (OID) that identifies the policy ID to +be sent to the TSA server. +If this option isn\[aq]t specified, no policy ID is sent and the TSA +server will choose a default policy ID. +.RS +.PP +Object identifiers are defined by X.696, which is an ITU +Telecommunication Standardization Sector (ITU\-T) standard. +These identifiers are typically period\-separated sets of non\-negative +digits like \f[CR]1.2.3.4\f[R], for example. +.RE +.TP +\f[CR]\-tsadigestalg\f[R] \f[I]algorithm\f[R] +Specifies the message digest algorithm that is used to generate the +message imprint to be sent to the TSA server. +If this option isn\[aq]t specified, SHA\-384 will be used. +.RS +.PP +See \f[B]Supported Algorithms\f[R]. +.PP +For a list of standard message digest algorithm names, see the Java +Security Standard Algorithm Names Specification. +.RE +.TP +\f[CR]\-internalsf\f[R] +In the past, the signature block file generated when a JAR file was +signed included a complete encoded copy of the \f[CR].SF\f[R] file +(signature file) also generated. +This behavior has been changed. +To reduce the overall size of the output JAR file, the signature block +file by default doesn\[aq]t contain a copy of the \f[CR].SF\f[R] file +anymore. +If \f[CR]\-internalsf\f[R] appears on the command line, then the old +behavior is utilized. +This option is useful for testing. +In practice, don\[aq]t use the \f[CR]\-internalsf\f[R] option because it +incurs higher overhead. +.TP +\f[CR]\-sectionsonly\f[R] +If the \f[CR]\-sectionsonly\f[R] option appears on the command line, +then the \f[CR].SF\f[R] file (signature file) generated when a JAR file +is signed doesn\[aq]t include a header that contains a hash of the whole +manifest file. +It contains only the information and hashes related to each individual +source file included in the JAR file. +See Signature File. +.RS +.PP +By default, this header is added, as an optimization. +When the header is present, whenever the JAR file is verified, the +verification can first check to see whether the hash in the header +matches the hash of the whole manifest file. +When there is a match, verification proceeds to the next step. +When there is no match, it is necessary to do a less optimized +verification that the hash in each source file information section in +the \f[CR].SF\f[R] file equals the hash of its corresponding section in +the manifest file. +See \f[B]JAR File Verification\f[R]. +.PP +The \f[CR]\-sectionsonly\f[R] option is primarily used for testing. +It shouldn\[aq]t be used other than for testing because using it incurs +higher overhead. +.RE +.TP +\f[CR]\-protected\f[R] +Values can be either \f[CR]true\f[R] or \f[CR]false\f[R]. +Specify \f[CR]true\f[R] when a password must be specified through a +protected authentication path such as a dedicated PIN reader. +.TP +\f[CR]\-providerName\f[R] \f[I]providerName\f[R] +If more than one provider was configured in the \f[CR]java.security\f[R] +security properties file, then you can use the \f[CR]\-providerName\f[R] +option to target a specific provider instance. +The argument to this option is the name of the provider. +.RS +.PP +For the Oracle PKCS #11 provider, \f[I]providerName\f[R] is of the form +\f[CR]SunPKCS11\-\f[R]\f[I]TokenName\f[R], where \f[I]TokenName\f[R] is +the name suffix that the provider instance has been configured with, as +detailed in the configuration attributes table. +For example, the following command lists the contents of the +\f[CR]PKCS #11\f[R] keystore provider instance with name suffix +\f[CR]SmartCard\f[R]: +.RS +.PP +\f[CR]jarsigner \-keystore NONE \-storetype PKCS11 \-providerName SunPKCS11\-SmartCard \-list\f[R] +.RE +.RE +.TP +\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerArg\f[R] \f[I]arg\f[R]] +Adds a security provider by name (such as SunPKCS11) and an optional +configure argument. +The value of the security provider is the name of a security provider +that is defined in a module. +.RS +.PP +Used with the \f[CR]\-providerArg ConfigFilePath\f[R] option, the +\f[CR]keytool\f[R] and \f[CR]jarsigner\f[R] tools install the provider +dynamically and use \f[CR]ConfigFilePath\f[R] for the path to the token +configuration file. +The following example shows a command to list a \f[CR]PKCS #11\f[R] +keystore when the Oracle PKCS #11 provider wasn\[aq]t configured in the +security properties file. +.RS +.PP +\f[CR]jarsigner \-keystore NONE \-storetype PKCS11 \-addprovider SunPKCS11 \-providerArg /mydir1/mydir2/token.config\f[R] +.RE +.RE +.TP +\f[CR]\-providerClass\f[R] \f[I]provider\-class\-name\f[R] [\f[CR]\-providerArg\f[R] \f[I]arg\f[R]] +Used to specify the name of cryptographic service provider\[aq]s master +class file when the service provider isn\[aq]t listed in the +\f[CR]java.security\f[R] security properties file. +Adds a security provider by fully\-qualified class name and an optional +configure argument. +.RS +.PP +\f[B]Note:\f[R] +.PP +The preferred way to load PKCS11 is by using modules. +See \f[CR]\-addprovider\f[R]. +.RE +.TP +\f[CR]\-providerPath\f[R] \f[I]classpath\f[R] +Used to specify the classpath for providers specified by the +\f[CR]\-providerClass\f[R] option. +Multiple paths should be separated by the system\-dependent +path\-separator character. +.TP +\f[CR]\-J\f[R]\f[I]javaoption\f[R] +Passes through the specified \f[I]javaoption\f[R] string directly to the +Java interpreter. +The \f[CR]jarsigner\f[R] command is a wrapper around the interpreter. +This option shouldn\[aq]t contain any spaces. +It is useful for adjusting the execution environment or memory usage. +For a list of possible interpreter options, type \f[CR]java \-h\f[R] or +\f[CR]java \-X\f[R] at the command line. +.TP +\f[CR]\-strict\f[R] +During the signing or verifying process, the command may issue warning +messages. +If you specify this option, the exit code of the tool reflects the +severe warning messages that this command found. +See \f[B]Errors and Warnings\f[R]. +.TP +\f[CR]\-conf\f[R] \f[I]url\f[R] +Specifies a pre\-configured options file. +Read the \f[B]keytool documentation\f[R] for details. +The property keys supported are \[dq]jarsigner.all\[dq] for all actions, +\[dq]jarsigner.sign\[dq] for signing, and \[dq]jarsigner.verify\[dq] for +verification. +\f[CR]jarsigner\f[R] arguments including the JAR file name and alias +name(s) cannot be set in this file. +.TP +\f[CR]\-version\f[R] +Prints the program version. +.SH ERRORS AND WARNINGS +During the signing or verifying process, the \f[CR]jarsigner\f[R] +command may issue various errors or warnings. +.PP +If there is a failure, the \f[CR]jarsigner\f[R] command exits with code +1. +If there is no failure, but there are one or more severe warnings, the +\f[CR]jarsigner\f[R] command exits with code 0 when the +\f[CR]\-strict\f[R] option is \f[B]not\f[R] specified, or exits with the +OR\-value of the warning codes when the \f[CR]\-strict\f[R] is +specified. +If there is only informational warnings or no warning at all, the +command always exits with code 0. +.PP +For example, if a certificate used to sign an entry is expired and has a +KeyUsage extension that doesn\[aq]t allow it to sign a file, the +\f[CR]jarsigner\f[R] command exits with code 12 (=4+8) when the +\f[CR]\-strict\f[R] option is specified. +.PP +\f[B]Note:\f[R] Exit codes are reused because only the values from 0 to +255 are legal on Linux and macOS. +.PP +The following sections describes the names, codes, and descriptions of +the errors and warnings that the \f[CR]jarsigner\f[R] command can issue. +.SH FAILURE +Reasons why the \f[CR]jarsigner\f[R] command fails include (but +aren\[aq]t limited to) a command line parsing error, the inability to +find a keypair to sign the JAR file, or the verification of a signed JAR +fails. +.TP +failure +Code 1. +The signing or verifying fails. +.SH SEVERE WARNINGS +\f[B]Note:\f[R] +.PP +Severe warnings are reported as errors if you specify the +\f[CR]\-strict\f[R] option. +.PP +Reasons why the \f[CR]jarsigner\f[R] command issues a severe warning +include the certificate used to sign the JAR file has an error or the +signed JAR file has other problems. +.TP +hasExpiredCert +Code 4. +This JAR contains entries whose signer certificate has expired. +.TP +hasExpiredTsaCert +Code 4. +The timestamp has expired. +.TP +notYetValidCert +Code 4. +This JAR contains entries whose signer certificate isn\[aq]t yet valid. +.TP +chainNotValidated +Code 4. +This JAR contains entries whose certificate chain isn\[aq]t validated. +.TP +tsaChainNotValidated +Code 64. +The timestamp is invalid. +.TP +signerSelfSigned +Code 4. +This JAR contains entries whose signer certificate is self signed. +.TP +disabledAlg +Code 4. +An algorithm used is considered a security risk and is disabled. +.TP +badKeyUsage +Code 8. +This JAR contains entries whose signer certificate\[aq]s KeyUsage +extension doesn\[aq]t allow code signing. +.TP +badExtendedKeyUsage +Code 8. +This JAR contains entries whose signer certificate\[aq]s +ExtendedKeyUsage extension doesn\[aq]t allow code signing. +.TP +badNetscapeCertType +Code 8. +This JAR contains entries whose signer certificate\[aq]s +NetscapeCertType extension doesn\[aq]t allow code signing. +.TP +hasUnsignedEntry +Code 16. +This JAR contains unsigned entries which haven\[aq]t been +integrity\-checked. +.TP +notSignedByAlias +Code 32. +This JAR contains signed entries which aren\[aq]t signed by the +specified alias(es). +.TP +aliasNotInStore +Code 32. +This JAR contains signed entries that aren\[aq]t signed by alias in this +keystore. +.TP +tsaChainNotValidated +Code 64. +This JAR contains entries whose TSA certificate chain is invalid. +.SH INFORMATIONAL WARNINGS +Informational warnings include those that aren\[aq]t errors but regarded +as bad practice. +They don\[aq]t have a code. +.TP +extraAttributesDetected +The POSIX file permissions and/or symlink attributes are detected during +signing or verifying a JAR file. +The \f[CR]jarsigner\f[R] tool preserves these attributes in the newly +signed file but warns that these attributes are unsigned and not +protected by the signature. +.TP +hasExpiringCert +This JAR contains entries whose signer certificate expires within six +months. +.TP +hasExpiringTsaCert +The timestamp will expire within one year on \f[CR]YYYY\-MM\-DD\f[R]. +.TP +hasMultipleManifests +This JAR contained multiple manifest files. +During signing, one of the files was selected, and the others were +discarded. +.TP +hasNonexistentEntries +This JAR contains signed entries for files that do not exist. +.TP +internalInconsistenciesDetected +This JAR contains internal inconsistencies detected during verification +that may result in different contents when reading via JarFile and +JarInputStream. +.TP +legacyAlg +An algorithm used is considered a security risk but not disabled. +.TP +noTimestamp +This JAR contains signatures that doesn\[aq]t include a timestamp. +Without a timestamp, users may not be able to validate this JAR file +after the signer certificate\[aq]s expiration date +(\f[CR]YYYY\-MM\-DD\f[R]) or after any future revocation date. +.SH EXAMPLE OF SIGNING A JAR FILE +Use the following command to sign \f[CR]bundle.jar\f[R] with the private +key of a user whose keystore alias is \f[CR]jane\f[R] in a keystore +named \f[CR]mystore\f[R] in the \f[CR]working\f[R] directory and name +the signed JAR file \f[CR]sbundle.jar\f[R]: +.RS +.PP +\f[CR]jarsigner \-keystore /working/mystore \-storepass\f[R] +\f[I]keystore_password\f[R] \f[CR]\-keypass\f[R] +\f[I]private_key_password\f[R] +\f[CR]\-signedjar sbundle.jar bundle.jar jane\f[R] +.RE +.PP +There is no \f[CR]\-sigfile\f[R] specified in the previous command so +the generated \f[CR].SF\f[R] and signature block files to be placed in +the signed JAR file have default names based on the alias name. +They are named \f[CR]JANE.SF\f[R] and \f[CR]JANE.RSA\f[R]. +.PP +If you want to be prompted for the store password and the private key +password, then you could shorten the previous command to the following: +.RS +.PP +\f[CR]jarsigner \-keystore /working/mystore \-signedjar sbundle.jar bundle.jar jane\f[R] +.RE +.PP +If the \f[CR]keystore\f[R] is the default \f[CR]keystore\f[R] +(\f[CR].keystore\f[R] in your home directory), then you don\[aq]t need +to specify a \f[CR]keystore\f[R], as follows: +.RS +.PP +\f[CR]jarsigner \-signedjar sbundle.jar bundle.jar jane\f[R] +.RE +.PP +If you want the signed JAR file to overwrite the input JAR file +(\f[CR]bundle.jar\f[R]), then you don\[aq]t need to specify a +\f[CR]\-signedjar\f[R] option, as follows: +.RS +.PP +\f[CR]jarsigner bundle.jar jane\f[R] +.RE +.SH EXAMPLE OF VERIFYING A SIGNED JAR FILE +To verify a signed JAR file to ensure that the signature is valid and +the JAR file wasn\[aq]t been tampered with, use a command such as the +following: +.RS +.PP +\f[CR]jarsigner \-verify ButtonDemo.jar\f[R] +.RE +.PP +When the verification is successful, \f[CR]jar verified\f[R] is +displayed. +Otherwise, an error message is displayed. +You can get more information when you use the \f[CR]\-verbose\f[R] +option. +A sample use of \f[CR]jarsigner\f[R] with the \f[CR]\-verbose\f[R] +option follows: +.IP +.EX +jarsigner \-verify \-verbose ButtonDemo.jar + +s 866 Tue Sep 12 20:08:48 EDT 2017 META\-INF/MANIFEST.MF + 825 Tue Sep 12 20:08:48 EDT 2017 META\-INF/ORACLE_C.SF + 7475 Tue Sep 12 20:08:48 EDT 2017 META\-INF/ORACLE_C.RSA + 0 Tue Sep 12 20:07:54 EDT 2017 META\-INF/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/images/ +sm 523 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo$1.class +sm 3440 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.class +sm 2346 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.jnlp +sm 172 Tue Sep 12 20:07:16 EDT 2017 components/images/left.gif +sm 235 Tue Sep 12 20:07:16 EDT 2017 components/images/middle.gif +sm 172 Tue Sep 12 20:07:16 EDT 2017 components/images/right.gif + + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore + +\- Signed by \[dq]CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US\[dq] + Digest algorithm: SHA\-256 + Signature algorithm: SHA256withRSA, 2048\-bit key + Timestamped by \[dq]CN=Symantec Time Stamping Services Signer \- G4, O=Symantec Corporation, C=US\[dq] on Tue Sep 12 20:08:49 UTC 2017 + Timestamp digest algorithm: SHA\-1 + Timestamp signature algorithm: SHA1withRSA, 2048\-bit key + +jar verified. + +The signer certificate expired on 2018\-02\-01. However, the JAR will be valid until the timestamp expires on 2020\-12\-29. +.EE +.SH EXAMPLE OF VERIFICATION WITH CERTIFICATE INFORMATION +If you specify the \f[CR]\-certs\f[R] option with the +\f[CR]\-verify\f[R] and \f[CR]\-verbose\f[R] options, then the output +includes certificate information for each signer of the JAR file. +The information includes the certificate type, the signer distinguished +name information (when it is an X.509 certificate), and in parentheses, +the keystore alias for the signer when the public key certificate in the +JAR file matches the one in a keystore entry, for example: +.IP +.EX +jarsigner \-keystore $JAVA_HOME/lib/security/cacerts \-verify \-verbose \-certs ButtonDemo.jar + +s k 866 Tue Sep 12 20:08:48 EDT 2017 META\-INF/MANIFEST.MF + + >>> Signer + X.509, CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US + [certificate is valid from 2017\-01\-30, 7:00 PM to 2018\-02\-01, 6:59 PM] + X.509, CN=Symantec Class 3 SHA256 Code Signing CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US + [certificate is valid from 2013\-12\-09, 7:00 PM to 2023\-12\-09, 6:59 PM] + X.509, CN=VeriSign Class 3 Public Primary Certification Authority \- G5, OU=\[dq](c) 2006 VeriSign, Inc. \- For authorized use only\[dq], OU=VeriSign Trust Network, O=\[dq]VeriSign, Inc.\[dq], C=US (verisignclass3g5ca [jdk]) + [trusted certificate] + >>> TSA + X.509, CN=Symantec Time Stamping Services Signer \- G4, O=Symantec Corporation, C=US + [certificate is valid from 2012\-10\-17, 8:00 PM to 2020\-12\-29, 6:59 PM] + X.509, CN=Symantec Time Stamping Services CA \- G2, O=Symantec Corporation, C=US + [certificate is valid from 2012\-12\-20, 7:00 PM to 2020\-12\-30, 6:59 PM] + + 825 Tue Sep 12 20:08:48 EDT 2017 META\-INF/ORACLE_C.SF + 7475 Tue Sep 12 20:08:48 EDT 2017 META\-INF/ORACLE_C.RSA + 0 Tue Sep 12 20:07:54 EDT 2017 META\-INF/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/ + 0 Tue Sep 12 20:07:16 EDT 2017 components/images/ +smk 523 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo$1.class + + [entry was signed on 2017\-09\-12, 4:08 PM] + >>> Signer + X.509, CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US + [certificate is valid from 2017\-01\-30, 7:00 PM to 2018\-02\-01, 6:59 PM] + X.509, CN=Symantec Class 3 SHA256 Code Signing CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US + [certificate is valid from 2013\-12\-09, 7:00 PM to 2023\-12\-09, 6:59 PM] + X.509, CN=VeriSign Class 3 Public Primary Certification Authority \- G5, OU=\[dq](c) 2006 VeriSign, Inc. \- For authorized use only\[dq], OU=VeriSign Trust Network, O=\[dq]VeriSign, Inc.\[dq], C=US (verisignclass3g5ca [jdk]) + [trusted certificate] + >>> TSA + X.509, CN=Symantec Time Stamping Services Signer \- G4, O=Symantec Corporation, C=US + [certificate is valid from 2012\-10\-17, 8:00 PM to 2020\-12\-29, 6:59 PM] + X.509, CN=Symantec Time Stamping Services CA \- G2, O=Symantec Corporation, C=US + [certificate is valid from 2012\-12\-20, 7:00 PM to 2020\-12\-30, 6:59 PM] + +smk 3440 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.class +\&... +smk 2346 Tue Sep 12 20:07:16 EDT 2017 components/ButtonDemo.jnlp +\&... +smk 172 Tue Sep 12 20:07:16 EDT 2017 components/images/left.gif +\&... +smk 235 Tue Sep 12 20:07:16 EDT 2017 components/images/middle.gif +\&... +smk 172 Tue Sep 12 20:07:16 EDT 2017 components/images/right.gif +\&... + + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore + +\- Signed by \[dq]CN=\[dq]Oracle America, Inc.\[dq], OU=Software Engineering, O=\[dq]Oracle America, Inc.\[dq], L=Redwood City, ST=California, C=US\[dq] + Digest algorithm: SHA\-256 + Signature algorithm: SHA256withRSA, 2048\-bit key + Timestamped by \[dq]CN=Symantec Time Stamping Services Signer \- G4, O=Symantec Corporation, C=US\[dq] on Tue Sep 12 20:08:49 UTC 2017 + Timestamp digest algorithm: SHA\-1 + Timestamp signature algorithm: SHA1withRSA, 2048\-bit key + +jar verified. + +The signer certificate expired on 2018\-02\-01. However, the JAR will be valid until the timestamp expires on 2020\-12\-29. +.EE +.PP +If the certificate for a signer isn\[aq]t an X.509 certificate, then +there is no distinguished name information. +In that case, just the certificate type and the alias are shown. +For example, if the certificate is a PGP certificate, and the alias is +\f[CR]bob\f[R], then you would get: \f[CR]PGP, (bob)\f[R]. diff -Nru openjdk-25-25.0.2+10/debian/man/java.1 openjdk-25-25.0.3+9/debian/man/java.1 --- openjdk-25-25.0.2+10/debian/man/java.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/java.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,5590 @@ +'\" t +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JAVA" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +java \- launch a Java application +.SH SYNOPSIS +To launch a class file: +.PP +\f[CR]java\f[R] [\f[I]options\f[R]] \f[I]mainclass\f[R] [\f[I]args\f[R] +\&...] +.PP +To launch the main class in a JAR file: +.PP +\f[CR]java\f[R] [\f[I]options\f[R]] \f[CR]\-jar\f[R] \f[I]jarfile\f[R] +[\f[I]args\f[R] ...] +.PP +To launch the main class in a module: +.PP +\f[CR]java\f[R] [\f[I]options\f[R]] \f[CR]\-m\f[R] +\f[I]module\f[R][\f[CR]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...] +.PP +or +.PP +\f[CR]java\f[R] [\f[I]options\f[R]] \f[CR]\-\-module\f[R] +\f[I]module\f[R][\f[CR]/\f[R]\f[I]mainclass\f[R]] [\f[I]args\f[R] ...] +.PP +To launch a source\-file program: +.PP +\f[CR]java\f[R] [\f[I]options\f[R]] \f[I]source\-file\f[R] +[\f[I]args\f[R] ...] +.TP +\f[I]options\f[R] +Optional: Specifies command\-line options separated by spaces. +See \f[B]Overview of Java Options\f[R] for a description of available +options. +.TP +\f[I]mainclass\f[R] +Specifies the name of the class to be launched. +Command\-line entries following \f[CR]classname\f[R] are the arguments +for the main method. +.TP +\f[CR]\-jar\f[R] \f[I]jarfile\f[R] +Executes a program encapsulated in a JAR file. +The \f[I]jarfile\f[R] argument is the name of a JAR file with a manifest +that contains a line in the form +\f[CR]Main\-Class:\f[R]\f[I]classname\f[R] that defines the class with +the \f[CR]public static void main(String[] args)\f[R] method that serves +as your application\[aq]s starting point. +When you use \f[CR]\-jar\f[R], the specified JAR file is the source of +all user classes, and other class path settings are ignored. +If you\[aq]re using JAR files, then see \f[B]jar\f[R]. +.TP +\f[CR]\-m\f[R] or \f[CR]\-\-module\f[R] \f[I]module\f[R][\f[CR]/\f[R]\f[I]mainclass\f[R]] +Executes the main class in a module specified by \f[I]mainclass\f[R] if +it is given, or, if it is not given, the value in the \f[I]module\f[R]. +In other words, \f[I]mainclass\f[R] can be used when it is not specified +by the module, or to override the value when it is specified. +.RS +.PP +See \f[B]Standard Options for Java\f[R]. +.RE +.TP +\f[I]source\-file\f[R] +Only used to launch a source\-file program. +Specifies the source file that contains the main class when using +source\-file mode. +See \f[B]Using Source\-File Mode to Launch Source\-Code Programs\f[R] +.TP +\f[I]args\f[R] ... +Optional: Arguments following \f[I]mainclass\f[R], +\f[I]source\-file\f[R], \f[CR]\-jar\f[R] \f[I]jarfile\f[R], and +\f[CR]\-m\f[R] or \f[CR]\-\-module\f[R] +\f[I]module\f[R]\f[CR]/\f[R]\f[I]mainclass\f[R] are passed as arguments +to the main class. +.SH DESCRIPTION +The \f[CR]java\f[R] command starts a Java application. +It does this by starting the Java Virtual Machine (JVM), loading the +specified class, and calling that class\[aq]s \f[CR]main()\f[R] method. +The method must be declared \f[CR]public\f[R] and \f[CR]static\f[R], it +must not return any value, and it must accept a \f[CR]String\f[R] array +as a parameter. +The method declaration has the following form: +.RS +.PP +\f[CR]public static void main(String[] args)\f[R] +.RE +.PP +In source\-file mode, the \f[CR]java\f[R] command can launch a class +declared in a source file. +See \f[B]Using Source\-File Mode to Launch Source\-Code Programs\f[R] +for a description of using the source\-file mode. +.RS +.PP +\f[B]Note:\f[R] You can use the \f[CR]JDK_JAVA_OPTIONS\f[R] launcher +environment variable to prepend its content to the actual command line +of the \f[CR]java\f[R] launcher. +See \f[B]Using the JDK_JAVA_OPTIONS Launcher Environment Variable\f[R]. +.RE +.PP +By default, the first argument that isn\[aq]t an option of the +\f[CR]java\f[R] command is the fully qualified name of the class to be +called. +If \f[CR]\-jar\f[R] is specified, then its argument is the name of the +JAR file containing class and resource files for the application. +The startup class must be indicated by the \f[CR]Main\-Class\f[R] +manifest header in its manifest file. +.PP +Arguments after the class file name or the JAR file name are passed to +the \f[CR]main()\f[R] method. +.SS \f[CR]javaw\f[R] +\f[B]Windows:\f[R] The \f[CR]javaw\f[R] command is identical to +\f[CR]java\f[R], except that with \f[CR]javaw\f[R] there\[aq]s no +associated console window. +Use \f[CR]javaw\f[R] when you don\[aq]t want a command prompt window to +appear. +The \f[CR]javaw\f[R] launcher will, however, display a dialog box with +error information if a launch fails. +.SH USING SOURCE\-FILE MODE TO LAUNCH SOURCE\-CODE PROGRAMS +To launch a class declared in a source file, run the \f[CR]java\f[R] +launcher in source\-file mode. +Entering source\-file mode is determined by two items on the +\f[CR]java\f[R] command line: +.IP \[bu] 2 +The first item on the command line that is not an option or part of an +option. +In other words, the item in the command line that would otherwise be the +main class name. +.IP \[bu] 2 +The \f[CR]\-\-source\f[R] \f[I]version\f[R] option, if present. +.PP +If the class identifies an existing file that has a \f[CR].java\f[R] +extension, or if the \f[CR]\-\-source\f[R] option is specified, then +source\-file mode is selected. +The source file is then compiled and run. +The \f[CR]\-\-source\f[R] option can be used to specify the source +\f[I]version\f[R] or \f[I]N\f[R] of the source code. +This determines the API that can be used. +When you set \f[CR]\-\-source\f[R] \f[I]N\f[R], you can only use the +public API that was defined in JDK \f[I]N\f[R]. +.RS +.PP +\f[B]Note:\f[R] The valid values of \f[I]N\f[R] change for each release, +with new values added and old values removed. +You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that +is no longer supported. +The supported values of \f[I]N\f[R] are the current Java SE release +(\f[CR]25\f[R]) and a limited number of previous releases, detailed in +the command\-line help for \f[CR]javac\f[R], under the +\f[CR]\-\-source\f[R] and \f[CR]\-\-release\f[R] options. +.RE +.PP +If the file does not have the \f[CR].java\f[R] extension, the +\f[CR]\-\-source\f[R] option must be used to tell the \f[CR]java\f[R] +command to use the source\-file mode. +The \f[CR]\-\-source\f[R] option is used for cases when the source file +is a \[dq]script\[dq] to be executed and the name of the source file +does not follow the normal naming conventions for Java source files. +.PP +In source\-file mode, the effect is as though the source file is +compiled into memory, and the first class found in the source file is +executed. +Any arguments placed after the name of the source file in the original +command line are passed to the compiled class when it is executed. +.PP +For example, if a file were named \f[CR]HelloWorld.java\f[R] and +contained a class named \f[CR]HelloWorld\f[R], then the source\-file +mode command to launch the class would be: +.RS +.PP +\f[CR]java HelloWorld.java\f[R] +.RE +.PP +This use of source\-file mode is informally equivalent to using the +following two commands: +.IP +.EX +javac \-d \-\-source\-path HelloWorld.java +java \-\-class\-path HelloWorld +.EE +.PP +where \f[CR]\f[R] is computed +.PP +\f[B]In source\-file mode, any additional command\-line options are +processed as follows:\f[R] +.IP \[bu] 2 +The launcher scans the options specified before the source file for any +that are relevant in order to compile the source file. +.RS 2 +.PP +This includes: \f[CR]\-\-class\-path\f[R], \f[CR]\-\-module\-path\f[R], +\f[CR]\-\-add\-exports\f[R], \f[CR]\-\-add\-modules\f[R], +\f[CR]\-\-limit\-modules\f[R], \f[CR]\-\-patch\-module\f[R], +\f[CR]\-\-upgrade\-module\-path\f[R], and any variant forms of those +options. +It also includes the new \f[CR]\-\-enable\-preview\f[R] option, +described in JEP 12. +.RE +.IP \[bu] 2 +No provision is made to pass any additional options to the compiler, +such as \f[CR]\-processor\f[R] or \f[CR]\-Werror\f[R]. +.IP \[bu] 2 +Command\-line argument files (\f[CR]\[at]\f[R]\-files) may be used in +the standard way. +Long lists of arguments for either the VM or the program being invoked +may be placed in files specified on the command\-line by prefixing the +filename with an \f[CR]\[at]\f[R] character. +.PP +\f[B]In source\-file mode, compilation proceeds as follows:\f[R] +.IP \[bu] 2 +Any command\-line options that are relevant to the compilation +environment are taken into account. +These include: +\f[CR]\-\-class\-path\f[R]/\f[CR]\-classpath\f[R]/\f[CR]\-cp\f[R], +\f[CR]\-\-module\-path\f[R]/\f[CR]\-p\f[R], \f[CR]\-\-add\-exports\f[R], +\f[CR]\-\-add\-modules\f[R], \f[CR]\-\-limit\-modules\f[R], +\f[CR]\-\-patch\-module\f[R], \f[CR]\-\-upgrade\-module\-path\f[R], +\f[CR]\-\-enable\-preview\f[R]. +.IP \[bu] 2 +The root of the source tree, \f[CR]\f[R] is computed from +the package of the class being launched. +For example, if \f[CR]HelloWorld.java\f[R] declared its classes to be in +the \f[CR]hello\f[R] package, then the file \f[CR]HelloWorld.java\f[R] +is expected to reside in the directory \f[CR]somedir/hello/\f[R]. +In this case, \f[CR]somedir\f[R] is computed to be the root of the +source tree. +.IP \[bu] 2 +The root of the source tree serves as the source\-path for compilation, +so that other source files found in that tree and are needed by +\f[CR]HelloWorld\f[R] could be compiled. +.IP \[bu] 2 +Annotation processing is disabled, as if \f[CR]\-proc:none\f[R] is in +effect. +.IP \[bu] 2 +If a version is specified, via the \f[CR]\-\-source\f[R] option, the +value is used as the argument for an implicit \f[CR]\-\-release\f[R] +option for the compilation. +This sets both the source version accepted by compiler and the system +API that may be used by the code in the source file. +.IP \[bu] 2 +If \f[CR]\-\-enable\-preview\f[R] is specified, the +\f[CR]\-\-source N\f[R] arguments can be omitted. +If the Java runtime version is \f[CR]N\f[R], then +\f[CR]\-\-release N\f[R] is implied when compiling source files. +.IP \[bu] 2 +If a \f[CR]module\-info.java\f[R] file exists in the +\f[CR]\f[R] directory, its module declaration is used to +define a named module that will contain all the classes compiled from +\f[CR].java\f[R] files in the source tree. +If \f[CR]module\-info.java\f[R] does not exist, all the classes compiled +from source files will be compiled in the context of the unnamed module. +.IP \[bu] 2 +The source file that is launched should contain one or more top\-level +classes, the first of which is taken as the class to be executed. +.IP \[bu] 2 +For the source file that is launched, the compiler does not enforce the +optional restriction defined at the end of JLS 7.6, that a type in a +named package should exist in a file whose name is composed from the +type name followed by the \f[CR].java\f[R] extension. +.IP \[bu] 2 +If a source file contains errors, appropriate error messages are written +to the standard error stream, and the launcher exits with a non\-zero +exit code. +.PP +\f[B]In source\-file mode, execution proceeds as follows:\f[R] +.IP \[bu] 2 +The class to be executed is the first top\-level class found in the +source file. +It must contain a declaration of an entry \f[CR]main\f[R] method. +.IP \[bu] 2 +The compiled classes are loaded by a custom class loader, that delegates +to the application class loader. +This implies that classes appearing on the application class path cannot +refer to any classes declared in source files. +.IP \[bu] 2 +If a \f[CR]module\-info.java\f[R] file exists in the +\f[CR]\f[R] directory, then all the classes compiled from +\f[CR].java\f[R] files in the source tree will be in that module, which +will serve as the root module for the execution of the program. +If \f[CR]module\-info.java\f[R] does not exist, the compiled classes are +executed in the context of an unnamed module, as though +\f[CR]\-\-add\-modules=ALL\-DEFAULT\f[R] is in effect. +This is in addition to any other \f[CR]\-\-add\-module\f[R] options that +may be have been specified on the command line. +.IP \[bu] 2 +Any arguments appearing after the name of the file on the command line +are passed to the main method in the obvious way. +.IP \[bu] 2 +It is an error if there is a class on the application class path whose +name is the same as that of the class to be executed. +.PP +See \f[B]JEP 458: Launch Multi\-File Source\-Code Programs\f[R] +[https://openjdk.org/jeps/458] for complete details. +.SH USING THE JDK_JAVA_OPTIONS LAUNCHER ENVIRONMENT VARIABLE +\f[CR]JDK_JAVA_OPTIONS\f[R] prepends its content to the options parsed +from the command line. +The content of the \f[CR]JDK_JAVA_OPTIONS\f[R] environment variable is a +list of arguments separated by white\-space characters (as determined by +\f[CR]isspace()\f[R]). +These are prepended to the command line arguments passed to +\f[CR]java\f[R] launcher. +The encoding requirement for the environment variable is the same as the +\f[CR]java\f[R] command line on the system. +\f[CR]JDK_JAVA_OPTIONS\f[R] environment variable content is treated in +the same manner as that specified in the command line. +.PP +Single (\f[CR]\[aq]\f[R]) or double (\f[CR]\[dq]\f[R]) quotes can be +used to enclose arguments that contain whitespace characters. +All content between the open quote and the first matching close quote +are preserved by simply removing the pair of quotes. +In case a matching quote is not found, the launcher will abort with an +error message. +\f[CR]\[at]\f[R]\-files are supported as they are specified in the +command line. +Any wildcard literal \f[CR]*\f[R] in the \f[CR]JDK_JAVA_OPTIONS\f[R] +environment variable content isn\[aq]t expanded and is passed as\-is to +the starting VM. +In order to mitigate potential misuse of \f[CR]JDK_JAVA_OPTIONS\f[R] +behavior, options that specify the main class (such as \f[CR]\-jar\f[R]) +or cause the \f[CR]java\f[R] launcher to exit without executing the main +class (such as \f[CR]\-h\f[R]) are disallowed in the environment +variable. +If any of these options appear in the environment variable, the launcher +will abort with an error message. +When \f[CR]JDK_JAVA_OPTIONS\f[R] is set, the launcher prints a message +to stderr as a reminder. +.PP +\f[B]Example:\f[R] +.IP +.EX +$ export JDK_JAVA_OPTIONS=\[aq]\-g \[at]file1 \-Dprop=value \[at]file2 \-Dws.prop=\[dq]white spaces\[dq]\[aq] +$ java \-Xint \[at]file3 +.EE +.PP +is equivalent to the command line: +.IP +.EX +java \-g \[at]file1 \-Dprop=value \[at]file2 \-Dws.prop=\[dq]white spaces\[dq] \-Xint \[at]file3 +.EE +.SH OVERVIEW OF JAVA OPTIONS +The \f[CR]java\f[R] command supports a wide range of options in the +following categories: +.IP \[bu] 2 +\f[B]Standard Options for Java\f[R]: Options guaranteed to be supported +by all implementations of the Java Virtual Machine (JVM). +They\[aq]re used for common actions, such as checking the version of the +JRE, setting the class path, enabling verbose output, and so on. +.IP \[bu] 2 +\f[B]Extra Options for Java\f[R]: General purpose options that are +specific to the Java HotSpot Virtual Machine. +They aren\[aq]t guaranteed to be supported by all JVM implementations, +and are subject to change. +These options start with \f[CR]\-X\f[R]. +.PP +The advanced options aren\[aq]t recommended for casual use. +These are developer options used for tuning specific areas of the Java +HotSpot Virtual Machine operation that often have specific system +requirements and may require privileged access to system configuration +parameters. +Several examples of performance tuning are provided in \f[B]Performance +Tuning Examples\f[R]. +These options aren\[aq]t guaranteed to be supported by all JVM +implementations and are subject to change. +Advanced options start with \f[CR]\-XX\f[R]. +.IP \[bu] 2 +\f[B]Advanced Runtime Options for Java\f[R]: Control the runtime +behavior of the Java HotSpot VM. +.IP \[bu] 2 +\f[B]Advanced JIT Compiler Options for java\f[R]: Control the dynamic +just\-in\-time (JIT) compilation performed by the Java HotSpot VM. +.IP \[bu] 2 +\f[B]Advanced Serviceability Options for Java\f[R]: Enable gathering +system information and performing extensive debugging. +.IP \[bu] 2 +\f[B]Advanced Garbage Collection Options for Java\f[R]: Control how +garbage collection (GC) is performed by the Java HotSpot +.PP +Boolean options are used to either enable a feature that\[aq]s disabled +by default or disable a feature that\[aq]s enabled by default. +Such options don\[aq]t require a parameter. +Boolean \f[CR]\-XX\f[R] options are enabled using the plus sign +(\f[CR]\-XX:+\f[R]\f[I]OptionName\f[R]) and disabled using the minus +sign (\f[CR]\-XX:\-\f[R]\f[I]OptionName\f[R]). +.PP +For options that require an argument, the argument may be separated from +the option name by a space, a colon (:), or an equal sign (=), or the +argument may directly follow the option (the exact syntax differs for +each option). +If you\[aq]re expected to specify the size in bytes, then you can use no +suffix, or use the suffix \f[CR]k\f[R] or \f[CR]K\f[R] for kilobytes +(KB), \f[CR]m\f[R] or \f[CR]M\f[R] for megabytes (MB), or \f[CR]g\f[R] +or \f[CR]G\f[R] for gigabytes (GB). +For example, to set the size to 8 GB, you can specify either +\f[CR]8g\f[R], \f[CR]8192m\f[R], \f[CR]8388608k\f[R], or +\f[CR]8589934592\f[R] as the argument. +If you are expected to specify the percentage, then use a number from 0 +to 1. +For example, specify \f[CR]0.25\f[R] for 25%. +.PP +The following sections describe the options that are deprecated, +obsolete, and removed: +.IP \[bu] 2 +\f[B]Deprecated Java Options\f[R]: Accepted and acted upon \-\-\- a +warning is issued when they\[aq]re used. +.IP \[bu] 2 +\f[B]Obsolete Java Options\f[R]: Accepted but ignored \-\-\- a warning +is issued when they\[aq]re used. +.IP \[bu] 2 +\f[B]Removed Java Options\f[R]: Removed \-\-\- using them results in an +error. +.SH STANDARD OPTIONS FOR JAVA +These are the most commonly used options supported by all +implementations of the JVM. +.RS +.PP +\f[B]Note:\f[R] To specify an argument for a long option, you can use +either \f[CR]\-\-\f[R]\f[I]name\f[R]\f[CR]=\f[R]\f[I]value\f[R] or +\f[CR]\-\-\f[R]\f[I]name\f[R] \f[I]value\f[R]. +.RE +.TP +\f[CR]\-agentlib:\f[R]\f[I]libname\f[R][\f[CR]=\f[R]\f[I]options\f[R]] +Loads the specified native agent library. +After the library name, a comma\-separated list of options specific to +the library can be used. +If the option \f[CR]\-agentlib:foo\f[R] is specified, then the JVM +attempts to load the library named \f[CR]foo\f[R] using the platform +specific naming conventions and locations: +.RS +.IP \[bu] 2 +\f[B]Linux and other POSIX\-like platforms:\f[R] The JVM attempts to +load the library named \f[CR]libfoo.so\f[R] in the location specified by +the \f[CR]LD_LIBRARY_PATH\f[R] system variable. +.IP \[bu] 2 +\f[B]macOS:\f[R] The JVM attempts to load the library named +\f[CR]libfoo.dylib\f[R] in the location specified by the +\f[CR]DYLD_LIBRARY_PATH\f[R] system variable. +.IP \[bu] 2 +\f[B]Windows:\f[R] The JVM attempts to load the library named +\f[CR]foo.dll\f[R] in the location specified by the \f[CR]PATH\f[R] +system variable. +.RS 2 +.PP +The following example shows how to load the Java Debug Wire Protocol +(JDWP) library and listen for the socket connection on port 8000, +suspending the JVM before the main class loads: +.RS +.PP +\f[CR]\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\f[R] +.RE +.RE +.RE +.TP +\f[CR]\-agentpath:\f[R]\f[I]pathname\f[R][\f[CR]=\f[R]\f[I]options\f[R]] +Loads the native agent library specified by the absolute path name. +This option is equivalent to \f[CR]\-agentlib\f[R] but uses the full +path and file name of the library. +.TP +\f[CR]\-\-class\-path\f[R] \f[I]classpath\f[R], \f[CR]\-classpath\f[R] \f[I]classpath\f[R], or \f[CR]\-cp\f[R] \f[I]classpath\f[R] +Specifies a list of directories, JAR files, and ZIP archives to search +for class files. +.RS +.PP +On Windows, semicolons (\f[CR];\f[R]) separate entities in this list; on +other platforms it is a colon (\f[CR]:\f[R]). +.PP +Specifying \f[I]classpath\f[R] overrides any setting of the +\f[CR]CLASSPATH\f[R] environment variable. +If the class path option isn\[aq]t used and \f[I]classpath\f[R] +isn\[aq]t set, then the user class path consists of the current +directory (.). +.PP +As a special convenience, a class path element that contains a base name +of an asterisk (*) is considered equivalent to specifying a list of all +the files in the directory with the extension \f[CR].jar\f[R] or +\f[CR].JAR\f[R] . +A Java program can\[aq]t tell the difference between the two +invocations. +For example, if the directory mydir contains \f[CR]a.jar\f[R] and +\f[CR]b.JAR\f[R], then the class path element mydir/* is expanded to +\f[CR]A.jar:b.JAR\f[R], except that the order of JAR files is +unspecified. +All \f[CR].jar\f[R] files in the specified directory, even hidden ones, +are included in the list. +A class path entry consisting of an asterisk (*) expands to a list of +all the jar files in the current directory. +The \f[CR]CLASSPATH\f[R] environment variable, where defined, is +similarly expanded. +Any class path wildcard expansion that occurs before the Java VM is +started. +Java programs never see wildcards that aren\[aq]t expanded except by +querying the environment, such as by calling +\f[CR]System.getenv(\[dq]CLASSPATH\[dq])\f[R]. +.RE +.TP +\f[CR]\-\-disable\-\[at]files\f[R] +Can be used anywhere on the command line, including in an argument file, +to prevent further \f[CR]\[at]filename\f[R] expansion. +This option stops expanding \f[CR]\[at]\f[R]\-argfiles after the option. +.TP +\f[CR]\-\-enable\-preview\f[R] +Allows classes to depend on \f[B]preview features\f[R] +[https://docs.oracle.com/en/java/javase/12/language/index.html#JSLAN\-GUID\-5A82FE0E\-0CA4\-4F1F\-B075\-564874FE2823] +of the release. +.TP +\f[CR]\-\-enable\-native\-access\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Native access involves access to code or data outside the Java runtime. +This is generally unsafe and, if done incorrectly, might crash the JVM +or result in memory corruption. +Native access can occur as a result of calling a method that is either +\f[B]restricted\f[R] [https://openjdk.org/jeps/454#Safety], or +\f[CR]native\f[R]. +This option allows code in the specified modules to perform native +access. +Native access occurring in a module that has not been explicitly enabled +is deemed \f[I]illegal\f[R]. +.RS +.PP +\f[I]module\f[R] can be a module name, or \f[CR]ALL\-UNNAMED\f[R] to +indicate code on the class path. +.RE +.TP +\-\f[CR]\-\-illegal\-native\-access=\f[R]\f[I]parameter\f[R] +This option specifies a mode for how illegal native access is handled: +.RS +.RS +.PP +\f[B]Note:\f[R] This option will be removed in a future release. +.RE +.IP \[bu] 2 +\f[CR]allow\f[R]: This mode allows illegal native access in all modules, +without any warings. +.IP \[bu] 2 +\f[CR]warn\f[R]: This mode is identical to \f[CR]allow\f[R] except that +a warning message is issued for the first illegal native access found in +a module. +This mode is the default for the current JDK but will change in a future +release. +.IP \[bu] 2 +\f[CR]deny\f[R]: This mode disables illegal native access. +That is, any illegal native access causes an +\f[CR]IllegalCallerException\f[R]. +This mode will become the default in a future release. +.PP +To verify that your application is ready for a future version of the +JDK, run it with \f[CR]\-\-illegal\-native\-access=deny\f[R] along with +any necessary \f[CR]\-\-enable\-native\-access\f[R] options. +.RE +.TP +\f[CR]\-\-finalization=\f[R]\f[I]value\f[R] +Controls whether the JVM performs finalization of objects. +Valid values are \[dq]enabled\[dq] and \[dq]disabled\[dq]. +Finalization is enabled by default, so the value \[dq]enabled\[dq] does +nothing. +The value \[dq]disabled\[dq] disables finalization, so that no +finalizers are invoked. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]modulepath\f[R]... or \f[CR]\-p\f[R] \f[I]modulepath\f[R] +Specifies where to find application modules with a list of path +elements. +The elements of a module path can be a file path to a module or a +directory containing modules. +Each module is either a modular JAR or an exploded\-module directory. +.RS +.PP +On Windows, semicolons (\f[CR];\f[R]) separate path elements in this +list; on other platforms it is a colon (\f[CR]:\f[R]). +.RE +.TP +\f[CR]\-\-upgrade\-module\-path\f[R] \f[I]modulepath\f[R]... +Specifies where to find module replacements of upgradeable modules in +the runtime image with a list of path elements. +The elements of a module path can be a file path to a module or a +directory containing modules. +Each module is either a modular JAR or an exploded\-module directory. +.RS +.PP +On Windows, semicolons (\f[CR];\f[R]) separate path elements in this +list; on other platforms it is a colon (\f[CR]:\f[R]). +.RE +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Specifies the root modules to resolve in addition to the initial module. +\f[I]module\f[R] can also be \f[CR]ALL\-DEFAULT\f[R], +\f[CR]ALL\-SYSTEM\f[R], and \f[CR]ALL\-MODULE\-PATH\f[R]. +.TP +\f[CR]\-\-list\-modules\f[R] +Lists the observable modules and then exits. +.TP +\f[CR]\-d\f[R] \f[I]module_name\f[R] or \f[CR]\-\-describe\-module\f[R] \f[I]module_name\f[R] +Describes a specified module and then exits. +.TP +\f[CR]\-\-dry\-run\f[R] +Creates the VM but doesn\[aq]t execute the main method. +This \f[CR]\-\-dry\-run\f[R] option might be useful for validating the +command\-line options such as the module system configuration. +.TP +\f[CR]\-\-validate\-modules\f[R] +Validates all modules and exit. +This option is helpful for finding conflicts and other errors with +modules on the module path. +.TP +\f[CR]\-D\f[R]\f[I]property\f[R]\f[CR]=\f[R]\f[I]value\f[R] +Sets a system property value. +The \f[I]property\f[R] variable is a string with no spaces that +represents the name of the property. +The \f[I]value\f[R] variable is a string that represents the value of +the property. +If \f[I]value\f[R] is a string with spaces, then enclose it in quotation +marks (for example \f[CR]\-Dfoo=\[dq]foo bar\[dq]\f[R]). +.TP +\f[CR]\-disableassertions\f[R][\f[CR]:\f[R][\f[I]packagename\f[R]]...|\f[CR]:\f[R]\f[I]classname\f[R]] or \f[CR]\-da\f[R][\f[CR]:\f[R][\f[I]packagename\f[R]]...|\f[CR]:\f[R]\f[I]classname\f[R]] +Disables assertions. +By default, assertions are disabled in all packages and classes. +With no arguments, \f[CR]\-disableassertions\f[R] (\f[CR]\-da\f[R]) +disables assertions in all packages and classes. +With the \f[I]packagename\f[R] argument ending in \f[CR]...\f[R], the +switch disables assertions in the specified package and any subpackages. +If the argument is simply \f[CR]...\f[R], then the switch disables +assertions in the unnamed package in the current working directory. +With the \f[I]classname\f[R] argument, the switch disables assertions in +the specified class. +.RS +.PP +The \f[CR]\-disableassertions\f[R] (\f[CR]\-da\f[R]) option applies to +all class loaders and to system classes (which don\[aq]t have a class +loader). +There\[aq]s one exception to this rule: If the option is provided with +no arguments, then it doesn\[aq]t apply to system classes. +This makes it easy to disable assertions in all classes except for +system classes. +The \f[CR]\-disablesystemassertions\f[R] option enables you to disable +assertions in all system classes. +To explicitly enable assertions in specific packages or classes, use the +\f[CR]\-enableassertions\f[R] (\f[CR]\-ea\f[R]) option. +Both options can be used at the same time. +For example, to run the \f[CR]MyClass\f[R] application with assertions +enabled in the package \f[CR]com.wombat.fruitbat\f[R] (and any +subpackages) but disabled in the class +\f[CR]com.wombat.fruitbat.Brickbat\f[R], use the following command: +.RS +.PP +\f[CR]java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat MyClass\f[R] +.RE +.RE +.TP +\f[CR]\-disablesystemassertions\f[R] or \f[CR]\-dsa\f[R] +Disables assertions in all system classes. +.TP +\f[CR]\-enableassertions\f[R][\f[CR]:\f[R][\f[I]packagename\f[R]]...|\f[CR]:\f[R]\f[I]classname\f[R]] or \f[CR]\-ea\f[R][\f[CR]:\f[R][\f[I]packagename\f[R]]...|\f[CR]:\f[R]\f[I]classname\f[R]] +Enables assertions. +By default, assertions are disabled in all packages and classes. +With no arguments, \f[CR]\-enableassertions\f[R] (\f[CR]\-ea\f[R]) +enables assertions in all packages and classes. +With the \f[I]packagename\f[R] argument ending in \f[CR]...\f[R], the +switch enables assertions in the specified package and any subpackages. +If the argument is simply \f[CR]...\f[R], then the switch enables +assertions in the unnamed package in the current working directory. +With the \f[I]classname\f[R] argument, the switch enables assertions in +the specified class. +.RS +.PP +The \f[CR]\-enableassertions\f[R] (\f[CR]\-ea\f[R]) option applies to +all class loaders and to system classes (which don\[aq]t have a class +loader). +There\[aq]s one exception to this rule: If the option is provided with +no arguments, then it doesn\[aq]t apply to system classes. +This makes it easy to enable assertions in all classes except for system +classes. +The \f[CR]\-enablesystemassertions\f[R] option provides a separate +switch to enable assertions in all system classes. +To explicitly disable assertions in specific packages or classes, use +the \f[CR]\-disableassertions\f[R] (\f[CR]\-da\f[R]) option. +If a single command contains multiple instances of these switches, then +they\[aq]re processed in order, before loading any classes. +For example, to run the \f[CR]MyClass\f[R] application with assertions +enabled only in the package \f[CR]com.wombat.fruitbat\f[R] (and any +subpackages) but disabled in the class +\f[CR]com.wombat.fruitbat.Brickbat\f[R], use the following command: +.RS +.PP +\f[CR]java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat MyClass\f[R] +.RE +.RE +.TP +\f[CR]\-enablesystemassertions\f[R] or \f[CR]\-esa\f[R] +Enables assertions in all system classes. +.TP +\f[CR]\-help\f[R], \f[CR]\-h\f[R], or \f[CR]\-?\f[R] +Prints the help message to the error stream. +.TP +\f[CR]\-\-help\f[R] +Prints the help message to the output stream. +.TP +\f[CR]\-javaagent:\f[R]\f[I]jarpath\f[R][\f[CR]=\f[R]\f[I]options\f[R]] +Loads the specified Java programming language agent. +See \f[CR]java.lang.instrument\f[R]. +.TP +\f[CR]\-\-show\-version\f[R] +Prints the product version to the output stream and continues. +.TP +\f[CR]\-showversion\f[R] +Prints the product version to the error stream and continues. +.TP +\f[CR]\-\-show\-module\-resolution\f[R] +Shows module resolution output during startup. +.TP +\f[CR]\-splash:\f[R]\f[I]imagepath\f[R] +Shows the splash screen with the image specified by \f[I]imagepath\f[R]. +HiDPI scaled images are automatically supported and used if available. +The unscaled image file name, such as \f[CR]image.ext\f[R], should +always be passed as the argument to the \f[CR]\-splash\f[R] option. +The most appropriate scaled image provided is picked up automatically. +.RS +.PP +For example, to show the \f[CR]splash.gif\f[R] file from the +\f[CR]images\f[R] directory when starting your application, use the +following option: +.RS +.PP +\f[CR]\-splash:images/splash.gif\f[R] +.RE +.PP +See the SplashScreen API documentation for more information. +.RE +.TP +\f[CR]\-verbose:class\f[R] +Displays information about each loaded class. +.TP +\f[CR]\-verbose:gc\f[R] +Displays information about each garbage collection (GC) event. +.TP +\f[CR]\-verbose:jni\f[R] +Displays information about the use of native methods and other Java +Native Interface (JNI) activity. +.TP +\f[CR]\-verbose:module\f[R] +Displays information about the modules in use. +.TP +\f[CR]\-\-version\f[R] +Prints product version to the output stream and exits. +.TP +\f[CR]\-version\f[R] +Prints product version to the error stream and exits. +.TP +\f[CR]\-X\f[R] +Prints the help on extra options to the error stream. +.TP +\f[CR]\-\-help\-extra\f[R] +Prints the help on extra options to the output stream. +.TP +\f[CR]\[at]\f[R]\f[I]argfile\f[R] +Specifies one or more argument files prefixed by \f[CR]\[at]\f[R] used +by the \f[CR]java\f[R] command. +It isn\[aq]t uncommon for the \f[CR]java\f[R] command line to be very +long because of the \f[CR].jar\f[R] files needed in the classpath. +The \f[CR]\[at]\f[R]\f[I]argfile\f[R] option overcomes command\-line +length limitations by enabling the launcher to expand the contents of +argument files after shell expansion, but before argument processing. +Contents in the argument files are expanded because otherwise, they +would be specified on the command line until the +\f[CR]\-\-disable\-\[at]files\f[R] option was encountered. +.RS +.PP +The argument files can also contain the main class name and all options. +If an argument file contains all of the options required by the +\f[CR]java\f[R] command, then the command line could simply be: +.RS +.PP +\f[CR]java \[at]\f[R]\f[I]argfile\f[R] +.RE +.PP +See \f[B]java Command\-Line Argument Files\f[R] for a description and +examples of using \f[CR]\[at]\f[R]\-argfiles. +.RE +.SH EXTRA OPTIONS FOR JAVA +The following \f[CR]java\f[R] options are general purpose options that +are specific to the Java HotSpot Virtual Machine. +.TP +\f[CR]\-Xbatch\f[R] +Disables background compilation. +By default, the JVM compiles the method as a background task, running +the method in interpreter mode until the background compilation is +finished. +The \f[CR]\-Xbatch\f[R] flag disables background compilation so that +compilation of all methods proceeds as a foreground task until +completed. +This option is equivalent to \f[CR]\-XX:\-BackgroundCompilation\f[R]. +.TP +\f[CR]\-Xbootclasspath/a:\f[R]\f[I]directories\f[R]|\f[I]zip\f[R]|\f[I]JAR\-files\f[R] +Specifies a list of directories, JAR files, and ZIP archives to append +to the end of the default bootstrap class path. +.RS +.PP +On Windows, semicolons (\f[CR];\f[R]) separate entities in this list; on +other platforms it is a colon (\f[CR]:\f[R]). +.RE +.TP +\f[CR]\-Xcheck:jni\f[R] +Performs additional checks for Java Native Interface (JNI) functions. +.RS +.PP +The following checks are considered indicative of significant problems +with the native code, and the JVM terminates with an irrecoverable error +in such cases: +.IP \[bu] 2 +The thread doing the call is not attached to the JVM. +.IP \[bu] 2 +The thread doing the call is using the \f[CR]JNIEnv\f[R] belonging to +another thread. +.IP \[bu] 2 +A parameter validation check fails: +.RS 2 +.IP \[bu] 2 +A \f[CR]jfieldID\f[R], or \f[CR]jmethodID\f[R], is detected as being +invalid. +For example: +.RS 2 +.IP \[bu] 2 +Of the wrong type +.IP \[bu] 2 +Associated with the wrong class +.RE +.IP \[bu] 2 +A parameter of the wrong type is detected. +.IP \[bu] 2 +An invalid parameter value is detected. +For example: +.RS 2 +.IP \[bu] 2 +NULL where not permitted +.IP \[bu] 2 +An out\-of\-bounds array index, or frame capacity +.IP \[bu] 2 +A non\-UTF\-8 string +.IP \[bu] 2 +An invalid JNI reference +.IP \[bu] 2 +An attempt to use a \f[CR]ReleaseXXX\f[R] function on a parameter not +produced by the corresponding \f[CR]GetXXX\f[R] function +.RE +.RE +.PP +The following checks only result in warnings being printed: +.IP \[bu] 2 +A JNI call was made without checking for a pending exception from a +previous JNI call, and the current call is not safe when an exception +may be pending. +.IP \[bu] 2 +A class descriptor is in decorated format (\f[CR]Lname;\f[R]) when it +should not be. +.IP \[bu] 2 +A \f[CR]NULL\f[R] parameter is allowed, but its use is questionable. +.IP \[bu] 2 +Calling other JNI functions in the scope of +\f[CR]Get/ReleasePrimitiveArrayCritical\f[R] or +\f[CR]Get/ReleaseStringCritical\f[R] +.PP +Expect a performance degradation when this option is used. +.RE +.TP +\f[CR]\-Xcomp\f[R] +Testing mode to exercise JIT compilers. +This option should not be used in production environments. +.TP +\f[CR]\-Xdebug\f[R] +Does nothing; deprecated for removal in a future release. +.TP +\f[CR]\-Xdiag\f[R] +Shows additional diagnostic messages. +.TP +\f[CR]\-Xint\f[R] +Runs the application in interpreted\-only mode. +Compilation to native code is disabled, and all bytecode is executed by +the interpreter. +The performance benefits offered by the just\-in\-time (JIT) compiler +aren\[aq]t present in this mode. +.TP +\f[CR]\-Xinternalversion\f[R] +Displays more detailed JVM version information than the +\f[CR]\-version\f[R] option, and then exits. +.TP +\f[CR]\-Xlog:\f[R]\f[I]option\f[R] +Configure or enable logging with the Java Virtual Machine (JVM) unified +logging framework. +See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R]. +.TP +\f[CR]\-Xmixed\f[R] +Executes all bytecode by the interpreter except for hot methods, which +are compiled to native code. +On by default. +Use \f[CR]\-Xint\f[R] to switch off. +.TP +\f[CR]\-Xmn\f[R] \f[I]size\f[R] +Sets the initial and maximum size (in bytes) of the heap for the young +generation (nursery) in the generational collectors. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The young generation region of the heap is used for new objects. +GC is performed in this region more often than in other regions. +If the size for the young generation is too small, then a lot of minor +garbage collections are performed. +If the size is too large, then only full garbage collections are +performed, which can take a long time to complete. +It is recommended that you do not set the size for the young generation +for the G1 collector, and keep the size for the young generation greater +than 25% and less than 50% of the overall heap size for other +collectors. +The following examples show how to set the initial and maximum size of +young generation to 256 MB using various units: +.RS +.IP +.EX +\-Xmn256m +\-Xmn262144k +\-Xmn268435456 +.EE +.PP +Instead of the \f[CR]\-Xmn\f[R] option to set both the initial and +maximum size of the heap for the young generation, you can use +\f[CR]\-XX:NewSize\f[R] to set the initial size and +\f[CR]\-XX:MaxNewSize\f[R] to set the maximum size. +.RE +.TP +\f[CR]\-Xms\f[R] \f[I]size\f[R] +Sets the minimum and the initial size (in bytes) of the heap. +This value must be a multiple of 1024 and greater than 1 MB. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The following examples show how to set the size of allocated memory to 6 +MB using various units: +.RS +.IP +.EX +\-Xms6291456 +\-Xms6144k +\-Xms6m +.EE +.PP +If you do not set this option, then the initial size will be set as the +sum of the sizes allocated for the old generation and the young +generation. +The initial size of the heap for the young generation can be set using +the \f[CR]\-Xmn\f[R] option or the \f[CR]\-XX:NewSize\f[R] option. +.PP +Note that the \f[CR]\-XX:InitialHeapSize\f[R] option can also be used to +set the initial heap size. +If it appears after \f[CR]\-Xms\f[R] on the command line, then the +initial heap size gets set to the value specified with +\f[CR]\-XX:InitialHeapSize\f[R]. +.RE +.TP +\f[CR]\-Xmx\f[R] \f[I]size\f[R] +Specifies the maximum size (in bytes) of the heap. +This value must be a multiple of 1024 and greater than 2 MB. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value is chosen at runtime based on system configuration. +For server deployments, \f[CR]\-Xms\f[R] and \f[CR]\-Xmx\f[R] are often +set to the same value. +The following examples show how to set the maximum allowed size of +allocated memory to 80 MB using various units: +.RS +.IP +.EX +\-Xmx83886080 +\-Xmx81920k +\-Xmx80m +.EE +.PP +The \f[CR]\-Xmx\f[R] option is equivalent to +\f[CR]\-XX:MaxHeapSize\f[R]. +.RE +.TP +\f[CR]\-Xnoclassgc\f[R] +Disables garbage collection (GC) of classes. +This can save some GC time, which shortens interruptions during the +application run. +When you specify \f[CR]\-Xnoclassgc\f[R] at startup, the class objects +in the application are left untouched during GC and are always be +considered live. +This can result in more memory being permanently occupied which, if not +used carefully, throws an out\-of\-memory exception. +.TP +\f[CR]\-Xrs\f[R] +Reduces the use of operating system signals by the JVM. +Shutdown hooks enable the orderly shutdown of a Java application by +running user cleanup code (such as closing database connections) at +shutdown, even if the JVM terminates abruptly. +.RS +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] +.RS 2 +.IP \[bu] 2 +The JVM catches signals to implement shutdown hooks for unexpected +termination. +The JVM uses \f[CR]SIGHUP\f[R], \f[CR]SIGINT\f[R], and +\f[CR]SIGTERM\f[R] to initiate the running of shutdown hooks. +.IP \[bu] 2 +Applications embedding the JVM frequently need to trap signals such as +\f[CR]SIGINT\f[R] or \f[CR]SIGTERM\f[R], which can lead to interference +with the JVM signal handlers. +The \f[CR]\-Xrs\f[R] option is available to address this issue. +When \f[CR]\-Xrs\f[R] is used, the signal masks for \f[CR]SIGINT\f[R], +\f[CR]SIGTERM\f[R], \f[CR]SIGHUP\f[R], and \f[CR]SIGQUIT\f[R] aren\[aq]t +changed by the JVM, and signal handlers for these signals aren\[aq]t +installed. +.RE +.IP \[bu] 2 +\f[B]Windows:\f[R] +.RS 2 +.IP \[bu] 2 +The JVM watches for console control events to implement shutdown hooks +for unexpected termination. +Specifically, the JVM registers a console control handler that begins +shutdown\-hook processing and returns \f[CR]TRUE\f[R] for +\f[CR]CTRL_C_EVENT\f[R], \f[CR]CTRL_CLOSE_EVENT\f[R], +\f[CR]CTRL_LOGOFF_EVENT\f[R], and \f[CR]CTRL_SHUTDOWN_EVENT\f[R]. +.IP \[bu] 2 +The JVM uses a similar mechanism to implement the feature of dumping +thread stacks for debugging purposes. +The JVM uses \f[CR]CTRL_BREAK_EVENT\f[R] to perform thread dumps. +.IP \[bu] 2 +If the JVM is run as a service (for example, as a servlet engine for a +web server), then it can receive \f[CR]CTRL_LOGOFF_EVENT\f[R] but +shouldn\[aq]t initiate shutdown because the operating system doesn\[aq]t +actually terminate the process. +To avoid possible interference such as this, the \f[CR]\-Xrs\f[R] option +can be used. +When the \f[CR]\-Xrs\f[R] option is used, the JVM doesn\[aq]t install a +console control handler, implying that it doesn\[aq]t watch for or +process \f[CR]CTRL_C_EVENT\f[R], \f[CR]CTRL_CLOSE_EVENT\f[R], +\f[CR]CTRL_LOGOFF_EVENT\f[R], or \f[CR]CTRL_SHUTDOWN_EVENT\f[R]. +.RE +.PP +There are two consequences of specifying \f[CR]\-Xrs\f[R]: +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] \f[CR]SIGQUIT\f[R] thread dumps aren\[aq]t +available. +.IP \[bu] 2 +\f[B]Windows:\f[R] Ctrl + Break thread dumps aren\[aq]t available. +.PP +User code is responsible for causing shutdown hooks to run, for example, +by calling \f[CR]System.exit()\f[R] when the JVM is to be terminated. +.RE +.TP +\f[CR]\-Xshare:\f[R]\f[I]mode\f[R] +Sets the class data sharing (CDS) mode. +.RS +.PP +Possible \f[I]mode\f[R] arguments for this option include the following: +.TP +\f[CR]auto\f[R] +Use shared class data if possible (default). +.TP +\f[CR]on\f[R] +Require using shared class data, otherwise fail. +.RS +.PP +\f[B]Note:\f[R] The \f[CR]\-Xshare:on\f[R] option is used for testing +purposes only. +It may cause the VM to unexpectedly exit during start\-up when the CDS +archive cannot be used (for example, when certain VM parameters are +changed, or when a different JDK is used). +This option should not be used in production environments. +.RE +.TP +\f[CR]off\f[R] +Do not attempt to use shared class data. +.RE +.TP +\f[CR]\-XshowSettings\f[R] +Shows all settings and then continues. +.TP +\f[CR]\-XshowSettings:\f[R]\f[I]category\f[R] +Shows settings and continues. +Possible \f[I]category\f[R] arguments for this option include the +following: +.RS +.TP +\f[CR]all\f[R] +Shows all categories of settings in \f[B]verbose\f[R] detail. +.TP +\f[CR]locale\f[R] +Shows settings related to locale. +.TP +\f[CR]properties\f[R] +Shows settings related to system properties. +.TP +\f[CR]security\f[R] +Shows all settings related to security. +.RS +.PP +sub\-category arguments for \f[CR]security\f[R] include the following: +.IP \[bu] 2 +\f[CR]security:all\f[R] : shows all security settings +.IP \[bu] 2 +\f[CR]security:properties\f[R] : shows security properties +.IP \[bu] 2 +\f[CR]security:providers\f[R] : shows static security provider settings +.IP \[bu] 2 +\f[CR]security:tls\f[R] : shows TLS related security settings +.RE +.TP +\f[CR]vm\f[R] +Shows the settings of the JVM. +.TP +\f[CR]system\f[R] +\f[B]Linux only:\f[R] Shows host system or container configuration and +continues. +.RE +.TP +\f[CR]\-Xss\f[R] \f[I]size\f[R] +Sets the thread stack size (in bytes). +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate KB, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate MB, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate GB. +The actual size may be rounded up to a multiple of the system page size +as required by the operating system. +The default value depends on the platform. +For example: +.RS +.IP \[bu] 2 +Linux/x64: 1024 KB +.IP \[bu] 2 +Linux/Aarch64: 2048 KB +.IP \[bu] 2 +macOS/x64: 1024 KB +.IP \[bu] 2 +macOS/Aarch64: 2048 KB +.IP \[bu] 2 +Windows: The default value depends on virtual memory +.PP +The following examples set the thread stack size to 1024 KB in different +units: +.IP +.EX +\-Xss1m +\-Xss1024k +\-Xss1048576 +.EE +.PP +This option is similar to \f[CR]\-XX:ThreadStackSize\f[R]. +.RE +.TP +\f[CR]\-\-add\-reads\f[R] \f[I]module\f[R]\f[CR]=\f[R]\f[I]target\-module\f[R](\f[CR],\f[R]\f[I]target\-module\f[R])* +Updates \f[I]module\f[R] to read the \f[I]target\-module\f[R], +regardless of the module declaration. +\f[I]target\-module\f[R] can be \f[CR]ALL\-UNNAMED\f[R] to read all +unnamed modules. +.TP +\f[CR]\-\-add\-exports\f[R] \f[I]module\f[R]\f[CR]/\f[R]\f[I]package\f[R]\f[CR]=\f[R]\f[I]target\-module\f[R](\f[CR],\f[R]\f[I]target\-module\f[R])* +Updates \f[I]module\f[R] to export \f[I]package\f[R] to +\f[I]target\-module\f[R], regardless of module declaration. +\f[I]target\-module\f[R] can be \f[CR]ALL\-UNNAMED\f[R] to export to all +unnamed modules. +.TP +\f[CR]\-\-add\-opens\f[R] \f[I]module\f[R]\f[CR]/\f[R]\f[I]package\f[R]\f[CR]=\f[R]\f[I]target\-module\f[R](\f[CR],\f[R]\f[I]target\-module\f[R])* +Updates \f[I]module\f[R] to open \f[I]package\f[R] to +\f[I]target\-module\f[R], regardless of module declaration. +.TP +\f[CR]\-\-limit\-modules\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Specifies the limit of the universe of observable modules. +.TP +\f[CR]\-\-patch\-module\f[R] \f[I]module\f[R]\f[CR]=\f[R]\f[I]file\f[R](\f[CR];\f[R]\f[I]file\f[R])* +Overrides or augments a module with classes and resources in JAR files +or directories. +.TP +\f[CR]\-\-source\f[R] \f[I]version\f[R] +Sets the version of the source in source\-file mode. +.TP +\f[CR]\-\-sun\-misc\-unsafe\-memory\-access=\f[R] \f[I]value\f[R] +Allow or deny usage of unsupported API \f[CR]sun.misc.Unsafe\f[R]. +\f[I]value\f[R] is one of: +.RS +.TP +\f[CR]allow\f[R] +Allow use of the memory\-access methods with no warnings at run time. +.TP +\f[CR]warn\f[R] +Allow use of the memory\-access methods, but issues a warning on the +first occasion that any memory\-access method is used. +At most one warning is issued. +.TP +\f[CR]debug\f[R] +Allow use of the memory\-access methods, but issue a one\-line warning +and a stack trace when any memory\-access method is used. +.TP +\f[CR]deny\f[R] +Disallow use of the memory\-access methods by throwing an +\f[CR]UnsupportedOperationException\f[R] on every usage. +.PP +The default value when the option is not specified is \f[CR]warn\f[R]. +.RE +.SH EXTRA OPTIONS FOR MACOS +The following extra options are macOS specific. +.TP +\f[CR]\-XstartOnFirstThread\f[R] +Runs the \f[CR]main()\f[R] method on the first (AppKit) thread. +.TP +\f[CR]\-Xdock:name=\f[R]\f[I]application_name\f[R] +Overrides the default application name displayed in dock. +.TP +\f[CR]\-Xdock:icon=\f[R]\f[I]path_to_icon_file\f[R] +Overrides the default icon displayed in dock. +.SH ADVANCED OPTIONS FOR JAVA +These \f[CR]java\f[R] options can be used to enable other advanced +options. +.TP +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R] +Unlocks the options intended for diagnosing the JVM. +By default, this option is disabled and diagnostic options aren\[aq]t +available. +.RS +.PP +Command line options that are enabled with the use of this option are +not supported. +If you encounter issues while using any of these options, it is very +likely that you will be required to reproduce the problem without using +any of these unsupported options before Oracle Support can assist with +an investigation. +It is also possible that any of these options may be removed or their +behavior changed without any warning. +.RE +.TP +\f[CR]\-XX:+UnlockExperimentalVMOptions\f[R] +Unlocks the options that provide experimental features in the JVM. +By default, this option is disabled and experimental features aren\[aq]t +available. +.SH ADVANCED RUNTIME OPTIONS FOR JAVA +These \f[CR]java\f[R] options control the runtime behavior of the Java +HotSpot VM. +.TP +\f[CR]\-XX:ActiveProcessorCount=\f[R]\f[I]x\f[R] +Overrides the number of CPUs that the VM will use to calculate the size +of thread pools it will use for various operations such as Garbage +Collection and ForkJoinPool. +.RS +.PP +The VM normally determines the number of available processors from the +operating system. +This flag can be useful for partitioning CPU resources when running +multiple Java processes in docker containers. +This flag is honored even if \f[CR]UseContainerSupport\f[R] is not +enabled. +See \f[CR]\-XX:\-UseContainerSupport\f[R] for a description of enabling +and disabling container support. +.RE +.TP +\f[CR]\-XX:AllocateHeapAt=\f[R]\f[I]path\f[R] +Takes a path to the file system and uses memory mapping to allocate the +object heap on the memory device. +Using this option enables the HotSpot VM to allocate the Java object +heap on an alternative memory device, such as an NV\-DIMM, specified by +the user. +.RS +.PP +Alternative memory devices that have the same semantics as DRAM, +including the semantics of atomic operations, can be used instead of +DRAM for the object heap without changing the existing application code. +All other memory structures (such as the code heap, metaspace, and +thread stacks) continue to reside in DRAM. +.PP +Some operating systems expose non\-DRAM memory through the file system. +Memory\-mapped files in these file systems bypass the page cache and +provide a direct mapping of virtual memory to the physical memory on the +device. +The existing heap related flags (such as \f[CR]\-Xmx\f[R] and +\f[CR]\-Xms\f[R]) and garbage\-collection related flags continue to work +as before. +.RE +.TP +\f[CR]\-XX:\-CompactStrings\f[R] +Disables the Compact Strings feature. +By default, this option is enabled. +When this option is enabled, Java Strings containing only single\-byte +characters are internally represented and stored as +single\-byte\-per\-character Strings using ISO\-8859\-1 / Latin\-1 +encoding. +This reduces, by 50%, the amount of space required for Strings +containing only single\-byte characters. +For Java Strings containing at least one multibyte character: these are +represented and stored as 2 bytes per character using UTF\-16 encoding. +Disabling the Compact Strings feature forces the use of UTF\-16 encoding +as the internal representation for all Java Strings. +.RS +.PP +Cases where it may be beneficial to disable Compact Strings include the +following: +.IP \[bu] 2 +When it\[aq]s known that an application overwhelmingly will be +allocating multibyte character Strings +.IP \[bu] 2 +In the unexpected event where a performance regression is observed in +migrating from Java SE 8 to Java SE 9 and an analysis shows that Compact +Strings introduces the regression +.PP +In both of these scenarios, disabling Compact Strings makes sense. +.RE +.TP +\f[CR]\-XX:ErrorFile=\f[R]\f[I]filename\f[R] +Specifies the path and file name to which error data is written when an +irrecoverable error occurs. +By default, this file is created in the current working directory and +named \f[CR]hs_err_pid\f[R]\f[I]pid\f[R]\f[CR].log\f[R] where +\f[I]pid\f[R] is the identifier of the process that encountered the +error. +.RS +.PP +The following example shows how to set the default log file (note that +the identifier of the process is specified as \f[CR]%p\f[R]): +.RS +.PP +\f[CR]\-XX:ErrorFile=./hs_err_pid%p.log\f[R] +.RE +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] The following example shows how to set the error +log to \f[CR]/var/log/java/java_error.log\f[R]: +.RS 2 +.RS +.PP +\f[CR]\-XX:ErrorFile=/var/log/java/java_error.log\f[R] +.RE +.RE +.IP \[bu] 2 +\f[B]Windows:\f[R] The following example shows how to set the error log +file to \f[CR]C:/log/java/java_error.log\f[R]: +.RS 2 +.RS +.PP +\f[CR]\-XX:ErrorFile=C:/log/java/java_error.log\f[R] +.RE +.RE +.PP +If the file exists, and is writeable, then it will be overwritten. +Otherwise, if the file can\[aq]t be created in the specified directory +(due to insufficient space, permission problem, or another issue), then +the file is created in the temporary directory for the operating system: +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] The temporary directory is \f[CR]/tmp\f[R]. +.IP \[bu] 2 +\f[B]Windows:\f[R] The temporary directory is specified by the value of +the \f[CR]TMP\f[R] environment variable; if that environment variable +isn\[aq]t defined, then the value of the \f[CR]TEMP\f[R] environment +variable is used. +.RE +.TP +\f[CR]\-XX:+ExtensiveErrorReports\f[R] +Enables the reporting of more extensive error information in the +\f[CR]ErrorFile\f[R]. +This option can be turned on in environments where maximal information +is desired \- even if the resulting logs may be quite large and/or +contain information that might be considered sensitive. +The information can vary from release to release, and across different +platforms. +By default this option is disabled. +.TP +\f[CR]\-XX:FlightRecorderOptions=\f[R]\f[I]parameter\f[R]\f[CR]=\f[R]\f[I]value\f[R] (or) \f[CR]\-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[CR]=\f[R]\f[I]value\f[R] +Sets the parameters that control the behavior of JFR. +Multiple parameters can be specified by separating them with a comma. +.RS +.PP +The following list contains the available JFR +\f[I]parameter\f[R]\f[CR]=\f[R]\f[I]value\f[R] entries: +.TP +\f[CR]globalbuffersize=\f[R]\f[I]size\f[R] +Specifies the total amount of primary memory used for data retention. +The default value is based on the value specified for +\f[CR]memorysize\f[R]. +Change the \f[CR]memorysize\f[R] parameter to alter the size of global +buffers. +.TP +\f[CR]maxchunksize=\f[R]\f[I]size\f[R] +Specifies the maximum size (in bytes) of the data chunks in a recording. +Append \f[CR]m\f[R] or \f[CR]M\f[R] to specify the size in megabytes +(MB), or \f[CR]g\f[R] or \f[CR]G\f[R] to specify the size in gigabytes +(GB). +By default, the maximum size of data chunks is set to 12 MB. +The minimum allowed is 1 MB. +.TP +\f[CR]memorysize=\f[R]\f[I]size\f[R] +Determines how much buffer memory should be used, and sets the +\f[CR]globalbuffersize\f[R] and \f[CR]numglobalbuffers\f[R] parameters +based on the size specified. +Append \f[CR]m\f[R] or \f[CR]M\f[R] to specify the size in megabytes +(MB), or \f[CR]g\f[R] or \f[CR]G\f[R] to specify the size in gigabytes +(GB). +By default, the memory size is set to 10 MB. +.TP +\f[CR]numglobalbuffers\f[R] +Specifies the number of global buffers used. +The default value is based on the memory size specified. +Change the \f[CR]memorysize\f[R] parameter to alter the number of global +buffers. +.TP +\f[CR]old\-object\-queue\-size=number\-of\-objects\f[R] +Maximum number of old objects to track. +By default, the number of objects is set to 256. +.TP +\f[CR]preserve\-repository=\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]} +Specifies whether files stored in the disk repository should be kept +after the JVM has exited. +If false, files are deleted. +By default, this parameter is disabled. +.TP +\f[CR]repository=\f[R]\f[I]path\f[R] +Specifies the repository (a directory) for temporary disk storage. +By default, the system\[aq]s temporary directory is used. +.TP +\f[CR]retransform=\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]} +Specifies whether event classes should be retransformed using JVMTI. +If false, instrumentation is added when event classes are loaded. +By default, this parameter is enabled. +.TP +\f[CR]stackdepth=\f[R]\f[I]depth\f[R] +Stack depth for stack traces. +By default, the depth is set to 64 method calls. +The maximum is 2048. +Values greater than 64 could create significant overhead and reduce +performance. +.TP +\f[CR]threadbuffersize=\f[R]\f[I]size\f[R] +Specifies the per\-thread local buffer size (in bytes). +By default, the local buffer size is set to 8 kilobytes, with a minimum +value of 4 kilobytes. +Overriding this parameter could reduce performance and is not +recommended. +.RE +.TP +\f[CR]\-XX:LargePageSizeInBytes=\f[R]\f[I]size\f[R] +Sets the maximum large page size (in bytes) used by the JVM. +The \f[I]size\f[R] argument must be a valid page size supported by the +environment to have any effect. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +By default, the size is set to 0, meaning that the JVM will use the +default large page size for the environment as the maximum size for +large pages. +See \f[B]Large Pages\f[R]. +.RS +.PP +The following example describes how to set the large page size to 1 +gigabyte (GB): +.RS +.PP +\f[CR]\-XX:LargePageSizeInBytes=1g\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxDirectMemorySize=\f[R]\f[I]size\f[R] +Sets the maximum total size (in bytes) of the \f[CR]java.nio\f[R] +package, direct\-buffer allocations. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +If not set, the flag is ignored and the JVM chooses the size for NIO +direct\-buffer allocations automatically. +.RS +.PP +The following examples illustrate how to set the NIO size to 1024 KB in +different units: +.IP +.EX +\-XX:MaxDirectMemorySize=1m +\-XX:MaxDirectMemorySize=1024k +\-XX:MaxDirectMemorySize=1048576 +.EE +.RE +.TP +\f[CR]\-XX:\-MaxFDLimit\f[R] +Disables the attempt to set the soft limit for the number of open file +descriptors to the hard limit. +By default, this option is enabled on all platforms, but is ignored on +Windows. +The only time that you may need to disable this is on macOS, where its +use imposes a maximum of 10240, which is lower than the actual system +maximum. +.TP +\f[CR]\-XX:NativeMemoryTracking=\f[R]\f[I]mode\f[R] +Specifies the mode for tracking JVM native memory usage. +Possible \f[I]mode\f[R] arguments for this option include the following: +.RS +.TP +\f[CR]off\f[R] +Instructs not to track JVM native memory usage. +This is the default behavior if you don\[aq]t specify the +\f[CR]\-XX:NativeMemoryTracking\f[R] option. +.TP +\f[CR]summary\f[R] +Tracks memory usage only by JVM subsystems, such as Java heap, class, +code, and thread. +.TP +\f[CR]detail\f[R] +In addition to tracking memory usage by JVM subsystems, track memory +usage by individual \f[CR]CallSite\f[R], individual virtual memory +region and its committed regions. +.RE +.TP +\f[CR]\-XX:TrimNativeHeapInterval=\f[R]\f[I]millis\f[R] +Interval, in ms, at which the JVM will trim the native heap. +Lower values will reclaim memory more eagerly at the cost of higher +overhead. +A value of 0 (default) disables native heap trimming. +Native heap trimming is performed in a dedicated thread. +.RS +.PP +This option is only supported on Linux with GNU C Library (glibc). +.RE +.TP +\f[CR]\-XX:+NeverActAsServerClassMachine\f[R] +Enable the \[dq]Client VM emulation\[dq] mode which only uses the C1 JIT +compiler, a 32Mb CodeCache and the Serial GC. +The maximum amount of memory that the JVM may use (controlled by the +\f[CR]\-XX:MaxRAM=n\f[R] flag) is set to 1GB by default. +The string \[dq]emulated\-client\[dq] is added to the JVM version +string. +.RS +.PP +By default the flag is set to \f[CR]true\f[R] only on Windows in 32\-bit +mode and \f[CR]false\f[R] in all other cases. +.PP +The \[dq]Client VM emulation\[dq] mode will not be enabled if any of the +following flags are used on the command line: +.IP +.EX +\-XX:{+|\-}TieredCompilation +\-XX:CompilationMode=mode +\-XX:TieredStopAtLevel=n +\-XX:{+|\-}EnableJVMCI +\-XX:{+|\-}UseJVMCICompiler +.EE +.RE +.TP +\f[CR]\-XX:ObjectAlignmentInBytes=\f[R]\f[I]alignment\f[R] +Sets the memory alignment of Java objects (in bytes). +By default, the value is set to 8 bytes. +The specified value should be a power of 2, and must be within the range +of 8 and 256 (inclusive). +This option makes it possible to use compressed pointers with large Java +heap sizes. +.RS +.PP +The heap size limit in bytes is calculated as: +.RS +.PP +\f[CR]4GB * ObjectAlignmentInBytes\f[R] +.RE +.RS +.PP +\f[B]Note:\f[R] As the alignment value increases, the unused space +between objects also increases. +As a result, you may not realize any benefits from using compressed +pointers with large Java heap sizes. +.RE +.RE +.TP +\f[CR]\-XX:OnError=\f[R]\f[I]string\f[R] +Sets a custom command or a series of semicolon\-separated commands to +run when an irrecoverable error occurs. +If the string contains spaces, then it must be enclosed in quotation +marks. +.RS +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] The following example shows how the +\f[CR]\-XX:OnError\f[R] option can be used to run the \f[CR]gcore\f[R] +command to create a core image, and start the \f[CR]gdb\f[R] debugger to +attach to the process in case of an irrecoverable error (the +\f[CR]%p\f[R] designates the current process identifier): +.RS 2 +.RS +.PP +\f[CR]\-XX:OnError=\[dq]gcore %p;gdb \-p %p\[dq]\f[R] +.RE +.RE +.IP \[bu] 2 +\f[B]Windows:\f[R] The following example shows how the +\f[CR]\-XX:OnError\f[R] option can be used to run the +\f[CR]userdump.exe\f[R] utility to obtain a crash dump in case of an +irrecoverable error (the \f[CR]%p\f[R] designates the current process +identifier). +This example assumes that the path to the \f[CR]userdump.exe\f[R] +utility is specified in the \f[CR]PATH\f[R] environment variable: +.RS 2 +.RS +.PP +\f[CR]\-XX:OnError=\[dq]userdump.exe %p\[dq]\f[R] +.RE +.RE +.RE +.TP +\f[CR]\-XX:OnOutOfMemoryError=\f[R]\f[I]string\f[R] +Sets a custom command or a series of semicolon\-separated commands to +run when an \f[CR]OutOfMemoryError\f[R] exception is first thrown by the +JVM. +If the string contains spaces, then it must be enclosed in quotation +marks. +For an example of a command string, see the description of the +\f[CR]\-XX:OnError\f[R] option. +This applies only to \f[CR]OutOfMemoryError\f[R] exceptions caused by +Java Heap exhaustion; it does not apply to \f[CR]OutOfMemoryError\f[R] +exceptions thrown directly from Java code, nor by the JVM for other +types of resource exhaustion (such as native thread creation errors). +.TP +\f[CR]\-XX:+PrintCommandLineFlags\f[R] +Enables printing of ergonomically selected JVM flags that appeared on +the command line. +It can be useful to know the ergonomic values set by the JVM, such as +the heap space size and the selected garbage collector. +By default, this option is disabled and flags aren\[aq]t printed. +.TP +\f[CR]\-XX:+PreserveFramePointer\f[R] +Selects between using the RBP register as a general purpose register +(\f[CR]\-XX:\-PreserveFramePointer\f[R]) and using the RBP register to +hold the frame pointer of the currently executing method +(\f[CR]\-XX:+PreserveFramePointer\f[R]). +If the frame pointer is available, then external profiling tools (for +example, Linux perf) can construct more accurate stack traces. +.TP +\f[CR]\-XX:+PrintNMTStatistics\f[R] +Enables printing of collected native memory tracking data at JVM exit +when native memory tracking is enabled (see +\f[CR]\-XX:NativeMemoryTracking\f[R]). +By default, this option is disabled and native memory tracking data +isn\[aq]t printed. +.TP +\f[CR]\-XX:SharedArchiveFile=\f[R]\f[I]path\f[R] +Specifies the path and name of the class data sharing (CDS) archive file +.RS +.PP +See \f[B]Application Class Data Sharing\f[R]. +.RE +.TP +\f[CR]\-XX:+VerifySharedSpaces\f[R] +If this option is specified, the JVM will load a CDS archive file only +if it passes an integrity check based on CRC32 checksums. +The purpose of this flag is to check for unintentional damage to CDS +archive files in transmission or storage. +To guarantee the security and proper operation of CDS, the user must +ensure that the CDS archive files used by Java applications cannot be +modified without proper authorization. +.TP +\f[CR]\-XX:SharedArchiveConfigFile=\f[R]\f[I]shared_config_file\f[R] +Specifies additional shared data added to the archive file. +.TP +\f[CR]\-XX:SharedClassListFile=\f[R]\f[I]file_name\f[R] +Specifies the text file that contains the names of the classes to store +in the class data sharing (CDS) archive. +This file contains the full name of one class per line, except slashes +(\f[CR]/\f[R]) replace dots (\f[CR].\f[R]). +For example, to specify the classes \f[CR]java.lang.Object\f[R] and +\f[CR]hello.Main\f[R], create a text file that contains the following +two lines: +.RS +.IP +.EX +java/lang/Object +hello/Main +.EE +.PP +The classes that you specify in this text file should include the +classes that are commonly used by the application. +They may include any classes from the application, extension, or +bootstrap class paths. +.PP +See \f[B]Application Class Data Sharing\f[R]. +.RE +.TP +\f[CR]\-XX:+ShowCodeDetailsInExceptionMessages\f[R] +Enables printing of improved \f[CR]NullPointerException\f[R] messages. +When an application throws a \f[CR]NullPointerException\f[R], the option +enables the JVM to analyze the program\[aq]s bytecode instructions to +determine precisely which reference is \f[CR]null\f[R], and describes +the source with a null\-detail message. +The null\-detail message is calculated and returned by +\f[CR]NullPointerException.getMessage()\f[R], and will be printed as the +exception message along with the method, filename, and line number. +By default, this option is enabled. +.TP +\f[CR]\-XX:+ShowMessageBoxOnError\f[R] +Enables the display of a dialog box when the JVM experiences an +irrecoverable error. +This prevents the JVM from exiting and keeps the process active so that +you can attach a debugger to it to investigate the cause of the error. +By default, this option is disabled. +.TP +\f[CR]\-XX:StartFlightRecording:\f[R]\f[I]parameter\f[R]\f[CR]=\f[R]\f[I]value\f[R] +Starts a JFR recording for the Java application. +This option is equivalent to the \f[CR]JFR.start\f[R] diagnostic command +that starts a recording during runtime. +\f[CR]\-XX:StartFlightRecording:help\f[R] prints available options and +example command lines. +You can set the following \f[I]parameter\f[R]\f[CR]=\f[R]\f[I]value\f[R] +entries when starting a JFR recording: +.RS +.TP +\f[CR]delay=\f[R]\f[I]time\f[R] +Specifies the delay between the Java application launch time and the +start of the recording. +Append \f[CR]s\f[R] to specify the time in seconds, \f[CR]m\f[R] for +minutes, \f[CR]h\f[R] for hours, or \f[CR]d\f[R] for days (for example, +specifying \f[CR]10m\f[R] means 10 minutes). +By default, there\[aq]s no delay, and this parameter is set to 0. +.TP +\f[CR]disk=\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]} +Specifies whether to write data to disk while recording. +By default, this parameter is enabled. +.TP +\f[CR]dumponexit=\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]} +Specifies if the running recording is dumped when the JVM shuts down. +If enabled and a \f[CR]filename\f[R] is not entered, the recording is +written to a file in the directory where the process was started. +The file name is a system\-generated name that contains the process ID, +recording ID, and current timestamp, similar to +\f[CR]hotspot\-pid\-47496\-id\-1\-2018_01_25_19_10_41.jfr\f[R]. +By default, this parameter is disabled. +.TP +\f[CR]duration=\f[R]\f[I]time\f[R] +Specifies the duration of the recording. +Append \f[CR]s\f[R] to specify the time in seconds, \f[CR]m\f[R] for +minutes, \f[CR]h\f[R] for hours, or \f[CR]d\f[R] for days (for example, +specifying \f[CR]5h\f[R] means 5 hours). +By default, the duration isn\[aq]t limited, and this parameter is set to +0. +.TP +\f[CR]filename=\f[R]\f[I]path\f[R] +Specifies the path and name of the file to which the recording is +written when the recording is stopped, for example: +.RS +.IP \[bu] 2 +\f[CR]recording.jfr\f[R] +.IP \[bu] 2 +\f[CR]/home/user/recordings/recording.jfr\f[R] +.IP \[bu] 2 +\f[CR]c:\[rs]recordings\[rs]recording.jfr\f[R] +.PP +If %p and/or %t is specified in the filename, it expands to the +JVM\[aq]s PID and the current timestamp, respectively. +The filename may also be a directory in which case, the filename is +generated from the PID and the current date in the specified directory. +.RE +.TP +\f[CR]name=\f[R]\f[I]identifier\f[R] +Takes both the name and the identifier of a recording. +.TP +\f[CR]maxage=\f[R]\f[I]time\f[R] +Specifies the maximum age of disk data to keep for the recording. +This parameter is valid only when the \f[CR]disk\f[R] parameter is set +to \f[CR]true\f[R]. +Append \f[CR]s\f[R] to specify the time in seconds, \f[CR]m\f[R] for +minutes, \f[CR]h\f[R] for hours, or \f[CR]d\f[R] for days (for example, +specifying \f[CR]30s\f[R] means 30 seconds). +By default, the maximum age isn\[aq]t limited, and this parameter is set +to \f[CR]0s\f[R]. +.TP +\f[CR]maxsize=\f[R]\f[I]size\f[R] +Specifies the maximum size (in bytes) of disk data to keep for the +recording. +This parameter is valid only when the \f[CR]disk\f[R] parameter is set +to \f[CR]true\f[R]. +The value must not be less than the value for the +\f[CR]maxchunksize\f[R] parameter set with +\f[CR]\-XX:FlightRecorderOptions\f[R]. +Append \f[CR]m\f[R] or \f[CR]M\f[R] to specify the size in megabytes, or +\f[CR]g\f[R] or \f[CR]G\f[R] to specify the size in gigabytes. +By default, the maximum size of disk data isn\[aq]t limited, and this +parameter is set to \f[CR]0\f[R]. +.TP +\f[CR]path\-to\-gc\-roots=\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]} +Specifies whether to collect the path to garbage collection (GC) roots +at the end of a recording. +By default, this parameter is disabled. +.RS +.PP +The path to GC roots is useful for finding memory leaks, but collecting +it is time\-consuming. +Enable this option only when you start a recording for an application +that you suspect has a memory leak. +If the \f[CR]settings\f[R] parameter is set to \f[CR]profile\f[R], the +stack trace from where the potential leaking object was allocated is +included in the information collected. +.RE +.TP +\f[CR]report\-on\-exit=\f[R]\f[I]identifier\f[R] +Specifies the name of the view to display when the Java Virtual Machine +(JVM) shuts down. +To specify more than one view, use the report\-on\-exit parameter +repeatedly. +This option is not available if the disk option is set to false. +For a list of available views, see \f[CR]jfr help view\f[R]. +By default, no report is generated. +.TP +\f[CR]settings=\f[R]\f[I]path\f[R] +Specifies the path and name of the event settings file (of type JFC). +By default, the \f[CR]default.jfc\f[R] file is used, which is located in +\f[CR]JAVA_HOME/lib/jfr\f[R]. +This default settings file collects a predefined set of information with +low overhead, so it has minimal impact on performance and can be used +with recordings that run continuously. +.RS +.PP +A second settings file is also provided, profile.jfc, which provides +more data than the default configuration, but can have more overhead and +impact performance. +Use this configuration for short periods of time when more information +is needed. +.RE +.PP +You can specify values for multiple parameters by separating them with a +comma. +Event settings and .jfc options can be specified using the following +syntax: +.TP +\f[CR]option=\f[R]\f[I]value\f[R] +Specifies the option value to modify. +To list available options, use the \f[CR]JAVA_HOME\f[R]/bin/jfr tool. +.TP +\f[CR]event\-setting=\f[R]\f[I]value\f[R] +Specifies the event setting value to modify. +Use the form: \f[CR]#=\f[R]. +To add a new event setting, prefix the event name with \[aq]+\[aq]. +.PP +You can specify values for multiple event settings and .jfc options by +separating them with a comma. +In case of a conflict between a parameter and a .jfc option, the +parameter will take precedence. +The whitespace delimiter can be omitted for timespan values, i.e. +20ms. +For more information about the settings syntax, see Javadoc of the +jdk.jfr package. +.PP +To only see warnings and errors from JFR during startup set +\-Xlog:jfr+startup=warning. +.RE +.TP +\f[CR]\-XX:ThreadStackSize=\f[R]\f[I]size\f[R] +Sets the Java thread stack size (in kilobytes). +Use of a scaling suffix, such as \f[CR]k\f[R], results in the scaling of +the kilobytes value so that \f[CR]\-XX:ThreadStackSize=1k\f[R] sets the +Java thread stack size to 1024*1024 bytes or 1 megabyte. +The default value depends on the platform. +For example: +.RS +.IP \[bu] 2 +Linux/x64: 1024 KB +.IP \[bu] 2 +Linux/Aarch64: 2048 KB +.IP \[bu] 2 +macOS/x64: 1024 KB +.IP \[bu] 2 +macOS/Aarch64: 2048 KB +.IP \[bu] 2 +Windows: The default value depends on virtual memory +.PP +The following examples show how to set the thread stack size to 1 +megabyte in different units: +.IP +.EX +\-XX:ThreadStackSize=1k +\-XX:ThreadStackSize=1024 +.EE +.PP +This option is similar to \f[CR]\-Xss\f[R]. +.RE +.TP +\f[CR]\-XX:+UseCompactObjectHeaders\f[R] +Enables compact object headers. +By default, this option is disabled. +Enabling this option reduces memory footprint in the Java heap by 4 +bytes per object (on average) and often improves performance. +.RS +.PP +The feature remains disabled by default while it continues to be +evaluated. +In a future release it is expected to be enabled by default, and +eventually will be the only mode of operation. +.RE +.TP +\f[CR]\-XX:\-UseCompressedOops\f[R] +Disables the use of compressed pointers. +By default, this option is enabled, and compressed pointers are used. +This will automatically limit the maximum ergonomically determined Java +heap size to the maximum amount of memory that can be covered by +compressed pointers. +By default this range is 32 GB. +.RS +.PP +With compressed oops enabled, object references are represented as +32\-bit offsets instead of 64\-bit pointers, which typically increases +performance when running the application with Java heap sizes smaller +than the compressed oops pointer range. +This option works only for 64\-bit JVMs. +.PP +It\[aq]s possible to use compressed pointers with Java heap sizes +greater than 32 GB. +See the \f[CR]\-XX:ObjectAlignmentInBytes\f[R] option. +.RE +.TP +\f[CR]\-XX:\-UseContainerSupport\f[R] +\f[B]Linux only:\f[R] The VM now provides automatic container detection +support, which allows the VM to determine the amount of memory and +number of processors that are available to a Java process running in +docker containers. +It uses this information to allocate system resources. +The default for this flag is \f[CR]true\f[R], and container support is +enabled by default. +It can be disabled with \f[CR]\-XX:\-UseContainerSupport\f[R]. +.RS +.PP +Unified Logging is available to help to diagnose issues related to this +support. +.PP +Use \f[CR]\-Xlog:os+container=trace\f[R] for maximum logging of +container information. +See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R] for +a description of using Unified Logging. +.RE +.TP +\f[CR]\-XX:+UseLargePages\f[R] +Enables the use of large page memory. +By default, this option is disabled and large page memory isn\[aq]t +used. +.RS +.PP +See \f[B]Large Pages\f[R]. +.RE +.TP +\f[CR]\-XX:+UseTransparentHugePages\f[R] +\f[B]Linux only:\f[R] Enables the use of large pages that can +dynamically grow or shrink. +This option is disabled by default. +You may encounter performance problems with transparent huge pages as +the OS moves other pages around to create huge pages; this option is +made available for experimentation. +.TP +\f[CR]\-XX:+AllowUserSignalHandlers\f[R] +\f[B]Non\-Windows:\f[R] Enables installation of signal handlers by the +application. +By default, this option is disabled and the application isn\[aq]t +allowed to install signal handlers. +.TP +\f[CR]\-XX:VMOptionsFile=\f[R]\f[I]filename\f[R] +Allows user to specify VM options in a file, for example, +\f[CR]java \-XX:VMOptionsFile=/var/my_vm_options HelloWorld\f[R]. +.TP +\f[CR]\-XX:UseBranchProtection=\f[R]\f[I]mode\f[R] +\f[B]Linux AArch64 only:\f[R] Specifies the branch protection mode. +All options other than \f[CR]none\f[R] require the VM to have been built +with branch protection enabled. +In addition, for full protection, any native libraries provided by +applications should be compiled with the same level of protection. +.RS +.PP +Possible \f[I]mode\f[R] arguments for this option include the following: +.TP +\f[CR]none\f[R] +Do not use branch protection. +This is the default value. +.TP +\f[CR]standard\f[R] +Enables all branch protection modes available on the current platform. +.TP +\f[CR]pac\-ret\f[R] +Enables protection against ROP based attacks. +(AArch64 8.3+ only) +.RE +.SH ADVANCED JIT COMPILER OPTIONS FOR JAVA +These \f[CR]java\f[R] options control the dynamic just\-in\-time (JIT) +compilation performed by the Java HotSpot VM. +.TP +\f[CR]\-XX:AllocateInstancePrefetchLines=\f[R]\f[I]lines\f[R] +Sets the number of lines to prefetch ahead of the instance allocation +pointer. +By default, the number of lines to prefetch is set to 1: +.RS +.RS +.PP +\f[CR]\-XX:AllocateInstancePrefetchLines=1\f[R] +.RE +.RE +.TP +\f[CR]\-XX:AllocatePrefetchDistance=\f[R]\f[I]size\f[R] +Sets the size (in bytes) of the prefetch distance for object allocation. +Memory about to be written with the value of new objects is prefetched +up to this distance starting from the address of the last allocated +object. +Each Java thread has its own allocation point. +.RS +.PP +Negative values denote that prefetch distance is chosen based on the +platform. +Positive values are bytes to prefetch. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value is set to \-1. +.PP +The following example shows how to set the prefetch distance to 1024 +bytes: +.RS +.PP +\f[CR]\-XX:AllocatePrefetchDistance=1024\f[R] +.RE +.RE +.TP +\f[CR]\-XX:AllocatePrefetchInstr=\f[R]\f[I]instruction\f[R] +Sets the prefetch instruction to prefetch ahead of the allocation +pointer. +Possible values are from 0 to 3. +The actual instructions behind the values depend on the platform. +By default, the prefetch instruction is set to 0: +.RS +.RS +.PP +\f[CR]\-XX:AllocatePrefetchInstr=0\f[R] +.RE +.RE +.TP +\f[CR]\-XX:AllocatePrefetchLines=\f[R]\f[I]lines\f[R] +Sets the number of cache lines to load after the last object allocation +by using the prefetch instructions generated in compiled code. +The default value is 1 if the last allocated object was an instance, and +3 if it was an array. +.RS +.PP +The following example shows how to set the number of loaded cache lines +to 5: +.RS +.PP +\f[CR]\-XX:AllocatePrefetchLines=5\f[R] +.RE +.RE +.TP +\f[CR]\-XX:AllocatePrefetchStepSize=\f[R]\f[I]size\f[R] +Sets the step size (in bytes) for sequential prefetch instructions. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +By default, the step size is set to 16 bytes: +.RS +.RS +.PP +\f[CR]\-XX:AllocatePrefetchStepSize=16\f[R] +.RE +.RE +.TP +\f[CR]\-XX:AllocatePrefetchStyle=\f[R]\f[I]style\f[R] +Sets the generated code style for prefetch instructions. +The \f[I]style\f[R] argument is an integer from 0 to 3: +.RS +.TP +\f[CR]0\f[R] +Don\[aq]t generate prefetch instructions. +.TP +\f[CR]1\f[R] +Execute prefetch instructions after each allocation. +This is the default setting. +.TP +\f[CR]2\f[R] +Use the thread\-local allocation block (TLAB) watermark pointer to +determine when prefetch instructions are executed. +.TP +\f[CR]3\f[R] +Generate one prefetch instruction per cache line. +.RE +.TP +\f[CR]\-XX:+BackgroundCompilation\f[R] +Enables background compilation. +This option is enabled by default. +To disable background compilation, specify +\f[CR]\-XX:\-BackgroundCompilation\f[R] (this is equivalent to +specifying \f[CR]\-Xbatch\f[R]). +.TP +\f[CR]\-XX:CICompilerCount=\f[R]\f[I]threads\f[R] +Sets the number of compiler threads to use for compilation. +By default, the number of compiler threads is selected automatically +depending on the number of CPUs and memory available for compiled code. +The following example shows how to set the number of threads to 2: +.RS +.RS +.PP +\f[CR]\-XX:CICompilerCount=2\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+UseDynamicNumberOfCompilerThreads\f[R] +Dynamically create compiler thread up to the limit specified by +\f[CR]\-XX:CICompilerCount\f[R]. +This option is enabled by default. +.TP +\f[CR]\-XX:CompileCommand=\f[R]\f[I]command\f[R]\f[CR],\f[R]\f[I]method\f[R][\f[CR],\f[R]\f[I]option\f[R]] +Specifies a \f[I]command\f[R] to perform on a \f[I]method\f[R]. +For example, to exclude the \f[CR]indexOf()\f[R] method of the +\f[CR]String\f[R] class from being compiled, use the following: +.RS +.RS +.PP +\f[CR]\-XX:CompileCommand=exclude,java/lang/String.indexOf\f[R] +.RE +.PP +Note that the full class name is specified, including all packages and +subpackages separated by a slash (\f[CR]/\f[R]). +For easier cut\-and\-paste operations, it\[aq]s also possible to use the +method name format produced by the \f[CR]\-XX:+PrintCompilation\f[R] and +\f[CR]\-XX:+LogCompilation\f[R] options: +.RS +.PP +\f[CR]\-XX:CompileCommand=exclude,java.lang.String::indexOf\f[R] +.RE +.PP +If the method is specified without the signature, then the command is +applied to all methods with the specified name. +However, you can also specify the signature of the method in the class +file format. +In this case, you should enclose the arguments in quotation marks, +because otherwise the shell treats the semicolon as a command end. +For example, if you want to exclude only the \f[CR]indexOf(String)\f[R] +method of the \f[CR]String\f[R] class from being compiled, use the +following: +.RS +.PP +\f[CR]\-XX:CompileCommand=\[dq]exclude,java/lang/String.indexOf,(Ljava/lang/String;)I\[dq]\f[R] +.RE +.PP +You can also use the asterisk (*) as a wildcard for class and method +names. +For example, to exclude all \f[CR]indexOf()\f[R] methods in all classes +from being compiled, use the following: +.RS +.PP +\f[CR]\-XX:CompileCommand=exclude,*.indexOf\f[R] +.RE +.PP +The commas and periods are aliases for spaces, making it easier to pass +compiler commands through a shell. +You can pass arguments to \f[CR]\-XX:CompileCommand\f[R] using spaces as +separators by enclosing the argument in quotation marks: +.RS +.PP +\f[CR]\-XX:CompileCommand=\[dq]exclude java/lang/String indexOf\[dq]\f[R] +.RE +.PP +Note that after parsing the commands passed on the command line using +the \f[CR]\-XX:CompileCommand\f[R] options, the JIT compiler then reads +commands from the \f[CR].hotspot_compiler\f[R] file. +You can add commands to this file or specify a different file using the +\f[CR]\-XX:CompileCommandFile\f[R] option. +.PP +To add several commands, either specify the +\f[CR]\-XX:CompileCommand\f[R] option multiple times, or separate each +argument with the new line separator (\f[CR]\[rs]n\f[R]). +The following commands are available: +.TP +\f[CR]break\f[R] +Sets a breakpoint when debugging the JVM to stop at the beginning of +compilation of the specified method. +.TP +\f[CR]compileonly\f[R] +Excludes all methods from compilation except for the specified method. +As an alternative, you can use the \f[CR]\-XX:CompileOnly\f[R] option, +which lets you specify several methods. +.TP +\f[CR]dontinline\f[R] +Prevents inlining of the specified method. +.TP +\f[CR]exclude\f[R] +Excludes the specified method from compilation. +.TP +\f[CR]help\f[R] +Prints a help message for the \f[CR]\-XX:CompileCommand\f[R] option. +.TP +\f[CR]inline\f[R] +Attempts to inline the specified method. +.TP +\f[CR]log\f[R] +Excludes compilation logging (with the \f[CR]\-XX:+LogCompilation\f[R] +option) for all methods except for the specified method. +By default, logging is performed for all compiled methods. +.TP +\f[CR]option\f[R] +Passes a JIT compilation option to the specified method in place of the +last argument (\f[CR]option\f[R]). +The compilation option is set at the end, after the method name. +For example, to enable the \f[CR]BlockLayoutByFrequency\f[R] option for +the \f[CR]append()\f[R] method of the \f[CR]StringBuffer\f[R] class, use +the following: +.RS +.RS +.PP +\f[CR]\-XX:CompileCommand=option,java/lang/StringBuffer.append,BlockLayoutByFrequency\f[R] +.RE +.PP +You can specify multiple compilation options, separated by commas or +spaces. +.RE +.TP +\f[CR]print\f[R] +Prints generated assembler code after compilation of the specified +method. +.TP +\f[CR]quiet\f[R] +Instructs not to print the compile commands. +By default, the commands that you specify with the +\f[CR]\-XX:CompileCommand\f[R] option are printed; for example, if you +exclude from compilation the \f[CR]indexOf()\f[R] method of the +\f[CR]String\f[R] class, then the following is printed to standard +output: +.RS +.RS +.PP +\f[CR]CompilerOracle: exclude java/lang/String.indexOf\f[R] +.RE +.PP +You can suppress this by specifying the +\f[CR]\-XX:CompileCommand=quiet\f[R] option before other +\f[CR]\-XX:CompileCommand\f[R] options. +.RE +.RE +.TP +\f[CR]\-XX:CompileCommandFile=\f[R]\f[I]filename\f[R] +Sets the file from which JIT compiler commands are read. +By default, the \f[CR].hotspot_compiler\f[R] file is used to store +commands performed by the JIT compiler. +.RS +.PP +Each line in the command file represents a command, a class name, and a +method name for which the command is used. +For example, this line prints assembly code for the +\f[CR]toString()\f[R] method of the \f[CR]String\f[R] class: +.RS +.PP +\f[CR]print java/lang/String toString\f[R] +.RE +.PP +If you\[aq]re using commands for the JIT compiler to perform on methods, +then see the \f[CR]\-XX:CompileCommand\f[R] option. +.RE +.TP +\f[CR]\-XX:CompilerDirectivesFile=\f[R]\f[I]file\f[R] +Adds directives from a file to the directives stack when a program +starts. +See \f[B]Compiler Control\f[R] +[https://docs.oracle.com/en/java/javase/12/vm/compiler\-control1.html#GUID\-94AD8194\-786A\-4F19\-BFFF\-278F8E237F3A]. +.RS +.PP +The \f[CR]\-XX:CompilerDirectivesFile\f[R] option has to be used +together with the \f[CR]\-XX:UnlockDiagnosticVMOptions\f[R] option that +unlocks diagnostic JVM options. +.RE +.TP +\f[CR]\-XX:+CompilerDirectivesPrint\f[R] +Prints the directives stack when the program starts or when a new +directive is added. +.RS +.PP +The \f[CR]\-XX:+CompilerDirectivesPrint\f[R] option has to be used +together with the \f[CR]\-XX:UnlockDiagnosticVMOptions\f[R] option that +unlocks diagnostic JVM options. +.RE +.TP +\f[CR]\-XX:CompileOnly=\f[R]\f[I]methods\f[R] +Sets the list of methods (separated by commas) to which compilation +should be restricted. +Only the specified methods are compiled. +.RS +.PP +\f[CR]\-XX:CompileOnly=method1,method2,...,methodN\f[R] is an alias for: +.IP +.EX +\-XX:CompileCommand=compileonly,method1 +\-XX:CompileCommand=compileonly,method2 +\&... +\-XX:CompileCommand=compileonly,methodN +.EE +.RE +.TP +\f[CR]\-XX:CompileThresholdScaling=\f[R]\f[I]scale\f[R] +Provides unified control of first compilation. +This option controls when methods are first compiled for both the tiered +and the nontiered modes of operation. +The \f[CR]CompileThresholdScaling\f[R] option has a floating point value +between 0 and +Inf and scales the thresholds corresponding to the +current mode of operation (both tiered and nontiered). +Setting \f[CR]CompileThresholdScaling\f[R] to a value less than 1.0 +results in earlier compilation while values greater than 1.0 delay +compilation. +Setting \f[CR]CompileThresholdScaling\f[R] to 0 is equivalent to +disabling compilation. +.TP +\f[CR]\-XX:+DoEscapeAnalysis\f[R] +Enables the use of escape analysis. +This option is enabled by default. +To disable the use of escape analysis, specify +\f[CR]\-XX:\-DoEscapeAnalysis\f[R]. +.TP +\f[CR]\-XX:InitialCodeCacheSize=\f[R]\f[I]size\f[R] +Sets the initial code cache size (in bytes). +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value depends on the platform. +The initial code cache size shouldn\[aq]t be less than the system\[aq]s +minimal memory page size. +The following example shows how to set the initial code cache size to 32 +KB: +.RS +.RS +.PP +\f[CR]\-XX:InitialCodeCacheSize=32k\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+Inline\f[R] +Enables method inlining. +This option is enabled by default to increase performance. +To disable method inlining, specify \f[CR]\-XX:\-Inline\f[R]. +.TP +\f[CR]\-XX:InlineSmallCode=\f[R]\f[I]size\f[R] +Sets the maximum code size (in bytes) for already compiled methods that +may be inlined. +This flag only applies to the C2 compiler. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value depends on the platform and on whether tiered +compilation is enabled. +In the following example it is set to 1000 bytes: +.RS +.RS +.PP +\f[CR]\-XX:InlineSmallCode=1000\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+LogCompilation\f[R] +Enables logging of compilation activity to a file named +\f[CR]hotspot.log\f[R] in the current working directory. +You can specify a different log file path and name using the +\f[CR]\-XX:LogFile\f[R] option. +.RS +.PP +By default, this option is disabled and compilation activity isn\[aq]t +logged. +The \f[CR]\-XX:+LogCompilation\f[R] option has to be used together with +the \f[CR]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks +diagnostic JVM options. +.PP +You can enable verbose diagnostic output with a message printed to the +console every time a method is compiled by using the +\f[CR]\-XX:+PrintCompilation\f[R] option. +.RE +.TP +\f[CR]\-XX:FreqInlineSize=\f[R]\f[I]size\f[R] +Sets the maximum bytecode size (in bytes) of a hot method to be inlined. +This flag only applies to the C2 compiler. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value depends on the platform. +In the following example it is set to 325 bytes: +.RS +.RS +.PP +\f[CR]\-XX:FreqInlineSize=325\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxInlineSize=\f[R]\f[I]size\f[R] +Sets the maximum bytecode size (in bytes) of a cold method to be +inlined. +This flag only applies to the C2 compiler. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +By default, the maximum bytecode size is set to 35 bytes: +.RS +.RS +.PP +\f[CR]\-XX:MaxInlineSize=35\f[R] +.RE +.RE +.TP +\f[CR]\-XX:C1MaxInlineSize=\f[R]\f[I]size\f[R] +Sets the maximum bytecode size (in bytes) of a cold method to be +inlined. +This flag only applies to the C1 compiler. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +By default, the maximum bytecode size is set to 35 bytes: +.RS +.RS +.PP +\f[CR]\-XX:MaxInlineSize=35\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxTrivialSize=\f[R]\f[I]size\f[R] +Sets the maximum bytecode size (in bytes) of a trivial method to be +inlined. +This flag only applies to the C2 compiler. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +By default, the maximum bytecode size of a trivial method is set to 6 +bytes: +.RS +.RS +.PP +\f[CR]\-XX:MaxTrivialSize=6\f[R] +.RE +.RE +.TP +\f[CR]\-XX:C1MaxTrivialSize=\f[R]\f[I]size\f[R] +Sets the maximum bytecode size (in bytes) of a trivial method to be +inlined. +This flag only applies to the C1 compiler. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +By default, the maximum bytecode size of a trivial method is set to 6 +bytes: +.RS +.RS +.PP +\f[CR]\-XX:MaxTrivialSize=6\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxNodeLimit=\f[R]\f[I]nodes\f[R] +Sets the maximum number of nodes to be used during single method +compilation. +By default the value depends on the features enabled. +In the following example the maximum number of nodes is set to 100,000: +.RS +.RS +.PP +\f[CR]\-XX:MaxNodeLimit=100000\f[R] +.RE +.RE +.TP +\f[CR]\-XX:NonNMethodCodeHeapSize=\f[R]\f[I]size\f[R] +Sets the size in bytes of the code segment containing nonmethod code. +.RS +.PP +A nonmethod code segment containing nonmethod code, such as compiler +buffers and the bytecode interpreter. +This code type stays in the code cache forever. +This flag is used only if \f[CR]\-XX:SegmentedCodeCache\f[R] is enabled. +.RE +.TP +\f[CR]\-XX:NonProfiledCodeHeapSize=\f[R]\f[I]size\f[R] +Sets the size in bytes of the code segment containing nonprofiled +methods. +This flag is used only if \f[CR]\-XX:SegmentedCodeCache\f[R] is enabled. +.TP +\f[CR]\-XX:+OptimizeStringConcat\f[R] +Enables the optimization of \f[CR]String\f[R] concatenation operations. +This option is enabled by default. +To disable the optimization of \f[CR]String\f[R] concatenation +operations, specify \f[CR]\-XX:\-OptimizeStringConcat\f[R]. +.TP +\f[CR]\-XX:+PrintAssembly\f[R] +Enables printing of assembly code for bytecoded and native methods by +using the external \f[CR]hsdis\-.so\f[R] or \f[CR].dll\f[R] +library. +For 64\-bit VM on Windows, it\[aq]s \f[CR]hsdis\-amd64.dll\f[R]. +This lets you to see the generated code, which may help you to diagnose +performance issues. +.RS +.PP +By default, this option is disabled and assembly code isn\[aq]t printed. +The \f[CR]\-XX:+PrintAssembly\f[R] option has to be used together with +the \f[CR]\-XX:UnlockDiagnosticVMOptions\f[R] option that unlocks +diagnostic JVM options. +.RE +.TP +\f[CR]\-XX:ProfiledCodeHeapSize=\f[R]\f[I]size\f[R] +Sets the size in bytes of the code segment containing profiled methods. +This flag is used only if \f[CR]\-XX:SegmentedCodeCache\f[R] is enabled. +.TP +\f[CR]\-XX:+PrintCompilation\f[R] +Enables verbose diagnostic output from the JVM by printing a message to +the console every time a method is compiled. +This lets you to see which methods actually get compiled. +By default, this option is disabled and diagnostic output isn\[aq]t +printed. +.RS +.PP +You can also log compilation activity to a file by using the +\f[CR]\-XX:+LogCompilation\f[R] option. +.RE +.TP +\f[CR]\-XX:+PrintInlining\f[R] +Enables printing of inlining decisions. +This let\[aq]s you see which methods are getting inlined. +.RS +.PP +By default, this option is disabled and inlining information isn\[aq]t +printed. +The \f[CR]\-XX:+PrintInlining\f[R] option has to be used together with +the \f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R] option that unlocks +diagnostic JVM options. +.RE +.TP +\f[CR]\-XX:ReservedCodeCacheSize=\f[R]\f[I]size\f[R] +Sets the maximum code cache size (in bytes) for JIT\-compiled code. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default maximum code cache size is 240 MB; if you disable tiered +compilation with the option \f[CR]\-XX:\-TieredCompilation\f[R], then +the default size is 48 MB. +This option has a limit of 2 GB; otherwise, an error is generated. +The maximum code cache size shouldn\[aq]t be less than the initial code +cache size; see the option \f[CR]\-XX:InitialCodeCacheSize\f[R]. +.TP +\f[CR]\-XX:+SegmentedCodeCache\f[R] +Enables segmentation of the code cache, without which the code cache +consists of one large segment. +With \f[CR]\-XX:+SegmentedCodeCache\f[R], separate segments will be used +for non\-method, profiled method, and non\-profiled method code. +The segments are not resized at runtime. +The advantages are better control of the memory footprint, reduced code +fragmentation, and better CPU iTLB (instruction translation lookaside +buffer) and instruction cache behavior due to improved locality. +.RS +.PP +The feature is enabled by default if tiered compilation is enabled +(\f[CR]\-XX:+TieredCompilation\f[R] ) and the reserved code cache size +(\f[CR]\-XX:ReservedCodeCacheSize\f[R]) is at least 240 MB. +.RE +.TP +\f[CR]\-XX:StartAggressiveSweepingAt=\f[R]\f[I]percent\f[R] +Forces stack scanning of active methods to aggressively remove unused +code when only the given percentage of the code cache is free. +The default value is 10%. +.TP +\f[CR]\-XX:\-TieredCompilation\f[R] +Disables the use of tiered compilation. +By default, this option is enabled. +.TP +\f[CR]\-XX:UseSSE=\f[R]\f[I]version\f[R] +Enables the use of SSE instruction set of a specified version. +Is set by default to the highest supported version available (x86 only). +.TP +\f[CR]\-XX:UseAVX=\f[R]\f[I]version\f[R] +Enables the use of AVX instruction set of a specified version. +Is set by default to the highest supported version available (x86 only). +.TP +\f[CR]\-XX:+UseAES\f[R] +Enables hardware\-based AES intrinsics for hardware that supports it. +This option is on by default on hardware that has the necessary +instructions. +The \f[CR]\-XX:+UseAES\f[R] is used in conjunction with +\f[CR]UseAESIntrinsics\f[R]. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseAESIntrinsics\f[R] +Enables AES intrinsics. +Specifying \f[CR]\-XX:+UseAESIntrinsics\f[R] is equivalent to also +enabling \f[CR]\-XX:+UseAES\f[R]. +To disable hardware\-based AES intrinsics, specify +\f[CR]\-XX:\-UseAES \-XX:\-UseAESIntrinsics\f[R]. +For example, to enable hardware AES, use the following flags: +.RS +.RS +.PP +\f[CR]\-XX:+UseAES \-XX:+UseAESIntrinsics\f[R] +.RE +.PP +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.RE +.TP +\f[CR]\-XX:+UseAESCTRIntrinsics\f[R] +Analogous to \f[CR]\-XX:+UseAESIntrinsics\f[R] enables AES/CTR +intrinsics. +.TP +\f[CR]\-XX:+UseGHASHIntrinsics\f[R] +Controls the use of GHASH intrinsics. +Enabled by default on platforms that support the corresponding +instructions. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseChaCha20Intrinsics\f[R] +Enable ChaCha20 intrinsics. +This option is on by default for supported platforms. +To disable ChaCha20 intrinsics, specify +\f[CR]\-XX:\-UseChaCha20Intrinsics\f[R]. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UsePoly1305Intrinsics\f[R] +Enable Poly1305 intrinsics. +This option is on by default for supported platforms. +To disable Poly1305 intrinsics, specify +\f[CR]\-XX:\-UsePoly1305Intrinsics\f[R]. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseBASE64Intrinsics\f[R] +Controls the use of accelerated BASE64 encoding routines for +\f[CR]java.util.Base64\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseAdler32Intrinsics\f[R] +Controls the use of Adler32 checksum algorithm intrinsic for +\f[CR]java.util.zip.Adler32\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseCRC32Intrinsics\f[R] +Controls the use of CRC32 intrinsics for \f[CR]java.util.zip.CRC32\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseCRC32CIntrinsics\f[R] +Controls the use of CRC32C intrinsics for +\f[CR]java.util.zip.CRC32C\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseSHA\f[R] +Enables hardware\-based intrinsics for SHA crypto hash functions for +some hardware. +The \f[CR]UseSHA\f[R] option is used in conjunction with the +\f[CR]UseSHA1Intrinsics\f[R], \f[CR]UseSHA256Intrinsics\f[R], and +\f[CR]UseSHA512Intrinsics\f[R] options. +.RS +.PP +The \f[CR]UseSHA\f[R] and \f[CR]UseSHA*Intrinsics\f[R] flags are enabled +by default on machines that support the corresponding instructions. +.PP +This feature is applicable only when using the +\f[CR]sun.security.provider.Sun\f[R] provider for SHA operations. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.PP +To disable all hardware\-based SHA intrinsics, specify the +\f[CR]\-XX:\-UseSHA\f[R]. +To disable only a particular SHA intrinsic, use the appropriate +corresponding option. +For example: \f[CR]\-XX:\-UseSHA256Intrinsics\f[R]. +.RE +.TP +\f[CR]\-XX:+UseSHA1Intrinsics\f[R] +Enables intrinsics for SHA\-1 crypto hash function. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseSHA256Intrinsics\f[R] +Enables intrinsics for SHA\-224 and SHA\-256 crypto hash functions. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseSHA512Intrinsics\f[R] +Enables intrinsics for SHA\-384 and SHA\-512 crypto hash functions. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseMathExactIntrinsics\f[R] +Enables intrinsification of various \f[CR]java.lang.Math.*Exact()\f[R] +functions. +Enabled by default. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseMultiplyToLenIntrinsic\f[R] +Enables intrinsification of \f[CR]BigInteger.multiplyToLen()\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\-XX:+UseSquareToLenIntrinsic +Enables intrinsification of \f[CR]BigInteger.squareToLen()\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\-XX:+UseMulAddIntrinsic +Enables intrinsification of \f[CR]BigInteger.mulAdd()\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\-XX:+UseMontgomeryMultiplyIntrinsic +Enables intrinsification of \f[CR]BigInteger.montgomeryMultiply()\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\-XX:+UseMontgomerySquareIntrinsic +Enables intrinsification of \f[CR]BigInteger.montgomerySquare()\f[R]. +Enabled by default on platforms that support it. +Flags that control intrinsics now require the option +\f[CR]\-XX:+UnlockDiagnosticVMOptions\f[R]. +.TP +\f[CR]\-XX:+UseCMoveUnconditionally\f[R] +Generates CMove (scalar and vector) instructions regardless of +profitability analysis. +.TP +\f[CR]\-XX:+UseCodeCacheFlushing\f[R] +Enables flushing of the code cache before shutting down the compiler. +This option is enabled by default. +To disable flushing of the code cache before shutting down the compiler, +specify \f[CR]\-XX:\-UseCodeCacheFlushing\f[R]. +.TP +\f[CR]\-XX:+UseCondCardMark\f[R] +Enables checking if the card is already marked before updating the card +table. +This option is disabled by default. +It should be used only on machines with multiple sockets, where it +increases the performance of Java applications that rely on concurrent +operations. +.TP +\f[CR]\-XX:+UseCountedLoopSafepoints\f[R] +Keeps safepoints in counted loops. +Its default value depends on whether the selected garbage collector +requires low latency safepoints. +.TP +\f[CR]\-XX:LoopStripMiningIter=\f[R]\f[I]number_of_iterations\f[R] +Controls the number of iterations in the inner strip mined loop. +Strip mining transforms counted loops into two level nested loops. +Safepoints are kept in the outer loop while the inner loop can execute +at full speed. +This option controls the maximum number of iterations in the inner loop. +The default value is 1,000. +.TP +\f[CR]\-XX:LoopStripMiningIterShortLoop=\f[R]\f[I]number_of_iterations\f[R] +Controls loop strip mining optimization. +Loops with the number of iterations less than specified will not have +safepoints in them. +Default value is 1/10th of \f[CR]\-XX:LoopStripMiningIter\f[R]. +.TP +\f[CR]\-XX:+UseFMA\f[R] +Enables hardware\-based FMA intrinsics for hardware where FMA +instructions are available (such as, Intel and ARM64). +FMA intrinsics are generated for the +\f[CR]java.lang.Math.fma(\f[R]\f[I]a\f[R]\f[CR],\f[R] +\f[I]b\f[R]\f[CR],\f[R] \f[I]c\f[R]\f[CR])\f[R] methods that calculate +the value of \f[CR](\f[R] \f[I]a\f[R] \f[CR]*\f[R] \f[I]b\f[R] +\f[CR]+\f[R] \f[I]c\f[R] \f[CR])\f[R] expressions. +.TP +\f[CR]\-XX:+UseSuperWord\f[R] +Enables the transformation of scalar operations into superword +operations. +Superword is a vectorization optimization. +This option is enabled by default. +To disable the transformation of scalar operations into superword +operations, specify \f[CR]\-XX:\-UseSuperWord\f[R]. +.SH ADVANCED SERVICEABILITY OPTIONS FOR JAVA +These \f[CR]java\f[R] options provide the ability to gather system +information and perform extensive debugging. +.TP +\f[CR]\-XX:+DisableAttachMechanism\f[R] +Disables the mechanism that lets tools attach to the JVM. +By default, this option is disabled, meaning that the attach mechanism +is enabled and you can use diagnostics and troubleshooting tools such as +\f[CR]jcmd\f[R], \f[CR]jstack\f[R], \f[CR]jmap\f[R], and +\f[CR]jinfo\f[R]. +.RS +.RS +.PP +\f[B]Note:\f[R] The tools such as \f[B]jcmd\f[R], \f[B]jinfo\f[R], +\f[B]jmap\f[R], and \f[B]jstack\f[R] shipped with the JDK aren\[aq]t +supported when using the tools from one JDK version to troubleshoot a +different JDK version. +.RE +.RE +.TP +\f[CR]\-XX:+DTraceAllocProbes\f[R] +\f[B]Linux and macOS:\f[R] Enable \f[CR]dtrace\f[R] tool probes for +object allocation. +.TP +\f[CR]\-XX:+DTraceMethodProbes\f[R] +\f[B]Linux and macOS:\f[R] Enable \f[CR]dtrace\f[R] tool probes for +method\-entry and method\-exit. +.TP +\f[CR]\-XX:+DTraceMonitorProbes\f[R] +\f[B]Linux and macOS:\f[R] Enable \f[CR]dtrace\f[R] tool probes for +monitor events. +.TP +\f[CR]\-XX:+HeapDumpOnOutOfMemoryError\f[R] +Enables the dumping of the Java heap to a file in the current directory +by using the heap profiler (HPROF) when a +\f[CR]java.lang.OutOfMemoryError\f[R] exception is thrown by the JVM. +You can explicitly set the heap dump file path and name using the +\f[CR]\-XX:HeapDumpPath\f[R] option. +By default, this option is disabled and the heap isn\[aq]t dumped when +an \f[CR]OutOfMemoryError\f[R] exception is thrown. +This applies only to \f[CR]OutOfMemoryError\f[R] exceptions caused by +Java Heap exhaustion; it does not apply to \f[CR]OutOfMemoryError\f[R] +exceptions thrown directly from Java code, nor by the JVM for other +types of resource exhaustion (such as native thread creation errors). +.TP +\f[CR]\-XX:HeapDumpPath=\f[R]\f[I]path\f[R] +Sets the path and file name for writing the heap dump provided by the +heap profiler (HPROF) when the +\f[CR]\-XX:+HeapDumpOnOutOfMemoryError\f[R] option is set. +By default, the file is created in the current working directory, and +it\[aq]s named \f[CR]java_pid.hprof\f[R] where \f[CR]\f[R] is +the identifier of the process that caused the error. +The following example shows how to set the default file explicitly +(\f[CR]%p\f[R] represents the current process identifier): +.RS +.RS +.PP +\f[CR]\-XX:HeapDumpPath=./java_pid%p.hprof\f[R] +.RE +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] The following example shows how to set the heap +dump file to \f[CR]/var/log/java/java_heapdump.hprof\f[R]: +.RS 2 +.RS +.PP +\f[CR]\-XX:HeapDumpPath=/var/log/java/java_heapdump.hprof\f[R] +.RE +.RE +.IP \[bu] 2 +\f[B]Windows:\f[R] The following example shows how to set the heap dump +file to \f[CR]C:/log/java/java_heapdump.log\f[R]: +.RS 2 +.RS +.PP +\f[CR]\-XX:HeapDumpPath=C:/log/java/java_heapdump.log\f[R] +.RE +.RE +.RE +.TP +\f[CR]\-XX:LogFile=\f[R]\f[I]path\f[R] +Sets the path and file name to where log data is written. +By default, the file is created in the current working directory, and +it\[aq]s named \f[CR]hotspot.log\f[R]. +.RS +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] The following example shows how to set the log +file to \f[CR]/var/log/java/hotspot.log\f[R]: +.RS 2 +.RS +.PP +\f[CR]\-XX:LogFile=/var/log/java/hotspot.log\f[R] +.RE +.RE +.IP \[bu] 2 +\f[B]Windows:\f[R] The following example shows how to set the log file +to \f[CR]C:/log/java/hotspot.log\f[R]: +.RS 2 +.RS +.PP +\f[CR]\-XX:LogFile=C:/log/java/hotspot.log\f[R] +.RE +.RE +.RE +.TP +\f[CR]\-XX:+PrintClassHistogram\f[R] +Enables printing of a class instance histogram after one of the +following events: +.RS +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] \f[CR]Control+\[rs]\f[R] (\f[CR]SIGQUIT\f[R]) +.IP \[bu] 2 +\f[B]Windows:\f[R] \f[CR]Control+C\f[R] (\f[CR]SIGTERM\f[R]) +.PP +By default, this option is disabled. +.PP +Setting this option is equivalent to running the \f[CR]jmap \-histo\f[R] +command, or the \f[CR]jcmd\f[R] \f[I]pid\f[R] +\f[CR]GC.class_histogram\f[R] command, where \f[I]pid\f[R] is the +current Java process identifier. +.RE +.TP +\f[CR]\-XX:+PrintConcurrentLocks\f[R] +Enables printing of \f[CR]java.util.concurrent\f[R] locks after one of +the following events: +.RS +.IP \[bu] 2 +\f[B]Non\-Windows:\f[R] \f[CR]Control+\[rs]\f[R] (\f[CR]SIGQUIT\f[R]) +.IP \[bu] 2 +\f[B]Windows:\f[R] \f[CR]Control+C\f[R] (\f[CR]SIGTERM\f[R]) +.PP +By default, this option is disabled. +.PP +Setting this option is equivalent to running the \f[CR]jstack \-l\f[R] +command or the \f[CR]jcmd\f[R] \f[I]pid\f[R] \f[CR]Thread.print \-l\f[R] +command, where \f[I]pid\f[R] is the current Java process identifier. +.RE +.TP +\f[CR]\-XX:+PrintFlagsRanges\f[R] +Prints the range specified and allows automatic testing of the values. +See \f[B]Validate Java Virtual Machine Flag Arguments\f[R]. +.TP +\f[CR]\-XX:+PerfDataSaveToFile\f[R] +If enabled, saves \f[B]jstat\f[R] binary data when the Java application +exits. +This binary data is saved in a file named +\f[CR]hsperfdata_\f[R]\f[I]pid\f[R], where \f[I]pid\f[R] is the process +identifier of the Java application that you ran. +Use the \f[CR]jstat\f[R] command to display the performance data +contained in this file as follows: +.RS +.RS +.PP +\f[CR]jstat \-class file:///\f[R]\f[I]path\f[R]\f[CR]/hsperfdata_\f[R]\f[I]pid\f[R] +.RE +.RS +.PP +\f[CR]jstat \-gc file:///\f[R]\f[I]path\f[R]\f[CR]/hsperfdata_\f[R]\f[I]pid\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+UsePerfData\f[R] +Enables the \f[CR]perfdata\f[R] feature. +This option is enabled by default to allow JVM monitoring and +performance testing. +Disabling it suppresses the creation of the \f[CR]hsperfdata_userid\f[R] +directories. +To disable the \f[CR]perfdata\f[R] feature, specify +\f[CR]\-XX:\-UsePerfData\f[R]. +.SH ADVANCED GARBAGE COLLECTION OPTIONS FOR JAVA +These \f[CR]java\f[R] options control how garbage collection (GC) is +performed by the Java HotSpot VM. +.TP +\f[CR]\-XX:+AggressiveHeap\f[R] +Enables Java heap optimization. +This sets various parameters to be optimal for long\-running jobs with +intensive memory allocation, based on the configuration of the computer +(RAM and CPU). +By default, the option is disabled and the heap sizes are configured +less aggressively. +.TP +\f[CR]\-XX:+AlwaysPreTouch\f[R] +Requests the VM to touch every page on the Java heap after requesting it +from the operating system and before handing memory out to the +application. +By default, this option is disabled and all pages are committed as the +application uses the heap space. +.TP +\f[CR]\-XX:ConcGCThreads=\f[R]\f[I]threads\f[R] +Sets the number of threads used for concurrent GC. +Sets \f[I]\f[CI]threads\f[I]\f[R] to approximately 1/4 of the number of +parallel garbage collection threads. +The default value depends on the number of CPUs available to the JVM. +.RS +.PP +For example, to set the number of threads for concurrent GC to 2, +specify the following option: +.RS +.PP +\f[CR]\-XX:ConcGCThreads=2\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+DisableExplicitGC\f[R] +Enables the option that disables processing of calls to the +\f[CR]System.gc()\f[R] method. +This option is disabled by default, meaning that calls to +\f[CR]System.gc()\f[R] are processed. +If processing of calls to \f[CR]System.gc()\f[R] is disabled, then the +JVM still performs GC when necessary. +.TP +\f[CR]\-XX:+ExplicitGCInvokesConcurrent\f[R] +Enables invoking of concurrent GC by using the \f[CR]System.gc()\f[R] +request. +This option is disabled by default and can be enabled only with the +\f[CR]\-XX:+UseG1GC\f[R] option. +.TP +\f[CR]\-XX:G1AdaptiveIHOPNumInitialSamples=\f[R]\f[I]number\f[R] +When \f[CR]\-XX:UseAdaptiveIHOP\f[R] is enabled, this option sets the +number of completed marking cycles used to gather samples until G1 +adaptively determines the optimum value of +\f[CR]\-XX:InitiatingHeapOccupancyPercent\f[R]. +Before, G1 uses the value of +\f[CR]\-XX:InitiatingHeapOccupancyPercent\f[R] directly for this +purpose. +The default value is 3. +.TP +\f[CR]\-XX:G1HeapRegionSize=\f[R]\f[I]size\f[R] +Sets the size of the regions into which the Java heap is subdivided when +using the garbage\-first (G1) collector. +The value is a power of 2 and can range from 1 MB to 32 MB. +The default region size is determined ergonomically based on the heap +size with a goal of approximately 2048 regions. +.RS +.PP +The following example sets the size of the subdivisions to 16 MB: +.RS +.PP +\f[CR]\-XX:G1HeapRegionSize=16m\f[R] +.RE +.RE +.TP +\f[CR]\-XX:G1HeapWastePercent=\f[R]\f[I]percent\f[R] +Sets the percentage of heap that you\[aq]re willing to waste. +The Java HotSpot VM doesn\[aq]t initiate the mixed garbage collection +cycle when the reclaimable percentage is less than the heap waste +percentage. +The default is 5 percent. +.TP +\f[CR]\-XX:G1MaxNewSizePercent=\f[R]\f[I]percent\f[R] +Sets the percentage of the heap size to use as the maximum for the young +generation size. +The default value is 60 percent of your Java heap. +.RS +.PP +This is an experimental flag. +This setting replaces the \f[CR]\-XX:DefaultMaxNewGenPercent\f[R] +setting. +.RE +.TP +\f[CR]\-XX:G1MixedGCCountTarget=\f[R]\f[I]number\f[R] +Sets the target number of mixed garbage collections after a marking +cycle to collect old regions with at most +\f[CR]G1MixedGCLIveThresholdPercent\f[R] live data. +The default is 8 mixed garbage collections. +The goal for mixed collections is to be within this target number. +.TP +\f[CR]\-XX:G1MixedGCLiveThresholdPercent=\f[R]\f[I]percent\f[R] +Sets the occupancy threshold for an old region to be included in a mixed +garbage collection cycle. +The default occupancy is 85 percent. +.RS +.PP +This is an experimental flag. +This setting replaces the +\f[CR]\-XX:G1OldCSetRegionLiveThresholdPercent\f[R] setting. +.RE +.TP +\f[CR]\-XX:G1NewSizePercent=\f[R]\f[I]percent\f[R] +Sets the percentage of the heap to use as the minimum for the young +generation size. +The default value is 5 percent of your Java heap. +.RS +.PP +This is an experimental flag. +This setting replaces the \f[CR]\-XX:DefaultMinNewGenPercent\f[R] +setting. +.RE +.TP +\f[CR]\-XX:G1OldCSetRegionThresholdPercent=\f[R]\f[I]percent\f[R] +Sets an upper limit on the number of old regions to be collected during +a mixed garbage collection cycle. +The default is 10 percent of the Java heap. +.TP +\f[CR]\-XX:G1ReservePercent=\f[R]\f[I]percent\f[R] +Sets the percentage of the heap (0 to 50) that\[aq]s reserved as a false +ceiling to reduce the possibility of promotion failure for the G1 +collector. +When you increase or decrease the percentage, ensure that you adjust the +total Java heap by the same amount. +By default, this option is set to 10%. +.RS +.PP +The following example sets the reserved heap to 20%: +.RS +.PP +\f[CR]\-XX:G1ReservePercent=20\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+G1UseAdaptiveIHOP\f[R] +Controls adaptive calculation of the old generation occupancy to start +background work preparing for an old generation collection. +If enabled, G1 uses \f[CR]\-XX:InitiatingHeapOccupancyPercent\f[R] for +the first few times as specified by the value of +\f[CR]\-XX:G1AdaptiveIHOPNumInitialSamples\f[R], and after that +adaptively calculates a new optimum value for the initiating occupancy +automatically. +Otherwise, the old generation collection process always starts at the +old generation occupancy determined by +\f[CR]\-XX:InitiatingHeapOccupancyPercent\f[R]. +.RS +.PP +The default is enabled. +.RE +.TP +\f[CR]\-XX:InitialHeapSize=\f[R]\f[I]size\f[R] +Sets the initial size (in bytes) of the memory allocation pool. +This value must be either 0, or a multiple of 1024 and greater than 1 +MB. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value is selected at run time based on the system +configuration. +.RS +.PP +The following examples show how to set the size of allocated memory to 6 +MB using various units: +.IP +.EX +\-XX:InitialHeapSize=6291456 +\-XX:InitialHeapSize=6144k +\-XX:InitialHeapSize=6m +.EE +.PP +If you set this option to 0, then the initial size is set as the sum of +the sizes allocated for the old generation and the young generation. +The size of the heap for the young generation can be set using the +\f[CR]\-XX:NewSize\f[R] option. +Note that the \f[CR]\-Xms\f[R] option sets both the minimum and the +initial heap size of the heap. +If \f[CR]\-Xms\f[R] appears after \f[CR]\-XX:InitialHeapSize\f[R] on the +command line, then the initial heap size gets set to the value specified +with \f[CR]\-Xms\f[R]. +.RE +.TP +\f[CR]\-XX:InitialRAMPercentage=\f[R]\f[I]percent\f[R] +Sets the initial amount of memory that the JVM will use for the Java +heap before applying ergonomics heuristics as a percentage of the +maximum amount determined as described in the \f[CR]\-XX:MaxRAM\f[R] +option. +The default value is 1.5625 percent. +.RS +.PP +The following example shows how to set the percentage of the initial +amount of memory used for the Java heap: +.RS +.PP +\f[CR]\-XX:InitialRAMPercentage=5\f[R] +.RE +.RE +.TP +\f[CR]\-XX:InitialSurvivorRatio=\f[R]\f[I]ratio\f[R] +Sets the initial survivor space ratio used by the throughput garbage +collector (which is enabled by the \f[CR]\-XX:+UseParallelGC\f[R] +option). +Adaptive sizing is enabled by default with the throughput garbage +collector by using the \f[CR]\-XX:+UseParallelGC\f[R] option, and the +survivor space is resized according to the application behavior, +starting with the initial value. +If adaptive sizing is disabled (using the +\f[CR]\-XX:\-UseAdaptiveSizePolicy\f[R] option), then the +\f[CR]\-XX:SurvivorRatio\f[R] option should be used to set the size of +the survivor space for the entire execution of the application. +.RS +.PP +The following formula can be used to calculate the initial size of +survivor space (S) based on the size of the young generation (Y), and +the initial survivor space ratio (R): +.RS +.PP +\f[CR]S=Y/(R+2)\f[R] +.RE +.PP +The 2 in the equation denotes two survivor spaces. +The larger the value specified as the initial survivor space ratio, the +smaller the initial survivor space size. +.PP +By default, the initial survivor space ratio is set to 8. +If the default value for the young generation space size is used (2 MB), +then the initial size of the survivor space is 0.2 MB. +.PP +The following example shows how to set the initial survivor space ratio +to 4: +.RS +.PP +\f[CR]\-XX:InitialSurvivorRatio=4\f[R] +.RE +.RE +.TP +\f[CR]\-XX:InitiatingHeapOccupancyPercent=\f[R]\f[I]percent\f[R] +Sets the percentage of the old generation occupancy (0 to 100) at which +to start the first few concurrent marking cycles for the G1 garbage +collector. +.RS +.PP +By default, the initiating value is set to 45%. +A value of 0 implies nonstop concurrent GC cycles from the beginning +until G1 adaptively sets this value. +.PP +See also the \f[CR]\-XX:G1UseAdaptiveIHOP\f[R] and +\f[CR]\-XX:G1AdaptiveIHOPNumInitialSamples\f[R] options. +.PP +The following example shows how to set the initiating heap occupancy to +75%: +.RS +.PP +\f[CR]\-XX:InitiatingHeapOccupancyPercent=75\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxGCPauseMillis=\f[R]\f[I]time\f[R] +Sets a target for the maximum GC pause time (in milliseconds). +This is a soft goal, and the JVM will make its best effort to achieve +it. +The specified value doesn\[aq]t adapt to your heap size. +By default, for G1 the maximum pause time target is 200 milliseconds. +The other generational collectors do not use a pause time goal by +default. +.RS +.PP +The following example shows how to set the maximum target pause time to +500 ms: +.RS +.PP +\f[CR]\-XX:MaxGCPauseMillis=500\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxHeapSize=\f[R]\f[I]size\f[R] +Sets the maximum size (in byes) of the memory allocation pool. +This value must be a multiple of 1024 and greater than 2 MB. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value is selected at run time based on the system +configuration. +For server deployments, the options \f[CR]\-XX:InitialHeapSize\f[R] and +\f[CR]\-XX:MaxHeapSize\f[R] are often set to the same value. +.RS +.PP +The following examples show how to set the maximum allowed size of +allocated memory to 80 MB using various units: +.IP +.EX +\-XX:MaxHeapSize=83886080 +\-XX:MaxHeapSize=81920k +\-XX:MaxHeapSize=80m +.EE +.PP +The \f[CR]\-XX:MaxHeapSize\f[R] option is equivalent to +\f[CR]\-Xmx\f[R]. +.RE +.TP +\f[CR]\-XX:MaxHeapFreeRatio=\f[R]\f[I]percent\f[R] +Sets the maximum allowed percentage of free heap space (0 to 100) after +a GC event. +If free heap space expands above this value, then the heap is shrunk. +By default, this value is set to 70%. +.RS +.PP +Minimize the Java heap size by lowering the values of the parameters +\f[CR]MaxHeapFreeRatio\f[R] (default value is 70%) and +\f[CR]MinHeapFreeRatio\f[R] (default value is 40%) with the +command\-line options \f[CR]\-XX:MaxHeapFreeRatio\f[R] and +\f[CR]\-XX:MinHeapFreeRatio\f[R]. +Lowering \f[CR]MaxHeapFreeRatio\f[R] to as low as 10% and +\f[CR]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size +without too much performance regression; however, results may vary +greatly depending on your application. +Try different values for these parameters until they\[aq]re as low as +possible yet still retain acceptable performance. +.RS +.PP +\f[CR]\-XX:MaxHeapFreeRatio=10 \-XX:MinHeapFreeRatio=5\f[R] +.RE +.PP +Customers trying to keep the heap small should also add the option +\f[CR]\-XX:\-ShrinkHeapInSteps\f[R]. +See \f[B]Performance Tuning Examples\f[R] for a description of using +this option to keep the Java heap small by reducing the dynamic +footprint for embedded applications. +.RE +.TP +\f[CR]\-XX:MaxMetaspaceSize=\f[R]\f[I]size\f[R] +Sets the maximum amount of native memory that can be allocated for class +metadata. +By default, the size isn\[aq]t limited. +The amount of metadata for an application depends on the application +itself, other running applications, and the amount of memory available +on the system. +.RS +.PP +The following example shows how to set the maximum class metadata size +to 256 MB: +.RS +.PP +\f[CR]\-XX:MaxMetaspaceSize=256m\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxNewSize=\f[R]\f[I]size\f[R] +Sets the maximum size (in bytes) of the heap for the young generation +(nursery). +The default value is set ergonomically. +.TP +\f[CR]\-XX:MaxRAM=\f[R]\f[I]size\f[R] +Sets the maximum amount of memory that the JVM may use for the Java heap +before applying ergonomics heuristics. +The default value is the maximum amount of available memory to the JVM +process or 128 GB, whichever is lower. +.RS +.PP +The maximum amount of available memory to the JVM process is the minimum +of the machine\[aq]s physical memory and any constraints set by the +environment (e.g. +container). +.PP +Specifying this option disables automatic use of compressed oops if the +combined result of this and other options influencing the maximum amount +of memory is larger than the range of memory addressable by compressed +oops. +See \f[CR]\-XX:UseCompressedOops\f[R] for further information about +compressed oops. +.PP +The following example shows how to set the maximum amount of available +memory for sizing the Java heap to 2 GB: +.RS +.PP +\f[CR]\-XX:MaxRAM=2G\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxRAMPercentage=\f[R]\f[I]percent\f[R] +Sets the maximum amount of memory that the JVM may use for the Java heap +before applying ergonomics heuristics as a percentage of the maximum +amount determined as described in the \f[CR]\-XX:MaxRAM\f[R] option. +The default value is 25 percent. +.RS +.PP +Specifying this option disables automatic use of compressed oops if the +combined result of this and other options influencing the maximum amount +of memory is larger than the range of memory addressable by compressed +oops. +See \f[CR]\-XX:UseCompressedOops\f[R] for further information about +compressed oops. +.PP +The following example shows how to set the percentage of the maximum +amount of memory used for the Java heap: +.RS +.PP +\f[CR]\-XX:MaxRAMPercentage=75\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MinRAMPercentage=\f[R]\f[I]percent\f[R] +Sets the maximum amount of memory that the JVM may use for the Java heap +before applying ergonomics heuristics as a percentage of the maximum +amount determined as described in the \f[CR]\-XX:MaxRAM\f[R] option for +small heaps. +A small heap is a heap of approximately 125 MB. +The default value is 50 percent. +.RS +.PP +The following example shows how to set the percentage of the maximum +amount of memory used for the Java heap for small heaps: +.RS +.PP +\f[CR]\-XX:MinRAMPercentage=75\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MaxTenuringThreshold=\f[R]\f[I]threshold\f[R] +Sets the maximum tenuring threshold for use in adaptive GC sizing. +The largest value is 15. +The default value is 15 for the parallel (throughput) collector. +.RS +.PP +The following example shows how to set the maximum tenuring threshold to +10: +.RS +.PP +\f[CR]\-XX:MaxTenuringThreshold=10\f[R] +.RE +.RE +.TP +\f[CR]\-XX:MetaspaceSize=\f[R]\f[I]size\f[R] +Sets the size of the allocated class metadata space that triggers a +garbage collection the first time it\[aq]s exceeded. +This threshold for a garbage collection is increased or decreased +depending on the amount of metadata used. +The default size depends on the platform. +.TP +\f[CR]\-XX:MinHeapFreeRatio=\f[R]\f[I]percent\f[R] +Sets the minimum allowed percentage of free heap space (0 to 100) after +a GC event. +If free heap space falls below this value, then the heap is expanded. +By default, this value is set to 40%. +.RS +.PP +Minimize Java heap size by lowering the values of the parameters +\f[CR]MaxHeapFreeRatio\f[R] (default value is 70%) and +\f[CR]MinHeapFreeRatio\f[R] (default value is 40%) with the +command\-line options \f[CR]\-XX:MaxHeapFreeRatio\f[R] and +\f[CR]\-XX:MinHeapFreeRatio\f[R]. +Lowering \f[CR]MaxHeapFreeRatio\f[R] to as low as 10% and +\f[CR]MinHeapFreeRatio\f[R] to 5% has successfully reduced the heap size +without too much performance regression; however, results may vary +greatly depending on your application. +Try different values for these parameters until they\[aq]re as low as +possible, yet still retain acceptable performance. +.RS +.PP +\f[CR]\-XX:MaxHeapFreeRatio=10 \-XX:MinHeapFreeRatio=5\f[R] +.RE +.PP +Customers trying to keep the heap small should also add the option +\f[CR]\-XX:\-ShrinkHeapInSteps\f[R]. +See \f[B]Performance Tuning Examples\f[R] for a description of using +this option to keep the Java heap small by reducing the dynamic +footprint for embedded applications. +.RE +.TP +\f[CR]\-XX:MinHeapSize=\f[R]\f[I]size\f[R] +Sets the minimum size (in bytes) of the memory allocation pool. +This value must be either 0, or a multiple of 1024 and greater than 1 +MB. +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +The default value is selected at run time based on the system +configuration. +.RS +.PP +The following examples show how to set the minimum size of allocated +memory to 6 MB using various units: +.IP +.EX +\-XX:MinHeapSize=6291456 +\-XX:MinHeapSize=6144k +\-XX:MinHeapSize=6m +.EE +.PP +If you set this option to 0, then the minimum size is set to the same +value as the initial size. +.RE +.TP +\f[CR]\-XX:NewRatio=\f[R]\f[I]ratio\f[R] +Sets the ratio between young and old generation sizes. +By default, this option is set to 2. +The following example shows how to set the young\-to\-old ratio to 1: +.RS +.RS +.PP +\f[CR]\-XX:NewRatio=1\f[R] +.RE +.RE +.TP +\f[CR]\-XX:NewSize=\f[R]\f[I]size\f[R] +Sets the initial size (in bytes) of the heap for the young generation +(nursery). +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +.RS +.PP +The young generation region of the heap is used for new objects. +GC is performed in this region more often than in other regions. +If the size for the young generation is too low, then a large number of +minor GCs are performed. +If the size is too high, then only full GCs are performed, which can +take a long time to complete. +It is recommended that you keep the size for the young generation +greater than 25% and less than 50% of the overall heap size. +.PP +The following examples show how to set the initial size of the young +generation to 256 MB using various units: +.IP +.EX +\-XX:NewSize=256m +\-XX:NewSize=262144k +\-XX:NewSize=268435456 +.EE +.PP +The \f[CR]\-XX:NewSize\f[R] option is equivalent to \f[CR]\-Xmn\f[R]. +.RE +.TP +\f[CR]\-XX:ParallelGCThreads=\f[R]\f[I]threads\f[R] +Sets the number of the stop\-the\-world (STW) worker threads. +The default value depends on the number of CPUs available to the JVM and +the garbage collector selected. +.RS +.PP +For example, to set the number of threads for G1 GC to 2, specify the +following option: +.RS +.PP +\f[CR]\-XX:ParallelGCThreads=2\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+ParallelRefProcEnabled\f[R] +Enables parallel reference processing. +By default, collectors employing multiple threads perform parallel +reference processing if the number of parallel threads to use is larger +than one. +The option is available only when the throughput or G1 garbage collector +is used (\f[CR]\-XX:+UseParallelGC\f[R] or \f[CR]\-XX:+UseG1GC\f[R]). +Other collectors employing multiple threads always perform reference +processing in parallel. +.TP +\f[CR]\-XX:+PrintAdaptiveSizePolicy\f[R] +Enables printing of information about adaptive\-generation sizing. +By default, this option is disabled. +.TP +\f[CR]\-XX:SoftRefLRUPolicyMSPerMB=\f[R]\f[I]time\f[R] +Sets the amount of time (in milliseconds) a softly reachable object is +kept active on the heap after the last time it was referenced. +The default value is one second of lifetime per free megabyte in the +heap. +The \f[CR]\-XX:SoftRefLRUPolicyMSPerMB\f[R] option accepts integer +values representing milliseconds per one megabyte of the current heap +size (for Java HotSpot Client VM) or the maximum possible heap size (for +Java HotSpot Server VM). +This difference means that the Client VM tends to flush soft references +rather than grow the heap, whereas the Server VM tends to grow the heap +rather than flush soft references. +In the latter case, the value of the \f[CR]\-Xmx\f[R] option has a +significant effect on how quickly soft references are garbage collected. +.RS +.PP +The following example shows how to set the value to 2.5 seconds: +.PP +\f[CR]\-XX:SoftRefLRUPolicyMSPerMB=2500\f[R] +.RE +.TP +\f[CR]\-XX:\-ShrinkHeapInSteps\f[R] +Incrementally reduces the Java heap to the target size, specified by the +option \f[CR]\-XX:MaxHeapFreeRatio\f[R]. +This option is enabled by default. +If disabled, then it immediately reduces the Java heap to the target +size instead of requiring multiple garbage collection cycles. +Disable this option if you want to minimize the Java heap size. +You will likely encounter performance degradation when this option is +disabled. +.RS +.PP +See \f[B]Performance Tuning Examples\f[R] for a description of using the +\f[CR]MaxHeapFreeRatio\f[R] option to keep the Java heap small by +reducing the dynamic footprint for embedded applications. +.RE +.TP +\f[CR]\-XX:StringDeduplicationAgeThreshold=\f[R]\f[I]threshold\f[R] +Identifies \f[CR]String\f[R] objects reaching the specified age that are +considered candidates for deduplication. +An object\[aq]s age is a measure of how many times it has survived +garbage collection. +This is sometimes referred to as tenuring. +.RS +.RS +.PP +\f[B]Note:\f[R] \f[CR]String\f[R] objects that are promoted to an old +heap region before this age has been reached are always considered +candidates for deduplication. +The default value for this option is \f[CR]3\f[R]. +See the \f[CR]\-XX:+UseStringDeduplication\f[R] option. +.RE +.RE +.TP +\f[CR]\-XX:SurvivorRatio=\f[R]\f[I]ratio\f[R] +Sets the ratio between eden space size and survivor space size. +By default, this option is set to 8. +The following example shows how to set the eden/survivor space ratio to +4: +.RS +.RS +.PP +\f[CR]\-XX:SurvivorRatio=4\f[R] +.RE +.RE +.TP +\f[CR]\-XX:TargetSurvivorRatio=\f[R]\f[I]percent\f[R] +Sets the desired percentage of survivor space (0 to 100) used after +young garbage collection. +By default, this option is set to 50%. +.RS +.PP +The following example shows how to set the target survivor space ratio +to 30%: +.RS +.PP +\f[CR]\-XX:TargetSurvivorRatio=30\f[R] +.RE +.RE +.TP +\f[CR]\-XX:TLABSize=\f[R]\f[I]size\f[R] +Sets the initial size (in bytes) of a thread\-local allocation buffer +(TLAB). +Append the letter \f[CR]k\f[R] or \f[CR]K\f[R] to indicate kilobytes, +\f[CR]m\f[R] or \f[CR]M\f[R] to indicate megabytes, or \f[CR]g\f[R] or +\f[CR]G\f[R] to indicate gigabytes. +If this option is set to 0, then the JVM selects the initial size +automatically. +.RS +.PP +The following example shows how to set the initial TLAB size to 512 KB: +.RS +.PP +\f[CR]\-XX:TLABSize=512k\f[R] +.RE +.RE +.TP +\f[CR]\-XX:+UseAdaptiveSizePolicy\f[R] +Enables the use of adaptive generation sizing. +This option is enabled by default. +To disable adaptive generation sizing, specify +\f[CR]\-XX:\-UseAdaptiveSizePolicy\f[R] and set the size of the memory +allocation pool explicitly. +See the \f[CR]\-XX:SurvivorRatio\f[R] option. +.TP +\f[CR]\-XX:+UseG1GC\f[R] +Enables the use of the garbage\-first (G1) garbage collector. +It\[aq]s a server\-style garbage collector, targeted for multiprocessor +machines with a large amount of RAM. +This option meets GC pause time goals with high probability, while +maintaining good throughput. +The G1 collector is recommended for applications requiring large heaps +(sizes of around 6 GB or larger) with limited GC latency requirements (a +stable and predictable pause time below 0.5 seconds). +By default, this option is enabled and G1 is used as the default garbage +collector. +.TP +\f[CR]\-XX:+UseGCOverheadLimit\f[R] +Enables the use of a policy that limits the proportion of time spent by +the JVM on GC before an \f[CR]OutOfMemoryError\f[R] exception is thrown. +This option is enabled, by default, and the parallel GC will throw an +\f[CR]OutOfMemoryError\f[R] if more than 98% of the total time is spent +on garbage collection and less than 2% of the heap is recovered. +When the heap is small, this feature can be used to prevent applications +from running for long periods of time with little or no progress. +To disable this option, specify the option +\f[CR]\-XX:\-UseGCOverheadLimit\f[R]. +.TP +\f[CR]\-XX:+UseNUMA\f[R] +Enables performance optimization of an application on a machine with +nonuniform memory architecture (NUMA) by increasing the +application\[aq]s use of lower latency memory. +The default value for this option depends on the garbage collector. +.TP +\f[CR]\-XX:+UseParallelGC\f[R] +Enables the use of the parallel scavenge garbage collector (also known +as the throughput collector) to improve the performance of your +application by leveraging multiple processors. +.RS +.PP +By default, this option is disabled and the default collector is used. +.RE +.TP +\f[CR]\-XX:+UseSerialGC\f[R] +Enables the use of the serial garbage collector. +This is generally the best choice for small and simple applications that +don\[aq]t require any special functionality from garbage collection. +By default, this option is disabled and the default collector is used. +.TP +\f[CR]\-XX:+UseStringDeduplication\f[R] +Enables string deduplication. +By default, this option is disabled. +To use this option, you must enable the garbage\-first (G1) garbage +collector. +.RS +.PP +String deduplication reduces the memory footprint of \f[CR]String\f[R] +objects on the Java heap by taking advantage of the fact that many +\f[CR]String\f[R] objects are identical. +Instead of each \f[CR]String\f[R] object pointing to its own character +array, identical \f[CR]String\f[R] objects can point to and share the +same character array. +.RE +.TP +\f[CR]\-XX:+UseTLAB\f[R] +Enables the use of thread\-local allocation blocks (TLABs) in the young +generation space. +This option is enabled by default. +To disable the use of TLABs, specify the option +\f[CR]\-XX:\-UseTLAB\f[R]. +.TP +\f[CR]\-XX:+UseZGC\f[R] +Enables the use of the Z garbage collector (ZGC). +This is a low latency garbage collector, providing max pause times of a +few milliseconds, at some throughput cost. +Pause times are independent of what heap size is used. +Supports heap sizes from 8MB to 16TB. +.TP +\f[CR]\-XX:ZAllocationSpikeTolerance=\f[R]\f[I]factor\f[R] +Sets the allocation spike tolerance for ZGC. +By default, this option is set to 2.0. +This factor describes the level of allocation spikes to expect. +For example, using a factor of 3.0 means the current allocation rate can +be expected to triple at any time. +.TP +\f[CR]\-XX:ZCollectionInterval=\f[R]\f[I]seconds\f[R] +Sets the maximum interval (in seconds) between two GC cycles when using +ZGC. +By default, this option is set to 0 (disabled). +.TP +\f[CR]\-XX:ZFragmentationLimit=\f[R]\f[I]percent\f[R] +Sets the maximum acceptable heap fragmentation (in percent) for ZGC. +By default, this option is set to 25. +Using a lower value will cause the heap to be compacted more +aggressively, to reclaim more memory at the cost of using more CPU time. +.TP +\f[CR]\-XX:+ZProactive\f[R] +Enables proactive GC cycles when using ZGC. +By default, this option is enabled. +ZGC will start a proactive GC cycle if doing so is expected to have +minimal impact on the running application. +This is useful if the application is mostly idle or allocates very few +objects, but you still want to keep the heap size down and allow +reference processing to happen even when there are a lot of free space +on the heap. +.TP +\f[CR]\-XX:+ZUncommit\f[R] +Enables uncommitting of unused heap memory when using ZGC. +By default, this option is enabled. +Uncommitting unused heap memory will lower the memory footprint of the +JVM, and make that memory available for other processes to use. +.TP +\f[CR]\-XX:ZUncommitDelay=\f[R]\f[I]seconds\f[R] +Sets the amount of time (in seconds) that heap memory must have been +unused before being uncommitted. +By default, this option is set to 300 (5 minutes). +Committing and uncommitting memory are relatively expensive operations. +Using a lower value will cause heap memory to be uncommitted earlier, at +the risk of soon having to commit it again. +.TP +\f[CR]\-XX:+UseShenandoahGC\f[R] +Enables the use of the Shenandoah garbage collector. +This is a low pause time, concurrent garbage collector. +Its pause times are not proportional to the size of the heap. +Shenandoah garbage collector can work with compressed pointers. +See \f[CR]\-XX:UseCompressedOops\f[R] for further information about +compressed pointers. +.TP +\f[CR]\-XX:ShenandoahGCMode=\f[R]\f[I]mode\f[R] +Sets the GC mode for Shenandoah GC to use. +By default, this option is set to \f[CR]satb\f[R]. +Among other things, this defines which barriers are in use. +Possible mode values include the following: +.RS +.TP +\f[CR]satb\f[R] +Snapshot\-at\-the\-beginning concurrent GC (three pass +mark\-evac\-update). +It is a single generation GC. +.TP +\f[CR]generational\f[R] +It is also a snapshot\-at\-the\-beginning and concurrent GC, but it is +generational. +Please see \f[B]JEP 404\f[R] [https://openjdk.org/jeps/404] and \f[B]JEP +521\f[R] [https://openjdk.org/jeps/521] for its advantages and risks. +.RE +.TP +\f[CR]\-XX:ShenandoahGCHeuristics=\f[R]\f[I]heuristics\f[R] +Sets the heuristics for Shenandoah GC to use. +By default, this option is set to \f[CR]adaptive\f[R]. +This fine\-tunes the GC mode selected, by choosing when to start the GC, +how much to process on each cycle, and what other features to +automatically enable. +When \f[CR]\-XX:ShenandoahGCMode\f[R] is \f[CR]generational\f[R], the +only supported option is the default, \f[CR]adaptive\f[R]. +.RS +.PP +Possible heuristics are the following: +.TP +\f[CR]adaptive\f[R] +To maintain the given amount of free heap at all times, even during the +GC cycle. +.TP +\f[CR]static\f[R] +Trigger GC when free heap falls below a specified threshold. +.TP +\f[CR]compact\f[R] +Run GC more frequently and with deeper targets to free up more memory. +.RE +.SH DEPRECATED JAVA OPTIONS +These \f[CR]java\f[R] options are deprecated and might be removed in a +future JDK release. +They\[aq]re still accepted and acted upon, but a warning is issued when +they\[aq]re used. +.TP +\f[CR]\-Xloggc:\f[R]\f[I]filename\f[R] +Sets the file to which verbose GC events information should be +redirected for logging. +The \f[CR]\-Xloggc\f[R] option overrides \f[CR]\-verbose:gc\f[R] if both +are given with the same java command. +\f[CR]\-Xloggc:\f[R]\f[I]filename\f[R] is replaced by +\f[CR]\-Xlog:gc:\f[R]\f[I]filename\f[R]. +See Enable Logging with the JVM Unified Logging Framework. +.RS +.PP +Example: +.PP +\f[CR]\-Xlog:gc:garbage\-collection.log\f[R] +.RE +.TP +\f[CR]\-XX:+FlightRecorder\f[R] +Enables the use of Java Flight Recorder (JFR) during the runtime of the +application. +Since JDK 8u40 this option has not been required to use JFR. +.SH OBSOLETE JAVA OPTIONS +These \f[CR]java\f[R] options are still accepted but ignored, and a +warning is issued when they\[aq]re used. +.TP +\f[CR]\-\-illegal\-access=\f[R]\f[I]parameter\f[R] +Controlled \f[I]relaxed strong encapsulation\f[R], as defined in +\f[B]JEP 261\f[R] +[https://openjdk.org/jeps/261#Relaxed\-strong\-encapsulation]. +This option was deprecated in JDK 16 by \f[B]JEP 396\f[R] +[https://openjdk.org/jeps/396] and made obsolete in JDK 17 by \f[B]JEP +403\f[R] [https://openjdk.org/jeps/403]. +.SH REMOVED JAVA OPTIONS +These \f[CR]java\f[R] options have been removed in JDK 25 and using them +results in an error of: +.RS +.PP +\f[CR]Unrecognized VM option\f[R] \f[I]option\-name\f[R] +.RE +.TP +\f[CR]\-XX:RTMAbortRatio=\f[R]\f[I]abort_ratio\f[R] +Specifies the RTM abort ratio is specified as a percentage (%) of all +executed RTM transactions. +If a number of aborted transactions becomes greater than this ratio, +then the compiled code is deoptimized. +This ratio is used when the \f[CR]\-XX:+UseRTMDeopt\f[R] option is +enabled. +The default value of this option is 50. +This means that the compiled code is deoptimized if 50% of all +transactions are aborted. +.TP +\f[CR]\-XX:RTMRetryCount=\f[R]\f[I]number_of_retries\f[R] +Specifies the number of times that the RTM locking code is retried, when +it is aborted or busy, before falling back to the normal locking +mechanism. +The default value for this option is 5. +The \f[CR]\-XX:UseRTMLocking\f[R] option must be enabled. +.TP +\f[CR]\-XX:+UseRTMDeopt\f[R] +Autotunes RTM locking depending on the abort ratio. +This ratio is specified by the \f[CR]\-XX:RTMAbortRatio\f[R] option. +If the number of aborted transactions exceeds the abort ratio, then the +method containing the lock is deoptimized and recompiled with all locks +as normal locks. +This option is disabled by default. +The \f[CR]\-XX:+UseRTMLocking\f[R] option must be enabled. +.TP +\f[CR]\-XX:+UseRTMLocking\f[R] +Generates Restricted Transactional Memory (RTM) locking code for all +inflated locks, with the normal locking mechanism as the fallback +handler. +This option is disabled by default. +Options related to RTM are available only on x86 CPUs that support +Transactional Synchronization Extensions (TSX). +.RS +.PP +RTM is part of Intel\[aq]s TSX, which is an x86 instruction set +extension and facilitates the creation of multithreaded applications. +RTM introduces the new instructions \f[CR]XBEGIN\f[R], +\f[CR]XABORT\f[R], \f[CR]XEND\f[R], and \f[CR]XTEST\f[R]. +The \f[CR]XBEGIN\f[R] and \f[CR]XEND\f[R] instructions enclose a set of +instructions to run as a transaction. +If no conflict is found when running the transaction, then the memory +and register modifications are committed together at the \f[CR]XEND\f[R] +instruction. +The \f[CR]XABORT\f[R] instruction can be used to explicitly abort a +transaction and the \f[CR]XTEST\f[R] instruction checks if a set of +instructions is being run in a transaction. +.PP +A lock on a transaction is inflated when another thread tries to access +the same transaction, thereby blocking the thread that didn\[aq]t +originally request access to the transaction. +RTM requires that a fallback set of operations be specified in case a +transaction aborts or fails. +An RTM lock is a lock that has been delegated to the TSX\[aq]s system. +.PP +RTM improves performance for highly contended locks with low conflict in +a critical region (which is code that must not be accessed by more than +one thread concurrently). +RTM also improves the performance of coarse\-grain locking, which +typically doesn\[aq]t perform well in multithreaded applications. +(Coarse\-grain locking is the strategy of holding locks for long periods +to minimize the overhead of taking and releasing locks, while +fine\-grained locking is the strategy of trying to achieve maximum +parallelism by locking only when necessary and unlocking as soon as +possible.) +Also, for lightly contended locks that are used by different threads, +RTM can reduce false cache line sharing, also known as cache line +ping\-pong. +This occurs when multiple threads from different processors are +accessing different resources, but the resources share the same cache +line. +As a result, the processors repeatedly invalidate the cache lines of +other processors, which forces them to read from main memory instead of +their cache. +.RE +.PP +For the lists and descriptions of options removed in previous releases +see the \f[I]Removed Java Options\f[R] section in: +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 24\f[R] +[https://docs.oracle.com/en/java/javase/24/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 23\f[R] +[https://docs.oracle.com/en/java/javase/23/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 22\f[R] +[https://docs.oracle.com/en/java/javase/22/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 21\f[R] +[https://docs.oracle.com/en/java/javase/21/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 20\f[R] +[https://docs.oracle.com/en/java/javase/20/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 19\f[R] +[https://docs.oracle.com/en/java/javase/19/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 18\f[R] +[https://docs.oracle.com/en/java/javase/18/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 17\f[R] +[https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 16\f[R] +[https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 15\f[R] +[https://docs.oracle.com/en/java/javase/15/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 14\f[R] +[https://docs.oracle.com/en/java/javase/14/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]The \f[CB]java\f[B] Command, Release 13\f[R] +[https://docs.oracle.com/en/java/javase/13/docs/specs/man/java.html] +.IP \[bu] 2 +\f[B]Java Platform, Standard Edition Tools Reference, Release 12\f[R] +[https://docs.oracle.com/en/java/javase/12/tools/java.html#GUID\-3B1CE181\-CD30\-4178\-9602\-230B800D4FAE] +.IP \[bu] 2 +\f[B]Java Platform, Standard Edition Tools Reference, Release 11\f[R] +[https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID\-741FC470\-AA3E\-494A\-8D2B\-1B1FE4A990D1] +.IP \[bu] 2 +\f[B]Java Platform, Standard Edition Tools Reference, Release 10\f[R] +[https://docs.oracle.com/javase/10/tools/java.htm#JSWOR624] +.IP \[bu] 2 +\f[B]Java Platform, Standard Edition Tools Reference, Release 9\f[R] +[https://docs.oracle.com/javase/9/tools/java.htm#JSWOR624] +.IP \[bu] 2 +\f[B]Java Platform, Standard Edition Tools Reference, Release 8 for +Oracle JDK on Windows\f[R] +[https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BGBCIEFC] +.IP \[bu] 2 +\f[B]Java Platform, Standard Edition Tools Reference, Release 8 for +Oracle JDK on Solaris, Linux, and macOS\f[R] +[https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BGBCIEFC] +.SH JAVA COMMAND\-LINE ARGUMENT FILES +You can shorten or simplify the \f[CR]java\f[R] command by using +\f[CR]\[at]\f[R] argument files to specify one or more text files that +contain arguments, such as options and class names, which are passed to +the \f[CR]java\f[R] command. +This let\[aq]s you to create \f[CR]java\f[R] commands of any length on +any operating system. +.PP +In the command line, use the at sign (\f[CR]\[at]\f[R]) prefix to +identify an argument file that contains \f[CR]java\f[R] options and +class names. +When the \f[CR]java\f[R] command encounters a file beginning with the at +sign (\f[CR]\[at]\f[R]), it expands the contents of that file into an +argument list just as they would be specified on the command line. +.PP +The \f[CR]java\f[R] launcher expands the argument file contents until it +encounters the \f[CR]\-\-disable\-\[at]files\f[R] option. +You can use the \f[CR]\-\-disable\-\[at]files\f[R] option anywhere on +the command line, including in an argument file, to stop +\f[CR]\[at]\f[R] argument files expansion. +.PP +The following items describe the syntax of \f[CR]java\f[R] argument +files: +.IP \[bu] 2 +The argument file must contain only ASCII characters or characters in +system default encoding that\[aq]s ASCII friendly, such as UTF\-8. +.IP \[bu] 2 +The argument file size must not exceed MAXINT (2,147,483,647) bytes. +.IP \[bu] 2 +The launcher doesn\[aq]t expand wildcards that are present within an +argument file. +That means an asterisk (\f[CR]*\f[R]) is passed on as\-is to the +starting VM. +For example \f[CR]*.java\f[R] stays \f[CR]*.java\f[R] and is not +expanded to \f[CR]Foo.java Bar.java ...\f[R], as would happen with some +command line shells. +.IP \[bu] 2 +Use white space or new line characters to separate arguments included in +the file. +.IP \[bu] 2 +White space includes a white space character, \f[CR]\[rs]t\f[R], +\f[CR]\[rs]n\f[R], \f[CR]\[rs]r\f[R], and \f[CR]\[rs]f\f[R]. +.RS 2 +.PP +For example, it is possible to have a path with a space, such as +\f[CR]c:\[rs]Program Files\f[R] that can be specified as either +\f[CR]\[dq]c:\[rs]\[rs]Program Files\[dq]\f[R] or, to avoid an escape, +\f[CR]c:\[rs]Program\[dq] \[dq]Files\f[R]. +.RE +.IP \[bu] 2 +Any option that contains spaces, such as a path component, must be +within quotation marks using quotation (\[aq]\[dq]\[aq]) characters in +its entirety. +.IP \[bu] 2 +A string within quotation marks may contain the characters +\f[CR]\[rs]n\f[R], \f[CR]\[rs]r\f[R], \f[CR]\[rs]t\f[R], and +\f[CR]\[rs]f\f[R]. +They are converted to their respective ASCII codes. +.IP \[bu] 2 +If a file name contains embedded spaces, then put the whole file name in +double quotation marks. +.IP \[bu] 2 +File names in an argument file are relative to the current directory, +not to the location of the argument file. +.IP \[bu] 2 +Use the number sign \f[CR]#\f[R] in the argument file to identify +comments. +All characters following the \f[CR]#\f[R] are ignored until the end of +line. +.IP \[bu] 2 +Additional at sign \f[CR]\[at]\f[R] prefixes to \f[CR]\[at]\f[R] +prefixed options act as an escape, (the first \f[CR]\[at]\f[R] is +removed and the rest of the arguments are presented to the launcher +literally). +.IP \[bu] 2 +Lines may be continued using the continuation character +(\f[CR]\[rs]\f[R]) at the end\-of\-line. +The two lines are concatenated with the leading white spaces trimmed. +To prevent trimming the leading white spaces, a continuation character +(\f[CR]\[rs]\f[R]) may be placed at the first column. +.IP \[bu] 2 +Because backslash (\[rs]) is an escape character, a backslash character +must be escaped with another backslash character. +.IP \[bu] 2 +Partial quote is allowed and is closed by an end\-of\-file. +.IP \[bu] 2 +An open quote stops at end\-of\-line unless \f[CR]\[rs]\f[R] is the last +character, which then joins the next line by removing all leading white +space characters. +.IP \[bu] 2 +Use of the at sign (\f[CR]\[at]\f[R]) to recursively interpret files +isn\[aq]t supported. +.SS Example of Open or Partial Quotes in an Argument File +In the argument file, +.IP +.EX +\-cp \[dq]lib/ +cool/ +app/ +jars +.EE +.PP +this is interpreted as: +.RS +.PP +\f[CR]\-cp lib/cool/app/jars\f[R] +.RE +.SS Example of a Backslash Character Escaped with Another Backslash Character in an Argument File +To output the following: +.RS +.PP +\f[CR]\-cp c:\[rs]Program Files (x86)\[rs]Java\[rs]jre\[rs]lib\[rs]ext;c:\[rs]Program Files\[rs]Java\[rs]jre9\[rs]lib\[rs]ext\f[R] +.RE +.PP +The backslash character must be specified in the argument file as: +.RS +.PP +\f[CR]\-cp \[dq]c:\[rs]\[rs]Program Files (x86)\[rs]\[rs]Java\[rs]\[rs]jre\[rs]\[rs]lib\[rs]\[rs]ext;c:\[rs]\[rs]Program Files\[rs]\[rs]Java\[rs]\[rs]jre9\[rs]\[rs]lib\[rs]\[rs]ext\[dq]\f[R] +.RE +.SS Example of an EOL Escape Used to Force Concatenation of Lines in an Argument File +In the argument file, +.IP +.EX +\-cp \[dq]/lib/cool app/jars:\[rs] + /lib/another app/jars\[dq] +.EE +.PP +This is interpreted as: +.RS +.PP +\f[CR]\-cp /lib/cool app/jars:/lib/another app/jars\f[R] +.RE +.SS Example of Line Continuation with Leading Spaces in an Argument File +In the argument file, +.IP +.EX +\-cp \[dq]/lib/cool\[rs] +\[rs]app/jars\[dq] +.EE +.PP +This is interpreted as: +.PP +\f[CR]\-cp /lib/cool app/jars\f[R] +.SS Examples of Using Single Argument File +You can use a single argument file, such as \f[CR]myargumentfile\f[R] in +the following example, to hold all required \f[CR]java\f[R] arguments: +.RS +.PP +\f[CR]java \[at]myargumentfile\f[R] +.RE +.SS Examples of Using Argument Files with Paths +You can include relative paths in argument files; however, they\[aq]re +relative to the current working directory and not to the paths of the +argument files themselves. +In the following example, \f[CR]path1/options\f[R] and +\f[CR]path2/options\f[R] represent argument files with different paths. +Any relative paths that they contain are relative to the current working +directory and not to the argument files: +.RS +.PP +\f[CR]java \[at]path1/options \[at]path2/classes\f[R] +.RE +.SH CODE HEAP STATE ANALYTICS +.SS Overview +There are occasions when having insight into the current state of the +JVM code heap would be helpful to answer questions such as: +.IP \[bu] 2 +Why was the JIT turned off and then on again and again? +.IP \[bu] 2 +Where has all the code heap space gone? +.IP \[bu] 2 +Why is the method sweeper not working effectively? +.PP +To provide this insight, a code heap state analytics feature has been +implemented that enables on\-the\-fly analysis of the code heap. +The analytics process is divided into two parts. +The first part examines the entire code heap and aggregates all +information that is believed to be useful or important. +The second part consists of several independent steps that print the +collected information with an emphasis on different aspects of the data. +Data collection and printing are done on an \[dq]on request\[dq] basis. +.SS Syntax +Requests for real\-time, on\-the\-fly analysis can be issued with the +following command: +.RS +.PP +\f[CR]jcmd\f[R] \f[I]pid\f[R] \f[CR]Compiler.CodeHeap_Analytics\f[R] +[\f[I]function\f[R]] [\f[I]granularity\f[R]] +.RE +.PP +If you are only interested in how the code heap looks like after running +a sample workload, you can use the command line option: +.RS +.PP +\f[CR]\-Xlog:codecache=Trace\f[R] +.RE +.PP +To see the code heap state when a \[dq]CodeCache full\[dq] condition +exists, start the VM with the command line option: +.RS +.PP +\f[CR]\-Xlog:codecache=Debug\f[R] +.RE +.PP +See \f[B]CodeHeap State Analytics (OpenJDK)\f[R] +[https://bugs.openjdk.org/secure/attachment/75649/JVM_CodeHeap_StateAnalytics_V2.pdf] +for a detailed description of the code heap state analytics feature, the +supported functions, and the granularity options. +.SH ENABLE LOGGING WITH THE JVM UNIFIED LOGGING FRAMEWORK +You use the \f[CR]\-Xlog\f[R] option to configure or enable logging with +the Java Virtual Machine (JVM) unified logging framework. +.SS Synopsis +.RS +.PP +\f[CR]\-Xlog\f[R][\f[CR]:\f[R][\f[I]what\f[R]][\f[CR]:\f[R][\f[I]output\f[R]][\f[CR]:\f[R][\f[I]decorators\f[R]][\f[CR]:\f[R]\f[I]output\-options\f[R][\f[CR],\f[R]...]]]]] +.PP +\f[CR]\-Xlog:\f[R]\f[I]directive\f[R] +.RE +.TP +\f[I]what\f[R] +Specifies a combination of tags and levels of the form +\f[I]tag1\f[R][\f[CR]+\f[R]\f[I]tag2\f[R]...][\f[CR]*\f[R]][\f[CR]=\f[R]\f[I]level\f[R]][\f[CR],\f[R]...]. +Unless the wildcard (\f[CR]*\f[R]) is specified, only log messages +tagged with exactly the tags specified are matched. +See \f[B]\-Xlog Tags and Levels\f[R]. +.TP +\f[I]output\f[R] +Sets the type of output. +Omitting the \f[I]output\f[R] type defaults to \f[CR]stdout\f[R]. +See \f[B]\-Xlog Output\f[R]. +.TP +\f[I]decorators\f[R] +Configures the output to use a custom set of decorators. +Omitting \f[I]decorators\f[R] defaults to \f[CR]uptime\f[R], +\f[CR]level\f[R], and \f[CR]tags\f[R]. +See \f[B]Decorations\f[R]. +.TP +\f[I]output\-options\f[R] +Sets the \f[CR]\-Xlog\f[R] logging output options. +.TP +\f[I]directive\f[R] +A global option or subcommand: help, disable, async +.SS Description +The Java Virtual Machine (JVM) unified logging framework provides a +common logging system for all components of the JVM. +GC logging for the JVM has been changed to use the new logging +framework. +The mapping of old GC flags to the corresponding new Xlog configuration +is described in \f[B]Convert GC Logging Flags to Xlog\f[R]. +In addition, runtime logging has also been changed to use the JVM +unified logging framework. +The mapping of legacy runtime logging flags to the corresponding new +Xlog configuration is described in \f[B]Convert Runtime Logging Flags to +Xlog\f[R]. +.PP +The following provides quick reference to the \f[CR]\-Xlog\f[R] command +and syntax for options: +.TP +\f[CR]\-Xlog\f[R] +Enables JVM logging on an \f[CR]info\f[R] level. +.TP +\f[CR]\-Xlog:help\f[R] +Prints \f[CR]\-Xlog\f[R] usage syntax and available tags, levels, and +decorators along with example command lines with explanations. +.TP +\f[CR]\-Xlog:disable\f[R] +Turns off all logging and clears all configuration of the logging +framework including the default configuration for warnings and errors. +.TP +\f[CR]\-Xlog\f[R][\f[CR]:\f[R]\f[I]option\f[R]] +Applies multiple arguments in the order that they appear on the command +line. +Multiple \f[CR]\-Xlog\f[R] arguments for the same output override each +other in their given order. +.RS +.PP +The \f[I]option\f[R] is set as: +.RS +.PP +[\f[I]tag\-selection\f[R]][\f[CR]:\f[R][\f[I]output\f[R]][\f[CR]:\f[R][\f[I]decorators\f[R]][\f[CR]:\f[R]\f[I]output\-options\f[R]]]] +.RE +.PP +Omitting the \f[I]tag\-selection\f[R] defaults to a tag\-set of +\f[CR]all\f[R] and a level of \f[CR]info\f[R]. +.RS +.PP +\f[I]tag\f[R][\f[CR]+\f[R]...] +\f[CR]all\f[R] +.RE +.PP +The \f[CR]all\f[R] tag is a meta tag consisting of all tag\-sets +available. +The asterisk \f[CR]*\f[R] in a tag set definition denotes a wildcard tag +match. +Matching with a wildcard selects all tag sets that contain \f[I]at +least\f[R] the specified tags. +Without the wildcard, only exact matches of the specified tag sets are +selected. +.PP +\f[I]output\-options\f[R] is +.RS +.PP +\f[CR]filecount=\f[R]\f[I]file\-count\f[R] \f[CR]filesize=\f[R]\f[I]file +size with optional K, M or G suffix\f[R] +\f[CR]foldmultilines=\f[R]\f[I]\f[R] +.RE +.PP +When \f[CR]foldmultilines\f[R] is true, a log event that consists of +multiple lines will be folded into a single line by replacing newline +characters with the sequence \f[CR]\[aq]\[rs]\[aq]\f[R] and +\f[CR]\[aq]n\[aq]\f[R] in the output. +Existing single backslash characters will also be replaced with a +sequence of two backslashes so that the conversion can be reversed. +This option is safe to use with UTF\-8 character encodings, but other +encodings may not work. +For example, it may incorrectly convert multi\-byte sequences in Shift +JIS and BIG5. +.RE +.SS Default Configuration +When the \f[CR]\-Xlog\f[R] option and nothing else is specified on the +command line, the default configuration is used. +The default configuration logs all messages with a level that matches +either warning or error regardless of what tags the message is +associated with. +The default configuration is equivalent to entering the following on the +command line: +.RS +.PP +\f[CR]\-Xlog:all=warning:stdout:uptime,level,tags\f[R] +.RE +.SS Controlling Logging at Runtime +Logging can also be controlled at run time through Diagnostic Commands +(with the \f[B]jcmd\f[R] utility). +Everything that can be specified on the command line can also be +specified dynamically with the \f[CR]VM.log\f[R] command. +As the diagnostic commands are automatically exposed as MBeans, you can +use JMX to change logging configuration at run time. +.SS \-Xlog Tags and Levels +Each log message has a level and a tag set associated with it. +The level of the message corresponds to its details, and the tag set +corresponds to what the message contains or which JVM component it +involves (such as, \f[CR]gc\f[R], \f[CR]jit\f[R], or \f[CR]os\f[R]). +Mapping GC flags to the Xlog configuration is described in \f[B]Convert +GC Logging Flags to Xlog\f[R]. +Mapping legacy runtime logging flags to the corresponding Xlog +configuration is described in \f[B]Convert Runtime Logging Flags to +Xlog\f[R]. +.PP +\f[B]Available log levels:\f[R] +.IP \[bu] 2 +\f[CR]off\f[R] +.IP \[bu] 2 +\f[CR]trace\f[R] +.IP \[bu] 2 +\f[CR]debug\f[R] +.IP \[bu] 2 +\f[CR]info\f[R] +.IP \[bu] 2 +\f[CR]warning\f[R] +.IP \[bu] 2 +\f[CR]error\f[R] +.PP +\f[B]Available log tags:\f[R] +.PP +There are literally dozens of log tags, which in the right combinations, +will enable a range of logging output. +The full set of available log tags can be seen using +\f[CR]\-Xlog:help\f[R]. +Specifying \f[CR]all\f[R] instead of a tag combination matches all tag +combinations. +.SS \-Xlog Output +The \f[CR]\-Xlog\f[R] option supports the following types of outputs: +.IP \[bu] 2 +\f[CR]stdout\f[R] \-\-\- Sends output to stdout +.IP \[bu] 2 +\f[CR]stderr\f[R] \-\-\- Sends output to stderr +.IP \[bu] 2 +\f[CR]file=\f[R]\f[I]filename\f[R] \-\-\- Sends output to text file(s). +.PP +When using \f[CR]file=\f[R]\f[I]filename\f[R], specifying \f[CR]%p\f[R], +\f[CR]%t\f[R] and/or \f[CR]%hn\f[R] in the file name expands to the +JVM\[aq]s PID, startup timestamp and host name, respectively. +You can also configure text files to handle file rotation based on file +size and a number of files to rotate. +For example, to rotate the log file every 10 MB and keep 5 files in +rotation, specify the options \f[CR]filesize=10M, filecount=5\f[R]. +The target size of the files isn\[aq]t guaranteed to be exact, it\[aq]s +just an approximate value. +Files are rotated by default with up to 5 rotated files of target size +20 MB, unless configured otherwise. +Specifying \f[CR]filecount=0\f[R] means that the log file shouldn\[aq]t +be rotated. +There\[aq]s a possibility of the pre\-existing log file getting +overwritten. +.SS \-Xlog Output Mode +By default logging messages are output synchronously \- each log message +is written to the designated output when the logging call is made. +You can instead use asynchronous logging mode by specifying: +.TP +\f[CR]\-Xlog:async[:[stall|drop]]\f[R] +Write all logging asynchronously. +.PP +In asynchronous logging mode, log sites enqueue all logging messages to +an intermediate buffer and a standalone thread is responsible for +flushing them to the corresponding outputs. +The intermediate buffer is bounded. +On buffer exhaustion the enqueuing message is either discarded +(\f[CR]async:drop\f[R]), or logging threads are stalled until the +flushing thread catches up (\f[CR]async:stall\f[R]). +If no specific mode is chosen, then \f[CR]async:drop\f[R] is chosen by +default. +Log entry write operations are guaranteed to be non\-blocking in the +\f[CR]async:drop\f[R] case. +.PP +The option \f[CR]\-XX:AsyncLogBufferSize=N\f[R] specifies the memory +budget in bytes for the intermediate buffer. +The default value should be big enough to cater for most cases. +Users can provide a custom value to trade memory overhead for log +accuracy if they need to. +.SS Decorations +Logging messages are decorated with information about the message. +You can configure each output to use a custom set of decorators. +The order of the output is always the same as listed in the table. +You can configure the decorations to be used at run time. +Decorations are prepended to the log message. +For example: +.IP +.EX +[6.567s][info][gc,old] Old collection complete +.EE +.PP +Omitting \f[CR]decorators\f[R] defaults to \f[CR]uptime\f[R], +\f[CR]level\f[R], and \f[CR]tags\f[R]. +The \f[CR]none\f[R] decorator is special and is used to turn off all +decorations. +.PP +\f[CR]time\f[R] (\f[CR]t\f[R]), \f[CR]utctime\f[R] (\f[CR]utc\f[R]), +\f[CR]uptime\f[R] (\f[CR]u\f[R]), \f[CR]timemillis\f[R] (\f[CR]tm\f[R]), +\f[CR]uptimemillis\f[R] (\f[CR]um\f[R]), \f[CR]timenanos\f[R] +(\f[CR]tn\f[R]), \f[CR]uptimenanos\f[R] (\f[CR]un\f[R]), +\f[CR]hostname\f[R] (\f[CR]hn\f[R]), \f[CR]pid\f[R] (\f[CR]p\f[R]), +\f[CR]tid\f[R] (\f[CR]ti\f[R]), \f[CR]level\f[R] (\f[CR]l\f[R]), +\f[CR]tags\f[R] (\f[CR]tg\f[R]) decorators can also be specified as +\f[CR]none\f[R] for no decoration. +.PP +Logging Messages Decorations +.TS +tab(@); +lw(14.9n) lw(55.1n). +T{ +Decorations +T}@T{ +Description +T} +_ +T{ +\f[CR]time\f[R] or \f[CR]t\f[R] +T}@T{ +Current time and date in ISO\-8601 format. +T} +T{ +\f[CR]utctime\f[R] or \f[CR]utc\f[R] +T}@T{ +Universal Time Coordinated or Coordinated Universal Time. +T} +T{ +\f[CR]uptime\f[R] or \f[CR]u\f[R] +T}@T{ +Time since the start of the JVM in seconds and milliseconds. +For example, 6.567s. +T} +T{ +\f[CR]timemillis\f[R] or \f[CR]tm\f[R] +T}@T{ +The same value as generated by \f[CR]System.currentTimeMillis()\f[R] +T} +T{ +\f[CR]uptimemillis\f[R] or \f[CR]um\f[R] +T}@T{ +Milliseconds since the JVM started. +T} +T{ +\f[CR]timenanos\f[R] or \f[CR]tn\f[R] +T}@T{ +The same value generated by \f[CR]System.nanoTime()\f[R]. +T} +T{ +\f[CR]uptimenanos\f[R] or \f[CR]un\f[R] +T}@T{ +Nanoseconds since the JVM started. +T} +T{ +\f[CR]hostname\f[R] or \f[CR]hn\f[R] +T}@T{ +The host name. +T} +T{ +\f[CR]pid\f[R] or \f[CR]p\f[R] +T}@T{ +The process identifier. +T} +T{ +\f[CR]tid\f[R] or \f[CR]ti\f[R] +T}@T{ +The thread identifier. +T} +T{ +\f[CR]level\f[R] or \f[CR]l\f[R] +T}@T{ +The level associated with the log message. +T} +T{ +\f[CR]tags\f[R] or \f[CR]tg\f[R] +T}@T{ +The tag\-set associated with the log message. +T} +.TE +.SS Convert GC Logging Flags to Xlog +.PP +Legacy GC Logging Flags to Xlog Configuration Mapping +.TS +tab(@); +lw(22.4n) lw(16.5n) lw(31.2n). +T{ +Legacy Garbage Collection (GC) Flag +T}@T{ +Xlog Configuration +T}@T{ +Comment +T} +_ +T{ +\f[CR]G1PrintHeapRegions\f[R] +T}@T{ +\f[CR]\-Xlog:gc+region=trace\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]GCLogFileSize\f[R] +T}@T{ +No configuration available +T}@T{ +Log rotation is handled by the framework. +T} +T{ +\f[CR]NumberOfGCLogFiles\f[R] +T}@T{ +Not Applicable +T}@T{ +Log rotation is handled by the framework. +T} +T{ +\f[CR]PrintAdaptiveSizePolicy\f[R] +T}@T{ +\f[CR]\-Xlog:gc+ergo*=\f[R]\f[I]level\f[R] +T}@T{ +Use a \f[I]level\f[R] of \f[CR]debug\f[R] for most of the information, +or a \f[I]level\f[R] of \f[CR]trace\f[R] for all of what was logged for +\f[CR]PrintAdaptiveSizePolicy\f[R]. +T} +T{ +\f[CR]PrintGC\f[R] +T}@T{ +\f[CR]\-Xlog:gc\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]PrintGCApplicationConcurrentTime\f[R] +T}@T{ +\f[CR]\-Xlog:safepoint\f[R] +T}@T{ +Note that \f[CR]PrintGCApplicationConcurrentTime\f[R] and +\f[CR]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and +aren\[aq]t separated in the new logging. +T} +T{ +\f[CR]PrintGCApplicationStoppedTime\f[R] +T}@T{ +\f[CR]\-Xlog:safepoint\f[R] +T}@T{ +Note that \f[CR]PrintGCApplicationConcurrentTime\f[R] and +\f[CR]PrintGCApplicationStoppedTime\f[R] are logged on the same tag and +not separated in the new logging. +T} +T{ +\f[CR]PrintGCCause\f[R] +T}@T{ +Not Applicable +T}@T{ +GC cause is now always logged. +T} +T{ +\f[CR]PrintGCDateStamps\f[R] +T}@T{ +Not Applicable +T}@T{ +Date stamps are logged by the framework. +T} +T{ +\f[CR]PrintGCDetails\f[R] +T}@T{ +\f[CR]\-Xlog:gc*\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]PrintGCID\f[R] +T}@T{ +Not Applicable +T}@T{ +GC ID is now always logged. +T} +T{ +\f[CR]PrintGCTaskTimeStamps\f[R] +T}@T{ +\f[CR]\-Xlog:gc+task*=debug\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]PrintGCTimeStamps\f[R] +T}@T{ +Not Applicable +T}@T{ +Time stamps are logged by the framework. +T} +T{ +\f[CR]PrintHeapAtGC\f[R] +T}@T{ +\f[CR]\-Xlog:gc+heap=trace\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]PrintReferenceGC\f[R] +T}@T{ +\f[CR]\-Xlog:gc+ref*=debug\f[R] +T}@T{ +Note that in the old logging, \f[CR]PrintReferenceGC\f[R] had an effect +only if \f[CR]PrintGCDetails\f[R] was also enabled. +T} +T{ +\f[CR]PrintStringDeduplicationStatistics\f[R] +T}@T{ +\[ga]\-Xlog:gc+stringdedup*=debug +T}@T{ +\[ga] Not Applicable +T} +T{ +\f[CR]PrintTenuringDistribution\f[R] +T}@T{ +\f[CR]\-Xlog:gc+age*=\f[R]\f[I]level\f[R] +T}@T{ +Use a \f[I]level\f[R] of \f[CR]debug\f[R] for the most relevant +information, or a \f[I]level\f[R] of \f[CR]trace\f[R] for all of what +was logged for \f[CR]PrintTenuringDistribution\f[R]. +T} +T{ +\f[CR]UseGCLogFileRotation\f[R] +T}@T{ +Not Applicable +T}@T{ +What was logged for \f[CR]PrintTenuringDistribution\f[R]. +T} +.TE +.SS Convert Runtime Logging Flags to Xlog +These legacy flags are no longer recognized and will cause an error if +used directly. +Use their unified logging equivalent instead. +.PP +Runtime Logging Flags to Xlog Configuration Mapping +.TS +tab(@); +lw(15.0n) lw(20.2n) lw(34.7n). +T{ +Legacy Runtime Flag +T}@T{ +Xlog Configuration +T}@T{ +Comment +T} +_ +T{ +\f[CR]TraceExceptions\f[R] +T}@T{ +\f[CR]\-Xlog:exceptions=info\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceClassLoading\f[R] +T}@T{ +\f[CR]\-Xlog:class+load=\f[R]\f[I]level\f[R] +T}@T{ +Use \f[I]level\f[R]=\f[CR]info\f[R] for regular information, or +\f[I]level\f[R]=\f[CR]debug\f[R] for additional information. +In Unified Logging syntax, \f[CR]\-verbose:class\f[R] equals +\f[CR]\-Xlog:class+load=info,class+unload=info\f[R]. +T} +T{ +\f[CR]TraceClassLoadingPreorder\f[R] +T}@T{ +\f[CR]\-Xlog:class+preorder=debug\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceClassUnloading\f[R] +T}@T{ +\f[CR]\-Xlog:class+unload=\f[R]\f[I]level\f[R] +T}@T{ +Use \f[I]level\f[R]=\f[CR]info\f[R] for regular information, or +\f[I]level\f[R]=\f[CR]trace\f[R] for additional information. +In Unified Logging syntax, \f[CR]\-verbose:class\f[R] equals +\f[CR]\-Xlog:class+load=info,class+unload=info\f[R]. +T} +T{ +\f[CR]VerboseVerification\f[R] +T}@T{ +\f[CR]\-Xlog:verification=info\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceClassPaths\f[R] +T}@T{ +\f[CR]\-Xlog:class+path=info\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceClassResolution\f[R] +T}@T{ +\f[CR]\-Xlog:class+resolve=debug\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceClassInitialization\f[R] +T}@T{ +\f[CR]\-Xlog:class+init=info\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceLoaderConstraints\f[R] +T}@T{ +\f[CR]\-Xlog:class+loader+constraints=info\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceClassLoaderData\f[R] +T}@T{ +\f[CR]\-Xlog:class+loader+data=\f[R]\f[I]level\f[R] +T}@T{ +Use \f[I]level\f[R]=\f[CR]debug\f[R] for regular information or +\f[I]level\f[R]=\f[CR]trace\f[R] for additional information. +T} +T{ +\f[CR]TraceSafepointCleanupTime\f[R] +T}@T{ +\f[CR]\-Xlog:safepoint+cleanup=info\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceSafepoint\f[R] +T}@T{ +\f[CR]\-Xlog:safepoint=debug\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceMonitorInflation\f[R] +T}@T{ +\f[CR]\-Xlog:monitorinflation=debug\f[R] +T}@T{ +Not Applicable +T} +T{ +\f[CR]TraceRedefineClasses\f[R] +T}@T{ +\f[CR]\-Xlog:redefine+class*=\f[R]\f[I]level\f[R] +T}@T{ +\f[I]level\f[R]=\f[CR]info\f[R], \f[CR]debug\f[R], and \f[CR]trace\f[R] +provide increasing amounts of information. +T} +.TE +.SS \-Xlog Usage Examples +The following are \f[CR]\-Xlog\f[R] examples. +.TP +\f[CR]\-Xlog\f[R] +Logs all messages by using the \f[CR]info\f[R] level to +\f[CR]stdout\f[R] with \f[CR]uptime\f[R], \f[CR]levels\f[R], and +\f[CR]tags\f[R] decorations. +This is equivalent to using: +.RS +.RS +.PP +\f[CR]\-Xlog:all=info:stdout:uptime,levels,tags\f[R] +.RE +.RE +.TP +\f[CR]\-Xlog:gc\f[R] +Logs messages tagged with the \f[CR]gc\f[R] tag using \f[CR]info\f[R] +level to \f[CR]stdout\f[R]. +The default configuration for all other messages at level +\f[CR]warning\f[R] is in effect. +.TP +\f[CR]\-Xlog:gc,safepoint\f[R] +Logs messages tagged either with the \f[CR]gc\f[R] or +\f[CR]safepoint\f[R] tags, both using the \f[CR]info\f[R] level, to +\f[CR]stdout\f[R], with default decorations. +Messages tagged with both \f[CR]gc\f[R] and \f[CR]safepoint\f[R] +won\[aq]t be logged. +.TP +\f[CR]\-Xlog:gc+ref=debug\f[R] +Logs messages tagged with both \f[CR]gc\f[R] and \f[CR]ref\f[R] tags, +using the \f[CR]debug\f[R] level to \f[CR]stdout\f[R], with default +decorations. +Messages tagged only with one of the two tags won\[aq]t be logged. +.TP +\f[CR]\-Xlog:gc=debug:file=gc.txt:none\f[R] +Logs messages tagged with the \f[CR]gc\f[R] tag using the +\f[CR]debug\f[R] level to a file called \f[CR]gc.txt\f[R] with no +decorations. +The default configuration for all other messages at level +\f[CR]warning\f[R] is still in effect. +.TP +\f[CR]\-Xlog:gc=trace:file=gctrace.txt:uptimemillis,pid:filecount=5,filesize=1024\f[R] +Logs messages tagged with the \f[CR]gc\f[R] tag using the +\f[CR]trace\f[R] level to a rotating file set with 5 files with size 1 +MB with the base name \f[CR]gctrace.txt\f[R] and uses decorations +\f[CR]uptimemillis\f[R] and \f[CR]pid\f[R]. +.RS +.PP +The default configuration for all other messages at level +\f[CR]warning\f[R] is still in effect. +.RE +.TP +\f[CR]\-Xlog:gc::uptime,tid\f[R] +Logs messages tagged with the \f[CR]gc\f[R] tag using the default +\[aq]info\[aq] level to default the output \f[CR]stdout\f[R] and uses +decorations \f[CR]uptime\f[R] and \f[CR]tid\f[R]. +The default configuration for all other messages at level +\f[CR]warning\f[R] is still in effect. +.TP +\f[CR]\-Xlog:gc*=info,safepoint*=off\f[R] +Logs messages tagged with at least \f[CR]gc\f[R] using the +\f[CR]info\f[R] level, but turns off logging of messages tagged with +\f[CR]safepoint\f[R]. +Messages tagged with both \f[CR]gc\f[R] and \f[CR]safepoint\f[R] +won\[aq]t be logged. +.TP +\f[CR]\-Xlog:disable \-Xlog:safepoint=trace:safepointtrace.txt\f[R] +Turns off all logging, including warnings and errors, and then enables +messages tagged with \f[CR]safepoint\f[R]using \f[CR]trace\f[R]level to +the file \f[CR]safepointtrace.txt\f[R]. +The default configuration doesn\[aq]t apply, because the command line +started with \f[CR]\-Xlog:disable\f[R]. +.SS Complex \-Xlog Usage Examples +The following describes a few complex examples of using the +\f[CR]\-Xlog\f[R] option. +.TP +\f[CR]\-Xlog:gc+class*=debug\f[R] +Logs messages tagged with at least \f[CR]gc\f[R] and \f[CR]class\f[R] +tags using the \f[CR]debug\f[R] level to \f[CR]stdout\f[R]. +The default configuration for all other messages at the level +\f[CR]warning\f[R] is still in effect +.TP +\f[CR]\-Xlog:gc+meta*=trace,class*=off:file=gcmetatrace.txt\f[R] +Logs messages tagged with at least the \f[CR]gc\f[R] and \f[CR]meta\f[R] +tags using the \f[CR]trace\f[R] level to the file +\f[CR]metatrace.txt\f[R] but turns off all messages tagged with +\f[CR]class\f[R]. +Messages tagged with \f[CR]gc\f[R], \f[CR]meta\f[R], and +\f[CR]class\f[R] aren\[aq]t be logged as \f[CR]class*\f[R] is set to +off. +The default configuration for all other messages at level +\f[CR]warning\f[R] is in effect except for those that include +\f[CR]class\f[R]. +.TP +\f[CR]\-Xlog:gc+meta=trace\f[R] +Logs messages tagged with exactly the \f[CR]gc\f[R] and \f[CR]meta\f[R] +tags using the \f[CR]trace\f[R] level to \f[CR]stdout\f[R]. +The default configuration for all other messages at level +\f[CR]warning\f[R] is still be in effect. +.TP +\f[CR]\-Xlog:gc+class+heap*=debug,meta*=warning,threads*=off\f[R] +Logs messages tagged with at least \f[CR]gc\f[R], \f[CR]class\f[R], and +\f[CR]heap\f[R] tags using the \f[CR]trace\f[R] level to +\f[CR]stdout\f[R] but only log messages tagged with \f[CR]meta\f[R] with +level. +The default configuration for all other messages at the level +\f[CR]warning\f[R] is in effect except for those that include +\f[CR]threads\f[R]. +.SH VALIDATE JAVA VIRTUAL MACHINE FLAG ARGUMENTS +You use values provided to all Java Virtual Machine (JVM) command\-line +flags for validation and, if the input value is invalid or +out\-of\-range, then an appropriate error message is displayed. +.PP +Whether they\[aq]re set ergonomically, in a command line, by an input +tool, or through the APIs (for example, classes contained in the package +\f[CR]java.lang.management\f[R]) the values provided to all Java Virtual +Machine (JVM) command\-line flags are validated. +Ergonomics are described in Java Platform, Standard Edition HotSpot +Virtual Machine Garbage Collection Tuning Guide. +.PP +Range and constraints are validated either when all flags have their +values set during JVM initialization or a flag\[aq]s value is changed +during runtime (for example using the \f[CR]jcmd\f[R] tool). +The JVM is terminated if a value violates either the range or constraint +check and an appropriate error message is printed on the error stream. +.PP +For example, if a flag violates a range or a constraint check, then the +JVM exits with an error: +.IP +.EX +java \-XX:AllocatePrefetchStyle=5 \-version +intx AllocatePrefetchStyle=5 is outside the allowed range [ 0 ... 3 ] +Improperly specified VM option \[aq]AllocatePrefetchStyle=5\[aq] +Error: Could not create the Java Virtual Machine. +Error: A fatal exception has occurred. Program will exit. +.EE +.PP +The flag \f[CR]\-XX:+PrintFlagsRanges\f[R] prints the range of all the +flags. +This flag allows automatic testing of the flags by the values provided +by the ranges. +For the flags that have the ranges specified, the type, name, and the +actual range is printed in the output. +.PP +For example, +.IP +.EX +intx ThreadStackSize [ 0 ... 9007199254740987 ] {pd product} +.EE +.PP +For the flags that don\[aq]t have the range specified, the values +aren\[aq]t displayed in the print out. +For example: +.IP +.EX +size_t NewSize [ ... ] {product} +.EE +.PP +This helps to identify the flags that need to be implemented. +The automatic testing framework can skip those flags that don\[aq]t have +values and aren\[aq]t implemented. +.SH LARGE PAGES +You use large pages, also known as huge pages, as memory pages that are +significantly larger than the standard memory page size (which varies +depending on the processor and operating system). +Large pages optimize processor Translation\-Lookaside Buffers. +.PP +A Translation\-Lookaside Buffer (TLB) is a page translation cache that +holds the most\-recently used virtual\-to\-physical address +translations. +A TLB is a scarce system resource. +A TLB miss can be costly because the processor must then read from the +hierarchical page table, which may require multiple memory accesses. +By using a larger memory page size, a single TLB entry can represent a +larger memory range. +This results in less pressure on a TLB, and memory\-intensive +applications may have better performance. +.PP +However, using large pages can negatively affect system performance. +For example, when a large amount of memory is pinned by an application, +it may create a shortage of regular memory and cause excessive paging in +other applications and slow down the entire system. +Also, a system that has been up for a long time could produce excessive +fragmentation, which could make it impossible to reserve enough large +page memory. +When this happens, either the OS or JVM reverts to using regular pages. +.PP +Linux and Windows support large pages. +.SS Large Pages Support for Linux +Linux supports large pages since version 2.6. +To check if your environment supports large pages, try the following: +.IP +.EX +# cat /proc/meminfo | grep Huge +HugePages_Total: 0 +HugePages_Free: 0 +\&... +Hugepagesize: 2048 kB +.EE +.PP +If the output contains items prefixed with \[dq]Huge\[dq], then your +system supports large pages. +The values may vary depending on environment. +The \f[CR]Hugepagesize\f[R] field shows the default large page size in +your environment, and the other fields show details for large pages of +this size. +Newer kernels have support for multiple large page sizes. +To list the supported page sizes, run this: +.IP +.EX +# ls /sys/kernel/mm/hugepages/ +hugepages\-1048576kB hugepages\-2048kB +.EE +.PP +The above environment supports 2 MB and 1 GB large pages, but they need +to be configured so that the JVM can use them. +When using large pages and not enabling transparent huge pages (option +\f[CR]\-XX:+UseTransparentHugePages\f[R]), the number of large pages +must be pre\-allocated. +For example, to enable 8 GB of memory to be backed by 2 MB large pages, +login as \f[CR]root\f[R] and run: +.RS +.PP +\f[CR]# echo 4096 > /sys/kernel/mm/hugepages/hugepages\-2048kB/nr_hugepages\f[R] +.RE +.PP +It is always recommended to check the value of \f[CR]nr_hugepages\f[R] +after the request to make sure the kernel was able to allocate the +requested number of large pages. +.RS +.PP +\f[B]Note:\f[R] The values contained in \f[CR]/proc\f[R] and +\f[CR]/sys\f[R] reset after you reboot your system, so may want to set +them in an initialization script (for example, \f[CR]rc.local\f[R] or +\f[CR]sysctl.conf\f[R]). +.RE +.PP +If you configure the OS kernel parameters to enable use of large pages, +the Java processes may allocate large pages for the Java heap as well as +other internal areas, for example: +.IP \[bu] 2 +Code cache +.IP \[bu] 2 +Marking bitmaps +.PP +Consequently, if you configure the \f[CR]nr_hugepages\f[R] parameter to +the size of the Java heap, then the JVM can still fail to allocate the +heap using large pages because other areas such as the code cache might +already have used some of the configured large pages. +.SS Large Pages Support for Windows +To use large pages support on Windows, the administrator must first +assign additional privileges to the user who is running the application: +.IP "1." 3 +Select \f[B]Control Panel\f[R], \f[B]Administrative Tools\f[R], and then +\f[B]Local Security Policy\f[R]. +.IP "2." 3 +Select \f[B]Local Policies\f[R] and then \f[B]User Rights +Assignment\f[R]. +.IP "3." 3 +Double\-click \f[B]Lock pages in memory\f[R], then add users and/or +groups. +.IP "4." 3 +Reboot your system. +.PP +Note that these steps are required even if it\[aq]s the administrator +who\[aq]s running the application, because administrators by default +don\[aq]t have the privilege to lock pages in memory. +.SH APPLICATION CLASS DATA SHARING +Application Class Data Sharing (AppCDS) stores classes used by your +applications in an archive file. +Since these classes are stored in a format that can be loaded very +quickly (compared to classes stored in a JAR file), AppCDS can improve +the start\-up time of your applications. +In addition, AppCDS can reduce the runtime memory footprint by sharing +parts of these classes across multiple processes. +.PP +Classes in the CDS archive are stored in an optimized format that\[aq]s +about 2 to 5 times larger than classes stored in JAR files or the JDK +runtime image. +Therefore, it\[aq]s a good idea to archive only those classes that are +actually used by your application. +These usually are just a small portion of all available classes. +For example, your application may use only a few APIs provided by a +large library. +.SS Using CDS Archives +By default, in most JDK distributions, unless \f[CR]\-Xshare:off\f[R] is +specified, the JVM starts up with a default CDS archive, which is +usually located in \f[CR]JAVA_HOME/lib/server/classes.jsa\f[R] (or +\f[CR]JAVA_HOME\[rs]bin\[rs]server\[rs]classes.jsa\f[R] on Windows). +This archive contains about 1300 core library classes that are used by +most applications. +.PP +To use CDS for the exact set of classes used by your application, you +can use the \f[CR]\-XX:SharedArchiveFile\f[R] option, which has the +general form: +.RS +.PP +\f[CR]\-XX:SharedArchiveFile=:\f[R] +.RE +.IP \[bu] 2 +The \f[CR]\f[R] overrides the default CDS archive. +.IP \[bu] 2 +The \f[CR]\f[R] provides additional classes that can be +loaded on top of those in the \f[CR]\f[R]. +.IP \[bu] 2 +On Windows, the above path delimiter \f[CR]:\f[R] should be replaced +with \f[CR];\f[R] +.PP +The names \[dq]static\[dq] and \[dq]dynamic\[dq] are used for historical +reasons. +The dynamic archive, while still useful, supports fewer optimizations +than available for the static CDS archive. +If the full set of CDS/AOT optimizations are desired, consider using the +AOT cache described below. +.PP +The JVM can use up to two archives. +To use only a single \f[CR]\f[R], you can omit the +\f[CR]\f[R] portion: +.RS +.PP +\f[CR]\-XX:SharedArchiveFile=\f[R] +.RE +.PP +For convenience, the \f[CR]\f[R] records the location +of the \f[CR]\f[R]. +Therefore, you can omit the \f[CR]\f[R] by saying only: +.RS +.PP +\f[CR]\-XX:SharedArchiveFile=\f[R] +.RE +.SS Manually Creating CDS Archives +CDS archives can be created manually using several methods: +.IP \[bu] 2 +\f[CR]\-Xshare:dump\f[R] +.IP \[bu] 2 +\f[CR]\-XX:ArchiveClassesAtExit\f[R] +.IP \[bu] 2 +\f[CR]jcmd VM.cds\f[R] +.PP +One common operation in all these methods is a \[dq]trial run\[dq], +where you run the application once to determine the classes that should +be stored in the archive. +.SS Creating a Static CDS Archive File with \-Xshare:dump +The following steps create a static CDS archive file that contains all +the classes used by the \f[CR]test.Hello\f[R] application. +.IP "1." 3 +Create a list of all classes used by the \f[CR]test.Hello\f[R] +application. +The following command creates a file named \f[CR]hello.classlist\f[R] +that contains a list of all classes used by this application: +.RS 4 +.RS +.PP +\f[CR]java \-Xshare:off \-XX:DumpLoadedClassList=hello.classlist \-cp hello.jar test.Hello\f[R] +.RE +.PP +The classpath specified by the \f[CR]\-cp\f[R] parameter must contain +only JAR files. +.RE +.IP "2." 3 +Create a static archive, named \f[CR]hello.jsa\f[R], that contains all +the classes in \f[CR]hello.classlist\f[R]: +.RS 4 +.RS +.PP +\f[CR]java \-Xshare:dump \-XX:SharedArchiveFile=hello.jsa \-XX:SharedClassListFile=hello.classlist \-cp hello.jar\f[R] +.RE +.RE +.IP "3." 3 +Run the application \f[CR]test.Hello\f[R] with the archive +\f[CR]hello.jsa\f[R]: +.RS 4 +.RS +.PP +\f[CR]java \-XX:SharedArchiveFile=hello.jsa \-cp hello.jar test.Hello\f[R] +.RE +.RE +.IP "4." 3 +\f[B]Optional\f[R] Verify that the \f[CR]test.Hello\f[R] application is +using the class contained in the \f[CR]hello.jsa\f[R] shared archive: +.RS 4 +.RS +.PP +\f[CR]java \-XX:SharedArchiveFile=hello.jsa \-cp hello.jar \-Xlog:class+load test.Hello\f[R] +.RE +.PP +The output of this command should contain the following text: +.RS +.PP +\f[CR][info][class,load] test.Hello source: shared objects file\f[R] +.RE +.RE +.PP +By default, when the \f[CR]\-Xshare:dump\f[R] option is used, the JVM +runs in interpreter\-only mode (as if the \f[CR]\-Xint\f[R] option were +specified). +This is required for generating deterministic output in the shared +archive file. +I.e., the exact same archive will be generated, bit\-for\-bit, every +time you dump it. +However, if deterministic output is not needed, and you have a large +classlist, you can explicitly add \f[CR]\-Xmixed\f[R] to the +command\-line to enable the JIT compiler. +This will speed up the archive creation. +.SS Creating a Dynamic CDS Archive File with \-XX:ArchiveClassesAtExit +Advantages of dynamic CDS archives are: +.IP \[bu] 2 +They usually use less disk space, since they don\[aq]t need to store the +classes that are already in the static archive. +.IP \[bu] 2 +They are created with one fewer step than the comparable static archive. +.PP +The following steps create a dynamic CDS archive file that contains the +classes that are used by the \f[CR]test.Hello\f[R] application, +excluding those that are already in the default CDS archive. +.IP "1." 3 +Create a dynamic CDS archive, named \f[CR]hello.jsa\f[R], that contains +all the classes in \f[CR]hello.jar\f[R] loaded by the application +\f[CR]test.Hello\f[R]: +.RS 4 +.RS +.PP +\f[CR]java \-XX:ArchiveClassesAtExit=hello.jsa \-cp hello.jar Hello\f[R] +.RE +.RE +.IP "2." 3 +Run the application \f[CR]test.Hello\f[R] with the shared archive +\f[CR]hello.jsa\f[R]: +.RS 4 +.RS +.PP +\f[CR]java \-XX:SharedArchiveFile=hello.jsa \-cp hello.jar test.Hello\f[R] +.RE +.RE +.IP "3." 3 +\f[B]Optional\f[R] Repeat step 4 of the previous section to verify that +the \f[CR]test.Hello\f[R] application is using the class contained in +the \f[CR]hello.jsa\f[R] shared archive. +.PP +It\[aq]s also possible to create a dynamic CDS archive with a +non\-default static CDS archive. +E.g., +.RS +.PP +\f[CR]java \-XX:SharedArchiveFile=base.jsa \-XX:ArchiveClassesAtExit=hello.jsa \-cp hello.jar Hello\f[R] +.RE +.PP +To run the application using this dynamic CDS archive: +.RS +.PP +\f[CR]java \-XX:SharedArchiveFile=base.jsa:hello.jsa \-cp hello.jar Hello\f[R] +.RE +.PP +(On Windows, the above path delimiter \f[CR]:\f[R] should be replaced +with \f[CR];\f[R]) +.PP +As mention above, the name of the static archive can be skipped: +.RS +.PP +\f[CR]java \-XX:SharedArchiveFile=hello.jsa \-cp hello.jar Hello\f[R] +.RE +.SS Creating CDS Archive Files with jcmd +The previous two sections require you to modify the application\[aq]s +start\-up script in order to create a CDS archive. +Sometimes this could be difficult, for example, if the application\[aq]s +class path is set up by complex routines. +.PP +The \f[CR]jcmd VM.cds\f[R] command provides a less intrusive way for +creating a CDS archive by connecting to a running JVM process. +You can create either a static: +.RS +.PP +\f[CR]jcmd VM.cds static_dump my_static_archive.jsa\f[R] +.RE +.PP +or a dynamic archive: +.RS +.PP +\f[CR]jcmd VM.cds dynamic_dump my_dynamic_archive.jsa\f[R] +.RE +.PP +To use the resulting archive file in a subsequent run of the application +without modifying the application\[aq]s start\-up script, you can use +the following technique: +.RS +.PP +\f[CR]env JAVA_TOOL_OPTIONS=\-XX:SharedArchiveFile=my_static_archive.jsa bash app_start.sh\f[R] +.RE +.PP +Note: to use \f[CR]jcmd VM.cds dynamic_dump\f[R], the JVM process +identified by \f[CR]\f[R] must be started with +\f[CR]\-XX:+RecordDynamicDumpInfo\f[R], which can also be passed to the +application start\-up script with the same technique: +.RS +.PP +\f[CR]env JAVA_TOOL_OPTIONS=\-XX:+RecordDynamicDumpInfo bash app_start.sh\f[R] +.RE +.SS Creating Dynamic CDS Archive File with \-XX:+AutoCreateSharedArchive +\f[CR]\-XX:+AutoCreateSharedArchive\f[R] is a more convenient way of +creating/using CDS archives. +Unlike the methods of manual CDS archive creation described in the +previous section, with \f[CR]\-XX:+AutoCreateSharedArchive\f[R], +it\[aq]s no longer necessary to have a separate trial run. +Instead, you can always run the application with the same command\-line +and enjoy the benefits of CDS automatically. +.RS +.PP +\f[CR]java \-XX:+AutoCreateSharedArchive \-XX:SharedArchiveFile=hello.jsa \-cp hello.jar Hello\f[R] +.RE +.PP +If the specified archive file exists and was created by the same version +of the JDK, then it will be loaded as a dynamic archive; otherwise it is +ignored at VM startup. +.PP +At VM exit, if the specified archive file does not exist, it will be +created. +If it exists but was created with a different (but post JDK 19) version +of the JDK, then it will be replaced. +In both cases the archive will be ready to be loaded the next time the +JVM is launched with the same command line. +.PP +If the specified archive file exists but was created by a JDK version +prior to JDK 19, then it will be ignored: neither loaded at startup, nor +replaced at exit. +.PP +Developers should note that the contents of the CDS archive file are +specific to each build of the JDK. +Therefore, if you switch to a different JDK build, +\f[CR]\-XX:+AutoCreateSharedArchive\f[R] will automatically recreate the +archive to match the JDK. +If you intend to use this feature with an existing archive, you should +make sure that the archive is created by at least version 19 of the JDK. +.SS Restrictions on Class Path and Module Path +.IP \[bu] 2 +Neither the class path (\f[CR]\-classpath\f[R] and +\f[CR]\-Xbootclasspath/a\f[R]) nor the module path +(\f[CR]\-\-module\-path\f[R]) can contain non\-empty directories. +.IP \[bu] 2 +Only modular JAR files are supported in \f[CR]\-\-module\-path\f[R]. +Exploded modules are not supported. +.IP \[bu] 2 +The class path used at archive creation time must be the same as (or a +prefix of) the class path used at run time. +(There\[aq]s no such requirement for the module path.) +.IP \[bu] 2 +The CDS archive cannot be loaded if any JAR files in the class path or +module path are modified after the archive is generated. +.SS Module related options +The following module related options are supported by CDS: +\f[CR]\-\-module\-path\f[R], \f[CR]\-\-module\f[R], +\f[CR]\-\-add\-modules\f[R], and \f[CR]\-\-enable\-native\-access\f[R]. +.PP +The values for these options (if specified), should be identical when +creating and using the CDS archive. +Otherwise, if there is a mismatch of any of these options, the CDS +archive may be partially or completely disabled, leading to lower +performance. +.IP \[bu] 2 +If the \f[CR]AOTClassLinking\f[R] option (see below) \f[I]was\f[R] +enabled during CDS archive creation, the CDS archive cannot be used, and +the following error message is printed: +.RS 2 +.PP +\f[CR]CDS archive has aot\-linked classes. It cannot be used when archived full module graph is not used\f[R] +.RE +.IP \[bu] 2 +If the \f[CR]AOTClassLinking\f[R] option \f[I]was not\f[R] enabled +during CDS archive creation, the CDS archive can be used, but the +\[dq]archived module graph\[dq] feature will be disabled. +This can lead to increased start\-up time. +.PP +To diagnose problems with the AOT options, you can add +\f[CR]\-Xlog:aot\f[R] to the application\[aq]s VM arguments. +For example, if \f[CR]\-\-add\-modules jdk.jconsole\f[R] was specified +during archive creation and +\f[CR]\-\-add\-modules jdk.incubator.vector\f[R] is specified during +runtime, the following messages will be logged: +.PP +\f[CR]Mismatched values for property jdk.module.addmods\f[R] +.PP +\f[CR]runtime jdk.incubator.vector dump time jdk.jconsole\f[R] +.PP +\f[CR]subgraph jdk.internal.module.ArchivedBootLayer cannot be used because full module graph is disabled\f[R] +.PP +If any of the VM options \f[CR]\-\-upgrade\-module\-path\f[R], +\f[CR]\-\-patch\-module\f[R] or \f[CR]\-\-limit\-modules\f[R] are +specified, CDS is disabled. +This means that the JVM will execute without loading any CDS archives. +In addition, if you try to create a CDS archive with any of these 3 +options specified, the JVM will report an error. +.SH AHEAD\-OF\-TIME CACHE +The JDK supports ahead\-of\-time (AOT) optimizations that can be +performed before an application is executed. +One example is Class Data Sharing (CDS), as described above, that parses +classes ahead of time. +AOT optimizations can improve the start\-up and warm\-up performance of +Java applications. +.PP +The Ahead\-of\-Time Cache (AOT cache) is a container introduced in JDK +24 for storing artifacts produced by AOT optimizations. +The AOT cache currently contains Java classes and heap objects. +In future JDK releases, the AOT cache may contain additional artifacts, +such as execution profiles and compiled methods. +.PP +An AOT cache is specific to a combination of the following: +.IP \[bu] 2 +A particular application (as expressed by \f[CR]\-classpath\f[R], +\f[CR]\-jar\f[R], or \f[CR]\-\-module\-path\f[R].) +.IP \[bu] 2 +A particular JDK release. +.IP \[bu] 2 +A particular OS and CPU architecture. +.PP +If any of the above changes, you must recreate the AOT cache. +.PP +The deployment of the AOT cache is divided into three phases: +.IP \[bu] 2 +\f[B]Training:\f[R] We execute the application with a representative +work\-load to gather statistical data that tell us what artifacts should +be included into the AOT cache. +The data are saved in an \f[I]AOT Configuration\f[R] file. +.IP \[bu] 2 +\f[B]Assembly:\f[R] We use the AOT Configuration file to produce an AOT +cache. +.IP \[bu] 2 +\f[B]Production:\f[R] We execute the application with the AOT cache for +better start\-up and warm\-up performance. +.PP +The AOT cache can be used with the following command\-line options: +.TP +\f[CR]\-XX:AOTCache=\f[R]\f[I]cachefile\f[R] +Specifies the location of the AOT cache. +The standard extension for \f[I]cachefile\f[R] is \f[CR].aot\f[R]. +This option cannot be used together with \f[CR]\-XX:AOTCacheOutput\f[R]. +.RS +.PP +This option is compatible with \f[CR]AOTMode\f[R] settings of +\f[CR]on\f[R], \f[CR]create\f[R], or \f[CR]auto\f[R] (the default). +The \f[I]cachefile\f[R] is read in AOT modes \f[CR]on\f[R] and +\f[CR]auto\f[R], and is ignored by mode \f[CR]off\f[R]. +The \f[I]cachefile\f[R] is written by AOT mode \f[CR]create\f[R]. +In that case, this option is equivalent to +\f[CR]\-XX:AOTCacheOutput=\f[R]\f[I]cachefile\f[R]. +.RE +.TP +\f[CR]\-XX:AOTCacheOutput=\f[R]\f[I]cachefile\f[R] +Specifies the location of the AOT cache to write. +The standard extension for \f[I]cachefile\f[R] is \f[CR].aot\f[R]. +This option cannot be used together with \f[CR]\-XX:AOTCache\f[R]. +.RS +.PP +This option is compatible with \f[CR]AOTMode\f[R] settings of +\f[CR]record\f[R], \f[CR]create\f[R], or \f[CR]auto\f[R] (the default). +.RE +.TP +\f[CR]\-XX:AOTConfiguration=\f[R]\f[I]configfile\f[R] +Specifies the AOT Configuration file for the JVM to write to or read +from. +The standard extension for \f[I]configfile\f[R] is +\f[CR].aotconfig\f[R]. +.RS +.PP +This option is compatible with \f[CR]AOTMode\f[R] settings of +\f[CR]record\f[R], \f[CR]create\f[R], or \f[CR]auto\f[R] (the default). +The \f[I]configfile\f[R] is read by AOT mode \f[CR]create\f[R], and +written by the other applicable modes. +If the AOT mode is \f[CR]auto\f[R], then \f[CR]AOTCacheOutput\f[R] must +also be present. +.RE +.TP +\f[CR]\-XX:AOTMode=\f[R]\f[I]mode\f[R] +Specifies the AOT Mode for this run. +\f[I]mode\f[R] must be one of the following: \f[CR]auto\f[R], +\f[CR]off\f[R], \f[CR]record\f[R], \f[CR]create\f[R], or \f[CR]on\f[R]. +.IP \[bu] 2 +\f[CR]auto\f[R]: This AOT mode is the default, and takes effect if no +\f[CR]\-XX:AOTMode\f[R] option is present. +It automatically sets the AOT mode to \f[CR]record\f[R], \f[CR]on\f[R], +or \f[CR]off\f[R], as follows: +.RS 2 +.IP \[bu] 2 +If \f[CR]\-XX:AOTCacheOutput=\f[R]\f[I]cachefile\f[R] is specified, the +AOT mode is changed to \f[CR]record\f[R] (a training run, with a +subsequent \f[CR]create\f[R] operation). +.IP \[bu] 2 +Otherwise, if an AOT cache can be loaded, the AOT mode is changed to +\f[CR]on\f[R] (a production run). +.IP \[bu] 2 +Otherwise, the AOT mode is changed to \f[CR]off\f[R] (a production run +with no AOT cache). +.RE +.IP \[bu] 2 +\f[CR]off\f[R]: No AOT cache is used. +Other AOT command line options are ignored. +.IP \[bu] 2 +\f[CR]record\f[R]: Execute the application in the training phase. +At least one of \f[CR]\-XX:AOTConfiguration=\f[R]\f[I]configfile\f[R] +and/or \f[CR]\-XX:AOTCacheOutput=\f[R]\f[I]cachefile\f[R] must be +specified. +If \f[CR]\-XX:AOTConfiguration=\f[R]\f[I]configfile\f[R] is specified, +the JVM gathers statistical data and stores them into +\f[I]configfile\f[R]. +If \f[CR]\-XX:AOTConfiguration=\f[R]\f[I]configfile\f[R] is not +specified, the JVM uses a temporary file name, which may be the string +\f[CR]AOTCacheOutput+\[dq].config\[dq]\f[R], or else a fresh +implementation\-dependent temporary file name. +If \f[CR]\-XX:AOTCacheOutput=\f[R]\f[I]cachefile\f[R] is specified, a +second JVM process is launched to perform the Assembly phase to write +the optimization artifacts into \f[I]cachefile\f[R]. +.RS 2 +.PP +Extra JVM options can be passed to the second JVM process using the +environment variable \f[CR]JDK_AOT_VM_OPTIONS\f[R], with the same format +as the environment variable \f[CR]JAVA_TOOL_OPTIONS\f[R], which is +\f[B]defined by JVMTI\f[R] +[https://docs.oracle.com/en/java/javase/24/docs/specs/jvmti.html#tooloptions]. +.RE +.IP \[bu] 2 +\f[CR]create\f[R]: Perform the Assembly phase. +\f[CR]\-XX:AOTConfiguration=\f[R]\f[I]configfile\f[R] must be specified. +The JVM reads history and statistics from \f[I]configfile\f[R] and +writes the optimization artifacts into \f[I]cachefile\f[R]. +Note that the application itself is not executed in this phase. +.IP \[bu] 2 +\f[CR]on\f[R]: Execute the application in the Production phase. +If \f[CR]\-XX:AOTCache=\f[R]\f[I]cachefile\f[R] is specified, the JVM +tries to load \f[I]cachefile\f[R] as the AOT cache. +Otherwise, the JVM tries to load a \f[I]default CDS archive\f[R] from +the JDK installation directory as the AOT cache. +.RS 2 +.PP +The loading of an AOT cache can fail for a number of reasons: +.IP \[bu] 2 +You are trying to use the AOT cache with an incompatible application, +JDK release, or OS/CPU. +.IP \[bu] 2 +The specified \f[I]cachefile\f[R] does not exist or is not accessible. +.IP \[bu] 2 +Incompatible JVM options are used (for example, certain JVMTI options). +.RS 2 +.PP +Since the AOT cache is an optimization feature, there\[aq]s no guarantee +that it will be compatible with all possible JVM options. +See \f[B]JEP 483\f[R] [https://openjdk.org/jeps/483], section +\f[B]Consistency of training and subsequent runs\f[R] for a +representative list of scenarios that may be incompatible with the AOT +cache. +.PP +These scenarios usually involve arbitrary modification of classes for +diagnostic purposes and are typically not relevant for production +environments. +.RE +.PP +When the AOT cache fails to load: +.IP \[bu] 2 +If \f[CR]AOTMode\f[R] was originally \f[CR]auto\f[R], the JVM will +continue execution without using the AOT cache. +This is the recommended mode for production environments, especially +when you may not have complete control of the command\-line (e.g., your +application\[aq]s launch script may allow users to inject options to the +command\-line). +This allows your application to function correctly, although sometimes +it may not benefit from the AOT cache. +.IP \[bu] 2 +If \f[CR]AOTMode\f[R] is \f[CR]on\f[R], the JVM will print an error +message and exit immediately. +This mode should be used only as a \[dq]fail\-fast\[dq] debugging aid to +check if your command\-line options are compatible with the AOT cache. +An alternative is to run your application with +\f[CR]\-XX:AOTMode=auto \-Xlog:aot\f[R] to see if the AOT cache can be +used or not. +.RE +.TP +\f[CR]\-XX:+AOTClassLinking\f[R] +If this option is enabled, the JVM will perform more advanced +optimizations (such as ahead\-of\-time resolution of invokedynamic +instructions) when creating the AOT cache. +As a result, the application will see further improvements in start\-up +and warm\-up performance. +However, an AOT cache created with this option cannot be used when +certain command\-line parameters are specified in the Production phase. +Please see \f[B]JEP 483\f[R] [https://openjdk.org/jeps/483] for a +detailed discussion of \f[CR]\-XX:+AOTClassLinking\f[R] and its +restrictions. +.RS +.PP +When \f[CR]\-XX:AOTMode\f[R] \f[I]is used\f[R] in the command\-line, +\f[CR]AOTClassLinking\f[R] is automatically enabled. +To disable it, you must explicitly pass the +\f[CR]\-XX:\-AOTClassLinking\f[R] option. +.PP +When \f[CR]\-XX:AOTMode\f[R] \f[I]is not used\f[R] in the command\-line, +\f[CR]AOTClassLinking\f[R] is disabled by default to provide full +compatibility with traditional CDS options such as \[ga]\-Xshare:dump. +.RE +.PP +The first occurrence of the special sequence \f[CR]%p\f[R] in +\f[CR]*configfile* and\f[R]\f[I]cachefile\f[R] is replaced with the +process ID of the JVM process launched in the command\-line, and +likewise the first occurrence of \f[CR]%t\f[R] is replace by the +JVM\[aq]s startup timestamp. +(After replacement there must be no further occurrences of \f[CR]%p\f[R] +or \f[CR]%t\f[R], to prevent problems with sub\-processes.) +For example: +.RS +.PP +\f[CR]java \-XX:AOTConfiguration=foo%p.aotconfig \-XX:AOTCacheOutput=foo%p.aot \-cp foo.jar Foo\f[R] +.RE +.PP +will create two files: \f[CR]foopid123.aotconfig\f[R] and +\f[CR]foopid123.aot\f[R], where \f[CR]123\f[R] is the process ID of the +JVM that has executed the application \f[CR]Foo\f[R]. +.SH PERFORMANCE TUNING EXAMPLES +You can use the Java advanced runtime options to optimize the +performance of your applications. +.SS Tuning for Higher Throughput +Use the following commands and advanced options to achieve higher +throughput performance for your application: +.RS +.PP +\f[CR]java \-server \-XX:+UseParallelGC \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\f[R] +.RE +.SS Tuning for Lower Response Time +Use the following commands and advanced options to achieve lower +response times for your application: +.RS +.PP +\f[CR]java \-XX:+UseG1GC \-XX:MaxGCPauseMillis=100\f[R] +.RE +.SS Keeping the Java Heap Small and Reducing the Dynamic Footprint of Embedded Applications +Use the following advanced runtime options to keep the Java heap small +and reduce the dynamic footprint of embedded applications: +.RS +.PP +\f[CR]\-XX:MaxHeapFreeRatio=10 \-XX:MinHeapFreeRatio=5\f[R] +.RE +.RS +.PP +\f[B]Note:\f[R] The defaults for these two options are 70% and 40% +respectively. +Because performance sacrifices can occur when using these small +settings, you should optimize for a small footprint by reducing these +settings as much as possible without introducing unacceptable +performance degradation. +.RE +.SH EXIT STATUS +The following exit values are typically returned by the launcher when +the launcher is called with the wrong arguments, serious errors, or +exceptions thrown by the JVM. +However, a Java application may choose to return any value by using the +API call \f[CR]System.exit(exitValue)\f[R]. +The values are: +.IP \[bu] 2 +\f[CR]0\f[R]: Successful completion +.IP \[bu] 2 +\f[CR]>0\f[R]: An error occurred diff -Nru openjdk-25-25.0.2+10/debian/man/javac.1 openjdk-25-25.0.3+9/debian/man/javac.1 --- openjdk-25-25.0.2+10/debian/man/javac.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/javac.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,2276 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JAVAC" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +javac \- read Java declarations and compile them into class files +.SH SYNOPSIS +\f[CR]javac\f[R] [\f[I]options\f[R]] +[\f[I]sourcefiles\-or\-classnames\f[R]] +.TP +\f[I]options\f[R] +Command\-line options. +.TP +\f[I]sourcefiles\-or\-classnames\f[R] +Source files to be compiled (for example, \f[CR]Shape.java\f[R]) or the +names of previously compiled classes to be processed for annotations +(for example, \f[CR]geometry.MyShape\f[R]). +.SH DESCRIPTION +The \f[CR]javac\f[R] command reads \f[I]source files\f[R] that contain +module, package and type declarations written in the Java programming +language, and compiles them into \f[I]class files\f[R] that run on the +Java Virtual Machine. +.PP +The \f[CR]javac\f[R] command can also \f[B]process annotations\f[R] in +Java source files and classes. +.PP +Source files must have a file name extension of \f[CR].java\f[R]. +Class files have a file name extension of \f[CR].class\f[R]. +Both source and class files normally have file names that identify the +contents. +For example, a class called \f[CR]Shape\f[R] would be declared in a +source file called \f[CR]Shape.java\f[R], and compiled into a class file +called \f[CR]Shape.class\f[R]. +.PP +There are two ways to specify source files to \f[CR]javac\f[R]: +.IP \[bu] 2 +For a small number of source files, you can list their file names on the +command line. +.IP \[bu] 2 +For a large number of source files, you can use the +\f[B]\f[CB]\[at]\f[B]\f[BI]filename\f[B]\f[R] option on the command line +to specify an \f[I]argument file\f[R] that lists their file names. +See \f[B]Standard Options\f[R] for a description of the option and +\f[B]Command\-Line Argument Files\f[R] for a description of +\f[CR]javac\f[R] argument files. +.PP +The order of source files specified on the command line or in an +argument file is not important. +\f[CR]javac\f[R] will compile the files together, as a group, and will +automatically resolve any dependencies between the declarations in the +various source files. +.PP +\f[CR]javac\f[R] expects that source files are arranged in one or more +directory hierarchies on the file system, described in \f[B]Arrangement +of Source Code\f[R]. +.PP +To compile a source file, \f[CR]javac\f[R] needs to find the declaration +of every class or interface that is used, extended, or implemented by +the code in the source file. +This lets \f[CR]javac\f[R] check that the code has the right to access +those classes and interfaces. +Rather than specifying the source files of those classes and interfaces +explicitly, you can use command\-line options to tell \f[CR]javac\f[R] +where to search for their source files. +If you have compiled those source files previously, you can use options +to tell \f[CR]javac\f[R] where to search for the corresponding class +files. +The options, which all have names ending in \[dq]path\[dq], are +described in \f[B]Standard Options\f[R], and further described in +\f[B]Configuring a Compilation\f[R] and \f[B]Searching for Module, +Package and Type Declarations\f[R]. +.PP +By default, \f[CR]javac\f[R] compiles each source file to a class file +in the same directory as the source file. +However, it is recommended to specify a separate destination directory +with the \f[B]\f[CB]\-d\f[B]\f[R] option. +.PP +Command\-line \f[B]options\f[R] and \f[B]environment variables\f[R] also +control how \f[CR]javac\f[R] performs various tasks: +.IP \[bu] 2 +Compiling code to run on earlier releases of the JDK. +.IP \[bu] 2 +Compiling code to run under a debugger. +.IP \[bu] 2 +Checking for stylistic issues in Java source code. +.IP \[bu] 2 +Checking for problems in \f[CR]javadoc\f[R] comments +(\f[CR]/** ... */\f[R]). +.IP \[bu] 2 +Processing annotations in source files and class files. +.IP \[bu] 2 +Upgrading and patching modules in the compile\-time environment. +.PP +\f[CR]javac\f[R] supports \f[B]Compiling for Earlier Releases Of The +Platform\f[R] and can also be invoked from Java code using one of a +number of \f[B]APIs\f[R] +.SH OPTIONS +\f[CR]javac\f[R] provides \f[B]standard options\f[R], and \f[B]extra +options\f[R] that are either non\-standard or are for advanced use. +.PP +Some options take one or more arguments. +If an argument contains spaces or other whitespace characters, the value +should be quoted according to the conventions of the environment being +used to invoke javac. +If the option begins with a single dash (\f[CR]\-\f[R]) the argument +should either directly follow the option name, or should be separated +with a colon (\f[CR]:\f[R]) or whitespace, depending on the option. +If the option begins with a double dash (\f[CR]\-\-\f[R]), the argument +may be separated either by whitespace or by an equals (\f[CR]=\f[R]) +character with no additional whitespace. +For example, +.IP +.EX +\-Aname=\[dq]J. Duke\[dq] +\-proc:only +\-d myDirectory +\-\-module\-version 3 +\-\-module\-version=3 +.EE +.PP +In the following lists of options, an argument of \f[I]path\f[R] +represents a search path, composed of a list of file system locations +separated by the platform path separator character, (semicolon +\f[CR];\f[R] on Windows, or colon \f[CR]:\f[R] on other systems.) +Depending on the option, the file system locations may be directories, +JAR files or JMOD files. +.SS Standard Options +.TP +\f[CR]\[at]\f[R]\f[I]filename\f[R] +Reads options and file names from a file. +To shorten or simplify the \f[CR]javac\f[R] command, you can specify one +or more files that contain arguments to the \f[CR]javac\f[R] command +(except \f[B]\f[CB]\-J\f[B]\f[R] options). +This lets you to create \f[CR]javac\f[R] commands of any length on any +operating system. +See \f[B]Command\-Line Argument Files\f[R]. +.TP +\f[CR]\-A\f[R]\f[I]key\f[R][\f[CR]=\f[R]\f[I]value\f[R]] +Specifies options to pass to annotation processors. +These options are not interpreted by \f[CR]javac\f[R] directly, but are +made available for use by individual processors. +The \f[I]key\f[R] value should be one or more identifiers separated by a +dot (\f[CR].\f[R]). +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\f[R]\f[CR],\f[R]\f[I]module\f[R] +Specifies root modules to resolve in addition to the initial modules, or +all modules on the module path if \f[I]module\f[R] is +\f[CR]ALL\-MODULE\-PATH\f[R]. +.TP +\f[CR]\-\-boot\-class\-path\f[R] \f[I]path\f[R] or \f[CR]\-bootclasspath\f[R] \f[I]path\f[R] +Overrides the location of the bootstrap class files. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +For JDK 9 or later, see \f[B]\f[CB]\-\-system\f[B]\f[R]. +.RE +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R], \f[CR]\-classpath\f[R] \f[I]path\f[R], or \f[CR]\-cp\f[R] \f[I]path\f[R] +Specifies where to find user class files and annotation processors. +This class path overrides the user class path in the +\f[CR]CLASSPATH\f[R] environment variable. +.RS +.IP \[bu] 2 +If \f[CR]\-\-class\-path\f[R], \f[CR]\-classpath\f[R], or +\f[CR]\-cp\f[R] are not specified, then the user class path is the value +of the \f[CR]CLASSPATH\f[R] environment variable, if that is set, or +else the current directory. +.IP \[bu] 2 +If not compiling code for modules, if the +\f[B]\f[CB]\-\-source\-path\f[B]\f[R] or \-sourcepath\[ga] option is not +specified, then the user class path is also searched for source files. +.IP \[bu] 2 +If the \f[B]\f[CB]\-processorpath\f[B]\f[R] option is not specified, +then the class path is also searched for annotation processors. +.RE +.TP +\f[CR]\-d\f[R] \f[I]directory\f[R] +Sets the destination directory (or \f[I]class output directory\f[R]) for +class files. +If a class is part of a package, then \f[CR]javac\f[R] puts the class +file in a subdirectory that reflects the module name (if appropriate) +and package name. +The directory, and any necessary subdirectories, will be created if they +do not already exist. +.RS +.PP +If the \f[CR]\-d\f[R] option is not specified, then \f[CR]javac\f[R] +puts each class file in the same directory as the source file from which +it was generated. +.PP +Except when compiling code for multiple modules, the contents of the +class output directory will be organized in a package hierarchy. +When compiling code for multiple modules, the contents of the output +directory will be organized in a module hierarchy, with the contents of +each module in a separate subdirectory, each organized as a package +hierarchy. +.PP +\f[B]Note:\f[R] When compiling code for one or more modules, the class +output directory will automatically be checked when searching for +previously compiled classes. +When not compiling for modules, for backwards compatibility, the +directory is \f[I]not\f[R] automatically checked for previously compiled +classes, and so it is recommended to specify the class output directory +as one of the locations on the user class path, using the +\f[CR]\-\-class\-path\f[R] option or one of its alternate forms. +.RE +.TP +\f[CR]\-deprecation\f[R] +Shows a description of each use or override of a deprecated member or +class. +Without the \f[CR]\-deprecation\f[R] option, \f[CR]javac\f[R] shows a +summary of the source files that use or override deprecated members or +classes. +The \f[CR]\-deprecation\f[R] option is shorthand for +\f[CR]\-Xlint:deprecation\f[R]. +.TP +\f[CR]\-\-enable\-preview\f[R] +Enables preview language features. +Used in conjunction with either \f[B]\f[CB]\-source\f[B]\f[R] or +\f[B]\f[CB]\-\-release\f[B]\f[R]. +.TP +\f[CR]\-encoding\f[R] \f[I]encoding\f[R] +Specifies character encoding used by source files, such as EUC\-JP and +UTF\-8. +If the \f[CR]\-encoding\f[R] option is not specified, then the platform +default converter is used. +.TP +\f[CR]\-endorseddirs\f[R] \f[I]directories\f[R] +Overrides the location of the endorsed standards path. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-extdirs\f[R] \f[I]directories\f[R] +Overrides the location of the installed extensions. +\f[CR]directories\f[R] is a list of directories, separated by the +platform path separator (\f[CR];\f[R] on Windows, and \f[CR]:\f[R] +otherwise). +Each JAR file in the specified directories is searched for class files. +All JAR files found become part of the class path. +.RS +.PP +If you are compiling for a release of the platform that supports the +Extension Mechanism, then this option specifies the directories that +contain the extension classes. +See [Compiling for Other Releases of the Platform]. +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-g\f[R] +Generates all debugging information, including local variables. +By default, only line number and source file information is generated. +.TP +\f[CR]\-g:\f[R][\f[CR]lines\f[R], \f[CR]vars\f[R], \f[CR]source\f[R]] +Generates only the kinds of debugging information specified by the +comma\-separated list of keywords. +Valid keywords are: +.RS +.TP +\f[CR]lines\f[R] +Line number debugging information. +.TP +\f[CR]vars\f[R] +Local variable debugging information. +.TP +\f[CR]source\f[R] +Source file debugging information. +.RE +.TP +\f[CR]\-g:none\f[R] +Does not generate debugging information. +.TP +\f[CR]\-h\f[R] \f[I]directory\f[R] +Specifies where to place generated native header files. +.RS +.PP +When you specify this option, a native header file is generated for each +class that contains native methods or that has one or more constants +annotated with the \f[B]\f[CB]java.lang.annotation.Native\f[B]\f[R] +annotation. +If the class is part of a package, then the compiler puts the native +header file in a subdirectory that reflects the module name (if +appropriate) and package name. +The directory, and any necessary subdirectories, will be created if they +do not already exist. +.RE +.TP +\f[CR]\-\-help\f[R], \f[CR]\-help\f[R] or \f[CR]\-?\f[R] +Prints a synopsis of the standard options. +.TP +\f[CR]\-\-help\-extra\f[R] or \f[CR]\-X\f[R] +Prints a synopsis of the set of extra options. +.TP +\f[CR]\-\-help\-lint\f[R] +Prints the supported keys for the \f[CR]\-Xlint\f[R] option. +.TP +\f[CR]\-implicit:\f[R][\f[CR]none\f[R], \f[CR]class\f[R]] +Specifies whether or not to generate class files for implicitly +referenced files: +.RS +.IP \[bu] 2 +\f[CR]\-implicit:class\f[R] \-\-\- Automatically generates class files. +.IP \[bu] 2 +\f[CR]\-implicit:none\f[R] \-\-\- Suppresses class file generation. +.PP +If this option is not specified, then the default automatically +generates class files. +In this case, the compiler issues a warning if any class files are +generated when also doing annotation processing. +The warning is not issued when the \f[CR]\-implicit\f[R] option is +explicitly set. +See \f[B]Searching for Module, Package and Type Declarations\f[R]. +.RE +.TP +\f[CR]\-J\f[R]\f[I]option\f[R] +Passes \f[I]option\f[R] to the runtime system, where \f[I]option\f[R] is +one of the Java options described on \f[B]java\f[R] command. +For example, \f[CR]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +.RS +.PP +\f[B]Note:\f[R] The \f[CR]CLASSPATH\f[R] environment variable, +\f[CR]\-classpath\f[R] option, \f[CR]\-bootclasspath\f[R] option, and +\f[CR]\-extdirs\f[R] option do not specify the classes used to run +\f[CR]javac\f[R]. +Trying to customize the compiler implementation with these options and +variables is risky and often does not accomplish what you want. +If you must customize the compiler implementation, then use the +\f[CR]\-J\f[R] option to pass options through to the underlying Java +launcher. +.RE +.TP +\f[CR]\-\-limit\-modules\f[R] \f[I]module\f[R]\f[CR],\f[R]\f[I]module\f[R]* +Limits the universe of observable modules. +.TP +\f[CR]\-\-module\f[R] \f[I]module\-name\f[R] (\f[CR],\f[R]\f[I]module\-name\f[R])* or \f[CR]\-m\f[R] \f[I]module\-name\f[R] (\f[CR],\f[R]\f[I]module\-name\f[R])* +Compiles those source files in the named modules that are newer than the +corresponding files in the output directory. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]path\f[R] or \f[CR]\-p\f[R] \f[I]path\f[R] +Specifies where to find application modules. +.TP +\f[CR]\-\-module\-source\-path\f[R] \f[I]module\-source\-path\f[R] +Specifies where to find source files when compiling code in multiple +modules. +See \f[B]The Module Source Path Option\f[R]. +.TP +\f[CR]\-\-module\-version\f[R] \f[I]version\f[R] +Specifies the version of modules that are being compiled. +.TP +\f[CR]\-nowarn\f[R] +Generate only mandatory warnings. +.TP +\f[CR]\-parameters\f[R] +Generates metadata for reflection on method parameters. +Stores formal parameter names of constructors and methods in the +generated class file so that the method +\f[CR]java.lang.reflect.Executable.getParameters\f[R] from the +Reflection API can retrieve them. +.TP +\f[CR]\-proc:\f[R][\f[CR]none\f[R], \f[CR]only\f[R], \f[CR]full\f[R]] +Controls whether annotation processing and compilation are done. +.RS +.IP \[bu] 2 +\f[CR]\-proc:none\f[R] means that compilation takes place without +annotation processing +.IP \[bu] 2 +\f[CR]\-proc:only\f[R] means that only annotation processing is done, +without any subsequent compilation. +.IP \[bu] 2 +\f[CR]\-proc:full\f[R] means annotation processing and compilation are +done. +.PP +If this option is not used, annotation processing and compilation are +done if at least one other option is used to explicitly configure +annotation processing. +.RE +.TP +\f[CR]\-processor\f[R] \f[I]class1\f[R][\f[CR],\f[R]\f[I]class2\f[R]\f[CR],\f[R]\f[I]class3\f[R]...] +Names of the annotation processors to run. +This bypasses the default discovery process. +.TP +\f[CR]\-\-processor\-module\-path\f[R] \f[I]path\f[R] +Specifies the module path used for finding annotation processors. +.TP +\f[CR]\-\-processor\-path\f[R] \f[I]path\f[R] or \f[CR]\-processorpath\f[R] \f[I]path\f[R] +Specifies where to find annotation processors. +If this option is not used, then the class path is searched for +processors. +.TP +\f[CR]\-profile\f[R] \f[I]profile\f[R] +Checks that the API used is available in the specified profile. +This option is deprecated and may be removed in a future release. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-\-release\f[R] \f[I]release\f[R] +Compiles source code according to the rules of the Java programming +language for the specified Java SE release, generating class files which +target that release. +Source code is compiled against the combined Java SE and JDK API for the +specified release. +.RS +.PP +The supported values of \f[I]release\f[R] are the current Java SE +release and a limited number of previous releases, detailed in the +command\-line help. +.PP +For the current release, the Java SE API consists of the +\f[CR]java.*\f[R], \f[CR]javax.*\f[R], and \f[CR]org.*\f[R] packages +that are exported by the Java SE modules in the release; the JDK API +consists of the \f[CR]com.*\f[R] and \f[CR]jdk.*\f[R] packages that are +exported by the JDK modules in the release, plus the \f[CR]javax.*\f[R] +packages that are exported by standard, but non\-Java SE, modules in the +release. +.PP +For previous releases, the Java SE API and the JDK API are as defined in +that release. +.PP +\f[B]Note:\f[R] When using \f[CR]\-\-release\f[R], you cannot also use +the \f[B]\f[CB]\-\-source\f[B]\f[R]/\f[CR]\-source\f[R] or +\f[B]\f[CB]\-\-target\f[B]\f[R]/\f[CR]\-target\f[R] options. +.PP +\f[B]Note:\f[R] When using \f[CR]\-\-release\f[R] to specify a release +that supports the Java Platform Module System, the +\f[CR]\-\-add\-exports\f[R] option cannot be used to enlarge the set of +packages exported by the Java SE, JDK, and standard modules in the +specified release. +.RE +.TP +\f[CR]\-s\f[R] \f[I]directory\f[R] +Specifies the directory used to place the generated source files. +If a class is part of a package, then the compiler puts the source file +in a subdirectory that reflects the module name (if appropriate) and +package name. +The directory, and any necessary subdirectories, will be created if they +do not already exist. +.RS +.PP +Except when compiling code for multiple modules, the contents of the +source output directory will be organized in a package hierarchy. +When compiling code for multiple modules, the contents of the source +output directory will be organized in a module hierarchy, with the +contents of each module in a separate subdirectory, each organized as a +package hierarchy. +.RE +.TP +\f[CR]\-\-source\f[R] \f[I]release\f[R] or \f[CR]\-source\f[R] \f[I]release\f[R] +Compiles source code according to the rules of the Java programming +language for the specified Java SE release. +The supported values of \f[I]release\f[R] are the current Java SE +release and a limited number of previous releases, detailed in the +command\-line help. +.RS +.PP +If the option is not specified, the default is to compile source code +according to the rules of the Java programming language for the current +Java SE release. +.RE +.TP +\f[CR]\-\-source\-path\f[R] \f[I]path\f[R] or \f[CR]\-sourcepath\f[R] \f[I]path\f[R] +Specifies where to find source files. +Except when compiling multiple modules together, this is the source code +path used to search for class or interface definitions. +.RS +.PP +\f[B]Note:\f[R] Classes found through the class path might be recompiled +when their source files are also found. +See \f[B]Searching for Module, Package and Type Declarations\f[R]. +.RE +.TP +\f[CR]\-\-system\f[R] \f[I]jdk\f[R] | \f[CR]none\f[R] +Overrides the location of system modules. +.TP +\f[CR]\-\-target\f[R] \f[I]release\f[R] or \f[CR]\-target\f[R] \f[I]release\f[R] +Generates \f[CR]class\f[R] files suitable for the specified Java SE +release. +The supported values of \f[I]release\f[R] are the current Java SE +release and a limited number of previous releases, detailed in the +command\-line help. +.RS +.PP +\f[B]Note:\f[R] The target release must be equal to or higher than the +source release. +(See \f[B]\f[CB]\-\-source\f[B]\f[R].) +.RE +.TP +\f[CR]\-\-upgrade\-module\-path\f[R] \f[I]path\f[R] +Overrides the location of upgradeable modules. +.TP +\f[CR]\-verbose\f[R] +Outputs messages about what the compiler is doing. +Messages include information about each class loaded and each source +file compiled. +.TP +\f[CR]\-\-version\f[R] or \f[CR]\-version\f[R] +Prints version information. +.TP +\f[CR]\-Werror\f[R] +Terminates compilation when warnings occur. +.SS Extra Options +.TP +\f[CR]\-\-add\-exports\f[R] \f[I]module\f[R]\f[CR]/\f[R]\f[I]package\f[R]\f[CR]=\f[R]\f[I]other\-module\f[R](\f[CR],\f[R]\f[I]other\-module\f[R])* +Specifies a package to be considered as exported from its defining +module to additional modules or to all unnamed modules when the value of +\f[I]other\-module\f[R] is \f[CR]ALL\-UNNAMED\f[R]. +.TP +\f[CR]\-\-add\-reads\f[R] \f[I]module\f[R]\f[CR]=\f[R]\f[I]other\-module\f[R](\f[CR],\f[R]\f[I]other\-module\f[R])* +Specifies additional modules to be considered as required by a given +module. +.TP +\f[CR]\-\-default\-module\-for\-created\-files\f[R] \f[I]module\-name\f[R] +Specifies the fallback target module for files created by annotation +processors, if none is specified or inferred. +.TP +\f[CR]\-\-disable\-line\-doc\-comments\f[R] +Disables support for documentation comments with lines beginning ///. +.TP +\f[CR]\-Djava.endorsed.dirs=\f[R]\f[I]dirs\f[R] +Overrides the location of the endorsed standards path. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-Djava.ext.dirs=\f[R]\f[I]dirs\f[R] +Overrides the location of installed extensions. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-\-patch\-module\f[R] \f[I]module\f[R]\f[CR]=\f[R]\f[I]path\f[R] +Overrides or augments a module with classes and resources in JAR files +or directories. +.TP +\f[CR]\-Xbootclasspath:\f[R]\f[I]path\f[R] +Overrides the location of the bootstrap class files. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-Xbootclasspath/a:\f[R]\f[I]path\f[R] +Adds a suffix to the bootstrap class path. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-Xbootclasspath/p:\f[R]\f[I]path\f[R] +Adds a prefix to the bootstrap class path. +.RS +.PP +\f[B]Note:\f[R] This can only be used when compiling for releases prior +to JDK 9. +As applicable, see the descriptions in \f[B]\f[CB]\-\-release\f[B]\f[R], +\f[B]\f[CB]\-source\f[B]\f[R], or \f[B]\f[CB]\-target\f[B]\f[R] for +details. +.RE +.TP +\f[CR]\-Xdiags:\f[R][\f[CR]compact\f[R], \f[CR]verbose\f[R]] +Selects a diagnostic mode. +.TP +\f[CR]\-Xdoclint\f[R] +Enables recommended checks for problems in documentation comments. +.TP +\f[CR]\-Xdoclint:\f[R](\f[CR]all\f[R]|\f[CR]none\f[R]|[\f[CR]\-\f[R]]\f[I]group\f[R])[\f[CR]/\f[R]\f[I]access\f[R]] +Enables or disables specific groups of checks in documentation comments. +.RS +.PP +\f[I]group\f[R] can have one of the following values: +\f[CR]accessibility\f[R], \f[CR]html\f[R], \f[CR]missing\f[R], +\f[CR]reference\f[R], \f[CR]syntax\f[R]. +.PP +The variable \f[I]access\f[R] specifies the minimum visibility level of +classes and members that the \f[CR]\-Xdoclint\f[R] option checks. +It can have one of the following values (in order of most to least +visible): \f[CR]public\f[R], \f[CR]protected\f[R], \f[CR]package\f[R], +\f[CR]private\f[R]. +.PP +The default \f[I]access\f[R] level is \f[CR]private\f[R]. +.PP +When prefixed by \f[CR]doclint:\f[R], the \f[I]group\f[R] names and +\f[CR]all\f[R] can be used with \f[CR]\[at]SuppressWarnings\f[R] to +suppress warnings about documentation comments in parts of the code +being compiled. +.PP +For more information about these groups of checks, see the +\f[B]DocLint\f[R] section of the \f[CR]javadoc\f[R] command +documentation. +The \f[CR]\-Xdoclint\f[R] option is disabled by default in the +\f[CR]javac\f[R] command. +.PP +For example, the following option checks classes and members (with all +groups of checks) that have the access level of protected and higher +(which includes protected and public): +.RS +.PP +\f[CR]\-Xdoclint:all/protected\f[R] +.RE +.PP +The following option enables all groups of checks for all access levels, +except it will not check for HTML errors for classes and members that +have the access level of package and higher (which includes package, +protected and public): +.RS +.PP +\f[CR]\-Xdoclint:all,\-html/package\f[R] +.RE +.RE +.TP +\f[CR]\-Xdoclint/package:\f[R][\f[CR]\-\f[R]]\f[I]packages\f[R](\f[CR],\f[R][\f[CR]\-\f[R]]\f[I]package\f[R])* +Enables or disables checks in specific packages. +Each \f[I]package\f[R] is either the qualified name of a package or a +package name prefix followed by \f[CR].*\f[R], which expands to all +sub\-packages of the given package. +Each \f[I]package\f[R] can be prefixed with a hyphen (\f[CR]\-\f[R]) to +disable checks for a specified package or packages. +.RS +.PP +For more information, see the \f[B]DocLint\f[R] section of the +\f[CR]javadoc\f[R] command documentation. +.RE +.TP +\f[CR]\-Xlint\f[R] +Enables all recommended warnings. +In this release, enabling all available warnings is recommended. +.TP +\f[CR]\-Xlint:\f[R][\f[CR]\-\f[R]]\f[I]key\f[R](\f[CR],\f[R][\f[CR]\-\f[R]]\f[I]key\f[R])* +Enables and/or disables warning categories using the one or more of the +keys described below separated by commas. +The keys \f[CR]all\f[R] and \f[CR]none\f[R] enable or disable all +categories (respectively); other keys enable the corresponding category, +or disable it if preceded by a hyphen (\f[CR]\-\f[R]). +.RS +.PP +Supported values for \f[I]key\f[R] are: +.IP \[bu] 2 +\f[CR]all\f[R]: Enables all warning categories. +.IP \[bu] 2 +\f[CR]auxiliaryclass\f[R]: Warns about an auxiliary class that is hidden +in a source file, and is used from other files. +.IP \[bu] 2 +\f[CR]cast\f[R]: Warns about the use of unnecessary casts. +.IP \[bu] 2 +\f[CR]classfile\f[R]: Warns about the issues related to classfile +contents. +.IP \[bu] 2 +\f[CR]dangling\-doc\-comments\f[R]: Warns about extra or misplaced +documentation comments near the beginning of a declaration. +.IP \[bu] 2 +\f[CR]deprecation\f[R]: Warns about the use of deprecated items. +.IP \[bu] 2 +\f[CR]dep\-ann\f[R]: Warns about the items marked as deprecated in +\f[CR]javadoc\f[R] but without the \f[CR]\[at]Deprecated\f[R] +annotation. +.IP \[bu] 2 +\f[CR]divzero\f[R]: Warns about the division by the constant integer 0. +.IP \[bu] 2 +\f[CR]empty\f[R]: Warns about an empty statement after \f[CR]if\f[R]. +.IP \[bu] 2 +\f[CR]exports\f[R]: Warns about the issues regarding module exports. +.IP \[bu] 2 +\f[CR]fallthrough\f[R]: Warns about the falling through from one case of +a switch statement to the next. +.IP \[bu] 2 +\f[CR]finally\f[R]: Warns about \f[CR]finally\f[R] clauses that do not +terminate normally. +.IP \[bu] 2 +\f[CR]identity\f[R]: Warns about use of a value\-based class where an +identity class is expected +.IP \[bu] 2 +\f[CR]incubating\f[R]: Warns about the use of incubating modules. +.IP \[bu] 2 +\f[CR]lossy\-conversions\f[R]: Warns about possible lossy conversions in +compound assignment. +.IP \[bu] 2 +\f[CR]missing\-explicit\-ctor\f[R]: Warns about missing explicit +constructors in public and protected classes in exported packages. +.IP \[bu] 2 +\f[CR]module\f[R]: Warns about the module system\-related issues. +.IP \[bu] 2 +\f[CR]opens\f[R]: Warns about the issues related to module opens. +.IP \[bu] 2 +\f[CR]options\f[R]: Warns about the issues relating to use of command +line options. +.IP \[bu] 2 +\f[CR]output\-file\-clash\f[R]: Warns if any output file is overwritten +during compilation. +This can occur, for example, on case\-insensitive filesystems. +.IP \[bu] 2 +\f[CR]overloads\f[R]: Warns about the issues related to method +overloads. +.IP \[bu] 2 +\f[CR]overrides\f[R]: Warns about the issues related to method +overrides. +.IP \[bu] 2 +\f[CR]path\f[R]: Warns about the invalid path elements on the command +line. +.IP \[bu] 2 +\f[CR]preview\f[R]: Warns about the use of preview language features. +.IP \[bu] 2 +\f[CR]processing\f[R]: Warns about the issues related to annotation +processing. +.IP \[bu] 2 +\f[CR]rawtypes\f[R]: Warns about the use of raw types. +.IP \[bu] 2 +\f[CR]removal\f[R]: Warns about the use of an API that has been marked +for removal. +.IP \[bu] 2 +\f[CR]restricted\f[R]: Warns about the use of restricted methods. +.IP \[bu] 2 +\f[CR]requires\-automatic\f[R]: Warns developers about the use of +automatic modules in requires clauses. +.IP \[bu] 2 +\f[CR]requires\-transitive\-automatic\f[R]: Warns about automatic +modules in requires transitive. +.IP \[bu] 2 +\f[CR]serial\f[R]: Warns about the serializable classes that do not +provide a serial version ID. +Also warns about access to non\-public members from a serializable +element. +.IP \[bu] 2 +\f[CR]static\f[R]: Warns about the accessing a static member using an +instance. +.IP \[bu] 2 +\f[CR]strictfp\f[R]: Warns about unnecessary use of the +\f[CR]strictfp\f[R] modifier. +.IP \[bu] 2 +\f[CR]synchronization\f[R]: Warns about synchronization attempts on +instances of value\-based classes. +This key is a deprecated alias for \f[CR]identity\f[R], which has the +same uses and effects. +Users are encouraged to use the \f[CR]identity\f[R] category for all +future and existing uses of \f[CR]synchronization\f[R]. +.IP \[bu] 2 +\f[CR]text\-blocks\f[R]: Warns about inconsistent white space characters +in text block indentation. +.IP \[bu] 2 +\f[CR]this\-escape\f[R]: Warns about constructors leaking +\f[CR]this\f[R] prior to subclass initialization. +.IP \[bu] 2 +\f[CR]try\f[R]: Warns about the issues relating to the use of try blocks +(that is, try\-with\-resources). +.IP \[bu] 2 +\f[CR]unchecked\f[R]: Warns about the unchecked operations. +.IP \[bu] 2 +\f[CR]varargs\f[R]: Warns about the potentially unsafe \f[CR]vararg\f[R] +methods. +.IP \[bu] 2 +\f[CR]none\f[R]: Disables all warning categories. +.PP +With the exception of \f[CR]all\f[R] and \f[CR]none\f[R], the keys can +be used with the \f[CR]\[at]SuppressWarnings\f[R] annotation to suppress +warnings in a part of the source code being compiled. +.PP +See \f[B]Examples of Using \-Xlint keys\f[R]. +.RE +.TP +\f[CR]\-Xmaxerrs\f[R] \f[I]number\f[R] +Sets the maximum number of errors to print. +.TP +\f[CR]\-Xmaxwarns\f[R] \f[I]number\f[R] +Sets the maximum number of warnings to print. +.TP +\f[CR]\-Xpkginfo:\f[R][\f[CR]always\f[R], \f[CR]legacy\f[R], \f[CR]nonempty\f[R]] +Specifies when and how the \f[CR]javac\f[R] command generates +\f[CR]package\-info.class\f[R] files from \f[CR]package\-info.java\f[R] +files using one of the following options: +.RS +.TP +\f[CR]always\f[R] +Generates a \f[CR]package\-info.class\f[R] file for every +\f[CR]package\-info.java\f[R] file. +This option may be useful if you use a build system such as Ant, which +checks that each \f[CR].java\f[R] file has a corresponding +\f[CR].class\f[R] file. +.TP +\f[CR]legacy\f[R] +Generates a \f[CR]package\-info.class\f[R] file only if +\f[CR]package\-info.java\f[R] contains annotations. +This option does not generate a \f[CR]package\-info.class\f[R] file if +\f[CR]package\-info.java\f[R] contains only comments. +.RS +.PP +\f[B]Note:\f[R] A \f[CR]package\-info.class\f[R] file might be generated +but be empty if all the annotations in the \f[CR]package\-info.java\f[R] +file have \f[CR]RetentionPolicy.SOURCE\f[R]. +.RE +.TP +\f[CR]nonempty\f[R] +Generates a \f[CR]package\-info.class\f[R] file only if +\f[CR]package\-info.java\f[R] contains annotations with +\f[CR]RetentionPolicy.CLASS\f[R] or \f[CR]RetentionPolicy.RUNTIME\f[R]. +.RE +.TP +\f[CR]\-Xplugin:\f[R]\f[I]name\f[R] \f[I]args\f[R] +Specifies the name and optional arguments for a plug\-in to be run. +If \f[I]args\f[R] are provided, \f[I]name\f[R] and \f[I]args\f[R] should +be quoted or otherwise escape the whitespace characters between the name +and all the arguments. +For details on the API for a plugin, see the API documentation for +\f[B]jdk.compiler/com.sun.source.util.Plugin\f[R]. +.TP +\f[CR]\-Xprefer:\f[R][\f[CR]source\f[R], \f[CR]newer\f[R]] +Specifies which file to read when both a source file and class file are +found for an implicitly compiled class using one of the following +options. +See \f[B]Searching for Module, Package and Type Declarations\f[R]. +.RS +.IP \[bu] 2 +\f[CR]\-Xprefer:newer\f[R]: Reads the newer of the source or class files +for a type (default). +.IP \[bu] 2 +\f[CR]\-Xprefer:source\f[R] : Reads the source file. +Use \f[CR]\-Xprefer:source\f[R] when you want to be sure that any +annotation processors can access annotations declared with a retention +policy of \f[CR]SOURCE\f[R]. +.RE +.TP +\f[CR]\-Xprint\f[R] +Prints a textual representation of specified types for debugging +purposes. +This does not perform annotation processing or compilation. +The format of the output could change. +.TP +\f[CR]\-XprintProcessorInfo\f[R] +Prints information about which annotations a processor is asked to +process. +.TP +\f[CR]\-XprintRounds\f[R] +Prints information about initial and subsequent annotation processing +rounds. +.TP +\f[CR]\-Xstdout\f[R] \f[I]filename\f[R] +Sends compiler messages to the named file. +By default, compiler messages go to \f[CR]System.err\f[R]. +.SH ENVIRONMENT VARIABLES +.SS CLASSPATH +If the \f[B]\f[CB]\-\-class\-path\f[B]\f[R] option or any of its +alternate forms are not specified, the class path will default to the +value of the \f[CR]CLASSPATH\f[R] environment variable if it is set. +However, it is recommended that this environment variable should +\f[I]not\f[R] be set, and that the \f[CR]\-\-class\-path\f[R] option +should be used to provide an explicit value for the class path when one +is required. +.SS JDK_JAVAC_OPTIONS +The content of the \f[CR]JDK_JAVAC_OPTIONS\f[R] environment variable, +separated by white\-spaces ( ) or white\-space characters +(\f[CR]\[rs]n\f[R], \f[CR]\[rs]t\f[R], \f[CR]\[rs]r\f[R], or +\f[CR]\[rs]f\f[R]) is prepended to the command line arguments passed to +\f[CR]javac\f[R] as a list of arguments. +.PP +The encoding requirement for the environment variable is the same as the +\f[CR]javac\f[R] command line on the system. +\f[CR]JDK_JAVAC_OPTIONS\f[R] environment variable content is treated in +the same manner as that specified in the command line. +.PP +Single quotes (\f[CR]\[aq]\f[R]) or double quotes (\f[CR]\[dq]\f[R]) can +be used to enclose arguments that contain whitespace characters. +All content between the open quote and the first matching close quote +are preserved by simply removing the pair of quotes. +In case a matching quote is not found, the launcher will abort with an +error message. +\f[CR]\[at]\f[R]\f[I]files\f[R] are supported as they are specified in +the command line. +However, as in \f[CR]\[at]\f[R]\f[I]files\f[R], use of a wildcard is not +supported. +.PP +\f[B]Examples of quoting arguments containing white spaces:\f[R] +.RS +.PP +\f[CR]export JDK_JAVAC_OPTIONS=\[aq]\[at]\[dq]C:\[rs]white spaces\[rs]argfile\[dq]\[aq]\f[R] +.RE +.RS +.PP +\f[CR]export JDK_JAVAC_OPTIONS=\[aq]\[dq]\[at]C:\[rs]white spaces\[rs]argfile\[dq]\[aq]\f[R] +.RE +.RS +.PP +\f[CR]export JDK_JAVAC_OPTIONS=\[aq]\[at]C:\[rs]\[dq]white spaces\[dq]\[rs]argfile\[aq]\f[R] +.RE +.SH COMMAND\-LINE ARGUMENT FILES +An argument file can include command\-line options and source file names +in any combination. +The arguments within a file can be separated by spaces or new line +characters. +If a file name contains embedded spaces, then put the whole file name in +double quotation marks. +.PP +File names within an argument file are relative to the current +directory, not to the location of the argument file. +Wildcards (\f[CR]*\f[R]) are not allowed in these lists (such as for +specifying \f[CR]*.java\f[R]). +Use of the at sign (\f[CR]\[at]\f[R]) to recursively interpret files is +not supported. +The \f[CR]\-J\f[R] options are not supported because they\[aq]re passed +to the launcher, which does not support argument files. +.PP +When executing the \f[CR]javac\f[R] command, pass in the path and name +of each argument file with the at sign (\f[CR]\[at]\f[R]) leading +character. +When the \f[CR]javac\f[R] command encounters an argument beginning with +the at sign (\f[CR]\[at]\f[R]), it expands the contents of that file +into the argument list. +.SS Examples of Using javac \[at]filename +.TP +Single Argument File +You could use a single argument file named \f[CR]argfile\f[R] to hold +all \f[CR]javac\f[R] arguments: +.RS +.RS +.PP +\f[CR]javac \[at]argfile\f[R] +.RE +.PP +This argument file could contain the contents of both files shown in the +following \f[B]Two Argument Files\f[R] example. +.RE +.TP +Two Argument Files +You can create two argument files: one for the \f[CR]javac\f[R] options +and the other for the source file names. +Note that the following lists have no line\-continuation characters. +.RS +.PP +Create a file named \f[CR]options\f[R] that contains the following: +.PP +\f[B]Linux and macOS:\f[R] +.IP +.EX +\-d classes +\-g +\-sourcepath /java/pubs/ws/1.3/src/share/classes +.EE +.PP +\f[B]Windows:\f[R] +.IP +.EX +\-d classes +\-g +\-sourcepath C:\[rs]java\[rs]pubs\[rs]ws\[rs]1.3\[rs]src\[rs]share\[rs]classes +.EE +.PP +Create a file named \f[CR]sources\f[R] that contains the following: +.IP +.EX +MyClass1.java +MyClass2.java +MyClass3.java +.EE +.PP +Then, run the \f[CR]javac\f[R] command as follows: +.RS +.PP +\f[CR]javac \[at]options \[at]sources\f[R] +.RE +.RE +.TP +Argument Files with Paths +The argument files can have paths, but any file names inside the files +are relative to the current working directory (not \f[CR]path1\f[R] or +\f[CR]path2\f[R]): +.RS +.RS +.PP +\f[CR]javac \[at]path1/options \[at]path2/sources\f[R] +.RE +.RE +.SH ARRANGEMENT OF SOURCE CODE +In the Java language, classes and interfaces can be organized into +packages, and packages can be organized into modules. +\f[CR]javac\f[R] expects that the physical arrangement of source files +in directories of the file system will mirror the organization of +classes into packages, and packages into modules. +.PP +It is a widely adopted convention that module names and package names +begin with a lower\-case letter, and that class names begin with an +upper\-case letter. +.SS Arrangement of Source Code for a Package +When classes and interfaces are organized into a package, the package is +represented as a directory, and any subpackages are represented as +subdirectories. +.PP +For example: +.IP \[bu] 2 +The package \f[CR]p\f[R] is represented as a directory called +\f[CR]p\f[R]. +.IP \[bu] 2 +The package \f[CR]p.q\f[R] \-\- that is, the subpackage \f[CR]q\f[R] of +package \f[CR]p\f[R] \-\- is represented as the subdirectory +\f[CR]q\f[R] of directory \f[CR]p\f[R]. +The directory tree representing package \f[CR]p.q\f[R] is therefore +\f[CR]p\[rs]q\f[R] on Windows, and \f[CR]p/q\f[R] on other systems. +.IP \[bu] 2 +The package \f[CR]p.q.r\f[R] is represented as the directory tree +\f[CR]p\[rs]q\[rs]r\f[R] (on Windows) or \f[CR]p/q/r\f[R] (on other +systems). +.PP +Within a directory or subdirectory, \f[CR].java\f[R] files represent +classes and interfaces in the corresponding package or subpackage. +.PP +For example: +.IP \[bu] 2 +The class \f[CR]X\f[R] declared in package \f[CR]p\f[R] is represented +by the file \f[CR]X.java\f[R] in the \f[CR]p\f[R] directory. +.IP \[bu] 2 +The class \f[CR]Y\f[R] declared in package \f[CR]p.q\f[R] is represented +by the file \f[CR]Y.java\f[R] in the \f[CR]q\f[R] subdirectory of +directory \f[CR]p\f[R]. +.IP \[bu] 2 +The class \f[CR]Z\f[R] declared in package \f[CR]p.q.r\f[R] is +represented by the file \f[CR]Z.java\f[R] in the \f[CR]r\f[R] +subdirectory of \f[CR]p\[rs]q\f[R] (on Windows) or \f[CR]p/q\f[R] (on +other systems). +.PP +In some situations, it is convenient to split the code into separate +directories, each structured as described above, and the aggregate list +of directories specified to \f[CR]javac\f[R]. +.SS Arrangement of Source Code for a Module +In the Java language, a module is a set of packages designed for reuse. +In addition to \f[CR].java\f[R] files for classes and interfaces, each +module has a source file called \f[CR]module\-info.java\f[R] which: +.IP "1." 3 +declares the module\[aq]s name; +.IP "2." 3 +lists the packages exported by the module (to allow reuse by other +modules); +.IP "3." 3 +lists other modules required by the module (to reuse their exported +packages). +.PP +When packages are organized into a module, the module is represented by +one or more directories representing the packages in the module, one of +which contains the \f[CR]module\-info.java\f[R] file. +It may be convenient, but it is not required, to use a single directory, +named after the module, to contain the \f[CR]module\-info.java\f[R] file +alongside the directory tree which represents the packages in the module +(i.e., the \f[I]package hierarchy\f[R] described above). +The exact arrangement of source code for a module is typically dictated +by the conventions adopted by a development environment (IDE) or build +system. +.PP +For example: +.IP \[bu] 2 +The module \f[CR]a.b.c\f[R] may be represented by the directory +\f[CR]a.b.c\f[R], on all systems. +.IP \[bu] 2 +The module\[aq]s declaration is represented by the file +\f[CR]module\-info.java\f[R] in the \f[CR]a.b.c\f[R] directory. +.IP \[bu] 2 +If the module contains package \f[CR]p.q.r\f[R], then the +\f[CR]a.b.c\f[R] directory contains the directory tree +\f[CR]p\[rs]q\[rs]r\f[R] (on Windows) or \f[CR]p/q/r\f[R] (on other +systems). +.PP +The development environment may prescribe some directory hierarchy +between the directory named for the module and the source files to be +read by \f[CR]javac\f[R]. +.PP +For example: +.IP \[bu] 2 +The module \f[CR]a.b.c\f[R] may be represented by the directory +\f[CR]a.b.c\f[R] +.IP \[bu] 2 +The module\[aq]s declaration and the module\[aq]s packages may be in +some subdirectory of \f[CR]a.b.c\f[R], such as +\f[CR]src\[rs]main\[rs]java\f[R] (on Windows) or +\f[CR]src/main/java\f[R] (on other systems). +.SH CONFIGURING A COMPILATION +This section describes how to configure \f[CR]javac\f[R] to perform a +basic compilation. +.PP +See \f[B]Configuring the Module System\f[R] for additional details for +use when compiling for a release of the platform that supports modules. +.SS Source Files +.IP \[bu] 2 +Specify the source files to be compiled on the command line. +.PP +If there are no compilation errors, the corresponding class files will +be placed in the \f[B]output directory\f[R]. +.PP +Some systems may limit the amount you can put on a command line; to work +around those limits, you can use \f[B]argument files\f[R]. +.PP +When compiling code for modules, you can also specify source files +indirectly, by using the \f[B]\f[CB]\-\-module\f[B]\f[R] or +\f[CR]\-m\f[R] option. +.SS Output Directory +.IP \[bu] 2 +Use the \f[B]\f[CB]\-d\f[B]\f[R] option to specify an output directory +in which to put the compiled class files. +.PP +This will normally be organized in a \f[B]package hierarchy\f[R], unless +you are compiling source code from multiple modules, in which case it +will be organized as a \f[B]module hierarchy\f[R]. +.PP +When the compilation has been completed, if you are compiling one or +more modules, you can place the output directory on the module path for +the Java \f[B]launcher\f[R]; otherwise, you can place the place the +output directory on the class path for the Java launcher. +.SS Precompiled Code +The code to be compiled may refer to libraries beyond what is provided +by the platform. +If so, you must place these libraries on the class path or module path. +If the library code is not in a module, place it on the class path; if +it is in a module, place it on the module path. +.IP \[bu] 2 +Use the \f[B]\f[CB]\-\-class\-path\f[B]\f[R] option to specify libraries +to be placed on the class path. +Locations on the class path should be organized in a \f[B]package +hierarchy\f[R]. +You can also use alternate forms of the option: \f[CR]\-classpath\f[R] +or \f[CR]\-cp\f[R]. +.IP \[bu] 2 +Use the \f[B]\f[CB]\-\-module\-path\f[B]\f[R] option to specify +libraries to be placed on the module path. +Locations on the module path should either be modules or directories of +modules. +You can also use an alternate form of the option: \f[CR]\-p\f[R]. +.RS 2 +.PP +See \f[B]Configuring the Module System\f[R] for details on how to modify +the default configuration of library modules. +.RE +.PP +\f[B]Note\f[R]: the options for the class path and module path are not +mutually exclusive, although it is not common to specify the class path +when compiling code for one or more modules. +.SS Additional Source Files +The code to be compiled may refer to types in additional source files +that are not specified on the command line. +If so, you must put those source files on either the source path or +module path. +You can only specify one of these options: if you are not compiling code +for a module, or if you are only compiling code for a single module, use +the source path; if you are compiling code for multiple modules, use the +module source path. +.IP \[bu] 2 +Use the \f[B]\f[CB]\-\-source\-path\f[B]\f[R] option to specify the +locations of additional source files that may be read by javac. +Locations on the source path should be organized in a \f[B]package +hierarchy\f[R]. +You can also use an alternate form of the option: +\f[CR]\-sourcepath\f[R]. +.IP \[bu] 2 +Use the \f[B]\f[CB]\-\-module\-source\-path\f[B]\f[R] option one or more +times to specify the location of additional source files in different +modules that may be read by javac, or when compiling source files in +multiple modules. +You can either specify the locations for each module +\f[B]individually\f[R], or you can organize the source files so that you +can specify the locations all \f[B]together\f[R]. +For more details, see \f[B]The Module Source Path Option\f[R]. +.PP +If you want to be able to refer to types in additional source files but +do not want them to be compiled, use the \f[B]\f[CB]\-implicit\f[B]\f[R] +option. +.PP +\f[B]Note\f[R]: if you are compiling code for multiple modules, you must +always specify a module source path, and all source files specified on +the command line must be in one of the directories on the module source +path, or in a subdirectory thereof. +.SS Example of Compiling Multiple Source Files +This example compiles the \f[CR]Aloha.java\f[R], +\f[CR]GutenTag.java\f[R], \f[CR]Hello.java\f[R], and \f[CR]Hi.java\f[R] +source files in the \f[CR]greetings\f[R] package. +.PP +\f[B]Linux and macOS:\f[R] +.IP +.EX +% javac greetings/*.java +% ls greetings +Aloha.class GutenTag.class Hello.class Hi.class +Aloha.java GutenTag.java Hello.java Hi.java +.EE +.PP +\f[B]Windows:\f[R] +.IP +.EX +C:\[rs]>javac greetings\[rs]*.java +C:\[rs]>dir greetings +Aloha.class GutenTag.class Hello.class Hi.class +Aloha.java GutenTag.java Hello.java Hi.java +.EE +.SS Example of Specifying a User Class Path +After changing one of the source files in the previous example, +recompile it: +.PP +\f[B]Linux and macOS:\f[R] +.IP +.EX +pwd +/examples +javac greetings/Hi.java +.EE +.PP +\f[B]Windows:\f[R] +.IP +.EX +C:\[rs]>cd +\[rs]examples +C:\[rs]>javac greetings\[rs]Hi.java +.EE +.PP +Because \f[CR]greetings.Hi\f[R] refers to other classes in the +\f[CR]greetings\f[R] package, the compiler needs to find these other +classes. +The previous example works because the default user class path is the +directory that contains the package directory. +If you want to recompile this file without concern for which directory +you are in, then add the examples directory to the user class path by +setting \f[CR]CLASSPATH\f[R]. +This example uses the \f[CR]\-classpath\f[R] option. +.PP +\f[B]Linux and macOS:\f[R] +.RS +.PP +\f[CR]javac \-classpath /examples /examples/greetings/Hi.java\f[R] +.RE +.PP +\f[B]Windows:\f[R] +.RS +.PP +\f[CR]C:\[rs]>javac \-classpath \[rs]examples \[rs]examples\[rs]greetings\[rs]Hi.java\f[R] +.RE +.PP +If you change \f[CR]greetings.Hi\f[R] to use a banner utility, then that +utility also needs to be accessible through the user class path. +.PP +\f[B]Linux and macOS:\f[R] +.IP +.EX +javac \-classpath /examples:/lib/Banners.jar \[rs] + /examples/greetings/Hi.java +.EE +.PP +\f[B]Windows:\f[R] +.IP +.EX +C:\[rs]>javac \-classpath \[rs]examples;\[rs]lib\[rs]Banners.jar \[ha] + \[rs]examples\[rs]greetings\[rs]Hi.java +.EE +.PP +To execute a class in the \f[CR]greetings\f[R] package, the program +needs access to the \f[CR]greetings\f[R] package, and to the classes +that the \f[CR]greetings\f[R] classes use. +.PP +\f[B]Linux and macOS:\f[R] +.RS +.PP +\f[CR]java \-classpath /examples:/lib/Banners.jar greetings.Hi\f[R] +.RE +.PP +\f[B]Windows:\f[R] +.RS +.PP +\f[CR]C:\[rs]>java \-classpath \[rs]examples;\[rs]lib\[rs]Banners.jar greetings.Hi\f[R] +.RE +.SH CONFIGURING THE MODULE SYSTEM +If you want to include additional modules in your compilation, use the +\f[B]\f[CB]\-\-add\-modules\f[B]\f[R] option. +This may be necessary when you are compiling code that is not in a +module, or which is in an automatic module, and the code refers to API +in the additional modules. +.PP +If you want to restrict the set of modules in your compilation, use the +\f[B]\f[CB]\-\-limit\-modules\f[B]\f[R] option. +This may be useful if you want to ensure that the code you are compiling +is capable of running on a system with a limited set of modules +installed. +.PP +If you want to break encapsulation and specify that additional packages +should be considered as exported from a module, use the +\f[B]\f[CB]\-\-add\-exports\f[B]\f[R] option. +This may be useful when performing white\-box testing; relying on access +to internal API in production code is strongly discouraged. +.PP +If you want to specify that additional packages should be considered as +required by a module, use the \f[B]\f[CB]\-\-add\-reads\f[B]\f[R] +option. +This may be useful when performing white\-box testing; relying on access +to internal API in production code is strongly discouraged. +.PP +You can patch additional content into any module using the +\f[B]\f[CB]\-\-patch\-module\f[B]\f[R] option. +See [Patching a Module] for more details. +.SH SEARCHING FOR MODULE, PACKAGE AND TYPE DECLARATIONS +To compile a source file, the compiler often needs information about a +module or type, but the declaration is not in the source files specified +on the command line. +.PP +\f[CR]javac\f[R] needs type information for every class or interface +used, extended, or implemented in the source file. +This includes classes and interfaces not explicitly mentioned in the +source file, but that provide information through inheritance. +.PP +For example, when you create a subclass of \f[CR]java.awt.Window\f[R], +you are also using the ancestor classes of \f[CR]Window\f[R]: +\f[CR]java.awt.Container\f[R], \f[CR]java.awt.Component\f[R], and +\f[CR]java.lang.Object\f[R]. +.PP +When compiling code for a module, the compiler also needs to have +available the declaration of that module. +.PP +A successful search may produce a class file, a source file, or both. +If both are found, then you can use the \f[B]\f[CB]\-Xprefer\f[B]\f[R] +option to instruct the compiler which to use. +.PP +If a search finds and uses a source file, then by default +\f[CR]javac\f[R] compiles that source file. +This behavior can be altered with \f[B]\f[CB]\-implicit\f[B]\f[R]. +.PP +The compiler might not discover the need for some type information until +after annotation processing completes. +When the type information is found in a source file and no +\f[B]\f[CB]\-implicit\f[B]\f[R] option is specified, the compiler gives +a warning that the file is being compiled without being subject to +annotation processing. +To disable the warning, either specify the file on the command line (so +that it will be subject to annotation processing) or use the +\f[B]\f[CB]\-implicit\f[B]\f[R] option to specify whether or not class +files should be generated for such source files. +.PP +The way that \f[CR]javac\f[R] locates the declarations of those types +depends on whether the reference exists within code for a module or not. +.SS Searching Package Oriented Paths +When searching for a source or class file on a path composed of package +oriented locations, \f[CR]javac\f[R] will check each location on the +path in turn for the possible presence of the file. +The first occurrence of a particular file shadows (hides) any subsequent +occurrences of like\-named files. +This shadowing does not affect any search for any files with a different +name. +This can be convenient when searching for source files, which may be +grouped in different locations, such as shared code, platform\-specific +code and generated code. +It can also be useful when injecting alternate versions of a class file +into a package, to debugging or other instrumentation reasons. +But, it can also be dangerous, such as when putting incompatible +different versions of a library on the class path. +.SS Searching Module Oriented Paths +Prior to scanning any module paths for any package or type declarations, +\f[CR]javac\f[R] will lazily scan the following paths and locations to +determine the modules that will be used in the compilation. +.IP \[bu] 2 +The module source path (see the +\f[B]\f[CB]\-\-module\-source\-path\f[B]\f[R] option) +.IP \[bu] 2 +The path for upgradeable modules (see the +\f[B]\f[CB]\-\-upgrade\-module\-path\f[B]\f[R] option) +.IP \[bu] 2 +The system modules (see the \f[B]\f[CB]\-\-system\f[B]\f[R] option) +.IP \[bu] 2 +The user module path ( see the \f[B]\f[CB]\-\-module\-path\f[B]\f[R] +option) +.PP +For any module, the first occurrence of the module during the scan +completely shadows (hides) any subsequent appearance of a like\-named +module. +While locating the modules, \f[CR]javac\f[R] is able to determine the +packages exported by the module and to associate with each module a +package oriented path for the contents of the module. +For any previously compiled module, this path will typically be a single +entry for either a directory or a file that provides an internal +directory\-like hierarchy, such as a JAR file. +Thus, when searching for a type that is in a package that is known to be +exported by a module, \f[CR]javac\f[R] can locate the declaration +directly and efficiently. +.SS Searching for the Declaration of a Module +If the module has been previously compiled, the module declaration is +located in a file named \f[CR]module\-info.class\f[R] in the root of the +package hierarchy for the content of the module. +.PP +If the module is one of those currently being compiled, the module +declaration will be either the file named \f[CR]module\-info.class\f[R] +in the root of the package hierarchy for the module in the class output +directory, or the file named \f[CR]module\-info.java\f[R] in one of the +locations on the source path or one the module source path for the +module. +.SS Searching for the Declaration of a Type When the Reference is not in a Module +When searching for a type that is referenced in code that is not in a +module, \f[CR]javac\f[R] will look in the following places: +.IP \[bu] 2 +The platform classes (or the types in exported packages of the platform +modules) (This is for compiled class files only.) +.IP \[bu] 2 +Types in exported packages of any modules on the module path, if +applicable. +(This is for compiled class files only.) +.IP \[bu] 2 +Types in packages on the class path and/or source path: +.RS 2 +.IP \[bu] 2 +If both are specified, \f[CR]javac\f[R] looks for compiled class files +on the class path and for source files on the source path. +.IP \[bu] 2 +If the class path is specified, but not source path, \f[CR]javac\f[R] +looks for both compiled class files and source files on the class path. +.IP \[bu] 2 +If the class path is not specified, it defaults to the current +directory. +.RE +.PP +When looking for a type on the class path and/or source path, if both a +compiled class file and a source file are found, the most recently +modified file will be used by default. +If the source file is newer, it will be compiled and will may override +any previously compiled version of the file. +You can use the \f[B]\f[CB]\-Xprefer\f[B]\f[R] option to override the +default behavior. +.SS Searching for the Declaration of a Type When the Reference is in a Module +When searching for a type that is referenced in code in a module, +\f[CR]javac\f[R] will examine the declaration of the enclosing module to +determine if the type is in a package that is exported from another +module that is readable by the enclosing module. +If so, \f[CR]javac\f[R] will simply and directly go to the definition of +that module to find the definition of the required type. +Unless the module is another of the modules being compiled, +\f[CR]javac\f[R] will only look for compiled class files files. +In other words, \f[CR]javac\f[R] will not look for source files in +platform modules or modules on the module path. +.PP +If the type being referenced is not in some other readable module, +\f[CR]javac\f[R] will examine the module being compiled to try and find +the declaration of the type. +\f[CR]javac\f[R] will look for the declaration of the type as follows: +.IP \[bu] 2 +Source files specified on the command line or on the source path or +module source path. +.IP \[bu] 2 +Previously compiled files in the output directory. +.SH DIRECTORY HIERARCHIES +\f[CR]javac\f[R] generally assumes that source files and compiled class +files will be organized in a file system directory hierarchy or in a +type of file that supports in an internal directory hierarchy, such as a +JAR file. +Three different kinds of hierarchy are supported: a \f[I]package +hierarchy\f[R], a \f[I]module hierarchy\f[R], and a \f[I]module source +hierarchy\f[R]. +.PP +While \f[CR]javac\f[R] is fairly relaxed about the organization of +source code, beyond the expectation that source will be organized in one +or package hierarchies, and can generally accommodate organizations +prescribed by development environments and build tools, Java tools in +general, and \f[CR]javac\f[R] and the Java launcher in particular, are +more stringent regarding the organization of compiled class files, and +will be organized in package hierarchies or module hierarchies, as +appropriate. +.PP +The location of these hierarchies are specified to \f[CR]javac\f[R] with +command\-line options, whose names typically end in \[dq]path\[dq], like +\f[B]\f[CB]\-\-source\-path\f[B]\f[R] or +\f[B]\f[CB]\-\-class\-path\f[B]\f[R]. +Also as a general rule, path options whose name includes the word +\f[CR]module\f[R], like \f[B]\f[CB]\-\-module\-path\f[B]\f[R], are used +to specify module hierarchies, although some module\-related path +options allow a package hierarchy to be specified on a per\-module +basis. +All other path options are used to specify package hierarchies. +.SS Package Hierarchy +In a package hierarchy, directories and subdirectories are used to +represent the component parts of the package name, with the source file +or compiled class file for a type being stored as a file with an +extension of \f[CR].java\f[R] or \f[CR].class\f[R] in the most nested +directory. +.PP +For example, in a package hierarchy, the source file for a class +\f[CR]com.example.MyClass\f[R] will be stored in the file +\f[I]com/example/MyClass.java\f[R] +.SS Module Hierarchy +In a module hierarchy, the first level of directories are named for the +modules in the hierarchy; within each of those directories the contents +of the module are organized in package hierarchies. +.PP +For example, in a module hierarchy, the compiled class file for a type +called \f[CR]com.example.MyClass\f[R] in a module called +\f[CR]my.library\f[R] will be stored in +\f[I]my.library/com/example/MyClass.class\f[R]. +.PP +The various output directories used by \f[CR]javac\f[R] (the class +output directory, the source output directory, and native header output +directory) will all be organized in a module hierarchy when multiple +modules are being compiled. +.SS Module Source Hierarchy +Although the source for each individual module should always be +organized in a package hierarchy, it may be convenient to group those +hierarchies into a module source hierarchy. +This is similar to a module hierarchy, except that there may be +intervening directories between the directory for the module and the +directory that is the root of the package hierarchy for the source code +of the module. +.PP +For example, in a module source hierarchy, the source file for a type +called \f[CR]com.example.MyClass\f[R] in a module called +\f[CR]my.library\f[R] may be stored in a file such as +\f[I]my.library/src/main/java/com/example/MyClass.java\f[R]. +.SH THE MODULE SOURCE PATH OPTION +The \f[B]\f[CB]\-\-module\-source\-path\f[B]\f[R] option has two forms: +a \f[I]module\-specific form\f[R], in which a package path is given for +each module containing code to be compiled, and a +\f[I]module\-pattern\f[R] form, in which the source path for each module +is specified by a pattern. +The module\-specific form is generally simpler to use when only a small +number of modules are involved; the module\-pattern form may be more +convenient when the number of modules is large and the modules are +organized in a regular manner that can be described by a pattern. +.PP +Multiple instances of the \f[CR]\-\-module\-source\-path\f[R] option may +be given, each one using either the module\-pattern form or the +module\-specific form, subject to the following limitations: +.IP \[bu] 2 +the module\-pattern form may be used at most once +.IP \[bu] 2 +the module\-specific form may be used at most once for any given module +.PP +If the module\-specific form is used for any module, the associated +search path overrides any path that might otherwise have been inferred +from the module\-pattern form. +.SS Module\-specific form +The module\-specific form allows an explicit search path to be given for +any specific module. +This form is: +.IP \[bu] 2 +\f[CR]\-\-module\-source\-path\f[R] +\f[I]module\-name\f[R]\f[CR]=\f[R]\f[I]file\-path\f[R] +(\f[I]path\-separator\f[R] \f[I]file\-path\f[R])* +.PP +The path separator character is \f[CR];\f[R] on Windows, and +\f[CR]:\f[R] otherwise. +.PP +\f[B]Note:\f[R] this is similar to the form used for the +\f[B]\f[CB]\-\-patch\-module\f[B]\f[R] option. +.SS Module\-pattern form +The module\-pattern form allows a concise specification of the module +source path for any number of modules organized in regular manner. +.IP \[bu] 2 +\f[CR]\-\-module\-source\-path\f[R] \f[I]pattern\f[R] +.PP +The pattern is defined by the following rules, which are applied in +order: +.IP \[bu] 2 +The argument is considered to be a series of segments separated by the +path separator character (\f[CR];\f[R] on Windows, and \f[CR]:\f[R] +otherwise). +.IP \[bu] 2 +Each segment containing curly braces of the form +.RS 2 +.IP +.EX +string1{alt1 ( ,alt2 )* } string2 +.EE +.PP +is considered to be replaced by a series of segments formed by +\[dq]expanding\[dq] the braces: +.IP +.EX +string1 alt1 string2 +string1 alt2 string2 +and so on... +.EE +.PP +The braces may be nested. +.PP +This rule is applied for all such usages of braces. +.RE +.IP \[bu] 2 +Each segment must have at most one asterisk (\f[CR]*\f[R]). +If a segment does not contain an asterisk, it is considered to be as +though the file separator character and an asterisk are appended. +.RS 2 +.PP +For any module \f[I]M\f[R], the source path for that module is formed +from the series of segments obtained by substituting the module name +\f[I]M\f[R] for the asterisk in each segment. +.PP +\f[B]Note\f[R]: in this context, the asterisk is just used as a special +marker, to denote the position in the path of the module name. +It should not be confused with the use of \f[CR]*\f[R] as a file name +wildcard character, as found on most operating systems. +.RE +.SH PATCHING MODULES +javac allows any content, whether in source or compiled form, to be +patched into any module using the \f[B]\f[CB]\-\-patch\-module\f[B]\f[R] +option. +You may want to do this to compile alternative implementations of a +class to be patched at runtime into a JVM, or to inject additional +classes into the module, such as when testing. +.PP +The form of the option is: +.IP \[bu] 2 +\f[CR]\-\-patch\-module\f[R] +\f[I]module\-name\f[R]\f[CR]=\f[R]\f[I]file\-path\f[R] +(\f[I]path\-separator\f[R] \f[I]file\-path\f[R] )* +.PP +The path separator character is \f[CR];\f[R] on Windows, and +\f[CR]:\f[R] otherwise. +The paths given for the module must specify the root of a package +hierarchy for the contents of the module +.PP +The option may be given at most once for any given module. +Any content on the path will hide any like\-named content later in the +path and in the patched module. +.PP +When patching source code into more than one module, the +\f[B]\f[CB]\-\-module\-source\-path\f[B]\f[R] must also be used, so that +the output directory is organized in a module hierarchy, and capable of +holding the compiled class files for the modules being compiled. +.SH ANNOTATION PROCESSING +The \f[CR]javac\f[R] command provides direct support for annotation +processing. +.PP +The API for annotation processors is defined in the +\f[CR]javax.annotation.processing\f[R] and \f[CR]javax.lang.model\f[R] +packages and subpackages. +.SS How Annotation Processing Works +Annotation processing is requested by using an option to configure +annotation processing, such as \f[B]\f[CB]\-processor\f[B]\f[R], +\f[B]\f[CB]\-\-processor\-path\f[B]\f[R], +\f[B]\f[CB]\-\-processor\-module\-path\f[B]\f[R] or by explicitly +enabling processing with the \f[B]\f[CB]\-proc:full\f[B]\f[R] or +\f[B]\f[CB]\-proc:only\f[B]\f[R] options. +Annotation processing is disabled using the +\f[B]\f[CB]\-proc:none\f[B]\f[R] option. +.PP +If annotation processing is requested, the compiler searches for any +annotation processors that are available. +.PP +The search path can be specified with the +\f[B]\f[CB]\-processorpath\f[B]\f[R] option. +If no path is specified, then the user class path is used. +Processors are located by means of service provider\-configuration files +named +\f[CR]META\-INF/services/javax.annotation.processing.Processor\f[R] on +the search path. +Such files should contain the names of any annotationation processors to +be used, listed one per line. +Alternatively, processors can be specified explicitly, using the +\f[B]\f[CB]\-processor\f[B]\f[R] option. +.PP +After scanning the source files and classes on the command line to +determine what annotations are present, the compiler queries the +processors to determine what annotations they process. +When a match is found, the processor is called. +A processor can claim the annotations it processes, in which case no +further attempt is made to find any processors for those annotations. +After all of the annotations are claimed, the compiler does not search +for additional processors. +.PP +If any processors generate new source files, then another round of +annotation processing occurs: Any newly generated source files are +scanned, and the annotations processed as before. +Any processors called on previous rounds are also called on all +subsequent rounds. +This continues until no new source files are generated. +.PP +After a round occurs where no new source files are generated, the +annotation processors are called one last time, to give them a chance to +complete any remaining work. +Finally, unless the \f[B]\f[CB]\-proc:only\f[B]\f[R] option is used, the +compiler compiles the original and all generated source files. +.PP +If you use an annotation processor that generates additional source +files to be included in the compilation, you can specify a default +module to be used for the newly generated files, for use when a module +declaration is not also generated. +In this case, use the +\f[B]\f[CB]\-\-default\-module\-for\-created\-files\f[B]\f[R] option. +.SS Compilation Environment and Runtime Environment. +The declarations in source files and previously compiled class files are +analyzed by \f[CR]javac\f[R] in a \f[I]compilation environment\f[R] that +is distinct from the \f[I]runtime environment\f[R] used to execute +\f[CR]javac\f[R] itself. +Although there is a deliberate similarity between many \f[CR]javac\f[R] +options and like\-named options for the Java \f[B]launcher\f[R], such as +\f[CR]\-\-class\-path\f[R], \f[CR]\-\-module\-path\f[R] and so on, it is +important to understand that in general the \f[CR]javac\f[R] options +just affect the environment in which the source files are compiled, and +do not affect the operation of \f[CR]javac\f[R] itself. +.PP +The distinction between the compilation environment and runtime +environment is significant when it comes to using annotation processors. +Although annotations processors process elements (declarations) that +exist in the compilation environment, the annotation processor itself is +executed in the runtime environment. +If an annotation processor has dependencies on libraries that are not in +modules, the libraries can be placed, along with the annotation +processor itself, on the processor path. +(See the \f[B]\f[CB]\-\-processor\-path\f[B]\f[R] option.) +If the annotation processor and its dependencies are in modules, you +should use the processor module path instead. +(See the \f[B]\f[CB]\-\-processor\-module\-path\f[B]\f[R] option.) +When those are insufficient, it may be necessary to provide further +configuration of the runtime environment. +This can be done in two ways: +.IP "1." 3 +If \f[CR]javac\f[R] is invoked from the command line, options can be +passed to the underlying runtime by prefixing the option with +\f[B]\f[CB]\-J\f[B]\f[R]. +.IP "2." 3 +You can start an instance of a Java Virtual Machine directly and use +command line options and API to configure an environment in which +\f[CR]javac\f[R] can be invoked via one of its \f[B]APIs\f[R]. +.SH COMPILING FOR EARLIER RELEASES OF THE PLATFORM +\f[CR]javac\f[R] can compile code that is to be used on other releases +of the platform, using either the \f[B]\f[CB]\-\-release\f[B]\f[R] +option, or the \f[B]\f[CB]\-\-source\f[B]\f[R]/\f[CR]\-source\f[R] and +\f[B]\f[CB]\-\-target\f[B]\f[R]/\f[CR]\-target\f[R] options, together +with additional options to specify the platform classes. +.PP +Depending on the desired platform release, there are some restrictions +on some of the options that can be used. +.IP \[bu] 2 +When compiling for JDK 8 and earlier releases, you cannot use any option +that is intended for use with the module system. +This includes all of the following options: +.RS 2 +.IP \[bu] 2 +\f[B]\f[CB]\-\-module\-source\-path\f[B]\f[R], +\f[B]\f[CB]\-\-upgrade\-module\-path\f[B]\f[R], +\f[B]\f[CB]\-\-system\f[B]\f[R], \f[B]\f[CB]\-\-module\-path\f[B]\f[R], +\f[B]\f[CB]\-\-add\-modules\f[B]\f[R], +\f[B]\f[CB]\-\-add\-exports\f[B]\f[R], \f[CR]\-\-add\-opens\f[R], +\f[B]\f[CB]\-\-add\-reads\f[B]\f[R], +\f[B]\f[CB]\-\-limit\-modules\f[B]\f[R], +\f[B]\f[CB]\-\-patch\-module\f[B]\f[R] +.PP +If you use the \f[CR]\-\-source\f[R]/\f[CR]\-source\f[R] or +\f[CR]\-\-target\f[R]/\f[CR]\-target\f[R] options, you should also set +the appropriate platform classes using the boot class path family of +options. +.RE +.IP \[bu] 2 +When compiling for JDK 9 and later releases, you cannot use any option +that is intended to configure the boot class path. +This includes all of the following options: +.RS 2 +.IP \[bu] 2 +\f[B]\f[CB]\-Xbootclasspath/p:\f[B]\f[R], +\f[B]\f[CB]\-Xbootclasspath\f[B]\f[R], +\f[B]\f[CB]\-Xbootclasspath/a:\f[B]\f[R], +\f[B]\f[CB]\-endorseddirs\f[B]\f[R], +\f[B]\f[CB]\-Djava.endorsed.dirs\f[B]\f[R], +\f[B]\f[CB]\-extdirs\f[B]\f[R], \f[B]\f[CB]\-Djava.ext.dirs\f[B]\f[R], +\f[B]\f[CB]\-profile\f[B]\f[R] +.PP +If you use the \f[CR]\-\-source\f[R]/\f[CR]\-source\f[R] or +\f[CR]\-\-target\f[R]/\f[CR]\-target\f[R] options, you should also set +the appropriate platform classes using the \f[CR]\-\-system\f[R] option +to give the location of an appropriate installed release of JDK. +.RE +.PP +When using the \f[CR]\-\-release\f[R] option, only the supported +documented API for that release may be used; you cannot use any options +to break encapsulation to access any internal classes. +.SH APIS +The \f[CR]javac\f[R] compiler can be invoked using an API in three +different ways: +.TP +The \f[B]Java Compiler API\f[R] +This provides the most flexible way to invoke the compiler, including +the ability to compile source files provided in memory buffers or other +non\-standard file systems. +.TP +The \f[B]ToolProvider API\f[R] +A \f[CR]ToolProvider\f[R] for \f[CR]javac\f[R] can be obtained by +calling \f[CR]ToolProvider.findFirst(\[dq]javac\[dq])\f[R]. +This returns an object with the equivalent functionality of the +command\-line tool. +.RS +.PP +\f[B]Note\f[R]: This API should not be confused with the like\-named API +in the \f[B]\f[CB]javax.tools\f[B]\f[R] package. +.RE +.TP +The \f[CR]javac\f[R] \f[B]Legacy API\f[R] +This API is retained for backward compatibility only. +All new code should use either the Java Compiler API or the ToolProvider +API. +.PP +\f[B]Note:\f[R] All other classes and methods found in a package with +names that start with \f[CR]com.sun.tools.javac\f[R] (subpackages of +\f[CR]com.sun.tools.javac\f[R]) are strictly internal and subject to +change at any time. +.SH EXAMPLES OF USING \-XLINT KEYS +.TP +\f[CR]cast\f[R] +Warns about unnecessary and redundant casts, for example: +.RS +.RS +.PP +\f[CR]String s = (String) \[dq]Hello!\[dq]\f[R] +.RE +.RE +.TP +\f[CR]classfile\f[R] +Warns about issues related to class file contents. +.TP +\f[CR]deprecation\f[R] +Warns about the use of deprecated items. +For example: +.RS +.IP +.EX +java.util.Date myDate = new java.util.Date(); +int currentDay = myDate.getDay(); +.EE +.PP +The method \f[CR]java.util.Date.getDay\f[R] has been deprecated since +JDK 1.1. +.RE +.TP +\f[CR]dep\-ann\f[R] +Warns about items that are documented with the +\f[CR]\[at]deprecated\f[R] Javadoc comment, but do not have the +\f[CR]\[at]Deprecated\f[R] annotation, for example: +.RS +.IP +.EX +/** + * \[at]deprecated As of Java SE 7, replaced by {\[at]link #newMethod()} + */ +public static void deprecatedMethod() { } +public static void newMethod() { } +.EE +.RE +.TP +\f[CR]divzero\f[R] +Warns about division by the constant integer 0, for example: +.RS +.RS +.PP +\f[CR]int divideByZero = 42 / 0;\f[R] +.RE +.RE +.TP +\f[CR]empty\f[R] +Warns about empty statements after \f[CR]if\f[R]statements, for example: +.RS +.IP +.EX +class E { + void m() { + if (true) ; + } +} +.EE +.RE +.TP +\f[CR]fallthrough\f[R] +Checks the switch blocks for fall\-through cases and provides a warning +message for any that are found. +Fall\-through cases are cases in a switch block, other than the last +case in the block, whose code does not include a \f[CR]break\f[R] +statement, allowing code execution to fall through from that case to the +next case. +For example, the code following the case 1 label in this switch block +does not end with a \f[CR]break\f[R] statement: +.RS +.IP +.EX +switch (x) { +case 1: + System.out.println(\[dq]1\[dq]); + // No break statement here. +case 2: + System.out.println(\[dq]2\[dq]); +} +.EE +.PP +If the \f[CR]\-Xlint:fallthrough\f[R] option was used when compiling +this code, then the compiler emits a warning about possible +fall\-through into case, with the line number of the case in question. +.RE +.TP +\f[CR]finally\f[R] +Warns about \f[CR]finally\f[R] clauses that cannot be completed +normally, for example: +.RS +.IP +.EX +public static int m() { + try { + throw new NullPointerException(); + } catch (NullPointerException e) { + System.err.println(\[dq]Caught NullPointerException.\[dq]); + return 1; + } finally { + return 0; + } + } +.EE +.PP +The compiler generates a warning for the \f[CR]finally\f[R] block in +this example. +When the \f[CR]int\f[R] method is called, it returns a value of 0. +A \f[CR]finally\f[R] block executes when the \f[CR]try\f[R] block exits. +In this example, when control is transferred to the \f[CR]catch\f[R] +block, the \f[CR]int\f[R] method exits. +However, the \f[CR]finally\f[R] block must execute, so it\[aq]s +executed, even though control was transferred outside the method. +.RE +.TP +\f[CR]options\f[R] +Warns about issues that related to the use of command\-line options. +See \f[B]Compiling for Earlier Releases of the Platform\f[R]. +.TP +\f[CR]overrides\f[R] +Warns about issues related to method overrides. +For example, consider the following two classes: +.RS +.IP +.EX +public class ClassWithVarargsMethod { + void varargsMethod(String... s) { } +} + +public class ClassWithOverridingMethod extends ClassWithVarargsMethod { + \[at]Override + void varargsMethod(String[] s) { } +} +.EE +.PP +The compiler generates a warning similar to the following:. +.IP +.EX +warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod +overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding +method is missing \[aq]...\[aq] +.EE +.PP +When the compiler encounters a \f[CR]varargs\f[R] method, it translates +the \f[CR]varargs\f[R] formal parameter into an array. +In the method \f[CR]ClassWithVarargsMethod.varargsMethod\f[R], the +compiler translates the \f[CR]varargs\f[R] formal parameter +\f[CR]String... s\f[R] to the formal parameter \f[CR]String[] s\f[R], an +array that matches the formal parameter of the method +\f[CR]ClassWithOverridingMethod.varargsMethod\f[R]. +Consequently, this example compiles. +.RE +.TP +\f[CR]path\f[R] +Warns about invalid path elements and nonexistent path directories on +the command line (with regard to the class path, the source path, and +other paths). +Such warnings cannot be suppressed with the +\f[CR]\[at]SuppressWarnings\f[R] annotation. +For example: +.RS +.IP \[bu] 2 +\f[B]Linux and macOS:\f[R] +\f[CR]javac \-Xlint:path \-classpath /nonexistentpath Example.java\f[R] +.IP \[bu] 2 +\f[B]Windows:\f[R] +\f[CR]javac \-Xlint:path \-classpath C:\[rs]nonexistentpath Example.java\f[R] +.RE +.TP +\f[CR]processing\f[R] +Warns about issues related to annotation processing. +The compiler generates this warning when you have a class that has an +annotation, and you use an annotation processor that cannot handle that +type of annotation. +For example, the following is a simple annotation processor: +.RS +.PP +\f[B]Source file AnnoProc.java\f[R]: +.IP +.EX +import java.util.*; +import javax.annotation.processing.*; +import javax.lang.model.*; +import javax.lang.model.element.*; + +\[at]SupportedAnnotationTypes(\[dq]NotAnno\[dq]) +public class AnnoProc extends AbstractProcessor { + public boolean process(Set elems, RoundEnvironment renv){ + return true; + } + + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } +} +.EE +.PP +\f[B]Source file AnnosWithoutProcessors.java\f[R]: +.IP +.EX +\[at]interface Anno { } + +\[at]Anno +class AnnosWithoutProcessors { } +.EE +.PP +The following commands compile the annotation processor +\f[CR]AnnoProc\f[R], then run this annotation processor against the +source file \f[CR]AnnosWithoutProcessors.java\f[R]: +.IP +.EX +javac AnnoProc.java +javac \-cp . \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors.java +.EE +.PP +When the compiler runs the annotation processor against the source file +\f[CR]AnnosWithoutProcessors.java\f[R], it generates the following +warning: +.IP +.EX +warning: [processing] No processor claimed any of these annotations: Anno +.EE +.PP +To resolve this issue, you can rename the annotation defined and used in +the class \f[CR]AnnosWithoutProcessors\f[R] from \f[CR]Anno\f[R] to +\f[CR]NotAnno\f[R]. +.RE +.TP +\f[CR]rawtypes\f[R] +Warns about unchecked operations on raw types. +The following statement generates a \f[CR]rawtypes\f[R] warning: +.RS +.RS +.PP +\f[CR]void countElements(List l) { ... }\f[R] +.RE +.PP +The following example does not generate a \f[CR]rawtypes\f[R] warning: +.RS +.PP +\f[CR]void countElements(List l) { ... }\f[R] +.RE +.PP +\f[CR]List\f[R] is a raw type. +However, \f[CR]List\f[R] is an unbounded wildcard parameterized type. +Because \f[CR]List\f[R] is a parameterized interface, always specify its +type argument. +In this example, the \f[CR]List\f[R] formal argument is specified with +an unbounded wildcard (\f[CR]?\f[R]) as its formal type parameter, which +means that the \f[CR]countElements\f[R] method can accept any +instantiation of the \f[CR]List\f[R] interface. +.RE +.TP +\f[CR]serial\f[R] +Warns about missing \f[CR]serialVersionUID\f[R] definitions on +serializable classes. +For example: +.RS +.IP +.EX +public class PersistentTime implements Serializable +{ + private Date time; + + public PersistentTime() { + time = Calendar.getInstance().getTime(); + } + + public Date getTime() { + return time; + } +} +.EE +.PP +The compiler generates the following warning: +.IP +.EX +warning: [serial] serializable class PersistentTime has no definition of +serialVersionUID +.EE +.PP +If a serializable class does not explicitly declare a field named +\f[CR]serialVersionUID\f[R], then the serialization runtime environment +calculates a default \f[CR]serialVersionUID\f[R] value for that class +based on various aspects of the class, as described in the Java Object +Serialization Specification. +However, it\[aq]s strongly recommended that all serializable classes +explicitly declare \f[CR]serialVersionUID\f[R] values because the +default process of computing \f[CR]serialVersionUID\f[R] values is +highly sensitive to class details that can vary depending on compiler +implementations. +As a result, this might cause an unexpected +\f[CR]InvalidClassExceptions\f[R] during deserialization. +To guarantee a consistent \f[CR]serialVersionUID\f[R] value across +different Java compiler implementations, a serializable class must +declare an explicit \f[CR]serialVersionUID\f[R] value. +.RE +.TP +\f[CR]static\f[R] +Warns about issues relating to the use of static variables, for example: +.RS +.IP +.EX +class XLintStatic { + static void m1() { } + void m2() { this.m1(); } +} +.EE +.PP +The compiler generates the following warning: +.IP +.EX +warning: [static] static method should be qualified by type name, +XLintStatic, instead of by an expression +.EE +.PP +To resolve this issue, you can call the \f[CR]static\f[R] method +\f[CR]m1\f[R] as follows: +.RS +.PP +\f[CR]XLintStatic.m1();\f[R] +.RE +.PP +Alternately, you can remove the \f[CR]static\f[R] keyword from the +declaration of the method \f[CR]m1\f[R]. +.RE +.TP +\f[CR]this\-escape\f[R] +Warns about constructors leaking \f[CR]this\f[R] prior to subclass +initialization. +For example, this class: +.RS +.IP +.EX +public class MyClass { + public MyClass() { + System.out.println(this.hashCode()); + } +} +.EE +.PP +generates the following warning: +.IP +.EX +MyClass.java:3: warning: [this\-escape] possible \[aq]this\[aq] escape + before subclass is fully initialized + System.out.println(this.hashCode()); + \[ha] +.EE +.PP +A \[aq]this\[aq] escape warning is generated when a constructor does +something that might result in a subclass method being invoked before +the constructor returns. +In such cases the subclass method would be operating on an incompletely +initialized instance. +In the above example, a subclass of \f[CR]MyClass\f[R] that overrides +\f[CR]hashCode()\f[R] to incorporate its own fields would likely produce +an incorrect result when invoked as shown. +.PP +Warnings are only generated if a subclass could exist that is outside of +the current module (or package, if no module) being compiled. +So, for example, constructors in final and non\-public classes do not +generate warnings. +.RE +.TP +\f[CR]try\f[R] +Warns about issues relating to the use of \f[CR]try\f[R] blocks, +including try\-with\-resources statements. +For example, a warning is generated for the following statement because +the resource \f[CR]ac\f[R] declared in the \f[CR]try\f[R] block is not +used: +.RS +.IP +.EX +try ( AutoCloseable ac = getResource() ) { // do nothing} +.EE +.RE +.TP +\f[CR]unchecked\f[R] +Gives more detail for unchecked conversion warnings that are mandated by +the Java Language Specification, for example: +.RS +.IP +.EX +List l = new ArrayList(); +List ls = l; // unchecked warning +.EE +.PP +During type erasure, the types \f[CR]ArrayList\f[R] and +\f[CR]List\f[R] become \f[CR]ArrayList\f[R] and \f[CR]List\f[R], +respectively. +.PP +The \f[CR]ls\f[R] command has the parameterized type +\f[CR]List\f[R]. +When the \f[CR]List\f[R] referenced by \f[CR]l\f[R] is assigned to +\f[CR]ls\f[R], the compiler generates an unchecked warning. +At compile time, the compiler and JVM cannot determine whether +\f[CR]l\f[R] refers to a \f[CR]List\f[R] type. +In this case, \f[CR]l\f[R] does not refer to a \f[CR]List\f[R] +type. +As a result, heap pollution occurs. +.PP +A heap pollution situation occurs when the \f[CR]List\f[R] object +\f[CR]l\f[R], whose static type is \f[CR]List\f[R], is assigned +to another \f[CR]List\f[R] object, \f[CR]ls\f[R], that has a different +static type, \f[CR]List\f[R]. +However, the compiler still allows this assignment. +It must allow this assignment to preserve backward compatibility with +releases of Java SE that do not support generics. +Because of type erasure, \f[CR]List\f[R] and +\f[CR]List\f[R] both become \f[CR]List\f[R]. +Consequently, the compiler allows the assignment of the object +\f[CR]l\f[R], which has a raw type of \f[CR]List\f[R], to the object +\f[CR]ls\f[R]. +.RE +.TP +\f[CR]varargs\f[R] +Warns about unsafe use of variable arguments (\f[CR]varargs\f[R]) +methods, in particular, those that contain non\-reifiable arguments, for +example: +.RS +.IP +.EX +public class ArrayBuilder { + public static void addToList (List listArg, T... elements) { + for (T x : elements) { + listArg.add(x); + } + } +} +.EE +.PP +A non\-reifiable type is a type whose type information is not fully +available at runtime. +.PP +The compiler generates the following warning for the definition of the +method \f[CR]ArrayBuilder.addToList\f[R]: +.IP +.EX +warning: [varargs] Possible heap pollution from parameterized vararg type T +.EE +.PP +When the compiler encounters a varargs method, it translates the +\f[CR]varargs\f[R] formal parameter into an array. +However, the Java programming language does not permit the creation of +arrays of parameterized types. +In the method \f[CR]ArrayBuilder.addToList\f[R], the compiler translates +the \f[CR]varargs\f[R] formal parameter \f[CR]T...\f[R] elements to the +formal parameter \f[CR]T[]\f[R] elements, an array. +However, because of type erasure, the compiler converts the +\f[CR]varargs\f[R] formal parameter to \f[CR]Object[]\f[R] elements. +Consequently, there\[aq]s a possibility of heap pollution. +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/javadoc.1 openjdk-25-25.0.3+9/debian/man/javadoc.1 --- openjdk-25-25.0.2+10/debian/man/javadoc.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/javadoc.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,1482 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JAVADOC" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +javadoc \- generate HTML pages of API documentation from Java source +files +.SH SYNOPSIS +\f[CR]javadoc\f[R] [\f[I]options\f[R]] [\f[I]packagenames\f[R]] +[\f[I]sourcefiles\f[R]] [\f[CR]\[at]\f[R]\f[I]files\f[R]] +.TP +\f[I]options\f[R] +Specifies command\-line options, separated by spaces. +See \f[B]Standard \f[CB]javadoc\f[B] Options\f[R], \f[B]Extra +\f[CB]javadoc\f[B] Options\f[R], \f[B]Standard Options for the Standard +Doclet\f[R], and \f[B]Extra Options for the Standard Doclet\f[R]. +.TP +\f[I]packagenames\f[R] +Specifies names of packages that you want to document, separated by +spaces, for example \f[CR]java.lang java.lang.reflect java.awt\f[R]. +If you want to also document the subpackages, then use the +\f[CR]\-subpackages\f[R] option to specify the packages. +.RS +.PP +By default, \f[CR]javadoc\f[R] looks for the specified packages in the +current directory and subdirectories. +Use the \f[CR]\-sourcepath\f[R] option to specify the list of +directories where to look for packages. +.RE +.TP +\f[I]sourcefiles\f[R] +Specifies names of Java source files that you want to document, +separated by spaces, for example +\f[CR]Class.java Object.java Button.java\f[R]. +By default, \f[CR]javadoc\f[R] looks for the specified classes in the +current directory. +However, you can specify the full path to the class file and use +wildcard characters, for example +\f[CR]/home/src/java/awt/Graphics*.java\f[R]. +You can also specify the path relative to the current directory. +.TP +\f[CR]\[at]\f[R]\f[I]files\f[R] +Specifies names of files that contain a list of \f[CR]javadoc\f[R] tool +options, package names, and source file names in any order. +.SH DESCRIPTION +The \f[CR]javadoc\f[R] tool parses the declarations and documentation +comments in a set of Java source files and processes them using a +pluggable back\-end called a \f[B]\f[BI]doclet\f[B]\f[R]. +.PP +The \f[B]\f[BI]standard doclet\f[B]\f[R] is the one that is used by +default, and can produce corresponding HTML pages that describe the +public and protected classes, nested and implicitly declared classes +(but not anonymous inner classes), interfaces, constructors, methods, +and fields. +The standard doclet interprets the content of documentation comments +according to the \f[B]JavaDoc Documentation Comment Specification for +the Standard Doclet\f[R]. +Custom tags in documentation comments are supported by means of +\f[B]taglets\f[R]. +.PP +You can use the \f[CR]javadoc\f[R] tool and the standard doclet to +generate the API documentation or the implementation documentation for a +set of source files. +.PP +You can run the \f[CR]javadoc\f[R] tool on entire packages, individual +source files, or both. +When documenting entire packages, you can use the +\f[CR]\-subpackages\f[R] option either to recursively traverse a +directory and its subdirectories, or to pass in an explicit list of +package names. +When you document individual source files, pass in a list of Java source +file names. +.SS Documentation Comments +The \f[CR]javadoc\f[R] tool uses the documentation comment, if any, that +immediately precedes the beginning of the declaration, whether that is +an annotation, modifier, or the name being declared. +If there are multiple documentation comments before the declaration, +only the last one (closest to the declaration) will be used. +If there are any documentation comments after the beginning of the +declaration, they will be ignored. +To check for any extra or misplaced documentation comments, compile your +source code with the \f[CR]javac\f[R] option \f[CR]\-Xlint\f[R], or more +specifically, \f[CR]\-Xlint:dangling\-doc\-comments\f[R]. +Within a source file, you may suppress any warnings generated by these +options by using +\f[CR]\[at]SuppressWarnings(\[dq]dangling\-doc\-comments\[dq])\f[R] on a +suitable enclosing declaration. +.SS Conformance +The standard doclet does not validate the content of documentation +comments for conformance, nor does it attempt to correct any errors in +documentation comments. +Anyone running javadoc is advised to be aware of the problems that may +arise when generating non\-conformant output or output containing +executable content, such as JavaScript. +The standard doclet does provide the \f[B]DocLint\f[R] feature to help +developers detect common problems in documentation comments; but it is +also recommended to check the generated output with any appropriate +conformance and other checking tools. +.PP +For more details on the conformance requirements for HTML5 documents, +see \f[B]Conformance requirements for authors\f[R] +[https://html.spec.whatwg.org/multipage/introduction.html#conformance\-requirements\-for\-authors] +in the HTML5 Specification. +For more details on security issues related to web pages, see the +\f[B]Open Web Application Security Project (OWASP)\f[R] +[https://www.owasp.org] page. +.SH OPTIONS +\f[CR]javadoc\f[R] supports command\-line options for both the main +\f[CR]javadoc\f[R] tool and the currently selected doclet. +The standard doclet is used if no other doclet is specified. +.PP +GNU\-style options (that is, those beginning with \f[CR]\-\-\f[R]) can +use an equal sign (\f[CR]=\f[R]) instead of whitespace characters to +separate the name of an option from its value. +.SS Standard \f[CR]javadoc\f[R] Options +The following core \f[CR]javadoc\f[R] options are equivalent to +corresponding \f[CR]javac\f[R] options. +See \f[I]Standard Options\f[R] in \f[B]javac\f[R] for the detailed +descriptions of using these options: +.IP \[bu] 2 +\f[CR]\-\-add\-modules\f[R] +.IP \[bu] 2 +\f[CR]\-bootclasspath\f[R] +.IP \[bu] 2 +\f[CR]\-\-class\-path\f[R], \f[CR]\-classpath\f[R], or \f[CR]\-cp\f[R] +.IP \[bu] 2 +\f[CR]\-\-disable\-line\-doc\-comments\f[R] +.IP \[bu] 2 +\f[CR]\-\-enable\-preview\f[R] +.IP \[bu] 2 +\f[CR]\-encoding\f[R] +.IP \[bu] 2 +\f[CR]\-extdirs\f[R] +.IP \[bu] 2 +\f[CR]\-\-limit\-modules\f[R] +.IP \[bu] 2 +\f[CR]\-\-module\f[R] +.IP \[bu] 2 +\f[CR]\-\-module\-path\f[R] or \f[CR]\-p\f[R] +.IP \[bu] 2 +\f[CR]\-\-module\-source\-path\f[R] +.IP \[bu] 2 +\f[CR]\-\-release\f[R] +.IP \[bu] 2 +\f[CR]\-\-source\f[R] or \f[CR]\-source\f[R] +.IP \[bu] 2 +\f[CR]\-\-source\-path\f[R] or \f[CR]\-sourcepath\f[R] +.IP \[bu] 2 +\f[CR]\-\-system\f[R] +.IP \[bu] 2 +\f[CR]\-\-upgrade\-module\-path\f[R] +.PP +The following options are the core \f[CR]javadoc\f[R] options that are +not equivalent to a corresponding \f[CR]javac\f[R] option: +.TP +\f[CR]\-breakiterator\f[R] +Computes the first sentence of the description in a documentation +comment using an instance of \f[CR]java.text.BreakIterator\f[R] to +detect \f[I]sentence breaks\f[R]. +The rules that are used depend on the \f[B]current locale\f[R]: for +example, for English, a sentence break occurs after a period, question +mark, or exclamation point followed by a space when the next word starts +with a capital letter. +(This is meant to handle most abbreviations, such as \[dq]The serial no. +is valid\[dq], but will not handle \[dq]Mr. +Smith\[dq].) +.RS +.PP +The option is enabled by default if the language of the current locale +is not English. +If the language of the current locale is English, and the +\f[CR]\-breakiterator\f[R] option is not given, a simple default +algorithm is used, which just looks for a period followed by a space. +.PP +In a traditional \f[CR]/**...*/\f[R] comment, the search for the end of +the first sentence is terminated by an HTML block tag, such as +\f[CR]

\f[R], \f[CR]

\f[R], or the tag for a heading.
+.PP
+In a Markdown \f[CR]///\f[R] comment, the search for the end of the
+first sentence skips over any characters enclosed in code spans and
+links, and is terminated by the end of the initial block, as indicated
+by a blank line or the beginning of the next block, such as a list,
+thematic break, or an HTML block.
+.PP
+The first sentence of the description in a documentation comment is used
+in summary tables, index pages, and other situations where a short
+summary is required.
+For more explicit control in any individual documentation comment,
+enclose the contents of the first sentence in a
+\f[CR]{\[at]summary ...}\f[R] tag, or when applicable, in a
+\f[CR]{\[at]return ...}\f[R] tag.
+.RE
+.TP
+\f[CR]\-doclet\f[R] \f[I]class\f[R]
+Generates output by using an alternate doclet.
+Use the fully qualified name.
+This doclet defines the content and formats the output.
+If the \f[CR]\-doclet\f[R] option isn\[aq]t used, then the
+\f[CR]javadoc\f[R] tool uses the standard doclet for generating the
+default HTML format.
+This class must implement the \f[CR]jdk.javadoc.doclet.Doclet\f[R]
+interface.
+The path to this class is defined by the \f[CR]\-docletpath\f[R] option.
+.TP
+\f[CR]\-docletpath\f[R] \f[I]path\f[R]
+Specifies where to find doclet class files (specified with the
+\f[CR]\-doclet\f[R] option) and any JAR files it depends on.
+If the starting class file is in a JAR file, then this option specifies
+the path to that JAR file.
+You can specify an absolute path or a path relative to the current
+directory.
+If \f[CR]path\f[R] contains multiple paths or JAR files, then they
+should be separated with a colon (\f[CR]:\f[R]) on Linux and macOS, and
+a semicolon (\f[CR];\f[R]) on Windows.
+This option isn\[aq]t necessary when the \f[CR]doclet\f[R] starting
+class is already in the search path.
+.TP
+\f[CR]\-exclude\f[R] \f[I]pkglist\f[R]
+Unconditionally, excludes the specified packages and their subpackages
+from the list formed by \f[CR]\-subpackages\f[R].
+It excludes those packages even when they would otherwise be included by
+some earlier or later \f[CR]\-subpackages\f[R] option.
+.RS
+.PP
+The following example would include \f[CR]java.io\f[R],
+\f[CR]java.util\f[R], and \f[CR]java.math\f[R] (among others), but would
+exclude packages rooted at \f[CR]java.net\f[R] and \f[CR]java.lang\f[R].
+Notice that these examples exclude \f[CR]java.lang.ref\f[R], which is a
+subpackage of \f[CR]java.lang\f[R].
+Arguments are separated by colons on all operating systems.
+.IP \[bu] 2
+\f[B]Linux and macOS:\f[R]
+.RS 2
+.IP
+.EX
+javadoc \-sourcepath /home/user/src \-subpackages java \-exclude java.net:java.lang
+.EE
+.RE
+.IP \[bu] 2
+\f[B]Windows:\f[R]
+.RS 2
+.IP
+.EX
+javadoc \-sourcepath \[rs]user\[rs]src \-subpackages java \-exclude java.net:java.lang
+.EE
+.RE
+.RE
+.TP
+\f[CR]\-\-expand\-requires\f[R] (\f[CR]transitive\f[R]|\f[CR]all\f[R])
+Instructs the javadoc tool to expand the set of modules to be
+documented.
+By default, only the modules given explicitly on the command line are
+documented.
+Supports the following values:
+.RS
+.IP \[bu] 2
+\f[CR]transitive\f[R]: additionally includes all the required transitive
+dependencies of those modules.
+.IP \[bu] 2
+\f[CR]all\f[R]: includes all dependencies.
+.RE
+.TP
+\f[CR]\-\-help\f[R], \f[CR]\-help\f[R], \f[CR]\-h\f[R], or \f[CR]\-?\f[R]
+Prints a synopsis of the standard options.
+.TP
+\f[CR]\-\-help\-extra\f[R] or \f[CR]\-X\f[R]
+Prints a synopsis of the set of extra options.
+.TP
+\f[CR]\-J\f[R]\f[I]flag\f[R]
+Passes \f[I]flag\f[R] directly to the Java Runtime Environment (JRE)
+that runs the \f[CR]javadoc\f[R] tool.
+For example, if you must ensure that the system sets aside 32 MB of
+memory in which to process the generated documentation, then you would
+call the \f[CR]\-Xmx\f[R] option as follows:
+\f[CR]javadoc \-J\-Xmx32m \-J\-Xms32m com.mypackage\f[R].
+Be aware that \f[CR]\-Xms\f[R] is optional because it only sets the size
+of initial memory, which is useful when you know the minimum amount of
+memory required.
+.RS
+.PP
+There is no space between the \f[CR]J\f[R] and the \f[CR]flag\f[R].
+.PP
+Use the \f[CR]\-version\f[R] option to report the version of the JRE
+being used to run the \f[CR]javadoc\f[R] tool.
+.IP
+.EX
+javadoc \-J\-version
+java version \[dq]17\[dq] 2021\-09\-14 LTS
+Java(TM) SE Runtime Environment (build 17+35\-LTS\-2724)
+Java HotSpot(TM) 64\-Bit Server VM (build 17+35\-LTS\-2724, mixed mode, sharing)
+.EE
+.RE
+.TP
+\f[CR]\-locale\f[R] \f[I]name\f[R]
+Specifies the locale that the \f[CR]javadoc\f[R] tool uses when it
+generates documentation.
+The argument is the name of the locale, as described in
+\f[CR]java.util.Locale\f[R] documentation, such as \f[CR]en_US\f[R]
+(English, United States) or \f[CR]en_US_WIN\f[R] (Windows variant).
+.RS
+.PP
+Specifying a locale causes the \f[CR]javadoc\f[R] tool to choose the
+resource files of that locale for messages such as strings in the
+navigation bar, headings for lists and tables, help file contents,
+comments in the \f[CR]stylesheet.css\f[R] file, and so on.
+It also specifies the sorting order for lists sorted alphabetically, and
+the sentence separator to determine the end of the first sentence.
+The \f[CR]\-locale\f[R] option doesn\[aq]t determine the locale of the
+documentation comment text specified in the source files of the
+documented classes.
+.RE
+.TP
+\f[CR]\-package\f[R]
+Shows only package, protected, and public classes and members.
+.TP
+\f[CR]\-private\f[R]
+Shows all classes and members.
+.TP
+\f[CR]\-protected\f[R]
+Shows only protected and public classes and members.
+This is the default.
+.TP
+\f[CR]\-public\f[R]
+Shows only the public classes and members.
+.TP
+\f[CR]\-quiet\f[R]
+Shuts off messages so that only the warnings and errors appear to make
+them easier to view.
+It also suppresses the \f[CR]version\f[R] string.
+.TP
+\f[CR]\-\-show\-members\f[R] \f[I]value\f[R]
+Specifies which members (fields, methods, or constructors) are
+documented, where \f[I]value\f[R] can be any of the following:
+.RS
+.IP \[bu] 2
+\f[CR]public\f[R] \-\-\- shows only public members
+.IP \[bu] 2
+\f[CR]protected\f[R] \-\-\- shows public and protected members; this is
+the default
+.IP \[bu] 2
+\f[CR]package\f[R] \-\-\- shows public, protected, and package members
+.IP \[bu] 2
+\f[CR]private\f[R] \-\-\- shows all members
+.RE
+.TP
+\f[CR]\-\-show\-module\-contents\f[R] \f[I]value\f[R]
+Specifies the documentation granularity of module declarations, where
+\f[I]value\f[R] can be \f[CR]api\f[R] or \f[CR]all\f[R].
+.TP
+\f[CR]\-\-show\-packages\f[R] \f[I]value\f[R]
+Specifies which module packages are documented, where \f[I]value\f[R]
+can be \f[CR]exported\f[R] or \f[CR]all\f[R] packages.
+.TP
+\f[CR]\-\-show\-types\f[R] \f[I]value\f[R]
+Specifies which types (classes, interfaces, etc.)
+are documented, where \f[I]value\f[R] can be any of the following:
+.RS
+.IP \[bu] 2
+\f[CR]public\f[R] \-\-\- shows only public types
+.IP \[bu] 2
+\f[CR]protected\f[R] \-\-\- shows public and protected types; this is
+the default
+.IP \[bu] 2
+\f[CR]package\f[R] \-\-\- shows public, protected, and package types
+.IP \[bu] 2
+\f[CR]private\f[R] \-\-\- shows all types
+.RE
+.TP
+\f[CR]\-subpackages\f[R] \f[I]subpkglist\f[R]
+Generates documentation from source files in the specified packages and
+recursively in their subpackages.
+This option is useful when adding new subpackages to the source code
+because they are automatically included.
+Each package argument is any top\-level subpackage (such as
+\f[CR]java\f[R]) or fully qualified package (such as
+\f[CR]javax.swing\f[R]) that doesn\[aq]t need to contain source files.
+Arguments are separated by colons on all operating systems.
+Wild cards aren\[aq]t allowed.
+Use \f[CR]\-sourcepath\f[R] to specify where to find the packages.
+This option doesn\[aq]t process source files that are in the source tree
+but don\[aq]t belong to the packages.
+.RS
+.PP
+For example, the following commands generates documentation for packages
+named \f[CR]java\f[R] and \f[CR]javax.swing\f[R] and all of their
+subpackages.
+.IP \[bu] 2
+\f[B]Linux and macOS:\f[R]
+.RS 2
+.IP
+.EX
+javadoc \-d docs \-sourcepath /home/user/src \-subpackages java:javax.swing
+.EE
+.RE
+.IP \[bu] 2
+\f[B]Windows:\f[R]
+.RS 2
+.IP
+.EX
+javadoc \-d docs \-sourcepath \[rs]user\[rs]src \-subpackages java:javax.swing
+.EE
+.RE
+.RE
+.TP
+\f[CR]\-verbose\f[R]
+Provides more detailed messages while the \f[CR]javadoc\f[R] tool runs.
+Without the \f[CR]\-verbose\f[R] option, messages appear for loading the
+source files, generating the documentation (one message per source
+file), and sorting.
+The \f[CR]\-verbose\f[R] option causes the printing of additional
+messages that specify the number of milliseconds to parse each Java
+source file.
+.TP
+\f[CR]\-\-version\f[R]
+Prints version information.
+.TP
+\f[CR]\-Werror\f[R]
+Reports an error if any warnings occur.
+.PP
+Note that if a Java source file contains an implicitly declared class,
+then that class and its public, protected, and package members will be
+documented regardless of the options such as \f[CR]\-\-show\-types\f[R],
+\f[CR]\-\-show\-members\f[R], \f[CR]\-private\f[R],
+\f[CR]\-protected\f[R], \f[CR]\-package\f[R], and \f[CR]\-public\f[R].
+If \f[CR]\-\-show\-members\f[R] is specified with value
+\f[CR]private\f[R] or if \f[CR]\-private\f[R] is used then all private
+members of an implicitly declared class will be documented too.
+.SS Extra \f[CR]javadoc\f[R] Options
+\f[I]Note:\f[R] The additional options for \f[CR]javadoc\f[R] are
+subject to change without notice.
+.PP
+The following additional \f[CR]javadoc\f[R] options are equivalent to
+corresponding \f[CR]javac\f[R] options.
+See \f[I]Extra Options\f[R] in \f[B]javac\f[R] for the detailed
+descriptions of using these options:
+.IP \[bu] 2
+\f[CR]\-\-add\-exports\f[R]
+.IP \[bu] 2
+\f[CR]\-\-add\-reads\f[R]
+.IP \[bu] 2
+\f[CR]\-\-patch\-module\f[R]
+.IP \[bu] 2
+\f[CR]\-Xmaxerrs\f[R]
+.IP \[bu] 2
+\f[CR]\-Xmaxwarns\f[R]
+.SS Standard Options for the Standard Doclet
+The following options are provided by the standard doclet.
+.TP
+\f[CR]\-\-add\-script\f[R] \f[I]file\f[R]
+Adds \f[I]file\f[R] as an additional JavaScript file to the generated
+documentation.
+This option can be used one or more times to specify additional script
+files.
+.RS
+.PP
+Command\-line example:
+.RS
+.PP
+\f[CR]javadoc \-\-add\-script first_script.js \-\-add\-script second_script.js pkg_foo\f[R]
+.RE
+.RE
+.TP
+\f[CR]\-\-add\-stylesheet\f[R] \f[I]file\f[R]
+Adds \f[I]file\f[R] as an additional stylesheet file to the generated
+documentation.
+This option can be used one or more times to specify additional
+stylesheets included in the documentation.
+.RS
+.PP
+Command\-line example:
+.IP
+.EX
+javadoc \-\-add\-stylesheet new_stylesheet_1.css \-\-add\-stylesheet new_stylesheet_2.css pkg_foo
+.EE
+.RE
+.TP
+\f[CR]\-\-allow\-script\-in\-comments\f[R]
+Allow JavaScript in documentation comments, and options whose value is
+\f[I]html\-code\f[R].
+.TP
+\f[CR]\-author\f[R]
+Includes the text of any \f[CR]author\f[R] tags in the generated
+documentation.
+.TP
+\f[CR]\-bottom\f[R] \f[I]html\-code\f[R]
+Specifies the text to be placed at the bottom of each generated page.
+The text can contain HTML tags and white space, but when it does, the
+text must be enclosed in quotation marks.
+Use escape characters for any internal quotation marks within text.
+.TP
+\f[CR]\-charset\f[R] \f[I]name\f[R]
+Specifies the HTML character set for this document.
+The name should be a preferred MIME name as specified in the \f[B]IANA
+Registry, Character Sets\f[R]
+[http://www.iana.org/assignments/character\-sets].
+.RS
+.PP
+For example:
+.IP
+.EX
+javadoc \-charset \[dq]iso\-8859\-1\[dq] mypackage
+.EE
+.PP
+This command inserts the following line, containing a
+\f[B]\f[CB]meta\f[B] element\f[R]
+[https://html.spec.whatwg.org/multipage/semantics.html#the\-meta\-element]
+in the head of every generated page:
+.IP
+.EX
+
+.EE
+.RE
+.TP
+\f[CR]\-d\f[R] \f[I]directory\f[R]
+Specifies the destination directory where the \f[CR]javadoc\f[R] tool
+saves the generated HTML files.
+If you omit the \f[CR]\-d\f[R] option, then the files are saved to the
+current directory.
+The \f[CR]directory\f[R] value can be absolute or relative to the
+current working directory.
+The destination directory is automatically created when the
+\f[CR]javadoc\f[R] tool runs.
+.RS
+.IP \[bu] 2
+\f[B]Linux and macOS:\f[R] For example, the following command generates
+the documentation for the package \f[CR]com.mypackage\f[R] and saves the
+results in the \f[CR]/user/doc/\f[R] directory:
+.RS 2
+.IP
+.EX
+javadoc \-d /user/doc/ com.mypackage
+.EE
+.RE
+.IP \[bu] 2
+\f[B]Windows:\f[R] For example, the following command generates the
+documentation for the package \f[CR]com.mypackage\f[R] and saves the
+results in the \f[CR]\[rs]user\[rs]doc\[rs]\f[R] directory:
+.RS 2
+.IP
+.EX
+javadoc \-d \[rs]user\[rs]doc\[rs] com.mypackage
+.EE
+.RE
+.RE
+.TP
+\f[CR]\-docencoding\f[R] \f[I]name\f[R]
+Specifies the encoding of the generated HTML files.
+The name should be a preferred MIME name as specified in the \f[B]IANA
+Registry, Character Sets\f[R]
+[http://www.iana.org/assignments/character\-sets].
+.RS
+.PP
+Three options are available for use in a \f[CR]javadoc\f[R] encoding
+command.
+The \f[CR]\-encoding\f[R] option is used for encoding the files read by
+the \f[CR]javadoc\f[R] tool, while the \f[CR]\-docencoding\f[R] and
+\f[CR]\-charset\f[R] options are used for encoding the files written by
+the tool.
+Of the three available options, at most, only the input and an output
+encoding option are used in a single encoding command.
+If you specify both input and output encoding options in a command, they
+must be the same value.
+If you specify neither output option, it defaults to the input encoding.
+.PP
+For example:
+.IP
+.EX
+javadoc \-docencoding \[dq]iso\-8859\-1\[dq] mypackage
+.EE
+.RE
+.TP
+\f[CR]\-docfilessubdirs\f[R]
+Enables deep copying of \f[CR]doc\-files\f[R] directories.
+Subdirectories and all contents are recursively copied to the
+destination.
+For example, the directory \f[CR]doc\-files/example/images\f[R] and all
+of its contents are copied.
+Use the \f[B]\f[CB]\-excludedocfilessubdir\f[B]\f[R] option to restrict
+the subdirectories to be copied.
+.TP
+\f[CR]\-doctitle\f[R] \f[I]html\-code\f[R]
+Specifies the title to place near the top of the overview summary file.
+The text specified in the \f[CR]title\f[R] tag is placed as a centered,
+level\-one heading directly beneath the navigation bar.
+The \f[CR]title\f[R] tag can contain HTML tags and white space, but when
+it does, you must enclose the title in quotation marks.
+Additional quotation marks within the \f[CR]title\f[R] tag must be
+escaped.
+For example,
+\f[CR]javadoc \-doctitle \[dq]My Library
v1.0\[dq] com.mypackage\f[R]. +.TP +\f[CR]\-excludedocfilessubdir\f[R] \f[I]name1\f[R]\f[CR],\f[R]\f[I]name2...\f[R] +Excludes any subdirectories with the given names when recursively +copying \f[CR]doc\-files\f[R] subdirectories. +See \f[B]\f[CB]\-docfilessubdirs\f[B]\f[R]. +For historical reasons, \f[CR]:\f[R] can be used anywhere in the +argument as a separator instead of \f[CR],\f[R]. +.TP +\f[CR]\-footer\f[R] \f[I]html\-code\f[R] +This option is no longer supported and reports a warning. +.TP +\f[CR]\-group\f[R] \f[I]name\f[R] \f[I]g1\f[R]\f[CR],\f[R]\f[I]g2...\f[R] +Group the specified packages, or modules when documenting modular code, +together in the Overview page. +For historical reasons, \f[CR]:\f[R] can be used as a separator anywhere +in the argument instead of \f[CR],\f[R]. +.TP +\f[CR]\-header\f[R] \f[I]html\-code\f[R] +Specifies the header text to be placed at the top of each output file. +The header is placed to the right of the navigation bar. +The \f[CR]header\f[R] can contain HTML tags and white space, but when it +does, the \f[CR]header\f[R] must be enclosed in quotation marks. +Use escape characters for internal quotation marks within a header. +For example, +\f[CR]javadoc \-header \[dq]My Library
v1.0\[dq] com.mypackage\f[R]. +.TP +\f[CR]\-helpfile\f[R] \f[I]filename\f[R] +Specifies a file containing the text that will be displayed when the +\f[B]HELP\f[R] link in the navigation bar is clicked. +If this option is not given, the \f[CR]javadoc\f[R] tool creates a +default page that will be used. +.TP +\f[CR]\-html5\f[R] +This option is a no\-op and is just retained for backwards +compatibility. +.TP +\f[CR]\-\-javafx\f[R] or \f[CR]\-javafx\f[R] +Enables JavaFX functionality. +This option is enabled by default if the JavaFX library classes are +detected on the module path. +.TP +\f[CR]\-keywords\f[R] +Adds HTML keyword \f[CR]\f[R] tags to the generated file for each +class. +These tags can help search engines that look for \f[CR]\f[R] tags +find the pages. +Most search engines that search the entire Internet don\[aq]t look at +\f[CR]\f[R] tags, because pages can misuse them. +Search engines offered by companies that confine their searches to their +own website can benefit by looking at \f[CR]\f[R] tags. +The \f[CR]\f[R] tags include the fully qualified name of the class +and the unqualified names of the fields and methods. +Constructors aren\[aq]t included because they are identical to the class +name. +For example, the page for the class \f[CR]String\f[R] includes these +keywords: +.RS +.IP +.EX + + + + +.EE +.RE +.TP +\f[CR]\-link\f[R] \f[I]url\f[R] +Creates links to existing \f[CR]javadoc\f[R] generated documentation of +externally referenced classes. +The \f[I]url\f[R] argument is the absolute or relative URL of the +directory that contains the external \f[CR]javadoc\f[R] generated +documentation. +You can specify multiple \f[CR]\-link\f[R] options in a specified +\f[CR]javadoc\f[R] tool run to link to multiple documents. +.RS +.PP +Either a \f[CR]package\-list\f[R] or an \f[CR]element\-list\f[R] file +must be in this \f[I]url\f[R] directory (otherwise, use the +\f[CR]\-linkoffline\f[R] option). +.PP +\f[I]Note:\f[R] The \f[CR]package\-list\f[R] and +\f[CR]element\-list\f[R] files are generated by the \f[CR]javadoc\f[R] +tool when generating the API documentation and should not be modified by +the user. +.PP +When you use the \f[CR]javadoc\f[R] tool to document packages, it uses +the \f[CR]package\-list\f[R] file to determine the packages declared in +an API. +When you generate API documents for modules, the \f[CR]javadoc\f[R] tool +uses the \f[CR]element\-list\f[R] file to determine the modules and +packages declared in an API. +.PP +The \f[CR]javadoc\f[R] tool reads the names from the appropriate list +file and then links to the packages or modules at that URL. +.PP +When the \f[CR]javadoc\f[R] tool runs, the \f[I]url\f[R] value is copied +into the \f[CR]\f[R] links that are created. +Therefore, \f[I]url\f[R] must be the URL to the directory and not to a +file. +.PP +You can use an absolute link for \f[I]url\f[R] to enable your documents +to link to a document on any web site, or you can use a relative link to +link only to a relative location. +If you use a relative link, then the value you pass in should be the +relative path from the destination directory (specified with the +\f[CR]\-d\f[R] option) to the directory containing the packages being +linked to. +When you specify an absolute link, you usually use an HTTP link. +However, if you want to link to a file system that has no web server, +then you can use a file link. +Use a file link only when everyone who wants to access the generated +documentation shares the same file system. +In all cases, and on all operating systems, use a slash as the +separator, whether the URL is absolute or relative, and +\f[CR]https:\f[R], \f[CR]http:\f[R], or \f[CR]file:\f[R] as specified in +the \f[B]RFC 1738: Uniform Resource Locators (URL)\f[R] +[https://www.rfc\-editor.org/info/rfc1738]. +.IP +.EX +\-link https://///.../ +\-link http://///.../ +\-link file://///.../ +\-link //.../ +.EE +.RE +.TP +\f[CR]\-\-link\-modularity\-mismatch\f[R] (\f[CR]warn\f[R]|\f[CR]info\f[R]) +Specifies whether external documentation with wrong modularity (e.g. +non\-modular documentation for a modular library, or the reverse case) +should be reported as a warning (\f[CR]warn\f[R]) or just a message +(\f[CR]info\f[R]). +The default behavior is to report a warning. +.TP +\f[CR]\-linkoffline\f[R] \f[I]url1\f[R] \f[I]url2\f[R] +This option is a variation of the \f[CR]\-link\f[R] option. +They both create links to \f[CR]javadoc\f[R] generated documentation for +externally referenced classes. +You can specify multiple \f[CR]\-linkoffline\f[R] options in a specified +\f[CR]javadoc\f[R] tool run. +.RS +.PP +Use the \f[CR]\-linkoffline\f[R] option when: +.IP \[bu] 2 +Linking to a document on the web that the \f[CR]javadoc\f[R] tool +can\[aq]t access through a web connection +.IP \[bu] 2 +The \f[CR]package\-list\f[R] or \f[CR]element\-list\f[R] file of the +external document either isn\[aq]t accessible or doesn\[aq]t exist at +the URL location, but does exist at a different location and can be +specified by either the \f[CR]package\-list\f[R] or +\f[CR]element\-list\f[R] file (typically local). +.PP +\f[I]Note:\f[R] The \f[CR]package\-list\f[R] and +\f[CR]element\-list\f[R] files are generated by the \f[CR]javadoc\f[R] +tool when generating the API documentation and should not be modified by +the user. +.PP +If \f[I]url1\f[R] is accessible only on the World Wide Web, then the +\f[CR]\-linkoffline\f[R] option removes the constraint that the +\f[CR]javadoc\f[R] tool must have a web connection to generate +documentation. +.PP +Another use of the \f[CR]\-linkoffline\f[R] option is as a work\-around +to update documents. +After you have run the \f[CR]javadoc\f[R] tool on a full set of packages +or modules, you can run the \f[CR]javadoc\f[R] tool again on a smaller +set of changed packages or modules, so that the updated files can be +inserted back into the original set. +.PP +For example, the \f[CR]\-linkoffline\f[R] option takes two arguments. +The first is for the string to be embedded in the \f[CR]\f[R] +links, and the second tells the \f[CR]javadoc\f[R] tool where to find +either the \f[CR]package\-list\f[R] or \f[CR]element\-list\f[R] file. +.PP +The \f[I]url1\f[R] or \f[I]url2\f[R] value is the absolute or relative +URL of the directory that contains the external \f[CR]javadoc\f[R] +generated documentation that you want to link to. +When relative, the value should be the relative path from the +destination directory (specified with the \f[CR]\-d\f[R] option) to the +root of the packages being linked to. +See \f[I]url\f[R] in the \f[CR]\-link\f[R] option. +.RE +.TP +\f[CR]\-\-link\-platform\-properties\f[R] \f[I]url\f[R] +Specifies a properties file used to configure links to platform +documentation. +.RS +.PP +The \f[I]url\f[R] argument is expected to point to a properties file +containing one or more entries with the following format, where +\f[CR]\f[R] is the platform version as passed to the +\f[CR]\-\-release\f[R] or \f[CR]\-\-source\f[R] option and +\f[CR]\f[R] is the base URL of the corresponding platform API +documentation: +.IP +.EX +doclet.platform.docs.= +.EE +.PP +For instance, a properties file containing URLs for releases 15 to 17 +might contain the following lines: +.IP +.EX +doclet.platform.docs.15=https://example.com/api/15/ +doclet.platform.docs.16=https://example.com/api/16/ +doclet.platform.docs.17=https://example.com/api/17/ +.EE +.PP +If the properties file does not contain an entry for a particular +release no platform links are generated. +.RE +.TP +\f[CR]\-linksource\f[R] +Creates an HTML version of each source file (with line numbers) and adds +links to them from the standard HTML documentation. +Links are created for classes, interfaces, constructors, methods, and +fields whose declarations are in a source file. +Otherwise, links aren\[aq]t created, such as for default constructors +and generated classes. +.RS +.PP +This option exposes all private implementation details in the included +source files, including private classes, private fields, and the bodies +of private methods, regardless of the \f[CR]\-public\f[R], +\f[CR]\-package\f[R], \f[CR]\-protected\f[R], and \f[CR]\-private\f[R] +options. +Unless you also use the \f[CR]\-private\f[R] option, not all private +classes or interfaces are accessible through links. +.PP +Each link appears on the name of the identifier in its declaration. +For example, the link to the source code of the \f[CR]Button\f[R] class +would be on the word \f[CR]Button\f[R]: +.IP +.EX +public class Button extends Component implements Accessible +.EE +.PP +The link to the source code of the \f[CR]getLabel\f[R] method in the +\f[CR]Button\f[R] class is on the word \f[CR]getLabel\f[R]: +.IP +.EX +public String getLabel() +.EE +.RE +.TP +\f[CR]\-\-main\-stylesheet\f[R] \f[I]file\f[R] or \f[CR]\-stylesheetfile\f[R] \f[I]file\f[R] +Specifies the path of an alternate stylesheet file that contains the +definitions for the CSS styles used in the generated documentation. +This option lets you override the default. +If you do not specify the option, the \f[CR]javadoc\f[R] tool will +create and use a default stylesheet. +The file name can be any name and isn\[aq]t restricted to +\f[CR]stylesheet.css\f[R]. +The \f[CR]\-\-main\-stylesheet\f[R] option is the preferred form. +.RS +.PP +Command\-line example: +.IP +.EX +javadoc \-\-main\-stylesheet main_stylesheet.css pkg_foo +.EE +.RE +.TP +\f[CR]\-nocomment\f[R] +Suppresses the entire comment body, including the main description and +all tags, and generate only declarations. +This option lets you reuse source files that were originally intended +for a different purpose so that you can produce skeleton HTML +documentation during the early stages of a new project. +.TP +\f[CR]\-nodeprecated\f[R] +Prevents the generation of any deprecated API in the documentation. +This does what the \f[CR]\-nodeprecatedlist\f[R] option does, and it +doesn\[aq]t generate any deprecated API throughout the rest of the +documentation. +This is useful when writing code when you don\[aq]t want to be +distracted by the deprecated code. +.TP +\f[CR]\-nodeprecatedlist\f[R] +Prevents the generation of the file that contains the list of deprecated +APIs (\f[CR]deprecated\-list.html\f[R]) and the link in the navigation +bar to that page. +The \f[CR]javadoc\f[R] tool continues to generate the deprecated API +throughout the rest of the document. +This is useful when your source code contains no deprecated APIs, and +you want to make the navigation bar cleaner. +.TP +\f[CR]\-\-no\-fonts\f[R] +Prevents inclusion of font files in the generated documentation. +This can be useful if the documentation uses a custom stylesheet which +does not use the default fonts. +.TP +\f[CR]\-nohelp\f[R] +Omits the \f[B]HELP\f[R] link in the navigation bar at the top of each +generated page. +.TP +\f[CR]\-noindex\f[R] +Omits the index from the generated documents. +The index is produced by default. +.TP +\f[CR]\-nonavbar\f[R] +Prevents the generation of the navigation bar and header. +The \f[CR]\-nonavbar\f[R] option has no effect on the +\f[CR]\-bottom\f[R] option. +The \f[CR]\-nonavbar\f[R] option is useful when you are interested only +in the content and have no need for navigation, such as when you are +converting the files to PostScript or PDF for printing only. +.TP +\f[CR]\-\-no\-platform\-links\f[R] +Prevents the generation of links to platform documentation. +These links are generated by default. +.TP +\f[CR]\-noqualifier\f[R] \f[I]name1\f[R]\f[CR],\f[R]\f[I]name2...\f[R] +Excludes the list of qualifiers from the output. +The package name is removed from places where class or interface names +appear. +For historical reasons, \f[CR]:\f[R] can be used anywhere in the +argument as a separator instead of \f[CR],\f[R]. +.RS +.PP +The following example omits all package qualifiers: +\f[CR]\-noqualifier all\f[R]. +.PP +The following example omits \f[CR]java.lang\f[R] and \f[CR]java.io\f[R] +package qualifiers: \f[CR]\-noqualifier java.lang:java.io\f[R]. +.PP +The following example omits package qualifiers starting with +\f[CR]java\f[R] and \f[CR]com.sun\f[R] subpackages, but not +\f[CR]javax: \-noqualifier java.*:com.sun.*\f[R]. +.PP +Where a package qualifier would appear due to the previous behavior, the +name can be suitably shortened. +This rule is in effect whether or not the \f[CR]\-noqualifier\f[R] +option is used. +.RE +.TP +\f[CR]\-nosince\f[R] +Omits from the generated documentation the \f[CR]Since\f[R] sections +derived from any \f[CR]since\f[R] tags. +.TP +\f[CR]\-notimestamp\f[R] +Suppresses the time stamp, which is hidden in an HTML comment in the +generated HTML near the top of each page. +The \f[CR]\-notimestamp\f[R] option is useful when you want to run the +\f[CR]javadoc\f[R] tool on two source bases and compare them, because it +prevents time stamps from causing a difference (which would otherwise be +a difference on every page). +The time stamp includes the \f[CR]javadoc\f[R] tool release number. +.TP +\f[CR]\-notree\f[R] +Omits the class and interface hierarchy pages from the generated +documents. +These are the pages you reach using the \f[B]TREE\f[R] link in the +navigation bar. +The hierarchy is produced by default. +.TP +\f[CR]\-\-override\-methods\f[R] (\f[CR]detail\f[R]|\f[CR]summary\f[R]) +Documents overridden methods in the detail or summary sections. +The default is \f[CR]detail\f[R]. +.TP +\f[CR]\-overview\f[R] \f[I]filename\f[R] +Specifies that the \f[CR]javadoc\f[R] tool should retrieve the content +for the overview documentation from the file specified by +\f[I]filename\f[R] and place it on the Overview page +(\f[CR]overview\-summary.html\f[R]). +If the \f[I]filename\f[R] is a relative path, it is evaluated relative +to the current working directory. +.RS +.PP +The file may be an HTML file, with a filename ending in +\f[CR].html\f[R], or a Markdown file, with a filename ending in +\f[CR].md\f[R]. +If the file is an HTML file, the content for the overview documentation +is taken from the \f[CR]
\f[R] element in the file, if one is +present, or from the \f[CR]\f[R] element is there is no +\f[CR]
\f[R] element. +If the file is a Markdown file, the entire content of the file is used. +.PP +The title on the overview page is set by \f[CR]\-doctitle\f[R]. +.PP +\f[I]Note:\f[R] older versions of the \f[CR]javadoc\f[R] tool assumed +that any use of this option was for an HTML file, and allowed any +extension for the \f[I]filename\f[R]. +.RE +.TP +\f[CR]\-serialwarn\f[R] +Reports compile\-time warnings for missing \f[CR]\[at]serial\f[R] tags. +By default, Javadoc reports no serial warnings. +Use this option to display the serial warnings, which helps to properly +document default serializable fields and \f[CR]writeExternal\f[R] +methods. +.TP +\f[CR]\-\-since\f[R] \f[I]release\f[R](\f[CR],\f[R]\f[I]release\f[R])* +Generates documentation for APIs that were added or newly deprecated in +the specified \f[I]release\f[R]s. +.RS +.PP +If the \f[CR]\[at]since\f[R] tag in the \f[CR]javadoc\f[R] comment of an +element in the documented source code matches a \f[I]release\f[R] passed +as the option argument, information about the element and the release it +was added in is included in a \[dq]New API\[dq] page. +.PP +If the \[dq]Deprecated API\[dq] page is generated and the +\f[CR]since\f[R] element of the \f[CR]java.lang.Deprecated\f[R] +annotation of a documented element matches a \f[I]release\f[R] in the +option arguments, information about the release the element was +deprecated in is added to the \[dq]Deprecated API\[dq] page. +.PP +Releases are compared using case\-sensitive string comparison. +.RE +.TP +\f[CR]\-\-since\-label\f[R] \f[I]text\f[R] +Specifies the \f[I]text\f[R] to use in the heading of the \[dq]New +API\[dq] page. +This may contain information about the releases covered in the page, +e.g. +\[dq]New API in release 2.0\[dq], or \[dq]New API since release 1\[dq]. +.TP +\f[CR]\-\-snippet\-path\f[R] \f[I]snippetpathlist\f[R] +Specifies the search paths for finding files for external snippets. +The \f[I]snippetpathlist\f[R] can contain multiple paths by separating +them with the platform path separator (\f[CR];\f[R] on Windows; +\f[CR]:\f[R] on other platforms.) +The standard doclet first searches the \f[CR]snippet\-files\f[R] +subdirectory in the package containing the snippet, and then searches +all the directories in the given list. +.TP +\f[CR]\-sourcetab\f[R] \f[I]tab\-length\f[R] +Specifies the number of spaces each tab uses in the source. +.TP +\f[CR]\-\-spec\-base\-url\f[R] \f[I]url\f[R] +Specifies the base URL for relative URLs in \f[CR]\[at]spec\f[R] tags, +to be used when generating links to any external specifications. +It can either be an absolute URL, or a relative URL, in which case it is +evaluated relative to the base directory of the generated output files. +The default value is equivalent to \f[CR]{\[at]docRoot}/../specs\f[R]. +.TP +\f[CR]\-splitindex\f[R] +Splits the index file into multiple files, alphabetically, one file per +letter, plus a file for any index entries that start with +non\-alphabetical symbols. +.TP +\f[CR]\-\-syntax\-highlight\f[R] +Enables syntax highlighting for code fragments in +\f[CR]{\[at]snippet}\f[R] tags and \f[CR]
\f[R] elements.
+For snippets, the \f[CR]lang\f[R] attribute is used to determine the
+language of code fragments, which defaults to \[dq]java\[dq] for inline
+snippets and is derived from the file extension for external snippets.
+In HTML \f[CR]
\f[R] tags, the \f[CR]class\f[R] attribute can
+be used to specify the language of the contained code fragment as shown
+below:
+.RS
+.IP
+.EX
+
...
+.EE +.PP +If neither of these attributes is available automatic language detection +is applied. +To disable syntax highlighting for a code fragment set the language to +\[dq]text\[dq] using one of the mechanisms described above. +The languages and formats supported by this option are Java, Properties, +JSON, HTML and XML. +.RE +.TP +\f[CR]\-tag\f[R] \f[I]name\f[R]:\f[I]locations\f[R]:\f[I]header\f[R] +Specifies a custom tag with a single argument. +For the \f[CR]javadoc\f[R] tool to spell\-check tag names, it is +important to include a \f[CR]\-tag\f[R] option for every custom tag that +is present in the source code, disabling (with \f[CR]X\f[R]) those that +aren\[aq]t being output in the current run. +The colon (\f[CR]:\f[R]) is always the separator. +To include a colon in the tag name, escape it with a backward slash +(\f[CR]\[rs]\f[R]). +The \f[CR]\-tag\f[R] option outputs the tag heading, \f[I]header\f[R], +in bold, followed on the next line by the text from its single argument. +Similar to any block tag, the argument text can contain inline tags, +which are also interpreted. +The output is similar to standard one\-argument tags, such as the +\f[CR]\[at]return\f[R] and \f[CR]\[at]author\f[R] tags. +Omitting a \f[I]header\f[R] value causes the \f[I]name\f[R] to be the +heading. +\f[I]locations\f[R] is a list of characters specifying the kinds of +declarations in which the tag may be used. +The following characters may be used, in either uppercase or lowercase: +.RS +.IP \[bu] 2 +\f[CR]A\f[R]: all declarations +.IP \[bu] 2 +\f[CR]C\f[R]: constructors +.IP \[bu] 2 +\f[CR]F\f[R]: fields +.IP \[bu] 2 +\f[CR]M\f[R]: methods +.IP \[bu] 2 +\f[CR]O\f[R]: the overview page and other documentation files in +\f[CR]doc\-files\f[R] subdirectories +.IP \[bu] 2 +\f[CR]P\f[R]: packages +.IP \[bu] 2 +\f[CR]S\f[R]: modules +.IP \[bu] 2 +\f[CR]T\f[R]: types (classes and interfaces) +.IP \[bu] 2 +\f[CR]X\f[R]: nowhere: the tag is disabled, and will be ignored +.PP +The order in which tags are given on the command line will be used as +the order in which the tags appear in the generated output. +You can include standard tags in the order given on the command line by +using the \f[CR]\-tag\f[R] option with no \f[I]locations\f[R] or +\f[I]header\f[R]. +.RE +.TP +\f[CR]\-taglet\f[R] \f[I]class\f[R] +Specifies the fully qualified name of the taglet used in generating the +documentation for that tag. +Use the fully qualified name for the \f[I]class\f[R] value. +This taglet also defines the number of text arguments that the custom +tag has. +The taglet accepts those arguments, processes them, and generates the +output. +.RS +.PP +Taglets are useful for block or inline tags. +They can have any number of arguments and implement custom behavior, +such as making text bold, formatting bullets, writing out the text to a +file, or starting other processes. +Taglets can only determine where a tag should appear and in what form. +All other decisions are made by the doclet. +A taglet can\[aq]t do things such as remove a class name from the list +of included classes. +However, it can execute side effects, such as printing the tag\[aq]s +text to a file or triggering another process. +Use the \f[CR]\-tagletpath\f[R] option to specify the path to the +taglet. +The following example inserts the To Do taglet after Parameters and +ahead of Throws in the generated pages. +.IP +.EX +\-taglet com.sun.tools.doclets.ToDoTaglet +\-tagletpath /home/taglets +\-tag return +\-tag param +\-tag todo +\-tag throws +\-tag see +.EE +.PP +Alternately, you can use the \f[CR]\-taglet\f[R] option in place of its +\f[CR]\-tag\f[R] option, but that might be difficult to read. +.RE +.TP +\f[CR]\-tagletpath\f[R] \f[I]tagletpathlist\f[R] +Specifies the search paths for finding taglet class files. +The \f[I]tagletpathlist\f[R] can contain multiple paths by separating +them with the platform path separator (\f[CR];\f[R] on Windows; +\f[CR]:\f[R] on other platforms.) +The \f[CR]javadoc\f[R] tool searches all subdirectories of the specified +paths. +.TP +\f[CR]\-top\f[R] \f[I]html\-code\f[R] +Specifies the text to be placed at the top of each output file. +.TP +\f[CR]\-use\f[R] +Creates class and package usage pages. +Includes one Use page for each documented class and package. +The page describes what packages, classes, methods, constructors, and +fields use any API of the specified class or package. +Given class C, things that use class C would include subclasses of C, +fields declared as C, methods that return C, and methods and +constructors with parameters of type C. For example, you can look at the +Use page for the \f[CR]String\f[R] type. +Because the \f[CR]getName\f[R] method in the \f[CR]java.awt.Font\f[R] +class returns type \f[CR]String\f[R], the \f[CR]getName\f[R] method uses +\f[CR]String\f[R] and so the \f[CR]getName\f[R] method appears on the +Use page for \f[CR]String\f[R]. +This documents only uses of the API, not the implementation. +When a method uses \f[CR]String\f[R] in its implementation, but +doesn\[aq]t take a string as an argument or return a string, that +isn\[aq]t considered a use of \f[CR]String\f[R]. +To access the generated Use page, go to the class or package and click +the \f[B]USE\f[R] link in the navigation bar. +.TP +\f[CR]\-version\f[R] +Includes the text of any \f[CR]version\f[R] tags in the generated +documentation. +This text is omitted by default. +Note: To find out what version of the \f[CR]javadoc\f[R] tool you are +using, use the \f[CR]\-\-version\f[R] option (with two hyphens). +.TP +\f[CR]\-windowtitle\f[R] \f[I]title\f[R] +Specifies the title to be placed in the HTML \f[CR]\f[R] tag. +The text specified in the \f[CR]title\f[R] tag appears in the window +title and in any browser bookmarks (favorite places) that someone +creates for this page. +This title should not contain any HTML tags because a browser will not +interpret them correctly. +Use escape characters on any internal quotation marks within the +\f[CR]title\f[R] tag. +If the \f[CR]\-windowtitle\f[R] option is omitted, then the +\f[CR]javadoc\f[R] tool uses the value of the \f[CR]\-doctitle\f[R] +option for the \f[CR]\-windowtitle\f[R] option. +For example, +\f[CR]javadoc \-windowtitle \[dq]My Library\[dq] com.mypackage\f[R]. +.SS Extra Options for the Standard Doclet +The following are additional options provided by the standard doclet and +are subject to change without notice. +Additional options are less commonly used or are otherwise regarded as +advanced. +.TP +\f[CR]\-\-date\f[R] \f[I]date\-and\-time\f[R] +Specifies the value to be used to timestamp the generated pages, in +\f[B]ISO 8601\f[R] +[https://www.iso.org/iso\-8601\-date\-and\-time\-format.html] format. +The specified value must be within 10 years of the current date and +time. +It is an error to specify both \f[CR]\-notimestamp\f[R] and +\f[CR]\-\-date\f[R]. +Using a specific value means the generated documentation can be part of +a \f[B]reproducible build\f[R] [https://reproducible\-builds.org/]. +If the option is not given, the default value is the current date and +time. +For example: +.RS +.IP +.EX +javadoc \-\-date 2022\-02\-01T17:41:59\-08:00 mypackage +.EE +.RE +.TP +\f[CR]\-\-legal\-notices\f[R] (\f[CR]default\f[R]|\f[CR]none\f[R]|\f[I]directory\f[R]) +Specifies the location from which to copy legal files to the generated +documentation. +If the option is not specified or is used with the value +\f[CR]default\f[R], the files are copied from the default location. +If the argument is used with value \f[CR]none\f[R], no files are copied. +Every other argument is interpreted as directory from which to copy the +legal files. +.TP +\f[CR]\-\-no\-frames\f[R] +This option is no longer supported and reports a warning. +.TP +\f[CR]\-Xdoclint\f[R] +Enables recommended checks for problems in documentation comments. +.RS +.PP +By default, the \f[CR]\-Xdoclint\f[R] option is enabled. +Disable it with the option \f[CR]\-Xdoclint:none\f[R]. +.PP +For more details, see \f[B]DocLint\f[R]. +.RE +.TP +\f[CR]\-Xdoclint:\f[R]\f[I]flag\f[R],\f[I]flag\f[R],... +Enables or disables specific checks for different kinds of issues in +documentation comments. +.RS +.PP +Each \f[I]flag\f[R] can be one of \f[CR]all\f[R], \f[CR]none\f[R], or +\f[CR][\-]\f[R]\f[I]group\f[R] where \f[I]group\f[R] has one of the +following values: \f[CR]accessibility\f[R], \f[CR]html\f[R], +\f[CR]missing\f[R], \f[CR]reference\f[R], \f[CR]syntax\f[R]. +For more details on these values, see \f[B]DocLint Groups\f[R]. +.PP +When specifying two or more flags, you can either use a single +\f[CR]\-Xdoclint:...\f[R] option, listing all the desired flags, or you +can use multiple options giving one or more flag in each option. +For example, use either of the following commands to check for the HTML, +syntax, and accessibility issues in the file \f[CR]MyFile.java\f[R]. +.IP +.EX +javadoc \-Xdoclint:html \-Xdoclint:syntax \-Xdoclint:accessibility MyFile.java +javadoc \-Xdoclint:html,syntax,accessibility MyFile.java +.EE +.PP +The following examples illustrate how to change what DocLint reports: +.IP \[bu] 2 +\f[CR]\-Xdoclint:none\f[R] \-\-\- disables all checks +.IP \[bu] 2 +\f[CR]\-Xdoclint:\f[R]\f[I]group\f[R] \-\-\- enables \f[I]group\f[R] +checks +.IP \[bu] 2 +\f[CR]\-Xdoclint:all\f[R] \-\-\- enables all groups of checks +.IP \[bu] 2 +\f[CR]\-Xdoclint:all,\-\f[R]\f[I]group\f[R] \-\-\- enables all checks +except \f[I]group\f[R] checks +.PP +For more details, see \f[B]DocLint\f[R]. +.RE +.TP +\f[CR]\-Xdoclint/package:\f[R][\f[CR]\-\f[R]]\f[I]packages\f[R] +Enables or disables checks in specific packages. +\f[I]packages\f[R] is a comma separated list of package specifiers. +A package specifier is either a qualified name of a package or a package +name prefix followed by \f[CR]*\f[R], which expands to all subpackages +of the given package. +Prefix the package specifier with \f[CR]\-\f[R] to disable checks for +the specified packages. +.RS +.PP +For more details, see \f[B]DocLint\f[R]. +.RE +.TP +\f[CR]\-Xdocrootparent\f[R] \f[I]url\f[R] +Replaces all \f[CR]\[at]docRoot\f[R] items followed by \f[CR]/..\f[R] in +documentation comments with \f[I]url\f[R]. +.SH DOCLINT +DocLint provides the ability to check for possible problems in +documentation comments. +Problems may be reported as warnings or errors, depending on their +severity. +For example, a missing comment may be bad style that deserves a warning, +but a link to an unknown Java declaration is more serious and deserves +an error. +Problems are organized into \f[B]groups\f[R], and options can be used to +enable or disable messages in one or more groups. +Within the source code, messages in one or more groups can be +\f[B]suppressed\f[R] by using \f[CR]\[at]SuppressWarnings\f[R] +annotations. +.PP +When invoked from \f[CR]javadoc\f[R], by default DocLint checks all +comments that are used in the generated documentation. +It thus relies on other command\-line options to determine which +declarations, and which corresponding documentation comments will be +included. +\f[I]Note:\f[R] this may mean that even comments on some private members +of serializable classes will also be checked, if the members need to be +documented in the generated \f[CR]Serialized Forms\f[R] page. +.PP +In contrast, when DocLint is invoked from \f[CR]javac\f[R], DocLint +solely relies on the various \f[CR]\-Xdoclint...\f[R] options to +determine which documentation comments to check. +.PP +DocLint doesn\[aq]t attempt to fix invalid input, it just reports it. +.PP +\f[I]Note:\f[R] DocLint doesn\[aq]t guarantee the completeness of these +checks. +In particular, it isn\[aq]t a full HTML compliance checker. +The goal is to just report common errors in a convenient manner. +.SS Groups +The checks performed by DocLint are organized into groups. +The warnings and errors in each group can be enabled or disabled with +command\-line options, or suppressed with +\f[CR]\[at]SuppressWarnings\f[R] annotations. +.PP +The groups are as follows: +.IP \[bu] 2 +\f[CR]accessibility\f[R] \-\-\- Checks for issues related to +accessibility. +For example, no \f[CR]alt\f[R] attribute specified in an +\f[CR]<img>\f[R] element, or no caption or summary attributes specified +in a \f[CR]<table>\f[R] element. +.RS 2 +.PP +Issues are reported as errors if a downstream validation tool might be +expected to report an error in the files generated by +\f[CR]javadoc\f[R]. +.PP +For reference, see the \f[B]Web Content Accessibility Guidelines\f[R] +[https://www.w3.org/WAI/standards\-guidelines/wcag/]. +.RE +.IP \[bu] 2 +\f[CR]html\f[R] \-\-\- Detects common high\-level HTML issues. +For example, putting block elements inside inline elements, or not +closing elements that require an end tag. +.RS 2 +.PP +Issues are reported as errors if a downstream validation tool might be +expected to report an error in the files generated by +\f[CR]javadoc\f[R]. +.PP +For reference, see the \f[B]HTML Living Standard\f[R] +[https://html.spec.whatwg.org/multipage/]. +.RE +.IP \[bu] 2 +\f[CR]missing\f[R] \-\-\- Checks for missing documentation comments or +tags. +For example, a missing comment on a class declaration, or a missing +\f[CR]\[at]param\f[R] or \f[CR]\[at]return\f[R] tag in the comment for a +method declaration. +.RS 2 +.PP +Issues related to missing items are typically reported as warnings +because they are unlikely to be reported as errors by downstream +validation tools that may be used to check the output generated by +\f[CR]javadoc\f[R]. +.RE +.IP \[bu] 2 +\f[CR]reference\f[R] \-\-\- Checks for issues relating to the references +to Java API elements from documentation comment tags. +For example, the reference in \f[CR]\[at]see\f[R] or +\f[CR]{\[at]link ...}\f[R] cannot be found, or a bad name is given for +\f[CR]\[at]param\f[R] or \f[CR]\[at]throws\f[R]. +.RS 2 +.PP +Issues are typically reported as errors because while the issue may not +cause problems in the generated files, the author has likely made a +mistake that will lead to incorrect or unexpected documentation. +.RE +.IP \[bu] 2 +\f[CR]syntax\f[R] \-\-\- Checks for low\-level syntactic issues in +documentation comments. +For example, unescaped angle brackets (\f[CR]<\f[R] and \f[CR]>\f[R]) +and ampersands (\f[CR]&\f[R]) and invalid documentation comment tags. +.RS 2 +.PP +Issues are typically reported as errors because the issues may lead to +incorrect or unexpected documentation. +.RE +.SS Suppressing Messages +DocLint checks for and recognizes two strings that may be present in the +arguments for an \f[CR]\[at]SuppressWarnings\f[R] annotation. +.IP \[bu] 2 +\f[CR]doclint\f[R] +.IP \[bu] 2 +\f[CR]doclint:\f[R]\f[I]LIST\f[R] +.PP +where \f[I]LIST\f[R] is a comma\-separated list of one or more of +\f[CR]accessibility\f[R], \f[CR]html\f[R], \f[CR]missing\f[R], +\f[CR]reference\f[R], \f[CR]syntax\f[R]. +.PP +The names in \f[I]LIST\f[R] are the same \f[B]group\f[R] names supported +by the command\-line \f[CR]\-Xdoclint\f[R] option for \f[CR]javac\f[R] +and \f[CR]javadoc\f[R]. +(This is the same convention honored by the \f[CR]javac\f[R] +\f[CR]\-Xlint\f[R] option and the corresponding names supported by +\f[CR]\[at]SuppressWarnings\f[R].) +.PP +The names in \f[I]LIST\f[R] can equivalently be specified in separate +arguments of the annotation. +For example, the following are equivalent: +.IP \[bu] 2 +\f[CR]\[at]SuppressWarnings(\[dq]doclint:accessibility,missing\[dq])\f[R] +.IP \[bu] 2 +\f[CR]\[at]SuppressWarnings(\[dq]doclint:accessibility\[dq], \[dq]doclint:missing\[dq])\f[R] +.PP +When DocLint detects an issue in a documentation comment, it checks for +the presence of \f[CR]\[at]SuppressWarnings\f[R] on the associated +declaration and on all lexically enclosing declarations. +The issue will be ignored if any such annotation is found containing the +simple string \f[CR]doclint\f[R] or the longer form +\f[CR]doclint:LIST\f[R] where \f[I]LIST\f[R] contains the name of the +group for the issue. +.PP +\f[I]Note:\f[R] as with other uses of \f[CR]\[at]SuppressWarnings\f[R], +using the annotation on a module or package declaration only affects +that declaration; it does not affect the contents of the module or +package in other source files. +.PP +All messages related to an issue are suppressed by the presence of an +appropriate \f[CR]\[at]SuppressWarnings\f[R] annotation: this includes +errors as well as warnings. +.PP +\f[I]Note:\f[R] It is only possible to \f[I]suppress\f[R] messages. +If an annotation of \f[CR]\[at]SuppressWarnings(\[dq]doclint\[dq])\f[R] +is given on a top\-level declaration, all DocLint messages for that +declaration and any enclosed declarations will be suppressed; it is not +possible to selectively re\-enable messages for issues in enclosed +declarations. +.SS Comparison with downstream validation tools +DocLint is a utility built into \f[CR]javac\f[R] and \f[CR]javadoc\f[R] +that checks the content of documentation comments, as found in source +files. +In contrast, downstream validation tools can be used to validate the +output generated from those documentation comments by \f[CR]javadoc\f[R] +and the standard doclet. +.PP +Although there is some overlap in functionality, the two mechanisms are +different and each has its own strengths and weaknesses. +.IP \[bu] 2 +Downstream validation tools can check the end result of any generated +documentation, as it will be seen by the end user. +This includes content from all sources, including documentation +comments, the standard doclet itself, user\-provided taglets, and +content supplied via command\-line options. +Because such tools are analyzing complete HTML pages, they can do more +complete checks than can DocLint. +However, when a problem is found in the generated pages, it can be +harder to track down exactly where in the build pipeline the problem +needs to be fixed. +.IP \[bu] 2 +DocLint checks the content of documentation comments, in source files. +This makes it very easy to identify the exact position of any issues +that may be found. +DocLint can also detect some semantic errors in documentation comments +that downstream tools cannot detect, such as missing comments, using an +\f[CR]\[at]return\f[R] tag in a method returning \f[CR]void\f[R], or an +\f[CR]\[at]param\f[R] tag describing a non\-existent parameter. +But by its nature, DocLint cannot report on problems such as missing +links, or errors in user\-provided custom taglets, or problems in the +standard doclet itself. +It also cannot reliably detect errors in documentation comments at the +boundaries between content in a documentation comment and content +generated by a custom taglet. diff -Nru openjdk-25-25.0.2+10/debian/man/javap.1 openjdk-25-25.0.3+9/debian/man/javap.1 --- openjdk-25-25.0.2+10/debian/man/javap.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/javap.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,211 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JAVAP" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +javap \- disassemble one or more class files +.SH SYNOPSIS +\f[CR]javap\f[R] [\f[I]options\f[R]] \f[I]classes\f[R]... +.TP +\f[I]options\f[R] +Specifies the command\-line options. +See \f[B]Options for javap\f[R]. +.TP +\f[I]classes\f[R] +Specifies one or more classes separated by spaces to be processed for +annotations. +You can specify a class that can be found in the class path by its file +name, URL, or by its fully qualified class name. +.RS +.PP +Examples: +.RS +.PP +\f[CR]path/to/MyClass.class\f[R] +.RE +.RS +.PP +\f[CR]jar:file:///path/to/MyJar.jar!/mypkg/MyClass.class\f[R] +.RE +.RS +.PP +\f[CR]java.lang.Object\f[R] +.RE +.RE +.SH DESCRIPTION +The \f[CR]javap\f[R] command disassembles one or more class files. +The output depends on the options used. +When no options are used, the \f[CR]javap\f[R] command prints the +protected and public fields, and methods of the classes passed to it. +.PP +The \f[CR]javap\f[R] command isn\[aq]t multirelease JAR aware. +Using the class path form of the command results in viewing the base +entry in all JAR files, multirelease or not. +Using the URL form, you can use the URL form of an argument to specify a +specific version of a class to be disassembled. +.PP +The \f[CR]javap\f[R] command prints its output to \f[CR]stdout\f[R]. +.PP +\f[B]Note:\f[R] +.PP +In tools that support \f[CR]\-\-\f[R] style options, the GNU\-style +options can use the equal sign (\f[CR]=\f[R]) instead of a white space +to separate the name of an option from its value. +.SH OPTIONS FOR JAVAP +.TP +\f[CR]\-\-help\f[R], \f[CR]\-help\f[R] , \f[CR]\-h\f[R], or \f[CR]\-?\f[R] +Prints a help message for the \f[CR]javap\f[R] command. +.TP +\f[CR]\-version\f[R] +Prints release information. +.TP +\f[CR]\-verbose\f[R] or \f[CR]\-v\f[R] +Prints additional information about the selected class. +.TP +\f[CR]\-l\f[R] +Prints line and local variable tables. +.TP +\f[CR]\-public\f[R] +Shows only public classes and members. +.TP +\f[CR]\-protected\f[R] +Shows only protected and public classes and members. +.TP +\f[CR]\-package\f[R] +Shows package/protected/public classes and members (default). +.TP +\f[CR]\-private\f[R] or \f[CR]\-p\f[R] +Shows all classes and members. +.TP +\f[CR]\-c\f[R] +Prints disassembled code, for example, the instructions that comprise +the Java bytecodes, for each of the methods in the class. +.TP +\f[CR]\-s\f[R] +Prints internal type signatures. +.TP +\f[CR]\-sysinfo\f[R] +Shows system information (path, size, date, SHA\-256 hash) of the class +being processed. +.TP +\f[CR]\-verify\f[R] +Prints additional class verification info. +.TP +\f[CR]\-constants\f[R] +Shows \f[CR]static final\f[R] constants. +.TP +\f[CR]\-\-module\f[R] \f[I]module\f[R] or \f[CR]\-m\f[R] \f[I]module\f[R] +Specifies the module containing classes to be disassembled. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]path\f[R] +Specifies where to find application modules. +.TP +\f[CR]\-\-system\f[R] \f[I]jdk\f[R] +Specifies where to find system modules. +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R], \f[CR]\-classpath\f[R] \f[I]path\f[R], or \f[CR]\-cp\f[R] \f[I]path\f[R] +Specifies the path that the \f[CR]javap\f[R] command uses to find user +class files. +It overrides the default or the \f[CR]CLASSPATH\f[R] environment +variable when it\[aq]s set. +.TP +\f[CR]\-bootclasspath\f[R] \f[I]path\f[R] +Overrides the location of bootstrap class files. +.TP +\f[CR]\-\-multi\-release\f[R] \f[I]version\f[R] +Specifies the version to select in multi\-release JAR files. +.TP +\f[CR]\-J\f[R]\f[I]option\f[R] +Passes the specified option to the JVM. +For example: +.RS +.IP +.EX +javap \-J\-version + +javap \-J\-Djava.security.manager \-J\-Djava.security.policy=MyPolicy MyClassName +.EE +.PP +See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R]. +.RE +.SH JAVAP EXAMPLE +Compile the following \f[CR]HelloWorldFrame\f[R] class: +.IP +.EX +import java.awt.Graphics; + +import javax.swing.JFrame; +import javax.swing.JPanel; + +public class HelloWorldFrame extends JFrame { + + String message = \[dq]Hello World!\[dq]; + + public HelloWorldFrame(){ + setContentPane(new JPanel(){ + \[at]Override + protected void paintComponent(Graphics g) { + g.drawString(message, 15, 30); + } + }); + setSize(100, 100); + } + public static void main(String[] args) { + HelloWorldFrame frame = new HelloWorldFrame(); + frame.setVisible(true); + + } + +} +.EE +.PP +The output from the \f[CR]javap HelloWorldFrame.class\f[R] command +yields the following: +.IP +.EX +Compiled from \[dq]HelloWorldFrame.java\[dq] +public class HelloWorldFrame extends javax.swing.JFrame { + java.lang.String message; + public HelloWorldFrame(); + public static void main(java.lang.String[]); +} +.EE +.PP +The output from the \f[CR]javap \-c HelloWorldFrame.class\f[R] command +yields the following: +.IP +.EX +Compiled from \[dq]HelloWorldFrame.java\[dq] +public class HelloWorldFrame extends javax.swing.JFrame { + java.lang.String message; + + public HelloWorldFrame(); + Code: + 0: aload_0 + 1: invokespecial #1 // Method javax/swing/JFrame.\[dq]<init>\[dq]:()V + 4: aload_0 + 5: ldc #2 // String Hello World! + 7: putfield #3 // Field message:Ljava/lang/String; + 10: aload_0 + 11: new #4 // class HelloWorldFrame$1 + 14: dup + 15: aload_0 + 16: invokespecial #5 // Method HelloWorldFrame$1.\[dq]<init>\[dq]:(LHelloWorldFrame;)V + 19: invokevirtual #6 // Method setContentPane:(Ljava/awt/Container;)V + 22: aload_0 + 23: bipush 100 + 25: bipush 100 + 27: invokevirtual #7 // Method setSize:(II)V + 30: return + + public static void main(java.lang.String[]); + Code: + 0: new #8 // class HelloWorldFrame + 3: dup + 4: invokespecial #9 // Method \[dq]<init>\[dq]:()V + 7: astore_1 + 8: aload_1 + 9: iconst_1 + 10: invokevirtual #10 // Method setVisible:(Z)V + 13: return +} +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jcmd.1 openjdk-25-25.0.3+9/debian/man/jcmd.1 --- openjdk-25-25.0.2+10/debian/man/jcmd.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jcmd.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,1328 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JCMD" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jcmd \- send diagnostic command requests to a running Java Virtual +Machine (JVM) +.SH SYNOPSIS +\f[CR]jcmd\f[R] [\f[I]pid\f[R] | \f[I]main\-class\f[R]] +\f[I]command\f[R]... +| \f[CR]PerfCounter.print\f[R] | \f[CR]\-f\f[R] \f[I]filename\f[R] +.PP +\f[CR]jcmd\f[R] [\f[CR]\-l\f[R]] +.PP +\f[CR]jcmd\f[R] \f[CR]\-h\f[R] +.TP +\f[I]pid\f[R] +When used, the \f[CR]jcmd\f[R] utility sends the diagnostic command +request to the process ID for the Java process. +.TP +\f[I]main\-class\f[R] +When used, the \f[CR]jcmd\f[R] utility sends the diagnostic command +request to all Java processes with the specified name of the main class. +.TP +\f[I]command\f[R] +The \f[CR]command\f[R] must be a valid \f[CR]jcmd\f[R] command for the +selected JVM. +The list of available commands for \f[CR]jcmd\f[R] is obtained by +running the \f[CR]help\f[R] command (\f[CR]jcmd\f[R] \f[I]pid\f[R] +\f[CR]help\f[R]) where \f[I]pid\f[R] is the process ID for the running +Java process. +.TP +\f[CR]Perfcounter.print\f[R] +Prints the performance counters exposed by the specified Java process. +.TP +\f[CR]\-f\f[R] \f[I]filename\f[R] +Reads and executes commands from a specified file, \f[I]filename\f[R]. +.TP +\f[CR]\-l\f[R] +Displays the list of Java Virtual Machine process identifiers that are +not running in a separate docker process along with the main class and +command\-line arguments that were used to launch the process. +If the JVM is in a docker process, you must use tools such as +\f[CR]ps\f[R] to look up the PID. +.RS +.PP +\f[B]Note:\f[R] +.PP +Using \f[CR]jcmd\f[R] without arguments is the same as using +\f[CR]jcmd \-l\f[R]. +.RE +.TP +\f[CR]\-h\f[R] +Displays the \f[CR]jcmd\f[R] utility\[aq]s command\-line help. +.SH DESCRIPTION +The \f[CR]jcmd\f[R] utility is used to send diagnostic command requests +to the JVM. +It must be used on the same machine on which the JVM is running, and +have the same effective user and group identifiers that were used to +launch the JVM. +Each diagnostic command has its own set of options and arguments. +To display the description, syntax, and a list of available options and +arguments for a diagnostic command, use the name of the command as the +argument. +For example: +.RS +.PP +\f[CR]jcmd\f[R] \f[I]pid\f[R] \f[CR]help\f[R] \f[I]command\f[R] +.RE +.PP +If arguments contain spaces, then you must surround them with single or +double quotation marks (\f[CR]\[aq]\f[R] or \f[CR]\[dq]\f[R]). +In addition, you must escape single or double quotation marks with a +backslash (\f[CR]\[rs]\f[R]) to prevent the operating system shell from +processing quotation marks. +Alternatively, you can surround these arguments with single quotation +marks and then with double quotation marks (or with double quotation +marks and then with single quotation marks). +.PP +If you specify the process identifier (\f[I]pid\f[R]) or the main class +(\f[I]main\-class\f[R]) as the first argument, then the \f[CR]jcmd\f[R] +utility sends the diagnostic command request to the Java process with +the specified identifier or to all Java processes with the specified +name of the main class. +You can also send the diagnostic command request to all available Java +processes by specifying \f[CR]0\f[R] as the process identifier. +.SH COMMANDS FOR JCMD +The \f[I]command\f[R] must be a valid \f[CR]jcmd\f[R] diagnostic command +for the selected JVM. +The list of available commands for \f[CR]jcmd\f[R] is obtained by +running the \f[CR]help\f[R] command (\f[CR]jcmd\f[R] \f[I]pid\f[R] +\f[CR]help\f[R]) where \f[I]pid\f[R] is the process ID for a running +Java process. +If the \f[I]pid\f[R] is \f[CR]0\f[R], commands will be sent to all Java +processes. +The main class argument will be used to match, either partially or +fully, the class used to start Java. +If no options are given, it lists the running Java process identifiers +that are not in separate docker processes along with the main class and +command\-line arguments that were used to launch the process (the same +as using \f[CR]\-l\f[R]). +.PP +\f[CR]jcmd\f[R] \f[I]commands\f[R] may take options and arguments. +\f[I]Options\f[R] are specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +\f[I]Arguments\f[R] are given as just a value, never name=value. +.PP +The following commands are available: +.TP +\f[CR]help\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +For more information about a specific command. +.RS +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]command name\f[R]: The name of the command for which we want help +(STRING, no default value) +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-all\f[R]: (Optional) Show help for all commands (BOOLEAN, false) +\&. +.RE +.TP +\f[CR]Compiler.CodeHeap_Analytics\f[R] [\f[I]function\f[R]] [\f[I]granularity\f[R]] +Print CodeHeap analytics +.RS +.PP +Impact: Low: Depends on code heap size and content. +Holds CodeCache_lock during analysis step, usually sub\-second duration. +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]function\f[R]: (Optional) Function to be performed (aggregate, +UsedSpace, FreeSpace, MethodCount, MethodSpace, MethodAge, MethodNames, +discard (STRING, all) +.IP \[bu] 2 +\f[I]granularity\f[R]: (Optional) Detail level \- smaller value \-> more +detail (INT, 4096) +.RE +.TP +\f[CR]Compiler.codecache\f[R] +Prints code cache layout and bounds. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]Compiler.codelist\f[R] +Prints all compiled methods in code cache that are alive. +.RS +.PP +Impact: Medium +.RE +.TP +\f[CR]Compiler.directives_add\f[R] \f[I]arguments\f[R] +Adds compiler directives from a file. +.RS +.PP +Impact: Low +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]filename\f[R]: The name of the directives file (STRING, no default +value) +.RE +.TP +\f[CR]Compiler.directives_clear\f[R] +Remove all compiler directives. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]Compiler.directives_print\f[R] +Prints all active compiler directives. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]Compiler.directives_remove\f[R] +Remove latest added compiler directive. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]Compiler.memory\f[R] [\f[I]options\f[R]] +Print compilation footprint +.RS +.PP +Impact: Medium: Pause time depends on number of compiled methods +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-H\f[R]: (Optional) Human readable format (BOOLEAN, false) +.IP \[bu] 2 +\f[CR]\-s\f[R]: (Optional) Minimum memory size (MEMORY SIZE, 0) +.RE +.TP +\f[CR]Compiler.perfmap\f[R] [\f[I]arguments\f[R]] (Linux only) +Write map file for Linux perf tool. +.RS +.PP +Impact: Low +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]filename\f[R]: (Optional) The name of the map file. +If %p is specified in the filename, it is expanded to the JVM\[aq]s PID. +(FILE, \[dq]/tmp/perf\-%p.map\[dq]) +.RE +.TP +\f[CR]Compiler.queue\f[R] +Prints methods queued for compilation. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]GC.class_histogram\f[R] [\f[I]options\f[R]] +Provides statistics about the Java heap usage. +.RS +.PP +Impact: High \-\-\- depends on Java heap size and content. +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-all\f[R]: (Optional) Inspects all objects, including unreachable +objects (BOOLEAN, false) +.IP \[bu] 2 +\f[CR]\-parallel\f[R]: (Optional) Number of parallel threads to use for +heap inspection. +0 (the default) means let the VM determine the number of threads to use. +1 means use one thread (disable parallelism). +For any other value the VM will try to use the specified number of +threads, but might use fewer. +(INT, 0) +.RE +.TP +\f[CR]GC.finalizer_info\f[R] +Provides information about the Java finalization queue. +.RS +.PP +Impact: Medium +.RE +.TP +\f[CR]GC.heap_dump\f[R] [\f[I]options\f[R]] \f[I]filename\f[R] +Generates a HPROF format dump of the Java heap. +.RS +.PP +Impact: High \-\-\- depends on the Java heap size and content. +Request a full GC unless the \f[CR]\-all\f[R] option is specified. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-all\f[R]: (Optional) Dump all objects, including unreachable +objects (BOOLEAN, false) +.IP \[bu] 2 +\f[CR]\-gz\f[R]: (Optional) If specified, the heap dump is written in +gzipped format using the given compression level. +1 (recommended) is the fastest, 9 the strongest compression. +(INT, 1) +.IP \[bu] 2 +\f[CR]\-overwrite\f[R]: (Optional) If specified, the dump file will be +overwritten if it exists (BOOLEAN, false) +.IP \[bu] 2 +\f[CR]\-parallel\f[R]: (Optional) Number of parallel threads to use for +heap dump. +The VM will try to use the specified number of threads, but might use +fewer. +(INT, 1) +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]filename\f[R]: The name of the dump file. +If %p is specified in the filename, it is expanded to the JVM\[aq]s PID. +(FILE, no default value) +.RE +.TP +\f[CR]GC.heap_info\f[R] +Provides generic Java heap information. +.RS +.PP +Impact: Medium +.RE +.TP +\f[CR]GC.run\f[R] +Calls \f[CR]java.lang.System.gc()\f[R]. +.RS +.PP +Impact: Medium \-\-\- depends on the Java heap size and content. +.RE +.TP +\f[CR]GC.run_finalization\f[R] +Calls \f[CR]java.lang.System.runFinalization()\f[R]. +.RS +.PP +Impact: Medium \-\-\- depends on the Java content. +.RE +.TP +\f[CR]JFR.check\f[R] [\f[I]options\f[R]] +Show information about a running flight recording +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +If no parameters are entered, information for all active recordings is +shown. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]name\f[R]: (Optional) Name of the flight recording. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]verbose\f[R]: (Optional) Flag for printing the event settings for +the recording (BOOLEAN, false) +.RE +.TP +\f[CR]JFR.configure\f[R] [\f[I]options\f[R]] +Set the parameters for a flight recording +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +If no parameters are entered, the current settings are displayed. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]dumppath\f[R]: (Optional) Path to the location where a recording +file is written in case the VM runs into a critical error, such as a +system crash. +(STRING, The default location is the current directory) +.IP \[bu] 2 +\f[CR]globalbuffercount\f[R]: (Optional) Number of global buffers. +This option is a legacy option: change the \f[CR]memorysize\f[R] +parameter to alter the number of global buffers. +This value cannot be changed once JFR has been initialized. +(STRING, default determined by the value for \f[CR]memorysize\f[R]) +.IP \[bu] 2 +\f[CR]globalbuffersize\f[R]: (Optional) Size of the global buffers, in +bytes. +This option is a legacy option: change the \f[CR]memorysize\f[R] +parameter to alter the size of the global buffers. +This value cannot be changed once JFR has been initialized. +(STRING, default determined by the value for \f[CR]memorysize\f[R]) +.IP \[bu] 2 +\f[CR]maxchunksize\f[R]: (Optional) Maximum size of an individual data +chunk in bytes if one of the following suffixes is not used: \[aq]m\[aq] +or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for +gigabytes. +This value cannot be changed once JFR has been initialized. +(STRING, 12M) +.IP \[bu] 2 +\f[CR]memorysize\f[R]: (Optional) Overall memory size, in bytes if one +of the following suffixes is not used: \[aq]m\[aq] or \[aq]M\[aq] for +megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. +This value cannot be changed once JFR has been initialized. +(STRING, 10M) +.IP \[bu] 2 +\f[CR]repositorypath\f[R]: (Optional) Path to the location where +recordings are stored until they are written to a permanent file. +(STRING, The default location is the temporary directory for the +operating system. +On Linux operating systems, the temporary directory is \f[CR]/tmp\f[R]. +On Windwows, the temporary directory is specified by the \f[CR]TMP\f[R] +environment variable.) +.IP \[bu] 2 +\f[CR]preserve\-repository=\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]} : +Specifies whether files stored in the disk repository should be kept +after the JVM has exited. +If false, files are deleted. +By default, this parameter is disabled. +.IP \[bu] 2 +\f[CR]stackdepth\f[R]: (Optional) Stack depth for stack traces. +Setting this value greater than the default of 64 may cause a +performance degradation. +This value cannot be changed once JFR has been initialized. +(LONG, 64) +.IP \[bu] 2 +\f[CR]thread_buffer_size\f[R]: (Optional) Local buffer size for each +thread in bytes if one of the following suffixes is not used: +\[aq]k\[aq] or \[aq]K\[aq] for kilobytes or \[aq]m\[aq] or \[aq]M\[aq] +for megabytes. +Overriding this parameter could reduce performance and is not +recommended. +This value cannot be changed once JFR has been initialized. +(STRING, 8k) +.IP \[bu] 2 +\f[CR]samplethreads\f[R]: (Optional) Flag for activating thread +sampling. +(BOOLEAN, true) +.RE +.TP +\f[CR]JFR.dump\f[R] [\f[I]options\f[R]] +Write data to a file while a flight recording is running +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +No options are required. +The recording continues to run after the data is written. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]begin\f[R]: (Optional) Specify the time from which recording data +will be included in the dump file. +The format is specified as local time. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]end\f[R]: (Optional) Specify the time to which recording data will +be included in the dump file. +The format is specified as local time. +(STRING, no default value) +.RS 2 +.PP +\f[B]Note:\f[R] For both \f[CR]begin\f[R] and \f[CR]end\f[R], the time +must be in a format that can be read by +java.time.LocalTime::parse(STRING), +java.time.LocalDateTime::parse(STRING) or +java.time.Instant::parse(STRING). +For example, \[dq]13:20:15\[dq], \[dq]2020\-03\-17T09:00:00\[dq] or +\[dq]2020\-03\-17T09:00:00Z\[dq]. +.PP +\f[B]Note:\f[R] \f[CR]begin\f[R] and \f[CR]end\f[R] times correspond to +the timestamps found within the recorded information in the flight +recording data. +.PP +Another option is to use a time relative to the current time that is +specified by a negative integer followed by \[dq]s\[dq], \[dq]m\[dq] or +\[dq]h\[dq]. +For example, \[dq]\-12h\[dq], \[dq]\-15m\[dq] or \[dq]\-30s\[dq] +.RE +.IP \[bu] 2 +\f[CR]filename\f[R]: (Optional) Name of the file to which the flight +recording data is dumped. +If no filename is given, a filename is generated from the PID and the +current date. +The filename may also be a directory in which case, the filename is +generated from the PID and the current date in the specified directory. +If %p and/or %t is specified in the filename, it expands to the +JVM\[aq]s PID and the current timestamp, respectively. +(FILE, no default value) +.IP \[bu] 2 +\f[CR]maxage\f[R]: (Optional) Length of time for dumping the flight +recording data to a file. +(INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or +\[aq]h\[aq] for hours, no default value) +.IP \[bu] 2 +\f[CR]maxsize\f[R]: (Optional) Maximum size for the amount of data to +dump from a flight recording in bytes if one of the following suffixes +is not used: \[aq]m\[aq] or \[aq]M\[aq] for megabytes OR \[aq]g\[aq] or +\[aq]G\[aq] for gigabytes. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]name\f[R]: (Optional) Name of the recording. +If no name is given, data from all recordings is dumped. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]path\-to\-gc\-roots\f[R]: (Optional) Flag for saving the path to +garbage collection (GC) roots at the time the recording data is dumped. +The path information is useful for finding memory leaks but collecting +it can cause the application to pause for a short period of time. +Turn on this flag only when you have an application that you suspect has +a memory leak. +(BOOLEAN, false) +.RE +.TP +\f[CR]JFR.start\f[R] [\f[I]options\f[R]] +Start a flight recording +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +If no parameters are entered, then a recording is started with default +values. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]delay\f[R]: (Optional) Length of time to wait before starting to +record (INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for +minutes or \[aq]h\[aq] for hours, 0s) +.IP \[bu] 2 +\f[CR]disk\f[R]: (Optional) Flag for also writing the data to disk while +recording (BOOLEAN, true) +.IP \[bu] 2 +\f[CR]dumponexit\f[R]: (Optional) Flag for writing the recording to disk +when the Java Virtual Machine (JVM) shuts down. +If set to \[aq]true\[aq] and no value is given for \f[CR]filename\f[R], +the recording is written to a file in the directory where the process +was started. +The file name is a system\-generated name that contains the process ID, +the recording ID and the current time stamp. +(For example: \f[CR]id\-1\-2019_12_12_10_41.jfr\f[R]) (BOOLEAN, false) +.IP \[bu] 2 +\f[CR]duration\f[R]: (Optional) Length of time to record. +Note that \f[CR]0s\f[R] means forever (INTEGER followed by \[aq]s\[aq] +for seconds \[aq]m\[aq] for minutes or \[aq]h\[aq] for hours, 0s) +.IP \[bu] 2 +\f[CR]filename\f[R]: (Optional) Name of the file to which the flight +recording data is written when the recording is stopped. +If no filename is given, a filename is generated from the PID and the +current date and is placed in the directory where the process was +started. +The filename may also be a directory in which case, the filename is +generated from the PID and the current date in the specified directory. +If %p and/or %t is specified in the filename, it expands to the +JVM\[aq]s PID and the current timestamp, respectively. +(FILE, no default value) +.IP \[bu] 2 +\f[CR]maxage\f[R]: (Optional) Maximum time to keep the recorded data on +disk. +This parameter is valid only when the \f[CR]disk\f[R] parameter is set +to \f[CR]true\f[R]. +Note \f[CR]0s\f[R] means forever. +(INTEGER followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or +\[aq]h\[aq] for hours, 0s) +.IP \[bu] 2 +\f[CR]maxsize\f[R]: (Optional) Maximum size of the data to keep on disk +in bytes if one of the following suffixes is not used: \[aq]m\[aq] or +\[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. +This parameter is valid only when the \f[CR]disk\f[R] parameter is set +to \[aq]true\[aq]. +The value must not be less than the value for the +\f[CR]maxchunksize\f[R] parameter set with the \f[CR]JFR.configure\f[R] +command. +(STRING, 0 (no maximum size)) +.IP \[bu] 2 +\f[CR]name\f[R]: (Optional) Name of the recording. +If no name is provided, a name is generated. +Make note of the generated name that is shown in the response to the +command so that you can use it with other commands. +(STRING, system\-generated default name) +.IP \[bu] 2 +\f[CR]path\-to\-gc\-roots\f[R]: (Optional) Flag for saving the path to +garbage collection (GC) roots at the end of a recording. +The path information is useful for finding memory leaks but collecting +it is time consuming. +Turn on this flag only when you have an application that you suspect has +a memory leak. +If the \f[CR]settings\f[R] parameter is set to \[aq]profile\[aq], then +the information collected includes the stack trace from where the +potential leaking object was allocated. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]settings\f[R]: (Optional) Name of the settings file that +identifies which events to record. +To specify more than one file, separate the names with a comma +(\[aq],\[aq]). +Include the path if the file is not in \f[CR]JAVA\-HOME\f[R]/lib/jfr. +The following profiles are included with the JDK in the +\f[CR]JAVA\-HOME\f[R]/lib/jfr directory: \[aq]default.jfc\[aq]: collects +a predefined set of information with low overhead, so it has minimal +impact on performance and can be used with recordings that run +continuously; \[aq]profile.jfc\[aq]: Provides more data than the +\[aq]default.jfc\[aq] profile, but with more overhead and impact on +performance. +Use this configuration for short periods of time when more information +is needed. +Use \f[CR]none\f[R] to start a recording without a predefined +configuration file. +(STRING, \f[CR]JAVA\-HOME\f[R]/lib/jfr/default.jfc) +.PP +Event settings and .jfc options can be specified using the following +syntax: +.IP \[bu] 2 +\f[CR]option\f[R]: (Optional) Specifies the option value to modify. +To list available options, use the \f[CR]JAVA_HOME\f[R]/bin/jfr tool. +.IP \[bu] 2 +\f[CR]event\-setting\f[R]: (Optional) Specifies the event setting value +to modify. +Use the form: \f[CR]<event\-name>#<setting\-name>=<value>\f[R] To add a +new event setting, prefix the event name with \[aq]+\[aq]. +.PP +You can specify values for multiple event settings and .jfc options by +separating them with a whitespace. +In case of a conflict between a parameter and a .jfc option, the +parameter will take precedence. +The whitespace delimiter can be omitted for timespan values, i.e. +20ms. +For more information about the settings syntax, see Javadoc of the +jdk.jfr package. +.RE +.TP +\f[CR]JFR.stop\f[R] [\f[I]options\f[R]] +Stop a flight recording +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +If no parameters are entered, then no recording is stopped. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]filename\f[R]: (Optional) Name of the file to which the recording +is written when the recording is stopped. +If %p and/or %t is specified in the filename, it expands to the +JVM\[aq]s PID and the current timestamp, respectively. +If no path is provided, the data from the recording is discarded. +(FILE, no default value) +.IP \[bu] 2 +\f[CR]name\f[R]: (Optional) Name of the recording (STRING, no default +value) +.RE +.TP +\f[CR]JFR.view\f[R] [\f[I]options\f[R]] +Display event data in predefined views. +.RS +.PP +Impact: Medium +.PP +\f[B]Note:\f[R] +.PP +The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or +\f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +If no parameters are entered, then a list of available views are +displayed. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]cell\-height\f[R]: (Optional) Maximum number of rows in a table +cell. +(INT, default value depends on the view) +.IP \[bu] 2 +\f[CR]maxage\f[R]: (Optional) Length of time for the view to span. +(INT followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or +\[aq]h\[aq] for hours, default value is 10m) +.IP \[bu] 2 +\f[CR]maxsize\f[R]: (Optional) Maximum size for the view to span in +bytes if one of the following suffixes is not used: \[aq]m\[aq] or +\[aq]M\[aq] for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. +(STRING, default value is 32MB) +.IP \[bu] 2 +\f[CR]truncate\f[R]: (Optional) Maximum number of rows in a table cell. +(INT, default value depends on the view) +.IP \[bu] 2 +\f[CR]verbose\f[R]: (Optional) Displays the query that makes up the +view. +(BOOLEAN, default value is false) +.IP \[bu] 2 +\f[CR]width\f[R]: (Optional) The width of the view in characters. +(INT, default value depends on the view) +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[CR]view\f[R]: Name of the view or event type to display. +Use \f[CR]help JFR.view\f[R] to see a list of available views. +(STRING, no default value) +.PP +The view parameter can be an event type name. +Use \f[CR]JFR.view types\f[R] to see a list. +To display all views, use \f[CR]JFR.view all\-views\f[R]. +To display all events, use \f[CR]JFR.view all\-events\f[R]. +.RE +.TP +\f[CR]JVMTI.agent_load\f[R] [\f[I]arguments\f[R]] +Loads JVMTI native agent. +.RS +.PP +Impact: Low +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]library path\f[R]: Absolute path of the JVMTI agent to load. +(STRING, no default value) +.IP \[bu] 2 +\f[I]agent option\f[R]: (Optional) Option string to pass the agent. +(STRING, no default value) +.RE +.TP +\f[CR]JVMTI.data_dump\f[R] +Signal the JVM to do a data\-dump request for JVMTI. +.RS +.PP +Impact: High +.RE +.TP +\f[CR]ManagementAgent.start\f[R] [\f[I]options\f[R]] +Starts remote management agent. +.RS +.PP +Impact: Low \-\-\- no impact +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]config.file\f[R]: (Optional) Sets +\f[CR]com.sun.management.config.file\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[CR]jmxremote.host\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.host\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[CR]jmxremote.port\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.port\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[CR]jmxremote.rmi.port\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.rmi.port\f[R] (STRING, no default +value) +.IP \[bu] 2 +\f[CR]jmxremote.ssl\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.ssl\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[CR]jmxremote.registry.ssl\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.registry.ssl\f[R] (STRING, no default +value) +.IP \[bu] 2 +\f[CR]jmxremote.authenticate\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.authenticate\f[R] (STRING, no default +value) +.IP \[bu] 2 +jmxremote.password.file: (Optional) Sets +\f[CR]com.sun.management.jmxremote.password.file\f[R] (STRING, no +default value) +.IP \[bu] 2 +\f[CR]jmxremote.access.file\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.acce ss.file\f[R] (STRING, no default +value) +.IP \[bu] 2 +\f[CR]jmxremote.login.config\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.log in.config\f[R] (STRING, no +default value) +.IP \[bu] 2 +\f[CR]jmxremote.ssl.enabled.cipher.suites\f[R]: (Optional) Sets +\f[CR]com.sun.management\f[R]. +.IP \[bu] 2 +\f[CR]jmxremote.ssl.enabled.cipher.suite\f[R]: (STRING, no default +value) +.IP \[bu] 2 +\f[CR]jmxremote.ssl.enabled.protocols\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxr emote.ssl.enabled.protocols\f[R] (STRING, +no default value) +.IP \[bu] 2 +\f[CR]jmxremote.ssl.need.client.auth\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxre mote.need.client.auth\f[R] (STRING, no +default value) +.IP \[bu] 2 +\f[CR]jmxremote.ssl.config.file\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote. ssl_config_file\f[R] (STRING, no +default value) +.IP \[bu] 2 +\f[CR]jmxremote.autodiscovery\f[R]: (Optional) Sets +\f[CR]com.sun.management.jmxremote.au todiscovery\f[R] (STRING, no +default value) +.IP \[bu] 2 +\f[CR]jdp.port\f[R]: (Optional) Sets +\f[CR]com.sun.management.jdp.port\f[R] (INT, no default value) +.IP \[bu] 2 +\f[CR]jdp.address\f[R]: (Optional) Sets +\f[CR]com.sun.management.jdp.address\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[CR]jdp.source_addr\f[R]: (Optional) Sets +\f[CR]com.sun.management.jdp.source_addr\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[CR]jdp.ttl\f[R]: (Optional) Sets +\f[CR]com.sun.management.jdp.ttl\f[R] (INT, no default value) +.IP \[bu] 2 +\f[CR]jdp.pause\f[R]: (Optional) Sets +\f[CR]com.sun.management.jdp.pause\f[R] (INT, no default value) +.IP \[bu] 2 +\f[CR]jdp.name\f[R]: (Optional) Sets +\f[CR]com.sun.management.jdp.name\f[R] (STRING, no default value) +.RE +.TP +\f[CR]ManagementAgent.start_local\f[R] +Starts the local management agent. +.RS +.PP +Impact: Low \-\-\- no impact +.RE +.TP +\f[CR]ManagementAgent.status\f[R] +Print the management agent status. +.RS +.PP +Impact: Low \-\-\- no impact +.RE +.TP +\f[CR]ManagementAgent.stop\f[R] +Stops the remote management agent. +.RS +.PP +Impact: Low \-\-\- no impact +.RE +.TP +\f[CR]System.dump_map\f[R] [\f[I]options\f[R]] (Linux only) +Dumps an annotated process memory map to an output file. +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-H\f[R]: (Optional) Human readable format (BOOLEAN, false) +.IP \[bu] 2 +\f[CR]\-F\f[R]: (Optional) File path. +If %p is specified in the filename, it is expanded to the JVM\[aq]s PID. +(FILE, \[dq]vm_memory_map_%p.txt\[dq]) +.RE +.TP +\f[CR]System.map\f[R] [\f[I]options\f[R]] (Linux only) +Prints an annotated process memory map of the VM process. +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-H\f[R]: (Optional) Human readable format (BOOLEAN, false) +.RE +.TP +\f[CR]System.native_heap_info\f[R] (Linux only) +Attempts to output information regarding native heap usage through +malloc_info(3). +If unsuccessful outputs \[dq]Error: \[dq] and a reason. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]System.trim_native_heap\f[R] (Linux only) +Attempts to free up memory by trimming the C\-heap. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]Thread.dump_to_file\f[R] [\f[I]options\f[R]] \f[I]filepath\f[R] +Dump threads, with stack traces, to a file in plain text or JSON format. +.RS +.PP +Impact: Medium: Depends on the number of threads. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-overwrite\f[R]: (Optional) May overwrite existing file (BOOLEAN, +false) +.IP \[bu] 2 +\f[CR]\-format\f[R]: (Optional) Output format (\[dq]plain\[dq] or +\[dq]json\[dq]) (STRING, plain) +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]filepath\f[R]: The file path to the output file. +If %p is specified in the filename, it is expanded to the JVM\[aq]s PID. +(FILE, no default value) +.RE +.TP +\f[CR]Thread.print\f[R] [\f[I]options\f[R]] +Prints all threads with stacktraces. +.RS +.PP +Impact: Medium \-\-\- depends on the number of threads. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-e\f[R]: (Optional) Print extended thread information (BOOLEAN, +false) +.IP \[bu] 2 +\f[CR]\-l\f[R]: (Optional) Prints \f[CR]java.util.concurrent\f[R] locks +(BOOLEAN, false) +.RE +.TP +\f[CR]Thread.vthread_scheduler\f[R] +Print the virtual thread scheduler, and the delayed task schedulers that +support virtual threads doing timed operations. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]Thread.vthread_pollers\f[R] +Print the I/O pollers that support virtual threads doing blocking +network I/O operations. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]VM.cds\f[R] [\f[I]arguments\f[R]] +Dump a static or dynamic shared archive that includes all currently +loaded classes. +.RS +.PP +Impact: Medium \-\-\- pause time depends on number of loaded classes +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]subcmd\f[R]: must be either \f[CR]static_dump\f[R] or +\f[CR]dynamic_dump\f[R] (STRING, no default value) +.IP \[bu] 2 +\f[I]filename\f[R]: (Optional) Name of the shared archive to be dumped. +If %p is specified in the filename, it is expanded to the JVM\[aq]s PID. +(FILE, \[dq]java_pid%p_<subcmd>.jsa\[dq]) +.PP +If \f[CR]dynamic_dump\f[R] is specified, the target JVM must be started +with the JVM option \f[CR]\-XX:+RecordDynamicDumpInfo\f[R]. +.RE +.TP +\f[CR]VM.class_hierarchy\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +Print a list of all loaded classes, indented to show the class +hierarchy. +The name of each class is followed by the ClassLoaderData* of its +ClassLoader, or \[dq]null\[dq] if it is loaded by the bootstrap class +loader. +.RS +.PP +Impact: Medium \-\-\- depends on the number of loaded classes. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-i\f[R]: (Optional) Inherited interfaces should be printed. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]\-s\f[R]: (Optional) If a classname is specified, print its +subclasses in addition to its superclasses. +Without this option only the superclasses will be printed. +(BOOLEAN, false) +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]classname\f[R]: (Optional) The name of the class whose hierarchy +should be printed. +If not specified, all class hierarchies are printed. +(STRING, no default value) +.RE +.TP +\f[CR]VM.classes\f[R] [\f[I]options\f[R]] +Print all loaded classes +.RS +.PP +Impact: Medium: Depends on number of loaded classes. +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-verbose\f[R]: (Optional) Dump the detailed content of a Java +class. +Some classes are annotated with flags: \f[CR]F\f[R] = has, or inherits, +a non\-empty finalize method, \f[CR]f\f[R] = has final method, +\f[CR]W\f[R] = methods rewritten, \f[CR]C\f[R] = marked with +\f[CR]\[at]Contended\f[R] annotation, \f[CR]R\f[R] = has been redefined, +\f[CR]S\f[R] = is shared class (BOOLEAN, false) +.RE +.TP +\f[CR]VM.classloader_stats\f[R] +Print statistics about all ClassLoaders. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]VM.classloaders\f[R] [\f[I]options\f[R]] +Prints classloader hierarchy. +.RS +.PP +Impact: Medium \-\-\- Depends on number of class loaders and classes +loaded. +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]show\-classes\f[R]: (Optional) Print loaded classes. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]verbose\f[R]: (Optional) Print detailed information. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]fold\f[R]: (Optional) Show loaders of the same name and class as +one. +(BOOLEAN, true) +.RE +.TP +\f[CR]VM.command_line\f[R] +Print the command line used to start this VM instance. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]VM.dynlibs\f[R] +Print loaded dynamic libraries. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]VM.events\f[R] [\f[I]options\f[R]] +Print VM event logs +.RS +.PP +Impact: Low \-\-\- Depends on event log size. +.PP +\f[I]options\f[R]: +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.IP \[bu] 2 +\f[CR]log\f[R]: (Optional) Name of log to be printed. +If omitted, all logs are printed. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]max\f[R]: (Optional) Maximum number of events to be printed +(newest first). +If omitted or zero, all events are printed. +(INT, 0) +.RE +.TP +\f[CR]VM.flags\f[R] [\f[I]options\f[R]] +Print the VM flag options and their current values. +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-all\f[R]: (Optional) Prints all flags supported by the VM +(BOOLEAN, false). +.RE +.TP +\f[CR]VM.info\f[R] +Print information about the JVM environment and status. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]VM.log\f[R] [\f[I]options\f[R]] +Lists current log configuration, enables/disables/configures a log +output, or rotates all logs. +.RS +.PP +Impact: Low +.PP +\f[I]options\f[R]: +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.IP \[bu] 2 +\f[CR]output\f[R]: (Optional) The name or index (#) of output to +configure. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]output_options\f[R]: (Optional) Options for the output. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]what\f[R]: (Optional) Configures what tags to log. +(STRING, no default value ) +.IP \[bu] 2 +\f[CR]decorators\f[R]: (Optional) Configures which decorators to use. +Use \[aq]none\[aq] or an empty value to remove all. +(STRING, no default value) +.IP \[bu] 2 +\f[CR]disable\f[R]: (Optional) Turns off all logging and clears the log +configuration. +(BOOLEAN, no default value) +.IP \[bu] 2 +\f[CR]list\f[R]: (Optional) Lists current log configuration. +(BOOLEAN, no default value) +.IP \[bu] 2 +\f[CR]rotate\f[R]: (Optional) Rotates all logs. +(BOOLEAN, no default value) +.RE +.TP +\f[CR]VM.metaspace\f[R] [\f[I]options\f[R]] +Prints the statistics for the metaspace +.RS +.PP +Impact: Medium \-\-\- Depends on number of classes loaded. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]basic\f[R]: (Optional) Prints a basic summary (does not need a +safepoint). +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]show\-loaders\f[R]: (Optional) Shows usage by class loader. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]show\-classes\f[R]: (Optional) If show\-loaders is set, shows +loaded classes for each loader. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]by\-chunktype\f[R]: (Optional) Break down numbers by chunk type. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]by\-spacetype\f[R]: (Optional) Break down numbers by loader type. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]vslist\f[R]: (Optional) Shows details about the underlying virtual +space. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]chunkfreelist\f[R]: (Optional) Shows details about global chunk +free lists (ChunkManager). +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]scale\f[R]: (Optional) Memory usage in which to scale. +Valid values are: 1, KB, MB or GB (fixed scale) or \[dq]dynamic\[dq] for +a dynamically chosen scale. +(STRING, dynamic) +.RE +.TP +\f[CR]VM.native_memory\f[R] [\f[I]options\f[R]] +Print native memory usage +.RS +.PP +Impact: Medium +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]summary\f[R]: (Optional) Requests runtime to report current memory +summary, which includes total reserved and committed memory, along with +memory usage summary by each subsystem. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]detail\f[R]: (Optional) Requests runtime to report memory +allocation >= 1K by each callsite. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]baseline\f[R]: (Optional) Requests runtime to baseline current +memory usage, so it can be compared against in later time. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]summary.diff\f[R]: (Optional) Requests runtime to report memory +summary comparison against previous baseline. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]detail.diff\f[R]: (Optional) Requests runtime to report memory +detail comparison against previous baseline, which shows the memory +allocation activities at different callsites. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]statistics\f[R]: (Optional) Prints tracker statistics for tuning +purpose. +(BOOLEAN, false) +.IP \[bu] 2 +\f[CR]scale\f[R]: (Optional) Memory usage in which scale, KB, MB or GB +(STRING, KB) +.RE +.TP +\f[CR]VM.set_flag\f[R] [\f[I]arguments\f[R]] +Sets VM flag option using the provided value. +.RS +.PP +Impact: Low +.PP +\f[I]arguments\f[R]: +.IP \[bu] 2 +\f[I]flag name\f[R]: The name of the flag that you want to set (STRING, +no default value) +.IP \[bu] 2 +\f[I]string value\f[R]: (Optional) The value that you want to set +(STRING, no default value) +.RE +.TP +\f[CR]VM.stringtable\f[R] [\f[I]options\f[R]] +Dump string table. +.RS +.PP +Impact: Medium \-\-\- depends on the Java content. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-verbose\f[R]: (Optional) Dumps the content of each string in the +table (BOOLEAN, false) +.RE +.TP +\f[CR]VM.symboltable\f[R] [\f[I]options\f[R]] +Dump symbol table. +.RS +.PP +Impact: Medium \-\-\- depends on the Java content. +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax). +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-verbose\f[R]: (Optional) Dumps the content of each symbol in the +table (BOOLEAN, false) +.RE +.TP +\f[CR]VM.system_properties\f[R] +Print system properties. +.RS +.PP +Impact: Low +.RE +.TP +\f[CR]VM.systemdictionary\f[R] +Prints the statistics for dictionary hashtable sizes and bucket length. +.RS +.PP +Impact: Medium +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]verbose\f[R]: (Optional) Dump the content of each dictionary entry +for all class loaders (BOOLEAN, false) . +.RE +.TP +\f[CR]VM.uptime\f[R] [\f[I]options\f[R]] +Print VM uptime. +.RS +.PP +Impact: Low +.PP +\f[B]Note:\f[R] +.PP +The following \f[I]options\f[R] must be specified using either +\f[I]key\f[R] or \f[I]key\f[R]\f[CR]=\f[R]\f[I]value\f[R] syntax. +.PP +\f[I]options\f[R]: +.IP \[bu] 2 +\f[CR]\-date\f[R]: (Optional) Adds a prefix with the current date +(BOOLEAN, false) +.RE +.TP +\f[CR]VM.version\f[R] +Print JVM version information. +.RS +.PP +Impact: Low +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jconsole.1 openjdk-25-25.0.3+9/debian/man/jconsole.1 --- openjdk-25-25.0.2+10/debian/man/jconsole.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jconsole.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,66 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JCONSOLE" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jconsole \- start a graphical console to monitor and manage Java +applications +.SH SYNOPSIS +\f[CR]jconsole\f[R] [\f[CR]\-interval=\f[R]\f[I]n\f[R]] +[\f[CR]\-notile\f[R]] [\f[CR]\-plugin\f[R] \f[I]path\f[R]] +[\f[CR]\-version\f[R]] [\f[I]connection\f[R] ... +] [\f[CR]\-J\f[R]\f[I]input_arguments\f[R]] +.PP +\f[CR]jconsole\f[R] \f[CR]\-help\f[R] +.SH OPTIONS +.TP +\f[CR]\-interval\f[R] +Sets the update interval to \f[CR]n\f[R] seconds (default is 4 seconds). +.TP +\f[CR]\-notile\f[R] +Doesn\[aq]t tile the windows for two or more connections. +.TP +\f[CR]\-pluginpath\f[R] \f[I]path\f[R] +Specifies the path that \f[CR]jconsole\f[R] uses to look up plug\-ins. +The plug\-in \f[I]path\f[R] should contain a provider\-configuration +file named +\f[CR]META\-INF/services/com.sun.tools.jconsole.JConsolePlugin\f[R] that +contains one line for each plug\-in. +The line specifies the fully qualified class name of the class +implementing the \f[CR]com.sun.tools.jconsole.JConsolePlugin\f[R] class. +.TP +\f[CR]\-version\f[R] +Prints the program version. +.TP +\f[I]connection\f[R] = \f[I]pid\f[R] | \f[I]host\f[R]\f[CR]:\f[R]\f[I]port\f[R] | \f[I]jmxURL\f[R] +A connection is described by either \f[I]pid\f[R], +\f[I]host\f[R]\f[CR]:\f[R]\f[I]port\f[R] or \f[I]jmxURL\f[R]. +.RS +.IP \[bu] 2 +The \f[I]pid\f[R] value is the process ID of a target process. +The JVM must be running with the same user ID as the user ID running the +\f[CR]jconsole\f[R] command. +.IP \[bu] 2 +The \f[I]host\f[R]\f[CR]:\f[R]\f[I]port\f[R] values are the name of the +host system on which the JVM is running, and the port number specified +by the system property \f[CR]com.sun.management.jmxremote.port\f[R] when +the JVM was started. +.IP \[bu] 2 +The \f[I]jmxUrl\f[R] value is the address of the JMX agent to be +connected to as described in JMXServiceURL. +.RE +.TP +\f[CR]\-J\f[R]\f[I]input_arguments\f[R] +Passes \f[I]input_arguments\f[R] to the JVM on which the +\f[CR]jconsole\f[R] command is run. +.TP +\f[CR]\-help\f[R] or \f[CR]\-\-help\f[R] +Displays the help message for the command. +.SH DESCRIPTION +The \f[CR]jconsole\f[R] command starts a graphical console tool that +lets you monitor and manage Java applications and virtual machines on a +local or remote machine. +.PP +On Windows, the \f[CR]jconsole\f[R] command doesn\[aq]t associate with a +console window. +It does, however, display a dialog box with error information when the +\f[CR]jconsole\f[R] command fails. diff -Nru openjdk-25-25.0.2+10/debian/man/jdb.1 openjdk-25-25.0.3+9/debian/man/jdb.1 --- openjdk-25-25.0.2+10/debian/man/jdb.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jdb.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,233 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JDB" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jdb \- find and fix bugs in Java platform programs +.SH SYNOPSIS +\f[CR]jdb\f[R] [\f[I]options\f[R]] [\f[I]classname\f[R]] +[\f[I]arguments\f[R]] +.TP +\f[I]options\f[R] +This represents the \f[CR]jdb\f[R] command\-line options. +See \f[B]Options for the jdb command\f[R]. +.TP +\f[I]classname\f[R] +This represents the name of the main class to debug. +.TP +\f[I]arguments\f[R] +This represents the arguments that are passed to the \f[CR]main()\f[R] +method of the class. +.SH DESCRIPTION +The Java Debugger (JDB) is a simple command\-line debugger for Java +classes. +The \f[CR]jdb\f[R] command and its options call the JDB. +The \f[CR]jdb\f[R] command demonstrates the Java Platform Debugger +Architecture and provides inspection and debugging of a local or remote +JVM. +.SH START A JDB SESSION +There are many ways to start a JDB session. +The most frequently used way is to have the JDB launch a new JVM with +the main class of the application to be debugged. +Do this by substituting the \f[CR]jdb\f[R] command for the +\f[CR]java\f[R] command in the command line. +For example, if your application\[aq]s main class is \f[CR]MyClass\f[R], +then use the following command to debug it under the JDB: +.RS +.PP +\f[CR]jdb MyClass\f[R] +.RE +.PP +When started this way, the \f[CR]jdb\f[R] command calls a second JVM +with the specified parameters, loads the specified class, and stops the +JVM before executing that class\[aq]s first instruction. +.PP +Another way to use the \f[CR]jdb\f[R] command is by attaching it to a +JVM that\[aq]s already running. +Syntax for starting a JVM to which the \f[CR]jdb\f[R] command attaches +when the JVM is running is as follows. +This loads in\-process debugging libraries and specifies the kind of +connection to be made. +.RS +.PP +\f[CR]java \-agentlib:jdwp=transport=dt_socket,server=y,suspend=n MyClass\f[R] +.RE +.PP +You can then attach the \f[CR]jdb\f[R] command to the JVM with the +following command: +.RS +.PP +\f[CR]jdb \-attach 8000\f[R] +.RE +.PP +8000 is the address of the running JVM. +.PP +The \f[CR]MyClass\f[R] argument isn\[aq]t specified in the +\f[CR]jdb\f[R] command line in this case because the \f[CR]jdb\f[R] +command is connecting to an existing JVM instead of launching a new JVM. +.PP +There are many other ways to connect the debugger to a JVM, and all of +them are supported by the \f[CR]jdb\f[R] command. +The Java Platform Debugger Architecture has additional documentation on +these connection options. +.SH BREAKPOINTS +Breakpoints can be set in the JDB at line numbers or at the first +instruction of a method, for example: +.IP \[bu] 2 +The command \f[CR]stop at MyClass:22\f[R] sets a breakpoint at the first +instruction for line 22 of the source file containing +\f[CR]MyClass\f[R]. +.IP \[bu] 2 +The command \f[CR]stop in java.lang.String.length\f[R] sets a breakpoint +at the beginning of the method \f[CR]java.lang.String.length\f[R]. +.IP \[bu] 2 +The command \f[CR]stop in MyClass.<clinit>\f[R] uses \f[CR]<clinit>\f[R] +to identify the static initialization code for \f[CR]MyClass\f[R]. +.PP +When a method is overloaded, you must also specify its argument types so +that the proper method can be selected for a breakpoint. +For example, \f[CR]MyClass.myMethod(int,java.lang.String)\f[R] or +\f[CR]MyClass.myMethod()\f[R]. +.PP +The \f[CR]clear\f[R] command removes breakpoints using the following +syntax: \f[CR]clear MyClass:45\f[R]. +Using the \f[CR]clear\f[R] or \f[CR]stop\f[R] command with no argument +displays a list of all breakpoints currently set. +The \f[CR]cont\f[R] command continues execution. +.SH STEPPING +The \f[CR]step\f[R] command advances execution to the next line whether +it\[aq]s in the current stack frame or a called method. +The \f[CR]next\f[R] command advances execution to the next line in the +current stack frame. +.SH EXCEPTIONS +When an exception occurs for which there isn\[aq]t a \f[CR]catch\f[R] +statement anywhere in the throwing thread\[aq]s call stack, the JVM +typically prints an exception trace and exits. +When running under the JDB, however, control returns to the JDB at the +offending throw. +You can then use the \f[CR]jdb\f[R] command to diagnose the cause of the +exception. +.PP +Use the \f[CR]catch\f[R] command to cause the debugged application to +stop at other thrown exceptions, for example: +\f[CR]catch java.io.FileNotFoundException\f[R] or \f[CR]catch\f[R] +\f[CR]mypackage.BigTroubleException\f[R]. +Any exception that\[aq]s an instance of the specified class or subclass +stops the application at the point where the exception is thrown. +.PP +The \f[CR]ignore\f[R] command negates the effect of an earlier +\f[CR]catch\f[R] command. +The \f[CR]ignore\f[R] command doesn\[aq]t cause the debugged JVM to +ignore specific exceptions, but only to ignore the debugger. +.SH OPTIONS FOR THE JDB COMMAND +When you use the \f[CR]jdb\f[R] command instead of the \f[CR]java\f[R] +command on the command line, the \f[CR]jdb\f[R] command accepts many of +the same options as the \f[CR]java\f[R] command. +.PP +The following options are accepted by the \f[CR]jdb\f[R] command: +.TP +\f[CR]\-help\f[R] +Displays a help message. +.TP +\f[CR]\-sourcepath\f[R] \f[I]dir1\f[R]\f[CR]:\f[R]\f[I]dir2\f[R]\f[CR]:\f[R]... +Uses the specified path to search for source files in the specified +path. +If this option is not specified, then use the default path of dot +(\f[CR].\f[R]). +.TP +\f[CR]\-attach\f[R] \f[I]address\f[R] +Attaches the debugger to a running JVM with the default connection +mechanism. +.TP +\f[CR]\-listen\f[R] \f[I]address\f[R] +Waits for a running JVM to connect to the specified address with a +standard connector. +.TP +\f[CR]\-listenany\f[R] +Waits for a running JVM to connect at any available address using a +standard connector. +.TP +\f[CR]\-launch\f[R] +Starts the debugged application immediately upon startup of the +\f[CR]jdb\f[R] command. +The \f[CR]\-launch\f[R] option removes the need for the \f[CR]run\f[R] +command. +The debugged application is launched and then stopped just before the +initial application class is loaded. +At that point, you can set any necessary breakpoints and use the +\f[CR]cont\f[R] command to continue execution. +.TP +\f[CR]\-listconnectors\f[R] +Lists the connectors available in this JVM. +.TP +\f[CR]\-connect\f[R] \f[I]connector\-name\f[R]\f[CR]:\f[R]\f[I]name1\f[R]\f[CR]=\f[R]\f[I]value1\f[R].... +Connects to the target JVM with the named connector and listed argument +values. +.TP +\f[CR]\-dbgtrace\f[R] [\f[I]flags\f[R]] +Prints information for debugging the \f[CR]jdb\f[R] command. +.TP +\f[CR]\-tclient\f[R] +Runs the application in the Java HotSpot VM client. +.TP +\f[CR]\-trackallthreads\f[R] +Track all threads as they are created, including virtual threads. +See \f[B]Working With Virtual Threads\f[R] below. +.TP +\f[CR]\-tserver\f[R] +Runs the application in the Java HotSpot VM server. +.TP +\f[CR]\-J\f[R]\f[I]option\f[R] +Passes \f[I]option\f[R] to the JDB JVM, where option is one of the +options described on the reference page for the Java application +launcher. +For example, \f[CR]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R]. +.PP +The following options are forwarded to the debuggee process: +.TP +\f[CR]\-R\f[R]\f[I]option\f[R] +Passes \f[I]option\f[R] to the debuggee JVM, where option is one of the +options described on the reference page for the Java application +launcher. +For example, \f[CR]\-R\-Xms48m\f[R] sets the startup memory to 48 MB. +See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R]. +.TP +\f[CR]\-v\f[R] or \f[CR]\-verbose\f[R][\f[CR]:\f[R]\f[I]class\f[R]|\f[CR]gc\f[R]|\f[CR]jni\f[R]] +Turns on the verbose mode. +.TP +\f[CR]\-D\f[R]\f[I]name\f[R]\f[CR]=\f[R]\f[I]value\f[R] +Sets a system property. +.TP +\f[CR]\-classpath\f[R] \f[I]dir\f[R] +Lists directories separated by colons in which to look for classes. +.TP +\f[CR]\-X\f[R] \f[I]option\f[R] +A nonstandard target JVM option. +.PP +Other options are supported to provide alternate mechanisms for +connecting the debugger to the JVM that it\[aq]s to debug. +.SH WORKING WITH VIRTUAL THREADS +Often virtual theads are created in such large numbers and frequency +that they can overwhelm a debugger. +For this reason by default JDB does not keep track of virtual threads as +they are created. +It will only keep track of virtual threads that an event has arrived on, +such as a breakpoint event. +The \f[CR]\-trackallthreads\f[R] option can be used to make JDB track +all virtual threads as they are created. +.PP +When JDB first connects, it requests a list of all known threads from +the Debug Agent. +By default the debug agent does not return any virtual threads in this +list, once again because the list could be so large that it overwhelms +the debugger. +The Debug Agent has an \f[CR]includevirtualthreads\f[R] option that can +be enabled to change this behavior so all known virtual threads will be +included in the list. +The JDB \f[CR]\-trackallthreads\f[R] option will cause JDB to +automatically enable the Debug Agent\[aq]s +\f[CR]includevirtualthreads\f[R] option when JDB launches an application +to debug. +However, keep in mind that the Debug Agent may not know about any +virtual threads that were created before JDB attached to the debugged +application. diff -Nru openjdk-25-25.0.2+10/debian/man/jdeprscan.1 openjdk-25-25.0.3+9/debian/man/jdeprscan.1 --- openjdk-25-25.0.2+10/debian/man/jdeprscan.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jdeprscan.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,218 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JDEPRSCAN" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jdeprscan \- static analysis tool that scans a jar file (or some other +aggregation of class files) for uses of deprecated API elements +.SH SYNOPSIS +\f[CR]jdeprscan\f[R] [\f[I]options\f[R]] +{\f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R]} +.TP +\f[I]options\f[R] +See \f[B]Options for the jdeprscan Command\f[R] +.TP +\f[I]dir\f[R]|\f[I]jar\f[R]|\f[I]class\f[R] +\f[CR]jdeprscan\f[R] command scans each argument for usages of +deprecated APIs. +The arguments can be a: +.RS +.IP \[bu] 2 +\f[I]dir\f[R]: Directory +.IP \[bu] 2 +\f[I]jar\f[R]: JAR file +.IP \[bu] 2 +\f[I]class\f[R]: Class name or class file +.PP +The class name should use a dot (\f[CR].\f[R]) as a separator. +For example: +.PP +\f[CR]java.lang.Thread\f[R] +.PP +For nested classes, the dollar sign \f[CR]$\f[R] separator character +should be used. +For example: +.PP +\f[CR]java.lang.Thread$State\f[R] +.PP +A class file can also be named. +For example: +.PP +\f[CR]build/classes/java/lang/Thread$State.class\f[R] +.RE +.SH DESCRIPTION +The \f[CR]jdeprscan\f[R] tool is a static analysis tool provided by the +JDK that scans a JAR file or some other aggregation of class files for +uses of deprecated API elements. +The deprecated APIs identified by the \f[CR]jdeprscan\f[R] tool are only +those that are defined by Java SE. +Deprecated APIs defined by third\-party libraries aren\[aq]t reported. +.PP +To scan a JAR file or a set of class files, you must first ensure that +all of the classes that the scanned classes depend upon are present in +the class path. +Set the class path using the \f[CR]\-\-class\-path\f[R] option described +in \f[B]Options for the jdeprscan Command\f[R]. +Typically, you would use the same class path as the one that you use +when invoking your application. +.PP +If the \f[CR]jdeprscan\f[R] can\[aq]t find all the dependent classes, it +will generate an error message for each class that\[aq]s missing. +These error messages are typically of the form: +.RS +.PP +\f[CR]error: cannot find class ...\f[R] +.RE +.PP +If these errors occur, then you must adjust the class path so that it +includes all dependent classes. +.SH OPTIONS FOR THE JDEPRSCAN COMMAND +The following options are available: +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Provides a search path for resolution of dependent classes. +.RS +.PP +\f[I]path\f[R] can be a search path that consists of one or more +directories separated by the system\-specific path separator. +For example: +.IP \[bu] 2 +\f[B]Linux and macOS:\f[R] +.RS 2 +.RS +.PP +\f[CR]\-\-class\-path /some/directory:/another/different/dir\f[R] +.RE +.RE +.PP +\f[B]Note:\f[R] +.PP +On Windows, use a semicolon (\f[CR];\f[R]) as the separator instead of a +colon (\f[CR]:\f[R]). +.IP \[bu] 2 +\f[B]Windows:\f[R] +.RS 2 +.RS +.PP +\f[CR]\-\-class\-path \[rs]some\[rs]directory;\[rs]another\[rs]different\[rs]dir\f[R] +.RE +.RE +.RE +.TP +\f[CR]\-\-for\-removal\f[R] +Limits scanning or listing to APIs that are deprecated for removal. +Can\[aq]t be used with a release value of 6, 7, or 8. +.TP +\f[CR]\-\-full\-version\f[R] +Prints out the full version string of the tool. +.TP +\f[CR]\-\-help\f[R] or \f[CR]\-h\f[R] +Prints out a full help message. +.TP +\f[CR]\-\-list\f[R] or \f[CR]\-l\f[R] +Prints the set of deprecated APIs. +No scanning is done, so no directory, jar, or class arguments should be +provided. +.TP +\f[CR]\-\-release\f[R] \f[CR]6\f[R]|\f[CR]7\f[R]|\f[CR]8\f[R]|\f[CR]9\f[R] +Specifies the Java SE release that provides the set of deprecated APIs +for scanning. +.TP +\f[CR]\-\-verbose\f[R] or \f[CR]\-v\f[R] +Enables additional message output during processing. +.TP +\f[CR]\-\-version\f[R] +Prints out the abbreviated version string of the tool. +.SH EXAMPLE OF JDEPRSCAN OUTPUT +The JAR file for this library will be named something similar to +\f[CR]commons\-math3\-3.6.1.jar\f[R]. +To scan this JAR file for the use of deprecated APIs, run the following +command: +.RS +.PP +\f[CR]jdeprscan commons\-math3\-3.6.1.jar\f[R] +.RE +.PP +This command produces several lines of output. +For example, one line of output might be: +.IP +.EX +class org/apache/commons/math3/util/MathUtils uses deprecated method java/lang/Double::<init>(D)V +.EE +.PP +\f[B]Note:\f[R] +.PP +The class name is specified using the slash\-separated binary name as +described in JVMS 4.2.1. +This is the form used internally in class files. +.PP +The deprecated API it uses is a method on the +\f[CR]java.lang.Double\f[R] class. +.PP +The name of the deprecated method is \f[CR]<init>\f[R], which is a +special name that means that the method is actually a constructor. +Another special name is \f[CR]<clinit>\f[R], which indicates a class +static initializer. +.PP +Other methods are listed just by their method name. +Following the method name is the argument list and return type: +.RS +.PP +\f[CR](D)V\f[R] +.RE +.PP +This indicates that it takes just one double value (a primitive) and +returns void. +The argument and return types can become cryptic. +For example, another line of output might be: +.IP +.EX +class org/apache/commons/math3/util/Precision uses deprecated method java/math/BigDecimal::setScale(II)Ljava/math/BigDecimal; +.EE +.PP +In this line of output, the deprecated method is on class +\f[CR]java.math.BigDecimal\f[R], and the method is +\f[CR]setScale()\f[R]. +In this case, the \f[CR](II)\f[R] means that it takes two \f[CR]int\f[R] +arguments. +The \f[CR]Ljava/math/BigDecimal;\f[R] after the parentheses means that +it returns a reference to \f[CR]java.math.BigDecimal\f[R]. +.SH JDEPRSCAN ANALYSIS CAN BE VERSION\-SPECIFIC +You can use \f[CR]jdeprscan\f[R] relative to the previous three JDK +releases. +For example, if you are running JDK 9, then you can check against JDK 8, +7, and 6. +.PP +As an example, look at this code snippet: +.IP +.EX +public class Deprecations { + SecurityManager sm = new RMISecurityManager(); // deprecated in 8 + Boolean b2 = new Boolean(true); // deprecated in 9 +} +.EE +.PP +The complete class compiles without warnings in JDK 7. +.PP +If you run \f[CR]jdeprscan\f[R] on a system with JDK 9, then you see: +.IP +.EX +$ jdeprscan \-\-class\-path classes \-\-release 7 example.Deprecations +(no output) +.EE +.PP +Run \f[CR]jdeprscan\f[R] with a release value of 8: +.IP +.EX +$ jdeprscan \-\-class\-path classes \-\-release 8 example.Deprecations +class example/Deprecations uses type java/rmi/RMISecurityManager deprecated +class example/Deprecations uses method in type java/rmi/RMISecurityManager deprecated +.EE +.PP +Run \f[CR]jdeprscan\f[R] on JDK 9: +.IP +.EX +$ jdeprscan \-\-class\-path classes example.Deprecations +class example/Deprecations uses type java/rmi/RMISecurityManager deprecated +class example/Deprecations uses method in type java/rmi/RMISecurityManager deprecated +class example/Deprecations uses method java/lang/Boolean <init> (Z)V deprecated +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jdeps.1 openjdk-25-25.0.3+9/debian/man/jdeps.1 --- openjdk-25-25.0.2+10/debian/man/jdeps.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jdeps.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,293 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JDEPS" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jdeps \- launch the Java class dependency analyzer +.SH SYNOPSIS +\f[CR]jdeps\f[R] [\f[I]options\f[R]] \f[I]path\f[R] ... +.TP +\f[I]options\f[R] +Command\-line options. +For detailed descriptions of the options that can be used, see +.RS +.IP \[bu] 2 +\f[B]Possible Options\f[R] +.IP \[bu] 2 +\f[B]Module Dependence Analysis Options\f[R] +.IP \[bu] 2 +\f[B]Options to Filter Dependences\f[R] +.IP \[bu] 2 +\f[B]Options to Filter Classes to be Analyzed\f[R] +.RE +.TP +\f[I]path\f[R] +A pathname to the \f[CR].class\f[R] file, directory, or JAR file to +analyze. +.SH DESCRIPTION +The \f[CR]jdeps\f[R] command shows the package\-level or class\-level +dependencies of Java class files. +The input class can be a path name to a \f[CR].class\f[R] file, a +directory, a JAR file, or it can be a fully qualified class name to +analyze all class files. +The options determine the output. +By default, the \f[CR]jdeps\f[R] command writes the dependencies to the +system output. +The command can generate the dependencies in DOT language (see the +\f[CR]\-dotoutput\f[R] option). +.SH POSSIBLE OPTIONS +.TP +\f[CR]\-?\f[R] or \f[CR]\-h\f[R] or \f[CR]\-\-help\f[R] +Prints the help message. +.TP +\f[CR]\-dotoutput\f[R] \f[I]dir\f[R] or \f[CR]\-\-dot\-output\f[R] \f[I]dir\f[R] +Specifies the destination directory for DOT file output. +If this option is specified, then the \f[CR]jdeps\f[R]command generates +one \f[CR].dot\f[R] file for each analyzed archive named +\f[CR]archive\-file\-name.dot\f[R] that lists the dependencies, and also +a summary file named \f[CR]summary.dot\f[R] that lists the dependencies +among the archive files. +.TP +\f[CR]\-s\f[R] or \f[CR]\-summary\f[R] +Prints a dependency summary only. +.TP +\f[CR]\-v\f[R] or \f[CR]\-verbose\f[R] +Prints all class\-level dependencies. +This is equivalent to +.RS +.RS +.PP +\f[CR]\-verbose:class \-filter:none\f[R] +.RE +.RE +.TP +\f[CR]\-verbose:package\f[R] +Prints package\-level dependencies excluding, by default, dependences +within the same package. +.TP +\f[CR]\-verbose:class\f[R] +Prints class\-level dependencies excluding, by default, dependencies +within the same archive. +.TP +\f[CR]\-apionly\f[R] or \f[CR]\-\-api\-only\f[R] +Restricts the analysis to APIs, for example, dependences from the +signature of \f[CR]public\f[R] and \f[CR]protected\f[R] members of +public classes including field type, method parameter types, returned +type, and checked exception types. +.TP +\f[CR]\-jdkinternals\f[R] or \f[CR]\-\-jdk\-internals\f[R] +Finds class\-level dependences in the JDK internal APIs. +By default, this option analyzes all classes specified in the +\f[CR]\-\-classpath\f[R] option and input files unless you specified the +\f[CR]\-include\f[R] option. +You can\[aq]t use this option with the \f[CR]\-p\f[R], \f[CR]\-e\f[R], +and \f[CR]\-s\f[R] options. +.RS +.PP +\f[B]Warning\f[R]: The JDK internal APIs are inaccessible. +.RE +.TP +\f[CR]\-cp\f[R] \f[I]path\f[R], \f[CR]\-classpath\f[R] \f[I]path\f[R], or \f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Specifies where to find class files. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]module\-path\f[R] +Specifies the module path. +.TP +\f[CR]\-\-upgrade\-module\-path\f[R] \f[I]module\-path\f[R] +Specifies the upgrade module path. +.TP +\f[CR]\-\-system\f[R] \f[I]java\-home\f[R] +Specifies an alternate system module path. +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\-name\f[R][\f[CR],\f[R] \f[I]module\-name\f[R]...] +Adds modules to the root set for analysis. +.TP +\f[CR]\-\-multi\-release\f[R] \f[I]version\f[R] +Specifies the version when processing multi\-release JAR files. +\f[I]version\f[R] should be an integer >=9 or base. +.TP +\f[CR]\-q\f[R] or \f[CR]\-quiet\f[R] +Doesn\[aq]t show missing dependencies from +\f[CR]\-generate\-module\-info\f[R] output. +.TP +\f[CR]\-version\f[R] or \f[CR]\-\-version\f[R] +Prints version information. +.SH MODULE DEPENDENCE ANALYSIS OPTIONS +.TP +\f[CR]\-m\f[R] \f[I]module\-name\f[R] or \f[CR]\-\-module\f[R] \f[I]module\-name\f[R] +Specifies the root module for analysis. +.TP +\f[CR]\-\-generate\-module\-info\f[R] \f[I]dir\f[R] +Generates \f[CR]module\-info.java\f[R] under the specified directory. +The specified JAR files will be analyzed. +This option cannot be used with \f[CR]\-\-dot\-output\f[R] or +\f[CR]\-\-class\-path\f[R] options. +Use the \f[CR]\-\-generate\-open\-module\f[R] option for open modules. +.TP +\f[CR]\-\-generate\-open\-module\f[R] \f[I]dir\f[R] +Generates \f[CR]module\-info.java\f[R] for the specified JAR files under +the specified directory as open modules. +This option cannot be used with the \f[CR]\-\-dot\-output\f[R] or +\f[CR]\-\-class\-path\f[R] options. +.TP +\f[CR]\-\-check\f[R] \f[I]module\-name\f[R] [\f[CR],\f[R] \f[I]module\-name\f[R]...] +Analyzes the dependence of the specified modules. +It prints the module descriptor, the resulting module dependences after +analysis and the graph after transition reduction. +It also identifies any unused qualified exports. +.TP +\f[CR]\-\-list\-deps\f[R] +Lists the module dependences and also the package names of JDK internal +APIs (if referenced). +This option transitively analyzes libraries on class path and module +path if referenced. +Use \f[CR]\-\-no\-recursive\f[R] option for non\-transitive dependency +analysis. +.TP +\f[CR]\-\-list\-reduced\-deps\f[R] +Same as \f[CR]\-\-list\-deps\f[R] without listing the implied reads +edges from the module graph. +If module M1 reads M2, and M2 requires transitive on M3, then M1 reading +M3 is implied and is not shown in the graph. +.TP +\f[CR]\-\-print\-module\-deps\f[R] +Same as \f[CR]\-\-list\-reduced\-deps\f[R] with printing a +comma\-separated list of module dependences. +The output can be used by \f[CR]jlink \-\-add\-modules\f[R] to create a +custom image that contains those modules and their transitive +dependences. +.TP +\f[CR]\-\-ignore\-missing\-deps\f[R] +Ignore missing dependences. +.SH OPTIONS TO FILTER DEPENDENCES +.TP +\f[CR]\-p\f[R] \f[I]pkg_name\f[R], \f[CR]\-package\f[R] \f[I]pkg_name\f[R], or \f[CR]\-\-package\f[R] \f[I]pkg_name\f[R] +Finds dependences matching the specified package name. +You can specify this option multiple times for different packages. +The \f[CR]\-p\f[R] and \f[CR]\-e\f[R] options are mutually exclusive. +.TP +\f[CR]\-e\f[R] \f[I]regex\f[R], \f[CR]\-regex\f[R] \f[I]regex\f[R], or \f[CR]\-\-regex\f[R] \f[I]regex\f[R] +Finds dependences matching the specified pattern. +The \f[CR]\-p\f[R] and \f[CR]\-e\f[R] options are mutually exclusive. +.TP +\f[CR]\-\-require\f[R] \f[I]module\-name\f[R] +Finds dependences matching the given module name (may be given multiple +times). +The \f[CR]\-\-package\f[R], \f[CR]\-\-regex\f[R], and +\f[CR]\-\-require\f[R] options are mutually exclusive. +.TP +\f[CR]\-f\f[R] \f[I]regex\f[R] or \f[CR]\-filter\f[R] \f[I]regex\f[R] +Filters dependences matching the given pattern. +If give multiple times, the last one will be selected. +.TP +\f[CR]\-filter:package\f[R] +Filters dependences within the same package. +This is the default. +.TP +\f[CR]\-filter:archive\f[R] +Filters dependences within the same archive. +.TP +\f[CR]\-filter:module\f[R] +Filters dependences within the same module. +.TP +\f[CR]\-filter:none\f[R] +No \f[CR]\-filter:package\f[R] and \f[CR]\-filter:archive\f[R] +filtering. +Filtering specified via the \f[CR]\-filter\f[R] option still applies. +.TP +\f[CR]\-\-missing\-deps\f[R] +Finds missing dependences. +This option cannot be used with \f[CR]\-p\f[R], \f[CR]\-e\f[R] and +\f[CR]\-s\f[R] options. +.SH OPTIONS TO FILTER CLASSES TO BE ANALYZED +.TP +\f[CR]\-include\f[R] \f[I]regex\f[R] +Restricts analysis to the classes matching pattern. +This option filters the list of classes to be analyzed. +It can be used together with \f[CR]\-p\f[R] and \f[CR]\-e\f[R], which +apply the pattern to the dependencies. +.TP +\f[CR]\-R\f[R] or \f[CR]\-\-recursive\f[R] +Recursively traverses all run\-time dependences. +The \f[CR]\-R\f[R] option implies \f[CR]\-filter:none\f[R]. +If \f[CR]\-p\f[R], \f[CR]\-e\f[R], or \f[CR]\-f\f[R] options are +specified, only the matching dependences are analyzed. +.TP +\f[CR]\-\-no\-recursive\f[R] +Do not recursively traverse dependences. +.TP +\f[CR]\-I\f[R] or \f[CR]\-\-inverse\f[R] +Analyzes the dependences per other given options and then finds all +artifacts that directly and indirectly depend on the matching nodes. +This is equivalent to the inverse of the compile\-time view analysis and +the print dependency summary. +This option must be used with the \f[CR]\-\-require\f[R], +\f[CR]\-\-package\f[R], or \f[CR]\-\-regex\f[R] options. +.TP +\f[CR]\-\-compile\-time\f[R] +Analyzes the compile\-time view of transitive dependencies, such as the +compile\-time view of the \f[CR]\-R\f[R] option. +Analyzes the dependences per other specified options. +If a dependency is found from a directory, a JAR file or a module, all +classes in that containing archive are analyzed. +.SH EXAMPLE OF ANALYZING DEPENDENCIES +The following example demonstrates analyzing the dependencies of the +\f[CR]Notepad.jar\f[R] file. +.PP +\f[B]Linux and macOS:\f[R] +.IP +.EX +$ jdeps demo/jfc/Notepad/Notepad.jar +Notepad.jar \-> java.base +Notepad.jar \-> java.desktop +Notepad.jar \-> java.logging + <unnamed> (Notepad.jar) + \-> java.awt + \-> java.awt.event + \-> java.beans + \-> java.io + \-> java.lang + \-> java.net + \-> java.util + \-> java.util.logging + \-> javax.swing + \-> javax.swing.border + \-> javax.swing.event + \-> javax.swing.text + \-> javax.swing.tree + \-> javax.swing.undo +.EE +.PP +\f[B]Windows:\f[R] +.IP +.EX +C:\[rs]Java\[rs]jdk1.9.0>jdeps demo\[rs]jfc\[rs]Notepad\[rs]Notepad.jar +Notepad.jar \-> java.base +Notepad.jar \-> java.desktop +Notepad.jar \-> java.logging + <unnamed> (Notepad.jar) + \-> java.awt + \-> java.awt.event + \-> java.beans + \-> java.io + \-> java.lang + \-> java.net + \-> java.util + \-> java.util.logging + \-> javax.swing + \-> javax.swing.border + \-> javax.swing.event + \-> javax.swing.text + \-> javax.swing.tree + \-> javax.swing.undo +.EE +.SH EXAMPLE USING THE \-\-INVERSE OPTION +.IP +.EX + $ jdeps \-\-inverse \-\-require java.xml.bind +Inverse transitive dependences on [java.xml.bind] +java.xml.bind <\- java.se.ee +java.xml.bind <\- jdk.xml.ws +java.xml.bind <\- java.xml.ws <\- java.se.ee +java.xml.bind <\- java.xml.ws <\- jdk.xml.ws +java.xml.bind <\- jdk.xml.bind <\- jdk.xml.ws +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jfr.1 openjdk-25-25.0.3+9/debian/man/jfr.1 --- openjdk-25-25.0.2+10/debian/man/jfr.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jfr.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,396 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JFR" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jfr \- print and manipulate Flight Recorder files +.SH SYNOPSIS +To print the contents of a flight recording to standard out: +.PP +\f[CR]jfr\f[R] \f[CR]print\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +.PP +To display aggregated event data on standard out: +.PP +\f[CR]jfr\f[R] \f[CR]view\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +.PP +To configure a .jfc settings file: +.PP +\f[CR]jfr\f[R] \f[CR]configure\f[R] [\f[I]options\f[R]] +.PP +To print metadata information about flight recording events: +.PP +\f[CR]jfr\f[R] \f[CR]metadata\f[R] [\f[I]file\f[R]] +.PP +To view the summary statistics for a flight recording file: +.PP +\f[CR]jfr\f[R] \f[CR]summary\f[R] \f[I]file\f[R] +.PP +To remove events from a flight recording file: +.PP +\f[CR]jfr\f[R] \f[CR]scrub\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +.PP +To assemble chunk files into a flight recording file: +.PP +\f[CR]jfr\f[R] \f[CR]assemble\f[R] \f[I]repository\f[R] \f[I]file\f[R] +.PP +To disassemble a flight recording file into chunk files: +.PP +\f[CR]jfr\f[R] \f[CR]disassmble\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +.TP +\f[I]options\f[R] +Optional: Specifies command\-line options separated by spaces. +See the individual subcomponent sections for descriptions of the +available options. +.TP +\f[I]file\f[R] +Specifies the name of the target flight recording file +(\f[CR].jfr\f[R]). +.TP +\f[I]repository\f[R] +Specifies the location of the chunk files which are to be assembled into +a flight recording. +.SH DESCRIPTION +The \f[CR]jfr\f[R] command provides a tool for interacting with flight +recorder files (\f[CR].jfr\f[R]). +The main function is to filter, summarize and output flight recording +files into human readable format. +There is also support for scrubbing, merging and splitting recording +files. +.PP +Flight recording files are created and saved as binary formatted files. +Having a tool that can extract the contents from a flight recording and +manipulate the contents and translate them into human readable format +helps developers to debug performance issues with Java applications. +.SS Subcommands +The \f[CR]jfr\f[R] command has several subcommands: +.IP \[bu] 2 +\f[CR]print\f[R] +.IP \[bu] 2 +\f[CR]view\f[R] +.IP \[bu] 2 +\f[CR]configure\f[R] +.IP \[bu] 2 +\f[CR]metadata\f[R] +.IP \[bu] 2 +\f[CR]summary\f[R] +.IP \[bu] 2 +\f[CR]scrub\f[R] +.IP \[bu] 2 +\f[CR]assemble\f[R] +.IP \[bu] 2 +\f[CR]disassemble\f[R] +.SS \f[CR]jfr print\f[R] subcommand +Use \f[CR]jfr print\f[R] to print the contents of a flight recording +file to standard out. +.PP +The syntax is: +.PP +\f[CR]jfr print\f[R] +[\f[CR]\-\-xml\f[R]|\f[CR]\-\-json\f[R]|\f[CR]\-\-exact\f[R]] +[\f[CR]\-\-categories\f[R] <\f[I]filters\f[R]>] [\f[CR]\-\-events\f[R] +<\f[I]filters\f[R]>] [\f[CR]\-\-stack\-depth\f[R] <\f[I]depth\f[R]>] +<\f[I]file\f[R]> +.PP +where: +.TP +\f[CR]\-\-xml\f[R] +Print the recording in XML format. +.TP +\f[CR]\-\-json\f[R] +Print the recording in JSON format. +.TP +\f[CR]\-\-exact\f[R] +Pretty\-print numbers and timestamps with full precision. +.TP +\f[CR]\-\-categories\f[R] <\f[I]filters\f[R]> +Select events matching a category name. +The filter is a comma\-separated list of names, simple and/or qualified, +and/or quoted glob patterns. +.TP +\f[CR]\-\-events\f[R] <\f[I]filters\f[R]> +Select events matching an event name. +The filter is a comma\-separated list of names, simple and/or qualified, +and/or quoted glob patterns. +.TP +\f[CR]\-\-stack\-depth\f[R] <\f[I]depth\f[R]> +Number of frames in stack traces, by default 5. +.TP +<\f[I]file\f[R]> +Location of the recording file (\f[CR].jfr\f[R]) +.PP +The default format for printing the contents of the flight recording +file is human readable form unless either \f[CR]xml\f[R] or +\f[CR]json\f[R] is specified. +These options provide machine\-readable output that can be further +parsed or processed by user created scripts. +.PP +Use \f[CR]jfr \-\-help print\f[R] to see example usage of filters. +.PP +To reduce the amount of data displayed, it is possible to filter out +events or categories of events. +The filter operates on the symbolic name of an event, set by using the +\f[CR]\[at]Name\f[R] annotation, or the category name, set by using the +\f[CR]\[at]Category\f[R] annotation. +If multiple filters are used, events from both filters will be included. +If no filter is used, all the events will be printed. +If a combination of a category filter and event filter is used, the +selected events will be the union of the two filters. +.PP +For example, to show all GC events and the CPULoad event, the following +command could be used: +.PP +\f[CR]jfr print \-\-categories GC \-\-events CPULoad recording.jfr\f[R] +.PP +Event values are formatted according to the content types that are being +used. +For example, a field with the \f[CR]jdk.jfr.Percentage\f[R] annotation +that has the value 0.52 is formatted as 52%. +.PP +Stack traces are by default truncated to 5 frames, but the number can be +increased/decreased using the \f[CR]\-\-stack\-depth\f[R] command\-line +option. +.SS \f[CR]jfr view\f[R] subcommand +Use \f[CR]jfr view\f[R] to aggregate and display event data on standard +out. +.PP +The syntax is: +.PP +\f[CR]jfr view\f[R] [\f[CR]\-\-verbose\f[R]] [\f[CR]\-\-width\f[R] +<\f[I]integer\f[R]>] [\f[CR]\-\-truncate\f[R] <\f[I]mode\f[R]>] +[\f[CR]\-\-cell\-height\f[R] <\f[I]integer\f[R]>] <\f[I]view\f[R]> +<\f[I]file\f[R]> +.PP +where: +.TP +\f[CR]\-\-verbose\f[R] +Displays the query that makes up the view. +.TP +\f[CR]\-\-width\f[R] <\f[I]integer\f[R]> +The width of the view in characters. +Default value depends on the view. +.TP +\f[CR]\-\-truncate\f[R] <\f[I]mode\f[R]> +How to truncate content that exceeds space in a table cell. +Mode can be \[aq]beginning\[aq] or \[aq]end\[aq]. +Default value is \[aq]end\[aq]. +.TP +\f[CR]\-\-cell\-height\f[R] <\f[I]integer\f[R]> +Maximum number of rows in a table cell. +Default value depends on the view. +.TP +<\f[I]view\f[R]> +Name of the view or event type to display. +Use \f[CR]jfr \-\-help view\f[R] to see a list of available views. +.TP +<\f[I]file\f[R]> +Location of the recording file (.jfr) +.PP +The <\f[I]view\f[R]> parameter can be an event type name. +Use the \f[CR]jfr view types <file>\f[R] to see a list. +To display all views, use \f[CR]jfr view all\-views <file>\f[R]. +To display all events, use \f[CR]jfr view all\-events <file>\f[R]. +.SS \f[CR]jfr configure\f[R] subcommand +Use \f[CR]jfr configure\f[R] to configure a .jfc settings file. +.PP +The syntax is: +.PP +\f[CR]jfr configure\f[R] [\-\-interactive] [\-\-verbose] [\-\-input +<files>] [\-\-output <file>] [option=value]* [event\-setting=value]* +.TP +\f[CR]\-\-interactive\f[R] +Interactive mode where the configuration is determined by a set of +questions. +.TP +\f[CR]\-\-verbose\f[R] +Displays the modified settings. +.TP +\f[CR]\-\-input\f[R] <\f[I]files\f[R]> +A comma\-separated list of .jfc files from which the new configuration +is based. +If no file is specified, the default file in the JDK is used +(default.jfc). +If \[aq]none\[aq] is specified, the new configuration starts empty. +.TP +\f[CR]\-\-output\f[R] <\f[I]file\f[R]> +The filename of the generated output file. +If not specified, the filename custom.jfc will be used. +.TP +\f[I]option=value\f[R] +The option value to modify. +To see available options, use \f[CR]jfr help configure\f[R] +.TP +\f[I]event\-setting=value\f[R] +The event setting value to modify. +Use the form: +<\f[I]event\-name\f[R]>#<\f[I]setting\-name\f[R]>=<\f[I]value\f[R]> To +add a new event setting, prefix the event name with \[aq]+\[aq]. +.PP +The whitespace delimiter can be omitted for timespan values, i.e. +20ms. +For more information about the settings syntax, see Javadoc of the +jdk.jfr package. +.SS \f[CR]jfr metadata\f[R] subcommand +Use \f[CR]jfr metadata\f[R] to display information about events, such as +event names, categories and field layout within a flight recording file. +.PP +The syntax is: +.PP +\f[CR]jfr metadata\f[R] [\-\-categories <filter>] [\-\-events <filter>] +[<file>] +.TP +\f[CR]\-\-categories\f[R] <\f[I]filter\f[R]> +Select events matching a category name. +The filter is a comma\-separated list of names, simple and/or qualified, +and/or quoted glob patterns. +.TP +\f[CR]\-\-events\f[R] <\f[I]filter\f[R]> +Select events matching an event name. +The filter is a comma\-separated list of names, simple and/or qualified, +and/or quoted glob patterns. +.TP +<\f[I]file\f[R]> +Location of the recording file (.jfr) +.PP +If the <file> parameter is omitted, metadata from the JDK where the +\[aq]jfr\[aq] tool is located will be used. +.SS \f[CR]jfr summary\f[R] subcommand +Use \f[CR]jfr summary\f[R] to print statistics for a recording. +For example, a summary can illustrate the number of recorded events and +how much disk space they used. +This is useful for troubleshooting and understanding the impact of event +settings. +.PP +The syntax is: +.PP +\f[CR]jfr summary\f[R] <\f[I]file\f[R]> +.PP +where: +.TP +<\f[I]file\f[R]> +Location of the flight recording file (\f[CR].jfr\f[R]) +.SS \f[CR]jfr scrub\f[R] subcommand +Use \f[CR]jfr scrub\f[R] to remove sensitive contents from a file or to +reduce its size. +.PP +The syntax is: +.PP +\f[CR]jfr scrub\f[R] [\-\-include\-events <\f[I]filter\f[R]>] +[\-\-exclude\-events <\f[I]filter\f[R]>] [\-\-include\-categories +<\f[I]filter\f[R]>] [\-\-exclude\-categories <\f[I]filter\f[R]>] +[\-\-include\-threads <\f[I]filter\f[R]>] [\-\-exclude\-threads +<\f[I]filter\f[R]>] <\f[I]input\-file\f[R]> [<\f[I]output\-file\f[R]>] +.TP +\f[CR]\-\-include\-events\f[R] <\f[I]filter\f[R]> +Select events matching an event name. +.TP +\f[CR]\-\-exclude\-events\f[R] <\f[I]filter\f[R]> +Exclude events matching an event name. +.TP +\f[CR]\-\-include\-categories\f[R] <\f[I]filter\f[R]> +Select events matching a category name. +.TP +\f[CR]\-\-exclude\-categories\f[R] <\f[I]filter\f[R]> +Exclude events matching a category name. +.TP +\f[CR]\-\-include\-threads\f[R] <\f[I]filter\f[R]> +Select events matching a thread name. +.TP +\f[CR]\-\-exclude\-threads\f[R] <\f[I]filter\f[R]> +Exclude events matching a thread name. +.TP +<\f[I]input\-file\f[R]> +The input file to read events from. +.TP +<\f[I]output\-file\f[R]> +The output file to write filter events to. +If no file is specified, it will be written to the same path as the +input file, but with \[dq]\-scrubbed\[dq] appended to the filename. +.PP +The filter is a comma\-separated list of names, simple and/or qualified, +and/or quoted glob patterns. +If multiple filters are used, they are applied in the specified order. +.SS \f[CR]jfr assemble\f[R] subcommand +Use jfr \f[CR]assemble\f[R] to assemble chunk files into a recording +file. +.PP +The syntax is: +.PP +\f[CR]jfr assemble\f[R] <\f[I]repository\f[R]> <\f[I]file\f[R]> +.PP +where: +.TP +<\f[I]repository\f[R]> +Directory where the repository containing chunk files is located. +.TP +<\f[I]file\f[R]> +Location of the flight recording file (\f[CR].jfr\f[R]). +.PP +Flight recording information is written in chunks. +A chunk contains all of the information necessary for parsing. +A chunk typically contains events useful for troubleshooting. +If a JVM should crash, these chunks can be recovered and used to create +a flight recording file using this \f[CR]jfr assemble\f[R] command. +These chunk files are concatenated in chronological order and chunk +files that are not finished (.part) are excluded. +.SS \f[CR]jfr disassemble\f[R] subcommand +Use \f[CR]jfr disassemble\f[R] to decompose a flight recording file into +its chunk file pieces. +.PP +The syntax is: +.PP +\f[CR]jfr disassemble\f[R] [\f[CR]\-\-max\-chunks\f[R] +<\f[I]chunks\f[R]>] [\f[CR]\-\-output\f[R] <\f[I]directory\f[R]>] +<\f[I]file\f[R]> +.PP +where: +.TP +\f[CR]\-\-output\f[R] <\f[I]directory\f[R]> +The location to write the disassembled file, by default the current +directory +.TP +\f[CR]\-\-max\-chunks\f[R] <\f[I]chunks\f[R]> +Maximum number of chunks per file, by default 5. +The chunk size varies, but is typically around 15 MB. +.TP +\f[CR]\-\-max\-size\f[R] <\f[I]size\f[R]> +Maximum number of bytes per file. +.TP +<\f[I]file\f[R]> +Location of the flight recording file (\f[CR].jfr\f[R]) +.PP +This function can be useful for repairing a broken file by removing the +faulty chunk. +It can also be used to reduce the size of a file that is too large to +transfer. +The resulting chunk files are named \f[CR]myfile_1.jfr\f[R], +\f[CR]myfile_2.jfr\f[R], etc. +If needed, the resulting file names will be padded with zeros to +preserve chronological order. +For example, the chunk file name is \f[CR]myfile_001.jfr\f[R] if the +recording consists of more than 100 chunks. +.SS jfr version and help subcommands +Use \f[CR]jfr \-\-version\f[R] or \f[CR]jfr version\f[R] to view the +version string information for this jfr command. +.PP +To get help on any of the jfr subcommands, use: +.PP +\f[CR]jfr <\-\-help|help>\f[R] [\f[I]subcommand\f[R]] +.PP +where: +.PP +[\f[I]subcommand\f[R]] is any of: +.IP \[bu] 2 +\f[CR]print\f[R] +.IP \[bu] 2 +\f[CR]view\f[R] +.IP \[bu] 2 +\f[CR]configure\f[R] +.IP \[bu] 2 +\f[CR]metadata\f[R] +.IP \[bu] 2 +\f[CR]summary\f[R] +.IP \[bu] 2 +\f[CR]scrub\f[R] +.IP \[bu] 2 +\f[CR]assemble\f[R] +.IP \[bu] 2 +\f[CR]disassemble\f[R] diff -Nru openjdk-25-25.0.2+10/debian/man/jhsdb.1 openjdk-25-25.0.3+9/debian/man/jhsdb.1 --- openjdk-25-25.0.2+10/debian/man/jhsdb.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jhsdb.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,179 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JHSDB" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jhsdb \- attach to a Java process or launch a postmortem debugger to +analyze the content of a core dump from a crashed Java Virtual Machine +(JVM) +.SH SYNOPSIS +\f[B]WARNING:\f[R] The \f[CR]debugd\f[R] subcommand and +\f[CR]\-\-connect\f[R] options are deprecated. +They will be removed in a future release. +.PP +\f[CR]jhsdb\f[R] \f[CR]clhsdb\f[R] [\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R]] +.PP +\f[CR]jhsdb\f[R] \f[CR]hsdb\f[R] [\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R]] +.PP +\f[CR]jhsdb\f[R] \f[CR]debugd\f[R] (\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R]) [\f[I]options\f[R]] +.PP +\f[CR]jhsdb\f[R] \f[CR]jstack\f[R] (\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R] | \f[CR]\-\-connect\f[R] +\f[I][server\-id\[at]]debugd\-host\f[R]) [\f[I]options\f[R]] +.PP +\f[CR]jhsdb\f[R] \f[CR]jmap\f[R] (\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R] | \f[CR]\-\-connect\f[R] +\f[I][server\-id\[at]]debugd\-host\f[R]) [\f[I]options\f[R]] +.PP +\f[CR]jhsdb\f[R] \f[CR]jinfo\f[R] (\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R] | \f[CR]\-\-connect\f[R] +\f[I][server\-id\[at]]debugd\-host\f[R]) [\f[I]options\f[R]] +.PP +\f[CR]jhsdb\f[R] \f[CR]jsnap\f[R] (\f[CR]\-\-pid\f[R] \f[I]pid\f[R] | +\f[CR]\-\-exe\f[R] \f[I]executable\f[R] \f[CR]\-\-core\f[R] +\f[I]coredump\f[R] | \f[CR]\-\-connect\f[R] +\f[I][server\-id\[at]]debugd\-host\f[R]) [\f[I]options\f[R]] +.TP +\f[I]pid\f[R] +The process ID to which the \f[CR]jhsdb\f[R] tool should attach. +The process must be a Java process. +To get a list of Java processes running on a machine, use the +\f[CR]ps\f[R] command or, if the JVM processes are not running in a +separate docker instance, the \f[B]jps\f[R] command. +.TP +\f[I]executable\f[R] +The Java executable file from which the core dump was produced. +.TP +\f[I]coredump\f[R] +The core file to which the \f[CR]jhsdb\f[R] tool should attach. +.TP +\f[I][server\-id\[at]]debugd\-host\f[R] +An optional server ID and the address of the remote debug server +(debugd). +.TP +\f[I]options\f[R] +The command\-line options for a \f[CR]jhsdb\f[R] mode. +See \f[B]Options for the debugd Mode\f[R], \f[B]Options for the jstack +Mode\f[R], \f[B]Options for the jmap Mode\f[R], \f[B]Options for the +jinfo Mode\f[R], and \f[B]Options for the jsnap Mode\f[R]. +.PP +\f[B]Note:\f[R] +.PP +Either the \f[I]pid\f[R] or the pair of \f[I]executable\f[R] and +\f[I]core\f[R] files or the \f[I][server\-id\[at]]debugd\-host\f[R] must +be provided for \f[CR]debugd\f[R], \f[CR]jstack\f[R], \f[CR]jmap\f[R], +\f[CR]jinfo\f[R] and \f[CR]jsnap\f[R] modes. +.SH DESCRIPTION +You can use the \f[CR]jhsdb\f[R] tool to attach to a Java process or to +launch a postmortem debugger to analyze the content of a core\-dump from +a crashed Java Virtual Machine (JVM). +This command is experimental and unsupported. +.PP +\f[B]Note:\f[R] +.PP +Attaching the \f[CR]jhsdb\f[R] tool to a live process will cause the +process to hang and the process will probably crash when the debugger +detaches. +.PP +The \f[CR]jhsdb\f[R] tool can be launched in any one of the following +modes: +.TP +\f[CR]jhsdb clhsdb\f[R] +Starts the interactive command\-line debugger. +.TP +\f[CR]jhsdb hsdb\f[R] +Starts the interactive GUI debugger. +.TP +\f[CR]jhsdb debugd\f[R] +Starts the remote debug server. +.TP +\f[CR]jhsdb jstack\f[R] +Prints stack and locks information. +.TP +\f[CR]jhsdb jmap\f[R] +Prints heap information. +.TP +\f[CR]jhsdb jinfo\f[R] +Prints basic JVM information. +.TP +\f[CR]jhsdb jsnap\f[R] +Prints performance counter information. +.TP +\f[CR]jhsdb\f[R] \f[I]command\f[R] \f[CR]\-\-help\f[R] +Displays the options available for the \f[I]command\f[R]. +.SH OPTIONS FOR THE DEBUGD MODE +.TP +\f[CR]\-\-serverid\f[R] \f[I]server\-id\f[R] +An optional unique ID for this debug server. +This is required if multiple debug servers are run on the same machine. +.TP +\f[CR]\-\-rmiport\f[R] \f[I]port\f[R] +Sets the port number to which the RMI connector is bound. +If not specified a random available port is used. +.TP +\f[CR]\-\-registryport\f[R] \f[I]port\f[R] +Sets the RMI registry port. +This option overrides the system property +\[aq]sun.jvm.hotspot.rmi.port\[aq]. +If not specified, the system property is used. +If the system property is not set, the default port 1099 is used. +.TP +\f[CR]\-\-hostname\f[R] \f[I]hostname\f[R] +Sets the hostname the RMI connector is bound. +The value could be a hostname or an IPv4/IPv6 address. +This option overrides the system property +\[aq]java.rmi.server.hostname\[aq]. +If not specified, the system property is used. +If the system property is not set, a system hostname is used. +.SH OPTIONS FOR THE JINFO MODE +.TP +\f[CR]\-\-flags\f[R] +Prints the VM flags. +.TP +\f[CR]\-\-sysprops\f[R] +Prints the Java system properties. +.TP +no option +Prints the VM flags and the Java system properties. +.SH OPTIONS FOR THE JMAP MODE +.TP +no option +Prints the same information as Solaris \f[CR]pmap\f[R]. +.TP +\f[CR]\-\-heap\f[R] +Prints the \f[CR]java\f[R] heap summary. +.TP +\f[CR]\-\-binaryheap\f[R] +Dumps the \f[CR]java\f[R] heap in \f[CR]hprof\f[R] binary format. +.TP +\f[CR]\-\-dumpfile\f[R] \f[I]name\f[R] +The name of the dumpfile. +.TP +\f[CR]\-\-histo\f[R] +Prints the histogram of \f[CR]java\f[R] object heap. +.TP +\f[CR]\-\-clstats\f[R] +Prints the class loader statistics. +.TP +\f[CR]\-\-finalizerinfo\f[R] +Prints the information on objects awaiting finalization. +.SH OPTIONS FOR THE JSTACK MODE +.TP +\f[CR]\-\-locks\f[R] +Prints the \f[CR]java.util.concurrent\f[R] locks information. +.TP +\f[CR]\-\-mixed\f[R] +Attempts to print both \f[CR]java\f[R] and native frames if the platform +allows it. +.SH OPTIONS FOR THE JSNAP MODE +.TP +\f[CR]\-\-all\f[R] +Prints all performance counters. diff -Nru openjdk-25-25.0.2+10/debian/man/jinfo.1 openjdk-25-25.0.3+9/debian/man/jinfo.1 --- openjdk-25-25.0.2+10/debian/man/jinfo.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jinfo.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,63 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JINFO" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jinfo \- generate Java configuration information for a specified Java +process +.SH SYNOPSIS +\f[B]Note:\f[R] This command is experimental and unsupported. +.PP +\f[CR]jinfo\f[R] [\f[I]option\f[R]] \f[I]pid\f[R] +.TP +\f[I]option\f[R] +This represents the \f[CR]jinfo\f[R] command\-line options. +See \f[B]Options for the jinfo Command\f[R]. +.TP +\f[I]pid\f[R] +The process ID for which the configuration information is to be printed. +The process must be a Java process. +To get a list of Java processes running on a machine, use either the +\f[CR]ps\f[R] command or, if the JVM processes are not running in a +separate docker instance, the \f[B]jps\f[R] command. +.SH DESCRIPTION +The \f[CR]jinfo\f[R] command prints Java configuration information for a +specified Java process. +The configuration information includes Java system properties and JVM +command\-line flags. +If the specified process is running on a 64\-bit JVM, then you might +need to specify the \f[CR]\-J\-d64\f[R] option, for example: +.RS +.PP +\f[CR]jinfo \-J\-d64 \-sysprops\f[R] \f[I]pid\f[R] +.RE +.PP +This command is unsupported and might not be available in future +releases of the JDK. +In Windows Systems where \f[CR]dbgeng.dll\f[R] is not present, the +Debugging Tools for Windows must be installed to have these tools work. +The \f[CR]PATH\f[R] environment variable should contain the location of +the \f[CR]jvm.dll\f[R] that\[aq]s used by the target process or the +location from which the core dump file was produced. +.SH OPTIONS FOR THE JINFO COMMAND +\f[B]Note:\f[R] +.PP +If none of the following options are used, both the command\-line flags +and the system property name\-value pairs are printed. +.TP +\f[CR]\-flag\f[R] \f[I]name\f[R] +Prints the name and value of the specified command\-line flag. +.TP +\f[CR]\-flag\f[R] [\f[CR]+\f[R]|\f[CR]\-\f[R]]\f[I]name\f[R] +Enables or disables the specified Boolean command\-line flag. +.TP +\f[CR]\-flag\f[R] \f[I]name\f[R]\f[CR]=\f[R]\f[I]value\f[R] +Sets the specified command\-line flag to the specified value. +.TP +\f[CR]\-flags\f[R] +Prints command\-line flags passed to the JVM. +.TP +\f[CR]\-sysprops\f[R] +Prints Java system properties as name\-value pairs. +.TP +\f[CR]\-h\f[R] or \f[CR]\-help\f[R] +Prints a help message. diff -Nru openjdk-25-25.0.2+10/debian/man/jlink.1 openjdk-25-25.0.3+9/debian/man/jlink.1 --- openjdk-25-25.0.2+10/debian/man/jlink.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jlink.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,350 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JLINK" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jlink \- assemble and optimize a set of modules and their dependencies +into a custom runtime image +.SH SYNOPSIS +\f[CR]jlink\f[R] [\f[I]options\f[R]] \f[CR]\-\-module\-path\f[R] +\f[I]modulepath\f[R] \f[CR]\-\-add\-modules\f[R] +\f[I]module\f[R][,\f[I]module\f[R]...] +.TP +\f[I]options\f[R] +Command\-line options separated by spaces. +See \f[B]jlink Options\f[R]. +.TP +\f[I]modulepath\f[R] +The path where the \f[CR]jlink\f[R] tool discovers observable modules. +These modules can be modular JAR files, JMOD files, or exploded modules. +.TP +\f[I]module\f[R] +The names of the modules to add to the runtime image. +The \f[CR]jlink\f[R] tool adds these modules and their transitive +dependencies. +.SH DESCRIPTION +The \f[CR]jlink\f[R] tool links a set of modules, along with their +transitive dependences, to create a custom runtime image. +.PP +\f[B]Note:\f[R] +.PP +Developers are responsible for updating their custom runtime images. +.SH JLINK OPTIONS +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]mod\f[R][\f[CR],\f[R]\f[I]mod\f[R]...] +Adds the named modules, \f[I]mod\f[R], to the default set of root +modules. +The default set of root modules is empty. +.TP +\f[CR]\-\-bind\-services\f[R] +Link service provider modules and their dependencies. +.TP +\f[CR]\-c ={0|1|2}\f[R] or \f[CR]\-\-compress={0|1|2}\f[R] +Enable compression of resources: +.RS +.IP \[bu] 2 +\f[CR]0\f[R]: No compression +.IP \[bu] 2 +\f[CR]1\f[R]: Constant string sharing +.IP \[bu] 2 +\f[CR]2\f[R]: ZIP +.RE +.TP +\f[CR]\-\-disable\-plugin\f[R] \f[I]pluginname\f[R] +Disables the specified plug\-in. +See \f[B]jlink Plug\-ins\f[R] for the list of supported plug\-ins. +.TP +\f[CR]\-\-endian\f[R] {\f[CR]little\f[R]|\f[CR]big\f[R]} +Specifies the byte order of the generated image. +The default value is the format of your system\[aq]s architecture. +.TP +\f[CR]\-h\f[R] or \f[CR]\-\-help\f[R] +Prints the help message. +.TP +\f[CR]\-\-ignore\-signing\-information\f[R] +Suppresses a fatal error when signed modular JARs are linked in the +runtime image. +The signature\-related files of the signed modular JARs aren\[aq]t +copied to the runtime image. +.TP +\f[CR]\-\-launcher\f[R] \f[I]command\f[R]\f[CR]=\f[R]\f[I]module\f[R] or \f[CR]\-\-launcher\f[R] \f[I]command\f[R]\f[CR]=\f[R]\f[I]module\f[R]\f[CR]/\f[R]\f[I]main\f[R] +Specifies the launcher command name for the module or the command name +for the module and main class (the module and the main class names are +separated by a slash (\f[CR]/\f[R])). +.TP +\f[CR]\-\-limit\-modules\f[R] \f[I]mod\f[R][\f[CR],\f[R]\f[I]mod\f[R]...] +Limits the universe of observable modules to those in the transitive +closure of the named modules, \f[CR]mod\f[R], plus the main module, if +any, plus any further modules specified in the +\f[CR]\-\-add\-modules\f[R] option. +.TP +\f[CR]\-\-list\-plugins\f[R] +Lists available plug\-ins, which you can access through command\-line +options; see \f[B]jlink Plug\-ins\f[R]. +.TP +\f[CR]\-p\f[R] or \f[CR]\-\-module\-path\f[R] \f[I]modulepath\f[R] +Specifies the module path. +.RS +.PP +If this option is not specified, then the default module path is +\f[CR]$JAVA_HOME/jmods\f[R]. +This directory contains the \f[CR]java.base\f[R] module and the other +standard and JDK modules. +If this option is specified but the \f[CR]java.base\f[R] module cannot +be resolved from it, then the \f[CR]jlink\f[R] command appends +\f[CR]$JAVA_HOME/jmods\f[R] to the module path. +.RE +.TP +\f[CR]\-\-no\-header\-files\f[R] +Excludes header files. +.TP +\f[CR]\-\-no\-man\-pages\f[R] +Excludes man pages. +.TP +\f[CR]\-\-output\f[R] \f[I]path\f[R] +Specifies the location of the generated runtime image. +.TP +\f[CR]\-\-save\-opts\f[R] \f[I]filename\f[R] +Saves \f[CR]jlink\f[R] options in the specified file. +.TP +\f[CR]\-\-suggest\-providers\f[R] [\f[I]name\f[R]\f[CR],\f[R] ...] +Suggest providers that implement the given service types from the module +path. +.TP +\f[CR]\-\-version\f[R] +Prints version information. +.TP +\f[CR]\[at]\f[R]\f[I]filename\f[R] +Reads options from the specified file. +.RS +.PP +An options file is a text file that contains the options and values that +you would typically enter in a command prompt. +Options may appear on one line or on several lines. +You may not specify environment variables for path names. +You may comment out lines by prefixing a hash symbol (\f[CR]#\f[R]) to +the beginning of the line. +.PP +The following is an example of an options file for the \f[CR]jlink\f[R] +command: +.IP +.EX +#Wed Dec 07 00:40:19 EST 2016 +\-\-module\-path mlib +\-\-add\-modules com.greetings +\-\-output greetingsapp +.EE +.RE +.SH JLINK PLUG\-INS +\f[B]Note:\f[R] +.PP +Plug\-ins not listed in this section aren\[aq]t supported and are +subject to change. +.PP +For plug\-in options that require a \f[I]pattern\-list\f[R], the value +is a comma\-separated list of elements, with each element using one the +following forms: +.IP \[bu] 2 +\f[I]glob\-pattern\f[R] +.IP \[bu] 2 +\f[CR]glob:\f[R]\f[I]glob\-pattern\f[R] +.IP \[bu] 2 +\f[CR]regex:\f[R]\f[I]regex\-pattern\f[R] +.IP \[bu] 2 +\f[CR]\[at]\f[R]\f[I]filename\f[R] +.RS 2 +.IP \[bu] 2 +\f[I]filename\f[R] is the name of a file that contains patterns to be +used, one pattern per line. +.RE +.PP +For a complete list of all available plug\-ins, run the command +\f[CR]jlink \-\-list\-plugins\f[R]. +.SS Plugin \f[CR]compress\f[R] +.TP +Options +\f[CR]\-\-compress=\f[R]{\f[CR]0\f[R]|\f[CR]1\f[R]|\f[CR]2\f[R]}[\f[CR]:filter=\f[R]\f[I]pattern\-list\f[R]] +.TP +Description +Compresses all resources in the output image. +.RS +.IP \[bu] 2 +Level 0: No compression +.IP \[bu] 2 +Level 1: Constant string sharing +.IP \[bu] 2 +Level 2: ZIP +.PP +An optional \f[I]pattern\-list\f[R] filter can be specified to list the +pattern of files to include. +.RE +.SS Plugin \f[CR]include\-locales\f[R] +.TP +Options +\f[CR]\-\-include\-locales=\f[R]\f[I]langtag\f[R][\f[CR],\f[R]\f[I]langtag\f[R]]* +.TP +Description +Includes the list of locales where \f[I]langtag\f[R] is a BCP 47 +language tag. +This option supports locale matching as defined in RFC 4647. +Ensure that you add the module jdk.localedata when using this option. +.RS +.PP +Example: +.RS +.PP +\f[CR]\-\-add\-modules jdk.localedata \-\-include\-locales=en,ja,*\-IN\f[R] +.RE +.RE +.SS Plugin \f[CR]order\-resources\f[R] +.TP +Options +\f[CR]\-\-order\-resources=\f[R]\f[I]pattern\-list\f[R] +.TP +Description +Orders the specified paths in priority order. +If \f[CR]\[at]\f[R]\f[I]filename\f[R] is specified, then each line in +\f[I]pattern\-list\f[R] must be an exact match for the paths to be +ordered. +.RS +.PP +Example: +.RS +.PP +\f[CR]\-\-order\-resources=/module\-info.class,\[at]classlist,/java.base/java/lang/\f[R] +.RE +.RE +.SS Plugin \f[CR]strip\-debug\f[R] +.TP +Options +\f[CR]\-\-strip\-debug\f[R] +.TP +Description +Strips debug information from the output image. +.SS Plugin \f[CR]generate\-cds\-archive\f[R] +.TP +Options +\f[CR]\-\-generate\-cds\-archive\f[R] +.TP +Description +Generate CDS archive if the runtime image supports the CDS feature. +.SH JLINK EXAMPLES +The following command creates a runtime image in the directory +\f[CR]greetingsapp\f[R]. +This command links the module \f[CR]com.greetings\f[R], whose module +definition is contained in the directory \f[CR]mlib\f[R]. +.IP +.EX +jlink \-\-module\-path mlib \-\-add\-modules com.greetings \-\-output greetingsapp +.EE +.PP +The following command lists the modules in the runtime image +\f[CR]greetingsapp\f[R]: +.IP +.EX +greetingsapp/bin/java \-\-list\-modules +com.greetings +java.base\[at]11 +java.logging\[at]11 +org.astro\[at]1.0 +.EE +.PP +The following command creates a runtime image in the directory +compressedrt that\[aq]s stripped of debug symbols, uses compression to +reduce space, and includes French language locale information: +.IP +.EX +jlink \-\-add\-modules jdk.localedata \-\-strip\-debug \-\-compress=2 \-\-include\-locales=fr \-\-output compressedrt +.EE +.PP +The following example compares the size of the runtime image +\f[CR]compressedrt\f[R] with \f[CR]fr_rt\f[R], which isn\[aq]t stripped +of debug symbols and doesn\[aq]t use compression: +.IP +.EX +jlink \-\-add\-modules jdk.localedata \-\-include\-locales=fr \-\-output fr_rt + +du \-sh ./compressedrt ./fr_rt +23M ./compressedrt +36M ./fr_rt +.EE +.PP +The following example lists the providers that implement +\f[CR]java.security.Provider\f[R]: +.IP +.EX +jlink \-\-suggest\-providers java.security.Provider + +Suggested providers: + java.naming provides java.security.Provider used by java.base + java.security.jgss provides java.security.Provider used by java.base + java.security.sasl provides java.security.Provider used by java.base + java.smartcardio provides java.security.Provider used by java.base + java.xml.crypto provides java.security.Provider used by java.base + jdk.crypto.cryptoki provides java.security.Provider used by java.base + jdk.crypto.ec provides java.security.Provider used by java.base + jdk.crypto.mscapi provides java.security.Provider used by java.base + jdk.security.jgss provides java.security.Provider used by java.base +.EE +.PP +The following example creates a custom runtime image named +\f[CR]mybuild\f[R] that includes only \f[CR]java.naming\f[R] and +\f[CR]jdk.crypto.cryptoki\f[R] and their dependencies but no other +providers. +Note that these dependencies must exist in the module path: +.IP +.EX +jlink \-\-add\-modules java.naming,jdk.crypto.cryptoki \-\-output mybuild +.EE +.PP +The following command is similar to the one that creates a runtime image +named \f[CR]greetingsapp\f[R], except that it will link the modules +resolved from root modules with service binding; see the +\f[B]\f[CB]Configuration.resolveAndBind\f[B]\f[R] method. +.IP +.EX +jlink \-\-module\-path mlib \-\-add\-modules com.greetings \-\-output greetingsapp \-\-bind\-services +.EE +.PP +The following command lists the modules in the runtime image +greetingsapp created by this command: +.IP +.EX +greetingsapp/bin/java \-\-list\-modules +com.greetings +java.base\[at]11 +java.compiler\[at]11 +java.datatransfer\[at]11 +java.desktop\[at]11 +java.logging\[at]11 +java.management\[at]11 +java.management.rmi\[at]11 +java.naming\[at]11 +java.prefs\[at]11 +java.rmi\[at]11 +java.security.jgss\[at]11 +java.security.sasl\[at]11 +java.smartcardio\[at]11 +java.xml\[at]11 +java.xml.crypto\[at]11 +jdk.accessibility\[at]11 +jdk.charsets\[at]11 +jdk.compiler\[at]11 +jdk.crypto.cryptoki\[at]11 +jdk.crypto.ec\[at]11 +jdk.crypto.mscapi\[at]11 +jdk.internal.opt\[at]11 +jdk.jartool\[at]11 +jdk.javadoc\[at]11 +jdk.jdeps\[at]11 +jdk.jfr\[at]11 +jdk.jlink\[at]11 +jdk.localedata\[at]11 +jdk.management\[at]11 +jdk.management.jfr\[at]11 +jdk.naming.dns\[at]11 +jdk.naming.rmi\[at]11 +jdk.security.auth\[at]11 +jdk.security.jgss\[at]11 +jdk.zipfs\[at]11 +org.astro\[at]1.0 +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jmap.1 openjdk-25-25.0.3+9/debian/man/jmap.1 --- openjdk-25-25.0.2+10/debian/man/jmap.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jmap.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,68 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JMAP" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jmap \- print details of a specified process +.SH SYNOPSIS +\f[B]Note:\f[R] This command is experimental and unsupported. +.PP +\f[CR]jmap\f[R] [\f[I]options\f[R]] \f[I]pid\f[R] +.TP +\f[I]options\f[R] +This represents the \f[CR]jmap\f[R] command\-line options. +See \f[B]Options for the jmap Command\f[R]. +.TP +\f[I]pid\f[R] +The process ID for which the information specified by the +\f[I]options\f[R] is to be printed. +The process must be a Java process. +To get a list of Java processes running on a machine, use either the +\f[CR]ps\f[R] command or, if the JVM processes are not running in a +separate docker instance, the \f[B]jps\f[R] command. +.SH DESCRIPTION +The \f[CR]jmap\f[R] command prints details of a specified running +process. +.PP +\f[B]Note:\f[R] +.PP +This command is unsupported and might not be available in future +releases of the JDK. +On Windows Systems where the \f[CR]dbgeng.dll\f[R] file isn\[aq]t +present, the Debugging Tools for Windows must be installed to make these +tools work. +The \f[CR]PATH\f[R] environment variable should contain the location of +the \f[CR]jvm.dll\f[R] file that\[aq]s used by the target process or the +location from which the core dump file was produced. +.SH OPTIONS FOR THE JMAP COMMAND +.TP +\f[CR]\-clstats\f[R] \f[I]pid\f[R] +Connects to a running process and prints class loader statistics of Java +heap. +.TP +\f[CR]\-finalizerinfo\f[R] \f[I]pid\f[R] +Connects to a running process and prints information on objects awaiting +finalization. +.TP +\f[CR]\-histo\f[R][\f[CR]:live\f[R]] \f[I]pid\f[R] +Connects to a running process and prints a histogram of the Java object +heap. +If the \f[CR]live\f[R] suboption is specified, it then counts only live +objects. +.TP +\f[CR]\-dump:\f[R]\f[I]dump_options\f[R] \f[I]pid\f[R] +Connects to a running process and dumps the Java heap. +The \f[I]dump_options\f[R] include: +.RS +.IP \[bu] 2 +\f[CR]live\f[R] \-\-\- When specified, dumps only the live objects; if +not specified, then dumps all objects in the heap. +.IP \[bu] 2 +\f[CR]format=b\f[R] \-\-\- Dumps the Java heap in \f[CR]hprof\f[R] +binary format +.IP \[bu] 2 +\f[CR]file=\f[R]\f[I]filename\f[R] \-\-\- Dumps the heap to +\f[I]filename\f[R] +.PP +Example: \f[CR]jmap \-dump:live,format=b,file=heap.bin\f[R] +\f[I]pid\f[R] +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jmod.1 openjdk-25-25.0.3+9/debian/man/jmod.1 --- openjdk-25-25.0.2+10/debian/man/jmod.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jmod.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,362 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JMOD" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jmod \- create JMOD files and list the content of existing JMOD files +.SH SYNOPSIS +\f[CR]jmod\f[R] +(\f[CR]create\f[R]|\f[CR]extract\f[R]|\f[CR]list\f[R]|\f[CR]describe\f[R]|\f[CR]hash\f[R]) +[\f[I]options\f[R]] \f[I]jmod\-file\f[R] +.PP +Includes the following: +.PP +\f[B]Main operation modes\f[R] +.TP +\f[CR]create\f[R] +Creates a new JMOD archive file. +.TP +\f[CR]extract\f[R] +Extracts all the files from the JMOD archive file. +.TP +\f[CR]list\f[R] +Prints the names of all the entries. +.TP +\f[CR]describe\f[R] +Prints the module details. +.TP +\f[CR]hash\f[R] +Determines leaf modules and records the hashes of the dependencies that +directly and indirectly require them. +.PP +\f[B]Options\f[R] +.TP +\f[I]options\f[R] +See \f[B]Options for jmod\f[R]. +.PP +\f[B]Required\f[R] +.TP +\f[I]jmod\-file\f[R] +Specifies the name of the JMOD file to create or from which to retrieve +information. +.SH DESCRIPTION +\f[B]Note:\f[R] For most development tasks, including deploying modules +on the module path or publishing them to a Maven repository, continue to +package modules in modular JAR files. +The \f[CR]jmod\f[R] tool is intended for modules that have native +libraries or other configuration files or for modules that you intend to +link, with the \f[B]jlink\f[R] tool, to a runtime image. +.PP +The JMOD file format lets you aggregate files other than +\f[CR].class\f[R] files, metadata, and resources. +This format is transportable but not executable, which means that you +can use it during compile time or link time but not at run time. +.PP +Many \f[CR]jmod\f[R] options involve specifying a path whose contents +are copied into the resulting JMOD files. +These options copy all the contents of the specified path, including +subdirectories and their contents, but exclude files whose names match +the pattern specified by the \f[CR]\-\-exclude\f[R] option. +.PP +With the \f[CR]\-\-hash\-modules\f[R] option or the \f[CR]jmod hash\f[R] +command, you can, in each module\[aq]s descriptor, record hashes of the +content of the modules that are allowed to depend upon it, thus +\[dq]tying\[dq] together these modules. +This enables a package to be exported to one or more specifically\-named +modules and to no others through qualified exports. +The runtime verifies if the recorded hash of a module matches the one +resolved at run time; if not, the runtime returns an error. +.SH OPTIONS FOR JMOD +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Specifies the location of application JAR files or a directory +containing classes to copy into the resulting JMOD file. +.TP +\f[CR]\-\-cmds\f[R] \f[I]path\f[R] +Specifies the location of native commands to copy into the resulting +JMOD file. +.TP +\f[CR]\-\-compress\f[R] \f[I]compress\f[R] +Specifies the compression to use in creating the JMOD file. +The accepted values are \f[CR]zip\-[0\-9]\f[R], where \f[CR]zip\-0\f[R] +provides no compression, and \f[CR]zip\-9\f[R] provides the best +compression. +Default is \f[CR]zip\-6\f[R]. +.TP +\f[CR]\-\-config\f[R] \f[I]path\f[R] +Specifies the location of user\-editable configuration files to copy +into the resulting JMOD file. +.TP +\f[CR]\-\-date\f[R]\f[I]TIMESTAMP\f[R] +The timestamp in ISO\-8601 extended offset date\-time with optional +time\-zone format, to use for the timestamp of the entries, e.g. +\[dq]2022\-02\-12T12:30:00\-05:00\[dq]. +.TP +\f[CR]\-\-dir\f[R] \f[I]path\f[R] +Specifies the location where \f[CR]jmod\f[R] puts extracted files from +the specified JMOD archive. +.TP +\f[CR]\-\-dry\-run\f[R] +Performs a dry run of hash mode. +It identifies leaf modules and their required modules without recording +any hash values. +.TP +\f[CR]\-\-exclude\f[R] \f[I]pattern\-list\f[R] +Excludes files matching the supplied comma\-separated pattern list, each +element using one the following forms: +.RS +.IP \[bu] 2 +\f[I]glob\-pattern\f[R] +.IP \[bu] 2 +\f[CR]glob:\f[R]\f[I]glob\-pattern\f[R] +.IP \[bu] 2 +\f[CR]regex:\f[R]\f[I]regex\-pattern\f[R] +.PP +See the \f[B]\f[CB]FileSystem.getPathMatcher\f[B]\f[R] method for the +syntax of \f[I]glob\-pattern\f[R]. +See the \f[B]\f[CB]Pattern\f[B]\f[R] class for the syntax of +\f[I]regex\-pattern\f[R], which represents a regular expression. +.RE +.TP +\f[CR]\-\-hash\-modules\f[R] \f[I]regex\-pattern\f[R] +Determines the leaf modules and records the hashes of the dependencies +directly and indirectly requiring them, based on the module graph of the +modules matching the given \f[I]regex\-pattern\f[R]. +The hashes are recorded in the JMOD archive file being created, or a +JMOD archive or modular JAR on the module path specified by the +\f[CR]jmod hash\f[R] command. +.TP +\f[CR]\-\-header\-files\f[R] \f[I]path\f[R] +Specifies the location of header files to copy into the resulting JMOD +file. +.TP +\f[CR]\-\-help\f[R] or \f[CR]\-h\f[R] +Prints a usage message. +.TP +\f[CR]\-\-help\-extra\f[R] +Prints help for extra options. +.TP +\f[CR]\-\-legal\-notices\f[R] \f[I]path\f[R] +Specifies the location of legal notices to copy into the resulting JMOD +file. +.TP +\f[CR]\-\-libs\f[R] \f[I]path\f[R] +Specifies location of native libraries to copy into the resulting JMOD +file. +.TP +\f[CR]\-\-main\-class\f[R] \f[I]class\-name\f[R] +Specifies main class to record in the module\-info.class file. +.TP +\f[CR]\-\-man\-pages\f[R] \f[I]path\f[R] +Specifies the location of man pages to copy into the resulting JMOD +file. +.TP +\f[CR]\-\-module\-version\f[R] \f[I]module\-version\f[R] +Specifies the module version to record in the module\-info.class file. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]path\f[R] or \f[CR]\-p\f[R] \f[I]path\f[R] +Specifies the module path. +This option is required if you also specify +\f[CR]\-\-hash\-modules\f[R]. +.TP +\f[CR]\-\-target\-platform\f[R] \f[I]platform\f[R] +Specifies the target platform. +.TP +\f[CR]\-\-version\f[R] +Prints version information of the \f[CR]jmod\f[R] tool. +.TP +\f[CR]\[at]\f[R]\f[I]filename\f[R] +Reads options from the specified file. +.RS +.PP +An options file is a text file that contains the options and values that +you would ordinarily enter in a command prompt. +Options may appear on one line or on several lines. +You may not specify environment variables for path names. +You may comment out lines by prefixinga hash symbol (\f[CR]#\f[R]) to +the beginning of the line. +.PP +The following is an example of an options file for the \f[CR]jmod\f[R] +command: +.IP +.EX +#Wed Dec 07 00:40:19 EST 2016 +create \-\-class\-path mods/com.greetings \-\-module\-path mlib + \-\-cmds commands \-\-config configfiles \-\-header\-files src/h + \-\-libs lib \-\-main\-class com.greetings.Main + \-\-man\-pages man \-\-module\-version 1.0 + \-\-os\-arch \[dq]x86_x64\[dq] \-\-os\-name \[dq]macOS\[dq] + \-\-os\-version \[dq]10.10.5\[dq] greetingsmod +.EE +.RE +.SH EXTRA OPTIONS FOR JMOD +In addition to the options described in \f[B]Options for jmod\f[R], the +following are extra options that can be used with the command. +.TP +\f[CR]\-\-do\-not\-resolve\-by\-default\f[R] +Exclude from the default root set of modules +.TP +\f[CR]\-\-warn\-if\-resolved\f[R] +Hint for a tool to issue a warning if the module is resolved. +One of deprecated, deprecated\-for\-removal, or incubating. +.SH JMOD CREATE EXAMPLE +The following is an example of creating a JMOD file: +.IP +.EX +jmod create \-\-class\-path mods/com.greetings \-\-cmds commands + \-\-config configfiles \-\-header\-files src/h \-\-libs lib + \-\-main\-class com.greetings.Main \-\-man\-pages man \-\-module\-version 1.0 + \-\-os\-arch \[dq]x86_x64\[dq] \-\-os\-name \[dq]macOS\[dq] + \-\-os\-version \[dq]10.10.5\[dq] greetingsmod +.EE +.PP +Create a JMOD file specifying the date for the entries as +\f[CR]2022 March 15 00:00:00\f[R]: +.IP +.EX +jmod create \-\-class\-path build/foo/classes \-\-date 2022\-03\-15T00:00:00Z + jmods/foo1.jmod +.EE +.SH JMOD HASH EXAMPLE +The following example demonstrates what happens when you try to link a +leaf module (in this example, \f[CR]ma\f[R]) with a required module +(\f[CR]mb\f[R]), and the hash value recorded in the required module +doesn\[aq]t match that of the leaf module. +.IP "1." 3 +Create and compile the following \f[CR].java\f[R] files: +.RS 4 +.IP \[bu] 2 +\f[CR]jmodhashex/src/ma/module\-info.java\f[R] +.RS 2 +.IP +.EX +module ma { + requires mb; +} +.EE +.RE +.IP \[bu] 2 +\f[CR]jmodhashex/src/mb/module\-info.java\f[R] +.RS 2 +.IP +.EX +module mb { +} +.EE +.RE +.IP \[bu] 2 +\f[CR]jmodhashex2/src/ma/module\-info.java\f[R] +.RS 2 +.IP +.EX +module ma { + requires mb; +} +.EE +.RE +.IP \[bu] 2 +\f[CR]jmodhashex2/src/mb/module\-info.java\f[R] +.RS 2 +.IP +.EX +module mb { +} +.EE +.RE +.RE +.IP "2." 3 +Create a JMOD archive for each module. +Create the directories \f[CR]jmodhashex/jmods\f[R] and +\f[CR]jmodhashex2/jmods\f[R], and then run the following commands from +the \f[CR]jmodhashex\f[R] directory, then from the +\f[CR]jmodhashex2\f[R] directory: +.RS 4 +.IP \[bu] 2 +\f[CR]jmod create \-\-class\-path mods/ma jmods/ma.jmod\f[R] +.IP \[bu] 2 +\f[CR]jmod create \-\-class\-path mods/mb jmods/mb.jmod\f[R] +.RE +.IP "3." 3 +Optionally preview the \f[CR]jmod hash\f[R] command. +Run the following command from the \f[CR]jmodhashex\f[R] directory: +.RS 4 +.PP +\f[CR]jmod hash \-\-dry\-run \-module\-path jmods \-\-hash\-modules .*\f[R] +.PP +The command prints the following: +.IP +.EX +Dry run: +mb + hashes ma SHA\-256 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a +.EE +.PP +This indicates that the \f[CR]jmod hash\f[R] command (without the +\f[CR]\-\-dry\-run\f[R] option) will record the hash value of the leaf +module \f[CR]ma\f[R] in the module \f[CR]mb\f[R]. +.RE +.IP "4." 3 +Record hash values in the JMOD archive files contained in the +\f[CR]jmodhashex\f[R] directory. +Run the following command from the \f[CR]jmodhashex\f[R] directory: +.RS 4 +.RS +.PP +\f[CR]jmod hash \-\-module\-path jmods \-\-hash\-modules .*\f[R] +.RE +.PP +The command prints the following: +.RS +.PP +\f[CR]Hashes are recorded in module mb\f[R] +.RE +.RE +.IP "5." 3 +Print information about each JMOD archive contained in the +\f[CR]jmodhashex\f[R] directory. +Run the highlighted commands from the \f[CR]jmodhashex\f[R] directory: +.RS 4 +.IP +.EX +jmod describe jmods/ma.jmod + +ma + requires mandated java.base + requires mb + +jmod describe jmods/mb.jmod + +mb + requires mandated java.base + hashes ma SHA\-256 07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a +.EE +.RE +.IP "6." 3 +Attempt to create a runtime image that contains the module \f[CR]ma\f[R] +from the directory \f[CR]jmodhashex2\f[R] but the module \f[CR]mb\f[R] +from the directory \f[CR]jmodhashex\f[R]. +Run the following command from the \f[CR]jmodhashex2\f[R] directory: +.RS 4 +.IP \[bu] 2 +\f[B]Linux and macOS:\f[R] +.RS 2 +.RS +.PP +\f[CR]jlink \-\-module\-path $JAVA_HOME/jmods:jmods/ma.jmod:../jmodhashex/jmods/mb.jmod \-\-add\-modules ma \-\-output ma\-app\f[R] +.RE +.RE +.IP \[bu] 2 +\f[B]Windows:\f[R] +.RS 2 +.RS +.PP +\f[CR]jlink \-\-module\-path %JAVA_HOME%/jmods;jmods/ma.jmod;../jmodhashex/jmods/mb.jmod \-\-add\-modules ma \-\-output ma\-app\f[R] +.RE +.RE +.PP +The command prints an error message similar to the following: +.IP +.EX +Error: Hash of ma (a2d77889b0cb067df02a3abc39b01ac1151966157a68dc4241562c60499150d2) differs to +expected hash (07667d5032004b37b42ec2bb81b46df380cf29e66962a16481ace2e71e74073a) recorded in mb +.EE +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jnativescan.1 openjdk-25-25.0.3+9/debian/man/jnativescan.1 --- openjdk-25-25.0.2+10/debian/man/jnativescan.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jnativescan.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,169 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JNATIVESCAN" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jnativescan \- static analysis tool that scans one or more jar files for +uses of native functionalities, such as restricted method calls or +\f[CR]native\f[R] method declarations. +.SH SYNOPSIS +\f[CR]jnativescan\f[R] [\f[I]options\f[R]] +.TP +\f[I]options\f[R] +See \f[B]Options for the jnativescan Command\f[R] +.SH DESCRIPTION +The \f[CR]jnative\f[R] tool is a static analysis tool provided by the +JDK that scans a JAR file for uses of native functionalities, such as +restricted method calls or \f[CR]native\f[R] method declarations. +.PP +\f[CR]jnativescan\f[R] accepts a runtime class path and module path +configuration, as well as a set of root modules, and a target release. +It scans the jars on the class and module paths, and reports uses of +native functionalities either in a tree like structure, which also +identifies that calling classes and methods, or as a list of module +names when the \f[CR]\-\-print\-native\-access\f[R] flag is specified. +.SH OPTIONS FOR THE JNATIVESCAN COMMAND +The following options are available: +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Used to specify a list of paths pointing to jar files to be scanned. +.PP +All jar files specified through this list will be scanned. +If a jar file contains a \f[CR]Class\-Path\f[R] attribute in its +manifest, jar files listed there will be scanned as well. +Jar files listed in the \f[CR]Class\-Path\f[R] manifest attribute that +can not be found are ignored. +All the jar files found are treated as if they belonged to the unnamed +module. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]path\f[R] +Used to specify a list of paths pointing to jar files or directories +containing jar files, that the tool can use to find modules that need to +be scanned. +The list of jar files that will be scanned depends on the +\f[CR]\-\-add\-modules\f[R] option. +.RS +.PP +For both the \f[CR]\-\-class\-path\f[R] and \f[CR]\-\-module\-path\f[R] +options, \f[I]path\f[R] should be a search path that consists of one or +more jar files, separated by the system\-specific path separator. +For example: +.IP \[bu] 2 +\f[B]Linux and macOS:\f[R] +.RS 2 +.RS +.PP +\f[CR]\-\-class\-path /some/foo.jar:/another/different/bar.jar\f[R] +.RE +.RE +.PP +\f[B]Note:\f[R] +.PP +On Windows, use a semicolon (\f[CR];\f[R]) as the separator instead of a +colon (\f[CR]:\f[R]). +.IP \[bu] 2 +\f[B]Windows:\f[R] +.RS 2 +.RS +.PP +\f[CR]\-\-class\-path C:\[rs]some\[rs]foo.jar;C:\[rs]another\[rs]different\[rs]bar.jar\f[R] +.RE +.RE +.RE +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module[,module...]\f[R] +Used to specify a comma\-separated list of module names that indicate +the root modules to scan. +All the root modules will be scanned, as well as any modules that they +depend on. +This includes dependencies on service implementations specified through +the \f[CR]uses\f[R] directive in a module\[aq]s \f[CR]module\-info\f[R] +file. +All modules found on the module path that provide an implementation of +such a service will be scanned as well. +.TP +\f[CR]\-\-release\f[R] \f[I]version\f[R] +Used to specify the Java SE release that specifies the set of restricted +methods to scan for. +For multi\-release jar files, this option also indicates the version of +class file that should be loaded from the jar. +This option should be set to the version of the runtime under which the +application is eventually intended to be run. +If this flag is omitted, the version of \f[CR]jnativescan\f[R] is used +as release version, which is the same as the version of the JDK that the +tool belongs to. +.TP +\f[CR]\-\-print\-native\-access\f[R] +Print a comma\-separated list of module names that use native +functionalities, instead of the default tree structure. +.TP +\f[CR]\-\-help\f[R] or \f[CR]\-h\f[R] +Prints out a full help message. +.TP +\f[CR]\-\-version\f[R] +Prints out the abbreviated version string of the tool. +.SH EXAMPLE OF \f[CR]jnativescan\f[R] USE +\f[CR]jnativescan\f[R] accepts a runtime configuration in the form of a +class path, module path, set of root modules, and a target release +version. +For the class path, the tool will scan all jar files, including those +found recursively through the \f[CR]Class\-Path\f[R] manifest attribute. +For the module path, the tool scans all root modules specified through +\f[CR]\-\-add\-modules\f[R], and any (transitive) dependence of the root +modules, including any modules that contain service implementations that +are used by a scanned module. +.PP +By default, the tool prints out which jars, classes, and methods use +native functionalities, in a tree\-like structure. +The following is an example output: +.IP +.EX +$ jnativescan \-\-class\-path app.jar +app.jar (ALL\-UNNAMED): + foo.Main: + foo.Main::main(String[])void references restricted methods: + java.lang.foreign.MemorySegment::reinterpret(long)MemorySegment + foo.Main::nativeMethod()void is a native method declaration +.EE +.PP +\f[CR]app.jar (ALL\-UNNAMED)\f[R] is the path to the jar file, with the +module name in parentheses behind it. +Since in this case the jar file appears on the class path, +\f[CR]ALL\-UNNAMED\f[R] is printed to indicate the unnamed module. +The second line of the output, \f[CR]foo.Main\f[R], indicates that +methods using native functionalities were found in the +\f[CR]foo.Main\f[R] class. +The next line: +.IP +.EX + foo.Main::main(String[])void references restricted methods: +.EE +.PP +Indicates that the \f[CR]main(String[])\f[R] method in the +\f[CR]foo.Main\f[R] class references a restricted method, which is +listed on the following line as: +.IP +.EX + java.lang.foreign.MemorySegment::reinterpret(long)MemorySegment +.EE +.PP +Lastly, the text: +.IP +.EX + foo.Main::nativeMethod()void is a native method declaration +.EE +.PP +Indicates that the \f[CR]foo.Main\f[R] class contains a declaration of a +\f[CR]native\f[R] method named \f[CR]nativeMethod\f[R]. +.PP +If we add \f[CR]\-\-print\-native\-access\f[R] to the example command +line, we instead get a list of the names of modules that contain +accesses to native functionalities: +.IP +.EX +$ jnativescan \-\-class\-path app.jar \-\-print\-native\-access +ALL\-UNNAMED +.EE +.PP +In this case the output consists of just \f[CR]ALL\-UNNAMED\f[R], which +indicates a jar file on the class path, that is, in the unnamed module, +contains an access to native functionalities. diff -Nru openjdk-25-25.0.2+10/debian/man/jpackage.1 openjdk-25-25.0.3+9/debian/man/jpackage.1 --- openjdk-25-25.0.2+10/debian/man/jpackage.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jpackage.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,834 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JPACKAGE" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jpackage \- tool for packaging self\-contained Java applications. +.SH SYNOPSIS +\f[CR]jpackage\f[R] [\f[I]options\f[R]] +.TP +\f[I]options\f[R] +Command\-line options separated by spaces. +See \f[B]jpackage Options\f[R]. +.SH DESCRIPTION +The \f[CR]jpackage\f[R] tool will take as input a Java application and a +Java run\-time image, and produce a Java application image that includes +all the necessary dependencies. +It will be able to produce a native package in a platform\-specific +format, such as an exe on Windows or a dmg on macOS. +Each format must be built on the platform it runs on, there is no +cross\-platform support. +The tool will have options that allow packaged applications to be +customized in various ways. +.SH JPACKAGE OPTIONS +.SS Generic Options: +.TP +\f[CR]\[at]\f[R]\f[I]filename\f[R] +Read options from a file. +.RS +.PP +This option can be used multiple times. +.RE +.TP +\f[CR]\-\-type\f[R] or \f[CR]\-t\f[R] \f[I]type\f[R] +The type of package to create +.RS +.PP +Valid values are: {\[dq]app\-image\[dq], \[dq]exe\[dq], \[dq]msi\[dq], +\[dq]rpm\[dq], \[dq]deb\[dq], \[dq]pkg\[dq], \[dq]dmg\[dq]} +.PP +If this option is not specified a platform dependent default type will +be created. +.RE +.TP +\f[CR]\-\-app\-version\f[R] \f[I]version\f[R] +Version of the application and/or package +.TP +\f[CR]\-\-copyright\f[R] \f[I]copyright\f[R] +Copyright for the application +.TP +\f[CR]\-\-description\f[R] \f[I]description\f[R] +Description of the application +.TP +\f[CR]\-\-help\f[R] or \f[CR]\-h\f[R] +Print the usage text with a list and description of each valid option +for the current platform to the output stream, and exit. +.TP +\f[CR]\-\-icon\f[R] \f[I]path\f[R] +Path of the icon of the application package +.RS +.PP +(absolute path or relative to the current directory) +.RE +.TP +\f[CR]\-\-name\f[R] or \f[CR]\-n\f[R] \f[I]name\f[R] +Name of the application and/or package +.TP +\f[CR]\-\-dest\f[R] or \f[CR]\-d\f[R] \f[I]destination\f[R] +Path where generated output file is placed +.RS +.PP +(absolute path or relative to the current directory). +.PP +Defaults to the current working directory. +.RE +.TP +\f[CR]\-\-resource\-dir\f[R] \f[I]path\f[R] +Path to override jpackage resources +.RS +.PP +(absolute path or relative to the current directory) +.PP +Icons, template files, and other resources of jpackage can be +over\-ridden by adding replacement resources to this directory. +.RE +.TP +\f[CR]\-\-temp\f[R] \f[I]directory\f[R] +Path of a new or empty directory used to create temporary files +.RS +.PP +(absolute path or relative to the current directory) +.PP +If specified, the temp dir will not be removed upon the task completion +and must be removed manually. +.PP +If not specified, a temporary directory will be created and removed upon +the task completion. +.RE +.TP +\f[CR]\-\-vendor\f[R] \f[I]vendor\f[R] +Vendor of the application +.TP +\f[CR]\-\-verbose\f[R] +Enables verbose output. +.TP +\f[CR]\-\-version\f[R] +Print the product version to the output stream and exit. +.SS Options for creating the runtime image: +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\-name\f[R] [\f[CR],\f[R]\f[I]module\-name\f[R]...] +A comma (\[dq],\[dq]) separated list of modules to add +.RS +.PP +This module list, along with the main module (if specified) will be +passed to jlink as the \-\-add\-module argument. +If not specified, either just the main module (if \-\-module is +specified), or the default set of modules (if \-\-main\-jar is +specified) are used. +.PP +This option can be used multiple times. +.RE +.TP +\f[CR]\-\-module\-path\f[R] or \f[CR]\-p\f[R] \f[I]module\-path\f[R] [\f[CR],\f[R]\f[I]module\-path\f[R]...] +A File.pathSeparator separated list of paths +.RS +.PP +Each path is either a directory of modules or the path to a modular jar, +and is absolute or relative to the current directory. +.PP +This option can be used multiple times. +.RE +.TP +\f[CR]\-\-jlink\-options\f[R] \f[I]options\f[R] +A space separated list of options to pass to jlink +.RS +.PP +If not specified, defaults to \[dq]\-\-strip\-native\-commands +\-\-strip\-debug \-\-no\-man\-pages \-\-no\-header\-files\[dq] +.PP +This option can be used multiple times. +.RE +.TP +\f[CR]\-\-runtime\-image\f[R] \f[I]directory\f[R] +Path of the predefined runtime image that will be copied into the +application image +.RS +.PP +(absolute path or relative to the current directory) +.PP +If \-\-runtime\-image is not specified, jpackage will run jlink to +create the runtime image using options specified by \-\-jlink\-options. +.RE +.SS Options for creating the application image: +.TP +\f[CR]\-\-input\f[R] or \f[CR]\-i\f[R] \f[I]directory\f[R] +Path of the input directory that contains the files to be packaged +.RS +.PP +(absolute path or relative to the current directory) +.PP +All files in the input directory will be packaged into the application +image. +.RE +.TP +\f[CR]\-\-app\-content\f[R] \f[I]additional\-content\f[R] [\f[CR],\f[R]\f[I]additional\-content\f[R]...] +A comma separated list of paths to files and/or directories to add to +the application payload. +.RS +.PP +This option can be used more than once. +.RE +.SS Options for creating the application launcher(s): +.TP +\f[CR]\-\-add\-launcher\f[R] \f[I]name\f[R]=\f[I]path\f[R] +Name of launcher, and a path to a Properties file that contains a list +of key, value pairs +.RS +.PP +(absolute path or relative to the current directory) +.PP +The keys \[dq]module\[dq], \[dq]main\-jar\[dq], \[dq]main\-class\[dq], +\[dq]description\[dq], \[dq]arguments\[dq], \[dq]java\-options\[dq], +\[dq]icon\[dq], \[dq]launcher\-as\-service\[dq], \[dq]win\-console\[dq], +\[dq]win\-shortcut\[dq], \[dq]win\-menu\[dq], and +\[dq]linux\-shortcut\[dq] can be used. +.PP +These options are added to, or used to overwrite, the original command +line options to build an additional alternative launcher. +The main application launcher will be built from the command line +options. +Additional alternative launchers can be built using this option, and +this option can be used multiple times to build multiple additional +launchers. +.RE +.TP +\f[CR]\-\-arguments\f[R] \f[I]arguments\f[R] +Command line arguments to pass to the main class if no command line +arguments are given to the launcher +.RS +.PP +This option can be used multiple times. +.PP +Value can contain substrings that will be expanded at runtime. +Two types of such substrings are supported: environment variables and +\[dq]APPDIR\[dq], \[dq]BINDIR\[dq], and \[dq]ROOTDIR\[dq] tokens. +.PP +An expandable substring should be enclosed between the dollar sign +character ($) and the first following non\-alphanumeric character. +Alternatively, it can be enclosed between \[dq]${\[dq] and \[dq]}\[dq] +substrings. +.PP +Expandable substrings are case\-sensitive on Unix and case\-insensitive +on Windows. +No string expansion occurs if the referenced environment variable is +undefined. +.PP +Environment variables with names \[dq]APPDIR\[dq], \[dq]BINDIR\[dq], and +\[dq]ROOTDIR\[dq] will be ignored, and these expandable substrings will +be replaced by values calculated by the app launcher. +.PP +Prefix the dollar sign character with the backslash character (\[rs]) to +prevent substring expansion. +.RE +.TP +\f[CR]\-\-java\-options\f[R] \f[I]options\f[R] +Options to pass to the Java runtime +.RS +.PP +This option can be used multiple times. +.PP +Value can contain substrings that will be substituted at runtime, such +as for the \-\-arguments option. +.RE +.TP +\f[CR]\-\-main\-class\f[R] \f[I]class\-name\f[R] +Qualified name of the application main class to execute +.RS +.PP +This option can only be used if \-\-main\-jar is specified. +.RE +.TP +\f[CR]\-\-main\-jar\f[R] \f[I]main\-jar\f[R] +The main JAR of the application; containing the main class (specified as +a path relative to the input path) +.RS +.PP +Either \-\-module or \-\-main\-jar option can be specified but not both. +.RE +.TP +\f[CR]\-\-module\f[R] or \f[CR]\-m\f[R] \f[I]module\-name\f[R][/\f[I]main\-class\f[R]] +The main module (and optionally main class) of the application +.RS +.PP +This module must be located on the module path. +.PP +When this option is specified, the main module will be linked in the +Java runtime image. +Either \-\-module or \-\-main\-jar option can be specified but not both. +.RE +.SS Platform dependent options for creating the application launcher: +.SS Windows platform options (available only when running on Windows): +.TP +\f[CR]\-\-win\-console\f[R] +Creates a console launcher for the application, should be specified for +application which requires console interactions +.SS macOS platform options (available only when running on macOS): +.TP +\f[CR]\-\-mac\-package\-identifier\f[R] \f[I]identifier\f[R] +An identifier that uniquely identifies the application for macOS +.RS +.PP +Defaults to the main class name. +.PP +May only use alphanumeric (A\-Z,a\-z,0\-9), hyphen (\-), and period (.) +characters. +.RE +.TP +\f[CR]\-\-mac\-package\-name\f[R] \f[I]name\f[R] +Name of the application as it appears in the Menu Bar +.RS +.PP +This can be different from the application name. +.PP +This name must be less than 16 characters long and be suitable for +displaying in the menu bar and the application Info window. +Defaults to the application name. +.RE +.TP +\f[CR]\-\-mac\-package\-signing\-prefix\f[R] \f[I]prefix\f[R] +When signing the application package, this value is prefixed to all +components that need to be signed that don\[aq]t have an existing +package identifier. +.TP +\f[CR]\-\-mac\-sign\f[R] +Request that the package or the predefined application image be signed. +.TP +\f[CR]\-\-mac\-signing\-keychain\f[R] \f[I]keychain\-name\f[R] +Name of the keychain to search for the signing identity +.RS +.PP +If not specified, the standard keychains are used. +.RE +.TP +\f[CR]\-\-mac\-signing\-key\-user\-name\f[R] \f[I]name\f[R] +Team or user name portion in Apple signing identities +.TP +\f[CR]\-\-mac\-app\-store\f[R] +Indicates that the jpackage output is intended for the Mac App Store. +.TP +\f[CR]\-\-mac\-entitlements\f[R] \f[I]path\f[R] +Path to file containing entitlements to use when signing executables and +libraries in the bundle +.TP +\f[CR]\-\-mac\-app\-category\f[R] \f[I]category\f[R] +String used to construct LSApplicationCategoryType in application plist +.RS +.PP +The default value is \[dq]utilities\[dq]. +.RE +.SS Options for creating the application package: +.TP +\f[CR]\-\-about\-url\f[R] \f[I]url\f[R] +URL of the application\[aq]s home page +.TP +\f[CR]\-\-app\-image\f[R] \f[I]directory\f[R] +Location of the predefined application image that is used to build an +installable package (on all platforms) or to be signed (on macOS) +.RS +.PP +(absolute path or relative to the current directory) +.RE +.TP +\f[CR]\-\-file\-associations\f[R] \f[I]path\f[R] +Path to a Properties file that contains list of key, value pairs +.RS +.PP +(absolute path or relative to the current directory) +.PP +The keys \[dq]extension\[dq], \[dq]mime\-type\[dq], \[dq]icon\[dq], and +\[dq]description\[dq] can be used to describe the association. +.PP +This option can be used multiple times. +.RE +.TP +\f[CR]\-\-install\-dir\f[R] \f[I]path\f[R] +Absolute path of the installation directory of the application (on macOS +or linux), or relative sub\-path of the installation directory such as +\[dq]Program Files\[dq] or \[dq]AppData\[dq] (on Windows) +.TP +\f[CR]\-\-license\-file\f[R] \f[I]path\f[R] +Path to the license file +.RS +.PP +(absolute path or relative to the current directory) +.RE +.TP +\f[CR]\-\-runtime\-image\f[R] \f[I]path\f[R] +Path of the predefined runtime image to install +.RS +.PP +(absolute path or relative to the current directory) +.PP +Option is required when creating a runtime installer. +.RE +.TP +\f[CR]\-\-launcher\-as\-service\f[R] +Request to create an installer that will register the main application +launcher as a background service\-type application. +.SS Platform dependent options for creating the application package: +.SS Windows platform options (available only when running on Windows): +.TP +\f[CR]\-\-win\-dir\-chooser\f[R] +Adds a dialog to enable the user to choose a directory in which the +product is installed. +.TP +\f[CR]\-\-win\-help\-url\f[R] \f[I]url\f[R] +URL where user can obtain further information or technical support +.TP +\f[CR]\-\-win\-menu\f[R] +Request to add a Start Menu shortcut for this application +.TP +\f[CR]\-\-win\-menu\-group\f[R] \f[I]menu\-group\-name\f[R] +Start Menu group this application is placed in +.TP +\f[CR]\-\-win\-per\-user\-install\f[R] +Request to perform an install on a per\-user basis +.TP +\f[CR]\-\-win\-shortcut\f[R] +Request to create a desktop shortcut for this application +.TP +\f[CR]\-\-win\-shortcut\-prompt\f[R] +Adds a dialog to enable the user to choose if shortcuts will be created +by installer +.TP +\f[CR]\-\-win\-update\-url\f[R] \f[I]url\f[R] +URL of available application update information +.TP +\f[CR]\-\-win\-upgrade\-uuid\f[R] \f[I]id\f[R] +UUID associated with upgrades for this package +.SS Linux platform options (available only when running on Linux): +.TP +\f[CR]\-\-linux\-package\-name\f[R] \f[I]name\f[R] +Name for Linux package +.RS +.PP +Defaults to the application name. +.RE +.TP +\f[CR]\-\-linux\-deb\-maintainer\f[R] \f[I]email\-address\f[R] +Maintainer for .deb bundle +.TP +\f[CR]\-\-linux\-menu\-group\f[R] \f[I]menu\-group\-name\f[R] +Menu group this application is placed in +.TP +\f[CR]\-\-linux\-package\-deps\f[R] \f[I]package\-dep\-string\f[R] +Required packages or capabilities for the application +.TP +\f[CR]\-\-linux\-rpm\-license\-type\f[R] \f[I]type\f[R] +Type of the license (\[dq]License: \f[I]value\f[R]\[dq] of the RPM +\&.spec) +.TP +\f[CR]\-\-linux\-app\-release\f[R] \f[I]release\f[R] +Release value of the RPM <name>.spec file or Debian revision value of +the DEB control file +.TP +\f[CR]\-\-linux\-app\-category\f[R] \f[I]category\-value\f[R] +Group value of the RPM <name>.spec file or Section value of DEB control +file +.TP +\f[CR]\-\-linux\-shortcut\f[R] +Creates a shortcut for the application. +.SS macOS platform options (available only when running on macOS): +.TP +\f[CR]\-\-mac\-dmg\-content\f[R] \f[I]additional\-content\f[R] [\f[CR],\f[R]\f[I]additional\-content\f[R]...] +Include all the referenced content in the dmg. +.RS +.PP +This option can be used more than once. +.RE +.SH JPACKAGE EXAMPLES +.IP +.EX +Generate an application package suitable for the host system: +.EE +.IP +.EX +For a modular application: + jpackage \-n name \-p modulePath \-m moduleName/className +For a non\-modular application: + jpackage \-i inputDir \-n name \[rs] + \-\-main\-class className \-\-main\-jar myJar.jar +From a pre\-built application image: + jpackage \-n name \-\-app\-image appImageDir +.EE +.IP +.EX +Generate an application image: +.EE +.IP +.EX +For a modular application: + jpackage \-\-type app\-image \-n name \-p modulePath \[rs] + \-m moduleName/className +For a non\-modular application: + jpackage \-\-type app\-image \-i inputDir \-n name \[rs] + \-\-main\-class className \-\-main\-jar myJar.jar +To provide your own options to jlink, run jlink separately: + jlink \-\-output appRuntimeImage \-p modulePath \[rs] + \-\-add\-modules moduleName \[rs] + \-\-no\-header\-files [<additional jlink options>...] + jpackage \-\-type app\-image \-n name \[rs] + \-m moduleName/className \-\-runtime\-image appRuntimeImage +.EE +.IP +.EX +Generate a Java runtime package: +.EE +.IP +.EX +jpackage \-n name \-\-runtime\-image <runtime\-image> +.EE +.IP +.EX +Sign the predefined application image (on macOS): +.EE +.IP +.EX +jpackage \-\-type app\-image \-\-app\-image <app\-image> \[rs] + \-\-mac\-sign [<additional signing options>...] + +Note: the only additional options that are permitted in this mode are: + the set of additional mac signing options and \-\-verbose +.EE +.SH JPACKAGE AND JLINK +jpackage will use jlink to create Java Runtime unless the +\f[CR]\-\-runtime\-image\f[R] option is used. +The created Java Runtime image on Windows will include MS runtime +libraries bundled with the JDK. +If MS runtime libraries of a different version are needed for the +application, the user will need to add/replace those themselves. +.SH JPACKAGE RESOURCE DIRECTORY +Icons, template files, and other resources of jpackage can be +over\-ridden by adding replacement resources to this directory. +jpackage will lookup files by specific names in the resource directory. +.SS Resource directory files considered only when running on Linux: +.TP +\f[CR]<launcher\-name>.png\f[R] +Application launcher icon +.RS +.PP +Default resource is \f[I]JavaApp.png\f[R] +.RE +.TP +\f[CR]<launcher\-name>.desktop\f[R] +A desktop file to be used with \f[CR]xdg\-desktop\-menu\f[R] command +.RS +.PP +Considered with application launchers registered for file associations +and/or have an icon +.PP +Default resource is \f[I]template.desktop\f[R] +.RE +.SS Resource directory files considered only when building Linux DEB/RPM installer: +.TP +\f[CR]<package\-name>\-<launcher\-name>.service\f[R] +systemd unit file for application launcher registered as a background +service\-type application +.RS +.PP +Default resource is \f[I]unit\-template.service\f[R] +.RE +.SS Resource directory files considered only when building Linux RPM installer: +.TP +\f[CR]<package\-name>.spec\f[R] +RPM spec file +.RS +.PP +Default resource is \f[I]template.spec\f[R] +.RE +.SS Resource directory files considered only when building Linux DEB installer: +.TP +\f[CR]control\f[R] +Control file +.RS +.PP +Default resource is \f[I]template.control\f[R] +.RE +.TP +\f[CR]copyright\f[R] +Copyright file +.RS +.PP +Default resource is \f[I]template.copyright\f[R] +.RE +.TP +\f[CR]preinstall\f[R] +Pre\-install shell script +.RS +.PP +Default resource is \f[I]template.preinstall\f[R] +.RE +.TP +\f[CR]prerm\f[R] +Pre\-remove shell script +.RS +.PP +Default resource is \f[I]template.prerm\f[R] +.RE +.TP +\f[CR]postinstall\f[R] +Post\-install shell script +.RS +.PP +Default resource is \f[I]template.postinstall\f[R] +.RE +.TP +\f[CR]postrm\f[R] +Post\-remove shell script +.RS +.PP +Default resource is \f[I]template.postrm\f[R] +.RE +.SS Resource directory files considered only when running on Windows: +.TP +\f[CR]<launcher\-name>.ico\f[R] +Application launcher icon +.RS +.PP +Default resource is \f[I]JavaApp.ico\f[R] +.RE +.TP +\f[CR]<launcher\-name>.properties\f[R] +Properties file for application launcher executable +.RS +.PP +Default resource is \f[I]WinLauncher.template\f[R] +.RE +.SS Resource directory files considered only when building Windows MSI/EXE installer: +.TP +\f[CR]<application\-name>\-post\-image.wsf\f[R] +A Windows Script File (WSF) to run after building application image +.TP +\f[CR]main.wxs\f[R] +Main WiX project file +.RS +.PP +Default resource is \f[I]main.wxs\f[R] +.RE +.TP +\f[CR]overrides.wxi\f[R] +Overrides WiX project file +.RS +.PP +Default resource is \f[I]overrides.wxi\f[R] +.RE +.TP +\f[CR]service\-installer.exe\f[R] +Service installer executable +.RS +.PP +Considered if some application launchers are registered as background +service\-type applications +.RE +.TP +\f[CR]<launcher\-name>\-service\-install.wxi\f[R] +Service installer WiX project file +.RS +.PP +Considered if some application launchers are registered as background +service\-type applications +.PP +Default resource is \f[I]service\-install.wxi\f[R] +.RE +.TP +\f[CR]<launcher\-name>\-service\-config.wxi\f[R] +Service installer WiX project file +.RS +.PP +Considered if some application launchers are registered as background +service\-type applications +.PP +Default resource is \f[I]service\-config.wxi\f[R] +.RE +.TP +\f[CR]InstallDirNotEmptyDlg.wxs\f[R] +WiX project file for installer UI dialog checking installation directory +doesn\[aq]t exist or is empty +.RS +.PP +Default resource is \f[I]InstallDirNotEmptyDlg.wxs\f[R] +.RE +.TP +\f[CR]ShortcutPromptDlg.wxs\f[R] +WiX project file for installer UI dialog configuring shortcuts +.RS +.PP +Default resource is \f[I]ShortcutPromptDlg.wxs\f[R] +.RE +.TP +\f[CR]bundle.wxf\f[R] +WiX project file with the hierarchy of components of application image +.TP +\f[CR]ui.wxf\f[R] +WiX project file for installer UI +.TP +\f[CR]os\-condition.wxf\f[R] +WiX project file with the condition to block installation on older +versions of Windows +.RS +.PP +Default resource is \f[I]os\-condition.wxf\f[R] +.RE +.TP +\f[CR]wix\-conv.xsl\f[R] +WiX source code converter. +Used for converting WiX sources from WiX v3 to v4 schema when WiX v4 or +newer is used +.RS +.PP +Default resource is \f[I]wix3\-to\-wix4\-conv.xsl\f[R] +.RE +.SS Resource directory files considered only when building Windows EXE installer: +.TP +\f[CR]WinInstaller.properties\f[R] +Properties file for the installer executable +.RS +.PP +Default resource is \f[I]WinInstaller.template\f[R] +.RE +.TP +\f[CR]<package\-name>\-post\-msi.wsf\f[R] +A Windows Script File (WSF) to run after building embedded MSI installer +for EXE installer +.TP +\f[CR]installer.exe\f[R] +Executable wrapper for MSI installer +.RS +.PP +Default resource is \f[I]msiwrapper.exe\f[R] +.RE +.SS Resource directory files considered only when running on macOS: +.TP +\f[CR]<launcher\-name>.icns\f[R] +Application launcher icon +.RS +.PP +Default resource is \f[I]JavaApp.icns\f[R] +.RE +.TP +\f[CR]Info.plist\f[R] +Application property list file +.RS +.PP +Default resource is \f[I]Info\-lite.plist.template\f[R] +.RE +.TP +\f[CR]Runtime\-Info.plist\f[R] +Java Runtime property list file +.RS +.PP +Default resource is \f[I]Runtime\-Info.plist.template\f[R] +.RE +.TP +\f[CR]<application\-name>.entitlements\f[R] +Signing entitlements property list file +.RS +.PP +Default resource is \f[I]sandbox.plist\f[R] +.RE +.SS Resource directory files considered only when building macOS PKG/DMG installer: +.TP +\f[CR]<package\-name>\-post\-image.sh\f[R] +Shell script to run after building application image +.SS Resource directory files considered only when building macOS PKG installer: +.TP +\f[CR]uninstaller\f[R] +Uninstaller shell script +.RS +.PP +Considered if some application launchers are registered as background +service\-type applications +.PP +Default resource is \f[I]uninstall.command.template\f[R] +.RE +.TP +\f[CR]preinstall\f[R] +Pre\-install shell script +.RS +.PP +Default resource is \f[I]preinstall.template\f[R] +.RE +.TP +\f[CR]postinstall\f[R] +Post\-install shell script +.RS +.PP +Default resource is \f[I]postinstall.template\f[R] +.RE +.TP +\f[CR]services\-preinstall\f[R] +Pre\-install shell script for services package +.RS +.PP +Considered if some application launchers are registered as background +service\-type applications +.PP +Default resource is \f[I]services\-preinstall.template\f[R] +.RE +.TP +\f[CR]services\-postinstall\f[R] +Post\-install shell script for services package +.RS +.PP +Considered if some application launchers are registered as background +service\-type applications +.PP +Default resource is \f[I]services\-postinstall.template\f[R] +.RE +.TP +\f[CR]<package\-name>\-background.png\f[R] +Background image +.RS +.PP +Default resource is \f[I]background_pkg.png\f[R] +.RE +.TP +\f[CR]<package\-name>\-background\-darkAqua.png\f[R] +Dark background image +.RS +.PP +Default resource is \f[I]background_pkg.png\f[R] +.RE +.TP +\f[CR]product\-def.plist\f[R] +Package property list file +.RS +.PP +Default resource is \f[I]product\-def.plist\f[R] +.RE +.TP +\f[CR]<package\-name>\-<launcher\-name>.plist\f[R] +launchd property list file for application launcher registered as a +background service\-type application +.RS +.PP +Default resource is \f[I]launchd.plist.template\f[R] +.RE +.SS Resource directory files considered only when building macOS DMG installer: +.TP +\f[CR]<package\-name>\-dmg\-setup.scpt\f[R] +Setup AppleScript script +.RS +.PP +Default resource is \f[I]DMGsetup.scpt\f[R] +.RE +.TP +\f[CR]<package\-name>\-license.plist\f[R] +License property list file +.RS +.PP +Default resource is \f[I]lic_template.plist\f[R] +.RE +.TP +\f[CR]<package\-name>\-background.tiff\f[R] +Background image +.RS +.PP +Default resource is \f[I]background_dmg.tiff\f[R] +.RE +.TP +\f[CR]<package\-name>\-volume.icns\f[R] +Volume icon +.RS +.PP +Default resource is \f[I]JavaApp.icns\f[R] +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jps.1 openjdk-25-25.0.3+9/debian/man/jps.1 --- openjdk-25-25.0.2+10/debian/man/jps.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jps.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,189 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JPS" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jps \- list the instrumented JVMs on the target system +.SH SYNOPSIS +\f[B]Note:\f[R] This command is experimental and unsupported. +.PP +\f[CR]jps\f[R] [\f[CR]\-q\f[R]] [\f[CR]\-mlvV\f[R]] [\f[I]hostid\f[R]] +.PP +\f[CR]jps\f[R] [\f[CR]\-help\f[R]] +.SH OPTIONS +.TP +\f[CR]\-q\f[R] +Suppresses the output of the class name, JAR file name, and arguments +passed to the \f[CR]main\f[R] method, producing a list of only local JVM +identifiers. +.TP +\f[CR]\-mlvV\f[R] +You can specify any combination of these options. +.RS +.IP \[bu] 2 +\f[CR]\-m\f[R] displays the arguments passed to the \f[CR]main\f[R] +method. +The output may be \f[CR]null\f[R] for embedded JVMs. +.IP \[bu] 2 +\f[CR]\-l\f[R] displays the full package name for the application\[aq]s +\f[CR]main\f[R] class or the full path name to the application\[aq]s JAR +file. +.IP \[bu] 2 +\f[CR]\-v\f[R] displays the arguments passed to the JVM. +.IP \[bu] 2 +\f[CR]\-V\f[R] suppresses the output of the class name, JAR file name, +and arguments passed to the \f[CR]main\f[R] method, producing a list of +only local JVM identifiers. +.RE +.TP +\f[I]hostid\f[R] +The identifier of the host for which the process report should be +generated. +The \f[CR]hostid\f[R] can include optional components that indicate the +communications protocol, port number, and other implementation specific +data. +See \f[B]Host Identifier\f[R]. +.TP +\f[CR]\-help\f[R] +Displays the help message for the \f[CR]jps\f[R] command. +.SH DESCRIPTION +The \f[CR]jps\f[R] command lists the instrumented Java HotSpot VMs on +the target system. +The command is limited to reporting information on JVMs for which it has +the access permissions. +.PP +If the \f[CR]jps\f[R] command is run without specifying a +\f[CR]hostid\f[R], then it searches for instrumented JVMs on the local +host. +If started with a \f[CR]hostid\f[R], then it searches for JVMs on the +indicated host, using the specified protocol and port. +A \f[CR]jstatd\f[R] process is assumed to be running on the target host. +.PP +The \f[CR]jps\f[R] command reports the local JVM identifier, or +\f[CR]lvmid\f[R], for each instrumented JVM found on the target system. +The \f[CR]lvmid\f[R] is typically, but not necessarily, the operating +system\[aq]s process identifier for the JVM process. +With no options, the \f[CR]jps\f[R] command lists each Java +application\[aq]s \f[CR]lvmid\f[R] followed by the short form of the +application\[aq]s class name or jar file name. +The short form of the class name or JAR file name omits the class\[aq]s +package information or the JAR files path information. +.PP +The \f[CR]jps\f[R] command uses the Java launcher to find the class name +and arguments passed to the main method. +If the target JVM is started with a custom launcher, then the class or +JAR file name, and the arguments to the \f[CR]main\f[R] method +aren\[aq]t available. +In this case, the \f[CR]jps\f[R] command outputs the string +\f[CR]Unknown\f[R] for the class name, or JAR file name, and for the +arguments to the \f[CR]main\f[R] method. +.PP +The list of JVMs produced by the \f[CR]jps\f[R] command can be limited +by the permissions granted to the principal running the command. +The command lists only the JVMs for which the principal has access +rights as determined by operating system\-specific access control +mechanisms. +.SH HOST IDENTIFIER +The host identifier, or \f[CR]hostid\f[R], is a string that indicates +the target system. +The syntax of the \f[CR]hostid\f[R] string corresponds to the syntax of +a URI: +.RS +.PP +[\f[I]protocol\f[R]\f[CR]:\f[R]][[\f[CR]//\f[R]]\f[I]hostname\f[R]][\f[CR]:\f[R]\f[I]port\f[R]][\f[CR]/\f[R]\f[I]servername\f[R]] +.RE +.TP +\f[I]protocol\f[R] +The communications protocol. +If the \f[I]protocol\f[R] is omitted and a \f[I]hostname\f[R] isn\[aq]t +specified, then the default protocol is a platform\-specific, optimized, +local protocol. +If the protocol is omitted and a host name is specified, then the +default protocol is \f[CR]rmi\f[R]. +.TP +\f[I]hostname\f[R] +A host name or IP address that indicates the target host. +If you omit the \f[I]hostname\f[R] parameter, then the target host is +the local host. +.TP +\f[I]port\f[R] +The default port for communicating with the remote server. +If the \f[I]hostname\f[R] parameter is omitted or the \f[I]protocol\f[R] +parameter specifies an optimized, local protocol, then the +\f[I]port\f[R] parameter is ignored. +Otherwise, treatment of the \f[I]port\f[R] parameter is +implementation\-specific. +For the default \f[CR]rmi\f[R] protocol, the \f[I]port\f[R] parameter +indicates the port number for the \f[CR]rmiregistry\f[R] on the remote +host. +If the \f[I]port\f[R] parameter is omitted, and the \f[I]protocol\f[R] +parameter indicates \f[CR]rmi\f[R], then the default +\f[CR]rmiregistry\f[R] port (\f[CR]1099\f[R]) is used. +.TP +\f[I]servername\f[R] +The treatment of this parameter depends on the implementation. +For the optimized, local protocol, this field is ignored. +For the \f[CR]rmi\f[R] protocol, this parameter is a string that +represents the name of the RMI remote object on the remote host. +See the \f[B]jstatd\f[R] command \f[CR]\-n\f[R] option. +.SH OUTPUT FORMAT OF THE JPS COMMAND +The output of the \f[CR]jps\f[R] command has the following pattern: +.RS +.PP +\f[I]lvmid\f[R] [ [ \f[I]classname\f[R] | \f[I]JARfilename\f[R] | +\f[CR]\[dq]Unknown\[dq]\f[R]] [ \f[I]arg\f[R]* ] [ \f[I]jvmarg\f[R]* ] ] +.RE +.PP +All output tokens are separated by white space. +An \f[CR]arg\f[R] value that includes embedded white space introduces +ambiguity when attempting to map arguments to their actual positional +parameters. +.PP +\f[B]Note:\f[R] +.PP +It\[aq]s recommended that you don\[aq]t write scripts to parse +\f[CR]jps\f[R] output because the format might change in future +releases. +If you write scripts that parse \f[CR]jps\f[R] output, then expect to +modify them for future releases of this tool. +.SH EXAMPLES +This section provides examples of the \f[CR]jps\f[R] command. +.PP +List the instrumented JVMs on the local host: +.IP +.EX +jps +18027 Java2Demo.JAR +18032 jps +18005 jstat +.EE +.PP +The following example lists the instrumented JVMs on a remote host. +This example assumes that the \f[CR]jstat\f[R] server and either the its +internal RMI registry or a separate external \f[CR]rmiregistry\f[R] +process are running on the remote host on the default port (port +\f[CR]1099\f[R]). +It also assumes that the local host has appropriate permissions to +access the remote host. +This example includes the \f[CR]\-l\f[R] option to output the long form +of the class names or JAR file names. +.IP +.EX +jps \-l remote.domain +3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR +2857 sun.tools.jstatd.jstatd +.EE +.PP +The following example lists the instrumented JVMs on a remote host with +a nondefault port for the RMI registry. +This example assumes that the \f[CR]jstatd\f[R] server, with an internal +RMI registry bound to port \f[CR]2002\f[R], is running on the remote +host. +This example also uses the \f[CR]\-m\f[R] option to include the +arguments passed to the \f[CR]main\f[R] method of each of the listed +Java applications. +.IP +.EX +jps \-m remote.domain:2002 +3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR +3102 sun.tools.jstatd.jstatd \-p 2002 +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jrunscript.1 openjdk-25-25.0.3+9/debian/man/jrunscript.1 --- openjdk-25-25.0.2+10/debian/man/jrunscript.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jrunscript.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,123 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JRUNSCRIPT" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jrunscript \- run a command\-line script shell that supports interactive +and batch modes +.SH SYNOPSIS +\f[B]Note:\f[R] +.PP +This tool is \f[B]experimental\f[R] and unsupported. +It is deprecated and will be removed in a future release. +.PP +\f[CR]jrunscript\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] +.TP +\f[I]options\f[R] +This represents the \f[CR]jrunscript\f[R] command\-line options that can +be used. +See \f[B]Options for the jrunscript Command\f[R]. +.TP +\f[I]arguments\f[R] +Arguments, when used, follow immediately after options or the command +name. +See \f[B]Arguments\f[R]. +.SH DESCRIPTION +The \f[CR]jrunscript\f[R] command is a language\-independent +command\-line script shell. +The \f[CR]jrunscript\f[R] command supports both an interactive +(read\-eval\-print) mode and a batch (\f[CR]\-f\f[R] option) mode of +script execution. +By default, JavaScript is the language used, but the \f[CR]\-l\f[R] +option can be used to specify a different language. +By using Java to scripting language communication, the +\f[CR]jrunscript\f[R] command supports an exploratory programming style. +.PP +If JavaScript is used, then before it evaluates a user defined script, +the \f[CR]jrunscript\f[R] command initializes certain built\-in +functions and objects, which are documented in the API Specification for +\f[CR]jrunscript\f[R] JavaScript built\-in functions. +.SH OPTIONS FOR THE JRUNSCRIPT COMMAND +.TP +\f[CR]\-cp\f[R] \f[I]path\f[R] or \f[CR]\-classpath\f[R] \f[I]path\f[R] +Indicates where any class files are that the script needs to access. +.TP +\f[CR]\-D\f[R]\f[I]name\f[R]\f[CR]=\f[R]\f[I]value\f[R] +Sets a Java system property. +.TP +\f[CR]\-J\f[R]\f[I]flag\f[R] +Passes \f[I]flag\f[R] directly to the Java Virtual Machine where the +\f[CR]jrunscript\f[R] command is running. +.TP +\f[CR]\-l\f[R] \f[I]language\f[R] +Uses the specified scripting language. +By default, JavaScript is used. +To use other scripting languages, you must specify the corresponding +script engine\[aq]s JAR file with the \f[CR]\-cp\f[R] or +\f[CR]\-classpath\f[R] option. +.TP +\f[CR]\-e\f[R] \f[I]script\f[R] +Evaluates the specified script. +This option can be used to run one\-line scripts that are specified +completely on the command line. +.TP +\f[CR]\-encoding\f[R] \f[I]encoding\f[R] +Specifies the character encoding used to read script files. +.TP +\f[CR]\-f\f[R] \f[I]script\-file\f[R] +Evaluates the specified script file (batch mode). +.TP +\f[CR]\-f \-\f[R] +Enters interactive mode to read and evaluate a script from standard +input. +.TP +\f[CR]\-help\f[R] or \f[CR]\-?\f[R] +Displays a help message and exits. +.TP +\f[CR]\-q\f[R] +Lists all script engines available and exits. +.SH ARGUMENTS +If arguments are present and if no \f[CR]\-e\f[R] or \f[CR]\-f\f[R] +option is used, then the first argument is the script file and the rest +of the arguments, if any, are passed as script arguments. +If arguments and the \f[CR]\-e\f[R] or the \f[CR]\-f\f[R] option are +used, then all arguments are passed as script arguments. +If arguments \f[CR]\-e\f[R] and \f[CR]\-f\f[R] are missing, then the +interactive mode is used. +.SH EXAMPLE OF EXECUTING INLINE SCRIPTS +.RS +.PP +\f[CR]jrunscript \-e \[dq]print(\[aq]hello world\[aq])\[dq]\f[R] +.RE +.RS +.PP +\f[CR]jrunscript \-e \[dq]cat(\[aq]http://www.example.com\[aq])\[dq]\f[R] +.RE +.SH EXAMPLE OF USING SPECIFIED LANGUAGE AND EVALUATE THE SCRIPT FILE +.RS +.PP +\f[CR]jrunscript \-l js \-f test.js\f[R] +.RE +.SH EXAMPLE OF INTERACTIVE MODE +.IP +.EX +jrunscript +js> print(\[aq]Hello World\[rs]n\[aq]); +Hello World +js> 34 + 55 +89.0 +js> t = new java.lang.Thread(function() { print(\[aq]Hello World\[rs]n\[aq]); }) +Thread[Thread\-0,5,main] +js> t.start() +js> Hello World + +js> +.EE +.SH RUN SCRIPT FILE WITH SCRIPT ARGUMENTS +In this example, the \f[CR]test.js\f[R] file is the script file. +The \f[CR]arg1\f[R], \f[CR]arg2\f[R], and \f[CR]arg3\f[R] arguments are +passed to the script. +The script can access these arguments with an arguments array. +.RS +.PP +\f[CR]jrunscript test.js arg1 arg2 arg3\f[R] +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jshell.1 openjdk-25-25.0.3+9/debian/man/jshell.1 --- openjdk-25-25.0.2+10/debian/man/jshell.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jshell.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,1223 @@ +'\" t +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JSHELL" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jshell \- interactively evaluate declarations, statements, and +expressions of the Java programming language in a read\-eval\-print loop +(REPL) +.SH SYNOPSIS +\f[CR]jshell\f[R] [\f[I]options\f[R]] [\f[I]load\-files\f[R]] +.TP +\f[I]options\f[R] +Command\-line options, separated by spaces. +See \f[B]Options for jshell\f[R]. +.TP +\f[I]load\-files\f[R] +One or more scripts to run when the tool is started. +Scripts can contain any valid code snippets or JShell commands. +.RS +.PP +The script can be a local file or one of following predefined scripts: +.TP +\f[CR]DEFAULT\f[R] +Loads the default entries, which are commonly used as imports. +.TP +\f[CR]JAVASE\f[R] +Imports all Java SE packages. +.TP +\f[CR]PRINTING\f[R] +Defines \f[CR]print\f[R], \f[CR]println\f[R], and \f[CR]printf\f[R] as +\f[CR]jshell\f[R] methods for use within the tool. +.TP +\f[CR]TOOLING\f[R] +Defines \f[CR]javac\f[R], \f[CR]jar\f[R], and other methods for running +JDK tools via their command\-line interface within the \f[CR]jshell\f[R] +tool. +.PP +For more than one script, use a space to separate the names. +Scripts are run in the order in which they\[aq]re entered on the command +line. +Command\-line scripts are run after startup scripts. +To run a script after JShell is started, use the \f[CR]/open\f[R] +command. +.PP +To accept input from standard input and suppress the interactive I/O, +enter a hyphen (\-) for \f[I]load\-files\f[R]. +This option enables the use of the \f[CR]jshell\f[R] tool in pipe +chains. +.RE +.SH DESCRIPTION +JShell provides a way to interactively evaluate declarations, +statements, and expressions of the Java programming language, making it +easier to learn the language, explore unfamiliar code and APIs, and +prototype complex code. +Java statements, variable definitions, method definitions, class +definitions, import statements, and expressions are accepted. +The bits of code entered are called snippets. +.PP +As snippets are entered, they\[aq]re evaluated, and feedback is +provided. +Feedback varies from the results and explanations of actions to nothing, +depending on the snippet entered and the feedback mode chosen. +Errors are described regardless of the feedback mode. +Start with the verbose mode to get the most feedback while learning the +tool. +.PP +Command\-line options are available for configuring the initial +environment when JShell is started. +Within JShell, commands are available for modifying the environment as +needed. +.PP +Existing snippets can be loaded from a file to initialize a JShell +session, or at any time within a session. +Snippets can be modified within the session to try out different +variations and make corrections. +To keep snippets for later use, save them to a file. +.SH OPTIONS FOR JSHELL +.TP +\f[CR]\-\-add\-exports\f[R] \f[I]module\f[R]/\f[I]package\f[R] +Specifies a package to be considered as exported from its defining +module. +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Specifies the root modules to resolve in addition to the initial module. +.TP +\f[CR]\-C\f[R]\f[I]flag\f[R] +passes \f[I]flag\f[R] to the Java compiler inside JShell. +For example, \f[CR]\-C\-Xlint\f[R] enables all the recommended lint +warnings, and \f[CR]\-C\-\-release=<N>\f[R] compiles for Java SE N, as +if \-\-release N was specified. +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Specifies the directories and archives that are searched to locate class +files. +This option overrides the path in the \f[CR]CLASSPATH\f[R] environment +variable. +If the environment variable isn\[aq]t set and this option isn\[aq]t +used, then the current directory is searched. +For Linux and macOS, use a colon (:) to separate items in the path. +For Windows, use a semicolon (;) to separate items. +.TP +\f[CR]\-\-enable\-preview\f[R] +Allows code to depend on the preview features of this release. +.TP +\f[CR]\-\-execution\f[R] \f[I]specification\f[R] +Specifies an alternate execution engine, where \f[I]specification\f[R] +is an ExecutionControl spec. +See the documentation of the package jdk.jshell.spi for the syntax of +the spec. +.TP +\f[CR]\-\-feedback\f[R] \f[I]mode\f[R] +Sets the initial level of feedback provided in response to what\[aq]s +entered. +The initial level can be overridden within a session by using the +\f[CR]/set feedback\f[R] \f[I]mode\f[R] command. +The default is \f[CR]normal\f[R]. +.RS +.PP +The following values are valid for \f[I]mode\f[R]: +.TP +\f[CR]verbose\f[R] +Provides detailed feedback for entries. +Additional information about the action performed is displayed after the +result of the action. +The next prompt is separated from the feedback by a blank line. +.TP +\f[CR]normal\f[R] +Provides an average amount of feedback. +The next prompt is separated from the feedback by a blank line. +.TP +\f[CR]concise\f[R] +Provides minimal feedback. +The next prompt immediately follows the code snippet or feedback. +.TP +\f[CR]silent\f[R] +Provides no feedback. +The next prompt immediately follows the code snippet. +.TP +\f[I]custom\f[R] +Provides custom feedback based on how the mode is defined. +Custom feedback modes are created within JShell by using the +\f[CR]/set mode\f[R] command. +.RE +.TP +\f[CR]\-\-help\f[R] or \f[CR]\-h\f[R] or \f[CR]\-?\f[R] +Prints a summary of standard options and exits the tool. +.TP +\f[CR]\-\-help\-extra\f[R] or \f[CR]\-X\f[R] +Prints a summary of nonstandard options and exits the tool. +Nonstandard options are subject to change without notice. +.TP +\f[CR]\-J\f[R]\f[I]flag\f[R] +passes \f[I]flag\f[R] to the runtime system, but has no effect on the +execution of code snippets. +To specify flags that affect the execution of code snippets, use +\f[CR]\-R\f[R]\f[I]flag\f[R]. +Alternatively, use \f[CR]\-J\f[R]\f[I]flag\f[R] with +\f[CR]\-\-execution local\f[R]. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]modulepath\f[R] +Specifies where to find application modules. +For Linux and macOS, use a colon (:) to separate items in the path. +For Windows, use a semicolon (;) to separate items. +.TP +\f[CR]\-\-no\-startup\f[R] +Prevents startup scripts from running when JShell starts. +Use this option to run only the scripts entered on the command line when +JShell is started, or to start JShell without any preloaded information +if no scripts are entered. +This option can\[aq]t be used if the \f[CR]\-\-startup\f[R] option is +used. +.TP +\f[CR]\-q\f[R] +Sets the feedback mode to \f[CR]concise\f[R], which is the same as +entering \f[CR]\-\-feedback concise\f[R]. +.TP +\f[CR]\-R\f[R]\f[I]flag\f[R] +passes \f[I]flag\f[R] to the runtime system only when code snippets are +executed. +For example, \f[CR]\-R\-Dfoo=bar\f[R] means that execution of the +snippet \f[CR]System.getProperty(\[dq]foo\[dq])\f[R] will return +\f[CR]\[dq]bar\[dq]\f[R]. +.TP +\f[CR]\-s\f[R] +Sets the feedback mode to \f[CR]silent\f[R], which is the same as +entering \f[CR]\-\-feedback silent\f[R]. +.TP +\f[CR]\-\-show\-version\f[R] +Prints version information and enters the tool. +.TP +\f[CR]\-\-startup\f[R] \f[I]file\f[R] +Overrides the default startup script for this session. +The script can contain any valid code snippets or commands. +.RS +.PP +The script can be a local file or one of the following predefined +scripts: +.TP +\f[CR]DEFAULT\f[R] +Loads the default entries, which are commonly used as imports. +.TP +\f[CR]JAVASE\f[R] +Imports all Java SE packages. +.TP +\f[CR]PRINTING\f[R] +Defines \f[CR]print\f[R], \f[CR]println\f[R], and \f[CR]printf\f[R] as +\f[CR]jshell\f[R] methods for use within the tool. +.TP +\f[CR]TOOLING\f[R] +Defines \f[CR]javac\f[R], \f[CR]jar\f[R], and other methods for running +JDK tools via their command\-line interface within the \f[CR]jshell\f[R] +tool. +.PP +For more than one script, provide a separate instance of this option for +each script. +Startup scripts are run when JShell is first started and when the +session is restarted with the \f[CR]/reset\f[R], \f[CR]/reload\f[R], or +\f[CR]/env\f[R] command. +Startup scripts are run in the order in which they\[aq]re entered on the +command line. +.PP +This option can\[aq]t be used if the \f[CR]\-\-no\-startup\f[R] option +is used. +.RE +.TP +\f[CR]\-v\f[R] +Sets the feedback mode to \f[CR]verbose\f[R], which is the same as +entering \f[CR]\-\-feedback verbose\f[R]. +.TP +\f[CR]\-\-version\f[R] +Prints version information and exits the tool. +.SH JSHELL COMMANDS +Within the \f[CR]jshell\f[R] tool, commands are used to modify the +environment and manage code snippets. +.TP +\f[CR]/drop\f[R] {\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Drops snippets identified by name, ID, or ID range, making them +inactive. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +Use the \f[CR]/list\f[R] command to see the IDs of code snippets. +.TP +\f[CR]/edit\f[R] [\f[I]option\f[R]] +Opens an editor. +If no option is entered, then the editor opens with the active snippets. +.RS +.PP +The following options are valid: +.TP +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Opens the editor with the snippets identified by name, ID, or ID range. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +Use the \f[CR]/list\f[R] command to see the IDs of code snippets. +.TP +\f[CR]\-all\f[R] +Opens the editor with all snippets, including startup snippets and +snippets that failed, were overwritten, or were dropped. +.TP +\f[CR]\-start\f[R] +Opens the editor with startup snippets that were evaluated when JShell +was started. +.PP +To exit edit mode, close the editor window, or respond to the prompt +provided if the \f[CR]\-wait\f[R] option was used when the editor was +set. +.PP +Use the \f[CR]/set editor\f[R] command to specify the editor to use. +If no editor is set, then the following environment variables are +checked in order: \f[CR]JSHELLEDITOR\f[R], \f[CR]VISUAL\f[R], and +\f[CR]EDITOR\f[R]. +If no editor is set in JShell and none of the editor environment +variables is set, then a simple default editor is used. +.RE +.TP +\f[CR]/env\f[R] [\f[I]options\f[R]] +Displays the environment settings, or updates the environment settings +and restarts the session. +If no option is entered, then the current environment settings are +displayed. +If one or more options are entered, then the session is restarted as +follows: +.RS +.IP \[bu] 2 +Updates the environment settings with the provided options. +.IP \[bu] 2 +Resets the execution state. +.IP \[bu] 2 +Runs the startup scripts. +.IP \[bu] 2 +Silently replays the history in the order entered. +The history includes all valid snippets or \f[CR]/drop\f[R] commands +entered at the \f[CR]jshell\f[R] prompt, in scripts entered on the +command line, or scripts entered with the \f[CR]/open\f[R] command. +.PP +Environment settings entered on the command line or provided with a +previous \f[CR]/reset\f[R], \f[CR]/env\f[R], or \f[CR]/reload\f[R] +command are maintained unless an \f[I]option\f[R] is entered that +overwrites the setting. +.PP +The following options are valid: +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Specifies the root modules to resolve in addition to the initial module. +.TP +\f[CR]\-\-add\-exports\f[R] \f[I]source\-module\f[R]\f[CR]/\f[R]\f[I]package\f[R]\f[CR]=\f[R]\f[I]target\-module\f[R][\f[CR],\f[R]\f[I]target\-module\f[R]]* +Adds an export of \f[I]package\f[R] from \f[I]source\-module\f[R] to +\f[I]target\-module\f[R]. +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Specifies the directories and archives that are searched to locate class +files. +This option overrides the path in the \f[CR]CLASSPATH\f[R] environment +variable. +If the environment variable isn\[aq]t set and this option isn\[aq]t +used, then the current directory is searched. +For Linux and macOS, use a colon (\f[CR]:\f[R]) to separate items in the +path. +For Windows, use a semicolon (\f[CR];\f[R]) to separate items. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]modulepath\f[R] +Specifies where to find application modules. +For Linux and macOS, use a colon (\f[CR]:\f[R]) to separate items in the +path. +For Windows, use a semicolon (\f[CR];\f[R]) to separate items. +.RE +.TP +\f[CR]/exit\f[R] [\f[I]integer\-expression\-snippet\f[R]] +Exits the tool. +If no snippet is entered, the exit status is zero. +If a snippet is entered and the result of the snippet is an integer, the +result is used as the exit status. +If an error occurs, or the result of the snippet is not an integer, an +error is displayed and the tool remains active. +.TP +\f[CR]/history\f[R] +Displays what was entered in this session. +.TP +\f[CR]/help\f[R] [\f[I]command\f[R]|\f[I]subject\f[R]] +Displays information about commands and subjects. +If no options are entered, then a summary of information for all +commands and a list of available subjects are displayed. +If a valid command is provided, then expanded information for that +command is displayed. +If a valid subject is entered, then information about that subject is +displayed. +.RS +.PP +The following values for \f[I]subject\f[R] are valid: +.TP +\f[CR]context\f[R] +Describes the options that are available for configuring the +environment. +.TP +\f[CR]intro\f[R] +Provides an introduction to the tool. +.TP +\f[CR]shortcuts\f[R] +Describes keystrokes for completing commands and snippets. +See \f[B]Input Shortcuts\f[R]. +.RE +.TP +\f[CR]/imports\f[R] +Displays the current active imports, including those from the startup +scripts and scripts that were entered on the command line when JShell +was started. +.TP +\f[CR]/list\f[R] [\f[I]option\f[R]] +Displays a list of snippets and their IDs. +If no option is entered, then all active snippets are displayed, but +startup snippets aren\[aq]t. +.RS +.PP +The following options are valid: +.TP +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Displays the snippets identified by name, ID, or ID range. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +.TP +\f[CR]\-all\f[R] +Displays all snippets, including startup snippets and snippets that +failed, were overwritten, or were dropped. +IDs that begin with \f[CR]s\f[R] are startup snippets. +IDs that begin with \f[CR]e\f[R] are snippets that failed. +.TP +\f[CR]\-start\f[R] +Displays startup snippets that were evaluated when JShell was started. +.RE +.TP +\f[CR]/methods\f[R] [\f[I]option\f[R]] +Displays information about the methods that were entered. +If no option is entered, then the name, parameter types, and return type +of all active methods are displayed. +.RS +.PP +The following options are valid: +.TP +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Displays information for methods identified by name, ID, or ID range. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +Use the \f[CR]/list\f[R] command to see the IDs of code snippets. +.TP +\f[CR]\-all\f[R] +Displays information for all methods, including those added when JShell +was started, and methods that failed, were overwritten, or were dropped. +.TP +\f[CR]\-start\f[R] +Displays information for startup methods that were added when JShell was +started. +.RE +.TP +\f[CR]/open\f[R] \f[I]file\f[R] +Opens the script specified and reads the snippets into the tool. +The script can be a local file or one of the following predefined +scripts: +.RS +.TP +\f[CR]DEFAULT\f[R] +Loads the default entries, which are commonly used as imports. +.TP +\f[CR]JAVASE\f[R] +Imports all Java SE packages. +.TP +\f[CR]PRINTING\f[R] +Defines \f[CR]print\f[R], \f[CR]println\f[R], and \f[CR]printf\f[R] as +\f[CR]jshell\f[R] methods for use within the tool. +.TP +\f[CR]TOOLING\f[R] +Defines \f[CR]javac\f[R], \f[CR]jar\f[R], and other methods for running +JDK tools via their command\-line interface within the \f[CR]jshell\f[R] +tool. +.RE +.TP +\f[CR]/reload\f[R] [\f[I]options\f[R]] +Restarts the session as follows: +.RS +.IP \[bu] 2 +Updates the environment settings with the provided options, if any. +.IP \[bu] 2 +Resets the execution state. +.IP \[bu] 2 +Runs the startup scripts. +.IP \[bu] 2 +Replays the history in the order entered. +The history includes all valid snippets or \f[CR]/drop\f[R] commands +entered at the \f[CR]jshell\f[R] prompt, in scripts entered on the +command line, or scripts entered with the \f[CR]/open\f[R] command. +.PP +Environment settings entered on the command line or provided with a +previous \f[CR]/reset\f[R], \f[CR]/env\f[R], or \f[CR]/reload\f[R] +command are maintained unless an \f[I]option\f[R] is entered that +overwrites the setting. +.PP +The following options are valid: +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Specifies the root modules to resolve in addition to the initial module. +.TP +\f[CR]\-\-add\-exports\f[R] \f[I]source\-module\f[R]\f[CR]/\f[R]\f[I]package\f[R]\f[CR]=\f[R]\f[I]target\-module\f[R][\f[CR],\f[R]\f[I]target\-module\f[R]]* +Adds an export of \f[I]package\f[R] from \f[I]source\-module\f[R] to +\f[I]target\-module\f[R]. +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Specifies the directories and archives that are searched to locate class +files. +This option overrides the path in the \f[CR]CLASSPATH\f[R] environment +variable. +If the environment variable isn\[aq]t set and this option isn\[aq]t +used, then the current directory is searched. +For Linux and macOS, use a colon (\f[CR]:\f[R]) to separate items in the +path. +For Windows, use a semicolon (\f[CR];\f[R]) to separate items. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]modulepath\f[R] +Specifies where to find application modules. +For Linux and macOS, use a colon (\f[CR]:\f[R]) to separate items in the +path. +For Windows, use a semicolon (\f[CR];\f[R]) to separate items. +.TP +\f[CR]\-quiet\f[R] +Replays the valid history without displaying it. +Errors are displayed. +.TP +\f[CR]\-restore\f[R] +Resets the environment to the state at the start of the previous run of +the tool or to the last time a \f[CR]/reset\f[R], \f[CR]/reload\f[R], or +\f[CR]/env\f[R] command was executed in the previous run. +The valid history since that point is replayed. +Use this option to restore a previous JShell session. +.RE +.TP +\f[CR]/reset\f[R] [\f[I]options\f[R]] +Discards all entered snippets and restarts the session as follows: +.RS +.IP \[bu] 2 +Updates the environment settings with the provided options, if any. +.IP \[bu] 2 +Resets the execution state. +.IP \[bu] 2 +Runs the startup scripts. +.PP +History is not replayed. +All code that was entered is lost. +.PP +Environment settings entered on the command line or provided with a +previous \f[CR]/reset\f[R], \f[CR]/env\f[R], or \f[CR]/reload\f[R] +command are maintained unless an \f[I]option\f[R] is entered that +overwrites the setting. +.PP +The following options are valid: +.TP +\f[CR]\-\-add\-modules\f[R] \f[I]module\f[R][\f[CR],\f[R]\f[I]module\f[R]...] +Specifies the root modules to resolve in addition to the initial module. +.TP +\f[CR]\-\-add\-exports\f[R] \f[I]source\-module\f[R]\f[CR]/\f[R]\f[I]package\f[R]\f[CR]=\f[R]\f[I]target\-module\f[R][\f[CR],\f[R]\f[I]target\-module\f[R]]* +Adds an export of \f[I]package\f[R] from \f[I]source\-module\f[R] to +\f[I]target\-module\f[R]. +.TP +\f[CR]\-\-class\-path\f[R] \f[I]path\f[R] +Specifies the directories and archives that are searched to locate class +files. +This option overrides the path in the \f[CR]CLASSPATH\f[R] environment +variable. +If the environment variable isn\[aq]t set and this option isn\[aq]t +used, then the current directory is searched. +For Linux and macOS, use a colon (\f[CR]:\f[R]) to separate items in the +path. +For Windows, use a semicolon (\f[CR];\f[R]) to separate items. +.TP +\f[CR]\-\-module\-path\f[R] \f[I]modulepath\f[R] +Specifies where to find application modules. +For Linux and macOS, use a colon (\f[CR]:\f[R]) to separate items in the +path. +For Windows, use a semicolon (\f[CR];\f[R]) to separate items. +.RE +.TP +\f[CR]/save\f[R] [\f[I]options\f[R]] \f[I]file\f[R] +Saves snippets and commands to the file specified. +If no options are entered, then active snippets are saved. +.RS +.PP +The following options are valid: +.TP +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Saves the snippets and commands identified by name, ID, or ID range. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +Use the \f[CR]/list\f[R] command to see the IDs of the code snippets. +.TP +\f[CR]\-all\f[R] +Saves all snippets, including startup snippets and snippets that were +overwritten or failed. +.TP +\f[CR]\-history\f[R] +Saves the sequential history of all commands and snippets entered in the +current session. +.TP +\f[CR]\-start\f[R] +Saves the current startup settings. +If no startup scripts were provided, then an empty file is saved. +.RE +.TP +\f[CR]/set\f[R] [\f[I]setting\f[R]] +Sets configuration information, including the external editor, startup +settings, and feedback mode. +This command is also used to create a custom feedback mode with +customized prompt, format, and truncation values. +If no setting is entered, then the current setting for the editor, +startup settings, and feedback mode are displayed. +.RS +.PP +The following values are valid for \f[CR]setting\f[R]: +.TP +\f[CR]editor\f[R] [\f[I]options\f[R]] [\f[I]command\f[R]] +Sets the command used to start an external editor when the +\f[CR]/edit\f[R] command is entered. +The command can include command arguments separated by spaces. +If no command or options are entered, then the current setting is +displayed. +.RS +.PP +The following options are valid: +.TP +\f[CR]\-default\f[R] +Sets the editor to the default editor provided with JShell. +This option can\[aq]t be used if a command for starting an editor is +entered. +.TP +\f[CR]\-delete\f[R] +Sets the editor to the one in effect when the session started. +If used with the \f[CR]\-retain\f[R] option, then the retained editor +setting is deleted and the editor is set to the first of the following +environment variables found: \f[CR]JSHELLEDITOR\f[R], \f[CR]VISUAL\f[R], +or \f[CR]EDITOR\f[R]. +If none of the editor environment variables are set, then this option +sets the editor to the default editor. +.RS +.PP +This option can\[aq]t be used if a command for starting an editor is +entered. +.RE +.TP +\f[CR]\-retain\f[R] +Saves the editor setting across sessions. +If no other option or a command is entered, then the current setting is +saved. +.TP +\f[CR]\-wait\f[R] +Prompts the user to indicate when editing is complete. +Otherwise control returns to JShell when the editor exits. +Use this option if the editor being used exits immediately, for example, +when an edit window already exists. +This option is valid only when a command for starting an editor is +entered. +.RE +.TP +\f[CR]feedback\f[R] [\f[I]mode\f[R]] +Sets the feedback mode used to respond to input. +If no mode is entered, then the current mode is displayed. +.RS +.PP +The following modes are valid: \f[CR]concise\f[R], \f[CR]normal\f[R], +\f[CR]silent\f[R], \f[CR]verbose\f[R], and any custom mode created with +the \f[CR]/set mode\f[R] command. +.RE +.TP +\f[CR]format\f[R] \f[I]mode\f[R] \f[I]field\f[R] \f[CR]\[dq]\f[R]\f[I]format\-string\f[R]\f[CR]\[dq]\f[R] \f[I]selector\f[R] +Sets the format of the feedback provided in response to input. +If no mode is entered, then the current formats for all fields for all +feedback modes are displayed. +If only a mode is entered, then the current formats for that mode are +displayed. +If only a mode and field are entered, then the current formats for that +field are displayed. +.RS +.PP +To define a format, the following arguments are required: +.TP +\f[I]mode\f[R] +Specifies a feedback mode to which the response format is applied. +Only custom modes created with the \f[CR]/set mode\f[R] command can be +modified. +.TP +\f[I]field\f[R] +Specifies a context\-specific field to which the response format is +applied. +The fields are described in the online help, which is accessed from +JShell using the \f[CR]/help /set format\f[R] command. +.TP +\f[CR]\[dq]\f[R]\f[I]format\-string\f[R]\f[CR]\[dq]\f[R] +Specifies the string to use as the response format for the specified +field and selector. +The structure of the format string is described in the online help, +which is accessed from JShell using the \f[CR]/help /set format\f[R] +command. +.TP +\f[I]selector\f[R] +Specifies the context in which the response format is applied. +The selectors are described in the online help, which is accessed from +JShell using the \f[CR]/help /set format\f[R] command. +.RE +.TP +\f[CR]mode\f[R] [\f[I]mode\-name\f[R]] [\f[I]existing\-mode\f[R]] [\f[I]options\f[R]] +Creates a custom feedback mode with the mode name provided. +If no mode name is entered, then the settings for all modes are +displayed, which includes the mode, prompt, format, and truncation +settings. +If the name of an existing mode is provided, then the settings from the +existing mode are copied to the mode being created. +.RS +.PP +The following options are valid: +.TP +\f[CR]\-command\f[R]|\f[CR]\-quiet\f[R] +Specifies the level of feedback displayed for commands when using the +mode. +This option is required when creating a feedback mode. +Use \f[CR]\-command\f[R] to show information and verification feedback +for commands. +Use \f[CR]\-quiet\f[R] to show only essential feedback for commands, +such as error messages. +.TP +\f[CR]\-delete\f[R] +Deletes the named feedback mode for this session. +The name of the mode to delete is required. +To permanently delete a retained mode, use the \f[CR]\-retain\f[R] +option with this option. +Predefined modes can\[aq]t be deleted. +.TP +\f[CR]\-retain\f[R] +Saves the named feedback mode across sessions. +The name of the mode to retain is required. +.PP +Configure the new feedback mode using the \f[CR]/set prompt\f[R], +\f[CR]/set format\f[R], and \f[CR]/set truncation\f[R] commands. +.PP +To start using the new mode, use the \f[CR]/set feedback\f[R] command. +.RE +.TP +\f[CR]prompt\f[R] \f[I]mode\f[R] \f[CR]\[dq]\f[R]\f[I]prompt\-string\f[R]\f[CR]\[dq]\f[R] \f[CR]\[dq]\f[R]\f[I]continuation\-prompt\-string\f[R]\f[CR]\[dq]\f[R] +Sets the prompts for input within JShell. +If no mode is entered, then the current prompts for all feedback modes +are displayed. +If only a mode is entered, then the current prompts for that mode are +displayed. +.RS +.PP +To define a prompt, the following arguments are required: +.TP +\f[I]mode\f[R] +Specifies the feedback mode to which the prompts are applied. +Only custom modes created with the \f[CR]/set mode\f[R] command can be +modified. +.TP +\f[CR]\[dq]\f[R]\f[I]prompt\-string\f[R]\f[CR]\[dq]\f[R] +Specifies the string to use as the prompt for the first line of input. +.TP +\f[CR]\[dq]\f[R]\f[I]continuation\-prompt\-string\f[R]\f[CR]\[dq]\f[R] +Specifies the string to use as the prompt for the additional input lines +needed to complete a snippet. +.RE +.TP +\f[CR]start\f[R] [\f[CR]\-retain\f[R]] [\f[I]file\f[R] [\f[I]file\f[R]...]|\f[I]option\f[R]] +Sets the names of the startup scripts used when the next +\f[CR]/reset\f[R], \f[CR]/reload\f[R], or \f[CR]/env\f[R] command is +entered. +If more than one script is entered, then the scripts are run in the +order entered. +If no scripts or options are entered, then the current startup settings +are displayed. +.RS +.PP +The scripts can be local files or one of the following predefined +scripts: +.TP +\f[CR]DEFAULT\f[R] +Loads the default entries, which are commonly used as imports. +.TP +\f[CR]JAVASE\f[R] +Imports all Java SE packages. +.TP +\f[CR]PRINTING\f[R] +Defines \f[CR]print\f[R], \f[CR]println\f[R], and \f[CR]printf\f[R] as +\f[CR]jshell\f[R] methods for use within the tool. +.TP +\f[CR]TOOLING\f[R] +Defines \f[CR]javac\f[R], \f[CR]jar\f[R], and other methods for running +JDK tools via their command\-line interface within the \f[CR]jshell\f[R] +tool. +.PP +The following options are valid: +.TP +\f[CR]\-default\f[R] +Sets the startup settings to the default settings. +.TP +\f[CR]\-none\f[R] +Specifies that no startup settings are used. +.PP +Use the \f[CR]\-retain\f[R] option to save the start setting across +sessions. +.RE +.TP +\f[CR]truncation\f[R] \f[I]mode\f[R] \f[I]length\f[R] \f[I]selector\f[R] +Sets the maximum length of a displayed value. +If no mode is entered, then the current truncation values for all +feedback modes are displayed. +If only a mode is entered, then the current truncation values for that +mode are displayed. +.RS +.PP +To define truncation values, the following arguments are required: +.TP +\f[I]mode\f[R] +Specifies the feedback mode to which the truncation value is applied. +Only custom modes created with the \f[CR]/set mode\f[R] command can be +modified. +.TP +\f[I]length\f[R] +Specifies the unsigned integer to use as the maximum length for the +specified selector. +.TP +\f[I]selector\f[R] +Specifies the context in which the truncation value is applied. +The selectors are described in the online help, which is accessed from +JShell using the \f[CR]/help /set truncation\f[R] command. +.RE +.RE +.TP +\f[CR]/types\f[R] [\f[I]option\f[R]] +Displays classes, interfaces, and enums that were entered. +If no option is entered, then all current active classes, interfaces, +and enums are displayed. +.RS +.PP +The following options are valid: +.TP +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Displays information for classes, interfaces, and enums identified by +name, ID, or ID range. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +Use the \f[CR]/list\f[R] command to see the IDs of the code snippets. +.TP +\f[CR]\-all\f[R] +Displays information for all classes, interfaces, and enums, including +those added when JShell was started, and classes, interfaces, and enums +that failed, were overwritten, or were dropped. +.TP +\f[CR]\-start\f[R] +Displays information for startup classes, interfaces, and enums that +were added when JShell was started. +.RE +.TP +\f[CR]/vars\f[R] [\f[I]option\f[R]] +Displays the name, type, and value of variables that were entered. +If no option is entered, then all current active variables are +displayed. +.RS +.PP +The following options are valid: +.TP +{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Displays information for variables identified by name, ID, or ID range. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +Use the \f[CR]/list\f[R] command to see the IDs of the code snippets. +.TP +\f[CR]\-all\f[R] +Displays information for all variables, including those added when +JShell was started, and variables that failed, were overwritten, or were +dropped. +.TP +\f[CR]\-start\f[R] +Displays information for startup variables that were added when JShell +was started. +.RE +.TP +\f[CR]/?\f[R] +Same as the \f[CR]/help\f[R] command. +.TP +\f[CR]/!\f[R] +Reruns the last snippet. +.TP +\f[CR]/\f[R]{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]} [{\f[I]name\f[R]|\f[I]id\f[R]|\f[I]startID\f[R]\f[CR]\-\f[R]\f[I]endID\f[R]}...] +Reruns the snippets identified by ID, range of IDs, or name. +For a range of IDs, provide the starting ID and ending ID separated with +a hyphen. +To provide a list, separate the items in the list with a space. +The first item in the list must be an ID or ID range. +Use the \f[CR]/list\f[R] command to see the IDs of the code snippets. +.TP +\f[CR]/\-\f[R]\f[I]n\f[R] +Reruns the \-\f[I]n\f[R]th previous snippet. +For example, if 15 code snippets were entered, then \f[CR]/\-4\f[R] runs +the 11th snippet. +Commands aren\[aq]t included in the count. +.SH INPUT SHORTCUTS +The following shortcuts are available for entering commands and snippets +in JShell. +.SS Tab completion +.TP +\f[B]<tab>\f[R] +When entering snippets, commands, subcommands, command arguments, or +command options, use the Tab key to automatically complete the item. +If the item can\[aq]t be determined from what was entered, then possible +options are provided. +.RS +.PP +When entering a method call, use the Tab key after the method call\[aq]s +opening parenthesis to see the parameters for the method. +If the method has more than one signature, then all signatures are +displayed. +Pressing the Tab key a second time displays the description of the +method and the parameters for the first signature. +Continue pressing the Tab key for a description of any additional +signatures. +.RE +.TP +\f[B]Shift+<Tab> V\f[R] +After entering a complete expression, use this key sequence to convert +the expression to a variable declaration of a type determined by the +type of the expression. +.TP +\f[B]Shift+<Tab> M\f[R] +After entering a complete expression or statement, use this key sequence +to convert the expression or statement to a method declaration. +If an expression is entered, the return type is based on the type of the +expression. +.TP +\f[B]Shift+<Tab> I\f[R] +When an identifier is entered that can\[aq]t be resolved, use this key +sequence to show possible imports that resolve the identifier based on +the content of the specified class path. +.SS Command abbreviations +An abbreviation of a command is accepted if the abbreviation uniquely +identifies a command. +For example, \f[CR]/l\f[R] is recognized as the \f[CR]/list\f[R] +command. +However, \f[CR]/s\f[R] isn\[aq]t a valid abbreviation because it +can\[aq]t be determined if the \f[CR]/set\f[R] or \f[CR]/save\f[R] +command is meant. +Use \f[CR]/se\f[R] for the \f[CR]/set\f[R] command or \f[CR]/sa\f[R] for +the \f[CR]/save\f[R] command. +.PP +Abbreviations are also accepted for subcommands, command arguments, and +command options. +For example, use \f[CR]/m \-a\f[R] to display all methods. +.SS History navigation +A history of what was entered is maintained across sessions. +Use the up and down arrows to scroll through commands and snippets from +the current and past sessions. +Use the Ctrl key with the up and down arrows to skip all but the first +line of multiline snippets. +.SS History search +Use the Ctrl+R key combination to search the history for the string +entered. +The prompt changes to show the string and the match. +Ctrl+R searches backwards from the current location in the history +through earlier entries. +Ctrl+S searches forward from the current location in the history though +later entries. +.SH INPUT EDITING +The editing capabilities of JShell are similar to that of other common +shells. +Keyboard keys and key combinations provide line editing shortcuts. +The Ctrl key and Meta key are used in key combinations. +If your keyboard doesn\[aq]t have a Meta key, then the Alt key is often +mapped to provide Meta key functionality. +.PP +Line Editing Shortcuts +.TS +tab(@); +l l. +T{ +Key or Key Combination +T}@T{ +Action +T} +_ +T{ +Return +T}@T{ +Enter the current line. +T} +T{ +Left arrow +T}@T{ +Move the cursor to the left one character. +T} +T{ +Right arrow +T}@T{ +Move the cursor to the right one character. +T} +T{ +Ctrl+A +T}@T{ +Move the cursor to the beginning of the line. +T} +T{ +Ctrl+E +T}@T{ +Move the cursor to the end of the line. +T} +T{ +Meta+B +T}@T{ +Move the cursor to the left one word. +T} +T{ +Meta+F +T}@T{ +Move the cursor to the right one word. +T} +T{ +Delete +T}@T{ +Delete the character under the cursor. +T} +T{ +Backspace +T}@T{ +Delete the character before the cursor. +T} +T{ +Ctrl+K +T}@T{ +Delete the text from the cursor to the end of the line. +T} +T{ +Meta+D +T}@T{ +Delete the text from the cursor to the end of the word. +T} +T{ +Ctrl+W +T}@T{ +Delete the text from the cursor to the previous white space. +T} +T{ +Ctrl+Y +T}@T{ +Paste the most recently deleted text into the line. +T} +T{ +Meta+Y +T}@T{ +After Ctrl+Y, press to cycle through the previously deleted text. +T} +.TE +.SH EXAMPLE OF STARTING AND STOPPING A JSHELL SESSION +JShell is provided with the JDK. +To start a session, enter \f[CR]jshell\f[R] on the command line. +A welcome message is printed, and a prompt for entering commands and +snippets is provided. +.IP +.EX +% jshell +| Welcome to JShell \-\- Version 9 +| For an introduction type: /help intro + +jshell> +.EE +.PP +To see which snippets were automatically loaded when JShell started, use +the \f[CR]/list \-start\f[R] command. +The default startup snippets are import statements for common packages. +The ID for each snippet begins with the letter \f[I]s\f[R], which +indicates it\[aq]s a startup snippet. +.IP +.EX +jshell> /list \-start + + s1 : import java.io.*; + s2 : import java.math.*; + s3 : import java.net.*; + s4 : import java.nio.file.*; + s5 : import java.util.*; + s6 : import java.util.concurrent.*; + s7 : import java.util.function.*; + s8 : import java.util.prefs.*; + s9 : import java.util.regex.*; + s10 : import java.util.stream.*; + +jshell> +.EE +.PP +To end the session, use the \f[CR]/exit\f[R] command. +.IP +.EX +jshell> /exit +| Goodbye + +% +.EE +.SH EXAMPLE OF ENTERING SNIPPETS +Snippets are Java statements, variable definitions, method definitions, +class definitions, import statements, and expressions. +Terminating semicolons are automatically added to the end of a completed +snippet if they\[aq]re missing. +.PP +The following example shows two variables and a method being defined, +and the method being run. +Note that a scratch variable is automatically created to hold the result +because no variable was provided. +.IP +.EX +jshell> int a=4 +a ==> 4 + +jshell> int b=8 +b ==> 8 + +jshell> int square(int i1) { + ...> return i1 * i1; + ...> } +| created method square(int) + +jshell> square(b) +$5 ==> 64 +.EE +.SH EXAMPLE OF CHANGING SNIPPETS +Change the definition of a variable, method, or class by entering it +again. +.PP +The following examples shows a method being defined and the method run: +.IP +.EX +jshell> String grade(int testScore) { + ...> if (testScore >= 90) { + ...> return \[dq]Pass\[dq]; + ...> } + ...> return \[dq]Fail\[dq]; + ...> } +| created method grade(int) + +jshell> grade(88) +$3 ==> \[dq]Fail\[dq] +.EE +.PP +To change the method \f[CR]grade\f[R] to allow more students to pass, +enter the method definition again and change the pass score to +\f[CR]80\f[R]. +Use the up arrow key to retrieve the previous entries to avoid having to +reenter them and make the change in the \f[CR]if\f[R] statement. +The following example shows the new definition and reruns the method to +show the new result: +.IP +.EX +jshell> String grade(int testScore) { + ...> if (testScore >= 80) { + ...> return \[dq]Pass\[dq]; + ...> } + ...> return \[dq]Fail\[dq]; + ...> } +| modified method grade(int) + +jshell> grade(88) +$5 ==> \[dq]Pass\[dq] +.EE +.PP +For snippets that are more than a few lines long, or to make more than a +few changes, use the \f[CR]/edit\f[R] command to open the snippet in an +editor. +After the changes are complete, close the edit window to return control +to the JShell session. +The following example shows the command and the feedback provided when +the edit window is closed. +The \f[CR]/list\f[R] command is used to show that the pass score was +changed to \f[CR]85\f[R]. +.IP +.EX +jshell> /edit grade +| modified method grade(int) +jshell> /list grade + + 6 : String grade(int testScore) { + if (testScore >= 85) { + return \[dq]Pass\[dq]; + } + return \[dq]Fail\[dq]; + } +.EE +.SH EXAMPLE OF CREATING A CUSTOM FEEDBACK MODE +The feedback mode determines the prompt that\[aq]s displayed, the +feedback messages that are provided as snippets are entered, and the +maximum length of a displayed value. +Predefined feedback modes are provided. +Commands for creating custom feedback modes are also provided. +.PP +Use the \f[CR]/set mode\f[R] command to create a new feedback mode. +In the following example, the new mode \f[CR]mymode\f[R], is based on +the predefined feedback mode, \f[CR]normal\f[R], and verifying command +feedback is displayed: +.IP +.EX +jshell> /set mode mymode normal \-command +| Created new feedback mode: mymode +.EE +.PP +Because the new mode is based on the \f[CR]normal\f[R] mode, the prompts +are the same. +The following example shows how to see what prompts are used and then +changes the prompts to custom strings. +The first string represents the standard JShell prompt. +The second string represents the prompt for additional lines in +multiline snippets. +.IP +.EX +jshell> /set prompt mymode +| /set prompt mymode \[dq]\[rs]njshell> \[dq] \[dq] ...> \[dq] + +jshell> /set prompt mymode \[dq]\[rs]nprompt$ \[dq] \[dq] continue$ \[dq] +.EE +.PP +The maximum length of a displayed value is controlled by the truncation +setting. +Different types of values can have different lengths. +The following example sets an overall truncation value of 72, and a +truncation value of 500 for variable value expressions: +.IP +.EX +jshell> /set truncation mymode 72 + +jshell> /set truncation mymode 500 varvalue +.EE +.PP +The feedback displayed after snippets are entered is controlled by the +format setting and is based on the type of snippet entered and the +action taken for that snippet. +In the predefined mode \f[CR]normal\f[R], the string \f[CR]created\f[R] +is displayed when a method is created. +The following example shows how to change that string to +\f[CR]defined\f[R]: +.IP +.EX +jshell> /set format mymode action \[dq]defined\[dq] added\-primary +.EE +.PP +Use the \f[CR]/set feedback\f[R] command to start using the feedback +mode that was just created. +The following example shows the custom mode in use: +.IP +.EX +jshell> /set feedback mymode +| Feedback mode: mymode + +prompt$ int square (int num1){ + continue$ return num1*num1; + continue$ } +| defined method square(int) + +prompt$ +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jstack.1 openjdk-25-25.0.3+9/debian/man/jstack.1 --- openjdk-25-25.0.2+10/debian/man/jstack.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jstack.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,50 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JSTACK" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jstack \- print Java stack traces of Java threads for a specified Java +process +.SH SYNOPSIS +\f[B]Note:\f[R] This command is experimental and unsupported. +.PP +\f[CR]jstack\f[R] [\f[I]options\f[R]] \f[I]pid\f[R] +.TP +\f[I]options\f[R] +This represents the \f[CR]jstack\f[R] command\-line options. +See \f[B]Options for the jstack Command\f[R]. +.TP +\f[I]pid\f[R] +The process ID for which the stack trace is printed. +The process must be a Java process. +To get a list of Java processes running on a machine, use either the +\f[CR]ps\f[R] command or, if the JVM processes are not running in a +separate docker instance, the \f[B]jps\f[R] command. +.SH DESCRIPTION +The \f[CR]jstack\f[R] command prints Java stack traces of Java threads +for a specified Java process. +For each Java frame, the full class name, method name, byte code index +(BCI), and line number, when available, are printed. +C++ mangled names aren\[aq]t demangled. +To demangle C++ names, the output of this command can be piped to +\f[CR]c++filt\f[R]. +When the specified process is running on a 64\-bit JVM, you might need +to specify the \f[CR]\-J\-d64\f[R] option, for example: +\f[CR]jstack \-J\-d64\f[R] \f[I]pid\f[R]. +.PP +\f[B]Note:\f[R] +.PP +This command is unsupported and might not be available in future +releases of the JDK. +In Windows Systems where the \f[CR]dbgeng.dll\f[R] file isn\[aq]t +present, the Debugging Tools for Windows must be installed so that these +tools work. +The \f[CR]PATH\f[R] environment variable needs to contain the location +of the \f[CR]jvm.dll\f[R] that is used by the target process, or the +location from which the core dump file was produced. +.SH OPTIONS FOR THE JSTACK COMMAND +.TP +\f[CR]\-l\f[R] +The long listing option prints additional information about locks. +.TP +\f[CR]\-h\f[R] or \f[CR]\-help\f[R] +Prints a help message. diff -Nru openjdk-25-25.0.2+10/debian/man/jstat.1 openjdk-25-25.0.3+9/debian/man/jstat.1 --- openjdk-25-25.0.2+10/debian/man/jstat.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jstat.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,634 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JSTAT" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jstat \- monitor JVM statistics +.SH SYNOPSIS +\f[B]Note:\f[R] This command is experimental and unsupported. +.PP +\f[CR]jstat\f[R] \f[I]generalOptions\f[R] +.PP +\f[CR]jstat\f[R] \f[I]outputOptions\f[R] [\f[CR]\-t\f[R]] +[\f[CR]\-h\f[R] \f[I]lines\f[R]] \f[I]vmid\f[R] [\f[I]interval\f[R] +[\f[I]count\f[R]]] +.TP +\f[I]generalOptions\f[R] +A single general command\-line option. +See \f[B]General Options\f[R]. +.TP +\f[I]outputOptions\f[R] +An option reported by the \f[CR]\-options\f[R] option. +One or more output options that consist of a single +\f[CR]statOption\f[R], plus any of the \f[CR]\-t\f[R], \f[CR]\-h\f[R], +and \f[CR]\-J\f[R] options. +See \f[B]Output Options for the jstat Command\f[R]. +.TP +\f[CR]\-t\f[R] +Displays a time\-stamp column as the first column of output. +The time stamp is the time since the start time of the target JVM. +.TP +\f[CR]\-h\f[R] \f[I]n\f[R] +Displays a column header every \f[I]n\f[R] samples (output rows), where +\f[I]n\f[R] is a positive integer. +The default value is \f[CR]0\f[R], which displays the column header of +the first row of data. +.TP +\f[I]vmid\f[R] +A virtual machine identifier, which is a string that indicates the +target JVM. +See \f[B]Virtual Machine Identifier\f[R]. +.TP +\f[I]interval\f[R] +The sampling interval in the specified units, seconds (s) or +milliseconds (ms). +Default units are milliseconds. +This must be a positive integer. +When specified, the \f[CR]jstat\f[R] command produces its output at each +interval. +.TP +\f[I]count\f[R] +The number of samples to display. +The default value is infinity, which causes the \f[CR]jstat\f[R] command +to display statistics until the target JVM terminates or the +\f[CR]jstat\f[R] command is terminated. +This value must be a positive integer. +.SH DESCRIPTION +The \f[CR]jstat\f[R] command displays performance statistics for an +instrumented Java HotSpot VM. +The target JVM is identified by its virtual machine identifier, or +\f[CR]vmid\f[R] option. +.PP +The \f[CR]jstat\f[R] command supports two types of options, general +options and output options. +General options cause the \f[CR]jstat\f[R] command to display simple +usage and version information. +Output options determine the content and format of the statistical +output. +.PP +All options and their functionality are subject to change or removal in +future releases. +.SH GENERAL OPTIONS +If you specify one of the general options, then you can\[aq]t specify +any other option or parameter. +.TP +\f[CR]\-help\f[R] +Displays a help message. +.TP +\f[CR]\-options\f[R] +Displays a list of static options. +See \f[B]Output Options for the jstat Command\f[R]. +.SH OUTPUT OPTIONS FOR THE JSTAT COMMAND +If you don\[aq]t specify a general option, then you can specify output +options. +Output options determine the content and format of the \f[CR]jstat\f[R] +command\[aq]s output, and consist of a single \f[CR]statOption\f[R], +plus any of the other output options (\f[CR]\-h\f[R], \f[CR]\-t\f[R], +and \f[CR]\-J\f[R]). +The \f[CR]statOption\f[R] must come first. +.PP +Output is formatted as a table, with columns that are separated by +spaces. +A header row with titles describes the columns. +Use the \f[CR]\-h\f[R] option to set the frequency at which the header +is displayed. +Column header names are consistent among the different options. +In general, if two options provide a column with the same name, then the +data source for the two columns is the same. +.PP +Use the \f[CR]\-t\f[R] option to display a time\-stamp column, labeled +Timestamp as the first column of output. +The Timestamp column contains the elapsed time, in seconds, since the +target JVM started. +The resolution of the time stamp is dependent on various factors and is +subject to variation due to delayed thread scheduling on heavily loaded +systems. +.PP +Use the interval and count parameters to determine how frequently and +how many times, respectively, the \f[CR]jstat\f[R] command displays its +output. +.PP +\f[B]Note:\f[R] +.PP +Don\[aq]t write scripts to parse the \f[CR]jstat\f[R] command\[aq]s +output because the format might change in future releases. +If you write scripts that parse the \f[CR]jstat\f[R] command output, +then expect to modify them for future releases of this tool. +.TP +\f[CR]\-statOption\f[R] +Determines the statistics information that the \f[CR]jstat\f[R] command +displays. +The following lists the available options. +Use the \f[CR]\-options\f[R] general option to display the list of +options for a particular platform installation. +See \f[B]Stat Options and Output\f[R]. +.RS +.PP +\f[CR]class\f[R]: Displays statistics about the behavior of the class +loader. +.PP +\f[CR]compiler\f[R]: Displays statistics about the behavior of the Java +HotSpot VM Just\-in\-Time compiler. +.PP +\f[CR]gc\f[R]: Displays statistics about the behavior of the garbage +collected heap. +.PP +\f[CR]gccapacity\f[R]: Displays statistics about the capacities of the +generations and their corresponding spaces. +.PP +\f[CR]gccause\f[R]: Displays a summary about garbage collection +statistics (same as \f[CR]\-gcutil\f[R]), with the cause of the last and +current (when applicable) garbage collection events. +.PP +\f[CR]gcnew\f[R]: Displays statistics about the behavior of the new +generation. +.PP +\f[CR]gcnewcapacity\f[R]: Displays statistics about the sizes of the new +generations and their corresponding spaces. +.PP +\f[CR]gcold\f[R]: Displays statistics about the behavior of the old +generation and metaspace statistics. +.PP +\f[CR]gcoldcapacity\f[R]: Displays statistics about the sizes of the old +generation. +.PP +\f[CR]gcmetacapacity\f[R]: Displays statistics about the sizes of the +metaspace. +.PP +\f[CR]gcutil\f[R]: Displays a summary about garbage collection +statistics. +.PP +\f[CR]printcompilation\f[R]: Displays Java HotSpot VM compilation method +statistics. +.RE +.TP +\f[CR]\-J\f[R]\f[I]javaOption\f[R] +Passes \f[I]javaOption\f[R] to the Java application launcher. +For example, \f[CR]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +For a complete list of options, see \f[B]java\f[R]. +.SH STAT OPTIONS AND OUTPUT +The following information summarizes the columns that the +\f[CR]jstat\f[R] command outputs for each \f[I]statOption\f[R]. +.TP +\f[CR]\-class\f[R] \f[I]option\f[R] +Class loader statistics. +.RS +.PP +\f[CR]Loaded\f[R]: Number of classes loaded. +.PP +\f[CR]Bytes\f[R]: Number of KB loaded. +.PP +\f[CR]Unloaded\f[R]: Number of classes unloaded. +.PP +\f[CR]Bytes\f[R]: Number of KB unloaded. +.PP +\f[CR]Time\f[R]: Time spent performing class loading and unloading +operations. +.RE +.TP +\f[CR]\-compiler\f[R] \f[I]option\f[R] +Java HotSpot VM Just\-in\-Time compiler statistics. +.RS +.PP +\f[CR]Compiled\f[R]: Number of compilation tasks performed. +.PP +\f[CR]Failed\f[R]: Number of compilations tasks failed. +.PP +\f[CR]Invalid\f[R]: Number of compilation tasks that were invalidated. +.PP +\f[CR]Time\f[R]: Time spent performing compilation tasks. +.PP +\f[CR]FailedType\f[R]: Compile type of the last failed compilation. +.PP +\f[CR]FailedMethod\f[R]: Class name and method of the last failed +compilation. +.RE +.TP +\f[CR]\-gc\f[R] \f[I]option\f[R] +Garbage collected heap statistics. +.RS +.PP +\f[CR]S0C\f[R]: Current survivor space 0 capacity (KB). +.PP +\f[CR]S1C\f[R]: Current survivor space 1 capacity (KB). +.PP +\f[CR]S0U\f[R]: Survivor space 0 utilization (KB). +.PP +\f[CR]S1U\f[R]: Survivor space 1 utilization (KB). +.PP +\f[CR]EC\f[R]: Current eden space capacity (KB). +.PP +\f[CR]EU\f[R]: Eden space utilization (KB). +.PP +\f[CR]OC\f[R]: Current old space capacity (KB). +.PP +\f[CR]OU\f[R]: Old space utilization (KB). +.PP +\f[CR]MC\f[R]: Metaspace Committed Size (KB). +.PP +\f[CR]MU\f[R]: Metaspace utilization (KB). +.PP +\f[CR]CCSC\f[R]: Compressed class committed size (KB). +.PP +\f[CR]CCSU\f[R]: Compressed class space used (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation garbage collection (GC) +events. +.PP +\f[CR]YGCT\f[R]: Young generation garbage collection time. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.PP +\f[CR]FGCT\f[R]: Full garbage collection time. +.PP +\f[CR]GCT\f[R]: Total garbage collection time. +.RE +.TP +\f[CR]\-gccapacity\f[R] \f[I]option\f[R] +Memory pool generation and space capacities. +.RS +.PP +\f[CR]NGCMN\f[R]: Minimum new generation capacity (KB). +.PP +\f[CR]NGCMX\f[R]: Maximum new generation capacity (KB). +.PP +\f[CR]NGC\f[R]: Current new generation capacity (KB). +.PP +\f[CR]S0C\f[R]: Current survivor space 0 capacity (KB). +.PP +\f[CR]S1C\f[R]: Current survivor space 1 capacity (KB). +.PP +\f[CR]EC\f[R]: Current eden space capacity (KB). +.PP +\f[CR]OGCMN\f[R]: Minimum old generation capacity (KB). +.PP +\f[CR]OGCMX\f[R]: Maximum old generation capacity (KB). +.PP +\f[CR]OGC\f[R]: Current old generation capacity (KB). +.PP +\f[CR]OC\f[R]: Current old space capacity (KB). +.PP +\f[CR]MCMN\f[R]: Minimum metaspace capacity (KB). +.PP +\f[CR]MCMX\f[R]: Maximum metaspace capacity (KB). +.PP +\f[CR]MC\f[R]: Metaspace Committed Size (KB). +.PP +\f[CR]CCSMN\f[R]: Compressed class space minimum capacity (KB). +.PP +\f[CR]CCSMX\f[R]: Compressed class space maximum capacity (KB). +.PP +\f[CR]CCSC\f[R]: Compressed class committed size (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.RE +.TP +\f[CR]\-gccause\f[R] \f[I]option\f[R] +This option displays the same summary of garbage collection statistics +as the \f[CR]\-gcutil\f[R] option, but includes the causes of the last +garbage collection event and (when applicable), the current garbage +collection event. +In addition to the columns listed for \f[CR]\-gcutil\f[R], this option +adds the following columns: +.RS +.PP +\f[CR]LGCC\f[R]: Cause of last garbage collection +.PP +\f[CR]GCC\f[R]: Cause of current garbage collection +.RE +.TP +\f[CR]\-gcnew\f[R] \f[I]option\f[R] +New generation statistics. +.RS +.PP +\f[CR]S0C\f[R]: Current survivor space 0 capacity (KB). +.PP +\f[CR]S1C\f[R]: Current survivor space 1 capacity (KB). +.PP +\f[CR]S0U\f[R]: Survivor space 0 utilization (KB). +.PP +\f[CR]S1U\f[R]: Survivor space 1 utilization (KB). +.PP +\f[CR]TT\f[R]: Tenuring threshold. +.PP +\f[CR]MTT\f[R]: Maximum tenuring threshold. +.PP +\f[CR]DSS\f[R]: Desired survivor size (KB). +.PP +\f[CR]EC\f[R]: Current eden space capacity (KB). +.PP +\f[CR]EU\f[R]: Eden space utilization (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]YGCT\f[R]: Young generation garbage collection time. +.RE +.TP +\f[CR]\-gcnewcapacity\f[R] \f[I]option\f[R] +New generation space size statistics. +.RS +.PP +\f[CR]NGCMN\f[R]: Minimum new generation capacity (KB). +.PP +\f[CR]NGCMX\f[R]: Maximum new generation capacity (KB). +.PP +\f[CR]NGC\f[R]: Current new generation capacity (KB). +.PP +\f[CR]S0CMX\f[R]: Maximum survivor space 0 capacity (KB). +.PP +\f[CR]S0C\f[R]: Current survivor space 0 capacity (KB). +.PP +\f[CR]S1CMX\f[R]: Maximum survivor space 1 capacity (KB). +.PP +\f[CR]S1C\f[R]: Current survivor space 1 capacity (KB). +.PP +\f[CR]ECMX\f[R]: Maximum eden space capacity (KB). +.PP +\f[CR]EC\f[R]: Current eden space capacity (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.RE +.TP +\f[CR]\-gcold\f[R] \f[I]option\f[R] +Old generation size statistics. +.RS +.PP +\f[CR]MC\f[R]: Metaspace Committed Size (KB). +.PP +\f[CR]MU\f[R]: Metaspace utilization (KB). +.PP +\f[CR]CCSC\f[R]: Compressed class committed size (KB). +.PP +\f[CR]CCSU\f[R]: Compressed class space used (KB). +.PP +\f[CR]OC\f[R]: Current old space capacity (KB). +.PP +\f[CR]OU\f[R]: Old space utilization (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.PP +\f[CR]FGCT\f[R]: Full garbage collection time. +.PP +\f[CR]GCT\f[R]: Total garbage collection time. +.RE +.TP +\f[CR]\-gcoldcapacity\f[R] \f[I]option\f[R] +Old generation statistics. +.RS +.PP +\f[CR]OGCMN\f[R]: Minimum old generation capacity (KB). +.PP +\f[CR]OGCMX\f[R]: Maximum old generation capacity (KB). +.PP +\f[CR]OGC\f[R]: Current old generation capacity (KB). +.PP +\f[CR]OC\f[R]: Current old space capacity (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.PP +\f[CR]FGCT\f[R]: Full garbage collection time. +.PP +\f[CR]GCT\f[R]: Total garbage collection time. +.RE +.TP +\f[CR]\-gcmetacapacity\f[R] \f[I]option\f[R] +Metaspace size statistics. +.RS +.PP +\f[CR]MCMN\f[R]: Minimum metaspace capacity (KB). +.PP +\f[CR]MCMX\f[R]: Maximum metaspace capacity (KB). +.PP +\f[CR]MC\f[R]: Metaspace Committed Size (KB). +.PP +\f[CR]CCSMN\f[R]: Compressed class space minimum capacity (KB). +.PP +\f[CR]CCSMX\f[R]: Compressed class space maximum capacity (KB). +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.PP +\f[CR]FGCT\f[R]: Full garbage collection time. +.PP +\f[CR]GCT\f[R]: Total garbage collection time. +.RE +.TP +\f[CR]\-gcutil\f[R] \f[I]option\f[R] +Summary of garbage collection statistics. +.RS +.PP +\f[CR]S0\f[R]: Survivor space 0 utilization as a percentage of the +space\[aq]s current capacity. +.PP +\f[CR]S1\f[R]: Survivor space 1 utilization as a percentage of the +space\[aq]s current capacity. +.PP +\f[CR]E\f[R]: Eden space utilization as a percentage of the space\[aq]s +current capacity. +.PP +\f[CR]O\f[R]: Old space utilization as a percentage of the space\[aq]s +current capacity. +.PP +\f[CR]M\f[R]: Metaspace utilization as a percentage of the space\[aq]s +current capacity. +.PP +\f[CR]CCS\f[R]: Compressed class space utilization as a percentage. +.PP +\f[CR]YGC\f[R]: Number of young generation GC events. +.PP +\f[CR]YGCT\f[R]: Young generation garbage collection time. +.PP +\f[CR]FGC\f[R]: Number of full GC events. +.PP +\f[CR]FGCT\f[R]: Full garbage collection time. +.PP +\f[CR]GCT\f[R]: Total garbage collection time. +.RE +.TP +\f[CR]\-printcompilation\f[R] \f[I]option\f[R] +Java HotSpot VM compiler method statistics. +.RS +.PP +\f[CR]Compiled\f[R]: Number of compilation tasks performed by the most +recently compiled method. +.PP +\f[CR]Size\f[R]: Number of bytes of byte code of the most recently +compiled method. +.PP +\f[CR]Type\f[R]: Compilation type of the most recently compiled method. +.PP +\f[CR]Method\f[R]: Class name and method name identifying the most +recently compiled method. +Class name uses a slash (/) instead of a dot (.) +as a name space separator. +The method name is the method within the specified class. +The format for these two fields is consistent with the HotSpot +\f[CR]\-XX:+PrintCompilation\f[R] option. +.RE +.SH VIRTUAL MACHINE IDENTIFIER +The syntax of the \f[CR]vmid\f[R] string corresponds to the syntax of a +URI: +.RS +.PP +[\f[I]protocol\f[R]\f[CR]:\f[R]][\f[CR]//\f[R]]\f[I]lvmid\f[R][\f[CR]\[at]\f[R]\f[I]hostname\f[R][\f[CR]:\f[R]\f[I]port\f[R]][\f[CR]/\f[R]\f[I]servername\f[R]] +.RE +.PP +The syntax of the \f[CR]vmid\f[R] string corresponds to the syntax of a +URI. +The \f[CR]vmid\f[R] string can vary from a simple integer that +represents a local JVM to a more complex construction that specifies a +communications protocol, port number, and other implementation\-specific +values. +.TP +\f[I]protocol\f[R] +The communications protocol. +If the \f[I]protocol\f[R] value is omitted and a host name isn\[aq]t +specified, then the default protocol is a platform\-specific optimized +local protocol. +If the \f[I]protocol\f[R] value is omitted and a host name is specified, +then the default protocol is \f[CR]rmi\f[R]. +.TP +\f[I]lvmid\f[R] +The local virtual machine identifier for the target JVM. +The \f[I]lvmid\f[R] is a platform\-specific value that uniquely +identifies a JVM on a system. +The \f[I]lvmid\f[R] is the only required component of a virtual machine +identifier. +The \f[I]lvmid\f[R] is typically, but not necessarily, the operating +system\[aq]s process identifier for the target JVM process. +You can use the \f[CR]jps\f[R] command to determine the \f[I]lvmid\f[R] +provided the JVM processes is not running in a separate docker instance. +You can also determine the \f[I]lvmid\f[R] on Linux and macOS platforms +with the \f[CR]ps\f[R] command, and on Windows with the Windows Task +Manager. +.TP +\f[I]hostname\f[R] +A host name or IP address that indicates the target host. +If the \f[I]hostname\f[R] value is omitted, then the target host is the +local host. +.TP +\f[I]port\f[R] +The default port for communicating with the remote server. +If the \f[I]hostname\f[R] value is omitted or the \f[I]protocol\f[R] +value specifies an optimized, local protocol, then the \f[I]port\f[R] +value is ignored. +Otherwise, treatment of the \f[I]port\f[R] parameter is +implementation\-specific. +For the default \f[CR]rmi\f[R] protocol, the port value indicates the +port number for the \f[CR]rmiregistry\f[R] on the remote host. +If the \f[I]port\f[R] value is omitted and the \f[I]protocol\f[R] value +indicates \f[CR]rmi\f[R], then the default rmiregistry port (1099) is +used. +.TP +\f[I]servername\f[R] +The treatment of the \f[I]servername\f[R] parameter depends on +implementation. +For the optimized local protocol, this field is ignored. +For the \f[CR]rmi\f[R] protocol, it represents the name of the RMI +remote object on the remote host. +.SH EXAMPLES +This section presents some examples of monitoring a local JVM with an +\f[I]lvmid\f[R] of 21891. +.SH THE GCUTIL OPTION +This example attaches to lvmid 21891 and takes 7 samples at 250 +millisecond intervals and displays the output as specified by the +\f[CR]\-gcutil\f[R] option. +.PP +The output of this example shows that a young generation collection +occurred between the third and fourth sample. +The collection took 0.078 seconds and promoted objects from the eden +space (E) to the old space (O), resulting in an increase of old space +utilization from 66.80% to 68.19%. +Before the collection, the survivor space was 97.02% utilized, but after +this collection it\[aq]s 91.03% utilized. +.IP +.EX +jstat \-gcutil 21891 250 7 + S0 S1 E O M CCS YGC YGCT FGC FGCT GCT + 0.00 97.02 70.31 66.80 95.52 89.14 7 0.300 0 0.000 0.300 + 0.00 97.02 86.23 66.80 95.52 89.14 7 0.300 0 0.000 0.300 + 0.00 97.02 96.53 66.80 95.52 89.14 7 0.300 0 0.000 0.300 + 91.03 0.00 1.98 68.19 95.89 91.24 8 0.378 0 0.000 0.378 + 91.03 0.00 15.82 68.19 95.89 91.24 8 0.378 0 0.000 0.378 + 91.03 0.00 17.80 68.19 95.89 91.24 8 0.378 0 0.000 0.378 + 91.03 0.00 17.80 68.19 95.89 91.24 8 0.378 0 0.000 0.378 +.EE +.SH REPEAT THE COLUMN HEADER STRING +This example attaches to lvmid 21891 and takes samples at 250 +millisecond intervals and displays the output as specified by +\f[CR]\-gcnew\f[R] option. +In addition, it uses the \f[CR]\-h3\f[R] option to output the column +header after every 3 lines of data. +.PP +In addition to showing the repeating header string, this example shows +that between the second and third samples, a young GC occurred. +Its duration was 0.001 seconds. +The collection found enough active data that the survivor space 0 +utilization (S0U) would have exceeded the desired survivor size (DSS). +As a result, objects were promoted to the old generation (not visible in +this output), and the tenuring threshold (TT) was lowered from 31 to 2. +.PP +Another collection occurs between the fifth and sixth samples. +This collection found very few survivors and returned the tenuring +threshold to 31. +.IP +.EX +jstat \-gcnew \-h3 21891 250 + S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + 64.0 64.0 0.0 31.7 31 31 32.0 512.0 178.6 249 0.203 + 64.0 64.0 0.0 31.7 31 31 32.0 512.0 355.5 249 0.203 + 64.0 64.0 35.4 0.0 2 31 32.0 512.0 21.9 250 0.204 + S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + 64.0 64.0 35.4 0.0 2 31 32.0 512.0 245.9 250 0.204 + 64.0 64.0 35.4 0.0 2 31 32.0 512.0 421.1 250 0.204 + 64.0 64.0 0.0 19.0 31 31 32.0 512.0 84.4 251 0.204 + S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT + 64.0 64.0 0.0 19.0 31 31 32.0 512.0 306.7 251 0.204 +.EE +.SH INCLUDE A TIME STAMP FOR EACH SAMPLE +This example attaches to lvmid 21891 and takes 3 samples at 250 +millisecond intervals. +The \f[CR]\-t\f[R] option is used to generate a time stamp for each +sample in the first column. +.PP +The Timestamp column reports the elapsed time in seconds since the start +of the target JVM. +In addition, the \f[CR]\-gcoldcapacity\f[R] output shows the old +generation capacity (OGC) and the old space capacity (OC) increasing as +the heap expands to meet allocation or promotion demands. +The old generation capacity (OGC) has grown from 11,696 KB to 13,820 KB +after the eighty\-first full garbage collection (FGC). +The maximum capacity of the generation (and space) is 60,544 KB (OGCMX), +so it still has room to expand. +.IP +.EX +Timestamp OGCMN OGCMX OGC OC YGC FGC FGCT GCT + 150.1 1408.0 60544.0 11696.0 11696.0 194 80 2.874 3.799 + 150.4 1408.0 60544.0 13820.0 13820.0 194 81 2.938 3.863 + 150.7 1408.0 60544.0 13820.0 13820.0 194 81 2.938 3.863 +.EE +.SH MONITOR INSTRUMENTATION FOR A REMOTE JVM +This example attaches to lvmid 40496 on the system named +\f[CR]remote.domain\f[R] using the \f[CR]\-gcutil\f[R] option, with +samples taken every second indefinitely. +.PP +The lvmid is combined with the name of the remote host to construct a +vmid of \f[CR]40496\[at]remote.domain\f[R]. +This vmid results in the use of the \f[CR]rmi\f[R] protocol to +communicate to the default \f[CR]jstatd\f[R] server on the remote host. +The \f[CR]jstatd\f[R] server is located using the \f[CR]rmiregistry\f[R] +command on \f[CR]remote.domain\f[R] that\[aq]s bound to the default port +of the \f[CR]rmiregistry\f[R] command (port 1099). +.IP +.EX +jstat \-gcutil 40496\[at]remote.domain 1000 +\&... output omitted +.EE diff -Nru openjdk-25-25.0.2+10/debian/man/jstatd.1 openjdk-25-25.0.3+9/debian/man/jstatd.1 --- openjdk-25-25.0.2+10/debian/man/jstatd.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jstatd.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,166 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JSTATD" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jstatd \- monitor the creation and termination of instrumented Java +HotSpot VMs +.SH SYNOPSIS +\f[B]WARNING:\f[R] This command is experimental, unsupported, and +deprecated. +It will be removed in a future release. +.PP +\f[CR]jstatd\f[R] [\f[I]options\f[R]] +.TP +\f[I]options\f[R] +This represents the \f[CR]jstatd\f[R] command\-line options. +See \f[B]Options for the jstatd Command\f[R]. +.SH DESCRIPTION +The \f[CR]jstatd\f[R] command is an RMI server application that monitors +for the creation and termination of instrumented Java HotSpot VMs and +provides an interface to enable remote monitoring tools, +\f[CR]jstat\f[R] and \f[CR]jps\f[R], to attach to JVMs that are running +on the local host and collect information about the JVM process. +.PP +The \f[CR]jstatd\f[R] server requires an RMI registry on the local host. +The \f[CR]jstatd\f[R] server attempts to attach to the RMI registry on +the default port, or on the port you specify with the \f[CR]\-p\f[R] +\f[CR]port\f[R] option. +If an RMI registry is not found, then one is created within the +\f[CR]jstatd\f[R] application that\[aq]s bound to the port that\[aq]s +indicated by the \f[CR]\-p\f[R] \f[CR]port\f[R] option or to the default +RMI registry port when the \f[CR]\-p\f[R] \f[CR]port\f[R] option is +omitted. +You can stop the creation of an internal RMI registry by specifying the +\f[CR]\-nr\f[R] option. +.SH OPTIONS FOR THE JSTATD COMMAND +.TP +\f[CR]\-nr\f[R] +This option does not attempt to create an internal RMI registry within +the \f[CR]jstatd\f[R] process when an existing RMI registry isn\[aq]t +found. +.TP +\f[CR]\-p\f[R] \f[I]port\f[R] +This option sets the port number where the RMI registry is expected to +be found, or when not found, created if the \f[CR]\-nr\f[R] option +isn\[aq]t specified. +.TP +\f[CR]\-r\f[R] \f[I]rmiport\f[R] +This option sets the port number to which the RMI connector is bound. +If not specified a random available port is used. +.TP +\f[CR]\-n\f[R] \f[I]rminame\f[R] +This option sets the name to which the remote RMI object is bound in the +RMI registry. +The default name is \f[CR]JStatRemoteHost\f[R]. +If multiple \f[CR]jstatd\f[R] servers are started on the same host, then +the name of the exported RMI object for each server can be made unique +by specifying this option. +However, doing so requires that the unique server name be included in +the monitoring client\[aq]s \f[CR]hostid\f[R] and \f[CR]vmid\f[R] +strings. +.TP +\f[CR]\-J\f[R]\f[I]option\f[R] +This option passes a Java \f[CR]option\f[R] to the JVM, where the option +is one of those described on the reference page for the Java application +launcher. +For example, \f[CR]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +See \f[B]java\f[R]. +.SH SECURITY +The \f[CR]jstatd\f[R] server can monitor only JVMs for which it has the +appropriate native access permissions. +Therefore, the \f[CR]jstatd\f[R] process must be running with the same +user credentials as the target JVMs. +Some user credentials, such as the root user in Linux and macOS +operating systems, have permission to access the instrumentation +exported by any JVM on the system. +A \f[CR]jstatd\f[R] process running with such credentials can monitor +any JVM on the system, but introduces additional security concerns. +.PP +The \f[CR]jstatd\f[R] server doesn\[aq]t provide any authentication of +remote clients. +Therefore, running a \f[CR]jstatd\f[R] server process exposes the +instrumentation export by all JVMs for which the \f[CR]jstatd\f[R] +process has access permissions to any user on the network. +This exposure might be undesirable in your environment, and therefore, +local security policies should be considered before you start the +\f[CR]jstatd\f[R] process, particularly in production environments or on +networks that aren\[aq]t secure. +.PP +For security purposes, the \f[CR]jstatd\f[R] server uses an RMI +ObjectInputFilter to allow only essential classes to be deserialized. +.PP +If your security concerns can\[aq]t be addressed, then the safest action +is to not run the \f[CR]jstatd\f[R] server and use the \f[CR]jstat\f[R] +and \f[CR]jps\f[R] tools locally. +However, when using \f[CR]jps\f[R] to get a list of instrumented JVMs, +the list will not include any JVMs running in docker containers. +.SH REMOTE INTERFACE +The interface exported by the \f[CR]jstatd\f[R] process is proprietary +and guaranteed to change. +Users and developers are discouraged from writing to this interface. +.SH EXAMPLES +The following are examples of the \f[CR]jstatd\f[R] command. +The \f[CR]jstatd\f[R] scripts automatically start the server in the +background. +.SH INTERNAL RMI REGISTRY +This example shows how to start a \f[CR]jstatd\f[R] session with an +internal RMI registry. +This example assumes that no other server is bound to the default RMI +registry port (port \f[CR]1099\f[R]). +.RS +.PP +\f[CR]jstatd\f[R] +.RE +.SH EXTERNAL RMI REGISTRY +This example starts a \f[CR]jstatd\f[R] session with an external RMI +registry. +.IP +.EX +rmiregistry& +jstatd +.EE +.PP +This example starts a \f[CR]jstatd\f[R] session with an external RMI +registry server on port \f[CR]2020\f[R]. +.IP +.EX +jrmiregistry 2020& +jstatd \-p 2020 +.EE +.PP +This example starts a \f[CR]jstatd\f[R] session with an external RMI +registry server on port \f[CR]2020\f[R] and JMX connector bound to port +\f[CR]2021\f[R]. +.IP +.EX +jrmiregistry 2020& +jstatd \-p 2020 \-r 2021 +.EE +.PP +This example starts a \f[CR]jstatd\f[R] session with an external RMI +registry on port 2020 that\[aq]s bound to +\f[CR]AlternateJstatdServerName\f[R]. +.IP +.EX +rmiregistry 2020& +jstatd \-p 2020 \-n AlternateJstatdServerName +.EE +.SH STOP THE CREATION OF AN IN\-PROCESS RMI REGISTRY +This example starts a \f[CR]jstatd\f[R] session that doesn\[aq]t create +an RMI registry when one isn\[aq]t found. +This example assumes an RMI registry is already running. +If an RMI registry isn\[aq]t running, then an error message is +displayed. +.RS +.PP +\f[CR]jstatd \-nr\f[R] +.RE +.SH ENABLE RMI LOGGING +This example starts a \f[CR]jstatd\f[R] session with RMI logging +capabilities enabled. +This technique is useful as a troubleshooting aid or for monitoring +server activities. +.RS +.PP +\f[CR]jstatd \-J\-Djava.rmi.server.logCalls=true\f[R] +.RE diff -Nru openjdk-25-25.0.2+10/debian/man/jwebserver.1 openjdk-25-25.0.3+9/debian/man/jwebserver.1 --- openjdk-25-25.0.2+10/debian/man/jwebserver.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/jwebserver.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,138 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "JWEBSERVER" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +jwebserver \- launch the Java Simple Web Server +.SH SYNOPSIS +\f[CR]jwebserver\f[R] [\f[I]options\f[R]] +.TP +\f[I]options\f[R] +Command\-line options. +For a detailed description of the options, see \f[B]Options\f[R]. +.SH DESCRIPTION +The \f[CR]jwebserver\f[R] tool provides a minimal HTTP server, designed +to be used for prototyping, testing, and debugging. +It serves a single directory hierarchy, and only serves static files. +Only HTTP/1.1 is supported; HTTP/2 and HTTPS are not supported. +.PP +Only idempotent HEAD and GET requests are served. +Any other requests receive a \f[CR]501 \- Not Implemented\f[R] or a +\f[CR]405 \- Not Allowed\f[R] response. +GET requests are mapped to the directory being served, as follows: +.IP \[bu] 2 +If the requested resource is a file, its content is served. +.IP \[bu] 2 +If the requested resource is a directory that contains an index file, +the content of the index file is served. +.IP \[bu] 2 +Otherwise, the names of all files and subdirectories of the directory +are listed. +Symbolic links and hidden files are not listed or served. +.PP +MIME types are configured automatically, using the built\-in table. +For example, \f[CR].html\f[R] files are served as \f[CR]text/html\f[R] +and \f[CR].java\f[R] files are served as \f[CR]text/plain\f[R]. +.PP +\f[CR]jwebserver\f[R] is located in the jdk.httpserver module, and can +alternatively be started with \f[CR]java \-m jdk.httpserver\f[R]. +It is based on the web server implementation in the +\f[CR]com.sun.net.httpserver\f[R] package. +The \f[CR]com.sun.net.httpserver.SimpleFileServer\f[R] class provides a +programmatic way to retrieve the server and its components for reuse and +extension. +.SH USAGE +.IP +.EX +jwebserver [\-b bind address] [\-p port] [\-d directory] + [\-o none|info|verbose] [\-h to show options] + [\-version to show version information] +.EE +.SH OPTIONS +.TP +\f[CR]\-h\f[R] or \f[CR]\-?\f[R] or \f[CR]\-\-help\f[R] +Prints the help message and exits. +.TP +\f[CR]\-b\f[R] \f[I]addr\f[R] or \f[CR]\-\-bind\-address\f[R] \f[I]addr\f[R] +Specifies the address to bind to. +Default: 127.0.0.1 or ::1 (loopback). +For all interfaces use \f[CR]\-b 0.0.0.0\f[R] or \f[CR]\-b ::\f[R]. +.TP +\f[CR]\-d\f[R] \f[I]dir\f[R] or \f[CR]\-\-directory\f[R] \f[I]dir\f[R] +Specifies the directory to serve. +Default: current directory. +.TP +\f[CR]\-o\f[R] \f[I]level\f[R] or \f[CR]\-\-output\f[R] \f[I]level\f[R] +Specifies the output format. +\f[CR]none\f[R] | \f[CR]info\f[R] | \f[CR]verbose\f[R]. +Default: \f[CR]info\f[R]. +.TP +\f[CR]\-p\f[R] \f[I]port\f[R] or \f[CR]\-\-port\f[R] \f[I]port\f[R] +Specifies the port to listen on. +Default: 8000. +.TP +\f[CR]\-version\f[R] or \f[CR]\-\-version\f[R] +Prints the version information and exits. +.PP +To stop the server, press \f[CR]Ctrl + C\f[R]. +.SH STARTING THE SERVER +The following command starts the Simple Web Server: +.IP +.EX +$ jwebserver +.EE +.PP +If startup is successful, the server prints a message to +\f[CR]System.out\f[R] listing the local address and the absolute path of +the directory being served. +For example: +.IP +.EX +$ jwebserver +Binding to loopback by default. For all interfaces use \[dq]\-b 0.0.0.0\[dq] or \[dq]\-b ::\[dq]. +Serving /cwd and subdirectories on 127.0.0.1 port 8000 +URL http://127.0.0.1:8000/ +.EE +.SH CONFIGURATION +By default, the server runs in the foreground and binds to the loopback +address and port 8000. +This can be changed with the \f[CR]\-b\f[R] and \f[CR]\-p\f[R] options. +For example, to bind the Simple Web Server to all interfaces, use: +.IP +.EX +$ jwebserver \-b 0.0.0.0 +Serving /cwd and subdirectories on 0.0.0.0 (all interfaces) port 8000 +URL http://123.456.7.891:8000/ +.EE +.PP +Note that this makes the web server accessible to all hosts on the +network. +\f[I]Do not do this unless you are sure the server cannot leak any +sensitive information.\f[R] +.PP +As another example, use the following command to run on port 9000: +.IP +.EX +$ jwebserver \-p 9000 +.EE +.PP +By default, the files of the current directory are served. +A different directory can be specified with the \f[CR]\-d\f[R] option. +.PP +By default, every request is logged on the console. +The output looks like this: +.IP +.EX +127.0.0.1 \- \- [10/Feb/2021:14:34:11 +0000] \[dq]GET /some/subdirectory/ HTTP/1.1\[dq] 200 \- +.EE +.PP +Logging output can be changed with the \f[CR]\-o\f[R] option. +The default setting is \f[CR]info\f[R]. +The \f[CR]verbose\f[R] setting additionally includes the request and +response headers as well as the absolute path of the requested resource. +.SH STOPPING THE SERVER +Once started successfully, the server runs until it is stopped. +On Unix platforms, the server can be stopped by sending it a +\f[CR]SIGINT\f[R] signal (\f[CR]Ctrl+C\f[R] in a terminal window). +.SH HELP OPTION +The \f[CR]\-h\f[R] option displays a help message describing the usage +and the options of the \f[CR]jwebserver\f[R]. diff -Nru openjdk-25-25.0.2+10/debian/man/keytool.1 openjdk-25-25.0.3+9/debian/man/keytool.1 --- openjdk-25-25.0.2+10/debian/man/keytool.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/keytool.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,2945 @@ +'\" t +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "KEYTOOL" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +keytool \- a key and certificate management utility +.SH SYNOPSIS +\f[CR]keytool\f[R] [\f[I]commands\f[R]] +.TP +\f[I]commands\f[R] +Commands for \f[CR]keytool\f[R] include the following: +.RS +.IP \[bu] 2 +\f[CR]\-certreq\f[R]: Generates a certificate request +.IP \[bu] 2 +\f[CR]\-changealias\f[R]: Changes an entry\[aq]s alias +.IP \[bu] 2 +\f[CR]\-delete\f[R]: Deletes an entry +.IP \[bu] 2 +\f[CR]\-exportcert\f[R]: Exports certificate +.IP \[bu] 2 +\f[CR]\-genkeypair\f[R]: Generates a key pair +.IP \[bu] 2 +\f[CR]\-genseckey\f[R]: Generates a secret key +.IP \[bu] 2 +\f[CR]\-gencert\f[R]: Generates a certificate from a certificate request +.IP \[bu] 2 +\f[CR]\-importcert\f[R]: Imports a certificate or a certificate chain +.IP \[bu] 2 +\f[CR]\-importpass\f[R]: Imports a password +.IP \[bu] 2 +\f[CR]\-importkeystore\f[R]: Imports one or all entries from another +keystore +.IP \[bu] 2 +\f[CR]\-keypasswd\f[R]: Changes the key password of an entry +.IP \[bu] 2 +\f[CR]\-list\f[R]: Lists entries in a keystore +.IP \[bu] 2 +\f[CR]\-printcert\f[R]: Prints the content of a certificate +.IP \[bu] 2 +\f[CR]\-printcertreq\f[R]: Prints the content of a certificate request +.IP \[bu] 2 +\f[CR]\-printcrl\f[R]: Prints the content of a Certificate Revocation +List (CRL) file +.IP \[bu] 2 +\f[CR]\-storepasswd\f[R]: Changes the store password of a keystore +.IP \[bu] 2 +\f[CR]\-showinfo\f[R]: Displays security\-related information +.IP \[bu] 2 +\f[CR]\-version\f[R]: Prints the program version +.PP +See \f[B]Commands and Options\f[R] for a description of these commands +with their options. +.RE +.SH DESCRIPTION +The \f[CR]keytool\f[R] command is a key and certificate management +utility. +It enables users to administer their own public/private key pairs and +associated certificates for use in self\-authentication (where a user +authenticates themselves to other users and services) or data integrity +and authentication services, by using digital signatures. +The \f[CR]keytool\f[R] command also enables users to cache the public +keys (in the form of certificates) of their communicating peers. +.PP +A certificate is a digitally signed statement from one entity (person, +company, and so on), which says that the public key (and some other +information) of some other entity has a particular value. +When data is digitally signed, the signature can be verified to check +the data integrity and authenticity. +Integrity means that the data hasn\[aq]t been modified or tampered with, +and authenticity means that the data comes from the individual who +claims to have created and signed it. +.PP +The \f[CR]keytool\f[R] command also enables users to administer secret +keys and passphrases used in symmetric encryption and decryption (Data +Encryption Standard). +It can also display other security\-related information. +.PP +The \f[CR]keytool\f[R] command stores the keys and certificates in a +keystore. +.PP +The \f[CR]keytool\f[R] command uses the +\f[CR]jdk.certpath.disabledAlgorithms\f[R] and +\f[CR]jdk.security.legacyAlgorithms\f[R] security properties to +determine which algorithms are considered a security risk. +It emits warnings when disabled or legacy algorithms are being used. +The \f[CR]jdk.certpath.disabledAlgorithms\f[R] and +\f[CR]jdk.security.legacyAlgorithms\f[R] security properties are defined +in the \f[CR]java.security\f[R] file (located in the JDK\[aq]s +\f[CR]$JAVA_HOME/conf/security\f[R] directory). +.SH COMMAND AND OPTION NOTES +The following notes apply to the descriptions in \f[B]Commands and +Options\f[R]: +.IP \[bu] 2 +All command and option names are preceded by a hyphen sign +(\f[CR]\-\f[R]). +.IP \[bu] 2 +Only one command can be provided. +.IP \[bu] 2 +Options for each command can be provided in any order. +.IP \[bu] 2 +There are two kinds of options, one is single\-valued which should be +only provided once. +If a single\-valued option is provided multiple times, the value of the +last one is used. +The other type is multi\-valued, which can be provided multiple times +and all values are used. +The only multi\-valued option currently supported is the +\f[CR]\-ext\f[R] option used to generate X.509v3 certificate extensions. +.IP \[bu] 2 +All items not italicized or in braces ({ }) or brackets ([ ]) are +required to appear as is. +.IP \[bu] 2 +Braces surrounding an option signify that a default value is used when +the option isn\[aq]t specified on the command line. +Braces are also used around the \f[CR]\-v\f[R], \f[CR]\-rfc\f[R], and +\f[CR]\-J\f[R] options, which have meaning only when they appear on the +command line. +They don\[aq]t have any default values. +.IP \[bu] 2 +Brackets surrounding an option signify that the user is prompted for the +values when the option isn\[aq]t specified on the command line. +For the \f[CR]\-keypass\f[R] option, if you don\[aq]t specify the option +on the command line, then the \f[CR]keytool\f[R] command first attempts +to use the keystore password to recover the private/secret key. +If this attempt fails, then the \f[CR]keytool\f[R] command prompts you +for the private/secret key password. +.IP \[bu] 2 +Items in italics (option values) represent the actual values that must +be supplied. +For example, here is the format of the \f[CR]\-printcert\f[R] command: +.RS 2 +.RS +.PP +\f[CR]keytool \-printcert\f[R] {\f[CR]\-file\f[R] \f[I]cert_file\f[R]} +{\f[CR]\-v\f[R]} +.RE +.PP +When you specify a \f[CR]\-printcert\f[R] command, replace +\f[I]cert_file\f[R] with the actual file name, as follows: +\f[CR]keytool \-printcert \-file VScert.cer\f[R] +.RE +.IP \[bu] 2 +Option values must be enclosed in quotation marks when they contain a +blank (space). +.SH COMMANDS AND OPTIONS +The keytool commands and their options can be grouped by the tasks that +they perform. +.PP +\f[B]Commands for Creating or Adding Data to the Keystore\f[R]: +.IP \[bu] 2 +\f[CR]\-gencert\f[R] +.IP \[bu] 2 +\f[CR]\-genkeypair\f[R] +.IP \[bu] 2 +\f[CR]\-genseckey\f[R] +.IP \[bu] 2 +\f[CR]\-importcert\f[R] +.IP \[bu] 2 +\f[CR]\-importpass\f[R] +.PP +\f[B]Commands for Importing Contents from Another Keystore\f[R]: +.IP \[bu] 2 +\f[CR]\-importkeystore\f[R] +.PP +\f[B]Commands for Generating a Certificate Request\f[R]: +.IP \[bu] 2 +\f[CR]\-certreq\f[R] +.PP +\f[B]Commands for Exporting Data\f[R]: +.IP \[bu] 2 +\f[CR]\-exportcert\f[R] +.PP +\f[B]Commands for Displaying Data\f[R]: +.IP \[bu] 2 +\f[CR]\-list\f[R] +.IP \[bu] 2 +\f[CR]\-printcert\f[R] +.IP \[bu] 2 +\f[CR]\-printcertreq\f[R] +.IP \[bu] 2 +\f[CR]\-printcrl\f[R] +.PP +\f[B]Commands for Managing the Keystore\f[R]: +.IP \[bu] 2 +\f[CR]\-storepasswd\f[R] +.IP \[bu] 2 +\f[CR]\-keypasswd\f[R] +.IP \[bu] 2 +\f[CR]\-delete\f[R] +.IP \[bu] 2 +\f[CR]\-changealias\f[R] +.PP +\f[B]Commands for Displaying Security\-related Information\f[R]: +.IP \[bu] 2 +\f[CR]\-showinfo\f[R] +.PP +\f[B]Commands for Displaying Program Version\f[R]: +.IP \[bu] 2 +\f[CR]\-version\f[R] +.SH COMMANDS FOR CREATING OR ADDING DATA TO THE KEYSTORE +.TP +\f[CR]\-gencert\f[R] +The following are the available options for the \f[CR]\-gencert\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-rfc\f[R]}: Output in RFC (Request For Comment) style +.IP \[bu] 2 +{\f[CR]\-infile\f[R] \f[I]infile\f[R]}: Input file name +.IP \[bu] 2 +{\f[CR]\-outfile\f[R] \f[I]outfile\f[R]}: Output file name +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +{\f[CR]\-sigalg\f[R] \f[I]sigalg\f[R]}: Signature algorithm name +.IP \[bu] 2 +{\f[CR]\-dname\f[R] \f[I]dname\f[R]}: Distinguished name +.IP \[bu] 2 +{\f[CR]\-startdate\f[R] \f[I]startdate\f[R]}: Certificate validity start +date and time +.IP \[bu] 2 +{\f[CR]\-ext\f[R] \f[I]ext\f[R]}*: X.509 extension +.IP \[bu] 2 +{\f[CR]\-validity\f[R] \f[I]days\f[R]}: Validity number of days +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Adds a security provider by name (such as SunPKCS11) +with an optional configure argument. +The value of the security provider is the name of a security provider +that is defined in a module. +.RS 2 +.PP +For example, +.RS +.PP +\f[CR]keytool \-addprovider SunPKCS11 \-providerarg some.cfg ...\f[R] +.RE +.PP +\f[B]Note:\f[R] +.PP +For compatibility reasons, the SunPKCS11 provider can still be loaded +with \f[CR]\-providerclass sun.security.pkcs11.SunPKCS11\f[R] even if it +is now defined in a module. +This is the only module included in the JDK that needs a configuration, +and therefore the most widely used with the \f[CR]\-providerclass\f[R] +option. +For legacy security providers located on classpath and loaded by +reflection, \f[CR]\-providerclass\f[R] should still be used. +.RE +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.RS 2 +.PP +For example, if \f[CR]MyProvider\f[R] is a legacy provider loaded via +reflection, +.RS +.PP +\f[CR]keytool \-providerclass com.example.MyProvider ...\f[R] +.RE +.RE +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-gencert\f[R] command to generate a certificate as a +response to a certificate request file (which can be created by the +\f[CR]keytool \-certreq\f[R] command). +The command reads the request either from \f[I]infile\f[R] or, if +omitted, from the standard input, signs it by using the alias\[aq]s +private key, and outputs the X.509 certificate into either +\f[I]outfile\f[R] or, if omitted, to the standard output. +When \f[CR]\-rfc\f[R] is specified, the output format is Base64\-encoded +PEM; otherwise, a binary DER is created. +.PP +The \f[CR]\-sigalg\f[R] value specifies the algorithm that should be +used to sign the certificate. +The \f[I]startdate\f[R] argument is the start time and date that the +certificate is valid. +The \f[I]days\f[R] argument tells the number of days for which the +certificate should be considered valid. +.PP +When \f[I]dname\f[R] is provided, it is used as the subject of the +generated certificate. +Otherwise, the one from the certificate request is used. +.PP +The \f[CR]\-ext\f[R] value shows what X.509 extensions will be embedded +in the certificate. +Read \f[B]Common Command Options\f[R] for the grammar of +\f[CR]\-ext\f[R]. +.PP +The \f[CR]\-gencert\f[R] option enables you to create certificate +chains. +The following example creates a certificate, \f[CR]e1\f[R], that +contains three certificates in its certificate chain. +.PP +The following commands creates four key pairs named \f[CR]ca\f[R], +\f[CR]ca1\f[R], \f[CR]ca2\f[R], and \f[CR]e1\f[R]: +.IP +.EX +keytool \-alias ca \-dname CN=CA \-genkeypair \-keyalg rsa +keytool \-alias ca1 \-dname CN=CA \-genkeypair \-keyalg rsa +keytool \-alias ca2 \-dname CN=CA \-genkeypair \-keyalg rsa +keytool \-alias e1 \-dname CN=E1 \-genkeypair \-keyalg rsa +.EE +.PP +The following two commands create a chain of signed certificates; +\f[CR]ca\f[R] signs \f[CR]ca1\f[R] and \f[CR]ca1\f[R] signs +\f[CR]ca2\f[R], all of which are self\-issued: +.IP +.EX +keytool \-alias ca1 \-certreq | + keytool \-alias ca \-gencert \-ext san=dns:ca1 | + keytool \-alias ca1 \-importcert + +keytool \-alias ca2 \-certreq | + keytool \-alias ca1 \-gencert \-ext san=dns:ca2 | + keytool \-alias ca2 \-importcert +.EE +.PP +The following command creates the certificate \f[CR]e1\f[R] and stores +it in the \f[CR]e1.cert\f[R] file, which is signed by \f[CR]ca2\f[R]. +As a result, \f[CR]e1\f[R] should contain \f[CR]ca\f[R], \f[CR]ca1\f[R], +and \f[CR]ca2\f[R] in its certificate chain: +.RS +.PP +\f[CR]keytool \-alias e1 \-certreq | keytool \-alias ca2 \-gencert > e1.cert\f[R] +.RE +.RE +.TP +\f[CR]\-genkeypair\f[R] +The following are the available options for the \f[CR]\-genkeypair\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +\f[CR]\-keyalg\f[R] \f[I]alg\f[R]: Key algorithm name +.IP \[bu] 2 +{\f[CR]\-keysize\f[R] \f[I]size\f[R]}: Key bit size +.IP \[bu] 2 +{\f[CR]\-groupname\f[R] \f[I]name\f[R]}: Group name. +For example, an Elliptic Curve name. +.IP \[bu] 2 +{\f[CR]\-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name +.IP \[bu] 2 +{\f[CR]\-signer\f[R] \f[I]alias\f[R]}: Signer alias +.IP \[bu] 2 +[\f[CR]\-signerkeypass\f[R] \f[I]arg\f[R]]: Signer key password +.IP \[bu] 2 +[\f[CR]\-dname\f[R] \f[I]name\f[R]]: Distinguished name +.IP \[bu] 2 +{\f[CR]\-startdate\f[R] \f[I]date\f[R]}: Certificate validity start date +and time +.IP \[bu] 2 +{\f[CR]\-ext\f[R] \f[I]value\f[R]}*: X.509 extension +.IP \[bu] 2 +{\f[CR]\-validity\f[R] \f[I]days\f[R]}: Validity number of days +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]] }: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-genkeypair\f[R] command to generate a key pair (a public +key and associated private key). +When the \f[CR]\-signer\f[R] option is not specified, the public key is +wrapped in an X.509 v3 self\-signed certificate and stored as a +single\-element certificate chain. +When the \f[CR]\-signer\f[R] option is specified, a new certificate is +generated and signed by the designated signer and stored as a +multiple\-element certificate chain (containing the generated +certificate itself, and the signer\[aq]s certificate chain). +The certificate chain and private key are stored in a new keystore entry +that is identified by its alias. +.PP +The \f[CR]\-keyalg\f[R] value specifies the algorithm to be used to +generate the key pair. +The \f[CR]\-keysize\f[R] value specifies the size of each key to be +generated. +The \f[CR]\-groupname\f[R] value specifies the named group (for example, +the standard or predefined name of an Elliptic Curve) of the key to be +generated. +.PP +When a \f[CR]\-keysize\f[R] value is provided, it will be used to +initialize a \f[CR]KeyPairGenerator\f[R] object using the +\f[CR]initialize(int keysize)\f[R] method. +When a \f[CR]\-groupname\f[R] value is provided, it will be used to +initialize a \f[CR]KeyPairGenerator\f[R] object using the +\f[CR]initialize(AlgorithmParameterSpec params)\f[R] method where +\f[CR]params\f[R] is \f[CR]new NamedParameterSpec(groupname)\f[R]. +.PP +Only one of \f[CR]\-groupname\f[R] and \f[CR]\-keysize\f[R] can be +specified. +If an algorithm has multiple named groups that have the same key size, +the \f[CR]\-groupname\f[R] option should usually be used. +In this case, if \f[CR]\-keysize\f[R] is specified, it\[aq]s up to the +security provider to determine which named group is chosen when +generating a key pair. +.PP +The \f[CR]\-sigalg\f[R] value specifies the algorithm that should be +used to sign the certificate. +This algorithm must be compatible with the \f[CR]\-keyalg\f[R] value. +.PP +The \f[CR]\-signer\f[R] value specifies the alias of a +\f[CR]PrivateKeyEntry\f[R] for the signer that already exists in the +keystore. +This option is used to sign the certificate with the signer\[aq]s +private key. +This is especially useful for key agreement algorithms (i.e. +the \f[CR]\-keyalg\f[R] value is \f[CR]XDH\f[R], \f[CR]X25519\f[R], +\f[CR]X448\f[R], or \f[CR]DH\f[R]) as these keys cannot be used for +digital signatures, and therefore a self\-signed certificate cannot be +created. +.PP +The \f[CR]\-signerkeypass\f[R] value specifies the password of the +signer\[aq]s private key. +It can be specified if the private key of the signer entry is protected +by a password different from the store password. +.PP +The \f[CR]\-dname\f[R] value specifies the X.500 Distinguished Name to +be associated with the value of \f[CR]\-alias\f[R]. +If the \f[CR]\-signer\f[R] option is not specified, the issuer and +subject fields of the self\-signed certificate are populated with the +specified distinguished name. +If the \f[CR]\-signer\f[R] option is specified, the subject field of the +certificate is populated with the specified distinguished name and the +issuer field is populated with the subject field of the signer\[aq]s +certificate. +If a distinguished name is not provided at the command line, then the +user is prompted for one. +.PP +The value of \f[CR]\-keypass\f[R] is a password used to protect the +private key of the generated key pair. +If a password is not provided, then the user is prompted for it. +If you press the \f[B]Return\f[R] key at the prompt, then the key +password is set to the same password as the keystore password. +The \f[CR]\-keypass\f[R] value must have at least six characters. +.PP +The value of \f[CR]\-startdate\f[R] specifies the issue time of the +certificate, also known as the \[dq]Not Before\[dq] value of the X.509 +certificate\[aq]s Validity field. +.PP +The option value can be set in one of these two forms: +.PP +([\f[CR]+\-\f[R]]\f[I]nnn\f[R][\f[CR]ymdHMS\f[R]])+ +.PP +[\f[I]yyyy\f[R]\f[CR]/\f[R]\f[I]mm\f[R]\f[CR]/\f[R]\f[I]dd\f[R]] +[\f[I]HH\f[R]\f[CR]:\f[R]\f[I]MM\f[R]\f[CR]:\f[R]\f[I]SS\f[R]] +.PP +With the first form, the issue time is shifted by the specified value +from the current time. +The value is a concatenation of a sequence of subvalues. +Inside each subvalue, the plus sign (+) means shift forward, and the +minus sign (\-) means shift backward. +The time to be shifted is \f[I]nnn\f[R] units of years, months, days, +hours, minutes, or seconds (denoted by a single character of +\f[CR]y\f[R], \f[CR]m\f[R], \f[CR]d\f[R], \f[CR]H\f[R], \f[CR]M\f[R], or +\f[CR]S\f[R] respectively). +The exact value of the issue time is calculated by using the +\f[CR]java.util.GregorianCalendar.add(int field, int amount)\f[R] method +on each subvalue, from left to right. +For example, the issue time can be specified by: +.IP +.EX +Calendar c = new GregorianCalendar(); +c.add(Calendar.YEAR, \-1); +c.add(Calendar.MONTH, 1); +c.add(Calendar.DATE, \-1); +return c.getTime() +.EE +.PP +With the second form, the user sets the exact issue time in two parts, +year/month/day and hour:minute:second (using the local time zone). +The user can provide only one part, which means the other part is the +same as the current date (or time). +The user must provide the exact number of digits shown in the format +definition (padding with 0 when shorter). +When both date and time are provided, there is one (and only one) space +character between the two parts. +The hour should always be provided in 24\-hour format. +.PP +When the option isn\[aq]t provided, the start date is the current time. +The option can only be provided one time. +.PP +The value of \f[I]date\f[R] specifies the number of days (starting at +the date specified by \f[CR]\-startdate\f[R], or the current date when +\f[CR]\-startdate\f[R] isn\[aq]t specified) for which the certificate +should be considered valid. +.RE +.TP +\f[CR]\-genseckey\f[R] +The following are the available options for the \f[CR]\-genseckey\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +\f[CR]\-keyalg\f[R] \f[I]alg\f[R]: Key algorithm name +.IP \[bu] 2 +{\f[CR]\-keysize\f[R] \f[I]size\f[R]}: Key bit size +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-genseckey\f[R] command to generate a secret key and +store it in a new \f[CR]KeyStore.SecretKeyEntry\f[R] identified by +\f[CR]alias\f[R]. +.PP +The value of \f[CR]\-keyalg\f[R] specifies the algorithm to be used to +generate the secret key, and the value of \f[CR]\-keysize\f[R] specifies +the size of the key that is generated. +The \f[CR]\-keypass\f[R] value is a password that protects the secret +key. +If a password is not provided, then the user is prompted for it. +If you press the \f[B]Return\f[R] key at the prompt, then the key +password is set to the same password that is used for the +\f[CR]\-keystore\f[R]. +The \f[CR]\-keypass\f[R] value must contain at least six characters. +.RE +.TP +\f[CR]\-importcert\f[R] +The following are the available options for the \f[CR]\-importcert\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-noprompt\f[R]}: Do not prompt +.IP \[bu] 2 +{\f[CR]\-trustcacerts\f[R]}: Trust certificates from cacerts +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password is provided through protected +mechanism +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +{\f[CR]\-file\f[R] \f[I]file\f[R]}: Input file name +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-cacerts\f[R]}: Access the cacerts keystore +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-importcert\f[R] command to read the certificate or +certificate chain (where the latter is supplied in a PKCS#7 formatted +reply or in a sequence of X.509 certificates) from \f[CR]\-file\f[R] +\f[I]file\f[R], and store it in the \f[CR]keystore\f[R] entry identified +by \f[CR]\-alias\f[R]. +If \f[CR]\-file\f[R] \f[I]file\f[R] is not specified, then the +certificate or certificate chain is read from \f[CR]stdin\f[R]. +.PP +The \f[CR]keytool\f[R] command can import X.509 v1, v2, and v3 +certificates, and PKCS#7 formatted certificate chains consisting of +certificates of that type. +The data to be imported must be provided either in binary encoding +format or in printable encoding format (also known as Base64 encoding) +as defined by the Internet RFC 1421 standard. +In the latter case, the encoding must be bounded at the beginning by a +string that starts with \f[CR]\-\-\-\-\-BEGIN\f[R], and bounded at the +end by a string that starts with \f[CR]\-\-\-\-\-END\f[R]. +.PP +You import a certificate for two reasons: To add it to the list of +trusted certificates, and to import a certificate reply received from a +certificate authority (CA) as the result of submitting a Certificate +Signing Request (CSR) to that CA. +See the \f[CR]\-certreq\f[R] command in \f[B]Commands for Generating a +Certificate Request\f[R]. +.PP +The type of import is indicated by the value of the \f[CR]\-alias\f[R] +option. +If the alias doesn\[aq]t point to a key entry, then the +\f[CR]keytool\f[R] command assumes you are adding a trusted certificate +entry. +In this case, the alias shouldn\[aq]t already exist in the keystore. +If the alias does exist, then the \f[CR]keytool\f[R] command outputs an +error because a trusted certificate already exists for that alias, and +doesn\[aq]t import the certificate. +If \f[CR]\-alias\f[R] points to a key entry, then the \f[CR]keytool\f[R] +command assumes that you\[aq]re importing a certificate reply. +.RE +.TP +\f[CR]\-importpass\f[R] +The following are the available options for the \f[CR]\-importpass\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +{\f[CR]\-keyalg\f[R] \f[I]alg\f[R]}: Key algorithm name +.IP \[bu] 2 +{\f[CR]\-keysize\f[R] \f[I]size\f[R]}: Key bit size +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-importpass\f[R] command to imports a passphrase and +store it in a new \f[CR]KeyStore.SecretKeyEntry\f[R] identified by +\f[CR]\-alias\f[R]. +The passphrase may be supplied via the standard input stream; otherwise +the user is prompted for it. +The \f[CR]\-keypass\f[R] option provides a password to protect the +imported passphrase. +If a password is not provided, then the user is prompted for it. +If you press the \f[B]Return\f[R] key at the prompt, then the key +password is set to the same password as that used for the +\f[CR]keystore\f[R]. +The \f[CR]\-keypass\f[R] value must contain at least six characters. +.RE +.SH COMMANDS FOR IMPORTING CONTENTS FROM ANOTHER KEYSTORE +.TP +\f[CR]\-importkeystore\f[R] +The following are the available options for the +\f[CR]\-importkeystore\f[R] command: +.RS +.IP \[bu] 2 +\f[CR]\-srckeystore\f[R] \f[I]keystore\f[R]: Source keystore name +.IP \[bu] 2 +{\f[CR]\-destkeystore\f[R] \f[I]keystore\f[R]}: Destination keystore +name +.IP \[bu] 2 +{\f[CR]\-srcstoretype\f[R] \f[I]type\f[R]}: Source keystore type +.IP \[bu] 2 +{\f[CR]\-deststoretype\f[R] \f[I]type\f[R]}: Destination keystore type +.IP \[bu] 2 +[\f[CR]\-srcstorepass\f[R] \f[I]arg\f[R]]: Source keystore password +.IP \[bu] 2 +[\f[CR]\-deststorepass\f[R] \f[I]arg\f[R]]: Destination keystore +password +.IP \[bu] 2 +{\f[CR]\-srcprotected\f[R]}: Source keystore password protected +.IP \[bu] 2 +{\f[CR]\-destprotected\f[R]}: Destination keystore password protected +.IP \[bu] 2 +{\f[CR]\-srcprovidername\f[R] \f[I]name\f[R]}: Source keystore provider +name +.IP \[bu] 2 +{\f[CR]\-destprovidername\f[R] \f[I]name\f[R]}: Destination keystore +provider name +.IP \[bu] 2 +{\f[CR]\-srcalias\f[R] \f[I]alias\f[R]}: Source alias +.IP \[bu] 2 +{\f[CR]\-destalias\f[R] \f[I]alias\f[R]}: Destination alias +.IP \[bu] 2 +[\f[CR]\-srckeypass\f[R] \f[I]arg\f[R]]: Source key password +.IP \[bu] 2 +[\f[CR]\-destkeypass\f[R] \f[I]arg\f[R]]: Destination key password +.IP \[bu] 2 +{\f[CR]\-noprompt\f[R]}: Do not prompt +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +\f[B]Note:\f[R] +.PP +This is the first line of all options: +.RS +.PP +\f[CR]\-srckeystore\f[R] \f[I]keystore\f[R] \f[CR]\-destkeystore\f[R] +\f[I]keystore\f[R] +.RE +.PP +Use the \f[CR]\-importkeystore\f[R] command to import a single entry or +all entries from a source keystore to a destination keystore. +.PP +\f[B]Note:\f[R] +.PP +If you do not specify \f[CR]\-destkeystore\f[R] when using the +\f[CR]keytool \-importkeystore\f[R] command, then the default keystore +used is \f[CR]$HOME/.keystore\f[R]. +.PP +When the \f[CR]\-srcalias\f[R] option is provided, the command imports +the single entry identified by the alias to the destination keystore. +If a destination alias isn\[aq]t provided with \f[CR]\-destalias\f[R], +then \f[CR]\-srcalias\f[R] is used as the destination alias. +If the source entry is protected by a password, then +\f[CR]\-srckeypass\f[R] is used to recover the entry. +If \f[CR]\-srckeypass\f[R] isn\[aq]t provided, then the +\f[CR]keytool\f[R] command attempts to use \f[CR]\-srcstorepass\f[R] to +recover the entry. +If \f[CR]\-srcstorepass\f[R] is not provided or is incorrect, then the +user is prompted for a password. +The destination entry is protected with \f[CR]\-destkeypass\f[R]. +If \f[CR]\-destkeypass\f[R] isn\[aq]t provided, then the destination +entry is protected with the source entry password. +For example, most third\-party tools require \f[CR]storepass\f[R] and +\f[CR]keypass\f[R] in a PKCS #12 keystore to be the same. +To create a PKCS#12 keystore for these tools, always specify a +\f[CR]\-destkeypass\f[R] that is the same as \f[CR]\-deststorepass\f[R]. +.PP +If the \f[CR]\-srcalias\f[R] option isn\[aq]t provided, then all entries +in the source keystore are imported into the destination keystore. +Each destination entry is stored under the alias from the source entry. +If the source entry is protected by a password, then +\f[CR]\-srcstorepass\f[R] is used to recover the entry. +If \f[CR]\-srcstorepass\f[R] is not provided or is incorrect, then the +user is prompted for a password. +If a source keystore entry type isn\[aq]t supported in the destination +keystore, or if an error occurs while storing an entry into the +destination keystore, then the user is prompted either to skip the entry +and continue or to quit. +The destination entry is protected with the source entry password. +.PP +If the destination alias already exists in the destination keystore, +then the user is prompted either to overwrite the entry or to create a +new entry under a different alias name. +.PP +If the \f[CR]\-noprompt\f[R] option is provided, then the user isn\[aq]t +prompted for a new destination alias. +Existing entries are overwritten with the destination alias name. +Entries that can\[aq]t be imported are skipped and a warning is +displayed. +.RE +.SH COMMANDS FOR GENERATING A CERTIFICATE REQUEST +.TP +\f[CR]\-certreq\f[R] +The following are the available options for the \f[CR]\-certreq\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +{\f[CR]\-sigalg\f[R] \f[I]alg\f[R]}: Signature algorithm name +.IP \[bu] 2 +{\f[CR]\-file\f[R] \f[I]file\f[R]}: Output file name +.IP \[bu] 2 +[ \f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-dname\f[R] \f[I]name\f[R]}: Distinguished name +.IP \[bu] 2 +{\f[CR]\-ext\f[R] \f[I]value\f[R]}: X.509 extension +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-certreq\f[R] command to generate a Certificate Signing +Request (CSR) using the PKCS #10 format. +.PP +A CSR is intended to be sent to a CA. +The CA authenticates the certificate requestor (usually offline) and +returns a certificate or certificate chain to replace the existing +certificate chain (initially a self\-signed certificate) in the +keystore. +.PP +The private key associated with \f[I]alias\f[R] is used to create the +PKCS #10 certificate request. +To access the private key, the correct password must be provided. +If \f[CR]\-keypass\f[R] isn\[aq]t provided at the command line and is +different from the password used to protect the integrity of the +keystore, then the user is prompted for it. +If \f[CR]\-dname\f[R] is provided, then it is used as the subject in the +CSR. +Otherwise, the X.500 Distinguished Name associated with alias is used. +.PP +The \f[CR]\-sigalg\f[R] value specifies the algorithm that should be +used to sign the CSR. +.PP +The CSR is stored in the \f[CR]\-file\f[R] \f[I]file\f[R]. +If a file is not specified, then the CSR is output to +\f[CR]\-stdout\f[R]. +.PP +Use the \f[CR]\-importcert\f[R] command to import the response from the +CA. +.RE +.SH COMMANDS FOR EXPORTING DATA +.TP +\f[CR]\-exportcert\f[R] +The following are the available options for the \f[CR]\-exportcert\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-rfc\f[R]}: Output in RFC style +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +{\f[CR]\-file\f[R] \f[I]file\f[R]}: Output file name +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-cacerts\f[R]}: Access the cacerts keystore +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]] }: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-exportcert\f[R] command to read a certificate from the +keystore that is associated with \f[CR]\-alias\f[R] \f[I]alias\f[R] and +store it in the \f[CR]\-file\f[R] \f[I]file\f[R]. +When a file is not specified, the certificate is output to +\f[CR]stdout\f[R]. +.PP +By default, the certificate is output in binary encoding. +If the \f[CR]\-rfc\f[R] option is specified, then the output in the +printable encoding format defined by the Internet RFC 1421 Certificate +Encoding Standard. +.PP +If \f[CR]\-alias\f[R] refers to a trusted certificate, then that +certificate is output. +Otherwise, \f[CR]\-alias\f[R] refers to a key entry with an associated +certificate chain. +In that case, the first certificate in the chain is returned. +This certificate authenticates the public key of the entity addressed by +\f[CR]\-alias\f[R]. +.RE +.SH COMMANDS FOR DISPLAYING DATA +.TP +\f[CR]\-list\f[R] +The following are the available options for the \f[CR]\-list\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-rfc\f[R]}: Output in RFC style +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-cacerts\f[R]}: Access the cacerts keystore +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]] }: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-list\f[R] command to print the contents of the keystore +entry identified by \f[CR]\-alias\f[R] to \f[CR]stdout\f[R]. +If \f[CR]\-alias\f[R] \f[I]alias\f[R] is not specified, then the +contents of the entire keystore are printed. +.PP +By default, this command prints the SHA\-256 fingerprint of a +certificate. +If the \f[CR]\-v\f[R] option is specified, then the certificate is +printed in human\-readable format, with additional information such as +the owner, issuer, serial number, and any extensions. +If the \f[CR]\-rfc\f[R] option is specified, then the certificate +contents are printed by using the printable encoding format, as defined +by the Internet RFC 1421 Certificate Encoding Standard. +.PP +\f[B]Note:\f[R] +.PP +You can\[aq]t specify both \f[CR]\-v\f[R] and \f[CR]\-rfc\f[R] in the +same command. +Otherwise, an error is reported. +.RE +.TP +\f[CR]\-printcert\f[R] +The following are the available options for the \f[CR]\-printcert\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-rfc\f[R]}: Output in RFC style +.IP \[bu] 2 +{\f[CR]\-file\f[R] \f[I]cert_file\f[R]}: Input file name +.IP \[bu] 2 +{\f[CR]\-sslserver\f[R] \f[I]server\f[R][\f[CR]:\f[R]\f[I]port\f[R]]}:: +Secure Sockets Layer (SSL) server host and port +.IP \[bu] 2 +{\f[CR]\-jarfile\f[R] \f[I]JAR_file\f[R]}: Signed \f[CR].jar\f[R] file +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-trustcacerts\f[R]}: Trust certificates from cacerts +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password is provided through protected +mechanism +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-printcert\f[R] command to read and print the certificate +from \f[CR]\-file\f[R] \f[I]cert_file\f[R], the SSL server located at +\f[CR]\-sslserver\f[R] \f[I]server\f[R][\f[CR]:\f[R]\f[I]port\f[R]], or +the signed JAR file specified by \f[CR]\-jarfile\f[R] +\f[I]JAR_file\f[R]. +It prints its contents in a human\-readable format. +When a port is not specified, the standard HTTPS port 443 is assumed. +.PP +\f[B]Note:\f[R] +.PP +The \f[CR]\-sslserver\f[R] and \f[CR]\-file\f[R] options can\[aq]t be +provided in the same command. +Otherwise, an error is reported. +If you don\[aq]t specify either option, then the certificate is read +from \f[CR]stdin\f[R]. +.PP +When\f[CR]\-rfc\f[R] is specified, the \f[CR]keytool\f[R] command prints +the certificate in PEM mode as defined by the Internet RFC 1421 +Certificate Encoding standard. +.PP +If the certificate is read from a file or \f[CR]stdin\f[R], then it +might be either binary encoded or in printable encoding format, as +defined by the RFC 1421 Certificate Encoding standard. +.PP +If the SSL server is behind a firewall, then the +\f[CR]\-J\-Dhttps.proxyHost=proxyhost\f[R] and +\f[CR]\-J\-Dhttps.proxyPort=proxyport\f[R] options can be specified on +the command line for proxy tunneling. +.PP +\f[B]Note:\f[R] +.PP +This command can be used independently of a keystore. +This command does not check for the weakness of a certificate\[aq]s +signature algorithm if it is a trusted certificate in the user keystore +(specified by \f[CR]\-keystore\f[R]) or in the \f[CR]cacerts\f[R] +keystore (if \f[CR]\-trustcacerts\f[R] is specified). +.RE +.TP +\f[CR]\-printcertreq\f[R] +The following are the available options for the +\f[CR]\-printcertreq\f[R] command: +.RS +.IP \[bu] 2 +{\f[CR]\-file\f[R] \f[I]file\f[R]}: Input file name +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-printcertreq\f[R] command to print the contents of a +PKCS #10 format certificate request, which can be generated by the +\f[CR]keytool \-certreq\f[R] command. +The command reads the request from file. +If there is no file, then the request is read from the standard input. +.RE +.TP +\f[CR]\-printcrl\f[R] +The following are the available options for the \f[CR]\-printcrl\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-file crl\f[R]}: Input file name +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-trustcacerts\f[R]}: Trust certificates from cacerts +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password is provided through protected +mechanism +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-printcrl\f[R] command to read the Certificate Revocation +List (CRL) from \f[CR]\-file crl\f[R] . +A CRL is a list of the digital certificates that were revoked by the CA +that issued them. +The CA generates the \f[CR]crl\f[R] file. +.PP +\f[B]Note:\f[R] +.PP +This command can be used independently of a keystore. +This command attempts to verify the CRL using a certificate from the +user keystore (specified by \f[CR]\-keystore\f[R]) or the +\f[CR]cacerts\f[R] keystore (if \f[CR]\-trustcacerts\f[R] is specified), +and will print out a warning if it cannot be verified. +.RE +.SH COMMANDS FOR MANAGING THE KEYSTORE +.TP +\f[CR]\-storepasswd\f[R] +The following are the available options for the \f[CR]\-storepasswd\f[R] +command: +.RS +.IP \[bu] 2 +[\f[CR]\-new\f[R] \f[I]arg\f[R]]: New password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-cacerts\f[R]}: Access the cacerts keystore +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-storepasswd\f[R] command to change the password used to +protect the integrity of the keystore contents. +The new password is set by \f[CR]\-new\f[R] \f[I]arg\f[R] and must +contain at least six characters. +.RE +.TP +\f[CR]\-keypasswd\f[R] +The following are the available options for the \f[CR]\-keypasswd\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]old_keypass\f[R]]: Key password +.IP \[bu] 2 +[\f[CR]\-new\f[R] \f[I]new_keypass\f[R]]: New password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-storepass\f[R] \f[I]arg\f[R]}: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-keypasswd\f[R] command to change the password (under +which private/secret keys identified by \f[CR]\-alias\f[R] are +protected) from \f[CR]\-keypass\f[R] \f[I]old_keypass\f[R] to +\f[CR]\-new\f[R] \f[I]new_keypass\f[R]. +The password value must contain at least six characters. +.PP +If the \f[CR]\-keypass\f[R] option isn\[aq]t provided at the command +line and the \f[CR]\-keypass\f[R] password is different from the +keystore password (\f[CR]\-storepass\f[R] \f[I]arg\f[R]), then the user +is prompted for it. +.PP +If the \f[CR]\-new\f[R] option isn\[aq]t provided at the command line, +then the user is prompted for it. +.RE +.TP +\f[CR]\-delete\f[R] +The following are the available options for the \f[CR]\-delete\f[R] +command: +.RS +.IP \[bu] 2 +[\f[CR]\-alias\f[R] \f[I]alias\f[R]]: Alias name of the entry to process +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-cacerts\f[R]}: Access the cacerts keystore +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-delete\f[R] command to delete the \f[CR]\-alias\f[R] +\f[I]alias\f[R] entry from the keystore. +When not provided at the command line, the user is prompted for the +\f[CR]alias\f[R]. +.RE +.TP +\f[CR]\-changealias\f[R] +The following are the available options for the \f[CR]\-changealias\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-alias\f[R] \f[I]alias\f[R]}: Alias name of the entry to process +.IP \[bu] 2 +[\f[CR]\-destalias\f[R] \f[I]alias\f[R]]: Destination alias +.IP \[bu] 2 +[\f[CR]\-keypass\f[R] \f[I]arg\f[R]]: Key password +.IP \[bu] 2 +{\f[CR]\-keystore\f[R] \f[I]keystore\f[R]}: Keystore name +.IP \[bu] 2 +{\f[CR]\-cacerts\f[R]}: Access the cacerts keystore +.IP \[bu] 2 +[\f[CR]\-storepass\f[R] \f[I]arg\f[R]]: Keystore password +.IP \[bu] 2 +{\f[CR]\-storetype\f[R] \f[I]type\f[R]}: Keystore type +.IP \[bu] 2 +{\f[CR]\-providername\f[R] \f[I]name\f[R]}: Provider name +.IP \[bu] 2 +{\f[CR]\-addprovider\f[R] \f[I]name\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by name (such as SunPKCS11) with +an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerclass\f[R] \f[I]class\f[R] [\f[CR]\-providerarg\f[R] +\f[I]arg\f[R]]}: Add security provider by fully qualified class name +with an optional configure argument. +.IP \[bu] 2 +{\f[CR]\-providerpath\f[R] \f[I]list\f[R]}: Provider classpath +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.IP \[bu] 2 +{\f[CR]\-protected\f[R]}: Password provided through a protected +mechanism +.PP +Use the \f[CR]\-changealias\f[R] command to move an existing keystore +entry from \f[CR]\-alias\f[R] \f[I]alias\f[R] to a new +\f[CR]\-destalias\f[R] \f[I]alias\f[R]. +If a destination alias is not provided, then the command prompts you for +one. +If the original entry is protected with an entry password, then the +password can be supplied with the \f[CR]\-keypass\f[R] option. +If a key password is not provided, then the \f[CR]\-storepass\f[R] (if +provided) is attempted first. +If the attempt fails, then the user is prompted for a password. +.RE +.SH COMMANDS FOR DISPLAYING SECURITY\-RELATED INFORMATION +.TP +\f[CR]\-showinfo\f[R] +The following are the available options for the \f[CR]\-showinfo\f[R] +command: +.RS +.IP \[bu] 2 +{\f[CR]\-tls\f[R]}: Displays TLS configuration information +.IP \[bu] 2 +{\f[CR]\-v\f[R]}: Verbose output +.PP +Use the \f[CR]\-showinfo\f[R] command to display various +security\-related information. +The \f[CR]\-tls\f[R] option displays TLS configurations, such as the +list of enabled protocols and cipher suites. +.RE +.SH COMMANDS FOR DISPLAYING PROGRAM VERSION +You can use \f[CR]\-version\f[R] to print the program version of +\f[CR]keytool\f[R]. +.SH COMMANDS FOR DISPLAYING HELP INFORMATION +You can use \f[CR]\-\-help\f[R] to display a list of \f[CR]keytool\f[R] +commands or to display help information about a specific +\f[CR]keytool\f[R] command. +.IP \[bu] 2 +To display a list of \f[CR]keytool\f[R] commands, enter: +.RS 2 +.RS +.PP +\f[CR]keytool \-\-help\f[R] +.RE +.RE +.IP \[bu] 2 +To display help information about a specific \f[CR]keytool\f[R] command, +enter: +.RS 2 +.RS +.PP +\f[CR]keytool \-<command> \-\-help\f[R] +.RE +.RE +.SH COMMON COMMAND OPTIONS +The \f[CR]\-v\f[R] option can appear for all commands except +\f[CR]\-\-help\f[R]. +When the \f[CR]\-v\f[R] option appears, it signifies verbose mode, which +means that more information is provided in the output. +.PP +The \f[CR]\-J\f[R]\f[I]option\f[R] argument can appear for any command. +When the \f[CR]\-J\f[R]\f[I]option\f[R] is used, the specified +\f[I]option\f[R] string is passed directly to the Java interpreter. +This option doesn\[aq]t contain any spaces. +It\[aq]s useful for adjusting the execution environment or memory usage. +For a list of possible interpreter options, enter \f[CR]java \-h\f[R] or +\f[CR]java \-X\f[R] at the command line. +.PP +These options can appear for all commands operating on a keystore: +.TP +\f[CR]\-storetype\f[R] \f[I]storetype\f[R] +This qualifier specifies the type of keystore to be instantiated. +.TP +\f[CR]\-keystore\f[R] \f[I]keystore\f[R] +The keystore location. +.RS +.PP +If the JKS \f[CR]storetype\f[R] is used and a keystore file doesn\[aq]t +yet exist, then certain \f[CR]keytool\f[R] commands can result in a new +keystore file being created. +For example, if \f[CR]keytool \-genkeypair\f[R] is called and the +\f[CR]\-keystore\f[R] option isn\[aq]t specified, the default keystore +file named \f[CR].keystore\f[R] is created in the user\[aq]s home +directory if it doesn\[aq]t already exist. +Similarly, if the \f[CR]\-keystore ks_file\f[R] option is specified but +\f[CR]ks_file\f[R] doesn\[aq]t exist, then it is created. +For more information on the JKS \f[CR]storetype\f[R], see the +\f[B]KeyStore Implementation\f[R] section in \f[B]KeyStore aliases\f[R]. +.PP +Note that the input stream from the \f[CR]\-keystore\f[R] option is +passed to the \f[CR]KeyStore.load\f[R] method. +If \f[CR]NONE\f[R] is specified as the URL, then a null stream is passed +to the \f[CR]KeyStore.load\f[R] method. +\f[CR]NONE\f[R] should be specified if the keystore isn\[aq]t +file\-based. +For example, when the keystore resides on a hardware token device. +.RE +.TP +\f[CR]\-cacerts\f[R] \f[I]cacerts\f[R] +Operates on the \f[I]cacerts\f[R] keystore . +This option is equivalent to \f[CR]\-keystore\f[R] +\f[I]path_to_cacerts\f[R] \f[CR]\-storetype\f[R] +\f[I]type_of_cacerts\f[R]. +An error is reported if the \f[CR]\-keystore\f[R] or +\f[CR]\-storetype\f[R] option is used with the \f[CR]\-cacerts\f[R] +option. +.TP +\f[CR]\-storepass\f[R] [\f[CR]:env\f[R] | \f[CR]:file\f[R] ] \f[I]argument\f[R] +The password that is used to protect the integrity of the keystore. +.RS +.PP +If the modifier \f[CR]env\f[R] or \f[CR]file\f[R] isn\[aq]t specified, +then the password has the value \f[I]argument\f[R], which must contain +at least six characters. +Otherwise, the password is retrieved as follows: +.IP \[bu] 2 +\f[CR]env\f[R]: Retrieve the password from the environment variable +named \f[I]argument\f[R]. +.IP \[bu] 2 +\f[CR]file\f[R]: Retrieve the password from the file named +\f[I]argument\f[R]. +.PP +\f[B]Note:\f[R] All other options that require passwords, such as +\f[CR]\-keypass\f[R], \f[CR]\-srckeypass\f[R], \f[CR]\-destkeypass\f[R], +\f[CR]\-srcstorepass\f[R], and \f[CR]\-deststorepass\f[R], accept the +\f[CR]env\f[R] and \f[CR]file\f[R] modifiers. +Remember to separate the password option and the modifier with a colon +(:). +.PP +The password must be provided to all commands that access the keystore +contents. +For such commands, when the \f[CR]\-storepass\f[R] option isn\[aq]t +provided at the command line, the user is prompted for it. +.PP +When retrieving information from the keystore, the password is optional. +If a password is not specified, then the integrity of the retrieved +information can\[aq]t be verified and a warning is displayed. +.RE +.TP +\f[CR]\-providername\f[R] \f[I]name\f[R] +Used to identify a cryptographic service provider\[aq]s name when listed +in the security properties file. +.TP +\f[CR]\-addprovider\f[R] \f[I]name\f[R] +Used to add a security provider by name (such as SunPKCS11) . +.TP +\f[CR]\-providerclass\f[R] \f[I]class\f[R] +Used to specify the name of a cryptographic service provider\[aq]s +master class file when the service provider isn\[aq]t listed in the +security properties file. +.TP +\f[CR]\-providerpath\f[R] \f[I]list\f[R] +Used to specify the provider classpath. +.TP +\f[CR]\-providerarg\f[R] \f[I]arg\f[R] +Used with the \f[CR]\-addprovider\f[R] or \f[CR]\-providerclass\f[R] +option to represent an optional string input argument for the +constructor of \f[I]class\f[R] name. +.TP +\f[CR]\-protected=true\f[R]|\f[CR]false\f[R] +Specify this value as \f[CR]true\f[R] when a password must be specified +by way of a protected authentication path, such as a dedicated PIN +reader. +Because there are two keystores involved in the +\f[CR]\-importkeystore\f[R] command, the following two options, +\f[CR]\-srcprotected\f[R] and \f[CR]\-destprotected\f[R], are provided +for the source keystore and the destination keystore respectively. +.TP +\f[CR]\-ext\f[R] {\f[I]name\f[R]{\f[CR]:critical\f[R]} {\f[CR]=\f[R]\f[I]value\f[R]}} +Denotes an X.509 certificate extension. +The option can be used in \f[CR]\-genkeypair\f[R] and +\f[CR]\-gencert\f[R] to embed extensions into the generated certificate, +or in \f[CR]\-certreq\f[R] to show what extensions are requested in the +certificate request. +The option can appear multiple times. +The \f[I]name\f[R] argument can be a supported extension name (see +\f[B]Supported Named Extensions\f[R]) or an arbitrary OID number. +The \f[I]value\f[R] argument, when provided, denotes the argument for +the extension. +When \f[I]value\f[R] is omitted, the default value of the extension or +the extension itself requires no argument. +The \f[CR]:critical\f[R] modifier, when provided, means the +extension\[aq]s \f[CR]isCritical\f[R] attribute is \f[CR]true\f[R]; +otherwise, it is \f[CR]false\f[R]. +You can use \f[CR]:c\f[R] in place of \f[CR]:critical\f[R]. +.TP +\f[CR]\-conf\f[R] \f[I]file\f[R] +Specifies a pre\-configured options file. +.SH PRE\-CONFIGURED OPTIONS FILE +A pre\-configured options file is a Java properties file that can be +specified with the \f[CR]\-conf\f[R] option. +Each property represents the default option(s) for a keytool command +using \[dq]keytool.\f[I]command_name\f[R]\[dq] as the property name. +A special property named \[dq]keytool.all\[dq] represents the default +option(s) applied to all commands. +A property value can include \f[CR]${prop}\f[R] which will be expanded +to the system property associated with it. +If an option value includes white spaces inside, it should be surrounded +by quotation marks (\[dq] or \[aq]). +All property names must be in lower case. +.PP +When \f[CR]keytool\f[R] is launched with a pre\-configured options file, +the value for \[dq]keytool.all\[dq] (if it exists) is prepended to the +\f[CR]keytool\f[R] command line first, with the value for the command +name (if it exists) comes next, and the existing options on the command +line at last. +For a single\-valued option, this allows the property for a specific +command to override the \[dq]keytool.all\[dq] value, and the value +specified on the command line to override both. +For multiple\-valued options, all of them will be used by +\f[CR]keytool\f[R]. +.PP +For example, given the following file named \f[CR]preconfig\f[R]: +.IP +.EX + # A tiny pre\-configured options file + keytool.all = \-keystore ${user.home}/ks + keytool.list = \-v + keytool.genkeypair = \-keyalg rsa +.EE +.PP +\f[CR]keytool \-conf preconfig \-list\f[R] is identical to +.RS +.PP +\f[CR]keytool \-keystore \[ti]/ks \-v \-list\f[R] +.RE +.PP +\f[CR]keytool \-conf preconfig \-genkeypair \-alias me\f[R] is identical +to +.RS +.PP +\f[CR]keytool \-keystore \[ti]/ks \-keyalg rsa \-genkeypair \-alias me\f[R] +.RE +.PP +\f[CR]keytool \-conf preconfig \-genkeypair \-alias you \-keyalg ec\f[R] +is identical to +.RS +.PP +\f[CR]keytool \-keystore \[ti]/ks \-keyalg rsa \-genkeypair \-alias you \-keyalg ec\f[R] +.RE +.PP +which is equivalent to +.RS +.PP +\f[CR]keytool \-keystore \[ti]/ks \-genkeypair \-alias you \-keyalg ec\f[R] +.RE +.PP +because \f[CR]\-keyalg\f[R] is a single\-valued option and the +\f[CR]ec\f[R] value specified on the command line overrides the +preconfigured options file. +.SH EXAMPLES OF OPTION VALUES +The following examples show the defaults for various option values: +.IP +.EX +\-alias \[dq]mykey\[dq] + +\-keysize + 2048 (when using \-genkeypair and \-keyalg is \[dq]DSA\[dq]) + 3072 (when using \-genkeypair and \-keyalg is \[dq]RSA\[dq], \[dq]RSASSA\-PSS\[dq], or \[dq]DH\[dq]) + 384 (when using \-genkeypair and \-keyalg is \[dq]EC\[dq]) + 56 (when using \-genseckey and \-keyalg is \[dq]DES\[dq]) + 168 (when using \-genseckey and \-keyalg is \[dq]DESede\[dq]) + +\-groupname + ed25519 (when using \-genkeypair and \-keyalg is \[dq]EdDSA\[dq], key size is 255) + x25519 (when using \-genkeypair and \-keyalg is \[dq]XDH\[dq], key size is 255) + +\-validity 90 + +\-keystore <the file named .keystore in the user\[aq]s home directory> + +\-destkeystore <the file named .keystore in the user\[aq]s home directory> + +\-storetype <the value of the \[dq]keystore.type\[dq] property in the + security properties file, which is returned by the static + getDefaultType method in java.security.KeyStore> + +\-file + stdin (if reading) + stdout (if writing) + +\-protected false +.EE +.PP +When generating a certificate or a certificate request, the default +signature algorithm (\f[CR]\-sigalg\f[R] option) is derived from the +algorithm of the underlying private key to provide an appropriate level +of security strength as follows: +.PP +Default Signature Algorithms +.TS +tab(@); +l l l. +T{ +keyalg +T}@T{ +key size +T}@T{ +default sigalg +T} +_ +T{ +DSA +T}@T{ +any size +T}@T{ +SHA256withDSA +T} +T{ +RSA +T}@T{ +< 624 +T}@T{ +SHA256withRSA (key size is too small for using SHA\-384) +T} +T{ +T}@T{ +<= 7680 +T}@T{ +SHA384withRSA +T} +T{ +T}@T{ +> 7680 +T}@T{ +SHA512withRSA +T} +T{ +EC +T}@T{ +< 512 +T}@T{ +SHA384withECDSA +T} +T{ +T}@T{ +>= 512 +T}@T{ +SHA512withECDSA +T} +T{ +RSASSA\-PSS +T}@T{ +< 624 +T}@T{ +RSASSA\-PSS (with SHA\-256, key size is too small for +T} +T{ +T}@T{ +T}@T{ +using SHA\-384) +T} +T{ +T}@T{ +<= 7680 +T}@T{ +RSASSA\-PSS (with SHA\-384) +T} +T{ +T}@T{ +> 7680 +T}@T{ +RSASSA\-PSS (with SHA\-512) +T} +T{ +EdDSA +T}@T{ +255 +T}@T{ +Ed25519 +T} +T{ +T}@T{ +448 +T}@T{ +Ed448 +T} +T{ +Ed25519 +T}@T{ +255 +T}@T{ +Ed25519 +T} +T{ +Ed448 +T}@T{ +448 +T}@T{ +Ed448 +T} +.TE +.IP \[bu] 2 +The key size, measured in bits, corresponds to the size of the private +key. +This size is determined by the value of the \f[CR]\-keysize\f[R] or +\f[CR]\-groupname\f[R] options or the value derived from a default +setting. +.IP \[bu] 2 +An RSASSA\-PSS signature algorithm uses a \f[CR]MessageDigest\f[R] +algorithm as its hash and MGF1 algorithms. +.IP \[bu] 2 +If neither a default \f[CR]\-keysize\f[R] or \f[CR]\-groupname\f[R] is +defined for an algorithm, the security provider will choose a default +setting. +.PP +\f[B]Note:\f[R] +.PP +To improve out of the box security, default keysize, groupname, and +signature algorithm names are periodically updated to stronger values +with each release of the JDK. +If interoperability with older releases of the JDK is important, make +sure that the defaults are supported by those releases. +Alternatively, you can use the \f[CR]\-keysize\f[R], +\f[CR]\-groupname\f[R], or \f[CR]\-sigalg\f[R] options to override the +default values at your own risk. +.SH SUPPORTED NAMED EXTENSIONS +The \f[CR]keytool\f[R] command supports these named extensions. +The names aren\[aq]t case\-sensitive. +.TP +\f[CR]BC\f[R] or \f[CR]BasicConstraints\f[R] +Values: +.RS +.PP +The full form is +\f[CR]ca:\f[R]{\f[CR]true\f[R]|\f[CR]false\f[R]}[\f[CR],pathlen:\f[R]\f[I]len\f[R]] +or \f[I]len\f[R], which is short for +\f[CR]ca:true,pathlen:\f[R]\f[I]len\f[R]. +.PP +When \f[I]len\f[R] is omitted, the resulting value is +\f[CR]ca:true\f[R]. +.RE +.TP +\f[CR]KU\f[R] or \f[CR]KeyUsage\f[R] +Values: +.RS +.PP +\f[I]usage\f[R](\f[CR],\f[R] \f[I]usage\f[R])* +.PP +\f[I]usage\f[R] can be one of the following: +.IP \[bu] 2 +\f[CR]digitalSignature\f[R] +.IP \[bu] 2 +\f[CR]nonRepudiation\f[R] (\f[CR]contentCommitment\f[R]) +.IP \[bu] 2 +\f[CR]keyEncipherment\f[R] +.IP \[bu] 2 +\f[CR]dataEncipherment\f[R] +.IP \[bu] 2 +\f[CR]keyAgreement\f[R] +.IP \[bu] 2 +\f[CR]keyCertSign\f[R] +.IP \[bu] 2 +\f[CR]cRLSign\f[R] +.IP \[bu] 2 +\f[CR]encipherOnly\f[R] +.IP \[bu] 2 +\f[CR]decipherOnly\f[R] +.PP +Provided there is no ambiguity, the \f[I]usage\f[R] argument can be +abbreviated with the first few letters (such as \f[CR]dig\f[R] for +\f[CR]digitalSignature\f[R]) or in camel\-case style (such as +\f[CR]dS\f[R] for \f[CR]digitalSignature\f[R] or \f[CR]cRLS\f[R] for +\f[CR]cRLSign\f[R]). +The \f[I]usage\f[R] values are case\-sensitive. +.RE +.TP +\f[CR]EKU\f[R] or \f[CR]ExtendedKeyUsage\f[R] +Values: +.RS +.PP +\f[I]usage\f[R](\f[CR],\f[R] \f[I]usage\f[R])* +.PP +\f[I]usage\f[R] can be one of the following: +.IP \[bu] 2 +\f[CR]anyExtendedKeyUsage\f[R] +.IP \[bu] 2 +\f[CR]serverAuth\f[R] +.IP \[bu] 2 +\f[CR]clientAuth\f[R] +.IP \[bu] 2 +\f[CR]codeSigning\f[R] +.IP \[bu] 2 +\f[CR]emailProtection\f[R] +.IP \[bu] 2 +\f[CR]timeStamping\f[R] +.IP \[bu] 2 +\f[CR]OCSPSigning\f[R] +.IP \[bu] 2 +Any OID string +.PP +Provided there is no ambiguity, the \f[I]usage\f[R] argument can be +abbreviated with the first few letters or in camel\-case style. +The \f[I]usage\f[R] values are case\-sensitive. +.RE +.TP +\f[CR]SAN\f[R] or \f[CR]SubjectAlternativeName\f[R] +Values: +.RS +.PP +\f[I]type\f[R]\f[CR]:\f[R]\f[I]value\f[R](\f[CR],\f[R] +\f[I]type\f[R]\f[CR]:\f[R]\f[I]value\f[R])* +.PP +\f[I]type\f[R] can be one of the following: +.IP \[bu] 2 +\f[CR]EMAIL\f[R] +.IP \[bu] 2 +\f[CR]URI\f[R] +.IP \[bu] 2 +\f[CR]DNS\f[R] +.IP \[bu] 2 +\f[CR]IP\f[R] +.IP \[bu] 2 +\f[CR]OID\f[R] +.PP +The \f[I]value\f[R] argument is the string format value for the +\f[I]type\f[R]. +.RE +.TP +\f[CR]IAN\f[R] or \f[CR]IssuerAlternativeName\f[R] +Values: +.RS +.PP +Same as \f[CR]SAN\f[R] or \f[CR]SubjectAlternativeName\f[R]. +.RE +.TP +\f[CR]SIA\f[R] or \f[CR]SubjectInfoAccess\f[R] +Values: +.RS +.PP +\f[I]method\f[R]\f[CR]:\f[R]\f[I]location\-type\f[R]\f[CR]:\f[R]\f[I]location\-value\f[R](\f[CR],\f[R] +\f[I]method\f[R]\f[CR]:\f[R]\f[I]location\-type\f[R]\f[CR]:\f[R]\f[I]location\-value\f[R])* +.PP +\f[I]method\f[R] can be one of the following: +.IP \[bu] 2 +\f[CR]timeStamping\f[R] +.IP \[bu] 2 +\f[CR]caRepository\f[R] +.IP \[bu] 2 +Any OID +.PP +The \f[I]location\-type\f[R] and \f[I]location\-value\f[R] arguments can +be any \f[I]type\f[R]\f[CR]:\f[R]\f[I]value\f[R] supported by the +\f[CR]SubjectAlternativeName\f[R] extension. +.RE +.TP +\f[CR]AIA\f[R] or \f[CR]AuthorityInfoAccess\f[R] +Values: +.RS +.PP +Same as \f[CR]SIA\f[R] or \f[CR]SubjectInfoAccess\f[R]. +.PP +The \f[I]method\f[R] argument can be one of the following: +.IP \[bu] 2 +\f[CR]ocsp\f[R] +.IP \[bu] 2 +\f[CR]caIssuers\f[R] +.IP \[bu] 2 +Any OID +.RE +.PP +When \f[I]name\f[R] is OID, the value is the hexadecimal dumped Definite +Encoding Rules (DER) encoding of the \f[CR]extnValue\f[R] for the +extension excluding the OCTET STRING type and length bytes. +Other than standard hexadecimal numbers (0\-9, a\-f, A\-F), any extra +characters are ignored in the HEX string. +Therefore, both 01:02:03:04 and 01020304 are accepted as identical +values. +When there is no value, the extension has an empty value field. +.PP +A special name \f[CR]honored\f[R], used only in \f[CR]\-gencert\f[R], +denotes how the extensions included in the certificate request should be +honored. +The value for this name is a comma\-separated list of \f[CR]all\f[R] +(all requested extensions are honored), +\f[I]name\f[R]{\f[CR]:\f[R][\f[CR]critical\f[R]|\f[CR]non\-critical\f[R]]} +(the named extension is honored, but it uses a different +\f[CR]isCritical\f[R] attribute), and \f[CR]\-name\f[R] (used with +\f[CR]all\f[R], denotes an exception). +Requested extensions aren\[aq]t honored by default. +.PP +If, besides the\f[CR]\-ext honored\f[R] option, another named or OID +\f[CR]\-ext\f[R] option is provided, this extension is added to those +already honored. +However, if this name (or OID) also appears in the honored value, then +its value and criticality override that in the request. +If an extension of the same type is provided multiple times through +either a name or an OID, only the last extension is used. +.PP +The \f[CR]subjectKeyIdentifier\f[R] extension is always created. +For non\-self\-signed certificates, the +\f[CR]authorityKeyIdentifier\f[R] is created. +.PP +\f[B]CAUTION:\f[R] +.PP +Users should be aware that some combinations of extensions (and other +certificate fields) may not conform to the Internet standard. +See \f[B]Certificate Conformance Warning\f[R]. +.SH EXAMPLES OF TASKS IN CREATING A KEYSTORE +The following examples describe the sequence actions in creating a +keystore for managing public/private key pairs and certificates from +trusted entities. +.IP \[bu] 2 +\f[B]Generating the Key Pair\f[R] +.IP \[bu] 2 +\f[B]Requesting a Signed Certificate from a CA\f[R] +.IP \[bu] 2 +\f[B]Importing a Certificate for the CA\f[R] +.IP \[bu] 2 +\f[B]Importing the Certificate Reply from the CA\f[R] +.IP \[bu] 2 +\f[B]Exporting a Certificate That Authenticates the Public Key\f[R] +.IP \[bu] 2 +\f[B]Importing the Keystore\f[R] +.IP \[bu] 2 +\f[B]Generating Certificates for an SSL Server\f[R] +.SH GENERATING THE KEY PAIR +Create a keystore and then generate the key pair. +.PP +You can enter the command as a single line such as the following: +.RS +.PP +\f[CR]keytool \-genkeypair \-dname \[dq]cn=myname, ou=mygroup, o=mycompany, c=mycountry\[dq] \-alias business \-keyalg rsa \-keypass\f[R] +\f[I]password\f[R] +\f[CR]\-keystore /working/mykeystore \-storepass password \-validity 180\f[R] +.RE +.PP +The command creates the keystore named \f[CR]mykeystore\f[R] in the +working directory (provided it doesn\[aq]t already exist), and assigns +it the password specified by \f[CR]\-keypass\f[R]. +It generates a public/private key pair for the entity whose +distinguished name is \f[CR]myname\f[R], \f[CR]mygroup\f[R], +\f[CR]mycompany\f[R], and a two\-letter country code of +\f[CR]mycountry\f[R]. +It uses the RSA key generation algorithm to create the keys; both are +3072 bits. +.PP +The command uses the default SHA384withRSA signature algorithm to create +a self\-signed certificate that includes the public key and the +distinguished name information. +The certificate is valid for 180 days, and is associated with the +private key in a keystore entry referred to by +\f[CR]\-alias business\f[R]. +The private key is assigned the password specified by +\f[CR]\-keypass\f[R]. +.PP +The command is significantly shorter when the option defaults are +accepted. +In this case, only \f[CR]\-keyalg\f[R] is required, and the defaults are +used for unspecified options that have default values. +You are prompted for any required values. +You could have the following: +.RS +.PP +\f[CR]keytool \-genkeypair \-keyalg rsa\f[R] +.RE +.PP +In this case, a keystore entry with the alias \f[CR]mykey\f[R] is +created, with a newly generated key pair and a certificate that is valid +for 90 days. +This entry is placed in your home directory in a keystore named +\f[CR].keystore\f[R] . +\f[CR].keystore\f[R] is created if it doesn\[aq]t already exist. +You are prompted for the distinguished name information, the keystore +password, and the private key password. +.PP +\f[B]Note:\f[R] +.PP +The rest of the examples assume that you responded to the prompts with +values equal to those specified in the first \f[CR]\-genkeypair\f[R] +command. +For example, a distinguished name of +\f[CR]cn=\f[R]\f[I]myname\f[R]\f[CR], ou=\f[R]\f[I]mygroup\f[R]\f[CR], o=\f[R]\f[I]mycompany\f[R]\f[CR], c=\f[R]\f[I]mycountry\f[R]. +.SH REQUESTING A SIGNED CERTIFICATE FROM A CA +\f[B]Note:\f[R] +.PP +Generating the key pair created a self\-signed certificate; however, a +certificate is more likely to be trusted by others when it is signed by +a CA. +.PP +To get a CA signature, complete the following process: +.IP "1." 3 +Generate a CSR: +.RS 4 +.RS +.PP +\f[CR]keytool \-certreq \-file myname.csr\f[R] +.RE +.PP +This creates a CSR for the entity identified by the default alias +\f[CR]mykey\f[R] and puts the request in the file named +\f[CR]myname.csr\f[R]. +.RE +.IP "2." 3 +Submit \f[CR]myname.csr\f[R] to a CA, such as DigiCert. +.PP +The CA authenticates you, the requestor (usually offline), and returns a +certificate, signed by them, authenticating your public key. +In some cases, the CA returns a chain of certificates, each one +authenticating the public key of the signer of the previous certificate +in the chain. +.SH IMPORTING A CERTIFICATE FOR THE CA +To import a certificate for the CA, complete the following process: +.IP "1." 3 +Before you import the certificate reply from a CA, you need one or more +trusted certificates either in your keystore or in the +\f[CR]cacerts\f[R] keystore file. +See \f[CR]\-importcert\f[R] in \f[B]Commands\f[R]. +.RS 4 +.IP \[bu] 2 +If the certificate reply is a certificate chain, then you need the top +certificate of the chain. +The root CA certificate that authenticates the public key of the CA. +.IP \[bu] 2 +If the certificate reply is a single certificate, then you need a +certificate for the issuing CA (the one that signed it). +If that certificate isn\[aq]t self\-signed, then you need a certificate +for its signer, and so on, up to a self\-signed root CA certificate. +.PP +The \f[CR]cacerts\f[R] keystore ships with a set of root certificates +issued by the CAs of \f[B]the Oracle Java Root Certificate program\f[R] +[https://www.oracle.com/java/technologies/javase/carootcertsprogram.html]. +If you request a signed certificate from a CA, and a certificate +authenticating that CA\[aq]s public key hasn\[aq]t been added to +\f[CR]cacerts\f[R], then you must import a certificate from that CA as a +trusted certificate. +.PP +A certificate from a CA is usually self\-signed or signed by another CA. +If it is signed by another CA, you need a certificate that authenticates +that CA\[aq]s public key. +.PP +For example, you have obtained a \f[I]X\f[R]\f[CR].cer\f[R] file from a +company that is a CA and the file is supposed to be a self\-signed +certificate that authenticates that CA\[aq]s public key. +Before you import it as a trusted certificate, you should ensure that +the certificate is valid by: +.IP "1." 3 +Viewing it with the \f[CR]keytool \-printcert\f[R] command or the +\f[CR]keytool \-importcert\f[R] command without using the +\f[CR]\-noprompt\f[R] option. +Make sure that the displayed certificate fingerprints match the expected +fingerprints. +.IP "2." 3 +Calling the person who sent the certificate, and comparing the +fingerprints that you see with the ones that they show or that a secure +public key repository shows. +.PP +Only when the fingerprints are equal is it assured that the certificate +wasn\[aq]t replaced in transit with somebody else\[aq]s certificate +(such as an attacker\[aq]s certificate). +If such an attack takes place, and you didn\[aq]t check the certificate +before you imported it, then you would be trusting anything that the +attacker signed. +.RE +.IP "2." 3 +Replace the self\-signed certificate with a certificate chain, where +each certificate in the chain authenticates the public key of the signer +of the previous certificate in the chain, up to a root CA. +.RS 4 +.PP +If you trust that the certificate is valid, then you can add it to your +keystore by entering the following command: +.RS +.PP +\f[CR]keytool \-importcert \-alias\f[R] \f[I]alias\f[R] +\f[CR]\-file *X*\f[R].cer\[ga] +.RE +.PP +This command creates a trusted certificate entry in the keystore from +the data in the CA certificate file and assigns the values of the +\f[I]alias\f[R] to the entry. +.RE +.SH IMPORTING THE CERTIFICATE REPLY FROM THE CA +After you import a certificate that authenticates the public key of the +CA that you submitted your certificate signing request to (or there is +already such a certificate in the \f[CR]cacerts\f[R] file), you can +import the certificate reply and replace your self\-signed certificate +with a certificate chain. +.PP +The certificate chain is one of the following: +.IP \[bu] 2 +Returned by the CA when the CA reply is a chain. +.IP \[bu] 2 +Constructed when the CA reply is a single certificate. +This certificate chain is constructed by using the certificate reply and +trusted certificates available either in the keystore where you import +the reply or in the \f[CR]cacerts\f[R] keystore file. +.PP +For example, if you sent your certificate signing request to DigiCert, +then you can import their reply by entering the following command: +.PP +\f[B]Note:\f[R] +.PP +In this example, the returned certificate is named +\f[CR]DCmyname.cer\f[R]. +.RS +.PP +\f[CR]keytool \-importcert \-trustcacerts \-file DCmyname.cer\f[R] +.RE +.SH EXPORTING A CERTIFICATE THAT AUTHENTICATES THE PUBLIC KEY +\f[B]Note:\f[R] +.PP +If you used the \f[CR]jarsigner\f[R] command to sign a Java Archive +(JAR) file, then clients that use the file will want to authenticate +your signature. +.PP +One way that clients can authenticate you is by importing your public +key certificate into their keystore as a trusted entry. +You can then export the certificate and supply it to your clients. +.PP +For example: +.IP "1." 3 +Copy your certificate to a file named \f[CR]myname.cer\f[R] by entering +the following command: +.RS 4 +.PP +\f[B]Note:\f[R] +.PP +In this example, the entry has an alias of \f[CR]mykey\f[R]. +.RS +.PP +\f[CR]keytool \-exportcert \-alias mykey \-file myname.cer\f[R] +.RE +.RE +.IP "2." 3 +With the certificate and the signed JAR file, a client can use the +\f[CR]jarsigner\f[R] command to authenticate your signature. +.SH IMPORTING THE KEYSTORE +Use the \f[CR]importkeystore\f[R] command to import an entire keystore +into another keystore. +This imports all entries from the source keystore, including keys and +certificates, to the destination keystore with a single command. +You can use this command to import entries from a different type of +keystore. +During the import, all new entries in the destination keystore will have +the same alias names and protection passwords (for secret keys and +private keys). +If the \f[CR]keytool\f[R] command can\[aq]t recover the private keys or +secret keys from the source keystore, then it prompts you for a +password. +If it detects alias duplication, then it asks you for a new alias, and +you can specify a new alias or simply allow the \f[CR]keytool\f[R] +command to overwrite the existing one. +.PP +For example, import entries from a typical JKS type keystore +\f[CR]key.jks\f[R] into a PKCS #11 type hardware\-based keystore, by +entering the following command: +.RS +.PP +\f[CR]keytool \-importkeystore \-srckeystore key.jks \-destkeystore NONE \-srcstoretype JKS \-deststoretype PKCS11 \-srcstorepass\f[R] +\f[I]password\f[R] \f[CR]\-deststorepass\f[R] \f[I]password\f[R] +.RE +.PP +The \f[CR]importkeystore\f[R] command can also be used to import a +single entry from a source keystore to a destination keystore. +In this case, besides the options you used in the previous example, you +need to specify the alias you want to import. +With the \f[CR]\-srcalias\f[R] option specified, you can also specify +the destination alias name, protection password for a secret or private +key, and the destination protection password you want as follows: +.RS +.PP +\f[CR]keytool \-importkeystore \-srckeystore key.jks \-destkeystore NONE \-srcstoretype JKS \-deststoretype PKCS11 \-srcstorepass\f[R] +\f[I]password\f[R] \f[CR]\-deststorepass\f[R] \f[I]password\f[R] +\f[CR]\-srcalias myprivatekey \-destalias myoldprivatekey \-srckeypass\f[R] +\f[I]password\f[R] \f[CR]\-destkeypass\f[R] \f[I]password\f[R] +\f[CR]\-noprompt\f[R] +.RE +.SH GENERATING CERTIFICATES FOR AN SSL SERVER +The following are \f[CR]keytool\f[R] commands used to generate key pairs +and certificates for three entities: +.IP \[bu] 2 +Root CA (\f[CR]root\f[R]) +.IP \[bu] 2 +Intermediate CA (\f[CR]ca\f[R]) +.IP \[bu] 2 +SSL server (\f[CR]server\f[R]) +.PP +Ensure that you store all the certificates in the same keystore. +.IP +.EX +keytool \-genkeypair \-keystore root.jks \-alias root \-ext bc:c \-keyalg rsa +keytool \-genkeypair \-keystore ca.jks \-alias ca \-ext bc:c \-keyalg rsa +keytool \-genkeypair \-keystore server.jks \-alias server \-keyalg rsa + +keytool \-keystore root.jks \-alias root \-exportcert \-rfc > root.pem + +keytool \-storepass password \-keystore ca.jks \-certreq \-alias ca | + keytool \-storepass password \-keystore root.jks + \-gencert \-alias root \-ext BC=0 \-rfc > ca.pem +keytool \-keystore ca.jks \-importcert \-alias ca \-file ca.pem + +keytool \-storepass password \-keystore server.jks \-certreq \-alias server | + keytool \-storepass password \-keystore ca.jks \-gencert \-alias ca + \-ext ku:c=dig,kE \-rfc > server.pem +cat root.pem ca.pem server.pem | + keytool \-keystore server.jks \-importcert \-alias server +.EE +.SH TERMS +.TP +Keystore +A keystore is a storage facility for cryptographic keys and +certificates. +.TP +Keystore entries +Keystores can have different types of entries. +The two most applicable entry types for the \f[CR]keytool\f[R] command +include the following: +.RS +.PP +Key entries: Each entry holds very sensitive cryptographic key +information, which is stored in a protected format to prevent +unauthorized access. +Typically, a key stored in this type of entry is a secret key, or a +private key accompanied by the certificate chain for the corresponding +public key. +See \f[B]Certificate Chains\f[R]. +The \f[CR]keytool\f[R] command can handle both types of entries, while +the \f[CR]jarsigner\f[R] tool only handles the latter type of entry, +that is private keys and their associated certificate chains. +.PP +Trusted certificate entries: Each entry contains a single public key +certificate that belongs to another party. +The entry is called a trusted certificate because the keystore owner +trusts that the public key in the certificate belongs to the identity +identified by the subject (owner) of the certificate. +The issuer of the certificate vouches for this, by signing the +certificate. +.RE +.TP +Keystore aliases +All keystore entries (key and trusted certificate entries) are accessed +by way of unique aliases. +.RS +.PP +An alias is specified when you add an entity to the keystore with the +\f[CR]\-genseckey\f[R] command to generate a secret key, the +\f[CR]\-genkeypair\f[R] command to generate a key pair (public and +private key), or the \f[CR]\-importcert\f[R] command to add a +certificate or certificate chain to the list of trusted certificates. +Subsequent \f[CR]keytool\f[R] commands must use this same alias to refer +to the entity. +.PP +For example, you can use the alias \f[CR]duke\f[R] to generate a new +public/private key pair and wrap the public key into a self\-signed +certificate with the following command. +See \f[B]Certificate Chains\f[R]. +.RS +.PP +\f[CR]keytool \-genkeypair \-alias duke \-keyalg rsa \-keypass\f[R] +\f[I]passwd\f[R] +.RE +.PP +This example specifies an initial \f[I]passwd\f[R] required by +subsequent commands to access the private key associated with the alias +\f[CR]duke\f[R]. +If you later want to change Duke\[aq]s private key password, use a +command such as the following: +.RS +.PP +\f[CR]keytool \-keypasswd \-alias duke \-keypass\f[R] \f[I]passwd\f[R] +\f[CR]\-new\f[R] \f[I]newpasswd\f[R] +.RE +.PP +This changes the initial \f[I]passwd\f[R] to \f[I]newpasswd\f[R]. +A password shouldn\[aq]t be specified on a command line or in a script +unless it is for testing purposes, or you are on a secure system. +If you don\[aq]t specify a required password option on a command line, +then you are prompted for it. +.RE +.TP +Keystore implementation +The \f[CR]KeyStore\f[R] class provided in the \f[CR]java.security\f[R] +package supplies well\-defined interfaces to access and modify the +information in a keystore. +It is possible for there to be multiple different concrete +implementations, where each implementation is that for a particular type +of keystore. +.RS +.PP +Currently, two command\-line tools (\f[CR]keytool\f[R] and +\f[CR]jarsigner\f[R]) make use of keystore implementations. +Because the \f[CR]KeyStore\f[R] class is \f[CR]public\f[R], users can +write additional security applications that use it. +.PP +In JDK 9 and later, the default keystore implementation is +\f[CR]PKCS12\f[R]. +This is a cross platform keystore based on the RSA PKCS12 Personal +Information Exchange Syntax Standard. +This standard is primarily meant for storing or transporting a +user\[aq]s private keys, certificates, and miscellaneous secrets. +There is another built\-in implementation, provided by Oracle. +It implements the keystore as a file with a proprietary keystore type +(format) named \f[CR]JKS\f[R]. +It protects each private key with its individual password, and also +protects the integrity of the entire keystore with a (possibly +different) password. +.PP +Keystore implementations are provider\-based. +More specifically, the application interfaces supplied by +\f[CR]KeyStore\f[R] are implemented in terms of a Service Provider +Interface (SPI). +That is, there is a corresponding abstract \f[CR]KeystoreSpi\f[R] class, +also in the \f[CR]java.security package\f[R], which defines the Service +Provider Interface methods that providers must implement. +The term \f[I]provider\f[R] refers to a package or a set of packages +that supply a concrete implementation of a subset of services that can +be accessed by the Java Security API. +To provide a keystore implementation, clients must implement a provider +and supply a \f[CR]KeystoreSpi\f[R] subclass implementation, as +described in Steps to Implement and Integrate a Provider. +.PP +Applications can choose different types of keystore implementations from +different providers, using the \f[CR]getInstance\f[R] factory method +supplied in the \f[CR]KeyStore\f[R] class. +A keystore type defines the storage and data format of the keystore +information, and the algorithms used to protect private/secret keys in +the keystore and the integrity of the keystore. +Keystore implementations of different types aren\[aq]t compatible. +.PP +The \f[CR]keytool\f[R] command works on any file\-based keystore +implementation. +It treats the keystore location that is passed to it at the command line +as a file name and converts it to a \f[CR]FileInputStream\f[R], from +which it loads the keystore information. +The \f[CR]jarsigner\f[R] commands can read a keystore from any location +that can be specified with a URL. +.PP +For \f[CR]keytool\f[R] and \f[CR]jarsigner\f[R], you can specify a +keystore type at the command line, with the \f[CR]\-storetype\f[R] +option. +.PP +If you don\[aq]t explicitly specify a keystore type, then the tools +choose a keystore implementation based on the value of the +\f[CR]keystore.type\f[R] property specified in the security properties +file. +The security properties file is called \f[CR]java.security\f[R], and +resides in the security properties directory: +.IP \[bu] 2 +\f[B]Linux and macOS:\f[R] \f[CR]java.home/lib/security\f[R] +.IP \[bu] 2 +\f[B]Windows:\f[R] \f[CR]java.home\[rs]lib\[rs]security\f[R] +.PP +Each tool gets the \f[CR]keystore.type\f[R] value and then examines all +the currently installed providers until it finds one that implements a +keystores of that type. +It then uses the keystore implementation from that provider.The +\f[CR]KeyStore\f[R] class defines a static method named +\f[CR]getDefaultType\f[R] that lets applications retrieve the value of +the \f[CR]keystore.type\f[R] property. +The following line of code creates an instance of the default keystore +type as specified in the \f[CR]keystore.type\f[R] property: +.RS +.PP +\f[CR]KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\f[R] +.RE +.PP +The default keystore type is \f[CR]pkcs12\f[R], which is a +cross\-platform keystore based on the RSA PKCS12 Personal Information +Exchange Syntax Standard. +This is specified by the following line in the security properties file: +.RS +.PP +\f[CR]keystore.type=pkcs12\f[R] +.RE +.PP +To have the tools utilize a keystore implementation other than the +default, you can change that line to specify a different keystore type. +For example, if you want to use the Oracle\[aq]s \f[CR]jks\f[R] keystore +implementation, then change the line to the following: +.RS +.PP +\f[CR]keystore.type=jks\f[R] +.RE +.PP +\f[B]Note:\f[R] +.PP +Case doesn\[aq]t matter in keystore type designations. +For example, \f[CR]JKS\f[R] would be considered the same as +\f[CR]jks\f[R]. +.RE +.TP +Certificate +A certificate (or public\-key certificate) is a digitally signed +statement from one entity (the issuer), saying that the public key and +some other information of another entity (the subject) has some specific +value. +The following terms are related to certificates: +.RS +.IP \[bu] 2 +Public Keys: These are numbers associated with a particular entity, and +are intended to be known to everyone who needs to have trusted +interactions with that entity. +Public keys are used to verify signatures. +.IP \[bu] 2 +Digitally Signed: If some data is digitally signed, then it is stored +with the identity of an entity and a signature that proves that entity +knows about the data. +The data is rendered unforgeable by signing with the entity\[aq]s +private key. +.IP \[bu] 2 +Identity: A known way of addressing an entity. +In some systems, the identity is the public key, and in others it can be +anything from an Oracle Solaris UID to an email address to an X.509 +distinguished name. +.IP \[bu] 2 +Signature: A signature is computed over some data using the private key +of an entity. +The signer, which in the case of a certificate is also known as the +issuer. +.IP \[bu] 2 +Private Keys: These are numbers, each of which is supposed to be known +only to the particular entity whose private key it is (that is, it is +supposed to be kept secret). +Private and public keys exist in pairs in all public key cryptography +systems (also referred to as public key crypto systems). +In a typical public key crypto system, such as DSA, a private key +corresponds to exactly one public key. +Private keys are used to compute signatures. +.IP \[bu] 2 +Entity: An entity is a person, organization, program, computer, +business, bank, or something else you are trusting to some degree. +.PP +Public key cryptography requires access to users\[aq] public keys. +In a large\-scale networked environment, it is impossible to guarantee +that prior relationships between communicating entities were established +or that a trusted repository exists with all used public keys. +Certificates were invented as a solution to this public key distribution +problem. +Now a Certification Authority (CA) can act as a trusted third party. +CAs are entities such as businesses that are trusted to sign (issue) +certificates for other entities. +It is assumed that CAs only create valid and reliable certificates +because they are bound by legal agreements. +There are many public Certification Authorities, such as DigiCert, +Comodo, Entrust, and so on. +.PP +You can also run your own Certification Authority using products such as +Microsoft Certificate Server or the Entrust CA product for your +organization. +With the \f[CR]keytool\f[R] command, it is possible to display, import, +and export certificates. +It is also possible to generate self\-signed certificates. +.PP +The \f[CR]keytool\f[R] command currently handles X.509 certificates. +.RE +.TP +X.509 Certificates +The X.509 standard defines what information can go into a certificate +and describes how to write it down (the data format). +All the data in a certificate is encoded with two related standards +called ASN.1/DER. +Abstract Syntax Notation 1 describes data. +The Definite Encoding Rules describe a single way to store and transfer +that data. +.RS +.PP +All X.509 certificates have the following data, in addition to the +signature: +.IP \[bu] 2 +Version: This identifies which version of the X.509 standard applies to +this certificate, which affects what information can be specified in it. +Thus far, three versions are defined. +The \f[CR]keytool\f[R] command can import and export v1, v2, and v3 +certificates. +It generates v3 certificates. +.RS 2 +.IP \[bu] 2 +X.509 Version 1 has been available since 1988, is widely deployed, and +is the most generic. +.IP \[bu] 2 +X.509 Version 2 introduced the concept of subject and issuer unique +identifiers to handle the possibility of reuse of subject or issuer +names over time. +Most certificate profile documents strongly recommend that names not be +reused and that certificates shouldn\[aq]t make use of unique +identifiers. +Version 2 certificates aren\[aq]t widely used. +.IP \[bu] 2 +X.509 Version 3 is the most recent (1996) and supports the notion of +extensions where anyone can define an extension and include it in the +certificate. +Some common extensions are: KeyUsage (limits the use of the keys to +particular purposes such as \f[CR]signing\-only\f[R]) and +AlternativeNames (allows other identities to also be associated with +this public key, for example. +DNS names, email addresses, IP addresses). +Extensions can be marked critical to indicate that the extension should +be checked and enforced or used. +For example, if a certificate has the KeyUsage extension marked critical +and set to \f[CR]keyCertSign\f[R], then when this certificate is +presented during SSL communication, it should be rejected because the +certificate extension indicates that the associated private key should +only be used for signing certificates and not for SSL use. +.RE +.IP \[bu] 2 +Serial number: The entity that created the certificate is responsible +for assigning it a serial number to distinguish it from other +certificates it issues. +This information is used in numerous ways. +For example, when a certificate is revoked its serial number is placed +in a Certificate Revocation List (CRL). +.IP \[bu] 2 +Signature algorithm identifier: This identifies the algorithm used by +the CA to sign the certificate. +.IP \[bu] 2 +Issuer name: The X.500 Distinguished Name of the entity that signed the +certificate. +This is typically a CA. +Using this certificate implies trusting the entity that signed this +certificate. +In some cases, such as root or top\-level CA certificates, the issuer +signs its own certificate. +.IP \[bu] 2 +Validity period: Each certificate is valid only for a limited amount of +time. +This period is described by a start date and time and an end date and +time, and can be as short as a few seconds or almost as long as a +century. +The validity period chosen depends on a number of factors, such as the +strength of the private key used to sign the certificate, or the amount +one is willing to pay for a certificate. +This is the expected period that entities can rely on the public value, +when the associated private key has not been compromised. +.IP \[bu] 2 +Subject name: The name of the entity whose public key the certificate +identifies. +This name uses the X.500 standard, so it is intended to be unique across +the Internet. +This is the X.500 Distinguished Name (DN) of the entity. +For example, +.RS 2 +.RS +.PP +\f[CR]CN=Java Duke, OU=Java Software Division, O=Oracle Corporation, C=US\f[R] +.RE +.PP +These refer to the subject\[aq]s common name (CN), organizational unit +(OU), organization (O), and country (C). +.RE +.IP \[bu] 2 +Subject public key information: This is the public key of the entity +being named with an algorithm identifier that specifies which public key +crypto system this key belongs to and any associated key parameters. +.RE +.TP +Certificate Chains +The \f[CR]keytool\f[R] command can create and manage keystore key +entries that each contain a private key and an associated certificate +chain. +The first certificate in the chain contains the public key that +corresponds to the private key. +.RS +.PP +When keys are first generated, the chain usually starts off containing a +single element, a self\-signed certificate. +See \-genkeypair in \f[B]Commands\f[R]. +A self\-signed certificate is one for which the issuer (signer) is the +same as the subject. +The subject is the entity whose public key is being authenticated by the +certificate. +When the \f[CR]\-genkeypair\f[R] command is called to generate a new +public/private key pair, it also wraps the public key into a +self\-signed certificate (unless the \f[CR]\-signer\f[R] option is +specified). +.PP +Later, after a Certificate Signing Request (CSR) was generated with the +\f[CR]\-certreq\f[R] command and sent to a Certification Authority (CA), +the response from the CA is imported with \f[CR]\-importcert\f[R], and +the self\-signed certificate is replaced by a chain of certificates. +At the bottom of the chain is the certificate (reply) issued by the CA +authenticating the subject\[aq]s public key. +The next certificate in the chain is one that authenticates the CA\[aq]s +public key. +.PP +In many cases, this is a self\-signed certificate, which is a +certificate from the CA authenticating its own public key, and the last +certificate in the chain. +In other cases, the CA might return a chain of certificates. +In this case, the bottom certificate in the chain is the same (a +certificate signed by the CA, authenticating the public key of the key +entry), but the second certificate in the chain is a certificate signed +by a different CA that authenticates the public key of the CA you sent +the CSR to. +The next certificate in the chain is a certificate that authenticates +the second CA\[aq]s key, and so on, until a self\-signed root +certificate is reached. +Each certificate in the chain (after the first) authenticates the public +key of the signer of the previous certificate in the chain. +.PP +Many CAs only return the issued certificate, with no supporting chain, +especially when there is a flat hierarchy (no intermediates CAs). +In this case, the certificate chain must be established from trusted +certificate information already stored in the keystore. +.PP +A different reply format (defined by the PKCS #7 standard) includes the +supporting certificate chain in addition to the issued certificate. +Both reply formats can be handled by the \f[CR]keytool\f[R] command. +.PP +The top\-level (root) CA certificate is self\-signed. +However, the trust into the root\[aq]s public key doesn\[aq]t come from +the root certificate itself, but from other sources such as a newspaper. +This is because anybody could generate a self\-signed certificate with +the distinguished name of, for example, the DigiCert root CA. +The root CA public key is widely known. +The only reason it is stored in a certificate is because this is the +format understood by most tools, so the certificate in this case is only +used as a vehicle to transport the root CA\[aq]s public key. +Before you add the root CA certificate to your keystore, you should view +it with the \f[CR]\-printcert\f[R] option and compare the displayed +fingerprint with the well\-known fingerprint obtained from a newspaper, +the root CA\[aq]s Web page, and so on. +.RE +.TP +cacerts Certificates File +A certificates file named \f[CR]cacerts\f[R] resides in the security +properties directory: +.RS +.IP \[bu] 2 +\f[B]Linux and macOS:\f[R] \f[I]JAVA_HOME\f[R]\f[CR]/lib/security\f[R] +.IP \[bu] 2 +\f[B]Windows:\f[R] \f[I]JAVA_HOME\f[R]\f[CR]\[rs]lib\[rs]security\f[R] +.PP +The \f[CR]cacerts\f[R] file represents a system\-wide keystore with CA +certificates. +System administrators can configure and manage that file with the +\f[CR]keytool\f[R] command by specifying \f[CR]jks\f[R] as the keystore +type. +The \f[CR]cacerts\f[R] keystore file ships with a default set of root CA +certificates. +For Linux, macOS, and Windows, you can list the default certificates +with the following command: +.RS +.PP +\f[CR]keytool \-list \-cacerts\f[R] +.RE +.PP +The initial password of the \f[CR]cacerts\f[R] keystore file is +\f[CR]changeit\f[R]. +System administrators should change that password and the default access +permission of that file upon installing the SDK. +.PP +\f[B]Note:\f[R] +.PP +It is important to verify your \f[CR]cacerts\f[R] file. +Because you trust the CAs in the \f[CR]cacerts\f[R] file as entities for +signing and issuing certificates to other entities, you must manage the +\f[CR]cacerts\f[R] file carefully. +The \f[CR]cacerts\f[R] file should contain only certificates of the CAs +you trust. +It is your responsibility to verify the trusted root CA certificates +bundled in the \f[CR]cacerts\f[R] file and make your own trust +decisions. +.PP +To remove an untrusted CA certificate from the \f[CR]cacerts\f[R] file, +use the \f[CR]\-delete\f[R] option of the \f[CR]keytool\f[R] command. +You can find the \f[CR]cacerts\f[R] file in the JDK\[aq]s +\f[CR]$JAVA_HOME/lib/security\f[R] directory. +Contact your system administrator if you don\[aq]t have permission to +edit this file. +.RE +.TP +Internet RFC 1421 Certificate Encoding Standard +Certificates are often stored using the printable encoding format +defined by the Internet RFC 1421 standard, instead of their binary +encoding. +This certificate format, also known as Base64 encoding, makes it easy to +export certificates to other applications by email or through some other +mechanism. +.RS +.PP +Certificates read by the \f[CR]\-importcert\f[R] and +\f[CR]\-printcert\f[R] commands can be in either this format or binary +encoded. +The \f[CR]\-exportcert\f[R] command by default outputs a certificate in +binary encoding, but will instead output a certificate in the printable +encoding format, when the \f[CR]\-rfc\f[R] option is specified. +.PP +The \f[CR]\-list\f[R] command by default prints the SHA\-256 fingerprint +of a certificate. +If the \f[CR]\-v\f[R] option is specified, then the certificate is +printed in human\-readable format. +If the \f[CR]\-rfc\f[R] option is specified, then the certificate is +output in the printable encoding format. +.PP +In its printable encoding format, the encoded certificate is bounded at +the beginning and end by the following text: +.IP +.EX +\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\- + +encoded certificate goes here. + +\-\-\-\-\-END CERTIFICATE\-\-\-\-\- +.EE +.RE +.TP +X.500 Distinguished Names +X.500 Distinguished Names are used to identify entities, such as those +that are named by the \f[CR]subject\f[R] and \f[CR]issuer\f[R] (signer) +fields of X.509 certificates. +The \f[CR]keytool\f[R] command supports the following subparts: +.RS +.IP \[bu] 2 +commonName: The common name of a person such as Susan Jones. +.IP \[bu] 2 +organizationUnit: The small organization (such as department or +division) name. +For example, Purchasing. +.IP \[bu] 2 +localityName: The locality (city) name, for example, Palo Alto. +.IP \[bu] 2 +stateName: State or province name, for example, California. +.IP \[bu] 2 +country: Two\-letter country code, for example, CH. +.PP +When you supply a distinguished name string as the value of a +\f[CR]\-dname\f[R] option, such as for the \f[CR]\-genkeypair\f[R] +command, the string must be in the following format: +.RS +.PP +\f[CR]CN=cName, OU=orgUnit, O=org, L=city, S=state, C=countryCode\f[R] +.RE +.PP +All the following items represent actual values and the previous +keywords are abbreviations for the following: +.IP +.EX +CN=commonName +OU=organizationUnit +O=organizationName +L=localityName +S=stateName +C=country +.EE +.PP +A sample distinguished name string is: +.RS +.PP +\f[CR]CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US\f[R] +.RE +.PP +A sample command using such a string is: +.RS +.PP +\f[CR]keytool \-genkeypair \-dname \[dq]CN=Mark Smith, OU=Java, O=Oracle, L=Cupertino, S=California, C=US\[dq] \-alias mark \-keyalg rsa\f[R] +.RE +.PP +Case doesn\[aq]t matter for the keyword abbreviations. +For example, CN, cn, and Cn are all treated the same. +.PP +Order matters; each subcomponent must appear in the designated order. +However, it isn\[aq]t necessary to have all the subcomponents. +You can use a subset, for example: +.RS +.PP +\f[CR]CN=Smith, OU=Java, O=Oracle, C=US\f[R] +.RE +.PP +If a distinguished name string value contains a comma, then the comma +must be escaped by a backslash (\[rs]) character when you specify the +string on a command line, as in: +.RS +.PP +\f[CR]cn=Jack, ou=Java\[rs], Product Development, o=Oracle, c=US\f[R] +.RE +.PP +It is never necessary to specify a distinguished name string on a +command line. +When the distinguished name is needed for a command, but not supplied on +the command line, the user is prompted for each of the subcomponents. +In this case, a comma doesn\[aq]t need to be escaped by a backslash +(\[rs]). +.RE +.SH WARNINGS +.SH IMPORTING TRUSTED CERTIFICATES WARNING +\f[B]Important\f[R]: Be sure to check a certificate very carefully +before importing it as a trusted certificate. +.PP +\f[B]Windows Example:\f[R] +.PP +View the certificate first with the \f[CR]\-printcert\f[R] command or +the \f[CR]\-importcert\f[R] command without the \f[CR]\-noprompt\f[R] +option. +Ensure that the displayed certificate fingerprints match the expected +ones. +For example, suppose someone sends or emails you a certificate that you +put it in a file named \f[CR]\[rs]tmp\[rs]cert\f[R]. +Before you consider adding the certificate to your list of trusted +certificates, you can execute a \f[CR]\-printcert\f[R] command to view +its fingerprints, as follows: +.IP +.EX + keytool \-printcert \-file \[rs]tmp\[rs]cert + Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Serial Number: 59092b34 + Valid from: Thu Jun 24 18:01:13 PDT 2016 until: Wed Jun 23 17:01:13 PST 2016 + Certificate Fingerprints: + + SHA\-1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE + SHA\-256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90: + 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4 +.EE +.PP +\f[B]Linux Example:\f[R] +.PP +View the certificate first with the \f[CR]\-printcert\f[R] command or +the \f[CR]\-importcert\f[R] command without the \f[CR]\-noprompt\f[R] +option. +Ensure that the displayed certificate fingerprints match the expected +ones. +For example, suppose someone sends or emails you a certificate that you +put it in a file named \f[CR]/tmp/cert\f[R]. +Before you consider adding the certificate to your list of trusted +certificates, you can execute a \f[CR]\-printcert\f[R] command to view +its fingerprints, as follows: +.IP +.EX + keytool \-printcert \-file /tmp/cert + Owner: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Issuer: CN=ll, OU=ll, O=ll, L=ll, S=ll, C=ll + Serial Number: 59092b34 + Valid from: Thu Jun 24 18:01:13 PDT 2016 until: Wed Jun 23 17:01:13 PST 2016 + Certificate Fingerprints: + + SHA\-1: 20:B6:17:FA:EF:E5:55:8A:D0:71:1F:E8:D6:9D:C0:37:13:0E:5E:FE + SHA\-256: 90:7B:70:0A:EA:DC:16:79:92:99:41:FF:8A:FE:EB:90: + 17:75:E0:90:B2:24:4D:3A:2A:16:A6:E4:11:0F:67:A4 +.EE +.PP +Then call or otherwise contact the person who sent the certificate and +compare the fingerprints that you see with the ones that they show. +Only when the fingerprints are equal is it guaranteed that the +certificate wasn\[aq]t replaced in transit with somebody else\[aq]s +certificate such as an attacker\[aq]s certificate. +If such an attack took place, and you didn\[aq]t check the certificate +before you imported it, then you would be trusting anything the attacker +signed, for example, a JAR file with malicious class files inside. +.PP +\f[B]Note:\f[R] +.PP +It isn\[aq]t required that you execute a \f[CR]\-printcert\f[R] command +before importing a certificate. +This is because before you add a certificate to the list of trusted +certificates in the keystore, the \f[CR]\-importcert\f[R] command prints +out the certificate information and prompts you to verify it. +You can then stop the import operation. +However, you can do this only when you call the \f[CR]\-importcert\f[R] +command without the \f[CR]\-noprompt\f[R] option. +If the \f[CR]\-noprompt\f[R] option is specified, then there is no +interaction with the user. +.SH PASSWORDS WARNING +Most commands that operate on a keystore require the store password. +Some commands require a private/secret key password. +Passwords can be specified on the command line in the +\f[CR]\-storepass\f[R] and \f[CR]\-keypass\f[R] options. +However, a password shouldn\[aq]t be specified on a command line or in a +script unless it is for testing, or you are on a secure system. +When you don\[aq]t specify a required password option on a command line, +you are prompted for it. +.SH CERTIFICATE CONFORMANCE WARNING +\f[B]Internet X.509 Public Key Infrastructure Certificate and +Certificate Revocation List (CRL) Profile\f[R] +[https://tools.ietf.org/rfc/rfc5280.txt] defined a profile on conforming +X.509 certificates, which includes what values and value combinations +are valid for certificate fields and extensions. +.PP +The \f[CR]keytool\f[R] command doesn\[aq]t enforce all of these rules so +it can generate certificates that don\[aq]t conform to the standard, +such as self\-signed certificates that would be used for internal +testing purposes. +Certificates that don\[aq]t conform to the standard might be rejected by +the JDK or other applications. +Users should ensure that they provide the correct options for +\f[CR]\-dname\f[R], \f[CR]\-ext\f[R], and so on. +.SH IMPORT A NEW TRUSTED CERTIFICATE +Before you add the certificate to the keystore, the \f[CR]keytool\f[R] +command verifies it by attempting to construct a chain of trust from +that certificate to a self\-signed certificate (belonging to a root CA), +using trusted certificates that are already available in the keystore. +.PP +If the \f[CR]\-trustcacerts\f[R] option was specified, then additional +certificates are considered for the chain of trust, namely the +certificates in a file named \f[CR]cacerts\f[R]. +.PP +If the \f[CR]keytool\f[R] command fails to establish a trust path from +the certificate to be imported up to a self\-signed certificate (either +from the keystore or the \f[CR]cacerts\f[R] file), then the certificate +information is printed, and the user is prompted to verify it by +comparing the displayed certificate fingerprints with the fingerprints +obtained from some other (trusted) source of information, which might be +the certificate owner. +Be very careful to ensure the certificate is valid before importing it +as a trusted certificate. +The user then has the option of stopping the import operation. +If the \f[CR]\-noprompt\f[R] option is specified, then there is no +interaction with the user. +.SH IMPORT A CERTIFICATE REPLY +When you import a certificate reply, the certificate reply is validated +with trusted certificates from the keystore, and optionally, the +certificates configured in the \f[CR]cacerts\f[R] keystore file when the +\f[CR]\-trustcacerts\f[R] option is specified. +.PP +The methods of determining whether the certificate reply is trusted are +as follows: +.IP \[bu] 2 +If the reply is a single X.509 certificate, then the \f[CR]keytool\f[R] +command attempts to establish a trust chain, starting at the certificate +reply and ending at a self\-signed certificate (belonging to a root CA). +The certificate reply and the hierarchy of certificates is used to +authenticate the certificate reply from the new certificate chain of +aliases. +If a trust chain can\[aq]t be established, then the certificate reply +isn\[aq]t imported. +In this case, the \f[CR]keytool\f[R] command doesn\[aq]t print the +certificate and prompt the user to verify it, because it is very +difficult for a user to determine the authenticity of the certificate +reply. +.IP \[bu] 2 +If the reply is a PKCS #7 formatted certificate chain or a sequence of +X.509 certificates, then the chain is ordered with the user certificate +first followed by zero or more CA certificates. +If the chain ends with a self\-signed root CA certificate and +the\f[CR]\-trustcacerts\f[R] option was specified, the +\f[CR]keytool\f[R] command attempts to match it with any of the trusted +certificates in the keystore or the \f[CR]cacerts\f[R] keystore file. +If the chain doesn\[aq]t end with a self\-signed root CA certificate and +the \f[CR]\-trustcacerts\f[R] option was specified, the +\f[CR]keytool\f[R] command tries to find one from the trusted +certificates in the keystore or the \f[CR]cacerts\f[R] keystore file and +add it to the end of the chain. +If the certificate isn\[aq]t found and the \f[CR]\-noprompt\f[R] option +isn\[aq]t specified, the information of the last certificate in the +chain is printed, and the user is prompted to verify it. +.PP +If the public key in the certificate reply matches the user\[aq]s public +key already stored with \f[CR]alias\f[R], then the old certificate chain +is replaced with the new certificate chain in the reply. +The old chain can only be replaced with a valid \f[CR]keypass\f[R], and +so the password used to protect the private key of the entry is +supplied. +If no password is provided, and the private key password is different +from the keystore password, the user is prompted for it. +.PP +This command was named \f[CR]\-import\f[R] in earlier releases. +This old name is still supported in this release. +The new name, \f[CR]\-importcert\f[R], is preferred. diff -Nru openjdk-25-25.0.2+10/debian/man/rmiregistry.1 openjdk-25-25.0.3+9/debian/man/rmiregistry.1 --- openjdk-25-25.0.2+10/debian/man/rmiregistry.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/rmiregistry.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,61 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "RMIREGISTRY" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +rmiregistry \- create and start a remote object registry on the +specified port on the current host +.SH SYNOPSIS +\f[CR]rmiregistry\f[R] [\f[I]options\f[R]] [\f[I]port\f[R]] +.TP +\f[I]options\f[R] +This represents the option for the \f[CR]rmiregistry\f[R] command. +See \f[B]Options\f[R] +.TP +\f[I]port\f[R] +The number of a port on the current host at which to start the remote +object registry. +.SH DESCRIPTION +The \f[CR]rmiregistry\f[R] command creates and starts a remote object +registry on the specified port on the current host. +If the port is omitted, then the registry is started on port 1099. +The \f[CR]rmiregistry\f[R] command produces no output and is typically +run in the background, for example: +.RS +.PP +\f[CR]rmiregistry &\f[R] +.RE +.PP +A remote object registry is a bootstrap naming service that\[aq]s used +by RMI servers on the same host to bind remote objects to names. +Clients on local and remote hosts can then look up remote objects and +make remote method invocations. +.PP +The registry is typically used to locate the first remote object on +which an application needs to call methods. +That object then provides application\-specific support for finding +other objects. +.PP +The methods of the \f[CR]java.rmi.registry.LocateRegistry\f[R] class are +used to get a registry operating on the local host or local host and +port. +.PP +The URL\-based methods of the \f[CR]java.rmi.Naming\f[R] class operate +on a registry and can be used to: +.IP \[bu] 2 +Bind the specified name to a remote object +.IP \[bu] 2 +Return an array of the names bound in the registry +.IP \[bu] 2 +Return a reference, a stub, for the remote object associated with the +specified name +.IP \[bu] 2 +Rebind the specified name to a new remote object +.IP \[bu] 2 +Destroy the binding for the specified name that\[aq]s associated with a +remote object +.SH OPTIONS +.TP +\f[CR]\-J\f[R]\f[I]option\f[R] +Used with any Java option to pass the \f[I]option\f[R] following the +\f[CR]\-J\f[R] (no spaces between the \f[CR]\-J\f[R] and the option) to +the Java interpreter. diff -Nru openjdk-25-25.0.2+10/debian/man/serialver.1 openjdk-25-25.0.3+9/debian/man/serialver.1 --- openjdk-25-25.0.2+10/debian/man/serialver.1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/man/serialver.1 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,37 @@ +.\" Automatically generated by Pandoc 3.1.11.1 +.\" +.TH "SERIALVER" "1" "2026" "JDK 25.0.3" "JDK Commands" +.SH NAME +serialver \- return the \f[CR]serialVersionUID\f[R] for one or more +classes in a form suitable for copying into an evolving class +.SH SYNOPSIS +\f[CR]serialver\f[R] [\f[I]options\f[R]] [\f[I]classnames\f[R]] +.TP +\f[I]options\f[R] +This represents the command\-line options for the \f[CR]serialver\f[R] +command. +See \f[B]Options for serialver\f[R]. +.TP +\f[I]classnames\f[R] +The classes for which \f[CR]serialVersionUID\f[R] is to be returned. +.SH DESCRIPTION +The \f[CR]serialver\f[R] command returns the \f[CR]serialVersionUID\f[R] +for one or more classes in a form suitable for copying into an evolving +class. +When called with no arguments, the \f[CR]serialver\f[R] command prints a +usage line. +.SH OPTIONS FOR SERIALVER +.TP +\f[CR]\-classpath\f[R] \f[I]path\-files\f[R] +Sets the search path for application classes and resources. +Separate classes and resources with a colon (:). +.TP +\f[CR]\-J\f[R]\f[I]option\f[R] +Passes the specified \f[I]option\f[R] to the Java Virtual Machine, where +\f[I]option\f[R] is one of the options described on the reference page +for the Java application launcher. +For example, \f[CR]\-J\-Xms48m\f[R] sets the startup memory to 48 MB. +.SH WARNING +The \f[CR]serialver\f[R] command loads and initializes the specified +classes in order to determine their \f[CR]serialVersionUID\f[R] values. +\f[I]DO NOT RUN\f[R] \f[CR]serialver\f[R] on untrusted classes. diff -Nru openjdk-25-25.0.2+10/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch openjdk-25-25.0.3+9/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch --- openjdk-25-25.0.2+10/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch 2026-04-25 10:29:02.000000000 +0000 @@ -9,7 +9,7 @@ --- a/make/hotspot/lib/JvmOverrideFiles.gmk +++ b/make/hotspot/lib/JvmOverrideFiles.gmk -@@ -45,6 +45,15 @@ +@@ -51,6 +51,15 @@ LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_F # by using -ffp-contract=off on GCC/Clang platforms. ifneq ($(FDLIBM_CFLAGS), ) LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM) diff -Nru openjdk-25-25.0.2+10/debian/patches/default-jvm-cfg.diff openjdk-25-25.0.3+9/debian/patches/default-jvm-cfg.diff --- openjdk-25-25.0.2+10/debian/patches/default-jvm-cfg.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/default-jvm-cfg.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/java.base/share/native/libjli/java.c +++ b/src/java.base/share/native/libjli/java.c -@@ -2127,7 +2127,7 @@ jint +@@ -2058,7 +2058,7 @@ jint ReadKnownVMs(const char *jvmCfgName, jboolean speculative) { FILE *jvmCfg; @@ -9,7 +9,7 @@ int cnt = 0; int lineno = 0; jlong start = 0, end = 0; -@@ -2141,6 +2141,11 @@ ReadKnownVMs(const char *jvmCfgName, jbo +@@ -2072,6 +2072,11 @@ ReadKnownVMs(const char *jvmCfgName, jbo jvmCfg = fopen(jvmCfgName, "r"); if (jvmCfg == NULL) { diff -Nru openjdk-25-25.0.2+10/debian/patches/dnd-files.diff openjdk-25-25.0.3+9/debian/patches/dnd-files.diff --- openjdk-25-25.0.2+10/debian/patches/dnd-files.diff 2024-10-16 11:05:41.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/dnd-files.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java +++ b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java -@@ -273,14 +273,14 @@ +@@ -274,14 +274,14 @@ public final class XDataTransferer exten BufferedReader reader = new BufferedReader(isr)) { String line; ArrayList<URI> uriList = new ArrayList<>(); diff -Nru openjdk-25-25.0.2+10/debian/patches/hotspot-mips-align.diff openjdk-25-25.0.3+9/debian/patches/hotspot-mips-align.diff --- openjdk-25-25.0.2+10/debian/patches/hotspot-mips-align.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/hotspot-mips-align.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp +++ b/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp -@@ -437,7 +437,7 @@ int ZeroInterpreter::native_entry(Method +@@ -433,7 +433,7 @@ int ZeroInterpreter::native_entry(Method ThreadStateTransition::transition_from_java(thread, _thread_in_native); // Make the call diff -Nru openjdk-25-25.0.2+10/debian/patches/icc_loading_with_symlink.diff openjdk-25-25.0.3+9/debian/patches/icc_loading_with_symlink.diff --- openjdk-25-25.0.2+10/debian/patches/icc_loading_with_symlink.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/icc_loading_with_symlink.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java +++ b/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java -@@ -1315,9 +1315,6 @@ public sealed class ICC_Profile implemen +@@ -1395,9 +1395,6 @@ public sealed class ICC_Profile implemen dir = st.nextToken(); fullPath = dir + File.separatorChar + fileName; f = new File(fullPath); diff -Nru openjdk-25-25.0.2+10/debian/patches/icedtea-override-redirect-compiz.diff openjdk-25-25.0.3+9/debian/patches/icedtea-override-redirect-compiz.diff --- openjdk-25-25.0.2+10/debian/patches/icedtea-override-redirect-compiz.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/icedtea-override-redirect-compiz.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java +++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java -@@ -1259,6 +1259,7 @@ +@@ -1182,6 +1182,7 @@ class XWindowPeer extends XPanelPeer imp boolean isOverrideRedirect() { return XWM.getWMID() == XWM.OPENLOOK_WM || diff -Nru openjdk-25-25.0.2+10/debian/patches/jdk-8369817.diff openjdk-25-25.0.3+9/debian/patches/jdk-8369817.diff --- openjdk-25-25.0.2+10/debian/patches/jdk-8369817.diff 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/jdk-8369817.diff 2026-04-25 10:29:02.000000000 +0000 @@ -0,0 +1,30 @@ +From 008d8d914cd4dd4573361390ee31120134338802 Mon Sep 17 00:00:00 2001 +From: Francesco Andreuzzi <fandreuzzi@openjdk.org> +Date: Wed, 15 Oct 2025 09:17:49 +0000 +Subject: [PATCH] 8369817: [TESTBUG] EmptyPath::toString is ignored +Origin: https://github.com/openjdk/jdk/commit/008d8d914cd4dd4573361390ee31120134338802 +Bug: https://bugs.openjdk.org/browse/JDK-8369817 +Reviewed-by: jpai, ayang + +--- + test/jdk/java/io/File/EmptyPath.java | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/test/jdk/java/io/File/EmptyPath.java b/test/jdk/java/io/File/EmptyPath.java +index 55c4af96fe3..374a69c7959 100644 +--- a/test/jdk/java/io/File/EmptyPath.java ++++ b/test/jdk/java/io/File/EmptyPath.java +@@ -382,9 +382,8 @@ public void toPath() { + } + + @Test +- public String toString() { ++ public void testToString() { + assertEquals(EMPTY_STRING, f.toString()); +- return EMPTY_STRING; + } + + @Test +-- +2.51.0 + diff -Nru openjdk-25-25.0.2+10/debian/patches/jdk-8381555.diff openjdk-25-25.0.3+9/debian/patches/jdk-8381555.diff --- openjdk-25-25.0.2+10/debian/patches/jdk-8381555.diff 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/jdk-8381555.diff 2026-04-25 10:19:13.000000000 +0000 @@ -0,0 +1,29 @@ +From 81b6fcc3e9e6a5a53a7a53d8371d86a2f48f3d90 Mon Sep 17 00:00:00 2001 +From: Vladimir Petko <vpetko@openjdk.org> +Date: Thu, 2 Apr 2026 13:12:48 +0000 +Subject: [PATCH] 8381555: + test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java fails on 32 bit + architectures +Origin: https://github.com/openjdk/jdk/commit/81b6fcc3e9e6a5a53a7a53d8371d86a2f48f3d90 +Bug: https://bugs.openjdk.org/browse/JDK-8381555 +Reviewed-by: jsikstro + +--- + test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java b/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java +index 3aec113990c..c4c1d364308 100644 +--- a/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java ++++ b/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java +@@ -27,6 +27,7 @@ + /* + * @test TestG1CompressedOops + * @bug 8354145 ++ * @requires vm.bits == 64 + * @requires vm.flagless + * @summary Verify that the flag UseCompressedOops is updated properly + * @library /test/lib +-- +2.51.0 + diff -Nru openjdk-25-25.0.2+10/debian/patches/jdk-getAccessibleValue.diff openjdk-25-25.0.3+9/debian/patches/jdk-getAccessibleValue.diff --- openjdk-25-25.0.2+10/debian/patches/jdk-getAccessibleValue.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/jdk-getAccessibleValue.diff 2026-04-25 10:29:02.000000000 +0000 @@ -79,7 +79,7 @@ --- a/src/java.desktop/share/classes/javax/swing/JTable.java +++ b/src/java.desktop/share/classes/javax/swing/JTable.java -@@ -8450,7 +8450,12 @@ public class JTable extends JComponent i +@@ -8444,7 +8444,12 @@ public class JTable extends JComponent i * <code>null</code> */ public AccessibleSelection getAccessibleSelection() { @@ -93,7 +93,7 @@ } /** -@@ -8460,7 +8465,12 @@ public class JTable extends JComponent i +@@ -8454,7 +8459,12 @@ public class JTable extends JComponent i * @return the <code>AccessibleText</code>, or <code>null</code> */ public AccessibleText getAccessibleText() { @@ -107,7 +107,7 @@ } /** -@@ -8470,7 +8480,12 @@ public class JTable extends JComponent i +@@ -8464,7 +8474,12 @@ public class JTable extends JComponent i * @return the <code>AccessibleValue</code>, or <code>null</code> */ public AccessibleValue getAccessibleValue() { @@ -121,7 +121,7 @@ } -@@ -9230,7 +9245,12 @@ public class JTable extends JComponent i +@@ -9224,7 +9239,12 @@ public class JTable extends JComponent i * @return the <code>AccessibleAction</code>, or <code>null</code> */ public AccessibleAction getAccessibleAction() { @@ -135,7 +135,7 @@ } /** -@@ -9252,7 +9272,12 @@ public class JTable extends JComponent i +@@ -9246,7 +9266,12 @@ public class JTable extends JComponent i * <code>null</code> */ public AccessibleSelection getAccessibleSelection() { @@ -149,7 +149,7 @@ } /** -@@ -9262,7 +9287,12 @@ public class JTable extends JComponent i +@@ -9256,7 +9281,12 @@ public class JTable extends JComponent i * @return the <code>AccessibleText</code>, or <code>null</code> */ public AccessibleText getAccessibleText() { @@ -163,7 +163,7 @@ } /** -@@ -9272,7 +9302,12 @@ public class JTable extends JComponent i +@@ -9266,7 +9296,12 @@ public class JTable extends JComponent i * @return the <code>AccessibleValue</code>, or <code>null</code> */ public AccessibleValue getAccessibleValue() { @@ -179,7 +179,7 @@ --- a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java +++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java -@@ -6636,7 +6636,7 @@ public final class AccessBridge { +@@ -6612,7 +6612,7 @@ public final class AccessBridge { public AccessibleSelection getAccessibleSelection() { AccessibleContext ac = getCurrentAccessibleContext(); if (ac != null && isLeaf) { @@ -188,7 +188,7 @@ } else { return this; } -@@ -6651,7 +6651,7 @@ public final class AccessBridge { +@@ -6627,7 +6627,7 @@ public final class AccessBridge { public AccessibleText getAccessibleText() { AccessibleContext ac = getCurrentAccessibleContext(); if (ac != null) { @@ -197,7 +197,7 @@ } else { return null; } -@@ -6666,7 +6666,7 @@ public final class AccessBridge { +@@ -6642,7 +6642,7 @@ public final class AccessBridge { public AccessibleValue getAccessibleValue() { AccessibleContext ac = getCurrentAccessibleContext(); if (ac != null) { diff -Nru openjdk-25-25.0.2+10/debian/patches/ldap-timeout-test-use-ip.patch openjdk-25-25.0.3+9/debian/patches/ldap-timeout-test-use-ip.patch --- openjdk-25-25.0.2+10/debian/patches/ldap-timeout-test-use-ip.patch 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/ldap-timeout-test-use-ip.patch 2026-04-25 10:29:02.000000000 +0000 @@ -6,7 +6,7 @@ Last-Update: 2023-03-27 --- a/test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java +++ b/test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java -@@ -86,7 +86,9 @@ +@@ -81,7 +81,9 @@ public class LdapPoolTimeoutTest { env.put("com.sun.jndi.ldap.read.timeout", String.valueOf(READ_MILLIS)); env.put("com.sun.jndi.ldap.connect.timeout", String.valueOf(CONNECT_MILLIS)); env.put("com.sun.jndi.ldap.connect.pool", "true"); @@ -16,4 +16,4 @@ + env.put(Context.PROVIDER_URL, "ldap://224.0.0.0:1234"); try { - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); + // launch a few concurrent connection attempts diff -Nru openjdk-25-25.0.2+10/debian/patches/m68k-support.diff openjdk-25-25.0.3+9/debian/patches/m68k-support.diff --- openjdk-25-25.0.2+10/debian/patches/m68k-support.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/m68k-support.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1024,7 +1024,7 @@ +XTextProperty 16 --- a/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk +++ b/make/modules/java.desktop/gensrc/GensrcX11Wrappers.gmk -@@ -29,9 +29,14 @@ +@@ -34,9 +34,14 @@ ifeq ($(INCLUDE), true) # Put the generated Java classes used to interface X11 from awt here. GENSRC_X11WRAPPERS_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11 @@ -1042,7 +1042,7 @@ $(eval $(call SetupExecute, gen_x11wrappers, \ --- a/src/hotspot/share/memory/allocation.hpp +++ b/src/hotspot/share/memory/allocation.hpp -@@ -359,7 +359,7 @@ class MetaspaceObj { +@@ -365,7 +365,7 @@ class MetaspaceObj { // that should be read-only by default. See symbol.hpp for an example. This function // is used by the templates in metaspaceClosure.hpp static bool is_read_only_by_default() { return false; } @@ -1051,7 +1051,7 @@ // Base class for classes that constitute name spaces. -@@ -470,7 +470,7 @@ protected: +@@ -476,7 +476,7 @@ protected: void print() const; virtual void print_on(outputStream* st) const; #endif // PRODUCT @@ -1072,7 +1072,7 @@ #endif // SHARE_OOPS_CONSTMETHOD_HPP --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp -@@ -319,7 +319,7 @@ class oopDesc { +@@ -349,7 +349,7 @@ class oopDesc { // for error reporting static void* load_oop_raw(oop obj, int offset); diff -Nru openjdk-25-25.0.2+10/debian/patches/make-debug-print.diff openjdk-25-25.0.3+9/debian/patches/make-debug-print.diff --- openjdk-25-25.0.2+10/debian/patches/make-debug-print.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/make-debug-print.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/make/Main.gmk +++ b/make/Main.gmk -@@ -1328,6 +1328,7 @@ ALL_TARGETS += default jdk images docs b +@@ -1367,6 +1367,7 @@ ALL_TARGETS += default jdk images docs b # Aliases used for running tests. diff -Nru openjdk-25-25.0.2+10/debian/patches/multiple-pkcs11-library-init.diff openjdk-25-25.0.3+9/debian/patches/multiple-pkcs11-library-init.diff --- openjdk-25-25.0.2+10/debian/patches/multiple-pkcs11-library-init.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/multiple-pkcs11-library-init.diff 2026-04-25 10:29:02.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 @@ final class Config { +@@ -50,6 +50,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 -@@ -1069,6 +1070,7 @@ final class Config { +@@ -1052,6 +1053,7 @@ final class Config { case "ignoreAll" -> ERR_IGNORE_ALL; case "ignoreMissingLibrary" -> ERR_IGNORE_LIB; case "halt" -> ERR_HALT; @@ -25,7 +25,7 @@ if (DEBUG) { --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java -@@ -186,26 +186,37 @@ public final class SunPKCS11 extends Aut +@@ -181,26 +181,37 @@ public final class SunPKCS11 extends Aut String nssLibraryDirectory = config.getNssLibraryDirectory(); String nssSecmodDirectory = config.getNssSecmodDirectory(); boolean nssOptimizeSpace = config.getNssOptimizeSpace(); diff -Nru openjdk-25-25.0.2+10/debian/patches/reproducible-properties-timestamp.diff openjdk-25-25.0.3+9/debian/patches/reproducible-properties-timestamp.diff --- openjdk-25-25.0.2+10/debian/patches/reproducible-properties-timestamp.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/reproducible-properties-timestamp.diff 2026-04-25 10:29:02.000000000 +0000 @@ -12,7 +12,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; import java.util.function.BiFunction; -@@ -956,7 +958,7 @@ public class Properties extends Hashtabl +@@ -953,7 +955,7 @@ public class Properties extends Hashtabl if (sysPropVal != null && !sysPropVal.isEmpty()) { writeComments(bw, sysPropVal); } else { @@ -21,7 +21,7 @@ bw.newLine(); } } -@@ -1601,4 +1603,25 @@ public class Properties extends Hashtabl +@@ -1598,4 +1600,25 @@ public class Properties extends Hashtabl } this.map = map; } diff -Nru openjdk-25-25.0.2+10/debian/patches/s390x-opt.diff openjdk-25-25.0.3+9/debian/patches/s390x-opt.diff --- openjdk-25-25.0.2+10/debian/patches/s390x-opt.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/s390x-opt.diff 2026-04-25 10:29:02.000000000 +0000 @@ -1,6 +1,6 @@ --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 -@@ -747,6 +747,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], +@@ -749,6 +749,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], fi elif test "x$FLAGS_CPU" = xs390x; then $1_CFLAGS_CPU="-mbackchain -march=z10" diff -Nru openjdk-25-25.0.2+10/debian/patches/series openjdk-25-25.0.3+9/debian/patches/series --- openjdk-25-25.0.2+10/debian/patches/series 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/series 2026-04-25 10:29:02.000000000 +0000 @@ -41,3 +41,5 @@ #jdk-8347014-proposed.patch power-opt.diff test-empty-path.patch +jdk-8369817.diff +jdk-8381555.diff diff -Nru openjdk-25-25.0.2+10/debian/patches/system-pcsclite.diff openjdk-25-25.0.3+9/debian/patches/system-pcsclite.diff --- openjdk-25-25.0.2+10/debian/patches/system-pcsclite.diff 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/patches/system-pcsclite.diff 2026-04-25 10:29:02.000000000 +0000 @@ -8,7 +8,7 @@ ]) ################################################################################ -@@ -313,3 +314,41 @@ AC_DEFUN_ONCE([LIB_SETUP_HARFBUZZ], +@@ -357,3 +358,41 @@ AC_DEFUN_ONCE([LIB_SETUP_HARFBUZZ], AC_SUBST(HARFBUZZ_CFLAGS) AC_SUBST(HARFBUZZ_LIBS) ]) @@ -52,7 +52,7 @@ +]) --- a/make/modules/java.smartcardio/Lib.gmk +++ b/make/modules/java.smartcardio/Lib.gmk -@@ -31,12 +31,12 @@ include LibCommon.gmk +@@ -33,12 +33,12 @@ include LibCommon.gmk $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \ NAME := j2pcsc, \ diff -Nru openjdk-25-25.0.2+10/debian/rules openjdk-25-25.0.3+9/debian/rules --- openjdk-25-25.0.2+10/debian/rules 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/rules 2026-04-25 10:29:13.000000000 +0000 @@ -66,7 +66,6 @@ jtreg_archs += armel loong64 mipsel mips64el jtreg_archs += riscv64 -jvmci_archs = amd64 # FIXME: use bootcycle builds for zero archs? bootcycle_build = $(if $(filter $(DEB_HOST_ARCH), $(hotspot_archs)),yes) @@ -94,7 +93,6 @@ srcdir = . builddir = build zbuilddir = build-zero -jvmci_builddir = build-jvmci VENDOR = openjdk Vendor = OpenJDK @@ -132,7 +130,6 @@ jdirname = java-$(shortver)-$(origin)-$(DEB_HOST_ARCH) jdiralias = java-$(jvmver)-$(origin)-$(DEB_HOST_ARCH) basedir = $(TOP)/$(jdirname) - jvmci_basedir = $(basedir)-jvmci commonbasedir = $(TOP)/java-$(shortver)-$(origin)-common commonbasedir = $(basedir) etcdir = etc/java-$(shortver)-$(origin) @@ -141,7 +138,6 @@ jdirname = java-$(shortver)-$(origin) jdiralias = java-$(jvmver)-$(origin) basedir = $(TOP)/$(jdirname) - jvmci_basedir = $(basedir)-jvmci commonbasedir = $(TOP)/java-$(shortver)-$(origin) etcdir = etc/$(jdirname) testsuitedir = $(basedir)/testsuite @@ -164,8 +160,6 @@ zbuild_target = images test-image endif -jvmci_img = images/graal-builder-jdk -jvmci_target = graal-builder-image # Support parallel=<n> in DEB_BUILD_OPTIONS (see #209008) COMMA=, SPACE = $(EMPTY) $(EMPTY) @@ -218,6 +212,12 @@ zero_dir = zero endif +pandoc_archs := $(filter alpha amd64 arm64 armhf ppc64el riscv64 s390x sparc64, \ + $(any_archs)) +ifeq ($(derivative),Ubuntu) + pandoc_archs := $(filter-out i386, $(pandoc_archs)) +endif + # needed for the jexec build export DEBIAN_JDK_BASE_DIR := /$(basedir) @@ -545,10 +545,12 @@ --with-vendor-vm-bug-url='Unknown' endif +v_pkgrel_opt := $(subst ~,-,$(v_pkgrel)) + COMMON_CONFIGURE_ARGS += \ --with-version-pre='$(if $(filter yes, $(is_upstream_release)),,ea)' \ --with-version-build='$(v_upbuild)' \ - --with-version-opt='$(distribution)-$(v_pkgrel)' \ + --with-version-opt='$(v_pkgrel_opt)-$(distribution)' \ --with-copyright-year=$(PKGYEAR) \ COMMON_CONFIGURE_ARGS += \ @@ -892,7 +894,6 @@ p_doc = $(basename)-doc p_dbg = $(basename)-dbg p_test = $(basename)-testsupport -p_jvmci = $(basename)-jvmci-jdk d = debian/tmp d_jre = debian/$(p_jre) @@ -905,7 +906,6 @@ d_doc = debian/$(p_doc) d_dbg = debian/$(p_dbg) d_test = debian/$(p_test) -d_jvmci = debian/$(p_jvmci) control_vars = \ '-Vvm:Name=$(vm_name)' \ @@ -951,7 +951,7 @@ control_vars += '-Vdbg:Conflicts=openjdk-11-dbg, openjdk-12-dbg, openjdk-13-dbg, openjdk-14-dbg, openjdk-15-dbg, openjdk-16-dbg' endif -debian/control: debian/control.in debian/tests/control debian/rules debian/watch +debian/control: debian/control.in debian/tests/control gen-autopkgtests debian/watch @cp -p debian/control debian/control.old sed \ -e 's/@basename@/$(basename)/g' \ @@ -978,6 +978,7 @@ -e 's/@any_archs@/$(any_archs)/g' \ -e 's/@hotspot_archs@/$(hotspot_archs)/g' \ -e 's/@altzero_archs@/$(altzero_archs)/g' \ + -e 's/@pandoc_archs@/$(pandoc_archs)/g' \ debian/control.in \ $(if $(altzero_archs), debian/control.zero-jre) \ $(if $(DEB_HOST_MULTIARCH),,| grep -v '^Multi-Arch') \ @@ -987,20 +988,30 @@ rm -f debian/control.old; \ else \ diff -u debian/control.old debian/control | wdiff -d -; \ - echo "debian/control did change, please restart the build"; \ + echo "debian/control did change, please restart the build. Run make -f debian/rules update-control-files to update packaging sources."; \ rm -f debian/control.old; \ exit 1; \ fi -debian/tests/control: debian/tests/control.in debian/rules +debian/tests/control: debian/tests/control.in + cp -p $@ $@.old sed \ -e 's/@jtreg_dep@/$(jtreg_dep)/g' \ -e 's/@testng_dep@/$(testng_dep)/g' \ -e 's/@basename@/$(basename)/g' \ -e 's/@jtreg_archs@/$(jtreg_archs)/g' \ $< > $@; + @if cmp -s $@ $@.old; then \ + rm -f $@.old; \ + else \ + diff -u $@.old $@ | wdiff -d -; \ + echo "$@ did change, please restart the build. Run make -f debian/rules update-control-files to update packaging sources."; \ + rm -f $@.old; \ + exit 1; \ + fi -debian/tests/%.sh: debian/tests/%.in debian/rules +debian/tests/%.sh: debian/tests/%.in + cp -p $@ $@.old sed \ -e 's/@basename@/$(basename)/g' \ -e 's,@JDK_DIR@,/$(basedir),g' \ @@ -1009,6 +1020,14 @@ -e 's:@doc_dir@:/usr/share/doc/$(p_jrehl)/:g' \ $< > $@; chmod +x $@ + @if cmp -s $@ $@.old; then \ + rm -f $@.old; \ + else \ + diff -u $@.old $@ | wdiff -d -; \ + echo "$@ did change, please restart the build. Run make -f debian/rules update-control-files to update packaging sources."; \ + rm -f $@.old; \ + exit 1; \ + fi gen-autopkgtests: debian/tests/jtdiff-autopkgtest.sh \ debian/tests/jtreg-autopkgtest.sh \ @@ -1102,20 +1121,6 @@ touch $@ -stamps/jvmci-configure: - @echo '========== $@ ==========' - mkdir -p stamps - rm -rf $(jvmci_builddir) - mkdir -p $(jvmci_builddir) - cd $(jvmci_builddir) && $(EXTRA_BUILD_ENV) bash ../configure \ - $(COMMON_CONFIGURE_ARGS) - touch $@ - -stamps/jvmci-build: stamps/jvmci-configure - @echo '========== $@ ==========' - $(EXTRA_BUILD_ENV) $(MAKE) --no-print-directory -C $(jvmci_builddir) $(jvmci_target) - touch $@ - stamps/zero-configure: stamps/build stamps/unpack @echo '========== $@ ==========' mkdir -p stamps @@ -1154,12 +1159,35 @@ build_stamps = \ stamps/build \ - $(if $(filter $(DEB_HOST_ARCH),$(altzero_archs)),stamps/zero-build) \ - $(if $(filter $(DEB_HOST_ARCH),$(jvmci_archs)),stamps/jvmci-build) + $(if $(filter $(DEB_HOST_ARCH),$(altzero_archs)),stamps/zero-build) build_stamps += stamps/jtreg-check-default -pre-build: +update-control-files: debian/control debian/tests/control gen-autopkgtests update-license + +update-license: + @cp -p debian/copyright debian/copyright.old + ./debian/copyright-generator/copyright-gen.py + @if cmp -s debian/copyright debian/copyright.old; then \ + rm -f debian/copyright.old; \ + else \ + diff -u debian/copyright.old debian/copyright | wdiff -d -; \ + echo "debian/copyright did change, please restart the build. Run make -f debian/rules update-control-files to update packaging sources."; \ + rm -f debian/copyright.old; \ + exit 1; \ + fi + +ifeq (,$(filter nogen, $(DEB_BUILD_OPTIONS))) +# Only check control files on amd64, other architectures may have +# nocheck set by d/rules, e.g. riscv64 +ifeq (amd64,$(DEB_HOST_ARCH)) +PRE_BUILD_DEP = update-control-files +endif +else +PRE_BUILD_DEP = +endif + +pre-build: $(PRE_BUILD_DEP) ifeq ($(with_check),yes) jtreg_version="$$(dpkg-query -f '$${Version}\n' -W $(jtreg_pkg))"; \ if ! dpkg --compare-versions $(min_jtreg_version) le $$jtreg_version; then \ @@ -1175,6 +1203,7 @@ false endif + build-arch: build build-indep: build stamps/build-docs build: pre-build $(build_stamps) @@ -1382,15 +1411,6 @@ mkdir -p $(d)/$(basedir) cp -a $(builddir)/$(sdkimg)/* $(d)/$(basedir)/ -ifneq (,$(filter $(DEB_HOST_ARCH), $(jvmci_archs))) - mkdir -p $(d)/$(jvmci_basedir)/ - cp -a $(jvmci_builddir)/$(jvmci_img)/* $(d)/$(jvmci_basedir)/ - find $(d)/$(jvmci_basedir)/ -type f -name "*.debuginfo" -exec rm {} \; - rm -rf $(d)/$(jvmci_basedir)/demo - rm -rf $(d)/$(jvmci_basedir)/legal - rm -rf $(d)/$(jvmci_basedir)/man -endif - # copy jtreg tests mkdir -p $(d)/$(testsuitedir) cp -a $(builddir)/$(testimg)/* $(d)/$(testsuitedir) @@ -1415,6 +1435,43 @@ rm -f $(d)/$(basedir)/man/man1/klist.1 rm -f $(d)/$(basedir)/man/man1/ktab.1 + : # handle manpages + : # Render man pages without any formatting breaks, whitespaces and + : # hyphens, and then compare them to the pre-generated ones in + : # debian/man. +ifeq ($(DEB_HOST_ARCH),amd64) + mkdir -p $(d)/man-diff/{new,old};\ + cp -r $(builddir)/$(sdkimg)/man/man1/* $(d)/man-diff/new/; \ + cp -r debian/man/* $(d)/man-diff/old/; \ + for man_file in `find $(d)/man-diff -type f -print`; do \ + { printf ".nh\n.na\n.ll 100000n\n"; cat $$man_file; } | \ + LC_ALL=C groff -man -Tascii -P-c -rHY=0 | \ + col -bx | tr -d '[:space:]-' > $$man_file.txt 2>/dev/null; \ + rm -f $$man_file; \ + done; \ + diff -r "$(d)/man-diff/new/" "$(d)/man-diff/old/"; \ + if [ $$? -ne 0 ]; then \ + rm -rf debian/man; \ + mkdir -p debian/man; \ + cp -p $(builddir)/$(sdkimg)/man/man1/*.1 debian/man/; \ + echo "Man pages updated, please restart the build."; \ + exit 1; \ + fi; \ + rm -rf $(d)/man-diff +else ifeq (,$(filter $(DEB_HOST_ARCH), $(pandoc_archs))) + : # copy man pages, pre-generated on amd64 + mkdir -p $(d)/$(basedir)/man/man1 + @echo "Copying pre-generated man pages:" + for i in $$(cd $(builddir)/$(sdkimg)/bin && ls); do \ + if [ -f debian/man/$$i.1 ]; then \ + echo " using pre-generated man page for $$i"; \ + cp -p debian/man/$$i.1 $(d)/$(basedir)/man/man1/.; \ + else \ + echo " no pre-generated man page for $$i"; \ + fi; \ + done +endif + : # compress manpages find $(d)/$(basedir)/man -type f ! -type l | xargs gzip -9v -n @@ -1595,7 +1652,6 @@ echo '$(basedir)/lib/zero' >> debian/$(p_jrez).install endif - echo '$(jvmci_basedir)/*' >> debian/$(p_jvmci).install : # $(p_jrehl).install ( \ @@ -1692,9 +1748,12 @@ # since we rewrite the build id with_debugedit=yes, patch the build id inside # the debug symbols file # otherwise (no buildid) just lib debuginfo file where it is + +# copy symbols for hotspot vm mkdir -p $(d)/usr/lib/debug (cd $(d) && find . -path './$(basedir)/*' -name '*.debuginfo' | cpio -pdm usr/lib/debug/) find $(d)/$(basedir)/ -name '*.debuginfo' -exec rm {} \; + echo > debian/$(p_dbg).install for binary in `(cd $(d) && find . -path './$(basedir)/*' -print)`; do \ dir=`dirname $$binary`; \ @@ -1851,14 +1910,9 @@ : # OpenJDK Stack Unwinder and Frame Decorator ifneq (,$(filter $(DEB_HOST_ARCH),amd64)) - mkdir -p $(d_jrehl)/usr/share/gdb/auto-load/$(basedir)/jre/lib/server + mkdir -p $(d_jrehl)/usr/share/gdb/auto-load/$(basedir)/lib/server cp debian/dbg.py \ - $(d_jrehl)/usr/share/gdb/auto-load/$(basedir)/jre/lib/server/libjvm.so-gdb.py - ifneq (,$(filter zero, $(alternate_vms))) - mkdir -p $(d_jrez)/usr/share/gdb/auto-load/$(basedir)/jre/lib/zero - ln -sf ../server/libjvm.so-gdb.py \ - $(d_jrez)/usr/share/gdb/auto-load/$(basedir)/jre/lib/zero/libjvm.so - endif + $(d_jrehl)/usr/share/gdb/auto-load/$(basedir)/lib/server/libjvm.so-gdb.py endif ifeq ($(with_bridge),atk) @@ -2031,11 +2085,6 @@ debian/README.testsuite $(call install_test_results,$(default_vm)) -ifneq (,$(filter $(DEB_HOST_ARCH), $(jvmci_archs))) - dh_installchangelogs -p$(p_jvmci) - dh_installdocs -p$(p_jvmci) -endif - ifneq (,$(filter zero, $(alternate_vms))) $(call install_test_results,zero) endif @@ -2083,7 +2132,7 @@ dh_builddeb -a $(nodemo) $(nojrez) #$(bd_options) git_project = jdk25u -git_tag = jdk-25.0.2+10 +git_tag = jdk-25.0.3+9 package_version = $(shell echo $(PKGVERSION) | sed 's/-[^-][^-]*$$//') ifneq ($(is_upstream_release),yes) package_version := $(subst +,~,$(package_version)) @@ -2096,6 +2145,7 @@ gtestdir = ../$(basename)-$(package_version)-googletest.orig debian/watch: debian/watch.in debian/rules + @cp -p $@ $@.old sed \ -e 's|@git_url@|$(git_url)/tags|g' \ -e 's|@gtest_repo@|$(gtest_repo)/tags|g' \ @@ -2106,6 +2156,14 @@ ifeq ($(is_upstream_release),yes) sed -i 's|repack.*\\|repack,\\|g' debian/watch endif + @if cmp -s $@ $@.old; then \ + rm -f $@.old; \ + else \ + diff -u $@.old $@ | wdiff -d -; \ + echo "$@ did change, please restart the build"; \ + rm -f $@.old; \ + exit 1; \ + fi get-gtest: rm -rf $(gtestdir) || true @@ -2152,4 +2210,4 @@ rm -rf $(origdir) binary: binary-arch binary-indep -.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install packaging-files +.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install packaging-files debian/control debian/tests/control gen-autopkgtests debian/watch update-control-files update-license diff -Nru openjdk-25-25.0.2+10/debian/tests/dependencies.in openjdk-25-25.0.3+9/debian/tests/dependencies.in --- openjdk-25-25.0.2+10/debian/tests/dependencies.in 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/tests/dependencies.in 2026-04-24 21:06:45.000000000 +0000 @@ -27,7 +27,7 @@ ${jdk_path}/bin/java -Djava.security.debug=all \ -cp . ${AUTOPKGTEST_TMP}/Test.java > ${AUTOPKGTEST_TMP}/dependencies-pcsc.log 2>&1 -if grep "pcsc: Using PC/SC library" ${AUTOPKGTEST_TMP}/dependencies-pcsc.log; then +if grep "Using PC/SC library" ${AUTOPKGTEST_TMP}/dependencies-pcsc.log; then echo "Test passed." else cat ${AUTOPKGTEST_TMP}/dependencies-pcsc.log diff -Nru openjdk-25-25.0.2+10/debian/tests/jtreg-autopkgtest.in openjdk-25-25.0.3+9/debian/tests/jtreg-autopkgtest.in --- openjdk-25-25.0.2+10/debian/tests/jtreg-autopkgtest.in 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/tests/jtreg-autopkgtest.in 2026-04-24 21:06:45.000000000 +0000 @@ -31,6 +31,9 @@ if [[ "armel" == *"${host_arch}"* ]]; then jt_options+=" -Xmx256M" fi +if [[ "s390x" != *"${host_arch}"* ]]; then + jt_options+=" -agentvm" +fi if dpkg --compare-versions ${jtreg_version} ge 4.2; then njobs=auto for opt in ${DEB_BUILD_OPTIONS:-}; do @@ -41,6 +44,13 @@ jt_options+=" -conc:$njobs" fi +# timeouts should be higher for zero builds +case ${host_arch} in + loong64) timeout=30;; + riscv64) timeout=30;; + *) timeout=10;; +esac + # check java binary if [ ! -x "${JDK_TO_TEST}/bin/java" ]; then echo "Error: JDK_TO_TEST: '${JDK_TO_TEST}/bin/java' is not an executable." >&2 @@ -110,8 +120,7 @@ -automatic \ -retain:none \ -ignore:quiet \ - -agentvm \ - -timeout:10 \ + -timeout:${timeout} \ -workDir:"${jtwork_dir}" \ -reportDir:"${report_dir}" \ -jdk:${JDK_TO_TEST} \ diff -Nru openjdk-25-25.0.2+10/debian/tests/jtreg-autopkgtest.sh openjdk-25-25.0.3+9/debian/tests/jtreg-autopkgtest.sh --- openjdk-25-25.0.2+10/debian/tests/jtreg-autopkgtest.sh 2026-01-21 20:46:58.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/tests/jtreg-autopkgtest.sh 2026-04-25 10:29:02.000000000 +0000 @@ -24,13 +24,16 @@ BOOTJDK_HOME=${JDK_TO_TEST} fi -jtreg_version="$(dpkg-query -W jtreg7 | cut -f2)" +jtreg_version="$(dpkg-query -W jtreg8 | cut -f2)" # set additional jtreg options jt_options="${JTREG_OPTIONS:-}" if [[ "armel" == *"${host_arch}"* ]]; then jt_options+=" -Xmx256M" fi +if [[ "s390x" != *"${host_arch}"* ]]; then + jt_options+=" -agentvm" +fi if dpkg --compare-versions ${jtreg_version} ge 4.2; then njobs=auto for opt in ${DEB_BUILD_OPTIONS:-}; do @@ -41,6 +44,13 @@ jt_options+=" -conc:$njobs" fi +# timeouts should be higher for zero builds +case ${host_arch} in + loong64) timeout=30;; + riscv64) timeout=30;; + *) timeout=10;; +esac + # check java binary if [ ! -x "${JDK_TO_TEST}/bin/java" ]; then echo "Error: JDK_TO_TEST: '${JDK_TO_TEST}/bin/java' is not an executable." >&2 @@ -110,8 +120,7 @@ -automatic \ -retain:none \ -ignore:quiet \ - -agentvm \ - -timeout:10 \ + -timeout:${timeout} \ -workDir:"${jtwork_dir}" \ -reportDir:"${report_dir}" \ -jdk:${JDK_TO_TEST} \ diff -Nru openjdk-25-25.0.2+10/debian/tests/problems.csv openjdk-25-25.0.3+9/debian/tests/problems.csv --- openjdk-25-25.0.2+10/debian/tests/problems.csv 2026-01-03 22:42:40.000000000 +0000 +++ openjdk-25-25.0.3+9/debian/tests/problems.csv 2026-04-25 10:29:02.000000000 +0000 @@ -1,7 +1,7 @@ Test,Bug,Comment,Packages,Arch,Release -Error: runtime/Unsafe/InternalErrorTest.java,JDK-8335238,"To investigate, not critical for security release – JDK-22 will expire before OO release",:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,i386,:release-all +Error: runtime/Unsafe/InternalErrorTest.java,JDK-8335238,"To investigate, not critical for security release – JDK-22 will expire before OO release",:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,i386,:release-all Error: serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java#default,,"Deadlock, new failure, not critical – JDK-22 will expire before OO release",:openjdk-22,ppc64el,:release-all -FAILED: compiler/arguments/CheckCICompilerCount.java,,"Existing failure (exit code 0, expected 1)",:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,i386,:release-all +FAILED: compiler/arguments/CheckCICompilerCount.java,,"Existing failure (exit code 0, expected 1)",:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,i386,:release-all FAILED: compiler/codecache/MHIntrinsicAllocFailureTest.java,JDK-8298947,The issue only happens on armhf platform. ,:openjdk-17:openjdk-21,armhf,:release-all FAILED: gtest/GTestWrapper.java,,"17:UninitializedDoubleElementWorkerDataArrayTest.print_summary_on_test_vm, ",:openjdk-17:openjdk-21,i386,:release-all FAILED: java/foreign/critical/TestCritical.java,,"SEGSEGV in test, submit bug, not critical for security release",:openjdk-22,s390x,:release-all @@ -12,38 +12,38 @@ FAILED: java/foreign/TestSegments.java,,Ignore test failure in the preview api,:openjdk-21,:i386,:release-all FAILED: java/foreign/TestUpcallHighArity.java,,Ignore test failure in the preview api,:openjdk-21,:i386,:release-all FAILED: java/foreign/TestUpcallStructScope.java,,Ignore test failure in the preview api,:openjdk-21,:i386,:release-all -FAILED: java/io/File/createTempFile/TargetDirectory.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/io/File/createTempFile/TargetDirectory.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all FAILED: java/io/File/GetXSpace.java,,"Container issue, disk space size exceeds 32 bit integer",:openjdk-17:openjdk-21:openjdk-22,:i386:armhf,:release-all -FAILED: java/nio/channels/FileChannel/directio/DirectIOTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/PreadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/PwriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/ReadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/WriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/attribute/AclFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/DirectIOTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/PreadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/PwriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/ReadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/WriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/attribute/AclFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all FAILED: java/nio/file/attribute/BasicFileAttributeView/CreationTime.java,JDK-8166162,Container issue,:openjdk-22,i386,:release-all -FAILED: java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/attribute/DosFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/attribute/PosixFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/CheckPermissions.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/CopyAndMove.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/CopyMoveVariations.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/FileAttributes.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/InterruptCopy.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/Misc.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/Files/TemporaryFiles.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: java/nio/file/FileStore/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: com/sun/net/httpserver/simpleserver/DocRootDirPermissionsTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/attribute/DosFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/attribute/PosixFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/CheckPermissions.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/CopyAndMove.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/CopyMoveVariations.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/FileAttributes.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/InterruptCopy.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/Misc.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/Files/TemporaryFiles.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: java/nio/file/FileStore/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: com/sun/net/httpserver/simpleserver/DocRootDirPermissionsTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all FAILED: runtime/cds/appcds/jcmd/JCmdTestDynamicDump.java,,flaky test (?) existing comment,:openjdk-17,:arch-all,:release-all FAILED: runtime/cds/appcds/jcmd/JCmdTestFileSafety.java,,flaky test (?) existing comment,:openjdk-17,i386:arm64:amd64:ppc64el,:release-all FAILED: runtime/cds/appcds/jcmd/JCmdTestStaticDump.java,,flaky test (?) existing comment,:openjdk-17,:arch-all,:release-all FAILED: runtime/ErrorHandling/MachCodeFramesInErrorFile.java,,java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code at java.base/java.lang.Long.toHexString(Long.java:309) at,:openjdk-17:openjdk-21,armhf,:release-all FAILED: runtime/jni/nativeStack/TestNativeStack.java,JDK-8312016,"Backport fix (do not add patch, the fix just disables the test)",:openjdk-lts:openjdk-11:openjdk-17,armhf,:release-all -FAILED: runtime/LoadClass/LongBCP.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: runtime/LoadClass/LongBCP.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all FAILED: runtime/Monitor/ConcurrentDeflation.java,,LockingMode == 0 (LM_MONITOR) is not fully implemented on this architectureError: Could not create the Java Virtual Machine.,:openjdk-21,armhf,:release-all -FAILED: runtime/NMT/VirtualAllocCommitMerge.java,JDK-8309698,P4 bug (existing issue),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,s390x,:release-all +FAILED: runtime/NMT/VirtualAllocCommitMerge.java,JDK-8309698,P4 bug (existing issue),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,s390x,:release-all FAILED: serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java,JDK-8303168,Existing bug,:openjdk-21,armhf,:release-all -FAILED: tools/jlink/JLinkTest.java,JDK-8240349,Bugfix failed for i386 (P4 bug),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,i386,:release-all +FAILED: tools/jlink/JLinkTest.java,JDK-8240349,Bugfix failed for i386 (P4 bug),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,i386,:release-all FAILED: jdk/javadoc/doclet/dupThrowsTags/TestDupThrowsTags.java,,tests failing due to disable-doclint-by-default.diff (reproducible build maintainer patch),:openjdk-lts:openjdk-11,:arch-all,:release-all FAILED: jdk/javadoc/doclet/T6735320/T6735320.java,,tests failing due to disable-doclint-by-default.diff (reproducible build maintainer patch),:openjdk-lts:openjdk-11,:arch-all,:release-all FAILED: jdk/javadoc/doclet/testBadHtml/TestBadHtml.java,,tests failing due to disable-doclint-by-default.diff (reproducible build maintainer patch),:openjdk-lts:openjdk-11,:arch-all,:release-all @@ -84,6 +84,24 @@ FAILED: java/foreign/TestUpcallStack.java,, asserts due to the invalid structure size. Ignore as this is a preview API and the issue does not occur in openjdk-22. I will add it to the problemlist.,:openjdk-21,:armhf,:release-all FAILED: java/foreign/TestVarArgs.java,, asserts due to the invalid structure size. Ignore as this is a preview API and the issue does not occur in openjdk-22. I will add it to the problemlist.,:openjdk-21,:armhf,:release-all FAILED: runtime/os/TestTrimNative.java#trimNative,, java.lang.RuntimeException: We found fewer (periodic) trim lines in UL log than expected (expected at least 13 found 11). This looks like a flaky test - it asserts number of lines from the periodic trimmer e.g. src/hotspot/share/runtime/trimNativeHeap.hpp:56 which causes the test to fail due to the slow VM. Test passes locally.,:openjdk-21,:armhf,:release-all -FAILED: sun/security/util/Debug/DebugOptions.java,JDK-8339713,Stack overflow error on 32-bit platforms,:openjdk-17:openjdk-21:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:armhf:i386:s390x,:release-all -Error: jdk/jshell/TerminalNoExecTest.java,,BackingStoreException: Couldn't get file lock - possibly because the LP (non-root) container has no home directory,:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all -FAILED: applications/ctw/modules/jdk_jfr.java,JDK-8352567, Unimplemented SharedRuntime::generate_jfr_write_checkpoint for S390x, :openjdk-25:openjdk-26:,:s390x,:release-all +FAILED: sun/security/util/Debug/DebugOptions.java,JDK-8339713,Stack overflow error on 32-bit platforms,:openjdk-17:openjdk-21:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:armhf:i386:s390x,:release-all +Error: jdk/jshell/TerminalNoExecTest.java,,BackingStoreException: Couldn't get file lock - possibly because the LP (non-root) container has no home directory,:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:arch-all,:release-all +FAILED: applications/ctw/modules/jdk_jfr.java,JDK-8352567, Unimplemented SharedRuntime::generate_jfr_write_checkpoint for S390x, :openjdk-25:openjdk-26:openjdk-27:,:s390x,:release-all +Error: serviceability/jvmti/thread/SuspendThreadList/suspendthrdlst01/suspendthrdlst01.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/ResumeThreadList/resumethrdlst02/resumethrdlst02.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/SuspendThread/suspendthrd01/suspendthrd01.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/ResumeThreadList/resumethrdlst01/resumethrdlst01.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/ResumeThread/resumethrd02/resumethrd02.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/ResumeThread/resumethrd01/resumethrd01.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/GetThreadState/thrstat02/thrstat02.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon02/contmon02.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: serviceability/jvmti/SuspendWithCurrentThread/SuspendWithCurrentThread.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: runtime/NMT/SummaryDiffThreadCount.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: runtime/lockStack/TestStackWalk.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: compiler/loopopts/TestRemoveEmptyLoop.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +Error: jdk/internal/shellsupport/doc/JavadocHelperTest.java,,Takes too long on loong64,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:openjdk-27:,:loong64,:release-all +FAILED: tools/javac/tree/SourceDocTreeScannerTest.java,JDK-8332619,Test runs out of stack space on 32-bit platforms,:openjdk-21,:armhf:i386,:release-all +FAILED: tools/javac/patterns/SOEDeeplyNestedBlocksTest.java,JDK-8332619,Test runs out of stack space on 32-bit platforms,:openjdk-21,:armhf:i386,:release-all +FAILED: tools/javac/tree/TreePosTest.java,JDK-8332619,Test runs out of stack space on 32-bit platforms,:openjdk-21,:armhf:i386,:release-all +FAILED: java/time/test/java/time/format/TestUTCParse.java,JDK-8381709,jtreg test initialization issue,:openjdk-11,:arch-all,:release-all diff -Nru openjdk-25-25.0.2+10/doc/building.html openjdk-25-25.0.3+9/doc/building.html --- openjdk-25-25.0.2+10/doc/building.html 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/doc/building.html 2026-04-17 19:08:13.000000000 +0000 @@ -668,7 +668,7 @@ (Note that this version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.) Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version -of Visual Studio is 2022.</p> +of Visual Studio is 2026.</p> <p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting diff -Nru openjdk-25-25.0.2+10/doc/building.md openjdk-25-25.0.3+9/doc/building.md --- openjdk-25-25.0.2+10/doc/building.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/doc/building.md 2026-04-17 19:08:13.000000000 +0000 @@ -468,7 +468,7 @@ The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.) Older versions will not be accepted by `configure` and will not work. -The maximum accepted version of Visual Studio is 2022. +The maximum accepted version of Visual Studio is 2026. If you have multiple versions of Visual Studio installed, `configure` will by default pick the latest. You can request a specific version to be used by diff -Nru openjdk-25-25.0.2+10/make/autoconf/lib-bundled.m4 openjdk-25-25.0.3+9/make/autoconf/lib-bundled.m4 --- openjdk-25-25.0.2+10/make/autoconf/lib-bundled.m4 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/autoconf/lib-bundled.m4 2026-04-17 19:08:13.000000000 +0000 @@ -267,8 +267,8 @@ LIBZ_LIBS="" if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib" - if test "x$OPENJDK_TARGET_OS" = xmacosx; then - LIBZ_CFLAGS="$LIBZ_CFLAGS -DHAVE_UNISTD_H" + if test "x$OPENJDK_TARGET_OS" = xmacosx -o "x$OPENJDK_TARGET_OS" = xaix -o "x$OPENJDK_TARGET_OS" = xlinux; then + LIBZ_CFLAGS="$LIBZ_CFLAGS -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1" fi else LIBZ_LIBS="-lz" diff -Nru openjdk-25-25.0.2+10/make/autoconf/platform.m4 openjdk-25-25.0.3+9/make/autoconf/platform.m4 --- openjdk-25-25.0.2+10/make/autoconf/platform.m4 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/autoconf/platform.m4 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -311,6 +311,12 @@ else OPENJDK_BUILD_OS_ENV="$VAR_OS" fi + # Special handling for MSYS2 that reports a Cygwin triplet as the default host triplet. + case `uname` in + MSYS*) + OPENJDK_BUILD_OS_ENV=windows.msys2 + ;; + esac OPENJDK_BUILD_CPU="$VAR_CPU" OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH" OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS" diff -Nru openjdk-25-25.0.2+10/make/autoconf/toolchain_microsoft.m4 openjdk-25-25.0.3+9/make/autoconf/toolchain_microsoft.m4 --- openjdk-25-25.0.2+10/make/autoconf/toolchain_microsoft.m4 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/autoconf/toolchain_microsoft.m4 2026-04-17 19:08:13.000000000 +0000 @@ -25,7 +25,7 @@ ################################################################################ # The order of these defines the priority by which we try to find them. -VALID_VS_VERSIONS="2022 2019" +VALID_VS_VERSIONS="2022 2019 2026" VS_DESCRIPTION_2019="Microsoft Visual Studio 2019" VS_VERSION_INTERNAL_2019=142 @@ -57,6 +57,21 @@ VS_SUPPORTED_2022=true VS_TOOLSET_SUPPORTED_2022=true +VS_DESCRIPTION_2026="Microsoft Visual Studio 2026" +VS_VERSION_INTERNAL_2026=145 +VS_MSVCR_2026=vcruntime140.dll +VS_VCRUNTIME_1_2026=vcruntime140_1.dll +VS_MSVCP_2026=msvcp140.dll +VS_ENVVAR_2026="VS180COMNTOOLS" +VS_USE_UCRT_2026="true" +VS_VS_INSTALLDIR_2026="Microsoft Visual Studio/18" +VS_EDITIONS_2026="BuildTools Community Professional Enterprise" +VS_SDK_INSTALLDIR_2026= +VS_VS_PLATFORM_NAME_2026="v145" +VS_SDK_PLATFORM_NAME_2026= +VS_SUPPORTED_2026=true +VS_TOOLSET_SUPPORTED_2026=true + ################################################################################ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT], diff -Nru openjdk-25-25.0.2+10/make/common/Utils.gmk openjdk-25-25.0.3+9/make/common/Utils.gmk --- openjdk-25-25.0.2+10/make/common/Utils.gmk 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/common/Utils.gmk 2026-04-17 19:08:13.000000000 +0000 @@ -78,7 +78,7 @@ ################################################################################ # This macro works just like EscapeDollar above, but for #. -EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1))) +EscapeHash = $(subst $(HASH),\$(HASH),$(subst \$(HASH),$(HASH),$(strip $1))) ################################################################################ # This macro translates $ into $$ to protect the string from make itself. diff -Nru openjdk-25-25.0.2+10/make/conf/version-numbers.conf openjdk-25-25.0.3+9/make/conf/version-numbers.conf --- openjdk-25-25.0.2+10/make/conf/version-numbers.conf 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/conf/version-numbers.conf 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # 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,12 +28,12 @@ DEFAULT_VERSION_FEATURE=25 DEFAULT_VERSION_INTERIM=0 -DEFAULT_VERSION_UPDATE=2 +DEFAULT_VERSION_UPDATE=3 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2026-01-20 +DEFAULT_VERSION_DATE=2026-04-21 DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_VERSION_DOCS_API_SINCE=11 diff -Nru openjdk-25-25.0.2+10/make/hotspot/lib/CompileJvm.gmk openjdk-25-25.0.3+9/make/hotspot/lib/CompileJvm.gmk --- openjdk-25-25.0.2+10/make/hotspot/lib/CompileJvm.gmk 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/hotspot/lib/CompileJvm.gmk 2026-04-17 19:08:13.000000000 +0000 @@ -156,6 +156,10 @@ WIN_EXPORT_FILE := $(JVM_OUTPUTDIR)/win-exports.def endif + ifeq ($(SHIP_DEBUG_SYMBOLS), public) + CFLAGS_STRIPPED_DEBUGINFO := -DHAS_STRIPPED_DEBUGINFO + endif + JVM_LDFLAGS += -def:$(WIN_EXPORT_FILE) endif @@ -181,6 +185,7 @@ CFLAGS := $(JVM_CFLAGS), \ abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \ + whitebox.cpp_CXXFLAGS := $(CFLAGS_STRIPPED_DEBUGINFO), \ DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc), \ DISABLED_WARNINGS_gcc_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp := nonnull, \ DISABLED_WARNINGS_gcc_bytecodeInterpreter.cpp := unused-label, \ diff -Nru openjdk-25-25.0.2+10/make/modules/java.base/Copy.gmk openjdk-25-25.0.3+9/make/modules/java.base/Copy.gmk --- openjdk-25-25.0.2+10/make/modules/java.base/Copy.gmk 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/modules/java.base/Copy.gmk 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -181,6 +181,10 @@ LEGAL_EXCLUDES += zlib.md endif +ifneq ($(TOOLCHAIN_TYPE), gcc) + LEGAL_EXCLUDES += gcc.md +endif + $(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \ EXCLUDES := $(LEGAL_EXCLUDES), \ )) diff -Nru openjdk-25-25.0.2+10/make/modules/java.desktop/lib/ClientLibraries.gmk openjdk-25-25.0.3+9/make/modules/java.desktop/lib/ClientLibraries.gmk --- openjdk-25-25.0.2+10/make/modules/java.desktop/lib/ClientLibraries.gmk 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/make/modules/java.desktop/lib/ClientLibraries.gmk 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -236,7 +236,7 @@ DISABLED_WARNINGS_gcc_dgif_lib.c := sign-compare, \ DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \ DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \ - DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized unused-function, \ + DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized, \ DISABLED_WARNINGS_gcc_pngerror.c := maybe-uninitialized, \ DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough \ maybe-uninitialized, \ @@ -247,7 +247,6 @@ DISABLED_WARNINGS_clang := deprecated-non-prototype, \ DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \ DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \ - DISABLED_WARNINGS_clang_png.c := unused-function, \ DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare \ unused-but-set-variable unused-function, \ DISABLED_WARNINGS_clang_splashscreen_png.c := \ @@ -257,6 +256,7 @@ DISABLED_WARNINGS_microsoft_dgif_lib.c := 4018 4267, \ DISABLED_WARNINGS_microsoft_splashscreen_impl.c := 4018 4267 4244, \ DISABLED_WARNINGS_microsoft_splashscreen_png.c := 4267, \ + DISABLED_WARNINGS_microsoft_pngread.c := 4146, \ DISABLED_WARNINGS_microsoft_splashscreen_sys.c := 4267 4244, \ LDFLAGS := $(ICONV_LDFLAGS), \ LDFLAGS_windows := -delayload:user32.dll, \ diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/aarch64.ad openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/aarch64.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/aarch64.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/aarch64.ad 2026-04-17 19:08:13.000000000 +0000 @@ -7642,10 +7642,11 @@ match(Set dst (ReverseBytesUS src)); ins_cost(INSN_COST); - format %{ "rev16w $dst, $src" %} + format %{ "rev16w $dst, $src\t# $dst -> unsigned short" %} ins_encode %{ __ rev16w(as_Register($dst$$reg), as_Register($src$$reg)); + __ narrow_subword_type(as_Register($dst$$reg), T_CHAR); %} ins_pipe(ialu_reg); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -310,7 +310,18 @@ __ add(sp, sp, 32 * wordSize); } +#ifdef R18_RESERVED + /* + Do not modify r18_tls when restoring registers if it is a reserved register. On Windows, + for example, r18_tls is used to store the pointer to the current thread's TEB (where TLS + variables are stored). Therefore, modifying r18_tls would corrupt the TEB pointer. + */ + __ pop(RegSet::range(r0, r17), sp); + __ ldp(zr, r19, Address(__ post(sp, 2 * wordSize))); + __ pop(RegSet::range(r20, r29), sp); +#else __ pop(RegSet::range(r0, r29), sp); +#endif } static void restore_live_registers_except_r0(StubAssembler* sasm, bool restore_fpu_registers = true) { @@ -323,8 +334,20 @@ __ add(sp, sp, 32 * wordSize); } +#ifdef R18_RESERVED + /* + Do not modify r18_tls when restoring registers if it is a reserved register. On Windows, + for example, r18_tls is used to store the pointer to the current thread's TEB (where TLS + variables are stored). Therefore, modifying r18_tls would corrupt the TEB pointer. + */ + __ ldp(zr, r1, Address(__ post(sp, 2 * wordSize))); + __ pop(RegSet::range(r2, r17), sp); + __ ldp(zr, r19, Address(__ post(sp, 2 * wordSize))); + __ pop(RegSet::range(r20, r29), sp); +#else __ ldp(zr, r1, Address(__ post(sp, 16))); __ pop(RegSet::range(r2, r29), sp); +#endif } diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -331,13 +331,7 @@ __ ldr(rscratch2, thread_disarmed_and_epoch_addr); __ cmp(rscratch1, rscratch2); } else { - assert(patching_type == NMethodPatchingType::conc_data_patch, "must be"); - // Subsequent loads of oops must occur after load of guard value. - // BarrierSetNMethod::disarm sets guard with release semantics. - __ membar(__ LoadLoad); - Address thread_disarmed_addr(rthread, in_bytes(bs_nm->thread_disarmed_guard_value_offset())); - __ ldrw(rscratch2, thread_disarmed_addr); - __ cmpw(rscratch1, rscratch2); + ShouldNotReachHere(); } __ br(condition, barrier_target); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -39,8 +39,7 @@ enum class NMethodPatchingType { stw_instruction_and_data_patch, - conc_instruction_and_data_patch, - conc_data_patch + conc_instruction_and_data_patch }; class BarrierSetAssembler: public CHeapObj<mtGC> { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -58,8 +58,6 @@ return -4 * (4 + slow_path_size(nm)); case NMethodPatchingType::conc_instruction_and_data_patch: return -4 * (10 + slow_path_size(nm)); - case NMethodPatchingType::conc_data_patch: - return -4 * (5 + slow_path_size(nm)); } ShouldNotReachHere(); return 0; diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -67,7 +67,7 @@ Register scratch, RegSet saved_regs); public: - virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; } + virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; } #ifdef COMPILER1 void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -2701,6 +2701,17 @@ } } +void MacroAssembler::narrow_subword_type(Register reg, BasicType bt) { + assert(is_subword_type(bt), "required"); + switch (bt) { + case T_BOOLEAN: andw(reg, reg, 1); break; + case T_BYTE: sxtbw(reg, reg); break; + case T_CHAR: uxthw(reg, reg); break; + case T_SHORT: sxthw(reg, reg); break; + default: ShouldNotReachHere(); + } +} + void MacroAssembler::decrementw(Register reg, int value) { if (value < 0) { incrementw(reg, -value); return; } @@ -5942,6 +5953,9 @@ // return false; bind(A_IS_NOT_NULL); ldrw(cnt1, Address(a1, length_offset)); + ldrw(tmp5, Address(a2, length_offset)); + cmp(cnt1, tmp5); + br(NE, DONE); // If lengths differ, return false // Increase loop counter by diff between base- and actual start-offset. addw(cnt1, cnt1, extra_length); lea(a1, Address(a1, start_offset)); @@ -6008,6 +6022,9 @@ cbz(a1, DONE); ldrw(cnt1, Address(a1, length_offset)); cbz(a2, DONE); + ldrw(tmp5, Address(a2, length_offset)); + cmp(cnt1, tmp5); + br(NE, DONE); // If lengths differ, return false // Increase loop counter by diff between base- and actual start-offset. addw(cnt1, cnt1, extra_length); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -33,6 +33,7 @@ #include "oops/compressedOops.hpp" #include "oops/compressedKlass.hpp" #include "runtime/vm_version.hpp" +#include "utilities/globalDefinitions.hpp" #include "utilities/powerOfTwo.hpp" class OopMap; @@ -723,6 +724,9 @@ // Support for sign-extension (hi:lo = extend_sign(lo)) void extend_sign(Register hi, Register lo); + // Clean up a subword typed value to the representation in compliance with JVMS §2.3 + void narrow_subword_type(Register reg, BasicType bt); + // Load and store values by size and signed-ness void load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed); void store_sized_value(Address dst, Register src, size_t size_in_bytes); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/arm/arm.ad openjdk-25-25.0.3+9/src/hotspot/cpu/arm/arm.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/arm/arm.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/arm/arm.ad 2026-04-17 19:08:13.000000000 +0000 @@ -9255,10 +9255,12 @@ instruct bytes_reverse_unsigned_short(iRegI dst, iRegI src) %{ match(Set dst (ReverseBytesUS src)); - size(4); - format %{ "REV16 $dst,$src" %} + size(8); + format %{ "REV32 $dst,$src\n\t" + "LSR $dst,$dst,#16" %} ins_encode %{ - __ rev16($dst$$Register, $src$$Register); + __ rev($dst$$Register, $src$$Register); + __ mov($dst$$Register, AsmOperand($dst$$Register, lsr, 16)); %} ins_pipe( iload_mem ); // FIXME %} diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/atomicAccess_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/atomicAccess_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/atomicAccess_ppc.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/atomicAccess_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,649 @@ +/* + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 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. + * + */ + +#ifndef CPU_PPC_ATOMICACCESS_PPC_HPP +#define CPU_PPC_ATOMICACCESS_PPC_HPP + +#ifndef PPC64 +#error "Atomic currently only implemented for PPC64" +#endif + +#include "orderAccess_ppc.hpp" +#include "utilities/debug.hpp" + +// Implementation of class AtomicAccess + +// +// machine barrier instructions: +// +// - sync two-way memory barrier, aka fence +// - lwsync orders Store|Store, +// Load|Store, +// Load|Load, +// but not Store|Load +// - eieio orders memory accesses for device memory (only) +// - isync invalidates speculatively executed instructions +// From the POWER ISA 2.06 documentation: +// "[...] an isync instruction prevents the execution of +// instructions following the isync until instructions +// preceding the isync have completed, [...]" +// From IBM's AIX assembler reference: +// "The isync [...] instructions causes the processor to +// refetch any instructions that might have been fetched +// prior to the isync instruction. The instruction isync +// causes the processor to wait for all previous instructions +// to complete. Then any instructions already fetched are +// discarded and instruction processing continues in the +// environment established by the previous instructions." +// +// semantic barrier instructions: +// (as defined in orderAccess.hpp) +// +// - release orders Store|Store, (maps to lwsync) +// Load|Store +// - acquire orders Load|Store, (maps to lwsync) +// Load|Load +// - fence orders Store|Store, (maps to sync) +// Load|Store, +// Load|Load, +// Store|Load +// + +inline void pre_membar(atomic_memory_order order) { + switch (order) { + case memory_order_relaxed: + case memory_order_acquire: break; + case memory_order_release: + case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break; + default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; + } +} + +inline void post_membar(atomic_memory_order order) { + switch (order) { + case memory_order_relaxed: + case memory_order_release: break; + case memory_order_acquire: + case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break; + default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; + } +} + + + +template<size_t byte_size> +struct Atomic::PlatformAdd { + template<typename D, typename I> + D add_then_fetch(D volatile* dest, I add_value, atomic_memory_order order) const; + + template<typename D, typename I> + D fetch_then_add(D volatile* dest, I add_value, atomic_memory_order order) const { + return add_then_fetch(dest, add_value, order) - add_value; + } +}; + +template<> +template<typename D, typename I> +inline D Atomic::PlatformAdd<4>::add_then_fetch(D volatile* dest, I add_value, + atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(I)); + STATIC_ASSERT(4 == sizeof(D)); + + D result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[result], 0, %[dest] \n" + " add %[result], %[result], %[add_value] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [add_value] "r" (add_value), + [dest] "b" (dest) + : "cc", "memory" ); + + post_membar(order); + + return result; +} + + +template<> +template<typename D, typename I> +inline D Atomic::PlatformAdd<8>::add_then_fetch(D volatile* dest, I add_value, + atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(I)); + STATIC_ASSERT(8 == sizeof(D)); + + D result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[result], 0, %[dest] \n" + " add %[result], %[result], %[add_value] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [add_value] "r" (add_value), + [dest] "b" (dest) + : "cc", "memory" ); + + post_membar(order); + + return result; +} + +template<> +template<typename T> +inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, + T exchange_value, + atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + // Note that xchg doesn't necessarily do an acquire + // (see synchronizer.cpp). + + T old_value; + + pre_membar(order); + + __asm__ __volatile__ ( + /* atomic loop */ + "1: \n" + " lwarx %[old_value], 0, %[dest] \n" + " stwcx. %[exchange_value], 0, %[dest] \n" + " bne- 1b \n" + /* exit */ + "2: \n" + /* out */ + : [old_value] "=&r" (old_value) + /* in */ + : [dest] "b" (dest), + [exchange_value] "r" (exchange_value) + /* clobber */ + : "cc", + "memory" + ); + + post_membar(order); + + return old_value; +} + +template<> +template<typename T> +inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, + T exchange_value, + atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + // Note that xchg doesn't necessarily do an acquire + // (see synchronizer.cpp). + + T old_value; + + pre_membar(order); + + __asm__ __volatile__ ( + /* atomic loop */ + "1: \n" + " ldarx %[old_value], 0, %[dest] \n" + " stdcx. %[exchange_value], 0, %[dest] \n" + " bne- 1b \n" + /* exit */ + "2: \n" + /* out */ + : [old_value] "=&r" (old_value) + /* in */ + : [dest] "b" (dest), + [exchange_value] "r" (exchange_value) + /* clobber */ + : "cc", + "memory" + ); + + post_membar(order); + + return old_value; +} + +template<> +template<typename T> +inline T Atomic::PlatformCmpxchg<1>::operator()(T volatile* dest, + T compare_value, + T exchange_value, + atomic_memory_order order) const { + STATIC_ASSERT(1 == sizeof(T)); + + // Note that cmpxchg guarantees a two-way memory barrier across + // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not + // specified otherwise (see atomicAccess.hpp). + + const unsigned int masked_compare_val = (unsigned int)(unsigned char)compare_value; + + unsigned int old_value; + + pre_membar(order); + + __asm__ __volatile__ ( + /* simple guard */ + " lbz %[old_value], 0(%[dest]) \n" + " cmpw %[masked_compare_val], %[old_value] \n" + " bne- 2f \n" + /* atomic loop */ + "1: \n" + " lbarx %[old_value], 0, %[dest] \n" + " cmpw %[masked_compare_val], %[old_value] \n" + " bne- 2f \n" + " stbcx. %[exchange_value], 0, %[dest] \n" + " bne- 1b \n" + /* exit */ + "2: \n" + /* out */ + : [old_value] "=&r" (old_value) + /* in */ + : [dest] "b" (dest), + [masked_compare_val] "r" (masked_compare_val), + [exchange_value] "r" (exchange_value) + /* clobber */ + : "cc", + "memory" + ); + + post_membar(order); + + return PrimitiveConversions::cast<T>((unsigned char)old_value); +} + +template<> +template<typename T> +inline T Atomic::PlatformCmpxchg<4>::operator()(T volatile* dest, + T compare_value, + T exchange_value, + atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + + // Note that cmpxchg guarantees a two-way memory barrier across + // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not + // specified otherwise (see atomicAccess.hpp). + + T old_value; + + pre_membar(order); + + __asm__ __volatile__ ( + /* simple guard */ + " lwz %[old_value], 0(%[dest]) \n" + " cmpw %[compare_value], %[old_value] \n" + " bne- 2f \n" + /* atomic loop */ + "1: \n" + " lwarx %[old_value], 0, %[dest] \n" + " cmpw %[compare_value], %[old_value] \n" + " bne- 2f \n" + " stwcx. %[exchange_value], 0, %[dest] \n" + " bne- 1b \n" + /* exit */ + "2: \n" + /* out */ + : [old_value] "=&r" (old_value) + /* in */ + : [dest] "b" (dest), + [compare_value] "r" (compare_value), + [exchange_value] "r" (exchange_value) + /* clobber */ + : "cc", + "memory" + ); + + post_membar(order); + + return old_value; +} + +template<> +template<typename T> +inline T Atomic::PlatformCmpxchg<8>::operator()(T volatile* dest, + T compare_value, + T exchange_value, + atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + + // Note that cmpxchg guarantees a two-way memory barrier across + // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not + // specified otherwise (see atomicAccess.hpp). + + T old_value; + + pre_membar(order); + + __asm__ __volatile__ ( + /* simple guard */ + " ld %[old_value], 0(%[dest]) \n" + " cmpd %[compare_value], %[old_value] \n" + " bne- 2f \n" + /* atomic loop */ + "1: \n" + " ldarx %[old_value], 0, %[dest] \n" + " cmpd %[compare_value], %[old_value] \n" + " bne- 2f \n" + " stdcx. %[exchange_value], 0, %[dest] \n" + " bne- 1b \n" + /* exit */ + "2: \n" + /* out */ + : [old_value] "=&r" (old_value) + /* in */ + : [dest] "b" (dest), + [compare_value] "r" (compare_value), + [exchange_value] "r" (exchange_value) + /* clobber */ + : "cc", + "memory" + ); + + post_membar(order); + + return old_value; +} + +template<size_t byte_size> +struct Atomic::PlatformOrderedLoad<byte_size, X_ACQUIRE> +{ + template <typename T> + T operator()(const volatile T* p) const { + T t = Atomic::load(p); + // Use twi-isync for load_acquire (faster than lwsync). + __asm__ __volatile__ ("twi 0,%0,0\n isync\n" : : "r" (t) : "memory"); + return t; + } +}; + +template<> +class Atomic::PlatformBitops<4, true> { +public: + template<typename T> + T fetch_then_and(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + T old_value, result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[old_value], 0, %[dest] \n" + " and %[result], %[old_value], %[bits] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [old_value] "=&r" (old_value), + [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return old_value; + } + + template<typename T> + T fetch_then_or(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + T old_value, result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[old_value], 0, %[dest] \n" + " or %[result], %[old_value], %[bits] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [old_value] "=&r" (old_value), + [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return old_value; + } + + template<typename T> + T fetch_then_xor(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + T old_value, result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[old_value], 0, %[dest] \n" + " xor %[result], %[old_value], %[bits] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [old_value] "=&r" (old_value), + [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return old_value; + } + + template<typename T> + T and_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + T result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[result], 0, %[dest] \n" + " and %[result], %[result], %[bits] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return result; + } + + template<typename T> + T or_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + T result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[result], 0, %[dest] \n" + " or %[result], %[result], %[bits] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return result; + } + + template<typename T> + T xor_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); + T result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: lwarx %[result], 0, %[dest] \n" + " xor %[result], %[result], %[bits] \n" + " stwcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return result; + } +}; + +template<> +class Atomic::PlatformBitops<8, true> { +public: + template<typename T> + T fetch_then_and(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + T old_value, result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[old_value], 0, %[dest] \n" + " and %[result], %[old_value], %[bits] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [old_value] "=&r" (old_value), + [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return old_value; + } + + template<typename T> + T fetch_then_or(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + T old_value, result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[old_value], 0, %[dest] \n" + " or %[result], %[old_value], %[bits] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [old_value] "=&r" (old_value), + [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return old_value; + } + + template<typename T> + T fetch_then_xor(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + T old_value, result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[old_value], 0, %[dest] \n" + " xor %[result], %[old_value], %[bits] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [old_value] "=&r" (old_value), + [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return old_value; + } + + template<typename T> + T and_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + T result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[result], 0, %[dest] \n" + " and %[result], %[result], %[bits] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return result; + } + + template<typename T> + T or_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + T result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[result], 0, %[dest] \n" + " or %[result], %[result], %[bits] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return result; + } + + template<typename T> + T xor_then_fetch(T volatile* dest, T bits, atomic_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); + T result; + + pre_membar(order); + + __asm__ __volatile__ ( + "1: ldarx %[result], 0, %[dest] \n" + " xor %[result], %[result], %[bits] \n" + " stdcx. %[result], 0, %[dest] \n" + " bne- 1b \n" + : [result] "=&r" (result) + : [dest] "b" (dest), + [bits] "r" (bits) + : "cc", "memory" ); + + post_membar(order); + return result; + } +}; +#endif // CPU_PPC_ATOMICACCESS_PPC_HPP diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/c2_MacroAssembler_ppc.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -600,19 +600,21 @@ orr(tmp0, tmp2, tmp0); and_(tmp0, tmp0, tmp1); - bne(CR0, Lslow); // Found negative byte. + bne(CR0, Lslow); // Found negative byte. addi(result, result, 16); bdnz(Lfastloop); bind(Lslow); // Fallback to slow version. subf(tmp0, src, result); // Bytes known positive. - subf_(tmp0, tmp0, cnt); // Remaining Bytes. + clrldi(tmp1, cnt, 32); // Clear garbage from upper 32 bits. + subf_(tmp0, tmp0, tmp1); // Remaining Bytes. beq(CR0, Ldone); mtctr(tmp0); + bind(Lloop); lbz(tmp0, 0, result); andi_(tmp0, tmp0, 0x80); - bne(CR0, Ldone); // Found negative byte. + bne(CR0, Ldone); // Found negative byte. addi(result, result, 1); bdnz(Lloop); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/gc/shared/barrierSetAssembler_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -40,8 +40,7 @@ enum class NMethodPatchingType { stw_instruction_and_data_patch, - conc_instruction_and_data_patch, - conc_data_patch + conc_instruction_and_data_patch }; class BarrierSetAssembler: public CHeapObj<mtGC> { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -69,7 +69,7 @@ Register preserve); public: - virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; } + virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; } /* ==== C1 stubs ==== */ #ifdef COMPILER1 diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1266,11 +1266,11 @@ lhz(R11_scratch1, in_bytes(DataLayout::bci_offset()), R28_mdx); ld(R12_scratch2, in_bytes(Method::const_offset()), R19_method); addi(R11_scratch1, R11_scratch1, in_bytes(ConstMethod::codes_offset())); - add(R11_scratch1, R12_scratch2, R12_scratch2); + add(R11_scratch1, R11_scratch1, R12_scratch2); cmpd(CR0, R11_scratch1, R14_bcp); beq(CR0, verify_continue); - call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::verify_mdp ), R19_method, R14_bcp, R28_mdx); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::verify_mdp), R19_method, R14_bcp, R28_mdx); bind(verify_continue); #endif diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/methodHandles_ppc.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/methodHandles_ppc.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/methodHandles_ppc.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/methodHandles_ppc.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2025 SAP SE. All rights reserved. + * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2026 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 @@ -49,11 +49,6 @@ #define BIND(label) bind(label); BLOCK_COMMENT(#label ":") -// Workaround for C++ overloading nastiness on '0' for RegisterOrConstant. -inline static RegisterOrConstant constant(int value) { - return RegisterOrConstant(value); -} - void MethodHandles::load_klass_from_Class(MacroAssembler* _masm, Register klass_reg, Register temp_reg, Register temp2_reg) { if (VerifyMethodHandles) { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/orderAccess_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/orderAccess_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/orderAccess_ppc.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/orderAccess_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 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. + * + */ + +#ifndef CPU_PPC_ORDERACCESS_PPC_HPP +#define CPU_PPC_ORDERACCESS_PPC_HPP + +#ifndef PPC64 +#error "OrderAccess currently only implemented for PPC64" +#endif + +// Compiler version last used for testing: gcc 4.1.2 +// Please update this information when this file changes + +// Implementation of class OrderAccess. + +// +// Machine barrier instructions: +// +// - sync Two-way memory barrier, aka fence. +// - lwsync orders Store|Store, +// Load|Store, +// Load|Load, +// but not Store|Load +// - eieio orders Store|Store +// - isync Invalidates speculatively executed instructions, +// but isync may complete before storage accesses +// associated with instructions preceding isync have +// been performed. +// +// Semantic barrier instructions: +// (as defined in orderAccess.hpp) +// +// - release orders Store|Store, (maps to lwsync) +// Load|Store +// - acquire orders Load|Store, (maps to lwsync) +// Load|Load +// - fence orders Store|Store, (maps to sync) +// Load|Store, +// Load|Load, +// Store|Load +// + +#define inlasm_sync() __asm__ __volatile__ ("sync" : : : "memory"); +#define inlasm_lwsync() __asm__ __volatile__ ("lwsync" : : : "memory"); +#define inlasm_eieio() __asm__ __volatile__ ("eieio" : : : "memory"); +#define inlasm_isync() __asm__ __volatile__ ("isync" : : : "memory"); + +inline void OrderAccess::loadload() { inlasm_lwsync(); } +inline void OrderAccess::storestore() { inlasm_lwsync(); } +inline void OrderAccess::loadstore() { inlasm_lwsync(); } +inline void OrderAccess::storeload() { inlasm_sync(); } + +inline void OrderAccess::acquire() { inlasm_lwsync(); } +inline void OrderAccess::release() { inlasm_lwsync(); } +inline void OrderAccess::fence() { inlasm_sync(); } +inline void OrderAccess::cross_modify_fence_impl() + { inlasm_isync(); } + +#undef inlasm_sync +#undef inlasm_lwsync +#undef inlasm_eieio +#undef inlasm_isync + +#endif // CPU_PPC_ORDERACCESS_PPC_HPP diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/ppc.ad openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/ppc.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/ppc.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/ppc.ad 2026-04-17 19:08:13.000000000 +0000 @@ -12582,28 +12582,41 @@ ins_pipe(pipe_class_default); %} +// Expand nodes for byte_reverse_int/ushort/short. +instruct rlwinm(iRegIdst dst, iRegIsrc src, immI16 shift, immI16 mb, immI16 me) %{ + effect(DEF dst, USE src, USE shift, USE mb, USE me); + predicate(false); + + format %{ "RLWINM $dst, $src, $shift, $mb, $me" %} + size(4); + ins_encode %{ + __ rlwinm($dst$$Register, $src$$Register, $shift$$constant, $mb$$constant, $me$$constant); + %} + ins_pipe(pipe_class_default); +%} + // Expand nodes for byte_reverse_int. -instruct insrwi_a(iRegIdst dst, iRegIsrc src, immI16 pos, immI16 shift) %{ - effect(DEF dst, USE src, USE pos, USE shift); +instruct insrwi_a(iRegIdst dst, iRegIsrc src, immI16 n, immI16 b) %{ + effect(DEF dst, USE src, USE n, USE b); predicate(false); - format %{ "INSRWI $dst, $src, $pos, $shift" %} + format %{ "INSRWI $dst, $src, $n, $b" %} size(4); ins_encode %{ - __ insrwi($dst$$Register, $src$$Register, $shift$$constant, $pos$$constant); + __ insrwi($dst$$Register, $src$$Register, $n$$constant, $b$$constant); %} ins_pipe(pipe_class_default); %} // As insrwi_a, but with USE_DEF. -instruct insrwi(iRegIdst dst, iRegIsrc src, immI16 pos, immI16 shift) %{ - effect(USE_DEF dst, USE src, USE pos, USE shift); +instruct insrwi(iRegIdst dst, iRegIsrc src, immI16 n, immI16 b) %{ + effect(USE_DEF dst, USE src, USE n, USE b); predicate(false); - format %{ "INSRWI $dst, $src, $pos, $shift" %} + format %{ "INSRWI $dst, $src, $n, $b" %} size(4); ins_encode %{ - __ insrwi($dst$$Register, $src$$Register, $shift$$constant, $pos$$constant); + __ insrwi($dst$$Register, $src$$Register, $n$$constant, $b$$constant); %} ins_pipe(pipe_class_default); %} @@ -12625,12 +12638,12 @@ iRegLdst tmpI3; urShiftI_reg_imm(tmpI1, src, imm24); - insrwi_a(dst, tmpI1, imm24, imm8); + insrwi_a(dst, tmpI1, imm8, imm24); urShiftI_reg_imm(tmpI2, src, imm16); - insrwi(dst, tmpI2, imm8, imm16); + insrwi(dst, tmpI2, imm16, imm8); urShiftI_reg_imm(tmpI3, src, imm8); insrwi(dst, tmpI3, imm8, imm8); - insrwi(dst, src, imm0, imm8); + insrwi(dst, src, imm8, imm0); %} %} @@ -12738,32 +12751,20 @@ ins_pipe(pipe_class_default); %} +// Need zero extend. Must not use brh only. instruct bytes_reverse_ushort_Ex(iRegIdst dst, iRegIsrc src) %{ match(Set dst (ReverseBytesUS src)); - predicate(!UseByteReverseInstructions); ins_cost(2*DEFAULT_COST); expand %{ + immI16 imm31 %{ (int) 31 %} + immI16 imm24 %{ (int) 24 %} immI16 imm16 %{ (int) 16 %} immI16 imm8 %{ (int) 8 %} - urShiftI_reg_imm(dst, src, imm8); - insrwi(dst, src, imm16, imm8); - %} -%} - -instruct bytes_reverse_ushort(iRegIdst dst, iRegIsrc src) %{ - match(Set dst (ReverseBytesUS src)); - predicate(UseByteReverseInstructions); - ins_cost(DEFAULT_COST); - size(4); - - format %{ "BRH $dst, $src" %} - - ins_encode %{ - __ brh($dst$$Register, $src$$Register); + rlwinm(dst, src, imm24, imm24, imm31); + insrwi(dst, src, imm8, imm16); %} - ins_pipe(pipe_class_default); %} instruct bytes_reverse_short_Ex(iRegIdst dst, iRegIsrc src) %{ @@ -12777,7 +12778,7 @@ iRegLdst tmpI1; urShiftI_reg_imm(tmpI1, src, imm8); - insrwi(tmpI1, src, imm16, imm8); + insrwi(tmpI1, src, imm8, imm16); extsh(dst, tmpI1); %} %} diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/vm_version_ppc.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/vm_version_ppc.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/vm_version_ppc.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/ppc/vm_version_ppc.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -109,6 +109,10 @@ } MaxVectorSize = SuperwordUseVSX ? 16 : 8; + if (!SuperwordUseVSX && FLAG_IS_DEFAULT(EnableVectorSupport)) { + // VectorSupport intrinsics currently have issues with MaxVectorSize < 16 (JDK-8370803). + FLAG_SET_ERGO(EnableVectorSupport, false); + } if (FLAG_IS_DEFAULT(AlignVector)) { FLAG_SET_ERGO(AlignVector, false); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -241,10 +241,6 @@ __ lwu(t0, *guard); switch (patching_type) { - case NMethodPatchingType::conc_data_patch: - // Subsequent loads of oops must occur after load of guard value. - // BarrierSetNMethod::disarm sets guard with release semantics. - __ membar(MacroAssembler::LoadLoad); // fall through to stw_instruction_and_data_patch case NMethodPatchingType::stw_instruction_and_data_patch: { // With STW patching, no data or instructions are updated concurrently, diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -40,8 +40,7 @@ enum class NMethodPatchingType { stw_instruction_and_data_patch, - conc_instruction_and_data_patch, - conc_data_patch + conc_instruction_and_data_patch }; class BarrierSetAssembler: public CHeapObj<mtGC> { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shared/barrierSetNMethod_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -50,8 +50,6 @@ switch (bs_asm->nmethod_patching_type()) { case NMethodPatchingType::stw_instruction_and_data_patch: return -4 * (4 + slow_path_size(nm)); - case NMethodPatchingType::conc_data_patch: - return -4 * (5 + slow_path_size(nm)); case NMethodPatchingType::conc_instruction_and_data_patch: return -4 * (15 + slow_path_size(nm)); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -69,7 +69,7 @@ public: - virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; } + virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_instruction_and_data_patch; } #ifdef COMPILER1 void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/icache_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/icache_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/icache_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/icache_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -39,7 +39,8 @@ // We need to make sure stores happens before the I/D cache synchronization. __asm__ volatile("fence rw, rw" : : : "memory"); - RiscvFlushIcache::flush((uintptr_t)addr, ((uintptr_t)lines) << ICache::log2_line_size); + uintptr_t end = (uintptr_t)addr + ((uintptr_t)lines << ICache::log2_line_size); + RiscvFlushIcache::flush((uintptr_t)addr, end); return magic; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/methodHandles_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/methodHandles_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/methodHandles_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/methodHandles_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -93,14 +93,60 @@ void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Register member_reg, Register temp) {} +void MethodHandles::verify_method(MacroAssembler* _masm, Register method, vmIntrinsics::ID iid) { + BLOCK_COMMENT("verify_method {"); + __ verify_method_ptr(method); + if (VerifyMethodHandles) { + Label L_ok; + assert_different_registers(method, t0, t1); + const Register method_holder = t1; + __ load_method_holder(method_holder, method); + + switch (iid) { + case vmIntrinsicID::_invokeBasic: + // Require compiled LambdaForm class to be fully initialized. + __ lbu(t0, Address(method_holder, InstanceKlass::init_state_offset())); + __ membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore); + __ mv(t1, InstanceKlass::fully_initialized); + __ beq(t0, t1, L_ok); + break; + case vmIntrinsicID::_linkToStatic: + __ clinit_barrier(method_holder, t0, &L_ok); + break; + + case vmIntrinsicID::_linkToVirtual: + case vmIntrinsicID::_linkToSpecial: + case vmIntrinsicID::_linkToInterface: + // Class initialization check is too strong here. Just ensure that class initialization has been initiated. + __ lbu(t0, Address(method_holder, InstanceKlass::init_state_offset())); + __ membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore); + __ mv(t1, InstanceKlass::being_initialized); + __ bge(t0, t1, L_ok); + + // init_state check failed, but it may be an abstract interface method + __ lhu(t0, Address(method, Method::access_flags_offset())); + __ test_bit(t1, t0, exact_log2(JVM_ACC_ABSTRACT)); + __ bnez(t1, L_ok); + break; + + default: + fatal("unexpected intrinsic %d: %s", vmIntrinsics::as_int(iid), vmIntrinsics::name_at(iid)); + } + + // Method holder init state check failed for a concrete method. + __ stop("Method holder klass is not initialized"); + __ BIND(L_ok); + } + BLOCK_COMMENT("} verify_method"); +} #endif //ASSERT void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp, - bool for_compiler_entry) { + bool for_compiler_entry, vmIntrinsics::ID iid) { assert(method == xmethod, "interpreter calling convention"); Label L_no_such_method; __ beqz(xmethod, L_no_such_method); - __ verify_method_ptr(method); + verify_method(_masm, method, iid); if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) { Label run_compiled_code; @@ -158,7 +204,7 @@ __ BIND(L); } - jump_from_method_handle(_masm, method_temp, temp2, for_compiler_entry); + jump_from_method_handle(_masm, method_temp, temp2, for_compiler_entry, vmIntrinsics::_invokeBasic); BLOCK_COMMENT("} jump_to_lambda_form"); } @@ -437,8 +483,7 @@ // After figuring out which concrete method to call, jump into it. // Note that this works in the interpreter with no data motion. // But the compiled version will require that r2_recv be shifted out. - __ verify_method_ptr(xmethod); - jump_from_method_handle(_masm, xmethod, temp1, for_compiler_entry); + jump_from_method_handle(_masm, xmethod, temp1, for_compiler_entry, iid); if (iid == vmIntrinsics::_linkToInterface) { __ bind(L_incompatible_class_change_error); __ far_jump(RuntimeAddress(SharedRuntime::throw_IncompatibleClassChangeError_entry())); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/methodHandles_riscv.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/methodHandles_riscv.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/methodHandles_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/methodHandles_riscv.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -39,6 +39,8 @@ Register obj, vmClassID klass_id, const char* error_message = "wrong klass") NOT_DEBUG_RETURN; + static void verify_method(MacroAssembler* _masm, Register method, vmIntrinsics::ID iid) NOT_DEBUG_RETURN; + static void verify_method_handle(MacroAssembler* _masm, Register mh_reg) { verify_klass(_masm, mh_reg, VM_CLASS_ID(java_lang_invoke_MethodHandle), "reference is a MH"); @@ -49,7 +51,7 @@ // Similar to InterpreterMacroAssembler::jump_from_interpreted. // Takes care of special dispatch from single stepping too. static void jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp, - bool for_compiler_entry); + bool for_compiler_entry, vmIntrinsics::ID iid); static void jump_to_lambda_form(MacroAssembler* _masm, Register recv, Register method_temp, diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/nativeInst_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/nativeInst_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -274,19 +274,6 @@ p2i(instruction_address()), data()); } -//------------------------------------------------------------------- - -int NativeMovRegMem::offset() const { - Unimplemented(); - return 0; -} - -void NativeMovRegMem::set_offset(int x) { Unimplemented(); } - -void NativeMovRegMem::verify() { - Unimplemented(); -} - //-------------------------------------------------------------------------------- void NativeJump::verify() { } diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/nativeInst_riscv.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/nativeInst_riscv.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -37,7 +37,7 @@ // - NativeInstruction // - - NativeCall // - - NativeMovConstReg -// - - NativeMovRegMem +// - - NativeMovRegMem - Unimplemented // - - NativeJump // - - NativeGeneralJump // - - NativeIllegalInstruction @@ -233,38 +233,18 @@ // NativeMovRegMem to keep some compilers happy. class NativeMovRegMem: public NativeInstruction { public: - enum RISCV_specific_constants { - instruction_size = NativeInstruction::instruction_size, - instruction_offset = 0, - data_offset = 0, - next_instruction_offset = NativeInstruction::instruction_size - }; - - int instruction_start() const { return instruction_offset; } - - address instruction_address() const { return addr_at(instruction_offset); } + int num_bytes_to_end_of_patch() const { Unimplemented(); return 0; } - int num_bytes_to_end_of_patch() const { return instruction_offset + instruction_size; } + int offset() const { Unimplemented(); return 0; } - int offset() const; - - void set_offset(int x); - - void add_offset_in_bytes(int add_offset) { - set_offset(offset() + add_offset); - } + void set_offset(int x) { Unimplemented(); } - void verify(); - void print(); - - private: - inline friend NativeMovRegMem* nativeMovRegMem_at(address addr); + void add_offset_in_bytes(int add_offset) { Unimplemented(); } }; inline NativeMovRegMem* nativeMovRegMem_at(address addr) { - NativeMovRegMem* test = (NativeMovRegMem*)(addr - NativeMovRegMem::instruction_offset); - DEBUG_ONLY(test->verify()); - return test; + Unimplemented(); + return (NativeMovRegMem*)nullptr; } class NativeJump: public NativeInstruction { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv.ad openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/riscv.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/riscv.ad 2026-04-17 19:08:13.000000000 +0000 @@ -1184,6 +1184,8 @@ } } +constexpr uint64_t MAJIK_DWORD = 0xabbaabbaabbaabbaull; + // predicate controlling translation of CAS // // returns true if CAS needs to use an acquiring load otherwise false @@ -1363,10 +1365,15 @@ st->print("# stack bang size=%d\n\t", framesize); } - st->print("sd fp, [sp, #%d]\n\t", - 2 * wordSize); - st->print("sd ra, [sp, #%d]\n\t", - wordSize); - if (PreserveFramePointer) { st->print("sub fp, sp, #%d\n\t", 2 * wordSize); } st->print("sub sp, sp, #%d\n\t", framesize); + st->print("sd fp, [sp, #%d]\n\t", framesize - 2 * wordSize); + st->print("sd ra, [sp, #%d]\n\t", framesize - wordSize); + if (PreserveFramePointer) { st->print("add fp, sp, #%d\n\t", framesize); } + + if (VerifyStackAtCalls) { + st->print("mv t2, %ld\n\t", MAJIK_DWORD); + st->print("sd t2, [sp, #%d]\n\t", framesize - 3 * wordSize); + } if (C->stub_function() == nullptr) { st->print("ld t0, [guard]\n\t"); @@ -1416,6 +1423,11 @@ __ build_frame(framesize); + if (VerifyStackAtCalls) { + __ mv(t2, MAJIK_DWORD); + __ sd(t2, Address(sp, framesize - 3 * wordSize)); + } + if (C->stub_function() == nullptr) { BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); // Dummy labels for just measuring the code size @@ -1437,10 +1449,6 @@ bs->nmethod_entry_barrier(masm, slow_path, continuation, guard); } - if (VerifyStackAtCalls) { - Unimplemented(); - } - C->output()->set_frame_complete(__ offset()); if (C->has_mach_constant_base_node()) { @@ -2430,7 +2438,13 @@ enc_class riscv_enc_call_epilog() %{ if (VerifyStackAtCalls) { // Check that stack depth is unchanged: find majik cookie on stack - __ call_Unimplemented(); + int framesize = ra_->reg2offset_unchecked(OptoReg::add(ra_->_matcher._old_SP, -3 * VMRegImpl::slots_per_word)); + Label stack_ok; + __ ld(t1, Address(sp, framesize)); + __ mv(t2, MAJIK_DWORD); + __ beq(t2, t1, stack_ok); + __ stop("MAJIK_DWORD not found"); + __ bind(stack_ok); } %} @@ -8541,7 +8555,7 @@ // single <-> half precision -instruct convHF2F_reg_reg(fRegF dst, iRegINoSp src, iRegINoSp tmp) %{ +instruct convHF2F_reg_reg(fRegF dst, iRegIorL2I src, iRegINoSp tmp) %{ match(Set dst (ConvHF2F src)); effect(TEMP tmp); format %{ "fmv.h.x $dst, $src\t# move source from $src to $dst\n\t" diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv_v.ad openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/riscv_v.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv_v.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/riscv_v.ad 2026-04-17 19:08:13.000000000 +0000 @@ -114,12 +114,12 @@ case Op_VectorCastHF2F: case Op_VectorCastF2HF: case Op_AddVHF: + case Op_SubVHF: + case Op_MulVHF: case Op_DivVHF: case Op_MaxVHF: case Op_MinVHF: - case Op_MulVHF: case Op_SqrtVHF: - case Op_SubVHF: return UseZvfh; case Op_FmaVHF: return UseZvfh && UseFMA; @@ -147,13 +147,28 @@ if (!UseRVV) { return false; } + switch (opcode) { case Op_SelectFromTwoVector: // There is no masked version of selectFrom two vector, i.e. selectFrom(av, bv, mask) in vector API. return false; + // Currently, the masked versions of the following 8 Float16 operations are disabled. + // When the support for Float16 vector classes is added in VectorAPI and the masked + // Float16 IR can be generated, these masked operations will be enabled and relevant + // backend support added. + case Op_AddVHF: + case Op_SubVHF: + case Op_MulVHF: + case Op_DivVHF: + case Op_MaxVHF: + case Op_MinVHF: + case Op_SqrtVHF: + case Op_FmaVHF: + return false; default: break; } + return match_rule_supported_vector(opcode, vlen, bt); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -213,7 +213,7 @@ // Is vector's size (in bytes) bigger than a size saved by default? // riscv does not ovlerlay the floating-point registers on vector registers like aarch64. bool SharedRuntime::is_wide_vector(int size) { - return UseRVV; + return UseRVV && size > 0; } // --------------------------------------------------------------------------- @@ -2486,7 +2486,7 @@ // EPILOG must remove this many slots. // RISCV needs two words for RA (return address) and FP (frame pointer). uint SharedRuntime::in_preserve_stack_slots() { - return 2 * VMRegImpl::slots_per_word; + return 2 * VMRegImpl::slots_per_word + (VerifyStackAtCalls ? 0 : 2) ; } uint SharedRuntime::out_preserve_stack_slots() { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1148,9 +1148,7 @@ Label L; __ ld(x28, Address(xmethod, Method::native_function_offset())); ExternalAddress unsatisfied(SharedRuntime::native_method_throw_unsatisfied_link_error_entry()); - __ la(t, unsatisfied); - __ load_long_misaligned(t1, Address(t, 0), t0, 2); // 2 bytes aligned, but not 4 or 8 - + __ la(t1, unsatisfied); __ bne(x28, t1, L); __ call_VM(noreg, CAST_FROM_FN_PTR(address, diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateTable_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/templateTable_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateTable_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/templateTable_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -708,7 +708,6 @@ __ mv(x11, index); } Label ok; - __ sext(index, index, 32); __ bltu(index, length, ok); __ mv(x13, array); __ mv(t1, Interpreter::_throw_ArrayIndexOutOfBoundsException_entry); @@ -1052,7 +1051,7 @@ transition(vtos, vtos); // stack: ..., array, index, value __ ld(x10, at_tos()); // value - __ ld(x12, at_tos_p1()); // index + __ lw(x12, at_tos_p1()); // index __ ld(x13, at_tos_p2()); // array index_check(x13, x12); // kills x11 @@ -1462,9 +1461,9 @@ transition(vtos, vtos); __ load_signed_byte(x11, at_bcp(2)); // get constant locals_index(x12); - __ ld(x10, iaddress(x12, x10, _masm)); + __ lw(x10, iaddress(x12, x10, _masm)); __ addw(x10, x10, x11); - __ sd(x10, iaddress(x12, t0, _masm)); + __ sw(x10, iaddress(x12, t0, _masm)); } void TemplateTable::wide_iinc() { @@ -1477,9 +1476,9 @@ __ orr(x11, x11, t1); locals_index_wide(x12); - __ ld(x10, iaddress(x12, t0, _masm)); + __ lw(x10, iaddress(x12, t0, _masm)); __ addw(x10, x10, x11); - __ sd(x10, iaddress(x12, t0, _masm)); + __ sw(x10, iaddress(x12, t0, _masm)); } void TemplateTable::convert() { diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/vm_version_riscv.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/riscv/vm_version_riscv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -165,11 +165,6 @@ (unaligned_scalar.value() == MISALIGNED_SCALAR_FAST)); } - if (FLAG_IS_DEFAULT(AlignVector)) { - FLAG_SET_DEFAULT(AlignVector, - unaligned_vector.value() != MISALIGNED_VECTOR_FAST); - } - #ifdef __riscv_ztso // Hotspot is compiled with TSO support, it will only run on hardware which // supports Ztso @@ -270,6 +265,11 @@ } } + if (FLAG_IS_DEFAULT(AlignVector)) { + FLAG_SET_DEFAULT(AlignVector, + unaligned_vector.value() != MISALIGNED_VECTOR_FAST); + } + // NOTE: Make sure codes dependent on UseRVV are put after MaxVectorSize initialize, // as there are extra checks inside it which could disable UseRVV // in some situations. diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Intel Corporation. All rights reserved. + * Copyright (c) 2024, 2026, Intel Corporation. All rights reserved. * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -1330,10 +1330,12 @@ // Clarification: The BYTE_K compare above compares haystack[(n-32):(n-1)]. We need to // compare haystack[(k-1):(k-1+31)]. Subtracting either index gives shift value of // (k + 31 - n): x = (k-1+31)-(n-1) = k-1+31-n+1 = k+31-n. + // When isU is set, similarly, shift is from haystack[(n-32):(n-1)] to [(k-2):(k-2+31)] + if (sizeKnown) { - __ movl(temp2, 31 + size); + __ movl(temp2, (isU ? 30 : 31) + size); } else { - __ movl(temp2, 31); + __ movl(temp2, isU ? 30 : 31); __ addl(temp2, needleLen); } __ subl(temp2, hsLength); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/x86/macroAssembler_x86.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/x86/macroAssembler_x86.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -55,6 +55,7 @@ #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "utilities/checkedCast.hpp" +#include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" #ifdef PRODUCT @@ -2529,6 +2530,17 @@ movswl(reg, reg); // movsxw } +void MacroAssembler::narrow_subword_type(Register reg, BasicType bt) { + assert(is_subword_type(bt), "required"); + switch (bt) { + case T_BOOLEAN: andl(reg, 1); break; + case T_BYTE: movsbl(reg, reg); break; + case T_CHAR: movzwl(reg, reg); break; + case T_SHORT: movswl(reg, reg); break; + default: ShouldNotReachHere(); + } +} + void MacroAssembler::testl(Address dst, int32_t imm32) { if (imm32 >= 0 && is8bit(imm32)) { testb(dst, imm32); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/x86/macroAssembler_x86.hpp openjdk-25-25.0.3+9/src/hotspot/cpu/x86/macroAssembler_x86.hpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/x86/macroAssembler_x86.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/x86/macroAssembler_x86.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -445,6 +445,9 @@ void sign_extend_short(Register reg); void sign_extend_byte(Register reg); + // Clean up a subword typed value to the representation in compliance with JVMS §2.3 + void narrow_subword_type(Register reg, BasicType bt); + // Division by power of 2, rounding towards 0 void division_with_shift(Register reg, int shift_value); diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp openjdk-25-25.0.3+9/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp --- openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -3524,10 +3524,10 @@ false, true, false, false, false, ghashin_offset, aesout_offset, HashKey_32); ghash16_avx512(false, true, false, false, true, in, pos, avx512_subkeyHtbl, AAD_HASHx, SHUF_MASK, stack_offset, 16 * 16, 0, HashKey_16); + __ addl(pos, 16 * 16); __ bind(MESG_BELOW_32_BLKS); __ subl(len, 16 * 16); - __ addl(pos, 16 * 16); gcm_enc_dec_last_avx512(len, in, pos, AAD_HASHx, SHUF_MASK, avx512_subkeyHtbl, ghashin_offset, HashKey_16, true, true); __ bind(GHASH_DONE); @@ -4016,13 +4016,15 @@ const Register rounds = r10; const XMMRegister ctr_blockx = xmm9; const XMMRegister aad_hashx = xmm8; - Label encrypt_done, encrypt_by_8_new, encrypt_by_8; + Label encrypt_done, encrypt_by_8_new, encrypt_by_8, exit; //This routine should be called only for message sizes of 128 bytes or more. //Macro flow: //process 8 16 byte blocks in initial_num_blocks. //process 8 16 byte blocks at a time until all are done 'encrypt_by_8_new followed by ghash_last_8' __ xorl(pos, pos); + __ cmpl(len, 128); + __ jcc(Assembler::less, exit); //Generate 8 constants for htbl generateHtbl_8_block_avx2(subkeyHtbl); @@ -4090,6 +4092,7 @@ __ vpxor(xmm0, xmm0, xmm0, Assembler::AVX_128bit); __ vpxor(xmm13, xmm13, xmm13, Assembler::AVX_128bit); + __ bind(exit); } #undef __ diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/x86/x86.ad openjdk-25-25.0.3+9/src/hotspot/cpu/x86/x86.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/x86/x86.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/x86/x86.ad 2026-04-17 19:08:13.000000000 +0000 @@ -10638,6 +10638,7 @@ format %{ "vmovw $dst, $src" %} ins_encode %{ __ vmovw($dst$$Register, $src$$XMMRegister); + __ narrow_subword_type($dst$$Register, T_SHORT); %} ins_pipe(pipe_slow); %} diff -Nru openjdk-25-25.0.2+10/src/hotspot/cpu/x86/x86_64.ad openjdk-25-25.0.3+9/src/hotspot/cpu/x86/x86_64.ad --- openjdk-25-25.0.2+10/src/hotspot/cpu/x86/x86_64.ad 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/cpu/x86/x86_64.ad 2026-04-17 19:08:13.000000000 +0000 @@ -7939,10 +7939,11 @@ predicate(!n->as_LoadStore()->result_not_used()); match(Set newval (GetAndAddB mem newval)); effect(KILL cr); - format %{ "xaddb_lock $mem, $newval" %} + format %{ "xaddb_lock $mem, $newval\t# $newval -> byte" %} ins_encode %{ __ lock(); __ xaddb($mem$$Address, $newval$$Register); + __ narrow_subword_type($newval$$Register, T_BYTE); %} ins_pipe(pipe_cmpxchg); %} @@ -7975,10 +7976,11 @@ predicate(!n->as_LoadStore()->result_not_used()); match(Set newval (GetAndAddS mem newval)); effect(KILL cr); - format %{ "xaddw_lock $mem, $newval" %} + format %{ "xaddw_lock $mem, $newval\t# $newval -> short" %} ins_encode %{ __ lock(); __ xaddw($mem$$Address, $newval$$Register); + __ narrow_subword_type($newval$$Register, T_SHORT); %} ins_pipe(pipe_cmpxchg); %} @@ -8057,18 +8059,20 @@ instruct xchgB( memory mem, rRegI newval) %{ match(Set newval (GetAndSetB mem newval)); - format %{ "XCHGB $newval,[$mem]" %} + format %{ "XCHGB $newval,[$mem]\t# $newval -> byte" %} ins_encode %{ __ xchgb($newval$$Register, $mem$$Address); + __ narrow_subword_type($newval$$Register, T_BYTE); %} ins_pipe( pipe_cmpxchg ); %} instruct xchgS( memory mem, rRegI newval) %{ match(Set newval (GetAndSetS mem newval)); - format %{ "XCHGW $newval,[$mem]" %} + format %{ "XCHGW $newval,[$mem]\t# $newval -> short" %} ins_encode %{ __ xchgw($newval$$Register, $mem$$Address); + __ narrow_subword_type($newval$$Register, T_SHORT); %} ins_pipe( pipe_cmpxchg ); %} diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/aix/os_perf_aix.cpp openjdk-25-25.0.3+9/src/hotspot/os/aix/os_perf_aix.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/aix/os_perf_aix.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/aix/os_perf_aix.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -143,12 +143,6 @@ return OS_OK; } -static void update_prev_time(jvm_time_store_t* from, jvm_time_store_t* to) { - if (from && to) { - memcpy(to, from, sizeof(jvm_time_store_t)); - } -} - static void update_prev_ticks(cpu_tick_store_t* from, cpu_tick_store_t* to) { if (from && to) { memcpy(to, from, sizeof(cpu_tick_store_t)); diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/bsd/os_bsd.cpp openjdk-25-25.0.3+9/src/hotspot/os/bsd/os_bsd.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/bsd/os_bsd.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/bsd/os_bsd.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -154,7 +154,8 @@ assert(kerr == KERN_SUCCESS, "host_statistics64 failed - check mach_host_self() and count"); if (kerr == KERN_SUCCESS) { - available = vmstat.free_count * os::vm_page_size(); + // free_count is just a lowerbound, other page categories can be freed too and make memory available + available = (vmstat.free_count + vmstat.inactive_count + vmstat.purgeable_count) * os::vm_page_size(); } #endif return available; diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupSubsystem_linux.cpp openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupSubsystem_linux.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupSubsystem_linux.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupSubsystem_linux.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -62,7 +62,7 @@ CgroupV1MemoryController* memory = nullptr; CgroupV1Controller* cpuset = nullptr; CgroupV1CpuController* cpu = nullptr; - CgroupV1Controller* cpuacct = nullptr; + CgroupV1CpuacctController* cpuacct = nullptr; CgroupV1Controller* pids = nullptr; CgroupInfo cg_infos[CG_INFO_LENGTH]; u1 cg_type_flags = INVALID_CGROUPS_GENERIC; @@ -105,9 +105,10 @@ CgroupV2CpuController* cpu = new CgroupV2CpuController(CgroupV2Controller(cg_infos[CPU_IDX]._mount_path, cg_infos[CPU_IDX]._cgroup_path, cg_infos[CPU_IDX]._read_only)); + CgroupV2CpuacctController* cpuacct = new CgroupV2CpuacctController(cpu); log_debug(os, container)("Detected cgroups v2 unified hierarchy"); cleanup(cg_infos); - return new CgroupV2Subsystem(memory, cpu, mem_other); + return new CgroupV2Subsystem(memory, cpu, cpuacct, mem_other); } /* @@ -150,7 +151,7 @@ cpu = new CgroupV1CpuController(CgroupV1Controller(info._root_mount_path, info._mount_path, info._read_only)); cpu->set_subsystem_path(info._cgroup_path); } else if (strcmp(info._name, "cpuacct") == 0) { - cpuacct = new CgroupV1Controller(info._root_mount_path, info._mount_path, info._read_only); + cpuacct = new CgroupV1CpuacctController(CgroupV1Controller(info._root_mount_path, info._mount_path, info._read_only)); cpuacct->set_subsystem_path(info._cgroup_path); } else if (strcmp(info._name, "pids") == 0) { pids = new CgroupV1Controller(info._root_mount_path, info._mount_path, info._read_only); @@ -856,6 +857,10 @@ return memory_controller()->controller()->memory_soft_limit_in_bytes(phys_mem); } +jlong CgroupSubsystem::memory_throttle_limit_in_bytes() { + return memory_controller()->controller()->memory_throttle_limit_in_bytes(); +} + jlong CgroupSubsystem::memory_usage_in_bytes() { return memory_controller()->controller()->memory_usage_in_bytes(); } @@ -884,6 +889,10 @@ return cpu_controller()->controller()->cpu_shares(); } +jlong CgroupSubsystem::cpu_usage_in_micros() { + return cpuacct_controller()->cpu_usage_in_micros(); +} + void CgroupSubsystem::print_version_specific_info(outputStream* st) { julong phys_mem = os::Linux::physical_memory(); memory_controller()->controller()->print_version_specific_info(st, phys_mem); diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupSubsystem_linux.hpp openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupSubsystem_linux.hpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupSubsystem_linux.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupSubsystem_linux.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,6 +102,17 @@ log_trace(os, container)(log_string " is: %s", retval); \ } +#define CONTAINER_READ_NUMERICAL_KEY_VALUE_CHECKED(controller, filename, key, log_string, retval) \ +{ \ + bool is_ok; \ + is_ok = controller->read_numerical_key_value(filename, key, &retval); \ + if (!is_ok) { \ + log_trace(os, container)(log_string " failed: %d", OSCONTAINER_ERROR); \ + return OSCONTAINER_ERROR; \ + } \ + log_trace(os, container)(log_string " is: " JULONG_FORMAT, retval); \ +} + class CgroupController: public CHeapObj<mtInternal> { protected: char* _cgroup_path; @@ -216,6 +227,18 @@ virtual const char* cgroup_path() = 0; }; +// Pure virtual class representing version agnostic CPU accounting controllers +class CgroupCpuacctController: public CHeapObj<mtInternal> { + public: + virtual jlong cpu_usage_in_micros() = 0; + virtual bool needs_hierarchy_adjustment() = 0; + virtual bool is_read_only() = 0; + virtual const char* subsystem_path() = 0; + virtual void set_subsystem_path(const char* cgroup_path) = 0; + virtual const char* mount_point() = 0; + virtual const char* cgroup_path() = 0; +}; + // Pure virtual class representing version agnostic memory controllers class CgroupMemoryController: public CHeapObj<mtInternal> { public: @@ -224,6 +247,7 @@ virtual jlong memory_and_swap_limit_in_bytes(julong host_mem, julong host_swap) = 0; virtual jlong memory_and_swap_usage_in_bytes(julong host_mem, julong host_swap) = 0; virtual jlong memory_soft_limit_in_bytes(julong upper_bound) = 0; + virtual jlong memory_throttle_limit_in_bytes() = 0; virtual jlong memory_max_usage_in_bytes() = 0; virtual jlong rss_usage_in_bytes() = 0; virtual jlong cache_usage_in_bytes() = 0; @@ -250,15 +274,19 @@ virtual const char * container_type() = 0; virtual CachingCgroupController<CgroupMemoryController>* memory_controller() = 0; virtual CachingCgroupController<CgroupCpuController>* cpu_controller() = 0; + virtual CgroupCpuacctController* cpuacct_controller() = 0; int cpu_quota(); int cpu_period(); int cpu_shares(); + jlong cpu_usage_in_micros(); + jlong memory_usage_in_bytes(); jlong memory_and_swap_limit_in_bytes(); jlong memory_and_swap_usage_in_bytes(); jlong memory_soft_limit_in_bytes(); + jlong memory_throttle_limit_in_bytes(); jlong memory_max_usage_in_bytes(); jlong rss_usage_in_bytes(); jlong cache_usage_in_bytes(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -123,6 +123,12 @@ } } +jlong CgroupV1MemoryController::uses_mem_hierarchy() { + julong use_hierarchy; + CONTAINER_READ_NUMBER_CHECKED(reader(), "/memory.use_hierarchy", "Use Hierarchy", use_hierarchy); + return (jlong)use_hierarchy; +} + /* * The common case, containers, we have _root == _cgroup_path, and thus set the * controller path to the _mount_point. This is where the limits are exposed in @@ -159,13 +165,13 @@ jlong CgroupV1MemoryController::read_memory_limit_in_bytes(julong phys_mem) { julong memlimit; CONTAINER_READ_NUMBER_CHECKED(reader(), "/memory.limit_in_bytes", "Memory Limit", memlimit); - if (memlimit >= phys_mem) { - verbose_log(memlimit, phys_mem); - return (jlong)-1; - } else { - verbose_log(memlimit, phys_mem); - return (jlong)memlimit; + if (memlimit >= phys_mem && uses_mem_hierarchy()) { + CONTAINER_READ_NUMERICAL_KEY_VALUE_CHECKED(reader(), "/memory.stat", + "hierarchical_memory_limit", "Hierarchical Memory Limit", + memlimit); } + verbose_log(memlimit, phys_mem); + return (jlong)((memlimit < phys_mem) ? memlimit : -1); } /* read_mem_swap @@ -183,12 +189,13 @@ jlong CgroupV1MemoryController::read_mem_swap(julong host_total_memsw) { julong memswlimit; CONTAINER_READ_NUMBER_CHECKED(reader(), "/memory.memsw.limit_in_bytes", "Memory and Swap Limit", memswlimit); - if (memswlimit >= host_total_memsw) { - log_trace(os, container)("Memory and Swap Limit is: Unlimited"); - return (jlong)-1; - } else { - return (jlong)memswlimit; + if (memswlimit >= host_total_memsw && uses_mem_hierarchy()) { + CONTAINER_READ_NUMERICAL_KEY_VALUE_CHECKED(reader(), "/memory.stat", + "hierarchical_memsw_limit", "Hierarchical Memory and Swap Limit", + memswlimit); } + verbose_log(memswlimit, host_total_memsw); + return (jlong)((memswlimit < host_total_memsw) ? memswlimit : -1); } jlong CgroupV1MemoryController::memory_and_swap_limit_in_bytes(julong host_mem, julong host_swap) { @@ -248,10 +255,16 @@ } } +jlong CgroupV1MemoryController::memory_throttle_limit_in_bytes() { + // Log this string at trace level so as to make tests happy. + log_trace(os, container)("Memory Throttle Limit is not supported."); + return OSCONTAINER_ERROR; // not supported +} + // Constructor CgroupV1Subsystem::CgroupV1Subsystem(CgroupV1Controller* cpuset, CgroupV1CpuController* cpu, - CgroupV1Controller* cpuacct, + CgroupV1CpuacctController* cpuacct, CgroupV1Controller* pids, CgroupV1MemoryController* memory) : _cpuset(cpuset), @@ -416,6 +429,13 @@ return shares_int; } +jlong CgroupV1CpuacctController::cpu_usage_in_micros() { + julong cpu_usage; + CONTAINER_READ_NUMBER_CHECKED(reader(), "/cpuacct.usage", "CPU Usage", cpu_usage); + // Output is in nanoseconds, convert to microseconds. + return (jlong)cpu_usage / 1000; +} + /* pids_max * * Return the maximum number of tasks available to the process diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +82,7 @@ jlong memory_and_swap_limit_in_bytes(julong host_mem, julong host_swap) override; jlong memory_and_swap_usage_in_bytes(julong host_mem, julong host_swap) override; jlong memory_soft_limit_in_bytes(julong upper_bound) override; + jlong memory_throttle_limit_in_bytes() override; jlong memory_max_usage_in_bytes() override; jlong rss_usage_in_bytes() override; jlong cache_usage_in_bytes() override; @@ -99,6 +100,7 @@ const char* mount_point() override { return reader()->mount_point(); } const char* cgroup_path() override { return reader()->cgroup_path(); } private: + jlong uses_mem_hierarchy(); jlong read_mem_swappiness(); jlong read_mem_swap(julong host_total_memsw); @@ -140,12 +142,41 @@ } }; +class CgroupV1CpuacctController final : public CgroupCpuacctController { + + private: + CgroupV1Controller _reader; + CgroupV1Controller* reader() { return &_reader; } + public: + jlong cpu_usage_in_micros() override; + void set_subsystem_path(const char *cgroup_path) override { + reader()->set_subsystem_path(cgroup_path); + } + bool is_read_only() override { + return reader()->is_read_only(); + } + const char* subsystem_path() override { + return reader()->subsystem_path(); + } + const char* mount_point() override { + return reader()->mount_point(); + } + bool needs_hierarchy_adjustment() override { + return reader()->needs_hierarchy_adjustment(); + } + const char* cgroup_path() override { return reader()->cgroup_path(); } + + public: + CgroupV1CpuacctController(const CgroupV1Controller& reader) : _reader(reader) { + } +}; + class CgroupV1Subsystem: public CgroupSubsystem { public: CgroupV1Subsystem(CgroupV1Controller* cpuset, CgroupV1CpuController* cpu, - CgroupV1Controller* cpuacct, + CgroupV1CpuacctController* cpuacct, CgroupV1Controller* pids, CgroupV1MemoryController* memory); @@ -165,13 +196,14 @@ } CachingCgroupController<CgroupMemoryController>* memory_controller() { return _memory; } CachingCgroupController<CgroupCpuController>* cpu_controller() { return _cpu; } + CgroupCpuacctController* cpuacct_controller() { return _cpuacct; } private: /* controllers */ CachingCgroupController<CgroupMemoryController>* _memory = nullptr; CgroupV1Controller* _cpuset = nullptr; CachingCgroupController<CgroupCpuController>* _cpu = nullptr; - CgroupV1Controller* _cpuacct = nullptr; + CgroupV1CpuacctController* _cpuacct = nullptr; CgroupV1Controller* _pids = nullptr; }; diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, 2025, Red Hat Inc. + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * 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 +26,8 @@ #include "cgroupV2Subsystem_linux.hpp" #include "cgroupUtil_linux.hpp" +#include <math.h> + // Constructor CgroupV2Controller::CgroupV2Controller(char* mount_path, char *cgroup_path, @@ -60,22 +63,39 @@ log_debug(os, container)("CPU Shares is: %d", -1); return -1; } + // cg v2 values must be in range [1-10000] + assert(shares_int >= 1 && shares_int <= 10000, "invariant"); // CPU shares (OCI) value needs to get translated into // a proper Cgroups v2 value. See: - // https://github.com/containers/crun/blob/master/crun.1.md#cpu-controller + // https://github.com/containers/crun/blob/1.24/crun.1.md#cpu-controller // // Use the inverse of (x == OCI value, y == cgroupsv2 value): - // ((262142 * y - 1)/9999) + 2 = x + // y = 10^(log2(x)^2/612 + 125/612 * log2(x) - 7.0/34.0) + // + // By re-arranging it to the standard quadratic form: + // log2(x)^2 + 125 * log2(x) - (126 + 612 * log_10(y)) = 0 + // + // Therefore, log2(x) = (-125 + sqrt( 125^2 - 4 * (-(126 + 612 * log_10(y)))))/2 // - int x = 262142 * shares_int - 1; - double frac = x/9999.0; - x = ((int)frac) + 2; + // As a result we have the inverse (we can discount substraction of the + // square root value since those values result in very small numbers and the + // cpu shares values - OCI - are in range [2,262144]): + // + // x = 2^((-125 + sqrt(16129 + 2448* log10(y)))/2) + // + double log_multiplicand = log10(shares_int); + double discriminant = 16129 + 2448 * log_multiplicand; + double square_root = sqrt(discriminant); + double exponent = (-125 + square_root)/2; + double scaled_val = pow(2, exponent); + int x = (int) scaled_val; log_trace(os, container)("Scaled CPU shares value is: %d", x); // Since the scaled value is not precise, return the closest // multiple of PER_CPU_SHARES for a more conservative mapping if ( x <= PER_CPU_SHARES ) { - // will always map to 1 CPU + // Don't do the multiples of PER_CPU_SHARES mapping since we + // have a value <= PER_CPU_SHARES log_debug(os, container)("CPU Shares is: %d", x); return x; } @@ -114,12 +134,14 @@ // Constructor CgroupV2Subsystem::CgroupV2Subsystem(CgroupV2MemoryController * memory, CgroupV2CpuController* cpu, + CgroupV2CpuacctController* cpuacct, CgroupV2Controller unified) : _unified(unified) { CgroupUtil::adjust_controller(memory); CgroupUtil::adjust_controller(cpu); _memory = new CachingCgroupController<CgroupMemoryController>(memory); _cpu = new CachingCgroupController<CgroupCpuController>(cpu); + _cpuacct = cpuacct; } bool CgroupV2Subsystem::is_containerized() { @@ -152,6 +174,17 @@ return period; } +jlong CgroupV2CpuController::cpu_usage_in_micros() { + julong cpu_usage; + bool is_ok = reader()->read_numerical_key_value("/cpu.stat", "usage_usec", &cpu_usage); + if (!is_ok) { + log_trace(os, container)("CPU Usage failed: %d", OSCONTAINER_ERROR); + return OSCONTAINER_ERROR; + } + log_trace(os, container)("CPU Usage is: " JULONG_FORMAT, cpu_usage); + return (jlong)cpu_usage; +} + /* memory_usage_in_bytes * * Return the amount of used memory used by this cgroup and descendents @@ -173,10 +206,16 @@ return mem_soft_limit; } +jlong CgroupV2MemoryController::memory_throttle_limit_in_bytes() { + jlong mem_throttle_limit; + CONTAINER_READ_NUMBER_CHECKED_MAX(reader(), "/memory.high", "Memory Throttle Limit", mem_throttle_limit); + return mem_throttle_limit; +} + jlong CgroupV2MemoryController::memory_max_usage_in_bytes() { - // Log this string at trace level so as to make tests happy. - log_trace(os, container)("Maximum Memory Usage is not supported."); - return OSCONTAINER_ERROR; // not supported + julong mem_max_usage; + CONTAINER_READ_NUMBER_CHECKED(reader(), "/memory.peak", "Maximum Memory Usage", mem_max_usage); + return mem_max_usage; } jlong CgroupV2MemoryController::rss_usage_in_bytes() { diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, 2024, Red Hat Inc. + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +62,34 @@ int cpu_quota() override; int cpu_period() override; int cpu_shares() override; + jlong cpu_usage_in_micros(); + bool is_read_only() override { + return reader()->is_read_only(); + } + const char* subsystem_path() override { + return reader()->subsystem_path(); + } + bool needs_hierarchy_adjustment() override { + return reader()->needs_hierarchy_adjustment(); + } + void set_subsystem_path(const char* cgroup_path) override { + reader()->set_subsystem_path(cgroup_path); + } + const char* mount_point() override { return reader()->mount_point(); } + const char* cgroup_path() override { return reader()->cgroup_path(); } +}; + +class CgroupV2CpuacctController: public CgroupCpuacctController { + private: + CgroupV2CpuController* _reader; + CgroupV2CpuController* reader() { return _reader; } + public: + CgroupV2CpuacctController(CgroupV2CpuController* reader) : _reader(reader) { + } + // In cgroup v2, cpu usage is a part of the cpu controller. + jlong cpu_usage_in_micros() override { + return reader()->cpu_usage_in_micros(); + } bool is_read_only() override { return reader()->is_read_only(); } @@ -89,6 +118,7 @@ jlong memory_and_swap_limit_in_bytes(julong host_mem, julong host_swp) override; jlong memory_and_swap_usage_in_bytes(julong host_mem, julong host_swp) override; jlong memory_soft_limit_in_bytes(julong upper_bound) override; + jlong memory_throttle_limit_in_bytes() override; jlong memory_usage_in_bytes() override; jlong memory_max_usage_in_bytes() override; jlong rss_usage_in_bytes() override; @@ -118,11 +148,14 @@ CachingCgroupController<CgroupMemoryController>* _memory = nullptr; CachingCgroupController<CgroupCpuController>* _cpu = nullptr; + CgroupCpuacctController* _cpuacct = nullptr; + CgroupV2Controller* unified() { return &_unified; } public: CgroupV2Subsystem(CgroupV2MemoryController * memory, CgroupV2CpuController* cpu, + CgroupV2CpuacctController* cpuacct, CgroupV2Controller unified); char * cpu_cpuset_cpus() override; @@ -137,6 +170,7 @@ } CachingCgroupController<CgroupMemoryController>* memory_controller() override { return _memory; } CachingCgroupController<CgroupCpuController>* cpu_controller() override { return _cpu; } + CgroupCpuacctController* cpuacct_controller() override { return _cpuacct; }; }; #endif // CGROUP_V2_SUBSYSTEM_LINUX_HPP diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/osContainer_linux.cpp openjdk-25-25.0.3+9/src/hotspot/os/linux/osContainer_linux.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/osContainer_linux.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/osContainer_linux.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,6 +122,11 @@ return cgroup_subsystem->memory_soft_limit_in_bytes(); } +jlong OSContainer::memory_throttle_limit_in_bytes() { + assert(cgroup_subsystem != nullptr, "cgroup subsystem not available"); + return cgroup_subsystem->memory_throttle_limit_in_bytes(); +} + jlong OSContainer::memory_usage_in_bytes() { assert(cgroup_subsystem != nullptr, "cgroup subsystem not available"); return cgroup_subsystem->memory_usage_in_bytes(); @@ -177,6 +182,11 @@ return cgroup_subsystem->cpu_shares(); } +jlong OSContainer::cpu_usage_in_micros() { + assert(cgroup_subsystem != nullptr, "cgroup subsystem not available"); + return cgroup_subsystem->cpu_usage_in_micros(); +} + jlong OSContainer::pids_max() { assert(cgroup_subsystem != nullptr, "cgroup subsystem not available"); return cgroup_subsystem->pids_max(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/osContainer_linux.hpp openjdk-25-25.0.3+9/src/hotspot/os/linux/osContainer_linux.hpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/osContainer_linux.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/osContainer_linux.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +54,7 @@ static jlong memory_and_swap_limit_in_bytes(); static jlong memory_and_swap_usage_in_bytes(); static jlong memory_soft_limit_in_bytes(); + static jlong memory_throttle_limit_in_bytes(); static jlong memory_usage_in_bytes(); static jlong memory_max_usage_in_bytes(); static jlong rss_usage_in_bytes(); @@ -69,6 +70,8 @@ static int cpu_shares(); + static jlong cpu_usage_in_micros(); + static jlong pids_max(); static jlong pids_current(); }; diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.cpp openjdk-25-25.0.3+9/src/hotspot/os/linux/os_linux.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/linux/os_linux.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -478,13 +478,11 @@ } #ifndef SYS_gettid -// i386: 224, amd64: 186, sparc: 143 +// i386: 224, amd64: 186 #if defined(__i386__) #define SYS_gettid 224 #elif defined(__amd64__) #define SYS_gettid 186 - #elif defined(__sparc__) - #define SYS_gettid 143 #else #error "Define SYS_gettid for this architecture" #endif @@ -2470,6 +2468,7 @@ if (ret == 0) { os::print_dhm(st, "OS uptime:", (long) sinfo.uptime); } + assert(ret == 0, "sysinfo failed: %s", os::strerror(errno)); } bool os::Linux::print_container_info(outputStream* st) { @@ -2527,9 +2526,18 @@ st->print_cr("%s", i == OSCONTAINER_ERROR ? "not supported" : "no shares"); } + jlong j = OSContainer::cpu_usage_in_micros(); + st->print("cpu_usage_in_micros: "); + if (j >= 0) { + st->print_cr(JLONG_FORMAT, j); + } else { + st->print_cr("%s", j == OSCONTAINER_ERROR ? "not supported" : "no usage"); + } + OSContainer::print_container_helper(st, OSContainer::memory_limit_in_bytes(), "memory_limit_in_bytes"); OSContainer::print_container_helper(st, OSContainer::memory_and_swap_limit_in_bytes(), "memory_and_swap_limit_in_bytes"); OSContainer::print_container_helper(st, OSContainer::memory_soft_limit_in_bytes(), "memory_soft_limit_in_bytes"); + OSContainer::print_container_helper(st, OSContainer::memory_throttle_limit_in_bytes(), "memory_throttle_limit_in_bytes"); OSContainer::print_container_helper(st, OSContainer::memory_usage_in_bytes(), "memory_usage_in_bytes"); OSContainer::print_container_helper(st, OSContainer::memory_max_usage_in_bytes(), "memory_max_usage_in_bytes"); OSContainer::print_container_helper(st, OSContainer::rss_usage_in_bytes(), "rss_usage_in_bytes"); @@ -2537,7 +2545,7 @@ OSContainer::print_version_specific_info(st); - jlong j = OSContainer::pids_max(); + j = OSContainer::pids_max(); st->print("maximum number of tasks: "); if (j > 0) { st->print_cr(JLONG_FORMAT, j); @@ -2583,16 +2591,18 @@ // values in struct sysinfo are "unsigned long" struct sysinfo si; - sysinfo(&si); - + int ret = sysinfo(&si); + assert(ret == 0, "sysinfo failed: %s", os::strerror(errno)); st->print(", physical " UINT64_FORMAT "k", os::physical_memory() >> 10); st->print("(" UINT64_FORMAT "k free)", os::available_memory() >> 10); - st->print(", swap " UINT64_FORMAT "k", - ((jlong)si.totalswap * si.mem_unit) >> 10); - st->print("(" UINT64_FORMAT "k free)", - ((jlong)si.freeswap * si.mem_unit) >> 10); + if (ret == 0) { + st->print(", swap " UINT64_FORMAT "k", + ((jlong)si.totalswap * si.mem_unit) >> 10); + st->print("(" UINT64_FORMAT "k free)", + ((jlong)si.freeswap * si.mem_unit) >> 10); + } st->cr(); st->print("Page Sizes: "); _page_sizes.print_on(st); @@ -2724,8 +2734,6 @@ const char* search_string = "cpu"; #elif defined(S390) const char* search_string = "machine ="; -#elif defined(SPARC) -const char* search_string = "cpu"; #else const char* search_string = "Processor"; #endif @@ -2777,8 +2785,6 @@ strncpy(cpuinfo, LP64_ONLY("RISCV64") NOT_LP64("RISCV32"), length); #elif defined(S390) strncpy(cpuinfo, "S390", length); -#elif defined(SPARC) - strncpy(cpuinfo, "sparcv9", length); #elif defined(ZERO_LIBARCH) strncpy(cpuinfo, ZERO_LIBARCH, length); #else @@ -5261,7 +5267,7 @@ if (core_pattern[0] == '|') { written = jio_snprintf(buffer, bufferSize, - "\"%s\" (or dumping to %s/core.%d)", + "\"%s\" (alternatively, falling back to %s/core.%d)", &core_pattern[1], p, current_process_id()); } else if (pid_pos != nullptr) { *pid_pos = '\0'; diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/posix/os_posix.cpp openjdk-25-25.0.3+9/src/hotspot/os/posix/os_posix.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/posix/os_posix.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/posix/os_posix.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -107,41 +107,60 @@ // Check core dump limit and report possible place where core can be found void os::check_core_dump_prerequisites(char* buffer, size_t bufferSize, bool check_only) { + stringStream buf(buffer, bufferSize); if (!FLAG_IS_DEFAULT(CreateCoredumpOnCrash) && !CreateCoredumpOnCrash) { - jio_snprintf(buffer, bufferSize, "CreateCoredumpOnCrash is disabled from command line"); - VMError::record_coredump_status(buffer, false); + buf.print("CreateCoredumpOnCrash is disabled from command line"); + VMError::record_coredump_status(buf.freeze(), false); } else { struct rlimit rlim; bool success = true; bool warn = true; char core_path[PATH_MAX]; if (get_core_path(core_path, PATH_MAX) <= 0) { - jio_snprintf(buffer, bufferSize, "core.%d (may not exist)", current_process_id()); + // In the warning message, let the user know. + if (check_only) { + buf.print("the core path couldn't be determined. It commonly defaults to "); + } + buf.print("core.%d%s", current_process_id(), check_only ? "" : " (may not exist)"); #ifdef LINUX } else if (core_path[0] == '"') { // redirect to user process - jio_snprintf(buffer, bufferSize, "Core dumps may be processed with %s", core_path); + if (check_only) { + buf.print("core dumps may be further processed by the following: "); + } else { + buf.print("Determined by the following: "); + } + buf.print("%s", core_path); #endif } else if (getrlimit(RLIMIT_CORE, &rlim) != 0) { - jio_snprintf(buffer, bufferSize, "%s (may not exist)", core_path); + if (check_only) { + buf.print("the rlimit couldn't be determined. If resource limits permit, the core dump will be located at "); + } + buf.print("%s%s", core_path, check_only ? "" : " (may not exist)"); } else { switch(rlim.rlim_cur) { case RLIM_INFINITY: - jio_snprintf(buffer, bufferSize, "%s", core_path); + buf.print("%s", core_path); warn = false; break; case 0: - jio_snprintf(buffer, bufferSize, "Core dumps have been disabled. To enable core dumping, try \"ulimit -c unlimited\" before starting Java again"); + buf.print("%s dumps have been disabled. To enable core dumping, try \"ulimit -c unlimited\" before starting Java again", check_only ? "core" : "Core"); success = false; break; default: - jio_snprintf(buffer, bufferSize, "%s (max size " UINT64_FORMAT " k). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", core_path, uint64_t(rlim.rlim_cur) / K); + if (check_only) { + buf.print("core dumps are constrained "); + } else { + buf.print( "%s ", core_path); + } + buf.print( "(max size " UINT64_FORMAT " k). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", uint64_t(rlim.rlim_cur) / K); break; } } + const char* result = buf.freeze(); if (!check_only) { - VMError::record_coredump_status(buffer, success); + VMError::record_coredump_status(result, success); } else if (warn) { - warning("CreateCoredumpOnCrash specified, but %s", buffer); + warning("CreateCoredumpOnCrash specified, but %s", result); } } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/os/posix/perfMemory_posix.cpp openjdk-25-25.0.3+9/src/hotspot/os/posix/perfMemory_posix.cpp --- openjdk-25-25.0.2+10/src/hotspot/os/posix/perfMemory_posix.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os/posix/perfMemory_posix.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2021 SAP SE. All rights reserved. + * Copyright (c) 2001, 2026, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2026 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 @@ -950,7 +950,7 @@ if (result == -1 ) break; if (!os::write(fd, &zero_int, 1)) { if (errno == ENOSPC) { - warning("Insufficient space for shared memory file:\n %s\nTry using the -Djava.io.tmpdir= option to select an alternate temp location.\n", filename); + warning("Insufficient space for shared memory file: %s/%s\n", dirname, filename); } result = OS_ERR; break; diff -Nru openjdk-25-25.0.2+10/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2019 SAP SE. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 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 @@ -23,395 +23,5 @@ * */ -#ifndef OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP -#define OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP - -#ifndef PPC64 -#error "Atomic currently only implemented for PPC64" -#endif - -#include "orderAccess_aix_ppc.hpp" -#include "utilities/debug.hpp" - -// Implementation of class atomic - -// -// machine barrier instructions: -// -// - sync two-way memory barrier, aka fence -// - lwsync orders Store|Store, -// Load|Store, -// Load|Load, -// but not Store|Load -// - eieio orders memory accesses for device memory (only) -// - isync invalidates speculatively executed instructions -// From the POWER ISA 2.06 documentation: -// "[...] an isync instruction prevents the execution of -// instructions following the isync until instructions -// preceding the isync have completed, [...]" -// From IBM's AIX assembler reference: -// "The isync [...] instructions causes the processor to -// refetch any instructions that might have been fetched -// prior to the isync instruction. The instruction isync -// causes the processor to wait for all previous instructions -// to complete. Then any instructions already fetched are -// discarded and instruction processing continues in the -// environment established by the previous instructions." -// -// semantic barrier instructions: -// (as defined in orderAccess.hpp) -// -// - release orders Store|Store, (maps to lwsync) -// Load|Store -// - acquire orders Load|Store, (maps to lwsync) -// Load|Load -// - fence orders Store|Store, (maps to sync) -// Load|Store, -// Load|Load, -// Store|Load -// - -inline void pre_membar(atomic_memory_order order) { - switch (order) { - case memory_order_relaxed: - case memory_order_acquire: break; - case memory_order_release: - case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break; - default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; - } -} - -inline void post_membar(atomic_memory_order order) { - switch (order) { - case memory_order_relaxed: - case memory_order_release: break; - case memory_order_acquire: - case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break; - default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; - } -} - - -template<size_t byte_size> -struct Atomic::PlatformAdd { - template<typename D, typename I> - D add_then_fetch(D volatile* dest, I add_value, atomic_memory_order order) const; - - template<typename D, typename I> - D fetch_then_add(D volatile* dest, I add_value, atomic_memory_order order) const { - return add_then_fetch(dest, add_value, order) - add_value; - } -}; - -template<> -template<typename D, typename I> -inline D Atomic::PlatformAdd<4>::add_then_fetch(D volatile* dest, I add_value, - atomic_memory_order order) const { - STATIC_ASSERT(4 == sizeof(I)); - STATIC_ASSERT(4 == sizeof(D)); - - D result; - - pre_membar(order); - - __asm__ __volatile__ ( - "1: lwarx %0, 0, %2 \n" - " add %0, %0, %1 \n" - " stwcx. %0, 0, %2 \n" - " bne- 1b \n" - : /*%0*/"=&r" (result) - : /*%1*/"r" (add_value), /*%2*/"r" (dest) - : "cc", "memory" ); - - post_membar(order); - - return result; -} - - -template<> -template<typename D, typename I> -inline D Atomic::PlatformAdd<8>::add_then_fetch(D volatile* dest, I add_value, - atomic_memory_order order) const { - STATIC_ASSERT(8 == sizeof(I)); - STATIC_ASSERT(8 == sizeof(D)); - - D result; - - pre_membar(order); - - __asm__ __volatile__ ( - "1: ldarx %0, 0, %2 \n" - " add %0, %0, %1 \n" - " stdcx. %0, 0, %2 \n" - " bne- 1b \n" - : /*%0*/"=&r" (result) - : /*%1*/"r" (add_value), /*%2*/"r" (dest) - : "cc", "memory" ); - - post_membar(order); - - return result; -} - -template<> -template<typename T> -inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, - T exchange_value, - atomic_memory_order order) const { - // Note that xchg doesn't necessarily do an acquire - // (see synchronizer.cpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* atomic loop */ - "1: \n" - " lwarx %[old_value], %[dest], %[zero] \n" - " stwcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<> -template<typename T> -inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(8 == sizeof(T)); - // Note that xchg doesn't necessarily do an acquire - // (see synchronizer.cpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* atomic loop */ - "1: \n" - " ldarx %[old_value], %[dest], %[zero] \n" - " stdcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<> -template<typename T> -inline T Atomic::PlatformCmpxchg<1>::operator()(T volatile* dest, - T compare_value, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(1 == sizeof(T)); - - // Note that cmpxchg guarantees a two-way memory barrier across - // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not - // specified otherwise (see atomic.hpp). - - // Using 32 bit internally. - volatile int *dest_base = (volatile int*)((uintptr_t)dest & ~3); - -#ifdef VM_LITTLE_ENDIAN - const unsigned int shift_amount = ((uintptr_t)dest & 3) * 8; -#else - const unsigned int shift_amount = ((~(uintptr_t)dest) & 3) * 8; -#endif - const unsigned int masked_compare_val = ((unsigned int)(unsigned char)compare_value), - masked_exchange_val = ((unsigned int)(unsigned char)exchange_value), - xor_value = (masked_compare_val ^ masked_exchange_val) << shift_amount; - - unsigned int old_value, value32; - - pre_membar(order); - - __asm__ __volatile__ ( - /* simple guard */ - " lbz %[old_value], 0(%[dest]) \n" - " cmpw %[masked_compare_val], %[old_value] \n" - " bne- 2f \n" - /* atomic loop */ - "1: \n" - " lwarx %[value32], 0, %[dest_base] \n" - /* extract byte and compare */ - " srd %[old_value], %[value32], %[shift_amount] \n" - " clrldi %[old_value], %[old_value], 56 \n" - " cmpw %[masked_compare_val], %[old_value] \n" - " bne- 2f \n" - /* replace byte and try to store */ - " xor %[value32], %[xor_value], %[value32] \n" - " stwcx. %[value32], 0, %[dest_base] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - [value32] "=&r" (value32), - "=m" (*dest), - "=m" (*dest_base) - /* in */ - : [dest] "b" (dest), - [dest_base] "b" (dest_base), - [shift_amount] "r" (shift_amount), - [masked_compare_val] "r" (masked_compare_val), - [xor_value] "r" (xor_value), - "m" (*dest), - "m" (*dest_base) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return PrimitiveConversions::cast<T>((unsigned char)old_value); -} - -template<> -template<typename T> -inline T Atomic::PlatformCmpxchg<4>::operator()(T volatile* dest, - T compare_value, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(4 == sizeof(T)); - - // Note that cmpxchg guarantees a two-way memory barrier across - // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not - // specified otherwise (see atomic.hpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* simple guard */ - " lwz %[old_value], 0(%[dest]) \n" - " cmpw %[compare_value], %[old_value] \n" - " bne- 2f \n" - /* atomic loop */ - "1: \n" - " lwarx %[old_value], %[dest], %[zero] \n" - " cmpw %[compare_value], %[old_value] \n" - " bne- 2f \n" - " stwcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [compare_value] "r" (compare_value), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<> -template<typename T> -inline T Atomic::PlatformCmpxchg<8>::operator()(T volatile* dest, - T compare_value, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(8 == sizeof(T)); - - // Note that cmpxchg guarantees a two-way memory barrier across - // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not - // specified otherwise (see atomic.hpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* simple guard */ - " ld %[old_value], 0(%[dest]) \n" - " cmpd %[compare_value], %[old_value] \n" - " bne- 2f \n" - /* atomic loop */ - "1: \n" - " ldarx %[old_value], %[dest], %[zero] \n" - " cmpd %[compare_value], %[old_value] \n" - " bne- 2f \n" - " stdcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [compare_value] "r" (compare_value), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<size_t byte_size> -struct Atomic::PlatformOrderedLoad<byte_size, X_ACQUIRE> { - template <typename T> - T operator()(const volatile T* p) const { - T t = Atomic::load(p); - // Use twi-isync for load_acquire (faster than lwsync). - __asm__ __volatile__ ("twi 0,%0,0\n isync\n" : : "r" (t) : "memory"); - return t; - } -}; - -#endif // OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP +// Including inline assembler functions that are shared between multiple PPC64 platforms. +#include "atomicAccess_ppc.hpp" diff -Nru openjdk-25-25.0.2+10/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os_cpu/aix_ppc/orderAccess_aix_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2019 SAP SE. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 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 @@ -23,62 +23,5 @@ * */ -#ifndef OS_CPU_AIX_PPC_ORDERACCESS_AIX_PPC_HPP -#define OS_CPU_AIX_PPC_ORDERACCESS_AIX_PPC_HPP - -// Included in orderAccess.hpp header file. - -// Compiler version last used for testing: xlc 12 -// Please update this information when this file changes - -// Implementation of class OrderAccess. - -// -// Machine barrier instructions: -// -// - sync Two-way memory barrier, aka fence. -// - lwsync orders Store|Store, -// Load|Store, -// Load|Load, -// but not Store|Load -// - eieio orders Store|Store -// - isync Invalidates speculatively executed instructions, -// but isync may complete before storage accesses -// associated with instructions preceding isync have -// been performed. -// -// Semantic barrier instructions: -// (as defined in orderAccess.hpp) -// -// - release orders Store|Store, (maps to lwsync) -// Load|Store -// - acquire orders Load|Store, (maps to lwsync) -// Load|Load -// - fence orders Store|Store, (maps to sync) -// Load|Store, -// Load|Load, -// Store|Load -// - -#define inlasm_sync() __asm__ __volatile__ ("sync" : : : "memory"); -#define inlasm_lwsync() __asm__ __volatile__ ("lwsync" : : : "memory"); -#define inlasm_eieio() __asm__ __volatile__ ("eieio" : : : "memory"); -#define inlasm_isync() __asm__ __volatile__ ("isync" : : : "memory"); - -inline void OrderAccess::loadload() { inlasm_lwsync(); } -inline void OrderAccess::storestore() { inlasm_lwsync(); } -inline void OrderAccess::loadstore() { inlasm_lwsync(); } -inline void OrderAccess::storeload() { inlasm_sync(); } - -inline void OrderAccess::acquire() { inlasm_lwsync(); } -inline void OrderAccess::release() { inlasm_lwsync(); } -inline void OrderAccess::fence() { inlasm_sync(); } -inline void OrderAccess::cross_modify_fence_impl() - { inlasm_isync(); } - -#undef inlasm_sync -#undef inlasm_lwsync -#undef inlasm_eieio -#undef inlasm_isync - -#endif // OS_CPU_AIX_PPC_ORDERACCESS_AIX_PPC_HPP +// Including inline assembler functions that are shared between multiple PPC64 platforms. +#include "orderAccess_ppc.hpp" diff -Nru openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2019 SAP SE. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 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 @@ -23,373 +23,5 @@ * */ -#ifndef OS_CPU_LINUX_PPC_ATOMIC_LINUX_PPC_HPP -#define OS_CPU_LINUX_PPC_ATOMIC_LINUX_PPC_HPP - -#ifndef PPC64 -#error "Atomic currently only implemented for PPC64" -#endif - -#include "orderAccess_linux_ppc.hpp" -#include "utilities/debug.hpp" - -// Implementation of class atomic - -// -// machine barrier instructions: -// -// - sync two-way memory barrier, aka fence -// - lwsync orders Store|Store, -// Load|Store, -// Load|Load, -// but not Store|Load -// - eieio orders memory accesses for device memory (only) -// - isync invalidates speculatively executed instructions -// From the POWER ISA 2.06 documentation: -// "[...] an isync instruction prevents the execution of -// instructions following the isync until instructions -// preceding the isync have completed, [...]" -// From IBM's AIX assembler reference: -// "The isync [...] instructions causes the processor to -// refetch any instructions that might have been fetched -// prior to the isync instruction. The instruction isync -// causes the processor to wait for all previous instructions -// to complete. Then any instructions already fetched are -// discarded and instruction processing continues in the -// environment established by the previous instructions." -// -// semantic barrier instructions: -// (as defined in orderAccess.hpp) -// -// - release orders Store|Store, (maps to lwsync) -// Load|Store -// - acquire orders Load|Store, (maps to lwsync) -// Load|Load -// - fence orders Store|Store, (maps to sync) -// Load|Store, -// Load|Load, -// Store|Load -// - -inline void pre_membar(atomic_memory_order order) { - switch (order) { - case memory_order_relaxed: - case memory_order_acquire: break; - case memory_order_release: - case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break; - default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; - } -} - -inline void post_membar(atomic_memory_order order) { - switch (order) { - case memory_order_relaxed: - case memory_order_release: break; - case memory_order_acquire: - case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break; - default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; - } -} - - -template<size_t byte_size> -struct Atomic::PlatformAdd { - template<typename D, typename I> - D add_then_fetch(D volatile* dest, I add_value, atomic_memory_order order) const; - - template<typename D, typename I> - D fetch_then_add(D volatile* dest, I add_value, atomic_memory_order order) const { - return add_then_fetch(dest, add_value, order) - add_value; - } -}; - -template<> -template<typename D, typename I> -inline D Atomic::PlatformAdd<4>::add_then_fetch(D volatile* dest, I add_value, - atomic_memory_order order) const { - STATIC_ASSERT(4 == sizeof(I)); - STATIC_ASSERT(4 == sizeof(D)); - - D result; - - pre_membar(order); - - __asm__ __volatile__ ( - "1: lwarx %0, 0, %2 \n" - " add %0, %0, %1 \n" - " stwcx. %0, 0, %2 \n" - " bne- 1b \n" - : /*%0*/"=&r" (result) - : /*%1*/"r" (add_value), /*%2*/"r" (dest) - : "cc", "memory" ); - - post_membar(order); - - return result; -} - - -template<> -template<typename D, typename I> -inline D Atomic::PlatformAdd<8>::add_then_fetch(D volatile* dest, I add_value, - atomic_memory_order order) const { - STATIC_ASSERT(8 == sizeof(I)); - STATIC_ASSERT(8 == sizeof(D)); - - D result; - - pre_membar(order); - - __asm__ __volatile__ ( - "1: ldarx %0, 0, %2 \n" - " add %0, %0, %1 \n" - " stdcx. %0, 0, %2 \n" - " bne- 1b \n" - : /*%0*/"=&r" (result) - : /*%1*/"r" (add_value), /*%2*/"r" (dest) - : "cc", "memory" ); - - post_membar(order); - - return result; -} - -template<> -template<typename T> -inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, - T exchange_value, - atomic_memory_order order) const { - // Note that xchg doesn't necessarily do an acquire - // (see synchronizer.cpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* atomic loop */ - "1: \n" - " lwarx %[old_value], %[dest], %[zero] \n" - " stwcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<> -template<typename T> -inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(8 == sizeof(T)); - // Note that xchg doesn't necessarily do an acquire - // (see synchronizer.cpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* atomic loop */ - "1: \n" - " ldarx %[old_value], %[dest], %[zero] \n" - " stdcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<> -template<typename T> -inline T Atomic::PlatformCmpxchg<1>::operator()(T volatile* dest, - T compare_value, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(1 == sizeof(T)); - - // Note that cmpxchg guarantees a two-way memory barrier across - // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not - // specified otherwise (see atomic.hpp). - - // Using 32 bit internally. - unsigned int old_value, loaded_value; - pre_membar(order); - - __asm__ __volatile__ ( - /* atomic loop */ - "1: \n" - " lbarx %[old_value], 0, %[dest] \n" - /* extract byte and compare */ - " cmpw %[compare_value], %[old_value] \n" - " bne- 2f \n" - /* replace byte and try to store */ - " stbcx. %[exchange_value], 0, %[dest] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - [loaded_value] "=&r" (loaded_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [compare_value] "r" (compare_value), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return PrimitiveConversions::cast<T>((unsigned char)old_value); -} - -template<> -template<typename T> -inline T Atomic::PlatformCmpxchg<4>::operator()(T volatile* dest, - T compare_value, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(4 == sizeof(T)); - - // Note that cmpxchg guarantees a two-way memory barrier across - // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not - // specified otherwise (see atomic.hpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* simple guard */ - " lwz %[old_value], 0(%[dest]) \n" - " cmpw %[compare_value], %[old_value] \n" - " bne- 2f \n" - /* atomic loop */ - "1: \n" - " lwarx %[old_value], %[dest], %[zero] \n" - " cmpw %[compare_value], %[old_value] \n" - " bne- 2f \n" - " stwcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [compare_value] "r" (compare_value), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<> -template<typename T> -inline T Atomic::PlatformCmpxchg<8>::operator()(T volatile* dest, - T compare_value, - T exchange_value, - atomic_memory_order order) const { - STATIC_ASSERT(8 == sizeof(T)); - - // Note that cmpxchg guarantees a two-way memory barrier across - // the cmpxchg, so it's really a 'fence_cmpxchg_fence' if not - // specified otherwise (see atomic.hpp). - - T old_value; - const uint64_t zero = 0; - - pre_membar(order); - - __asm__ __volatile__ ( - /* simple guard */ - " ld %[old_value], 0(%[dest]) \n" - " cmpd %[compare_value], %[old_value] \n" - " bne- 2f \n" - /* atomic loop */ - "1: \n" - " ldarx %[old_value], %[dest], %[zero] \n" - " cmpd %[compare_value], %[old_value] \n" - " bne- 2f \n" - " stdcx. %[exchange_value], %[dest], %[zero] \n" - " bne- 1b \n" - /* exit */ - "2: \n" - /* out */ - : [old_value] "=&r" (old_value), - "=m" (*dest) - /* in */ - : [dest] "b" (dest), - [zero] "r" (zero), - [compare_value] "r" (compare_value), - [exchange_value] "r" (exchange_value), - "m" (*dest) - /* clobber */ - : "cc", - "memory" - ); - - post_membar(order); - - return old_value; -} - -template<size_t byte_size> -struct Atomic::PlatformOrderedLoad<byte_size, X_ACQUIRE> -{ - template <typename T> - T operator()(const volatile T* p) const { - T t = Atomic::load(p); - // Use twi-isync for load_acquire (faster than lwsync). - __asm__ __volatile__ ("twi 0,%0,0\n isync\n" : : "r" (t) : "memory"); - return t; - } -}; - -#endif // OS_CPU_LINUX_PPC_ATOMIC_LINUX_PPC_HPP +// Including inline assembler functions that are shared between multiple PPC64 platforms. +#include "atomicAccess_ppc.hpp" diff -Nru openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp openjdk-25-25.0.3+9/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp --- openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/os_cpu/linux_ppc/orderAccess_linux_ppc.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 SAP SE. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 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 @@ -23,66 +23,5 @@ * */ -#ifndef OS_CPU_LINUX_PPC_ORDERACCESS_LINUX_PPC_HPP -#define OS_CPU_LINUX_PPC_ORDERACCESS_LINUX_PPC_HPP - -// Included in orderAccess.hpp header file. - -#ifndef PPC64 -#error "OrderAccess currently only implemented for PPC64" -#endif - -// Compiler version last used for testing: gcc 4.1.2 -// Please update this information when this file changes - -// Implementation of class OrderAccess. - -// -// Machine barrier instructions: -// -// - sync Two-way memory barrier, aka fence. -// - lwsync orders Store|Store, -// Load|Store, -// Load|Load, -// but not Store|Load -// - eieio orders Store|Store -// - isync Invalidates speculatively executed instructions, -// but isync may complete before storage accesses -// associated with instructions preceding isync have -// been performed. -// -// Semantic barrier instructions: -// (as defined in orderAccess.hpp) -// -// - release orders Store|Store, (maps to lwsync) -// Load|Store -// - acquire orders Load|Store, (maps to lwsync) -// Load|Load -// - fence orders Store|Store, (maps to sync) -// Load|Store, -// Load|Load, -// Store|Load -// - -#define inlasm_sync() __asm__ __volatile__ ("sync" : : : "memory"); -#define inlasm_lwsync() __asm__ __volatile__ ("lwsync" : : : "memory"); -#define inlasm_eieio() __asm__ __volatile__ ("eieio" : : : "memory"); -#define inlasm_isync() __asm__ __volatile__ ("isync" : : : "memory"); - -inline void OrderAccess::loadload() { inlasm_lwsync(); } -inline void OrderAccess::storestore() { inlasm_lwsync(); } -inline void OrderAccess::loadstore() { inlasm_lwsync(); } -inline void OrderAccess::storeload() { inlasm_sync(); } - -inline void OrderAccess::acquire() { inlasm_lwsync(); } -inline void OrderAccess::release() { inlasm_lwsync(); } -inline void OrderAccess::fence() { inlasm_sync(); } -inline void OrderAccess::cross_modify_fence_impl() - { inlasm_isync(); } - -#undef inlasm_sync -#undef inlasm_lwsync -#undef inlasm_eieio -#undef inlasm_isync - -#endif // OS_CPU_LINUX_PPC_ORDERACCESS_LINUX_PPC_HPP +// Including inline assembler functions that are shared between multiple PPC64 platforms. +#include "orderAccess_ppc.hpp" diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Runtime1.cpp openjdk-25-25.0.3+9/src/hotspot/share/c1/c1_Runtime1.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Runtime1.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/c1/c1_Runtime1.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -818,7 +818,7 @@ Deoptimization::DeoptReason reason = Deoptimization::trap_request_reason(trap_request); if (action == Deoptimization::Action_make_not_entrant) { - if (nm->make_not_entrant(nmethod::ChangeReason::C1_deoptimize)) { + if (nm->make_not_entrant(nmethod::InvalidationReason::C1_DEOPTIMIZE)) { if (reason == Deoptimization::Reason_tenured) { MethodData* trap_mdo = Deoptimization::get_method_data(current, method, true /*create_if_missing*/); if (trap_mdo != nullptr) { @@ -1110,7 +1110,7 @@ // safepoint, but if it's still alive then make it not_entrant. nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); if (nm != nullptr) { - nm->make_not_entrant(nmethod::ChangeReason::C1_codepatch); + nm->make_not_entrant(nmethod::InvalidationReason::C1_CODEPATCH); } Deoptimization::deoptimize_frame(current, caller_frame.id()); @@ -1358,7 +1358,7 @@ // Make sure the nmethod is invalidated, i.e. made not entrant. nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); if (nm != nullptr) { - nm->make_not_entrant(nmethod::ChangeReason::C1_deoptimize_for_patching); + nm->make_not_entrant(nmethod::InvalidationReason::C1_DEOPTIMIZE_FOR_PATCHING); } } @@ -1486,7 +1486,7 @@ nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); assert (nm != nullptr, "no more nmethod?"); - nm->make_not_entrant(nmethod::ChangeReason::C1_predicate_failed_trap); + nm->make_not_entrant(nmethod::InvalidationReason::C1_PREDICATE_FAILED_TRAP); methodHandle m(current, nm->method()); MethodData* mdo = m->method_data(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/cds/dynamicArchive.cpp openjdk-25-25.0.3+9/src/hotspot/share/cds/dynamicArchive.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/cds/dynamicArchive.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/cds/dynamicArchive.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -348,6 +348,7 @@ assert(dynamic_info != nullptr, "Sanity"); dynamic_info->open_as_output(); + dynamic_info->prepare_for_writing(); ArchiveHeapInfo no_heap_for_dynamic_dump; ArchiveBuilder::write_archive(dynamic_info, &no_heap_for_dynamic_dump); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/cds/filemap.cpp openjdk-25-25.0.3+9/src/hotspot/share/cds/filemap.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/cds/filemap.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/cds/filemap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -766,7 +766,9 @@ } _fd = fd; _file_open = true; +} +void FileMapInfo::prepare_for_writing() { // Seek past the header. We will write the header after all regions are written // and their CRCs computed. size_t header_bytes = header()->header_size(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/cds/filemap.hpp openjdk-25-25.0.3+9/src/hotspot/share/cds/filemap.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/cds/filemap.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/cds/filemap.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -359,6 +359,7 @@ // File manipulation. bool open_as_input() NOT_CDS_RETURN_(false); void open_as_output(); + void prepare_for_writing(); void write_header(); void write_region(int region, char* base, size_t size, bool read_only, bool allow_exec); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/cds/lambdaFormInvokers.cpp openjdk-25-25.0.3+9/src/hotspot/share/cds/lambdaFormInvokers.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/cds/lambdaFormInvokers.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/cds/lambdaFormInvokers.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -191,7 +191,7 @@ // make a copy of class bytes so GC will not affect us. char *buf = NEW_RESOURCE_ARRAY(char, len); memcpy(buf, (char*)h_bytes->byte_at_addr(0), len); - ClassFileStream st((u1*)buf, len, nullptr); + ClassFileStream st((u1*)buf, len, "jrt:/java.base"); regenerate_class(class_name, st, CHECK); } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.cpp openjdk-25-25.0.3+9/src/hotspot/share/cds/metaspaceShared.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/cds/metaspaceShared.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -113,6 +113,8 @@ char* MetaspaceShared::_requested_base_address; Array<Method*>* MetaspaceShared::_archived_method_handle_intrinsics = nullptr; bool MetaspaceShared::_use_optimized_module_handling = true; +int volatile MetaspaceShared::_preimage_static_archive_dumped = 0; +FileMapInfo* MetaspaceShared::_output_mapinfo = nullptr; // The CDS archive is divided into the following regions: // rw - read-write metadata @@ -321,6 +323,24 @@ MetaspaceShared::unrecoverable_writing_error(); } _symbol_region.init(&_symbol_rs, &_symbol_vs); + if (CDSConfig::is_dumping_preimage_static_archive()) { + // We are in the AOT training run. User code is executed. + // + // On Windows, if the user code closes System.out and we open the AOT config file for output + // only at VM exit, we might get back the same file HANDLE as stdout, and the AOT config + // file may get corrupted by UL logs. By opening early, we ensure that the output + // HANDLE is different than stdout so we can avoid such corruption. + open_output_mapinfo(); + } else { + // No need for the above as we won't execute any user code. + } +} + +void MetaspaceShared::open_output_mapinfo() { + const char* static_archive = CDSConfig::output_archive_path(); + assert(static_archive != nullptr, "sanity"); + _output_mapinfo = new FileMapInfo(static_archive, true); + _output_mapinfo->open_as_output(); } // Called by universe_post_init() @@ -551,14 +571,13 @@ public: - VM_PopulateDumpSharedSpace(StaticArchiveBuilder& b) : - VM_Operation(), _heap_info(), _map_info(nullptr), _builder(b) {} + VM_PopulateDumpSharedSpace(StaticArchiveBuilder& b, FileMapInfo* map_info) : + VM_Operation(), _heap_info(), _map_info(map_info), _builder(b) {} bool skip_operation() const { return false; } VMOp_Type type() const { return VMOp_PopulateDumpSharedSpace; } ArchiveHeapInfo* heap_info() { return &_heap_info; } - FileMapInfo* map_info() const { return _map_info; } void doit(); // outline because gdb sucks bool allow_nested_vm_operations() const { return true; } }; // class VM_PopulateDumpSharedSpace @@ -688,12 +707,6 @@ CppVtables::zero_archived_vtables(); // Write the archive file - if (CDSConfig::is_dumping_final_static_archive()) { - FileMapInfo::free_current_info(); // FIXME: should not free current info - } - const char* static_archive = CDSConfig::output_archive_path(); - assert(static_archive != nullptr, "sanity"); - _map_info = new FileMapInfo(static_archive, true); _map_info->populate_header(MetaspaceShared::core_region_alignment()); _map_info->set_early_serialized_data(early_serialized_data); _map_info->set_serialized_data(serialized_data); @@ -919,7 +932,21 @@ CDSProtectionDomain::to_file_URL("dummy.jar", Handle(), CHECK); } +bool MetaspaceShared::preimage_static_archive_dumped() { + assert(CDSConfig::is_dumping_preimage_static_archive(), "Required"); + return Atomic::load_acquire(&_preimage_static_archive_dumped) == 1; +} + void MetaspaceShared::preload_and_dump_impl(StaticArchiveBuilder& builder, TRAPS) { + if (CDSConfig::is_dumping_preimage_static_archive()) { + // When dumping to the AOT configuration file ensure this function is only executed once. + // Multiple invocations may happen via JCmd, during VM exit or other means (in the future) + // from different threads and possibly concurrently. + if (Atomic::cmpxchg(&_preimage_static_archive_dumped, 0, 1) != 0) { + return; + } + } + if (CDSConfig::is_dumping_classic_static_archive()) { // We are running with -Xshare:dump preload_classes(CHECK); @@ -1012,7 +1039,14 @@ } #endif - VM_PopulateDumpSharedSpace op(builder); + if (!CDSConfig::is_dumping_preimage_static_archive()) { + if (CDSConfig::is_dumping_final_static_archive()) { + FileMapInfo::free_current_info(); // FIXME: should not free current info + } + open_output_mapinfo(); + } + + VM_PopulateDumpSharedSpace op(builder, _output_mapinfo); VMThread::execute(&op); if (AOTCodeCache::is_on_for_dump() && CDSConfig::is_dumping_final_static_archive()) { @@ -1026,7 +1060,9 @@ CDSConfig::disable_dumping_aot_code(); } - bool status = write_static_archive(&builder, op.map_info(), op.heap_info()); + bool status = write_static_archive(&builder, _output_mapinfo, op.heap_info()); + assert(!_output_mapinfo->is_open(), "Must be closed already"); + _output_mapinfo = nullptr; if (status && CDSConfig::is_dumping_preimage_static_archive()) { tty->print_cr("%s AOTConfiguration recorded: %s", CDSConfig::has_temp_aot_config_file() ? "Temporary" : "", AOTConfiguration); @@ -1044,11 +1080,10 @@ // relocate the data so that it can be mapped to MetaspaceShared::requested_base_address() // without runtime relocation. builder->relocate_to_requested(); - - map_info->open_as_output(); if (!map_info->is_open()) { return false; } + map_info->prepare_for_writing(); builder->write_archive(map_info, heap_info); if (AllowArchivingWithJavaAgent) { @@ -1287,6 +1322,10 @@ LogStream ls_cds(level, LogTagSetMapping<LOG_TAGS(cds)>::tagset()); LogStream& ls = CDSConfig::new_aot_flags_used() ? ls_aot : ls_cds; + if (!ls.is_enabled()) { + return; + } + va_list ap; va_start(ap, format); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.hpp openjdk-25-25.0.3+9/src/hotspot/share/cds/metaspaceShared.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/cds/metaspaceShared.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -59,6 +59,8 @@ static char* _requested_base_address; static bool _use_optimized_module_handling; static Array<Method*>* _archived_method_handle_intrinsics; + static int volatile _preimage_static_archive_dumped; + static FileMapInfo* _output_mapinfo; public: enum { @@ -110,6 +112,8 @@ static bool is_shared_dynamic(void* p) NOT_CDS_RETURN_(false); static bool is_shared_static(void* p) NOT_CDS_RETURN_(false); + static bool preimage_static_archive_dumped() NOT_CDS_RETURN_(false); + static void unrecoverable_loading_error(const char* message = "unrecoverable error"); static void report_loading_error(const char* format, ...) ATTRIBUTE_PRINTF(1, 0); static void unrecoverable_writing_error(const char* message = nullptr); @@ -180,6 +184,7 @@ private: static void read_extra_data(JavaThread* current, const char* filename) NOT_CDS_RETURN; static void fork_and_dump_final_static_archive(TRAPS); + static void open_output_mapinfo(); static bool write_static_archive(ArchiveBuilder* builder, FileMapInfo* map_info, ArchiveHeapInfo* heap_info); static FileMapInfo* open_static_archive(); static FileMapInfo* open_dynamic_archive(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/ci/ciReplay.cpp openjdk-25-25.0.3+9/src/hotspot/share/ci/ciReplay.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/ci/ciReplay.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/ci/ciReplay.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -802,7 +802,7 @@ // Make sure the existence of a prior compile doesn't stop this one nmethod* nm = (entry_bci != InvocationEntryBci) ? method->lookup_osr_nmethod_for(entry_bci, comp_level, true) : method->code(); if (nm != nullptr) { - nm->make_not_entrant(nmethod::ChangeReason::CI_replay); + nm->make_not_entrant(nmethod::InvalidationReason::CI_REPLAY); } replay_state = this; CompileBroker::compile_method(methodHandle(THREAD, method), entry_bci, comp_level, diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/classfile/classLoader.cpp openjdk-25-25.0.3+9/src/hotspot/share/classfile/classLoader.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/classfile/classLoader.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/classfile/classLoader.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -707,6 +707,7 @@ if (zip != nullptr && error_msg == nullptr) { new_entry = new ClassPathZipEntry(zip, path); } else { + log_info(class, path)("failed: %s, err: %s", path, error_msg); return nullptr; } log_info(class, path)("opened: %s", path); @@ -1192,10 +1193,7 @@ oop loader = ik->class_loader(); char* src = (char*)stream->source(); if (src == nullptr) { - if (loader == nullptr) { - // JFR classes - ik->set_shared_classpath_index(0); - } + ik->set_shared_classpath_index(-1); // unsupported location return; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/classfile/resolutionErrors.cpp openjdk-25-25.0.3+9/src/hotspot/share/classfile/resolutionErrors.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/classfile/resolutionErrors.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/classfile/resolutionErrors.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -73,7 +73,7 @@ ResolutionErrorKey key(pool(), cp_index); ResolutionErrorEntry *entry = new ResolutionErrorEntry(error, message, cause, cause_msg); - _resolution_error_table->put(key, entry); + _resolution_error_table->put_when_absent(key, entry); } // create new nest host error entry @@ -85,7 +85,7 @@ ResolutionErrorKey key(pool(), cp_index); ResolutionErrorEntry *entry = new ResolutionErrorEntry(message); - _resolution_error_table->put(key, entry); + _resolution_error_table->put_when_absent(key, entry); } // find entry in the table @@ -126,6 +126,13 @@ } } +void ResolutionErrorEntry::set_nest_host_error(const char* message) { + assert(_nest_host_error == nullptr, "caller should have checked"); + assert_lock_strong(SystemDictionary_lock); + _nest_host_error = message; +} + + class ResolutionErrorDeleteIterate : StackObj { ConstantPool* p; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/classfile/resolutionErrors.hpp openjdk-25-25.0.3+9/src/hotspot/share/classfile/resolutionErrors.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/classfile/resolutionErrors.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/classfile/resolutionErrors.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,10 +91,7 @@ ~ResolutionErrorEntry(); // The incoming nest host error message is already in the C-Heap. - void set_nest_host_error(const char* message) { - _nest_host_error = message; - } - + void set_nest_host_error(const char* message); Symbol* error() const { return _error; } const char* message() const { return _message; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionary.cpp openjdk-25-25.0.3+9/src/hotspot/share/classfile/systemDictionary.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionary.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/classfile/systemDictionary.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -55,6 +55,7 @@ #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/access.inline.hpp" +#include "oops/constantPool.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/klass.inline.hpp" #include "oops/method.inline.hpp" @@ -1806,18 +1807,28 @@ void SystemDictionary::add_nest_host_error(const constantPoolHandle& pool, int which, - const char* message) { + const stringStream& message) { { MutexLocker ml(Thread::current(), SystemDictionary_lock); ResolutionErrorEntry* entry = ResolutionErrorTable::find_entry(pool, which); - if (entry != nullptr && entry->nest_host_error() == nullptr) { + if (entry == nullptr) { + // Only add a new entry to the resolution error table if one hasn't been found for this + // constant pool index. In this case resolution succeeded but there's an error in this nest host + // that we use the table to record. + assert(pool->resolved_klass_at(which) != nullptr, "klass should be resolved if there is no entry"); + ResolutionErrorTable::add_entry(pool, which, message.as_string(true /* on C-heap */)); + } else { // An existing entry means we had a true resolution failure (LinkageError) with our nest host, but we // still want to add the error message for the higher-level access checks to report. We should // only reach here under the same error condition, so we can ignore the potential race with setting - // the message. If we see it is already set then we can ignore it. - entry->set_nest_host_error(message); - } else { - ResolutionErrorTable::add_entry(pool, which, message); + // the message. + const char* nhe = entry->nest_host_error(); + if (nhe == nullptr) { + entry->set_nest_host_error(message.as_string(true /* on C-heap */)); + } else { + DEBUG_ONLY(const char* msg = message.base();) + assert(strcmp(nhe, msg) == 0, "New message %s, differs from original %s", msg, nhe); + } } } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionary.hpp openjdk-25-25.0.3+9/src/hotspot/share/classfile/systemDictionary.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionary.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/classfile/systemDictionary.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -280,7 +280,7 @@ // Record a nest host resolution/validation error static void add_nest_host_error(const constantPoolHandle& pool, int which, - const char* message); + const stringStream& message); static const char* find_nest_host_error(const constantPoolHandle& pool, int which); static void add_to_initiating_loader(JavaThread* current, InstanceKlass* k, diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/code/codeBlob.cpp openjdk-25-25.0.3+9/src/hotspot/share/code/codeBlob.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/code/codeBlob.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/code/codeBlob.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -897,6 +897,7 @@ nm->print_nmethod(true); } else { nm->print_on(st); + nm->print_code_snippet(st, addr); } return; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/code/codeCache.cpp openjdk-25-25.0.3+9/src/hotspot/share/code/codeCache.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/code/codeCache.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/code/codeCache.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -227,11 +227,6 @@ if (!non_nmethod.set) { non_nmethod.size += compiler_buffer_size; - // Further down, just before FLAG_SET_ERGO(), all segment sizes are - // aligned down to the next lower multiple of min_size. For large page - // sizes, this may result in (non_nmethod.size == 0) which is not acceptable. - // Therefore, force non_nmethod.size to at least min_size. - non_nmethod.size = MAX2(non_nmethod.size, min_size); } if (!profiled.set && !non_profiled.set) { @@ -253,13 +248,61 @@ set_size_of_unset_code_heap(&non_nmethod, cache_size, profiled.size + non_profiled.size, non_nmethod_min_size); } - size_t total = non_nmethod.size + profiled.size + non_profiled.size; - if (total != cache_size && !cache_size_set) { - log_info(codecache)("ReservedCodeCache size %zuK changed to total segments size NonNMethod " - "%zuK NonProfiled %zuK Profiled %zuK = %zuK", - cache_size/K, non_nmethod.size/K, non_profiled.size/K, profiled.size/K, total/K); - // Adjust ReservedCodeCacheSize as necessary because it was not set explicitly - cache_size = total; + // Note: if large page support is enabled, min_size is at least the large + // page size. This ensures that the code cache is covered by large pages. + non_nmethod.size = align_up(non_nmethod.size, min_size); + profiled.size = align_up(profiled.size, min_size); + non_profiled.size = align_up(non_profiled.size, min_size); + + size_t aligned_total = non_nmethod.size + profiled.size + non_profiled.size; + if (!cache_size_set) { + // If ReservedCodeCacheSize is explicitly set and exceeds CODE_CACHE_SIZE_LIMIT, + // it is rejected by flag validation elsewhere. Here we only handle the case + // where ReservedCodeCacheSize is not set explicitly, but the computed segmented + // sizes (after alignment) exceed the platform limit. + if (aligned_total > CODE_CACHE_SIZE_LIMIT) { + err_msg message("ReservedCodeCacheSize (%zuK), Max (%zuK)." + "Segments: NonNMethod (%zuK), NonProfiled (%zuK), Profiled (%zuK).", + aligned_total/K, CODE_CACHE_SIZE_LIMIT/K, + non_nmethod.size/K, non_profiled.size/K, profiled.size/K); + vm_exit_during_initialization("Code cache size exceeds platform limit", message); + } + if (aligned_total != cache_size) { + log_info(codecache)("ReservedCodeCache size %zuK changed to total segments size NonNMethod " + "%zuK NonProfiled %zuK Profiled %zuK = %zuK", + cache_size/K, non_nmethod.size/K, non_profiled.size/K, profiled.size/K, aligned_total/K); + // Adjust ReservedCodeCacheSize as necessary because it was not set explicitly + cache_size = aligned_total; + } + } else { + check_min_size("reserved code cache", cache_size, min_cache_size); + // ReservedCodeCacheSize was set explicitly, so treat it as a hard cap. + // If alignment causes the total to exceed the cap, shrink unset heaps + // in min_size steps, never below their minimum sizes. + // + // A total smaller than cache_size typically happens when all segment sizes + // are explicitly set. In that case there is nothing to adjust, so we + // only validate the sizes. + if (aligned_total > cache_size) { + size_t delta = (aligned_total - cache_size) / min_size; + while (delta > 0) { + size_t start_delta = delta; + // Do not shrink the non-nmethod heap here: running out of non-nmethod space + // is more critical and may lead to unrecoverable VM errors. + if (non_profiled.enabled && !non_profiled.set && non_profiled.size > min_size) { + non_profiled.size -= min_size; + if (--delta == 0) break; + } + if (profiled.enabled && !profiled.set && profiled.size > min_size) { + profiled.size -= min_size; + delta--; + } + if (delta == start_delta) { + break; + } + } + aligned_total = non_nmethod.size + profiled.size + non_profiled.size; + } } log_debug(codecache)("Initializing code heaps ReservedCodeCache %zuK NonNMethod %zuK" @@ -275,12 +318,9 @@ if (non_profiled.enabled) { // non_profiled.enabled is always ON for segmented code heap, leave it checked for clarity check_min_size("non-profiled code heap", non_profiled.size, min_size); } - if (cache_size_set) { - check_min_size("reserved code cache", cache_size, min_cache_size); - } // ReservedCodeCacheSize was set explicitly, so report an error and abort if it doesn't match the segment sizes - if (total != cache_size && cache_size_set) { + if (aligned_total != cache_size && cache_size_set) { err_msg message("NonNMethodCodeHeapSize (%zuK)", non_nmethod.size/K); if (profiled.enabled) { message.append(" + ProfiledCodeHeapSize (%zuK)", profiled.size/K); @@ -288,8 +328,8 @@ if (non_profiled.enabled) { message.append(" + NonProfiledCodeHeapSize (%zuK)", non_profiled.size/K); } - message.append(" = %zuK", total/K); - message.append((total > cache_size) ? " is greater than " : " is less than "); + message.append(" = %zuK", aligned_total/K); + message.append((aligned_total > cache_size) ? " is greater than " : " is less than "); message.append("ReservedCodeCacheSize (%zuK).", cache_size/K); vm_exit_during_initialization("Invalid code heap sizes", message); @@ -305,14 +345,6 @@ } } - // Note: if large page support is enabled, min_size is at least the large - // page size. This ensures that the code cache is covered by large pages. - non_profiled.size += non_nmethod.size & alignment_mask(min_size); - non_profiled.size += profiled.size & alignment_mask(min_size); - non_nmethod.size = align_down(non_nmethod.size, min_size); - profiled.size = align_down(profiled.size, min_size); - non_profiled.size = align_down(non_profiled.size, min_size); - FLAG_SET_ERGO(NonNMethodCodeHeapSize, non_nmethod.size); FLAG_SET_ERGO(ProfiledCodeHeapSize, profiled.size); FLAG_SET_ERGO(NonProfiledCodeHeapSize, non_profiled.size); @@ -1362,7 +1394,7 @@ while(iter.next()) { nmethod* nm = iter.method(); if (nm->is_marked_for_deoptimization() && !nm->has_been_deoptimized() && nm->can_be_deoptimized()) { - nm->make_not_entrant(nmethod::ChangeReason::marked_for_deoptimization); + nm->make_not_entrant(nmethod::InvalidationReason::MARKED_FOR_DEOPTIMIZATION); nm->make_deoptimized(); } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.cpp openjdk-25-25.0.3+9/src/hotspot/share/code/nmethod.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/code/nmethod.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1970,12 +1970,12 @@ } } -void nmethod::log_state_change(ChangeReason change_reason) const { +void nmethod::log_state_change(InvalidationReason invalidation_reason) const { if (LogCompilation) { if (xtty != nullptr) { ttyLocker ttyl; // keep the following output all in one block xtty->begin_elem("make_not_entrant thread='%zu' reason='%s'", - os::current_thread_id(), change_reason_to_string(change_reason)); + os::current_thread_id(), invalidation_reason_to_string(invalidation_reason)); log_identity(xtty); xtty->stamp(); xtty->end_elem(); @@ -1984,7 +1984,7 @@ ResourceMark rm; stringStream ss(NEW_RESOURCE_ARRAY(char, 256), 256); - ss.print("made not entrant: %s", change_reason_to_string(change_reason)); + ss.print("made not entrant: %s", invalidation_reason_to_string(invalidation_reason)); CompileTask::print_ul(this, ss.freeze()); if (PrintCompilation) { @@ -1999,7 +1999,7 @@ } // Invalidate code -bool nmethod::make_not_entrant(ChangeReason change_reason) { +bool nmethod::make_not_entrant(InvalidationReason invalidation_reason) { // This can be called while the system is already at a safepoint which is ok NoSafepointVerifier nsv; @@ -2057,7 +2057,7 @@ assert(success, "Transition can't fail"); // Log the transition once - log_state_change(change_reason); + log_state_change(invalidation_reason); // Remove nmethod from method. unlink_from_method(); @@ -2068,7 +2068,7 @@ // Invalidate can't occur while holding the NMethodState_lock JVMCINMethodData* nmethod_data = jvmci_nmethod_data(); if (nmethod_data != nullptr) { - nmethod_data->invalidate_nmethod_mirror(this); + nmethod_data->invalidate_nmethod_mirror(this, invalidation_reason); } #endif @@ -2106,7 +2106,9 @@ // Clear the link between this nmethod and a HotSpotNmethod mirror JVMCINMethodData* nmethod_data = jvmci_nmethod_data(); if (nmethod_data != nullptr) { - nmethod_data->invalidate_nmethod_mirror(this); + nmethod_data->invalidate_nmethod_mirror(this, is_cold() ? + nmethod::InvalidationReason::UNLOADING_COLD : + nmethod::InvalidationReason::UNLOADING); } #endif @@ -3999,6 +4001,46 @@ #endif } +void nmethod::print_code_snippet(outputStream* st, address addr) const { + if (entry_point() <= addr && addr < code_end()) { + // Pointing into the nmethod's code. Try to disassemble some instructions around addr. + // Determine conservative start and end points. + address start; + if (frame_complete_offset() != CodeOffsets::frame_never_safe && + addr >= code_begin() + frame_complete_offset()) { + start = code_begin() + frame_complete_offset(); + } else { + start = (addr < verified_entry_point()) ? entry_point() : verified_entry_point(); + } + address start_for_hex_dump = start; // We can choose a different starting point for hex dump, below. + address end = code_end(); + + // Try using relocations to find closer instruction start and end points. + // (Some platforms have variable length instructions and can only + // disassemble correctly at instruction start addresses.) + RelocIterator iter((nmethod*)this, start); + while (iter.next() && iter.addr() < addr) { // find relocation before addr + // Note: There's a relocation which doesn't point to an instruction start: + // ZBarrierRelocationFormatStoreGoodAfterMov with ZGC on x86_64 + // We could detect and skip it, but hex dump is still usable when + // disassembler produces garbage in such a very rare case. + start = iter.addr(); + // We want at least 64 Bytes ahead in hex dump. + if (iter.addr() <= (addr - 64)) start_for_hex_dump = iter.addr(); + } + if (iter.has_current()) { + if (iter.addr() == addr) iter.next(); // find relocation after addr + if (iter.has_current()) end = iter.addr(); + } + + // Always print hex. Disassembler may still have problems when hitting an incorrect instruction start. + os::print_hex_dump(st, start_for_hex_dump, end, 1, /* print_ascii=*/false); + if (!Disassembler::is_abstract()) { + Disassembler::decode(start, end, st); + } + } +} + #ifndef PRODUCT void nmethod::print_calls(outputStream* st) { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.hpp openjdk-25-25.0.3+9/src/hotspot/share/code/nmethod.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/code/nmethod.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -471,77 +471,74 @@ void oops_do_set_strong_done(nmethod* old_head); public: - enum class ChangeReason : u1 { - C1_codepatch, - C1_deoptimize, - C1_deoptimize_for_patching, - C1_predicate_failed_trap, - CI_replay, - JVMCI_invalidate_nmethod, - JVMCI_invalidate_nmethod_mirror, - JVMCI_materialize_virtual_object, - JVMCI_new_installation, - JVMCI_register_method, - JVMCI_replacing_with_new_code, - JVMCI_reprofile, - marked_for_deoptimization, - missing_exception_handler, - not_used, - OSR_invalidation_back_branch, - OSR_invalidation_for_compiling_with_C1, - OSR_invalidation_of_lower_level, - set_native_function, - uncommon_trap, - whitebox_deoptimization, - zombie, + // If you change anything in this enum please patch + // vmStructs_jvmci.cpp accordingly. + enum class InvalidationReason : s1 { + NOT_INVALIDATED = -1, + C1_CODEPATCH, + C1_DEOPTIMIZE, + C1_DEOPTIMIZE_FOR_PATCHING, + C1_PREDICATE_FAILED_TRAP, + CI_REPLAY, + UNLOADING, + UNLOADING_COLD, + JVMCI_INVALIDATE, + JVMCI_MATERIALIZE_VIRTUAL_OBJECT, + JVMCI_REPLACED_WITH_NEW_CODE, + JVMCI_REPROFILE, + MARKED_FOR_DEOPTIMIZATION, + MISSING_EXCEPTION_HANDLER, + NOT_USED, + OSR_INVALIDATION_BACK_BRANCH, + OSR_INVALIDATION_FOR_COMPILING_WITH_C1, + OSR_INVALIDATION_OF_LOWER_LEVEL, + SET_NATIVE_FUNCTION, + UNCOMMON_TRAP, + WHITEBOX_DEOPTIMIZATION, + ZOMBIE, + INVALIDATION_REASONS_COUNT }; - static const char* change_reason_to_string(ChangeReason change_reason) { - switch (change_reason) { - case ChangeReason::C1_codepatch: + static const char* invalidation_reason_to_string(InvalidationReason invalidation_reason) { + switch (invalidation_reason) { + case InvalidationReason::C1_CODEPATCH: return "C1 code patch"; - case ChangeReason::C1_deoptimize: + case InvalidationReason::C1_DEOPTIMIZE: return "C1 deoptimized"; - case ChangeReason::C1_deoptimize_for_patching: + case InvalidationReason::C1_DEOPTIMIZE_FOR_PATCHING: return "C1 deoptimize for patching"; - case ChangeReason::C1_predicate_failed_trap: + case InvalidationReason::C1_PREDICATE_FAILED_TRAP: return "C1 predicate failed trap"; - case ChangeReason::CI_replay: + case InvalidationReason::CI_REPLAY: return "CI replay"; - case ChangeReason::JVMCI_invalidate_nmethod: - return "JVMCI invalidate nmethod"; - case ChangeReason::JVMCI_invalidate_nmethod_mirror: - return "JVMCI invalidate nmethod mirror"; - case ChangeReason::JVMCI_materialize_virtual_object: + case InvalidationReason::JVMCI_INVALIDATE: + return "JVMCI invalidate"; + case InvalidationReason::JVMCI_MATERIALIZE_VIRTUAL_OBJECT: return "JVMCI materialize virtual object"; - case ChangeReason::JVMCI_new_installation: - return "JVMCI new installation"; - case ChangeReason::JVMCI_register_method: - return "JVMCI register method"; - case ChangeReason::JVMCI_replacing_with_new_code: - return "JVMCI replacing with new code"; - case ChangeReason::JVMCI_reprofile: + case InvalidationReason::JVMCI_REPLACED_WITH_NEW_CODE: + return "JVMCI replaced with new code"; + case InvalidationReason::JVMCI_REPROFILE: return "JVMCI reprofile"; - case ChangeReason::marked_for_deoptimization: + case InvalidationReason::MARKED_FOR_DEOPTIMIZATION: return "marked for deoptimization"; - case ChangeReason::missing_exception_handler: + case InvalidationReason::MISSING_EXCEPTION_HANDLER: return "missing exception handler"; - case ChangeReason::not_used: + case InvalidationReason::NOT_USED: return "not used"; - case ChangeReason::OSR_invalidation_back_branch: + case InvalidationReason::OSR_INVALIDATION_BACK_BRANCH: return "OSR invalidation back branch"; - case ChangeReason::OSR_invalidation_for_compiling_with_C1: + case InvalidationReason::OSR_INVALIDATION_FOR_COMPILING_WITH_C1: return "OSR invalidation for compiling with C1"; - case ChangeReason::OSR_invalidation_of_lower_level: + case InvalidationReason::OSR_INVALIDATION_OF_LOWER_LEVEL: return "OSR invalidation of lower level"; - case ChangeReason::set_native_function: + case InvalidationReason::SET_NATIVE_FUNCTION: return "set native function"; - case ChangeReason::uncommon_trap: + case InvalidationReason::UNCOMMON_TRAP: return "uncommon trap"; - case ChangeReason::whitebox_deoptimization: + case InvalidationReason::WHITEBOX_DEOPTIMIZATION: return "whitebox deoptimization"; - case ChangeReason::zombie: + case InvalidationReason::ZOMBIE: return "zombie"; default: { assert(false, "Unhandled reason"); @@ -712,8 +709,8 @@ // alive. It is used when an uncommon trap happens. Returns true // if this thread changed the state of the nmethod or false if // another thread performed the transition. - bool make_not_entrant(ChangeReason change_reason); - bool make_not_used() { return make_not_entrant(ChangeReason::not_used); } + bool make_not_entrant(InvalidationReason invalidation_reason); + bool make_not_used() { return make_not_entrant(InvalidationReason::NOT_USED); } bool is_marked_for_deoptimization() const { return deoptimization_status() != not_marked; } bool has_been_deoptimized() const { return deoptimization_status() == deoptimize_done; } @@ -996,6 +993,7 @@ void print_on_impl(outputStream* st) const; void print_code(); void print_value_on_impl(outputStream* st) const; + void print_code_snippet(outputStream* st, address addr) const; #if defined(SUPPORT_DATA_STRUCTS) // print output in opt build for disassembler library @@ -1026,7 +1024,7 @@ // Logging void log_identity(xmlStream* log) const; void log_new_nmethod() const; - void log_state_change(ChangeReason change_reason) const; + void log_state_change(InvalidationReason invalidation_reason) const; // Prints block-level comments, including nmethod specific block labels: void print_nmethod_labels(outputStream* stream, address block_begin, bool print_section_labels=true) const; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.cpp openjdk-25-25.0.3+9/src/hotspot/share/compiler/compilationPolicy.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/compiler/compilationPolicy.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -931,7 +931,7 @@ nmethod* osr_nm = mh->lookup_osr_nmethod_for(bci, CompLevel_simple, false); if (osr_nm != nullptr && osr_nm->comp_level() > CompLevel_simple) { // Invalidate the existing OSR nmethod so that a compile at CompLevel_simple is permitted. - osr_nm->make_not_entrant(nmethod::ChangeReason::OSR_invalidation_for_compiling_with_C1); + osr_nm->make_not_entrant(nmethod::InvalidationReason::OSR_INVALIDATION_FOR_COMPILING_WITH_C1); } compile(mh, bci, CompLevel_simple, THREAD); } @@ -1529,7 +1529,7 @@ int osr_bci = nm->is_osr_method() ? nm->osr_entry_bci() : InvocationEntryBci; print_event(MAKE_NOT_ENTRANT, mh(), mh(), osr_bci, level); } - nm->make_not_entrant(nmethod::ChangeReason::OSR_invalidation_back_branch); + nm->make_not_entrant(nmethod::InvalidationReason::OSR_INVALIDATION_BACK_BRANCH); } } // Fix up next_level if necessary to avoid deopts diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1CollectedHeap.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -28,6 +28,7 @@ #include "code/codeCache.hpp" #include "compiler/oopMap.hpp" #include "gc/g1/g1Allocator.inline.hpp" +#include "gc/g1/g1Analytics.hpp" #include "gc/g1/g1Arguments.hpp" #include "gc/g1/g1BarrierSet.hpp" #include "gc/g1/g1BatchedTask.hpp" @@ -387,22 +388,26 @@ assert_heap_not_locked_and_not_at_safepoint(); assert(!is_humongous(requested_size), "we do not allow humongous TLABs"); - return attempt_allocation(min_size, requested_size, actual_size); + // Do not allow a GC because we are allocating a new TLAB to avoid an issue + // with UseGCOverheadLimit: although this GC would return null if the overhead + // limit would be exceeded, but it would likely free at least some space. + // So the subsequent outside-TLAB allocation could be successful anyway and + // the indication that the overhead limit had been exceeded swallowed. + return attempt_allocation(min_size, requested_size, actual_size, false /* allow_gc */); } -HeapWord* -G1CollectedHeap::mem_allocate(size_t word_size, - bool* gc_overhead_limit_was_exceeded) { +HeapWord* G1CollectedHeap::mem_allocate(size_t word_size, + bool* gc_overhead_limit_was_exceeded) { assert_heap_not_locked_and_not_at_safepoint(); if (is_humongous(word_size)) { return attempt_allocation_humongous(word_size); } size_t dummy = 0; - return attempt_allocation(word_size, word_size, &dummy); + return attempt_allocation(word_size, word_size, &dummy, true /* allow_gc */); } -HeapWord* G1CollectedHeap::attempt_allocation_slow(uint node_index, size_t word_size) { +HeapWord* G1CollectedHeap::attempt_allocation_slow(uint node_index, size_t word_size, bool allow_gc) { ResourceMark rm; // For retrieving the thread names in log messages. // Make sure you read the note in attempt_allocation_humongous(). @@ -429,6 +434,8 @@ result = _allocator->attempt_allocation_locked(node_index, word_size); if (result != nullptr) { return result; + } else if (!allow_gc) { + return nullptr; } // Read the GC count while still holding the Heap_lock. @@ -446,8 +453,15 @@ log_trace(gc, alloc)("%s: Unsuccessfully scheduled collection allocating %zu words", Thread::current()->name(), word_size); + // Has the gc overhead limit been reached in the meantime? If so, this mutator + // should receive null even when unsuccessfully scheduling a collection as well + // for global consistency. + if (gc_overhead_limit_exceeded()) { + return nullptr; + } + // We can reach here if we were unsuccessful in scheduling a collection (because - // another thread beat us to it). In this case immeditealy retry the allocation + // another thread beat us to it). In this case immediately retry the allocation // attempt because another thread successfully performed a collection and possibly // reclaimed enough space. The first attempt (without holding the Heap_lock) is // here and the follow-on attempt will be at the start of the next loop @@ -592,7 +606,8 @@ inline HeapWord* G1CollectedHeap::attempt_allocation(size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size) { + size_t* actual_word_size, + bool allow_gc) { assert_heap_not_locked_and_not_at_safepoint(); assert(!is_humongous(desired_word_size), "attempt_allocation() should not " "be called for humongous allocation requests"); @@ -604,7 +619,7 @@ if (result == nullptr) { *actual_word_size = desired_word_size; - result = attempt_allocation_slow(node_index, desired_word_size); + result = attempt_allocation_slow(node_index, desired_word_size, allow_gc); } assert_heap_not_locked(); @@ -688,6 +703,13 @@ log_trace(gc, alloc)("%s: Unsuccessfully scheduled collection allocating %zu", Thread::current()->name(), word_size); + // Has the gc overhead limit been reached in the meantime? If so, this mutator + // should receive null even when unsuccessfully scheduling a collection as well + // for global consistency. + if (gc_overhead_limit_exceeded()) { + return nullptr; + } + // We can reach here if we were unsuccessful in scheduling a collection (because // another thread beat us to it). // Humongous object allocation always needs a lock, so we wait for the retry @@ -890,25 +912,62 @@ } } +void G1CollectedHeap::update_gc_overhead_counter() { + assert(SafepointSynchronize::is_at_safepoint(), "precondition"); + + if (!UseGCOverheadLimit) { + return; + } + + bool gc_time_over_limit = (_policy->analytics()->long_term_pause_time_ratio() * 100) >= GCTimeLimit; + double free_space_percent = percent_of(num_available_regions() * G1HeapRegion::GrainBytes, max_capacity()); + bool free_space_below_limit = free_space_percent < GCHeapFreeLimit; + + log_debug(gc)("GC Overhead Limit: GC Time %f Free Space %f Counter %zu", + (_policy->analytics()->long_term_pause_time_ratio() * 100), + free_space_percent, + _gc_overhead_counter); + + if (gc_time_over_limit && free_space_below_limit) { + _gc_overhead_counter++; + } else { + _gc_overhead_counter = 0; + } +} + +bool G1CollectedHeap::gc_overhead_limit_exceeded() { + return _gc_overhead_counter >= GCOverheadLimitThreshold; +} + HeapWord* G1CollectedHeap::satisfy_failed_allocation_helper(size_t word_size, bool do_gc, bool maximal_compaction, bool expect_null_mutator_alloc_region) { - // Let's attempt the allocation first. - HeapWord* result = - attempt_allocation_at_safepoint(word_size, - expect_null_mutator_alloc_region); - if (result != nullptr) { - return result; - } + // Skip allocation if GC overhead limit has been exceeded to let the mutator run + // into an OOME. It can either exit "gracefully" or try to free up memory asap. + // For the latter situation, keep running GCs. If the mutator frees up enough + // memory quickly enough, the overhead(s) will go below the threshold(s) again + // and the VM may continue running. + // If we did not continue garbage collections, the (gc overhead) limit may decrease + // enough by itself to not count as exceeding the limit any more, in the worst + // case bouncing back-and-forth all the time. + if (!gc_overhead_limit_exceeded()) { + // Let's attempt the allocation first. + HeapWord* result = + attempt_allocation_at_safepoint(word_size, + expect_null_mutator_alloc_region); + if (result != nullptr) { + return result; + } - // In a G1 heap, we're supposed to keep allocation from failing by - // incremental pauses. Therefore, at least for now, we'll favor - // expansion over collection. (This might change in the future if we can - // do something smarter than full collection to satisfy a failed alloc.) - result = expand_and_allocate(word_size); - if (result != nullptr) { - return result; + // In a G1 heap, we're supposed to keep allocation from failing by + // incremental pauses. Therefore, at least for now, we'll favor + // expansion over collection. (This might change in the future if we can + // do something smarter than full collection to satisfy a failed alloc.) + result = expand_and_allocate(word_size); + if (result != nullptr) { + return result; + } } if (do_gc) { @@ -932,6 +991,10 @@ HeapWord* G1CollectedHeap::satisfy_failed_allocation(size_t word_size) { assert_at_safepoint_on_vm_thread(); + // Update GC overhead limits after the initial garbage collection leading to this + // allocation attempt. + update_gc_overhead_counter(); + // Attempts to allocate followed by Full GC. HeapWord* result = satisfy_failed_allocation_helper(word_size, @@ -966,6 +1029,10 @@ assert(!soft_ref_policy()->should_clear_all_soft_refs(), "Flag should have been handled and cleared prior to this point"); + if (gc_overhead_limit_exceeded()) { + log_info(gc)("GC Overhead Limit exceeded too often (%zu).", GCOverheadLimitThreshold); + } + // What else? We might try synchronous finalization later. If the total // space available is large enough for the allocation, then a more // complete compaction phase than we've tried so far might be @@ -1131,6 +1198,7 @@ G1CollectedHeap::G1CollectedHeap() : CollectedHeap(), + _gc_overhead_counter(0), _service_thread(nullptr), _periodic_gc_task(nullptr), _free_arena_memory_task(nullptr), diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1CollectedHeap.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -169,6 +169,17 @@ friend class G1CheckRegionAttrTableClosure; private: + // GC Overhead Limit functionality related members. + // + // The goal is to return null for allocations prematurely (before really going + // OOME) in case both GC CPU usage (>= GCTimeLimit) and not much available free + // memory (<= GCHeapFreeLimit) so that applications can exit gracefully or try + // to keep running by easing off memory. + uintx _gc_overhead_counter; // The number of consecutive garbage collections we were over the limits. + + void update_gc_overhead_counter(); + bool gc_overhead_limit_exceeded(); + G1ServiceThread* _service_thread; G1ServiceTask* _periodic_gc_task; G1MonotonicArenaFreeMemoryTask* _free_arena_memory_task; @@ -425,18 +436,14 @@ // // * If either call cannot satisfy the allocation request using the // current allocating region, they will try to get a new one. If - // this fails, they will attempt to do an evacuation pause and - // retry the allocation. - // - // * If all allocation attempts fail, even after trying to schedule - // an evacuation pause, allocate_new_tlab() will return null, - // whereas mem_allocate() will attempt a heap expansion and/or - // schedule a Full GC. + // this fails, (only) mem_allocate() will attempt to do an evacuation + // pause and retry the allocation. Allocate_new_tlab() will return null, + // deferring to the following mem_allocate(). // // * We do not allow humongous-sized TLABs. So, allocate_new_tlab // should never be called with word_size being humongous. All // humongous allocation requests should go to mem_allocate() which - // will satisfy them with a special path. + // will satisfy them in a special path. HeapWord* allocate_new_tlab(size_t min_size, size_t requested_size, @@ -450,12 +457,13 @@ // should only be used for non-humongous allocations. inline HeapWord* attempt_allocation(size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size); - + size_t* actual_word_size, + bool allow_gc); // Second-level mutator allocation attempt: take the Heap_lock and // retry the allocation attempt, potentially scheduling a GC - // pause. This should only be used for non-humongous allocations. - HeapWord* attempt_allocation_slow(uint node_index, size_t word_size); + // pause if allow_gc is set. This should only be used for non-humongous + // allocations. + HeapWord* attempt_allocation_slow(uint node_index, size_t word_size, bool allow_gc); // Takes the Heap_lock and attempts a humongous allocation. It can // potentially schedule a GC pause. diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -226,7 +226,7 @@ void G1CollectedHeap::register_old_region_with_region_attr(G1HeapRegion* r) { assert(r->rem_set()->is_complete(), "must be"); - _region_attr.set_in_old(r->hrm_index(), true); + _region_attr.set_in_old(r->hrm_index(), true /* is_remset_tracked */, r->has_pinned_objects()); _rem_set->exclude_region_from_scan(r->hrm_index()); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -570,8 +570,8 @@ accounted_ms += print_evacuate_optional_collection_set(); accounted_ms += print_post_evacuate_collection_set(evacuation_failed); - assert(_gc_pause_time_ms >= accounted_ms, "GC pause time(%.3lfms) cannot be " - "smaller than the sum of each phase(%.3lfms).", _gc_pause_time_ms, accounted_ms); + assert(_gc_pause_time_ms >= accounted_ms, "GC pause time(%.15lf ms) cannot be " + "smaller than the sum of each phase(%.15lf ms).", _gc_pause_time_ms, accounted_ms); print_other(accounted_ms); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -170,11 +170,9 @@ set_by_index(index, G1HeapRegionAttr(G1HeapRegionAttr::Young, true, is_pinned)); } - void set_in_old(uintptr_t index, bool remset_is_tracked) { + void set_in_old(uintptr_t index, bool remset_is_tracked, bool region_is_pinned) { assert(get_by_index(index).is_default(), "Region attributes at index " INTPTR_FORMAT " should be default but is %s", index, get_by_index(index).get_type_str()); - // We do not select regions with pinned objects into the collection set. - const bool region_is_pinned = false; set_by_index(index, G1HeapRegionAttr(G1HeapRegionAttr::Old, remset_is_tracked, region_is_pinned)); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/collectedHeap.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shared/collectedHeap.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/collectedHeap.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shared/collectedHeap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -67,7 +67,7 @@ size_t CollectedHeap::_filler_array_max_size = 0; size_t CollectedHeap::_stack_chunk_max_size = 0; -class GCLogMessage : public FormatBuffer<512> {}; +class GCLogMessage : public FormatBuffer<1024> {}; template <> void EventLogBase<GCLogMessage>::print(outputStream* st, GCLogMessage& m) { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/gc_globals.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shared/gc_globals.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/gc_globals.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shared/gc_globals.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -414,7 +414,7 @@ "Initial ratio of young generation/survivor space size") \ range(3, max_uintx) \ \ - product(bool, UseGCOverheadLimit, true, \ + product(bool, UseGCOverheadLimit, falseInDebug, \ "Use policy to limit of proportion of time spent in GC " \ "before an OutOfMemory error is thrown") \ \ diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/stringdedup/stringDedupStat.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shared/stringdedup/stringDedupStat.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/stringdedup/stringDedupStat.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shared/stringdedup/stringDedupStat.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -100,13 +100,17 @@ log_info(stringdedup)( "Concurrent String Deduplication " - "%zu/" STRDEDUP_BYTES_FORMAT_NS " (new), " + "%zu (inspected), " + "%zu/" STRDEDUP_BYTES_FORMAT_NS " (new unknown), " "%zu/" STRDEDUP_BYTES_FORMAT_NS " (deduped), " - "avg " STRDEDUP_PERCENT_FORMAT_NS ", " + "total avg deduped/new unknown bytes " STRDEDUP_PERCENT_FORMAT_NS ", " + STRDEDUP_BYTES_FORMAT_NS " (total deduped)," STRDEDUP_BYTES_FORMAT_NS " (total new unknown), " STRDEDUP_ELAPSED_FORMAT_MS " of " STRDEDUP_ELAPSED_FORMAT_MS, + last_stat->_inspected, last_stat->_new, STRDEDUP_BYTES_PARAM(last_stat->_new_bytes), last_stat->_deduped, STRDEDUP_BYTES_PARAM(last_stat->_deduped_bytes), total_deduped_bytes_percent, + STRDEDUP_BYTES_PARAM(total_stat->_deduped_bytes), STRDEDUP_BYTES_PARAM(total_stat->_new_bytes), strdedup_elapsed_param_ms(last_stat->_process_elapsed), strdedup_elapsed_param_ms(last_stat->_active_elapsed)); } @@ -217,14 +221,14 @@ double replaced_percent = percent_of(_replaced, _new); double deleted_percent = percent_of(_deleted, _new); log_times(total ? "Total" : "Last"); - log_debug(stringdedup)(" Inspected: %12zu", _inspected); - log_debug(stringdedup)(" Known: %12zu(%5.1f%%)", _known, known_percent); - log_debug(stringdedup)(" Shared: %12zu(%5.1f%%)", _known_shared, known_shared_percent); - log_debug(stringdedup)(" New: %12zu(%5.1f%%)" STRDEDUP_BYTES_FORMAT, + log_debug(stringdedup)(" Inspected: %12zu", _inspected); + log_debug(stringdedup)(" Known: %12zu(%5.1f%%)", _known, known_percent); + log_debug(stringdedup)(" Shared: %12zu(%5.1f%%)", _known_shared, known_shared_percent); + log_debug(stringdedup)(" New unknown: %12zu(%5.1f%%)" STRDEDUP_BYTES_FORMAT, _new, new_percent, STRDEDUP_BYTES_PARAM(_new_bytes)); - log_debug(stringdedup)(" Replaced: %12zu(%5.1f%%)", _replaced, replaced_percent); - log_debug(stringdedup)(" Deleted: %12zu(%5.1f%%)", _deleted, deleted_percent); - log_debug(stringdedup)(" Deduplicated: %12zu(%5.1f%%)" STRDEDUP_BYTES_FORMAT "(%5.1f%%)", + log_debug(stringdedup)(" Replaced: %12zu(%5.1f%%)", _replaced, replaced_percent); + log_debug(stringdedup)(" Deleted: %12zu(%5.1f%%)", _deleted, deleted_percent); + log_debug(stringdedup)(" Deduplicated: %12zu(%5.1f%%)" STRDEDUP_BYTES_FORMAT "(%5.1f%%)", _deduped, deduped_percent, STRDEDUP_BYTES_PARAM(_deduped_bytes), deduped_bytes_percent); log_debug(stringdedup)(" Skipped: %zu (dead), %zu (incomplete), %zu (shared)", _skipped_dead, _skipped_incomplete, _skipped_shared); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -91,7 +91,7 @@ // we hit max_cset. When max_cset is hit, we terminate the cset selection. Note that in this scheme, // ShenandoahGarbageThreshold is the soft threshold which would be ignored until min_garbage is hit. - size_t capacity = _space_info->soft_max_capacity(); + size_t capacity = ShenandoahHeap::heap()->soft_max_capacity(); size_t max_cset = (size_t)((1.0 * capacity / 100 * ShenandoahEvacReserve) / ShenandoahEvacWaste); size_t free_target = (capacity / 100 * ShenandoahMinFreeThreshold) + max_cset; size_t min_garbage = (free_target > actual_free ? (free_target - actual_free) : 0); @@ -233,7 +233,7 @@ // in operation mode. We want some way to decide that the average rate has changed, while keeping average // allocation rate computation independent. bool ShenandoahAdaptiveHeuristics::should_start_gc() { - size_t capacity = _space_info->soft_max_capacity(); + size_t capacity = ShenandoahHeap::heap()->soft_max_capacity(); size_t available = _space_info->soft_available(); size_t allocated = _space_info->bytes_allocated_since_gc_start(); @@ -349,10 +349,7 @@ } size_t ShenandoahAdaptiveHeuristics::min_free_threshold() { - // Note that soft_max_capacity() / 100 * min_free_threshold is smaller than max_capacity() / 100 * min_free_threshold. - // We want to behave conservatively here, so use max_capacity(). By returning a larger value, we cause the GC to - // trigger when the remaining amount of free shrinks below the larger threshold. - return _space_info->max_capacity() / 100 * ShenandoahMinFreeThreshold; + return ShenandoahHeap::heap()->soft_max_capacity() / 100 * ShenandoahMinFreeThreshold; } ShenandoahAllocationRate::ShenandoahAllocationRate() : diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -47,7 +47,7 @@ bool ShenandoahCompactHeuristics::should_start_gc() { size_t max_capacity = _space_info->max_capacity(); - size_t capacity = _space_info->soft_max_capacity(); + size_t capacity = ShenandoahHeap::heap()->soft_max_capacity(); size_t available = _space_info->available(); // Make sure the code below treats available without the soft tail. diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -53,7 +53,7 @@ size_t cur_young_garbage) const { auto heap = ShenandoahGenerationalHeap::heap(); size_t region_size_bytes = ShenandoahHeapRegion::region_size_bytes(); - size_t capacity = heap->young_generation()->max_capacity(); + size_t capacity = heap->soft_max_capacity(); size_t garbage_threshold = region_size_bytes * ShenandoahGarbageThreshold / 100; size_t ignore_threshold = region_size_bytes * ShenandoahIgnoreGarbageThreshold / 100; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahSpaceInfo.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -37,7 +37,6 @@ class ShenandoahSpaceInfo { public: virtual const char* name() const = 0; - virtual size_t soft_max_capacity() const = 0; virtual size_t max_capacity() const = 0; virtual size_t soft_available() const = 0; virtual size_t available() const = 0; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -42,7 +42,7 @@ bool ShenandoahStaticHeuristics::should_start_gc() { size_t max_capacity = _space_info->max_capacity(); - size_t capacity = _space_info->soft_max_capacity(); + size_t capacity = ShenandoahHeap::heap()->soft_max_capacity(); size_t available = _space_info->available(); // Make sure the code below treats available without the soft tail. diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -193,6 +193,13 @@ err_msg("GCCardSizeInBytes ( %u ) must be >= %u\n", GCCardSizeInBytes, (unsigned int) ShenandoahMinCardSizeInBytes)); } + // Gen shen does not support any ShenandoahGCHeuristics value except for the default "adaptive" + if ((strcmp(ShenandoahGCMode, "generational") == 0) + && strcmp(ShenandoahGCHeuristics, "adaptive") != 0) { + log_warning(gc)("Ignoring -XX:ShenandoahGCHeuristics input: %s, because generational shenandoah only" + " supports adaptive heuristics", ShenandoahGCHeuristics); + } + FullGCForwarding::initialize_flags(MaxHeapSize); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahAsserts.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -64,7 +64,9 @@ ShenandoahMarkingContext* const ctx = heap->marking_context(); - msg.append(" " PTR_FORMAT " - klass " PTR_FORMAT " %s\n", p2i(obj), p2i(obj->klass()), obj->klass()->external_name()); + Klass* obj_klass = ShenandoahForwarding::klass(obj); + + msg.append(" " PTR_FORMAT " - klass " PTR_FORMAT " %s\n", p2i(obj), p2i(obj_klass), obj_klass->external_name()); msg.append(" %3s allocated after mark start\n", ctx->allocated_after_mark_start(obj) ? "" : "not"); msg.append(" %3s after update watermark\n", cast_from_oop<HeapWord*>(obj) >= r->get_update_watermark() ? "" : "not"); msg.append(" %3s marked strong\n", ctx->is_marked_strong(obj) ? "" : "not"); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -182,7 +182,7 @@ // byte size in proper unit and proper unit for byte size are consistent. const size_t v_used = used(); const size_t v_used_regions = used_regions_size(); - const size_t v_soft_max_capacity = soft_max_capacity(); + const size_t v_soft_max_capacity = ShenandoahHeap::heap()->soft_max_capacity(); const size_t v_max_capacity = max_capacity(); const size_t v_available = available(); const size_t v_humongous_waste = get_humongous_waste(); @@ -797,14 +797,13 @@ ShenandoahGeneration::ShenandoahGeneration(ShenandoahGenerationType type, uint max_workers, - size_t max_capacity, - size_t soft_max_capacity) : + size_t max_capacity) : _type(type), _task_queues(new ShenandoahObjToScanQueueSet(max_workers)), _ref_processor(new ShenandoahReferenceProcessor(MAX2(max_workers, 1U))), _affiliated_region_count(0), _humongous_waste(0), _evacuation_reserve(0), _used(0), _bytes_allocated_since_gc_start(0), - _max_capacity(max_capacity), _soft_max_capacity(soft_max_capacity), + _max_capacity(max_capacity), _heuristics(nullptr) { _is_marking_complete.set(); @@ -950,7 +949,7 @@ } size_t ShenandoahGeneration::soft_available() const { - return available(soft_max_capacity()); + return available(ShenandoahHeap::heap()->soft_max_capacity()); } size_t ShenandoahGeneration::available(size_t capacity) const { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGeneration.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGeneration.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -71,7 +71,6 @@ volatile size_t _used; volatile size_t _bytes_allocated_since_gc_start; size_t _max_capacity; - size_t _soft_max_capacity; ShenandoahHeuristics* _heuristics; @@ -105,8 +104,7 @@ public: ShenandoahGeneration(ShenandoahGenerationType type, uint max_workers, - size_t max_capacity, - size_t soft_max_capacity); + size_t max_capacity); ~ShenandoahGeneration(); bool is_young() const { return _type == YOUNG; } @@ -126,7 +124,6 @@ virtual ShenandoahHeuristics* initialize_heuristics(ShenandoahMode* gc_mode); - size_t soft_max_capacity() const override { return _soft_max_capacity; } size_t max_capacity() const override { return _max_capacity; } virtual size_t used_regions() const; virtual size_t used_regions_size() const; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -53,21 +53,6 @@ ShenandoahGenerationalInitLogger logger; logger.print_all(); } - - void print_heap() override { - ShenandoahInitLogger::print_heap(); - - ShenandoahGenerationalHeap* heap = ShenandoahGenerationalHeap::heap(); - - ShenandoahYoungGeneration* young = heap->young_generation(); - log_info(gc, init)("Young Generation Soft Size: " EXACTFMT, EXACTFMTARGS(young->soft_max_capacity())); - log_info(gc, init)("Young Generation Max: " EXACTFMT, EXACTFMTARGS(young->max_capacity())); - - ShenandoahOldGeneration* old = heap->old_generation(); - log_info(gc, init)("Old Generation Soft Size: " EXACTFMT, EXACTFMTARGS(old->soft_max_capacity())); - log_info(gc, init)("Old Generation Max: " EXACTFMT, EXACTFMTARGS(old->max_capacity())); - } - protected: void print_gc_specific() override { ShenandoahInitLogger::print_gc_specific(); @@ -141,8 +126,8 @@ size_t initial_capacity_old = max_capacity() - max_capacity_young; size_t max_capacity_old = max_capacity() - initial_capacity_young; - _young_generation = new ShenandoahYoungGeneration(max_workers(), max_capacity_young, initial_capacity_young); - _old_generation = new ShenandoahOldGeneration(max_workers(), max_capacity_old, initial_capacity_old); + _young_generation = new ShenandoahYoungGeneration(max_workers(), max_capacity_young); + _old_generation = new ShenandoahOldGeneration(max_workers(), max_capacity_old); _young_generation->initialize_heuristics(mode()); _old_generation->initialize_heuristics(mode()); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -50,10 +50,6 @@ return ShenandoahHeap::heap()->capacity(); } -size_t ShenandoahGlobalGeneration::soft_max_capacity() const { - return ShenandoahHeap::heap()->soft_max_capacity(); -} - size_t ShenandoahGlobalGeneration::available() const { // The collector reserve may eat into what the mutator is allowed to use. Make sure we are looking // at what is available to the mutator when reporting how much memory is available. @@ -65,8 +61,8 @@ size_t available = this->available(); // Make sure the code below treats available without the soft tail. - assert(max_capacity() >= soft_max_capacity(), "Max capacity must be greater than soft max capacity."); - size_t soft_tail = max_capacity() - soft_max_capacity(); + assert(max_capacity() >= ShenandoahHeap::heap()->soft_max_capacity(), "Max capacity must be greater than soft max capacity."); + size_t soft_tail = max_capacity() - ShenandoahHeap::heap()->soft_max_capacity(); return (available > soft_tail) ? (available - soft_tail) : 0; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -32,14 +32,13 @@ // A "generation" that represents the whole heap. class ShenandoahGlobalGeneration : public ShenandoahGeneration { public: - ShenandoahGlobalGeneration(bool generational, uint max_queues, size_t max_capacity, size_t soft_max_capacity) - : ShenandoahGeneration(generational ? GLOBAL : NON_GEN, max_queues, max_capacity, soft_max_capacity) { } + ShenandoahGlobalGeneration(bool generational, uint max_queues, size_t max_capacity) + : ShenandoahGeneration(generational ? GLOBAL : NON_GEN, max_queues, max_capacity) { } public: const char* name() const override; size_t max_capacity() const override; - size_t soft_max_capacity() const override; size_t used_regions() const override; size_t used_regions_size() const override; size_t available() const override; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -32,6 +32,7 @@ #include "gc/shared/gcArguments.hpp" #include "gc/shared/gcTimer.hpp" #include "gc/shared/gcTraceTime.inline.hpp" +#include "gc/shared/gc_globals.hpp" #include "gc/shared/locationPrinter.inline.hpp" #include "gc/shared/memAllocator.hpp" #include "gc/shared/plab.hpp" @@ -201,8 +202,7 @@ assert(num_min_regions <= _num_regions, "sanity"); _minimum_size = num_min_regions * reg_size_bytes; - // Default to max heap size. - _soft_max_size = _num_regions * reg_size_bytes; + _soft_max_size = SoftMaxHeapSize; _committed = _initial_size; @@ -524,7 +524,7 @@ } void ShenandoahHeap::initialize_heuristics() { - _global_generation = new ShenandoahGlobalGeneration(mode()->is_generational(), max_workers(), max_capacity(), max_capacity()); + _global_generation = new ShenandoahGlobalGeneration(mode()->is_generational(), max_workers(), max_capacity()); _global_generation->initialize_heuristics(mode()); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -293,6 +293,7 @@ public: inline HeapWord* base() const { return _heap_region.start(); } + inline HeapWord* end() const { return _heap_region.end(); } inline size_t num_regions() const { return _num_regions; } inline bool is_heap_region_special() { return _heap_region_special; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahInitLogger.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahInitLogger.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahInitLogger.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahInitLogger.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -43,6 +43,7 @@ log_info(gc, init)("Heap Region Count: %zu", ShenandoahHeapRegion::region_count()); log_info(gc, init)("Heap Region Size: " EXACTFMT, EXACTFMTARGS(ShenandoahHeapRegion::region_size_bytes())); log_info(gc, init)("TLAB Size Max: " EXACTFMT, EXACTFMTARGS(ShenandoahHeapRegion::max_tlab_size_bytes())); + log_info(gc, init)("Soft Max Heap Size: " EXACTFMT, EXACTFMTARGS(ShenandoahHeap::heap()->soft_max_capacity())); } void ShenandoahInitLogger::print_gc_specific() { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -57,6 +57,26 @@ return (result == end); } +HeapWord* ShenandoahMarkBitMap::get_prev_marked_addr(const HeapWord* limit, + const HeapWord* addr) const { +#ifdef ASSERT + ShenandoahHeap* heap = ShenandoahHeap::heap(); + ShenandoahHeapRegion* r = heap->heap_region_containing(addr); + ShenandoahMarkingContext* ctx = heap->marking_context(); + HeapWord* tams = ctx->top_at_mark_start(r); + assert(limit != nullptr, "limit must not be null"); + assert(limit >= r->bottom(), "limit must be more than bottom"); + assert(addr <= tams, "addr must be less than TAMS"); +#endif + + // Round addr down to a possible object boundary to be safe. + size_t const addr_offset = address_to_index(align_down(addr, HeapWordSize << LogMinObjAlignment)); + size_t const limit_offset = address_to_index(limit); + size_t const last_offset = get_prev_one_offset(limit_offset, addr_offset); + + // cast required to remove const-ness of the value pointed to. We won't modify that object, but my caller might. + return (last_offset > addr_offset)? (HeapWord*) addr + 1: index_to_address(last_offset); +} HeapWord* ShenandoahMarkBitMap::get_next_marked_addr(const HeapWord* addr, const HeapWord* limit) const { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -119,9 +119,21 @@ template<bm_word_t flip, bool aligned_right> inline idx_t get_next_bit_impl(idx_t l_index, idx_t r_index) const; - inline idx_t get_next_one_offset (idx_t l_index, idx_t r_index) const; + // Helper for get_prev_{zero,one}_bit variants. + // - flip designates whether searching for 1s or 0s. Must be one of + // find_{zeros,ones}_flip. + // - aligned_left is true if l_index is a priori on a bm_word_t boundary. + template<bm_word_t flip, bool aligned_left> + inline idx_t get_prev_bit_impl(idx_t l_index, idx_t r_index) const; - void clear_large_range (idx_t beg, idx_t end); + // Search for the first marked address in the range [l_index, r_index), or r_index if none found. + inline idx_t get_next_one_offset(idx_t l_index, idx_t r_index) const; + + // Search for last one in the range [l_index, r_index). Return r_index if not found. + inline idx_t get_prev_one_offset(idx_t l_index, idx_t r_index) const; + + // Clear the strong and weak mark bits for all index positions >= l_index and < r_index. + void clear_large_range(idx_t beg, idx_t end); // Verify bit is less than size(). void verify_index(idx_t bit) const NOT_DEBUG_RETURN; @@ -162,12 +174,14 @@ bool is_bitmap_clear_range(const HeapWord* start, const HeapWord* end) const; - // Return the address corresponding to the next marked bit at or after - // "addr", and before "limit", if "limit" is non-null. If there is no - // such bit, returns "limit" if that is non-null, or else "endWord()". + // Return the first marked address in the range [addr, limit), or limit if none found. HeapWord* get_next_marked_addr(const HeapWord* addr, const HeapWord* limit) const; + // Return the last marked address in the range [limit, addr], or addr+1 if none found. + HeapWord* get_prev_marked_addr(const HeapWord* limit, + const HeapWord* addr) const; + bm_word_t inverted_bit_mask_for_range(idx_t beg, idx_t end) const; void clear_range_within_word (idx_t beg, idx_t end); void clear_range (idx_t beg, idx_t end); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.inline.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.inline.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.inline.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.inline.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -29,6 +29,7 @@ #include "gc/shenandoah/shenandoahMarkBitMap.hpp" #include "runtime/atomic.hpp" +#include "utilities/count_leading_zeros.hpp" #include "utilities/count_trailing_zeros.hpp" inline size_t ShenandoahMarkBitMap::address_to_index(const HeapWord* addr) const { @@ -171,10 +172,99 @@ return r_index; } +template<ShenandoahMarkBitMap::bm_word_t flip, bool aligned_left> +inline ShenandoahMarkBitMap::idx_t ShenandoahMarkBitMap::get_prev_bit_impl(idx_t l_index, idx_t r_index) const { + STATIC_ASSERT(flip == find_ones_flip || flip == find_zeros_flip); + verify_range(l_index, r_index); + assert(!aligned_left || is_aligned(l_index, BitsPerWord), "l_index not aligned"); + + // The first word often contains an interesting bit, either due to + // density or because of features of the calling algorithm. So it's + // important to examine that first word with a minimum of fuss, + // minimizing setup time for later words that will be wasted if the + // first word is indeed interesting. + + // The benefit from aligned_left being true is relatively small. + // It saves an operation in the setup for the word search loop. + // It also eliminates the range check on the final result. + // However, callers often have a comparison with l_index, and + // inlining often allows the two comparisons to be combined; it is + // important when !aligned_left that return paths either return + // l_index or a value dominating a comparison with l_index. + // aligned_left is still helpful when the caller doesn't have a + // range check because features of the calling algorithm guarantee + // an interesting bit will be present. + + if (l_index < r_index) { + // Get the word containing r_index, and shift out the high-order bits (representing objects that come after r_index) + idx_t index = to_words_align_down(r_index); + assert(BitsPerWord - 2 >= bit_in_word(r_index), "sanity"); + size_t shift = BitsPerWord - 2 - bit_in_word(r_index); + bm_word_t cword = (map(index) ^ flip) << shift; + // After this shift, the highest order bits correspond to r_index. + + // We give special handling if either of the two most significant bits (Weak or Strong) is set. With 64-bit + // words, the mask of interest is 0xc000_0000_0000_0000. Symbolically, this constant is represented by: + const bm_word_t first_object_mask = ((bm_word_t) 0x3) << (BitsPerWord - 2); + if ((cword & first_object_mask) != 0) { + // The first object is similarly often interesting. When it matters + // (density or features of the calling algorithm make it likely + // the first bit is set), going straight to the next clause compares + // poorly with doing this check first; count_leading_zeros can be + // relatively expensive, plus there is the additional range check. + // But when the first bit isn't set, the cost of having tested for + // it is relatively small compared to the rest of the search. + return r_index; + } else if (cword != 0) { + // Note that there are 2 bits corresponding to every index value (Weak and Strong), and every odd index value + // corresponds to the same object as index-1 + // Flipped and shifted first word is non-zero. If leading_zeros is 0 or 1, we return r_index (above). + // if leading zeros is 2 or 3, we return (r_index - 1) or (r_index - 2), and so forth + idx_t result = r_index + 1 - count_leading_zeros(cword); + if (aligned_left || (result >= l_index)) return result; + else { + // Sentinel value means no object found within specified range. + return r_index + 2; + } + } else { + // Flipped and shifted first word is zero. Word search through + // aligned up r_index for a non-zero flipped word. + idx_t limit = aligned_left + ? to_words_align_down(l_index) // Minuscule savings when aligned. + : to_words_align_up(l_index); + // Unsigned index is always >= unsigned limit if limit equals zero, so test for strictly greater than before decrement. + while (index-- > limit) { + cword = map(index) ^ flip; + if (cword != 0) { + // cword hods bits: + // 0x03 for the object corresponding to index (and index+1) (count_leading_zeros is 62 or 63) + // 0x0c for the object corresponding to index + 2 (and index+3) (count_leading_zeros is 60 or 61) + // and so on. + idx_t result = bit_index(index + 1) - (count_leading_zeros(cword) + 1); + if (aligned_left || (result >= l_index)) return result; + else { + // Sentinel value means no object found within specified range. + return r_index + 2; + } + } + } + // No bits in range; return r_index+2. + return r_index + 2; + } + } + else { + return r_index + 2; + } +} + inline ShenandoahMarkBitMap::idx_t ShenandoahMarkBitMap::get_next_one_offset(idx_t l_offset, idx_t r_offset) const { return get_next_bit_impl<find_ones_flip, false>(l_offset, r_offset); } +inline ShenandoahMarkBitMap::idx_t ShenandoahMarkBitMap::get_prev_one_offset(idx_t l_offset, idx_t r_offset) const { + return get_prev_bit_impl<find_ones_flip, false>(l_offset, r_offset); +} + // Returns a bit mask for a range of bits [beg, end) within a single word. Each // bit in the mask is 0 if the bit is in the range, 1 if not in the range. The // returned mask can be used directly to clear the range, or inverted to set the diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -67,8 +67,12 @@ inline bool is_marked_or_old(oop obj) const; inline bool is_marked_strong_or_old(oop obj) const; + // Return address of the first marked address in the range [addr,limit), or limit if no marked object found inline HeapWord* get_next_marked_addr(const HeapWord* addr, const HeapWord* limit) const; + // Return address of the last marked object in range [limit, start], returning start+1 if no marked object found + inline HeapWord* get_prev_marked_addr(const HeapWord* limit, const HeapWord* start) const; + inline bool allocated_after_mark_start(const oop obj) const; inline bool allocated_after_mark_start(const HeapWord* addr) const; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.inline.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.inline.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.inline.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.inline.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -72,6 +72,10 @@ return _mark_bit_map.get_next_marked_addr(start, limit); } +inline HeapWord* ShenandoahMarkingContext::get_prev_marked_addr(const HeapWord* limit, const HeapWord* start) const { + return _mark_bit_map.get_prev_marked_addr(limit, start); +} + inline bool ShenandoahMarkingContext::allocated_after_mark_start(oop obj) const { const HeapWord* addr = cast_from_oop<HeapWord*>(obj); return allocated_after_mark_start(addr); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -64,7 +64,7 @@ // ShenandoahCriticalFreeThreshold is expressed as a percentage. We multiple this percentage by 1/100th // of the generation capacity to determine whether the available memory within the generation exceeds the // critical threshold. - size_t free_expected = (generation->max_capacity() / 100) * ShenandoahCriticalFreeThreshold; + size_t free_expected = (ShenandoahHeap::heap()->soft_max_capacity() / 100) * ShenandoahCriticalFreeThreshold; bool prog_free = free_actual >= free_expected; log_info(gc, ergo)("%s progress for free space: %zu%s, need %zu%s", diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -196,8 +196,8 @@ } }; -ShenandoahOldGeneration::ShenandoahOldGeneration(uint max_queues, size_t max_capacity, size_t soft_max_capacity) - : ShenandoahGeneration(OLD, max_queues, max_capacity, soft_max_capacity), +ShenandoahOldGeneration::ShenandoahOldGeneration(uint max_queues, size_t max_capacity) + : ShenandoahGeneration(OLD, max_queues, max_capacity), _coalesce_and_fill_region_array(NEW_C_HEAP_ARRAY(ShenandoahHeapRegion*, ShenandoahHeap::heap()->num_regions(), mtGC)), _old_heuristics(nullptr), _region_balance(0), diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -88,7 +88,7 @@ bool coalesce_and_fill(); public: - ShenandoahOldGeneration(uint max_queues, size_t max_capacity, size_t soft_max_capacity); + ShenandoahOldGeneration(uint max_queues, size_t max_capacity); ShenandoahHeuristics* initialize_heuristics(ShenandoahMode* gc_mode) override; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -125,9 +125,8 @@ // No lock required because arguments align with card boundaries. void ShenandoahCardCluster::reset_object_range(HeapWord* from, HeapWord* to) { - assert(((((unsigned long long) from) & (CardTable::card_size() - 1)) == 0) && - ((((unsigned long long) to) & (CardTable::card_size() - 1)) == 0), - "reset_object_range bounds must align with card boundaries"); + assert(CardTable::is_card_aligned(from) && CardTable::is_card_aligned(to), + "Must align with card boundaries"); size_t card_at_start = _rs->card_index_for_addr(from); size_t num_cards = (to - from) / CardTable::card_size_in_words(); @@ -222,31 +221,88 @@ return _object_starts[card_index].offsets.last; } -// Given a card_index, return the starting address of the first block in the heap -// that straddles into this card. If this card is co-initial with an object, then -// this would return the first address of the range that this card covers, which is -// where the card's first object also begins. -HeapWord* ShenandoahCardCluster::block_start(const size_t card_index) const { +HeapWord* ShenandoahCardCluster::first_object_start(const size_t card_index, const ShenandoahMarkingContext* const ctx, + HeapWord* tams, HeapWord* end_range_of_interest) const { HeapWord* left = _rs->addr_for_card_index(card_index); + assert(left < end_range_of_interest, "No meaningful work to do"); + ShenandoahHeapRegion* region = ShenandoahHeap::heap()->heap_region_containing(left); #ifdef ASSERT assert(ShenandoahHeap::heap()->mode()->is_generational(), "Do not use in non-generational mode"); - ShenandoahHeapRegion* region = ShenandoahHeap::heap()->heap_region_containing(left); assert(region->is_old(), "Do not use for young regions"); // For HumongousRegion:s it's more efficient to jump directly to the // start region. assert(!region->is_humongous(), "Use region->humongous_start_region() instead"); #endif + + HeapWord* right = MIN2(region->top(), end_range_of_interest); + HeapWord* end_of_search_next = MIN2(right, tams); + // Since end_range_of_interest may not align on a card boundary, last_relevant_card_index is conservative. Not all of the + // memory within the last relevant card's span is < right. + size_t last_relevant_card_index; + if (end_range_of_interest == _end_of_heap) { + last_relevant_card_index = _rs->card_index_for_addr(end_range_of_interest - 1); + } else { + last_relevant_card_index = _rs->card_index_for_addr(end_range_of_interest); + if (_rs->addr_for_card_index(last_relevant_card_index) == end_range_of_interest) { + last_relevant_card_index--; + } + } + assert(card_index <= last_relevant_card_index, "sanity: card_index: %zu, last_relevant: %zu, left: " PTR_FORMAT + ", end_of_range: " PTR_FORMAT, card_index, last_relevant_card_index, p2i(left), p2i(end_range_of_interest)); + + // if marking context is valid and we are below tams, we use the marking bit map to find the first marked object that + // intersects with this card. If no such object exists, we return the first marked object that follows the start + // of this card's memory range if such an object is found at or before last_relevant_card_index. If there are no + // marked objects in this range, we return nullptr. + if ((ctx != nullptr) && (left < tams)) { + if (ctx->is_marked(left)) { + oop obj = cast_to_oop(left); + assert(oopDesc::is_oop(obj), "Should be an object"); + return left; + } + // get the previous marked object, if any + if (region->bottom() < left) { + // In the case that this region was most recently marked as young, the fact that this region has been promoted in place + // denotes that final mark (Young) has completed. In the case that this region was most recently marked as old, the + // fact that (ctx != nullptr) denotes that old marking has completed. Otherwise, ctx would equal null. + HeapWord* prev = ctx->get_prev_marked_addr(region->bottom(), left - 1); + if (prev < left) { + oop obj = cast_to_oop(prev); + assert(oopDesc::is_oop(obj), "Should be an object"); + HeapWord* obj_end = prev + obj->size(); + if (obj_end > left) { + return prev; + } + } + } + // Either prev >= left (no previous object found), or the previous object that was found ends before my card range begins. + // In eiher case, find the next marked object if any on this or a following card + assert(!ctx->is_marked(left), "Was dealt with above"); + assert(right > left, "We don't expect to be examining cards above the smaller of TAMS or top"); + HeapWord* next = ctx->get_next_marked_addr(left, end_of_search_next); + // If end_of_search_next < right, we may return tams here, which is "marked" by default + if (next < right) { + oop obj = cast_to_oop(next); + assert(oopDesc::is_oop(obj), "Should be an object"); + return next; + } else { + return nullptr; + } + } + + assert((ctx == nullptr) || (left >= tams), "Should have returned above"); + + // The following code assumes that all data in region at or above left holds parsable objects + assert((left >= tams) || ShenandoahGenerationalHeap::heap()->old_generation()->is_parsable(), + "The code that follows expects a parsable heap"); if (starts_object(card_index) && get_first_start(card_index) == 0) { - // This card contains a co-initial object; a fortiori, it covers - // also the case of a card being the first in a region. + // This card contains a co-initial object; a fortiori, it covers also the case of a card being the first in a region. assert(oopDesc::is_oop(cast_to_oop(left)), "Should be an object"); return left; } - HeapWord* p = nullptr; - oop obj = cast_to_oop(p); ssize_t cur_index = (ssize_t)card_index; assert(cur_index >= 0, "Overflow"); assert(cur_index > 0, "Should have returned above"); @@ -256,37 +312,75 @@ } // cur_index should start an object: we should not have walked // past the left end of the region. - assert(cur_index >= 0 && (cur_index <= (ssize_t)card_index), "Error"); + assert(cur_index >= 0 && (cur_index <= (ssize_t) card_index), "Error"); assert(region->bottom() <= _rs->addr_for_card_index(cur_index), "Fell off the bottom of containing region"); assert(starts_object(cur_index), "Error"); size_t offset = get_last_start(cur_index); // can avoid call via card size arithmetic below instead - p = _rs->addr_for_card_index(cur_index) + offset; + HeapWord* p = _rs->addr_for_card_index(cur_index) + offset; + if ((ctx != nullptr) && (p < tams)) { + if (ctx->is_marked(p)) { + oop obj = cast_to_oop(p); + assert(oopDesc::is_oop(obj), "Should be an object"); + assert(Klass::is_valid(obj->klass()), "Not a valid klass ptr"); + assert(p + obj->size() > left, "This object should span start of card"); + assert(p < right, "Result must precede right"); + return p; + } else { + // Object that spans start of card is dead, so should not be scanned + assert((ctx == nullptr) || (left + get_first_start(card_index) >= tams), "Should have handled this case above"); + if (starts_object(card_index)) { + assert(left + get_first_start(card_index) < right, "Result must precede right"); + return left + get_first_start(card_index); + } else { + // Spanning object is dead and this card does not start an object, so the start object is in some card that follows + size_t following_card_index = card_index; + do { + following_card_index++; + if (following_card_index > last_relevant_card_index) { + return nullptr; + } + } while (!starts_object(following_card_index)); + HeapWord* result_candidate = _rs->addr_for_card_index(following_card_index) + get_first_start(following_card_index); + return (result_candidate >= right)? nullptr: result_candidate; + } + } + } + // Recall that we already dealt with the co-initial object case above assert(p < left, "obj should start before left"); // While it is safe to ask an object its size in the loop that // follows, the (ifdef'd out) loop should never be needed. - // 1. we ask this question only for regions in the old generation + // 1. we ask this question only for regions in the old generation, and those + // that are not humongous regions // 2. there is no direct allocation ever by mutators in old generation - // regions. Only GC will ever allocate in old regions, and then - // too only during promotion/evacuation phases. Thus there is no danger + // regions walked by this code. Only GC will ever allocate in old regions, + // and then too only during promotion/evacuation phases. Thus there is no danger // of races between reading from and writing to the object start array, // or of asking partially initialized objects their size (in the loop below). + // Furthermore, humongous regions (and their dirty cards) are never processed + // by this code. // 3. only GC asks this question during phases when it is not concurrently // evacuating/promoting, viz. during concurrent root scanning (before // the evacuation phase) and during concurrent update refs (after the // evacuation phase) of young collections. This is never called - // during old or global collections. + // during global collections during marking or update refs.. // 4. Every allocation under TAMS updates the object start array. - NOT_PRODUCT(obj = cast_to_oop(p);) +#ifdef ASSERT + oop obj = cast_to_oop(p); assert(oopDesc::is_oop(obj), "Should be an object"); -#define WALK_FORWARD_IN_BLOCK_START false - while (WALK_FORWARD_IN_BLOCK_START && p + obj->size() < left) { + while (p + obj->size() < left) { p += obj->size(); + obj = cast_to_oop(p); + assert(oopDesc::is_oop(obj), "Should be an object"); + assert(Klass::is_valid(obj->klass()), "Not a valid klass ptr"); + // Check assumptions in previous block comment if this assert fires + fatal("Should never need forward walk in block start"); } -#undef WALK_FORWARD_IN_BLOCK_START // false - assert(p + obj->size() > left, "obj should end after left"); + assert(p <= left, "p should start at or before left end of card"); + assert(p + obj->size() > left, "obj should end after left end of card"); +#endif // ASSERT return p; } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -351,6 +351,7 @@ private: ShenandoahDirectCardMarkRememberedSet* _rs; + const HeapWord* _end_of_heap; public: static const size_t CardsPerCluster = 64; @@ -404,6 +405,7 @@ ShenandoahCardCluster(ShenandoahDirectCardMarkRememberedSet* rs) { _rs = rs; + _end_of_heap = ShenandoahHeap::heap()->end(); _object_starts = NEW_C_HEAP_ARRAY(crossing_info, rs->total_cards() + 1, mtGC); // the +1 is to account for card table guarding entry for (size_t i = 0; i < rs->total_cards(); i++) { _object_starts[i].short_word = 0; @@ -650,12 +652,31 @@ size_t get_last_start(size_t card_index) const; - // Given a card_index, return the starting address of the first block in the heap - // that straddles into the card. If the card is co-initial with an object, then - // this would return the starting address of the heap that this card covers. - // Expects to be called for a card affiliated with the old generation in - // generational mode. - HeapWord* block_start(size_t card_index) const; + // Given a card_index, return the starting address of the first live object in the heap + // that intersects with or follows this card. This must be a valid, parsable object, and must + // be the first such object that intersects with this card. The object may start before, + // at, or after the start of the card identified by card_index, and may end in or after the card. + // + // The tams argument represents top for the enclosing region at the start of the most recently + // initiated concurrent old marking effort. If ctx is non-null, we use the marking context to identify + // marked objects below tams. Above tams, we know that every object is marked and that the memory is + // parsable (so we can add an object's size to its address to find the next object). If ctx is null, + // we use crossing maps to find where object's start, and use object sizes to walk individual objects. + // The region must be parsable if ctx is null. + // + // The end_range_of_interest pointer argument represents an upper bound on how far we look in the forward direction + // for the first object in the heap that intersects or follows this card. If there are no live objects found at + // an address less than end_range_of_interest returns nullptr. + // + // Expects to be called for a card in a region affiliated with the old generation of the + // generational heap, otherwise behavior is undefined. + // + // If not null, ctx holds the complete marking context of the old generation. If null, + // we expect that the marking context isn't available and the crossing maps are valid. + // Note that crossing maps may be invalid following class unloading and before dead + // or unloaded objects have been coalesced and filled. Coalesce and fill updates the crossing maps. + HeapWord* first_object_start(size_t card_index, const ShenandoahMarkingContext* const ctx, + HeapWord* tams, HeapWord* end_range_of_interest) const; }; // ShenandoahScanRemembered is a concrete class representing the diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.inline.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.inline.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.inline.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.inline.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -50,7 +50,7 @@ // degenerated execution, leading to dangling references. template <typename ClosureType> void ShenandoahScanRemembered::process_clusters(size_t first_cluster, size_t count, HeapWord* end_of_range, - ClosureType* cl, bool use_write_table, uint worker_id) { + ClosureType* cl, bool use_write_table, uint worker_id) { assert(ShenandoahHeap::heap()->old_generation()->is_parsable(), "Old generation regions must be parsable for remembered set scan"); // If old-gen evacuation is active, then MarkingContext for old-gen heap regions is valid. We use the MarkingContext @@ -102,7 +102,7 @@ // tams and ctx below are for old generation marking. As such, young gen roots must // consider everything above tams, since it doesn't represent a TAMS for young gen's // SATB marking. - const HeapWord* tams = (ctx == nullptr ? region->bottom() : ctx->top_at_mark_start(region)); + HeapWord* const tams = (ctx == nullptr ? region->bottom() : ctx->top_at_mark_start(region)); NOT_PRODUCT(ShenandoahCardStats stats(whole_cards, card_stats(worker_id));) @@ -162,19 +162,37 @@ // [left, right) is a maximal right-open interval of dirty cards HeapWord* left = _rs->addr_for_card_index(dirty_l); // inclusive HeapWord* right = _rs->addr_for_card_index(dirty_r + 1); // exclusive + if (end_addr <= left) { + // The range of addresses to be scanned is empty + continue; + } // Clip right to end_addr established above (still exclusive) right = MIN2(right, end_addr); assert(right <= region->top() && end_addr <= region->top(), "Busted bounds"); const MemRegion mr(left, right); - // NOTE: We'll not call block_start() repeatedly - // on a very large object if its head card is dirty. If not, - // (i.e. the head card is clean) we'll call it each time we - // process a new dirty range on the object. This is always - // the case for large object arrays, which are typically more + // NOTE: We'll not call first_object_start() repeatedly + // on a very large object, i.e. one spanning multiple cards, + // if its head card is dirty. If not, (i.e. its head card is clean) + // we'll call it each time we process a new dirty range on the object. + // This is always the case for large object arrays, which are typically more // common. - HeapWord* p = _scc->block_start(dirty_l); + assert(ctx != nullptr || heap->old_generation()->is_parsable(), "Error"); + HeapWord* p = _scc->first_object_start(dirty_l, ctx, tams, right); + assert((p == nullptr) || (p < right), "No first object found is denoted by nullptr, p: " + PTR_FORMAT ", right: " PTR_FORMAT ", end_addr: " PTR_FORMAT ", next card addr: " PTR_FORMAT, + p2i(p), p2i(right), p2i(end_addr), p2i(_rs->addr_for_card_index(dirty_r + 1))); + if (p == nullptr) { + // There are no live objects to be scanned in this dirty range. cur_index identifies first card in this + // uninteresting dirty range. At top of next loop iteration, we will either end the looop + // (because cur_index < start_card_index) or we will begin the search for a range of clean cards. + continue; + } + oop obj = cast_to_oop(p); + assert(oopDesc::is_oop(obj), "Not an object at " PTR_FORMAT ", left: " PTR_FORMAT ", right: " PTR_FORMAT, + p2i(p), p2i(left), p2i(right)); + assert(ctx==nullptr || ctx->is_marked(obj), "Error"); // PREFIX: The object that straddles into this range of dirty cards // from the left may be subject to special treatment unless diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -30,8 +30,8 @@ #include "gc/shenandoah/shenandoahUtils.hpp" #include "gc/shenandoah/shenandoahYoungGeneration.hpp" -ShenandoahYoungGeneration::ShenandoahYoungGeneration(uint max_queues, size_t max_capacity, size_t soft_max_capacity) : - ShenandoahGeneration(YOUNG, max_queues, max_capacity, soft_max_capacity), +ShenandoahYoungGeneration::ShenandoahYoungGeneration(uint max_queues, size_t max_capacity) : + ShenandoahGeneration(YOUNG, max_queues, max_capacity), _old_gen_task_queues(nullptr) { } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -34,7 +34,7 @@ ShenandoahYoungHeuristics* _young_heuristics; public: - ShenandoahYoungGeneration(uint max_queues, size_t max_capacity, size_t max_soft_capacity); + ShenandoahYoungGeneration(uint max_queues, size_t max_capacity); ShenandoahHeuristics* initialize_heuristics(ShenandoahMode* gc_mode) override; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -141,10 +141,12 @@ "GC heuristics to use. This fine-tunes the GC mode selected, " \ "by choosing when to start the GC, how much to process on each " \ "cycle, and what other features to automatically enable. " \ - "Possible values are:" \ + "When -XX:ShenandoahGCMode is generational, the only supported " \ + "option is the default, adaptive. Possible values are:" \ " adaptive - adapt to maintain the given amount of free heap " \ "at all times, even during the GC cycle;" \ - " static - trigger GC when free heap falls below the threshold;" \ + " static - trigger GC when free heap falls below a specified " \ + "threshold;" \ " aggressive - run GC continuously, try to evacuate everything;" \ " compact - run GC more frequently and with deeper targets to " \ "free up more memory.") \ diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/jfr.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/jfr.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2026, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ #include "jfr/recorder/repository/jfrEmergencyDump.hpp" #include "jfr/recorder/service/jfrOptionSet.hpp" #include "jfr/recorder/service/jfrOptionSet.hpp" +#include "jfr/recorder/service/jfrRecorderService.hpp" #include "jfr/recorder/repository/jfrRepository.hpp" #include "jfr/support/jfrKlassExtension.hpp" #include "jfr/support/jfrResolution.hpp" @@ -43,6 +44,7 @@ #include "runtime/java.hpp" #include "runtime/javaThread.hpp" + bool Jfr::is_enabled() { return JfrRecorder::is_enabled(); } @@ -151,9 +153,9 @@ } #endif -void Jfr::on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown, bool halt) { +void Jfr::on_vm_shutdown(bool exception_handler /* false */, bool halt /* false */, bool oom /* false */) { if (!halt && JfrRecorder::is_recording()) { - JfrEmergencyDump::on_vm_shutdown(emit_old_object_samples, emit_event_shutdown); + JfrEmergencyDump::on_vm_shutdown(exception_handler, oom); } } @@ -170,3 +172,9 @@ bool Jfr::on_start_flight_recording_option(const JavaVMOption** option, char* delimiter) { return JfrOptionSet::parse_start_flight_recording_option(option, delimiter); } + +void Jfr::on_report_java_out_of_memory() { + if (CrashOnOutOfMemoryError && JfrRecorder::is_recording()) { + JfrRecorderService::emit_leakprofiler_events_on_oom(); + } +} diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.hpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/jfr.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/jfr.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ static void on_resolution(const Method* caller, const Method* target, TRAPS); static void on_java_thread_start(JavaThread* starter, JavaThread* startee); static void on_set_current_thread(JavaThread* jt, oop thread); - static void on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown, bool halt = false); + static void on_vm_shutdown(bool exception_handler = false, bool halt = false, bool oom = false); static void on_vm_error_report(outputStream* st); static bool on_flight_recorder_option(const JavaVMOption** option, char* delimiter); static bool on_start_flight_recording_option(const JavaVMOption** option, char* delimiter); @@ -78,6 +78,7 @@ static void initialize_main_thread(JavaThread* jt); static bool has_sample_request(JavaThread* jt); static void check_and_process_sample_request(JavaThread* jt); + static void on_report_java_out_of_memory(); }; #endif // SHARE_JFR_JFR_HPP diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/jni/jfrJniMethod.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/jni/jfrJniMethod.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/jni/jfrJniMethod.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/jni/jfrJniMethod.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -364,8 +364,7 @@ JVM_END NO_TRANSITION(void, jfr_emit_old_object_samples(JNIEnv* env, jclass jvm, jlong cutoff_ticks, jboolean emit_all, jboolean skip_bfs)) - JfrRecorderService service; - service.emit_leakprofiler_events(cutoff_ticks, emit_all == JNI_TRUE, skip_bfs == JNI_TRUE); + JfrRecorderService::emit_leakprofiler_events(cutoff_ticks, emit_all == JNI_TRUE, skip_bfs == JNI_TRUE); NO_TRANSITION_END JVM_ENTRY_NO_ENV(void, jfr_exclude_thread(JNIEnv* env, jclass jvm, jobject t)) diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -25,7 +25,6 @@ #include "jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp" #include "logging/log.hpp" - #if defined(LINUX) #include "jfr/periodic/sampling/jfrThreadSampling.hpp" #include "jfr/support/jfrThreadLocal.hpp" @@ -68,7 +67,7 @@ } JfrCPUTimeTraceQueue::JfrCPUTimeTraceQueue(u4 capacity) : - _data(nullptr), _capacity(capacity), _head(0), _lost_samples(0) { + _data(nullptr), _capacity(capacity), _head(0), _lost_samples(0), _lost_samples_due_to_queue_full(0) { if (capacity != 0) { _data = JfrCHeapObj::new_array<JfrCPUTimeSampleRequest>(capacity); } @@ -111,10 +110,13 @@ } u4 JfrCPUTimeTraceQueue::capacity() const { - return _capacity; + return Atomic::load_acquire(&_capacity); } void JfrCPUTimeTraceQueue::set_capacity(u4 capacity) { + if (capacity == Atomic::load(&_capacity)) { + return; + } _head = 0; if (_data != nullptr) { assert(_capacity != 0, "invariant"); @@ -125,7 +127,7 @@ } else { _data = nullptr; } - _capacity = capacity; + Atomic::release_store(&_capacity, capacity); } bool JfrCPUTimeTraceQueue::is_empty() const { @@ -141,28 +143,51 @@ Atomic::inc(&_lost_samples); } +void JfrCPUTimeTraceQueue::increment_lost_samples_due_to_queue_full() { + Atomic::inc(&_lost_samples_due_to_queue_full); +} + u4 JfrCPUTimeTraceQueue::get_and_reset_lost_samples() { return Atomic::xchg(&_lost_samples, (u4)0); } -void JfrCPUTimeTraceQueue::resize(u4 capacity) { - if (capacity != _capacity) { - set_capacity(capacity); - } +u4 JfrCPUTimeTraceQueue::get_and_reset_lost_samples_due_to_queue_full() { + return Atomic::xchg(&_lost_samples_due_to_queue_full, (u4)0); } -void JfrCPUTimeTraceQueue::resize_for_period(u4 period_millis) { - u4 capacity = CPU_TIME_QUEUE_CAPACITY; - if (period_millis > 0 && period_millis < 10) { - capacity = (u4) ((double) capacity * 10 / period_millis); - } - resize(capacity); +void JfrCPUTimeTraceQueue::init() { + set_capacity(JfrCPUTimeTraceQueue::CPU_TIME_QUEUE_INITIAL_CAPACITY); } void JfrCPUTimeTraceQueue::clear() { Atomic::release_store(&_head, (u4)0); } +void JfrCPUTimeTraceQueue::resize_if_needed() { + u4 lost_samples_due_to_queue_full = get_and_reset_lost_samples_due_to_queue_full(); + if (lost_samples_due_to_queue_full == 0) { + return; + } + u4 capacity = Atomic::load(&_capacity); + if (capacity < CPU_TIME_QUEUE_MAX_CAPACITY) { + float ratio = (float)lost_samples_due_to_queue_full / (float)capacity; + int factor = 1; + if (ratio > 8) { // idea is to quickly scale the queue in the worst case + factor = ratio; + } else if (ratio > 2) { + factor = 8; + } else if (ratio > 0.5) { + factor = 4; + } else if (ratio > 0.01) { + factor = 2; + } + if (factor > 1) { + u4 new_capacity = MIN2(CPU_TIME_QUEUE_MAX_CAPACITY, capacity * factor); + set_capacity(new_capacity); + } + } +} + // A throttle is either a rate or a fixed period class JfrCPUSamplerThrottle { @@ -206,6 +231,7 @@ volatile bool _is_async_processing_of_cpu_time_jfr_requests_triggered; volatile bool _warned_about_timer_creation_failure; volatile bool _signal_handler_installed; + DEBUG_ONLY(volatile bool _out_of_stack_walking_enabled = true;) static const u4 STOP_SIGNAL_BIT = 0x80000000; @@ -252,6 +278,12 @@ virtual void print_on(outputStream* st) const; void trigger_async_processing_of_cpu_time_jfr_requests(); + + #ifdef ASSERT + void set_out_of_stack_walking_enabled(bool runnable) { + Atomic::release_store(&_out_of_stack_walking_enabled, runnable); + } + #endif }; JfrCPUSamplerThread::JfrCPUSamplerThread(JfrCPUSamplerThrottle& throttle) : @@ -277,7 +309,7 @@ } JfrThreadLocal* tl = thread->jfr_thread_local(); assert(tl != nullptr, "invariant"); - tl->cpu_time_jfr_queue().resize_for_period(_current_sampling_period_ns / 1000000); + tl->cpu_time_jfr_queue().init(); timer_t timerid; if (create_timer_for_thread(thread, timerid)) { tl->set_cpu_timer(&timerid); @@ -296,12 +328,14 @@ if (timer == nullptr) { return; // no timer was created for this thread } + tl->acquire_cpu_time_jfr_dequeue_lock(); tl->unset_cpu_timer(); tl->deallocate_cpu_time_jfr_queue(); s4 lost_samples = tl->cpu_time_jfr_queue().lost_samples(); if (lost_samples > 0) { JfrCPUTimeThreadSampling::send_lost_event(JfrTicks::now(), JfrThreadLocal::thread_id(thread), lost_samples); } + tl->release_cpu_time_jfr_queue_lock(); } void JfrCPUSamplerThread::start_thread() { @@ -354,10 +388,11 @@ recompute_period_if_needed(); last_recompute_check = os::javaTimeNanos(); } - - if (Atomic::cmpxchg(&_is_async_processing_of_cpu_time_jfr_requests_triggered, true, false)) { - stackwalk_threads_in_native(); - } + DEBUG_ONLY(if (Atomic::load_acquire(&_out_of_stack_walking_enabled)) {) + if (Atomic::cmpxchg(&_is_async_processing_of_cpu_time_jfr_requests_triggered, true, false)) { + stackwalk_threads_in_native(); + } + DEBUG_ONLY(}) os::naked_sleep(100); } } @@ -547,6 +582,17 @@ _sampler->decrement_signal_handler_count(); } +#ifdef ASSERT +bool JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(bool runnable) { + if (_instance != nullptr && _instance->_sampler != nullptr) { + _instance->_sampler->set_out_of_stack_walking_enabled(runnable); + return true; + } else { + return false; + } +} +#endif + void JfrCPUSamplerThread::sample_thread(JfrSampleRequest& request, void* ucontext, JavaThread* jt, JfrThreadLocal* tl, JfrTicks& now) { JfrSampleRequestBuilder::build_cpu_time_sample_request(request, ucontext, jt, jt->jfr_thread_local(), now); } @@ -592,6 +638,7 @@ } } else { queue.increment_lost_samples(); + queue.increment_lost_samples_due_to_queue_full(); } if (jt->thread_state() == _thread_in_native) { @@ -815,4 +862,11 @@ void JfrCPUTimeThreadSampling::on_javathread_terminate(JavaThread* thread) { } +#ifdef ASSERT +bool JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(bool runnable) { + warn(); + return false; +} +#endif + #endif // defined(LINUX) && defined(INCLUDE_JFR) diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -50,12 +50,15 @@ static const u4 CPU_TIME_QUEUE_CAPACITY = 500; JfrCPUTimeSampleRequest* _data; - u4 _capacity; + volatile u4 _capacity; // next unfilled index volatile u4 _head; volatile u4 _lost_samples; + volatile u4 _lost_samples_due_to_queue_full; + static const u4 CPU_TIME_QUEUE_INITIAL_CAPACITY = 20; + static const u4 CPU_TIME_QUEUE_MAX_CAPACITY = 2000; public: JfrCPUTimeTraceQueue(u4 capacity); @@ -81,12 +84,17 @@ void increment_lost_samples(); + void increment_lost_samples_due_to_queue_full(); + // returns the previous lost samples count u4 get_and_reset_lost_samples(); - void resize(u4 capacity); + u4 get_and_reset_lost_samples_due_to_queue_full(); + + void resize_if_needed(); - void resize_for_period(u4 period_millis); + // init the queue capacity + void init(); void clear(); @@ -130,6 +138,8 @@ static void send_lost_event(const JfrTicks& time, traceid tid, s4 lost_samples); static void trigger_async_processing_of_cpu_time_jfr_requests(); + + DEBUG_ONLY(static bool set_out_of_stack_walking_enabled(bool runnable);) }; #else @@ -150,6 +160,7 @@ static void on_javathread_create(JavaThread* thread); static void on_javathread_terminate(JavaThread* thread); + DEBUG_ONLY(static bool set_out_of_stack_walking_enabled(bool runnable)); }; #endif // defined(LINUX) diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -232,41 +232,50 @@ JavaThread* start = nullptr; elapsedTimer sample_time; sample_time.start(); - ThreadsListHandle tlh; - // Resolve a sample session relative start position index into the thread list array. - // In cases where the last sampled thread is null or not-null but stale, find_index() returns -1. - _cur_index = tlh.list()->find_index_of_JavaThread(*last_thread); - JavaThread* current = _cur_index != -1 ? *last_thread : nullptr; - - while (num_samples < sample_limit) { - current = next_thread(tlh.list(), start, current); - if (current == nullptr) { - break; - } - if (is_excluded(current)) { - continue; - } - if (start == nullptr) { - start = current; // remember the thread where we started to attempt sampling - } - bool success; - if (JAVA_SAMPLE == type) { - success = sample_java_thread(current); - } else { - assert(type == NATIVE_SAMPLE, "invariant"); - success = sample_native_thread(current); - } - if (success) { - num_samples++; - } - if (SafepointSynchronize::is_at_safepoint()) { - // For _thread_in_native, we cannot get the Threads_lock. - // For _thread_in_Java, well, there are none. - break; + { + /* + * Take the Threads_lock for three purposes: + * + * 1) Avoid sampling right through a safepoint, + * which could result in touching oops in case of virtual threads. + * 2) Prevent JFR from issuing an epoch rotation while the sampler thread + * is actively processing a thread in state native, as both threads are outside the safepoint protocol. + * 3) Some operating systems (BSD / Mac) require a process lock when sending a signal with pthread_kill. + * Holding the Threads_lock prevents a JavaThread from calling os::create_thread(), which also takes the process lock. + * In a sense, we provide a coarse signal mask, so we can always send the resume signal. + */ + MutexLocker tlock(Threads_lock); + ThreadsListHandle tlh; + // Resolve a sample session relative start position index into the thread list array. + // In cases where the last sampled thread is null or not-null but stale, find_index() returns -1. + _cur_index = tlh.list()->find_index_of_JavaThread(*last_thread); + JavaThread* current = _cur_index != -1 ? *last_thread : nullptr; + + while (num_samples < sample_limit) { + current = next_thread(tlh.list(), start, current); + if (current == nullptr) { + break; + } + if (is_excluded(current)) { + continue; + } + if (start == nullptr) { + start = current; // remember the thread where we started to attempt sampling + } + bool success; + if (JAVA_SAMPLE == type) { + success = sample_java_thread(current); + } else { + assert(type == NATIVE_SAMPLE, "invariant"); + success = sample_native_thread(current); + } + if (success) { + num_samples++; + } } - } - *last_thread = current; // remember the thread we last attempted to sample + *last_thread = current; // remember the thread we last attempted to sample + } sample_time.stop(); log_trace(jfr)("JFR thread sampling done in %3.7f secs with %d java %d native samples", sample_time.seconds(), type == JAVA_SAMPLE ? num_samples : 0, type == NATIVE_SAMPLE ? num_samples : 0); @@ -297,6 +306,7 @@ // Sampling a thread in state _thread_in_Java // involves a platform-specific thread suspend and CPU context retrieval. bool JfrSamplerThread::sample_java_thread(JavaThread* jt) { + assert_lock_strong(Threads_lock); if (jt->thread_state() != _thread_in_Java) { return false; } @@ -328,6 +338,7 @@ // without thread suspension and CPU context retrieval, // if we carefully order the loads of the thread state. bool JfrSamplerThread::sample_native_thread(JavaThread* jt) { + assert_lock_strong(Threads_lock); if (jt->thread_state() != _thread_in_native) { return false; } @@ -343,24 +354,14 @@ SafepointMechanism::arm_local_poll_release(jt); - // Take the Threads_lock for two purposes: - // 1) Avoid sampling through a safepoint which could result - // in touching oops in case of virtual threads. - // 2) Prevent JFR from issuing an epoch rotation while the sampler thread - // is actively processing a thread in native, as both threads are now - // outside the safepoint protocol. - - // OrderAccess::fence() as part of acquiring the lock prevents loads from floating up. - JfrMutexTryLock threads_lock(Threads_lock); - - if (!threads_lock.acquired() || !jt->has_last_Java_frame()) { - // Remove the native sample request and release the potentially waiting thread. - JfrSampleMonitor jsm(tl); - return false; + // Separate the arming of the poll (above) from the reading of JavaThread state (below). + if (UseSystemMemoryBarrier) { + SystemMemoryBarrier::emit(); + } else { + OrderAccess::fence(); } - if (jt->thread_state() != _thread_in_native) { - assert_lock_strong(Threads_lock); + if (jt->thread_state() != _thread_in_native || !jt->has_last_Java_frame()) { JfrSampleMonitor jsm(tl); if (jsm.is_waiting()) { // The thread has already returned from native, diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -217,7 +217,8 @@ const PcDesc* const pc_desc = get_pc_desc(sampled_nm, sampled_pc); if (is_valid(pc_desc)) { intptr_t* const synthetic_sp = sender_sp - sampled_nm->frame_size(); - top_frame = frame(synthetic_sp, synthetic_sp, sender_sp, pc_desc->real_pc(sampled_nm), sampled_nm); + intptr_t* const synthetic_fp = sender_sp AARCH64_ONLY( - frame::sender_sp_offset); + top_frame = frame(synthetic_sp, synthetic_sp, synthetic_fp, pc_desc->real_pc(sampled_nm), sampled_nm); in_continuation = is_in_continuation(top_frame, jt); return true; } @@ -368,6 +369,7 @@ tl->set_has_cpu_time_jfr_requests(false); if (queue.lost_samples() > 0) { JfrCPUTimeThreadSampling::send_lost_event( now, JfrThreadLocal::thread_id(jt), queue.get_and_reset_lost_samples()); + queue.resize_if_needed(); } if (lock) { tl->release_cpu_time_jfr_queue_lock(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/jfrRecorder.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/jfrRecorder.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/jfrRecorder.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/jfrRecorder.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -239,7 +239,7 @@ } bool JfrRecorder::on_create_vm_3() { - JVMTI_ONLY( assert(JvmtiEnvBase::get_phase() == JVMTI_PHASE_LIVE, "invalid init sequence"); ) + JVMTI_ONLY( assert(JvmtiEnvBase::get_phase() == JVMTI_PHASE_LIVE, "invalid init sequence, phase is %d", (int)JvmtiEnvBase::get_phase()); ) return CDSConfig::is_dumping_archive() || launch_command_line_recordings(JavaThread::current()); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ #include "runtime/javaThread.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/os.hpp" +#include "runtime/thread.inline.hpp" +#include "runtime/vmOperations.hpp" +#include "runtime/vmThread.hpp" #include "utilities/growableArray.hpp" #include "utilities/ostream.hpp" @@ -450,25 +453,14 @@ * * If we end up deadlocking in the attempt of dumping out jfr data, * we rely on the WatcherThread task "is_error_reported()", -* to exit the VM after a hard-coded timeout (disallow WatcherThread to emergency dump). +* to exit the VM after a hard-coded timeout (the reason +* for disallowing the WatcherThread to issue an emergency dump). * This "safety net" somewhat explains the aggressiveness in this attempt. * */ -static bool prepare_for_emergency_dump(Thread* thread) { +static void release_locks(Thread* thread) { assert(thread != nullptr, "invariant"); - if (thread->is_Watcher_thread()) { - // need WatcherThread as a safeguard against potential deadlocks - return false; - } - -#ifdef ASSERT - Mutex* owned_lock = thread->owned_locks(); - while (owned_lock != nullptr) { - Mutex* next = owned_lock->next(); - owned_lock->unlock(); - owned_lock = next; - } -#endif // ASSERT + assert(!thread->is_Java_thread() || JavaThread::cast(thread)->thread_state() == _thread_in_vm, "invariant"); if (Threads_lock->owned_by_self()) { Threads_lock->unlock(); @@ -517,24 +509,18 @@ if (JfrStacktrace_lock->owned_by_self()) { JfrStacktrace_lock->unlock(); } - return true; -} - -static volatile int jfr_shutdown_lock = 0; - -static bool guard_reentrancy() { - return Atomic::cmpxchg(&jfr_shutdown_lock, 0, 1) == 0; } class JavaThreadInVMAndNative : public StackObj { private: - JavaThread* const _jt; + JavaThread* _jt; JavaThreadState _original_state; public: - JavaThreadInVMAndNative(Thread* t) : _jt(t->is_Java_thread() ? JavaThread::cast(t) : nullptr), + JavaThreadInVMAndNative(Thread* t) : _jt(nullptr), _original_state(_thread_max_state) { - if (_jt != nullptr) { + if (t != nullptr && t->is_Java_thread()) { + _jt = JavaThread::cast(t); _original_state = _jt->thread_state(); if (_original_state != _thread_in_vm) { _jt->set_thread_state(_thread_in_vm); @@ -544,6 +530,7 @@ ~JavaThreadInVMAndNative() { if (_original_state != _thread_max_state) { + assert(_jt != nullptr, "invariant"); _jt->set_thread_state(_original_state); } } @@ -556,35 +543,82 @@ } }; -static void post_events(bool emit_old_object_samples, bool emit_event_shutdown, Thread* thread) { - if (emit_old_object_samples) { - LeakProfiler::emit_events(max_jlong, false, false); - } - if (emit_event_shutdown) { +static void post_events(bool exception_handler, bool oom, Thread * thread) { + if (exception_handler) { EventShutdown e; - e.set_reason("VM Error"); + e.set_reason(oom ? "CrashOnOutOfMemoryError" : "VM Error"); e.commit(); } EventDumpReason event; - event.set_reason(emit_old_object_samples ? "Out of Memory" : "Crash"); + event.set_reason(exception_handler && oom ? "CrashOnOutOfMemoryError" : exception_handler ? "Crash" : "Out of Memory"); event.set_recordingId(-1); event.commit(); } -void JfrEmergencyDump::on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown) { - if (!guard_reentrancy()) { - return; +static volatile traceid _jfr_shutdown_tid = 0; + +static bool guard_reentrancy() { + const traceid shutdown_tid = Atomic::load(&_jfr_shutdown_tid); + if (shutdown_tid == max_julong) { + // Someone tried but did not have a proper thread for the purpose. + return false; } - Thread* thread = Thread::current_or_null_safe(); - if (thread == nullptr) { + if (shutdown_tid == 0) { + Thread* const thread = Thread::current_or_null_safe(); + const traceid tid = thread != nullptr ? JFR_JVM_THREAD_ID(thread) : max_julong; + if (Atomic::cmpxchg(&_jfr_shutdown_tid, shutdown_tid, tid) != shutdown_tid) { + JavaThreadInVMAndNative jtivm(thread); + if (thread != nullptr) { + release_locks(thread); + } + log_info(jfr, system)("A jfr emergency dump is already in progress, waiting for thread id " UINT64_FORMAT_X, Atomic::load(&_jfr_shutdown_tid)); + // Transition to a safe safepoint state for the infinite sleep. A nop for non-java threads. + jtivm.transition_to_native(); + os::infinite_sleep(); // stay here until we exit normally or crash. + ShouldNotReachHere(); + } + return tid != max_julong; + } + // Recursive case + assert(JFR_JVM_THREAD_ID(Thread::current_or_null_safe()) == shutdown_tid, "invariant"); + return false; +} + +void JfrEmergencyDump::on_vm_shutdown(bool exception_handler, bool oom) { + if (!guard_reentrancy()) { return; } + + Thread* const thread = Thread::current_or_null_safe(); + assert(thread != nullptr, "invariant"); + // Ensure a JavaThread is _thread_in_vm when we make this call JavaThreadInVMAndNative jtivm(thread); - if (!prepare_for_emergency_dump(thread)) { + post_events(exception_handler, oom, thread); + + if (thread->is_Watcher_thread()) { + // We cannot attempt an emergency dump using the Watcher thread + // because we rely on the WatcherThread task "is_error_reported()", + // to exit the VM after a hardcoded timeout, should the relatively + // risky operation of an emergency dump fail (deadlock, livelock). + log_warning(jfr, system) + ("The Watcher thread crashed so no jfr emergency dump will be generated."); return; } - post_events(emit_old_object_samples, emit_event_shutdown, thread); + + if (thread->is_VM_thread()) { + const VM_Operation* const operation = VMThread::vm_operation(); + if (operation != nullptr && operation->type() == VM_Operation::VMOp_JFROldObject) { + // We will not be able to issue a rotation because the rotation lock + // is held by the JFR Recorder Thread that issued the VM_Operation. + log_warning(jfr, system) + ("The VM Thread crashed as part of emitting leak profiler events so no jfr emergency dump will be generated."); + return; + } + } + + release_locks(thread); + // if JavaThread, transition to _thread_in_native to issue a final flushpoint NoHandleMark nhm; jtivm.transition_to_native(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ static const char* chunk_path(const char* repository_path); static void on_vm_error(const char* repository_path); static void on_vm_error_report(outputStream* st, const char* repository_path); - static void on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown); + static void on_vm_shutdown(bool exception_handler, bool oom); }; #endif // SHARE_JFR_RECORDER_REPOSITORY_JFREMERGENCYDUMP_HPP diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved. * 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,8 @@ (MSGBIT(MSG_START)) | \ (MSGBIT(MSG_CLONE_IN_MEMORY)) | \ (MSGBIT(MSG_VM_ERROR)) | \ - (MSGBIT(MSG_FLUSHPOINT)) \ + (MSGBIT(MSG_FLUSHPOINT)) | \ + (MSGBIT(MSG_EMIT_LEAKP_REFCHAINS)) \ ) static JfrPostBox* _instance = nullptr; @@ -165,7 +166,7 @@ assert(JfrMsg_lock->owned_by_self(), "incrementing _msg_handled_serial is protected by JfrMsg_lock."); // Update made visible on release of JfrMsg_lock via fence instruction in Monitor::IUnlock. ++_msg_handled_serial; - JfrMsg_lock->notify(); + JfrMsg_lock->notify_all(); } // safeguard to ensure no threads are left waiting diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrPostBox.hpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrPostBox.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrPostBox.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrPostBox.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved. * 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,6 +43,7 @@ MSG_SHUTDOWN, MSG_VM_ERROR, MSG_FLUSHPOINT, + MSG_EMIT_LEAKP_REFCHAINS, MSG_NO_OF_MSGS }; @@ -51,23 +52,25 @@ * * Synchronous messages (posting thread waits for message completion): * - * MSG_CLONE_IN_MEMORY (0) ; MSGBIT(MSG_CLONE_IN_MEMORY) == (1 << 0) == 0x1 - * MSG_START(1) ; MSGBIT(MSG_START) == (1 << 0x1) == 0x2 - * MSG_STOP (2) ; MSGBIT(MSG_STOP) == (1 << 0x2) == 0x4 - * MSG_ROTATE (3) ; MSGBIT(MSG_ROTATE) == (1 << 0x3) == 0x8 - * MSG_VM_ERROR (8) ; MSGBIT(MSG_VM_ERROR) == (1 << 0x8) == 0x100 - * MSG_FLUSHPOINT (9) ; MSGBIT(MSG_FLUSHPOINT) == (1 << 0x9) == 0x200 + * MSG_CLONE_IN_MEMORY (0) ; MSGBIT(MSG_CLONE_IN_MEMORY) == (1 << 0) == 0x1 + * MSG_START(1) ; MSGBIT(MSG_START) == (1 << 0x1) == 0x2 + * MSG_STOP (2) ; MSGBIT(MSG_STOP) == (1 << 0x2) == 0x4 + * MSG_ROTATE (3) ; MSGBIT(MSG_ROTATE) == (1 << 0x3) == 0x8 + * MSG_VM_ERROR (8) ; MSGBIT(MSG_VM_ERROR) == (1 << 0x8) == 0x100 + * MSG_FLUSHPOINT (9) ; MSGBIT(MSG_FLUSHPOINT) == (1 << 0x9) == 0x200 + * MSG_EMIT_LEAKP_REFCHAINS (10); MSGBIT(MSG_EMIT_LEAKP_REFCHAINS) == (1 << 0xa) == 0x400 * * Asynchronous messages (posting thread returns immediately upon deposit): * - * MSG_FULLBUFFER (4) ; MSGBIT(MSG_FULLBUFFER) == (1 << 0x4) == 0x10 - * MSG_CHECKPOINT (5) ; MSGBIT(CHECKPOINT) == (1 << 0x5) == 0x20 - * MSG_WAKEUP (6) ; MSGBIT(WAKEUP) == (1 << 0x6) == 0x40 - * MSG_SHUTDOWN (7) ; MSGBIT(MSG_SHUTDOWN) == (1 << 0x7) == 0x80 + * MSG_FULLBUFFER (4) ; MSGBIT(MSG_FULLBUFFER) == (1 << 0x4) == 0x10 + * MSG_CHECKPOINT (5) ; MSGBIT(CHECKPOINT) == (1 << 0x5) == 0x20 + * MSG_WAKEUP (6) ; MSGBIT(WAKEUP) == (1 << 0x6) == 0x40 + * MSG_SHUTDOWN (7) ; MSGBIT(MSG_SHUTDOWN) == (1 << 0x7) == 0x80 */ class JfrPostBox : public JfrCHeapObj { friend class JfrRecorder; + friend class JfrRecorderService; public: void post(JFR_Msg msg); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. * 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,6 +54,7 @@ #include "runtime/safepoint.hpp" #include "runtime/vmOperations.hpp" #include "runtime/vmThread.hpp" +#include "utilities/growableArray.hpp" // incremented on each flushpoint static u8 flushpoint_id = 0; @@ -413,6 +414,7 @@ JfrRecorderService::JfrRecorderService() : _checkpoint_manager(JfrCheckpointManager::instance()), _chunkwriter(JfrRepository::chunkwriter()), + _post_box(JfrPostBox::instance()), _repository(JfrRepository::instance()), _stack_trace_repository(JfrStackTraceRepository::instance()), _storage(JfrStorage::instance()), @@ -531,6 +533,7 @@ return; } if (msgs & MSGBIT(MSG_VM_ERROR)) { + stop(); vm_error_rotation(); return; } @@ -690,17 +693,173 @@ JfrChunkRotation::evaluate(_chunkwriter); } -void JfrRecorderService::emit_leakprofiler_events(int64_t cutoff_ticks, bool emit_all, bool skip_bfs) { - DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(JavaThread::current())); - // Take the rotation lock to exclude flush() during event emits. This is because event emit - // also creates a number checkpoint events. Those checkpoint events require a future typeset checkpoint - // event for completeness, i.e. to be generated before being flushed to a segment. +// LeakProfiler event serialization support. + +struct JfrLeakProfilerEmitRequest { + int64_t cutoff_ticks; + bool emit_all; + bool skip_bfs; + bool oom; +}; + +typedef GrowableArrayCHeap<JfrLeakProfilerEmitRequest, mtTracing> JfrLeakProfilerEmitRequestQueue; +static JfrLeakProfilerEmitRequestQueue* _queue = nullptr; +constexpr const static int64_t _no_path_to_gc_roots = 0; +static bool _oom_emit_request_posted = false; +static bool _oom_emit_request_delivered = false; + +static inline bool exclude_paths_to_gc_roots(int64_t cutoff_ticks) { + return cutoff_ticks <= _no_path_to_gc_roots; +} + +static void enqueue(const JfrLeakProfilerEmitRequest& request) { + assert(JfrRotationLock::is_owner(), "invariant"); + if (_queue == nullptr) { + _queue = new JfrLeakProfilerEmitRequestQueue(4); + } + assert(_queue != nullptr, "invariant"); + assert(!_oom_emit_request_posted, "invariant"); + if (request.oom) { + _oom_emit_request_posted = true; + } + _queue->append(request); +} + +static JfrLeakProfilerEmitRequest dequeue() { + assert(JfrRotationLock::is_owner(), "invariant"); + assert(_queue != nullptr, "invariant"); + assert(_queue->is_nonempty(), "invariant"); + const JfrLeakProfilerEmitRequest& request = _queue->first(); + _queue->remove_at(0); + return request; +} + +// This version of emit excludes path-to-gc-roots, i.e. it skips reference chains. +static void emit_leakprofiler_events(bool emit_all, bool skip_bfs, JavaThread* jt) { + assert(jt != nullptr, "invariant"); + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(jt)); + // Take the rotation lock to exclude flush() during event emits. This is because the event emit operation + // also creates a number of checkpoint events. Those checkpoint events require a future typeset checkpoint + // event for completeness, i.e., to be generated before being flushed to a segment. // The upcoming flush() or rotation() after event emit completes this typeset checkpoint - // and serializes all event emit checkpoint events to the same segment. + // and serializes all checkpoint events to the same segment. JfrRotationLock lock; + // Take the rotation lock before the thread transition, to avoid blocking safepoints. + if (_oom_emit_request_posted) { + // A request to emit leakprofiler events in response to CrashOnOutOfMemoryError + // is pending or has already been completed. We are about to crash at any time now. + assert(CrashOnOutOfMemoryError, "invariant"); + return; + } + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, jt)); + ThreadInVMfromNative transition(jt); + // Since we are not requesting path-to-gc-roots, i.e., reference chains, we need not issue a VM_Operation. + // Therefore, we can let the requesting thread process the request directly, since it already holds the requisite lock. + LeakProfiler::emit_events(_no_path_to_gc_roots, emit_all, skip_bfs); +} + +void JfrRecorderService::transition_and_post_leakprofiler_emit_msg(JavaThread* jt) { + assert(jt != nullptr, "invariant"); + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(jt);) + assert(!JfrRotationLock::is_owner(), "invariant"); + // Transition to _thread_in_VM and post a synchronous message to the JFR Recorder Thread + // for it to process our enqueued request, which includes paths-to-gc-roots, i.e., reference chains. + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, jt)); + ThreadInVMfromNative transition(jt); + _post_box.post(MSG_EMIT_LEAKP_REFCHAINS); +} + +// This version of emit includes path-to-gc-roots, i.e., it includes in the request traversing of reference chains. +// Traversing reference chains is performed as part of a VM_Operation, and we initiate it from the JFR Recorder Thread. +// Because multiple threads can concurrently report_on_java_out_of_memory(), having them all post a synchronous JFR msg, +// they rendezvous at a safepoint in a convenient state, ThreadBlockInVM. This mechanism prevents any thread from racing past +// this point and begin executing VMError::report_and_die(), until at least one oom request has been delivered. +void JfrRecorderService::emit_leakprofiler_events_paths_to_gc_roots(int64_t cutoff_ticks, + bool emit_all, + bool skip_bfs, + bool oom, + JavaThread* jt) { + assert(jt != nullptr, "invariant"); + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(jt);) + assert(!exclude_paths_to_gc_roots(cutoff_ticks), "invariant"); + + { + JfrRotationLock lock; + // Take the rotation lock to read and post a request for the JFR Recorder Thread. + if (_oom_emit_request_posted) { + if (!oom) { + // A request to emit leakprofiler events in response to CrashOnOutOfMemoryError + // is pending or has already been completed. We are about to crash at any time now. + assert(CrashOnOutOfMemoryError, "invariant"); + return; + } + } else { + assert(!_oom_emit_request_posted, "invariant"); + JfrLeakProfilerEmitRequest request = { cutoff_ticks, emit_all, skip_bfs, oom }; + enqueue(request); + } + } + JfrRecorderService service; + service.transition_and_post_leakprofiler_emit_msg(jt); +} + +// Leakprofiler serialization request, the jdk.jfr.internal.JVM.emitOldObjectSamples() Java entry point. +void JfrRecorderService::emit_leakprofiler_events(int64_t cutoff_ticks, + bool emit_all, + bool skip_bfs) { + JavaThread* const jt = JavaThread::current(); + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(jt);) + if (exclude_paths_to_gc_roots(cutoff_ticks)) { + ::emit_leakprofiler_events(emit_all, skip_bfs, jt); + return; + } + emit_leakprofiler_events_paths_to_gc_roots(cutoff_ticks, emit_all, skip_bfs, /* oom */ false, jt); +} + +// Leakprofiler serialization request, the report_on_java_out_of_memory VM entry point. +void JfrRecorderService::emit_leakprofiler_events_on_oom() { + assert(CrashOnOutOfMemoryError, "invariant"); + if (EventOldObjectSample::is_enabled()) { + JavaThread* const jt = JavaThread::current(); + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(jt);) + ThreadToNativeFromVM transition(jt); + emit_leakprofiler_events_paths_to_gc_roots(max_jlong, false, false, /* oom */ true, jt); + } +} + +// The worker routine for the JFR Recorder Thread when processing MSG_EMIT_LEAKP_REFCHAINS messages. +void JfrRecorderService::emit_leakprofiler_events() { + JavaThread* const jt = JavaThread::current(); + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(jt)); // Take the rotation lock before the transition. - JavaThread* current_thread = JavaThread::current(); - MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, current_thread)); - ThreadInVMfromNative transition(current_thread); - LeakProfiler::emit_events(cutoff_ticks, emit_all, skip_bfs); + JfrRotationLock lock; + if (_oom_emit_request_delivered) { + // A request to emit leakprofiler events in response to CrashOnOutOfMemoryError + // has already been completed. We are about to crash at any time now. + assert(_oom_emit_request_posted, "invariant"); + assert(CrashOnOutOfMemoryError, "invariant"); + return; + } + + assert(_queue->is_nonempty(), "invariant"); + + { + MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, jt)); + ThreadInVMfromNative transition(jt); + while (_queue->is_nonempty()) { + const JfrLeakProfilerEmitRequest& request = dequeue(); + LeakProfiler::emit_events(request.cutoff_ticks, request.emit_all, request.skip_bfs); + if (_oom_emit_request_posted && request.oom) { + assert(CrashOnOutOfMemoryError, "invariant"); + _oom_emit_request_delivered = true; + break; + } + } + } + + // If processing involved an out-of-memory request, issue an immediate flush operation. + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_native(jt)); + if (_chunkwriter.is_valid() && _oom_emit_request_delivered) { + invoke_flush(); + } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrRecorderService.hpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrRecorderService.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrRecorderService.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrRecorderService.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. * 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,19 +27,23 @@ #include "jfr/utilities/jfrAllocation.hpp" +class JavaThread; class JfrCheckpointManager; class JfrChunkWriter; +class JfrPostBox; class JfrRepository; class JfrStackTraceRepository; class JfrStorage; class JfrStringPool; class JfrRecorderService : public StackObj { + friend class Jfr; friend class JfrSafepointClearVMOperation; friend class JfrSafepointWriteVMOperation; private: JfrCheckpointManager& _checkpoint_manager; JfrChunkWriter& _chunkwriter; + JfrPostBox& _post_box; JfrRepository& _repository; JfrStackTraceRepository& _stack_trace_repository; JfrStorage& _storage; @@ -64,6 +68,14 @@ void invoke_safepoint_write(); void post_safepoint_write(); + void transition_and_post_leakprofiler_emit_msg(JavaThread* jt); + + static void emit_leakprofiler_events_on_oom(); + static void emit_leakprofiler_events_paths_to_gc_roots(int64_t cutoff_ticks, + bool emit_all, + bool skip_bfs, + bool oom, + JavaThread* jt); public: JfrRecorderService(); void start(); @@ -72,8 +84,12 @@ void flushpoint(); void process_full_buffers(); void evaluate_chunk_size_for_rotation(); - void emit_leakprofiler_events(int64_t cutoff_ticks, bool emit_all, bool skip_bfs); + void emit_leakprofiler_events(); + static bool is_recording(); + static void emit_leakprofiler_events(int64_t cutoff_ticks, + bool emit_all, + bool skip_bfs); }; #endif // SHARE_JFR_RECORDER_SERVICE_JFRRECORDERSERVICE_HPP diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2026, Oracle and/or its affiliates. All rights reserved. * 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,6 +45,7 @@ #define ROTATE (msgs & (MSGBIT(MSG_ROTATE)|MSGBIT(MSG_STOP))) #define FLUSHPOINT (msgs & (MSGBIT(MSG_FLUSHPOINT))) #define PROCESS_FULL_BUFFERS (msgs & (MSGBIT(MSG_ROTATE)|MSGBIT(MSG_STOP)|MSGBIT(MSG_FULLBUFFER))) + #define LEAKPROFILER_REFCHAINS (msgs & MSGBIT(MSG_EMIT_LEAKP_REFCHAINS)) JfrPostBox& post_box = JfrRecorderThreadEntry::post_box(); log_debug(jfr, system)("Recorder thread STARTED"); @@ -71,6 +72,9 @@ if (PROCESS_FULL_BUFFERS) { service.process_full_buffers(); } + if (LEAKPROFILER_REFCHAINS) { + service.emit_leakprofiler_events(); + } // Check amount of data written to chunk already // if it warrants asking for a new chunk. service.evaluate_chunk_size_for_rotation(); @@ -99,5 +103,5 @@ #undef ROTATE #undef FLUSHPOINT #undef PROCESS_FULL_BUFFERS - #undef SCAVENGE + #undef LEAKPROFILER_REFCHAINS } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jfr/support/jfrThreadLocal.cpp openjdk-25-25.0.3+9/src/hotspot/share/jfr/support/jfrThreadLocal.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jfr/support/jfrThreadLocal.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jfr/support/jfrThreadLocal.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -656,7 +656,7 @@ } void JfrThreadLocal::deallocate_cpu_time_jfr_queue() { - cpu_time_jfr_queue().resize(0); + cpu_time_jfr_queue().set_capacity(0); } void JfrThreadLocal::set_do_async_processing_of_cpu_time_jfr_requests(bool wants) { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1207,7 +1207,7 @@ assert(JVMCIENV->isa_HotSpotNmethod(installed_code_handle), "wrong type"); // Clear the link to an old nmethod first JVMCIObject nmethod_mirror = installed_code_handle; - JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, true, nmethod::ChangeReason::JVMCI_replacing_with_new_code, JVMCI_CHECK_0); + JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, true, nmethod::InvalidationReason::JVMCI_REPLACED_WITH_NEW_CODE, JVMCI_CHECK_0); } else { assert(JVMCIENV->isa_InstalledCode(installed_code_handle), "wrong type"); } @@ -1218,6 +1218,14 @@ return result; C2V_END +C2V_VMENTRY_0(jobject, getInvalidationReasonDescription, (JNIEnv *env, jobject, jint invalidation_reason)) + HandleMark hm(THREAD); + JNIHandleMark jni_hm(thread); + nmethod::InvalidationReason reason = static_cast<nmethod::InvalidationReason>(invalidation_reason); + JVMCIObject desc = JVMCIENV->create_string(nmethod::invalidation_reason_to_string(reason), JVMCI_CHECK_NULL); + return JVMCIENV->get_jobject(desc); +C2V_END + C2V_VMENTRY(void, resetCompilationStatistics, (JNIEnv* env, jobject)) JVMCICompiler* compiler = JVMCICompiler::instance(true, CHECK); CompilerStatistics* stats = compiler->stats(); @@ -1383,7 +1391,7 @@ nmethod* code = method->code(); if (code != nullptr) { - code->make_not_entrant(nmethod::ChangeReason::JVMCI_reprofile); + code->make_not_entrant(nmethod::InvalidationReason::JVMCI_REPROFILE); } MethodData* method_data = method->method_data(); @@ -1396,9 +1404,14 @@ C2V_END -C2V_VMENTRY(void, invalidateHotSpotNmethod, (JNIEnv* env, jobject, jobject hs_nmethod, jboolean deoptimize)) +C2V_VMENTRY(void, invalidateHotSpotNmethod, (JNIEnv* env, jobject, jobject hs_nmethod, jboolean deoptimize, jint invalidation_reason)) + int first = static_cast<int>(nmethod::InvalidationReason::C1_CODEPATCH); + int last = static_cast<int>(nmethod::InvalidationReason::INVALIDATION_REASONS_COUNT); + if (invalidation_reason < first || invalidation_reason >= last) { + JVMCI_THROW_MSG(IllegalArgumentException, err_msg("Invalid invalidation_reason: %d", invalidation_reason)); + } JVMCIObject nmethod_mirror = JVMCIENV->wrap(hs_nmethod); - JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, deoptimize, nmethod::ChangeReason::JVMCI_invalidate_nmethod, JVMCI_CHECK); + JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, deoptimize, static_cast<nmethod::InvalidationReason>(invalidation_reason), JVMCI_CHECK); C2V_END C2V_VMENTRY_NULL(jlongArray, collectCounters, (JNIEnv* env, jobject)) @@ -1823,7 +1836,7 @@ if (!fst.current()->is_compiled_frame()) { JVMCI_THROW_MSG(IllegalStateException, "compiled stack frame expected"); } - fst.current()->cb()->as_nmethod()->make_not_entrant(nmethod::ChangeReason::JVMCI_materialize_virtual_object); + fst.current()->cb()->as_nmethod()->make_not_entrant(nmethod::InvalidationReason::JVMCI_MATERIALIZE_VIRTUAL_OBJECT); } Deoptimization::deoptimize(thread, *fst.current(), Deoptimization::Reason_none); // look for the frame again as it has been updated by deopt (pc, deopt state...) @@ -3352,6 +3365,7 @@ {CC "getResolvedJavaType0", CC "(Ljava/lang/Object;JZ)" HS_KLASS, FN_PTR(getResolvedJavaType0)}, {CC "readConfiguration", CC "()[" OBJECT, FN_PTR(readConfiguration)}, {CC "installCode0", CC "(JJZ" HS_COMPILED_CODE "[" OBJECT INSTALLED_CODE "J[B)I", FN_PTR(installCode0)}, + {CC "getInvalidationReasonDescription", CC "(I)" STRING, FN_PTR(getInvalidationReasonDescription)}, {CC "getInstallCodeFlags", CC "()I", FN_PTR(getInstallCodeFlags)}, {CC "resetCompilationStatistics", CC "()V", FN_PTR(resetCompilationStatistics)}, {CC "disassembleCodeBlob", CC "(" INSTALLED_CODE ")" STRING, FN_PTR(disassembleCodeBlob)}, @@ -3360,7 +3374,7 @@ {CC "getLocalVariableTableStart", CC "(" HS_METHOD2 ")J", FN_PTR(getLocalVariableTableStart)}, {CC "getLocalVariableTableLength", CC "(" HS_METHOD2 ")I", FN_PTR(getLocalVariableTableLength)}, {CC "reprofile", CC "(" HS_METHOD2 ")V", FN_PTR(reprofile)}, - {CC "invalidateHotSpotNmethod", CC "(" HS_NMETHOD "Z)V", FN_PTR(invalidateHotSpotNmethod)}, + {CC "invalidateHotSpotNmethod", CC "(" HS_NMETHOD "ZI)V", FN_PTR(invalidateHotSpotNmethod)}, {CC "collectCounters", CC "()[J", FN_PTR(collectCounters)}, {CC "getCountersSize", CC "()I", FN_PTR(getCountersSize)}, {CC "setCountersSize", CC "(I)Z", FN_PTR(setCountersSize)}, diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.cpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciEnv.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciEnv.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1750,7 +1750,7 @@ } -void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, nmethod::ChangeReason change_reason, JVMCI_TRAPS) { +void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, nmethod::InvalidationReason invalidation_reason, JVMCI_TRAPS) { if (mirror.is_null()) { JVMCI_THROW(NullPointerException); } @@ -1773,7 +1773,7 @@ if (!deoptimize) { // Prevent future executions of the nmethod but let current executions complete. - nm->make_not_entrant(change_reason); + nm->make_not_entrant(invalidation_reason); // Do not clear the address field here as the Java code may still // want to later call this method with deoptimize == true. That requires @@ -1782,7 +1782,7 @@ // Deoptimize the nmethod immediately. DeoptimizationScope deopt_scope; deopt_scope.mark(nm); - nm->make_not_entrant(change_reason); + nm->make_not_entrant(invalidation_reason); nm->make_deoptimized(); deopt_scope.deoptimize_marked(); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.hpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciEnv.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciEnv.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -462,7 +462,7 @@ // field of `mirror` to prevent it from being called. // If `deoptimize` is true, the nmethod is immediately deoptimized. // The HotSpotNmethod.address field is zero upon returning. - void invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimze, nmethod::ChangeReason change_reason, JVMCI_TRAPS); + void invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimze, nmethod::InvalidationReason invalidation_reason, JVMCI_TRAPS); void initialize_installed_code(JVMCIObject installed_code, CodeBlob* cb, JVMCI_TRAPS); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciJavaClasses.hpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciJavaClasses.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciJavaClasses.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciJavaClasses.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -102,6 +102,7 @@ boolean_field(HotSpotNmethod, isDefault) \ long_field(HotSpotNmethod, compileIdSnapshot) \ object_field(HotSpotNmethod, method, "Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl;") \ + int_field(HotSpotNmethod, invalidationReason) \ jvmci_constructor(HotSpotNmethod, "(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl;Ljava/lang/String;ZJ)V") \ end_class \ start_class(HotSpotCompiledCode, jdk_vm_ci_hotspot_HotSpotCompiledCode) \ diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.cpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciRuntime.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciRuntime.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -797,7 +797,7 @@ Universe::heap()->register_nmethod(nm); } -void JVMCINMethodData::invalidate_nmethod_mirror(nmethod* nm) { +void JVMCINMethodData::invalidate_nmethod_mirror(nmethod* nm, nmethod::InvalidationReason invalidation_reason) { oop nmethod_mirror = get_nmethod_mirror(nm); if (nmethod_mirror == nullptr) { return; @@ -816,12 +816,20 @@ HotSpotJVMCI::InstalledCode::set_address(jvmciEnv, nmethod_mirror, 0); HotSpotJVMCI::InstalledCode::set_entryPoint(jvmciEnv, nmethod_mirror, 0); HotSpotJVMCI::HotSpotInstalledCode::set_codeStart(jvmciEnv, nmethod_mirror, 0); + if (HotSpotJVMCI::HotSpotNmethod::invalidationReason(jvmciEnv, nmethod_mirror) == + static_cast<int>(nmethod::InvalidationReason::NOT_INVALIDATED)) { + HotSpotJVMCI::HotSpotNmethod::set_invalidationReason(jvmciEnv, nmethod_mirror, static_cast<int>(invalidation_reason)); + } } else if (nm->is_not_entrant()) { // Zero the entry point so any new invocation will fail but keep // the address link around that so that existing activations can // be deoptimized via the mirror (i.e. JVMCIEnv::invalidate_installed_code). HotSpotJVMCI::InstalledCode::set_entryPoint(jvmciEnv, nmethod_mirror, 0); HotSpotJVMCI::HotSpotInstalledCode::set_codeStart(jvmciEnv, nmethod_mirror, 0); + if (HotSpotJVMCI::HotSpotNmethod::invalidationReason(jvmciEnv, nmethod_mirror) == + static_cast<int>(nmethod::InvalidationReason::NOT_INVALIDATED)) { + HotSpotJVMCI::HotSpotNmethod::set_invalidationReason(jvmciEnv, nmethod_mirror, static_cast<int>(invalidation_reason)); + } } } @@ -2184,7 +2192,7 @@ tty->print_cr("Replacing method %s", method_name); } if (old != nullptr) { - old->make_not_entrant(nmethod::ChangeReason::JVMCI_register_method); + old->make_not_entrant(nmethod::InvalidationReason::JVMCI_REPLACED_WITH_NEW_CODE); } LogTarget(Info, nmethod, install) lt; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.hpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciRuntime.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/jvmciRuntime.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -121,7 +121,7 @@ // Clears the HotSpotNmethod.address field in the mirror. If nm // is dead, the HotSpotNmethod.entryPoint field is also cleared. - void invalidate_nmethod_mirror(nmethod* nm); + void invalidate_nmethod_mirror(nmethod* nm, nmethod::InvalidationReason invalidation_reason); // Gets the mirror from nm's oops table. oop get_nmethod_mirror(nmethod* nm); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/jvmci/vmStructs_jvmci.cpp openjdk-25-25.0.3+9/src/hotspot/share/jvmci/vmStructs_jvmci.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/jvmci/vmStructs_jvmci.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/jvmci/vmStructs_jvmci.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -564,7 +564,30 @@ declare_constant_with_value("LockStack::_end_offset", LockStack::end_offset()) \ declare_constant_with_value("OMCache::oop_to_oop_difference", OMCache::oop_to_oop_difference()) \ declare_constant_with_value("OMCache::oop_to_monitor_difference", OMCache::oop_to_monitor_difference()) \ - \ + \ + declare_constant(nmethod::InvalidationReason::NOT_INVALIDATED) \ + declare_constant(nmethod::InvalidationReason::C1_CODEPATCH) \ + declare_constant(nmethod::InvalidationReason::C1_DEOPTIMIZE) \ + declare_constant(nmethod::InvalidationReason::C1_DEOPTIMIZE_FOR_PATCHING) \ + declare_constant(nmethod::InvalidationReason::C1_PREDICATE_FAILED_TRAP) \ + declare_constant(nmethod::InvalidationReason::CI_REPLAY) \ + declare_constant(nmethod::InvalidationReason::UNLOADING) \ + declare_constant(nmethod::InvalidationReason::UNLOADING_COLD) \ + declare_constant(nmethod::InvalidationReason::JVMCI_INVALIDATE) \ + declare_constant(nmethod::InvalidationReason::JVMCI_MATERIALIZE_VIRTUAL_OBJECT) \ + declare_constant(nmethod::InvalidationReason::JVMCI_REPLACED_WITH_NEW_CODE) \ + declare_constant(nmethod::InvalidationReason::JVMCI_REPROFILE) \ + declare_constant(nmethod::InvalidationReason::MARKED_FOR_DEOPTIMIZATION) \ + declare_constant(nmethod::InvalidationReason::MISSING_EXCEPTION_HANDLER) \ + declare_constant(nmethod::InvalidationReason::NOT_USED) \ + declare_constant(nmethod::InvalidationReason::OSR_INVALIDATION_BACK_BRANCH) \ + declare_constant(nmethod::InvalidationReason::OSR_INVALIDATION_FOR_COMPILING_WITH_C1) \ + declare_constant(nmethod::InvalidationReason::OSR_INVALIDATION_OF_LOWER_LEVEL) \ + declare_constant(nmethod::InvalidationReason::SET_NATIVE_FUNCTION) \ + declare_constant(nmethod::InvalidationReason::UNCOMMON_TRAP) \ + declare_constant(nmethod::InvalidationReason::WHITEBOX_DEOPTIMIZATION) \ + declare_constant(nmethod::InvalidationReason::ZOMBIE) \ + \ declare_constant(CodeInstaller::VERIFIED_ENTRY) \ declare_constant(CodeInstaller::UNVERIFIED_ENTRY) \ declare_constant(CodeInstaller::OSR_ENTRY) \ @@ -809,7 +832,6 @@ \ AARCH64_ONLY(declare_constant(NMethodPatchingType::stw_instruction_and_data_patch)) \ AARCH64_ONLY(declare_constant(NMethodPatchingType::conc_instruction_and_data_patch)) \ - AARCH64_ONLY(declare_constant(NMethodPatchingType::conc_data_patch)) \ \ declare_constant(ObjectMonitor::NO_OWNER) \ declare_constant(ObjectMonitor::ANONYMOUS_OWNER) \ diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.cpp openjdk-25-25.0.3+9/src/hotspot/share/oops/instanceKlass.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/oops/instanceKlass.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -312,12 +312,11 @@ ss.print("Nest host resolution of %s with host %s failed: ", this->external_name(), target_host_class); java_lang_Throwable::print(PENDING_EXCEPTION, &ss); - const char* msg = ss.as_string(true /* on C-heap */); constantPoolHandle cph(THREAD, constants()); - SystemDictionary::add_nest_host_error(cph, _nest_host_index, msg); + SystemDictionary::add_nest_host_error(cph, _nest_host_index, ss); CLEAR_PENDING_EXCEPTION; - log_trace(class, nestmates)("%s", msg); + log_trace(class, nestmates)("%s", ss.base()); } else { // A valid nest-host is an instance class in the current package that lists this // class as a nest member. If any of these conditions are not met the class is @@ -356,10 +355,9 @@ k->external_name(), k->class_loader_data()->loader_name_and_id(), error); - const char* msg = ss.as_string(true /* on C-heap */); constantPoolHandle cph(THREAD, constants()); - SystemDictionary::add_nest_host_error(cph, _nest_host_index, msg); - log_trace(class, nestmates)("%s", msg); + SystemDictionary::add_nest_host_error(cph, _nest_host_index, ss); + log_trace(class, nestmates)("%s", ss.base()); } } } else { @@ -3495,7 +3493,7 @@ for (int l = CompLevel_limited_profile; l < n->comp_level(); l++) { nmethod *inv = lookup_osr_nmethod(n->method(), n->osr_entry_bci(), l, true); if (inv != nullptr && inv->is_in_use()) { - inv->make_not_entrant(nmethod::ChangeReason::OSR_invalidation_of_lower_level); + inv->make_not_entrant(nmethod::InvalidationReason::OSR_INVALIDATION_OF_LOWER_LEVEL); } } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/oops/method.cpp openjdk-25-25.0.3+9/src/hotspot/share/oops/method.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/oops/method.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/oops/method.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1028,7 +1028,7 @@ // If so, we have to make it not_entrant. nmethod* nm = code(); // Put it into local variable to guard against concurrent updates if (nm != nullptr) { - nm->make_not_entrant(nmethod::ChangeReason::set_native_function); + nm->make_not_entrant(nmethod::InvalidationReason::SET_NATIVE_FUNCTION); } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/opto/addnode.cpp openjdk-25-25.0.3+9/src/hotspot/share/opto/addnode.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/opto/addnode.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/opto/addnode.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1425,8 +1425,10 @@ Node* x = add2->in(1); Node* con2 = add2->in(2); if (is_sub_con(con2)) { + // The graph could be dying (i.e. x is top) in which case type(x) is not a long. + const TypeLong* x_long = phase->type(x)->isa_long(); // Collapsed graph not equivalent if potential over/underflow -> bailing out (*) - if (can_overflow(phase->type(x)->is_long(), con1->get_long() + con2->get_long())) { + if (x_long == nullptr || can_overflow(x_long, con1->get_long() + con2->get_long())) { return nullptr; } Node* new_con = phase->transform(new AddLNode(con1, con2)); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/opto/chaitin.cpp openjdk-25-25.0.3+9/src/hotspot/share/opto/chaitin.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/opto/chaitin.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/opto/chaitin.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -2375,7 +2375,7 @@ tty->print_cr("saved fp register"); else if (return_addr == OptoReg::add(reg, 2*VMRegImpl::slots_per_word) && VerifyStackAtCalls) - tty->print_cr("0xBADB100D +VerifyStackAtCalls"); + tty->print_cr("<Majik cookie> +VerifyStackAtCalls"); else tty->print_cr("in_preserve"); } else if ((int)OptoReg::reg2stack(reg) < fixed_slots) { diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/opto/macro.cpp openjdk-25-25.0.3+9/src/hotspot/share/opto/macro.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/opto/macro.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/opto/macro.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -606,6 +606,11 @@ for (DUIterator_Fast kmax, k = use->fast_outs(kmax); k < kmax && can_eliminate; k++) { Node* n = use->fast_out(k); + if (n->is_Mem() && n->as_Mem()->is_mismatched_access()) { + DEBUG_ONLY(disq_node = n); + NOT_PRODUCT(fail_eliminate = "Mismatched access"); + can_eliminate = false; + } if (!n->is_Store() && n->Opcode() != Op_CastP2X && !bs->is_gc_pre_barrier_node(n) && !reduce_merge_precheck) { DEBUG_ONLY(disq_node = n;) if (n->is_Load() || n->is_LoadStore()) { @@ -743,6 +748,41 @@ } } +#ifdef ASSERT + // Verify if a value can be written into a field. + void verify_type_compatability(const Type* value_type, const Type* field_type) { + BasicType value_bt = value_type->basic_type(); + BasicType field_bt = field_type->basic_type(); + + // Primitive types must match. + if (is_java_primitive(value_bt) && value_bt == field_bt) { return; } + + // I have been struggling to make a similar assert for non-primitive + // types. I we can add one in the future. For now, I just let them + // pass without checks. + // In particular, I was struggling with a value that came from a call, + // and had only a non-null check CastPP. There was also a checkcast + // in the graph to verify the interface, but the corresponding + // CheckCastPP result was not updated in the stack slot, and so + // we ended up using the CastPP. That means that the field knows + // that it should get an oop from an interface, but the value lost + // that information, and so it is not a subtype. + // There may be other issues, feel free to investigate further! + if (!is_java_primitive(value_bt)) { return; } + + tty->print_cr("value not compatible for field: %s vs %s", + type2name(value_bt), + type2name(field_bt)); + tty->print("value_type: "); + value_type->dump(); + tty->cr(); + tty->print("field_type: "); + field_type->dump(); + tty->cr(); + assert(false, "value_type does not fit field_type"); + } +#endif + SafePointScalarObjectNode* PhaseMacroExpand::create_scalarized_object_description(AllocateNode *alloc, SafePointNode* sfpt) { // Fields of scalar objs are referenced only at the end // of regular debuginfo at the last (youngest) JVMS. @@ -859,6 +899,7 @@ field_val = transform_later(new DecodeNNode(field_val, field_val->get_ptr_type())); } } + DEBUG_ONLY(verify_type_compatability(field_val->bottom_type(), field_type);) sfpt->add_req(field_val); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/opto/superword.cpp openjdk-25-25.0.3+9/src/hotspot/share/opto/superword.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/opto/superword.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/opto/superword.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2577,6 +2577,11 @@ return false; } + // Since casts specifically change the type of a node, stay on the safe side and do not truncate them. + if (in->is_ConstraintCast()) { + return false; + } + // Cannot be truncated: switch (opc) { case Op_AbsI: @@ -2589,6 +2594,8 @@ case Op_RotateRight: case Op_RotateLeft: case Op_PopCountI: + case Op_ReverseBytesS: + case Op_ReverseBytesUS: case Op_ReverseBytesI: case Op_ReverseI: case Op_CountLeadingZerosI: @@ -2597,6 +2604,9 @@ case Op_IsFiniteD: case Op_IsInfiniteF: case Op_IsInfiniteD: + case Op_CmpLTMask: + case Op_RoundF: + case Op_RoundD: case Op_ExtractS: case Op_ExtractC: case Op_ExtractB: diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiAgentList.cpp openjdk-25-25.0.3+9/src/hotspot/share/prims/jvmtiAgentList.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiAgentList.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/prims/jvmtiAgentList.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -201,6 +201,11 @@ // Invokes Agent_OnAttach for agents loaded dynamically during runtime. void JvmtiAgentList::load_agent(const char* agent_name, bool is_absolute_path, const char* options, outputStream* st) { + if (JvmtiEnvBase::get_phase() != JVMTI_PHASE_LIVE) { + st->print_cr("Dynamic agent loading is only permitted in the live phase"); + return; + } + JvmtiAgent* const agent = new JvmtiAgent(agent_name, options, is_absolute_path, /* dynamic agent */ true); if (agent->load(st)) { add(agent); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiEventController.cpp openjdk-25-25.0.3+9/src/hotspot/share/prims/jvmtiEventController.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiEventController.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/prims/jvmtiEventController.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -785,9 +785,6 @@ assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check"); EC_TRACE(("[*] # set event callbacks")); - // May be changing the event handler for ObjectFree. - flush_object_free_events(env); - env->set_event_callbacks(callbacks, size_of_callbacks); jlong enabled_bits = env->env_event_enable()->_event_callback_enabled.get_bits(); @@ -1097,6 +1094,8 @@ // call the functionality without holding the JvmtiThreadState_lock. JvmtiEventControllerPrivate::set_event_callbacks(env, callbacks, size_of_callbacks); } else { + JvmtiEventControllerPrivate::flush_object_free_events(env); + MutexLocker mu(JvmtiThreadState_lock); JvmtiEventControllerPrivate::set_event_callbacks(env, callbacks, size_of_callbacks); } @@ -1184,6 +1183,8 @@ // call the functionality without holding the JvmtiThreadState_lock. JvmtiEventControllerPrivate::env_dispose(env); } else { + JvmtiEventControllerPrivate::flush_object_free_events(env); + MutexLocker mu(JvmtiThreadState_lock); JvmtiEventControllerPrivate::env_dispose(env); } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/prims/whitebox.cpp openjdk-25-25.0.3+9/src/hotspot/share/prims/whitebox.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/prims/whitebox.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/prims/whitebox.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -46,6 +46,7 @@ #include "gc/shared/concurrentGCBreakpoints.hpp" #include "gc/shared/gcConfig.hpp" #include "gc/shared/genArguments.hpp" +#include "jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp" #include "jvm.h" #include "jvmtifiles/jvmtiEnv.hpp" #include "logging/log.hpp" @@ -195,6 +196,10 @@ return 0; WB_END +WB_ENTRY(jlong, WB_GetMinimumJavaStackSize(JNIEnv* env, jobject o)) + return os::get_minimum_java_stack_size(); +WB_END + class WBIsKlassAliveClosure : public LockedClassesDo { Symbol* _name; int _count; @@ -504,6 +509,14 @@ return ConcurrentGCBreakpoints::run_to(c_name); WB_END +WB_ENTRY(jboolean, WB_HasExternalSymbolsStripped(JNIEnv* env, jobject o)) +#if defined(HAS_STRIPPED_DEBUGINFO) + return true; +#else + return false; +#endif +WB_END + #if INCLUDE_G1GC WB_ENTRY(jboolean, WB_G1IsHumongous(JNIEnv* env, jobject o, jobject obj)) @@ -794,7 +807,7 @@ if (_make_not_entrant) { nmethod* nm = CodeCache::find_nmethod(f->pc()); assert(nm != nullptr, "did not find nmethod"); - nm->make_not_entrant(nmethod::ChangeReason::whitebox_deoptimization); + nm->make_not_entrant(nmethod::InvalidationReason::WHITEBOX_DEOPTIMIZATION); } ++_result; } @@ -2683,6 +2696,23 @@ os::naked_short_sleep(time); WB_END +WB_ENTRY(void, WB_BusyWaitCPUTime(JNIEnv* env, jobject wb, jint time)) + ThreadToNativeFromVM ttn(thread); + u8 start = os::current_thread_cpu_time(); + u8 target_duration = time * (u8)1000000; + while (os::current_thread_cpu_time() - start < target_duration) { + for (volatile int i = 0; i < 1000000; i++); + } +WB_END + +WB_ENTRY(jboolean, WB_CPUSamplerSetOutOfStackWalking(JNIEnv* env, jobject wb, jboolean enable)) + #if defined(ASSERT) && INCLUDE_JFR && defined(LINUX) + return JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(enable == JNI_TRUE) ? JNI_TRUE : JNI_FALSE; + #else + return JNI_FALSE; + #endif +WB_END + WB_ENTRY(jstring, WB_GetLibcName(JNIEnv* env, jobject o)) ThreadToNativeFromVM ttn(thread); jstring info_string = env->NewStringUTF(XSTR(LIBC)); @@ -2761,6 +2791,7 @@ {CC"getVMLargePageSize", CC"()J", (void*)&WB_GetVMLargePageSize}, {CC"getHeapSpaceAlignment", CC"()J", (void*)&WB_GetHeapSpaceAlignment}, {CC"getHeapAlignment", CC"()J", (void*)&WB_GetHeapAlignment}, + {CC"hasExternalSymbolsStripped", CC"()Z", (void*)&WB_HasExternalSymbolsStripped}, {CC"countAliveClasses0", CC"(Ljava/lang/String;)I", (void*)&WB_CountAliveClasses }, {CC"getSymbolRefcount", CC"(Ljava/lang/String;)I", (void*)&WB_GetSymbolRefcount }, {CC"parseCommandLine0", @@ -3032,6 +3063,8 @@ {CC"isJVMTIIncluded", CC"()Z", (void*)&WB_IsJVMTIIncluded}, {CC"waitUnsafe", CC"(I)V", (void*)&WB_WaitUnsafe}, + {CC"busyWaitCPUTime", CC"(I)V", (void*)&WB_BusyWaitCPUTime}, + {CC"cpuSamplerSetOutOfStackWalking", CC"(Z)Z", (void*)&WB_CPUSamplerSetOutOfStackWalking}, {CC"getLibcName", CC"()Ljava/lang/String;", (void*)&WB_GetLibcName}, {CC"pinObject", CC"(Ljava/lang/Object;)V", (void*)&WB_PinObject}, @@ -3041,7 +3074,8 @@ {CC"cleanMetaspaces", CC"()V", (void*)&WB_CleanMetaspaces}, {CC"rss", CC"()J", (void*)&WB_Rss}, {CC"printString", CC"(Ljava/lang/String;I)Ljava/lang/String;", (void*)&WB_PrintString}, - {CC"lockAndStuckInSafepoint", CC"()V", (void*)&WB_TakeLockAndHangInSafepoint}, + {CC"lockAndStuckInSafepoint", CC"()V", (void*)&WB_TakeLockAndHangInSafepoint}, + {CC"getMinimumJavaStackSize", CC"()J", (void*)&WB_GetMinimumJavaStackSize}, {CC"wordSize", CC"()J", (void*)&WB_WordSize}, {CC"rootChunkWordSize", CC"()J", (void*)&WB_RootChunkWordSize}, {CC"isStatic", CC"()Z", (void*)&WB_IsStaticallyLinked} diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/abstract_vm_version.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/abstract_vm_version.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/abstract_vm_version.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/abstract_vm_version.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -283,6 +283,8 @@ #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.13 (VS2022)" #elif _MSC_VER == 1944 #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.14 (VS2022)" + #elif _MSC_VER == 1950 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 18.0 (VS2026)" #else #define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER) #endif diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/continuationEntry.hpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/continuationEntry.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/continuationEntry.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/continuationEntry.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -39,6 +39,7 @@ // Metadata stored in the continuation entry frame class ContinuationEntry { + friend class VMStructs; friend class JVMCIVMStructs; ContinuationEntryPD _pd; #ifdef ASSERT diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/deoptimization.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/deoptimization.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/deoptimization.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/deoptimization.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1382,6 +1382,9 @@ case T_INT: case T_FLOAT: { // 4 bytes. assert(value->type() == T_INT, "Agreement."); +#if INCLUDE_JVMCI + // big_value allows encoding double/long value as e.g. [int = 0, long], and storing + // the value in two array elements. bool big_value = false; if (i + 1 < sv->field_size() && type == T_INT) { if (sv->field_at(i)->is_location()) { @@ -1409,6 +1412,9 @@ } else { obj->int_at_put(index, value->get_jint()); } +#else // not INCLUDE_JVMCI + obj->int_at_put(index, value->get_jint()); +#endif // INCLUDE_JVMCI break; } @@ -1826,7 +1832,7 @@ #if INCLUDE_JVMCI address Deoptimization::deoptimize_for_missing_exception_handler(nmethod* nm) { // there is no exception handler for this pc => deoptimize - nm->make_not_entrant(nmethod::ChangeReason::missing_exception_handler); + nm->make_not_entrant(nmethod::InvalidationReason::MISSING_EXCEPTION_HANDLER); // Use Deoptimization::deoptimize for all of its side-effects: // gathering traps statistics, logging... @@ -2455,7 +2461,7 @@ // Recompile if (make_not_entrant) { - if (!nm->make_not_entrant(nmethod::ChangeReason::uncommon_trap)) { + if (!nm->make_not_entrant(nmethod::InvalidationReason::UNCOMMON_TRAP)) { return; // the call did not change nmethod's state } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/java.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/java.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/java.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/java.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -463,10 +463,7 @@ event.commit(); } - // 2nd argument (emit_event_shutdown) should be set to false - // because EventShutdown would be emitted at Threads::destroy_vm(). - // (one of the callers of before_exit()) - JFR_ONLY(Jfr::on_vm_shutdown(true, false, halt);) + JFR_ONLY(Jfr::on_vm_shutdown(false, halt);) // Stop the WatcherThread. We do this before disenrolling various // PeriodicTasks to reduce the likelihood of races. diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/javaThread.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/javaThread.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/javaThread.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/javaThread.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1339,7 +1339,7 @@ // it is a Java nmethod nmethod* nm = CodeCache::find_nmethod(fst.current()->pc()); assert(nm != nullptr, "did not find nmethod"); - nm->make_not_entrant(nmethod::ChangeReason::zombie); + nm->make_not_entrant(nmethod::InvalidationReason::ZOMBIE); } } } diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/os.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/os.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -2573,6 +2573,10 @@ return JNI_OK; } +jlong os::get_minimum_java_stack_size() { + return static_cast<jlong>(_java_thread_min_stack_allowed); +} + // Builds a platform dependent Agent_OnLoad_<lib_name> function name // which is used to find statically linked in agents. // Parameters: diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.hpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/os.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/os.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -397,6 +397,8 @@ static jint set_minimum_stack_sizes(); public: + // get allowed minimum java stack size + static jlong get_minimum_java_stack_size(); // Find committed memory region within specified range (start, start + size), // return true if found any static bool committed_in_range(address start, size_t size, address& committed_start, size_t& committed_size); diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/sharedRuntime.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/sharedRuntime.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/sharedRuntime.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/sharedRuntime.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -3364,7 +3364,7 @@ RegisterMap::WalkContinuation::skip); frame sender = fr.sender(&map); if (sender.is_interpreted_frame()) { - current->push_cont_fastpath(sender.sp()); + current->push_cont_fastpath(sender.unextended_sp()); } return buf; diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/runtime/vmStructs.cpp openjdk-25-25.0.3+9/src/hotspot/share/runtime/vmStructs.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/runtime/vmStructs.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/runtime/vmStructs.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -624,6 +624,7 @@ nonstatic_field(JavaThread, _active_handles, JNIHandleBlock*) \ nonstatic_field(JavaThread, _monitor_owner_id, int64_t) \ volatile_nonstatic_field(JavaThread, _terminated, JavaThread::TerminatedTypes) \ + nonstatic_field(JavaThread, _cont_entry, ContinuationEntry*) \ nonstatic_field(Thread, _osthread, OSThread*) \ \ /************/ \ @@ -806,7 +807,8 @@ nonstatic_field(Mutex, _name, const char*) \ static_field(Mutex, _mutex_array, Mutex**) \ static_field(Mutex, _num_mutex, int) \ - volatile_nonstatic_field(Mutex, _owner, Thread*) + volatile_nonstatic_field(Mutex, _owner, Thread*) \ + static_field(ContinuationEntry, _return_pc, address) //-------------------------------------------------------------------------------- // VM_TYPES @@ -1280,6 +1282,7 @@ declare_toplevel_type(FileMapHeader) \ declare_toplevel_type(CDSFileMapRegion) \ declare_toplevel_type(UpcallStub::FrameData) \ + declare_toplevel_type(ContinuationEntry) \ \ /************/ \ /* GC types */ \ diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/services/diagnosticCommand.cpp openjdk-25-25.0.3+9/src/hotspot/share/services/diagnosticCommand.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/services/diagnosticCommand.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/services/diagnosticCommand.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -22,8 +22,10 @@ * */ +#include "cds/cds_globals.hpp" #include "cds/cdsConfig.hpp" #include "cds/cds_globals.hpp" +#include "cds/metaspaceShared.hpp" #include "classfile/classLoaderDataGraph.hpp" #include "classfile/classLoaderHierarchyDCmd.hpp" #include "classfile/classLoaderStats.hpp" @@ -164,6 +166,7 @@ #if INCLUDE_CDS DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<DumpSharedArchiveDCmd>(full_export, true, false)); + DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<AOTEndRecordingDCmd>(full_export, true, false)); #endif // INCLUDE_CDS DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<NMTDCmd>(full_export, true, false)); @@ -986,6 +989,28 @@ } #if INCLUDE_CDS +void AOTEndRecordingDCmd::execute(DCmdSource source, TRAPS) { + if (!CDSConfig::is_dumping_preimage_static_archive()) { + output()->print_cr("AOT.end_recording is unsupported when VM flags -XX:AOTMode=record or -XX:AOTCacheOutput=<file> are missing."); + return; + } + + if (MetaspaceShared::preimage_static_archive_dumped()) { + output()->print_cr("Recording has already ended."); + return; + } + + MetaspaceShared::preload_and_dump(THREAD); + if (!MetaspaceShared::preimage_static_archive_dumped()) { + output()->print_cr("Error: Failed to end recording."); + return; + } + + output()->print_cr("Recording ended successfully."); +} +#endif // INCLUDE_CDS + +#if INCLUDE_CDS #define DEFAULT_CDS_ARCHIVE_FILENAME "java_pid%p_<subcmd>.jsa" DumpSharedArchiveDCmd::DumpSharedArchiveDCmd(outputStream* output, bool heap) : diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/services/diagnosticCommand.hpp openjdk-25-25.0.3+9/src/hotspot/share/services/diagnosticCommand.hpp --- openjdk-25-25.0.2+10/src/hotspot/share/services/diagnosticCommand.hpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/services/diagnosticCommand.hpp 2026-04-17 19:08:13.000000000 +0000 @@ -326,6 +326,21 @@ }; #if INCLUDE_CDS +class AOTEndRecordingDCmd : public DCmd { +public: + AOTEndRecordingDCmd(outputStream* output, bool heap) : DCmd(output, heap) { } + static const char* name() { return "AOT.end_recording"; } + static const char* description() { + return "End AOT recording."; + } + static const char* impact() { + return "Medium: Pause time depends on number of loaded classes"; + } + virtual void execute(DCmdSource source, TRAPS); +}; +#endif // INCLUDE_CDS + +#if INCLUDE_CDS class DumpSharedArchiveDCmd: public DCmdWithParser { protected: DCmdArgument<char*> _suboption; // option of VM.cds diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/utilities/debug.cpp openjdk-25-25.0.3+9/src/hotspot/share/utilities/debug.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/utilities/debug.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/utilities/debug.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved. * 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,12 +63,17 @@ #include "utilities/nativeStackPrinter.hpp" #include "utilities/unsigned5.hpp" #include "utilities/vmError.hpp" +#if INCLUDE_JFR +#include "jfr/jfr.hpp" +#endif #include <stdio.h> #include <stdarg.h> -// These functions needs to be exported on Windows only -#define DEBUGEXPORT WINDOWS_ONLY(JNIEXPORT) +// These functions needs to be exported on Windows +// On Linux it is also beneficial to export them to avoid +// losing them e.g. with linktime gc +#define DEBUGEXPORT JNIEXPORT // Support for showing register content on asserts/guarantees. #ifdef CAN_SHOW_REGISTERS_ON_ASSERT @@ -262,6 +267,8 @@ void report_java_out_of_memory(const char* message) { static int out_of_memory_reported = 0; + JFR_ONLY(Jfr::on_report_java_out_of_memory();) + // A number of threads may attempt to report OutOfMemoryError at around the // same time. To avoid dumping the heap or executing the data collection // commands multiple times we just do it once when the first threads reports @@ -610,36 +617,60 @@ void pp(intptr_t p) { pp((void*)p); } void pp(oop p) { pp((void*)p); } -void help() { +extern "C" DEBUGEXPORT void help() { Command c("help"); tty->print_cr("basic"); - tty->print_cr(" pp(void* p) - try to make sense of p"); - tty->print_cr(" ps() - print current thread stack"); - tty->print_cr(" pss() - print all thread stacks"); - tty->print_cr(" pm(int pc) - print Method* given compiled PC"); - tty->print_cr(" findm(intptr_t pc) - finds Method*"); - tty->print_cr(" find(intptr_t x) - finds & prints nmethod/stub/bytecode/oop based on pointer into it"); - tty->print_cr(" pns(void* sp, void* fp, void* pc) - print native (i.e. mixed) stack trace. E.g."); - tty->print_cr(" pns($sp, $rbp, $pc) on Linux/amd64 or"); - tty->print_cr(" pns($sp, $ebp, $pc) on Linux/x86 or"); - tty->print_cr(" pns($sp, $fp, $pc) on Linux/AArch64 or"); - tty->print_cr(" pns($sp, 0, $pc) on Linux/ppc64 or"); - tty->print_cr(" pns($sp, $s8, $pc) on Linux/mips or"); - tty->print_cr(" pns($sp, $fp, $pc) on Linux/RISC-V"); + tty->print_cr(" pp(void* p) - try to make sense of p"); + tty->print_cr(" ps() - print current thread stack"); + tty->print_cr(" pss() - print all thread stacks"); + tty->print_cr(" findnm(intptr_t pc) - find nmethod*"); + tty->print_cr(" findm(intptr_t pc) - find Method*"); + tty->print_cr(" find(intptr_t x) - find & print nmethod/stub/bytecode/oop based on pointer into it"); + tty->print_cr(" findpc(intptr_t x) - find & print nmethod/stub/bytecode/oop based on pointer into it (verbose)"); + +#ifndef PRODUCT + tty->print_cr(" pns(void* sp, void* fp, void* pc) - print native (i.e. mixed) stack trace, e.g."); +#ifdef LINUX + AMD64_ONLY( tty->print_cr(" pns($sp, $rbp, $pc) on Linux/amd64")); + IA32_ONLY( tty->print_cr(" pns($sp, $ebp, $pc) on Linux/x86")); + AARCH64_ONLY(tty->print_cr(" pns($sp, $fp, $pc) on Linux/AArch64")); + RISCV_ONLY( tty->print_cr(" pns($sp, $fp, $pc) on Linux/RISC-V")); + PPC64_ONLY( tty->print_cr(" pns($sp, 0, $pc) on Linux/ppc64")); +#endif // LINUX tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()"); tty->print_cr(" - in dbx do 'frame 1' before calling pns()"); +#endif // !PRODUCT + + tty->print_cr("universe."); + tty->print_cr(" verify(intptr_t p) - run verify on Universe"); + tty->print_cr(" threads() - print all threads"); + tty->print_cr(" psd() - print system dictionary"); + tty->print_cr("class metadata."); tty->print_cr(" findclass(name_pattern, flags)"); tty->print_cr(" findmethod(class_name_pattern, method_pattern, flags)"); - tty->print_cr("misc."); - tty->print_cr(" flush() - flushes the log file"); - tty->print_cr(" events() - dump events from ring buffers"); + tty->print_cr("method metadata."); + tty->print_cr(" blob(CodeBlob* p) - print CodeBlob"); + tty->print_cr(" dump_vtable(address p) - dump vtable of the Klass"); + tty->print_cr(" nm(intptr_t p) - find & print CodeBlob details"); + tty->print_cr(" disnm(intptr_t p) - find & print disassembly of CodeBlob"); + tty->print_cr(" printnm(intptr_t p) - print nmethod details"); + tty->print_cr(" findbcp(method, bcp) - find & prints bcp"); + + tty->print_cr("stack frame details."); + tty->print_cr(" pfl() - print frame layout"); + tty->print_cr(" psf() - print stack frames"); + tty->print_cr("misc."); + tty->print_cr(" flush() - flush the log file"); + tty->print_cr(" events() - dump events from ring buffers"); + tty->print_cr(" u5decode(intptr_t addr) - decode a single u5 value"); + tty->print_cr(" u5p(intptr_t addr, intptr_t limit, int count) - decode u5 values"); tty->print_cr("compiler debugging"); - tty->print_cr(" debug() - to set things up for compiler debugging"); - tty->print_cr(" ndebug() - undo debug"); + tty->print_cr(" debug() - set things up for compiler debugging"); + tty->print_cr(" ndebug() - undo debug"); } #ifndef PRODUCT diff -Nru openjdk-25-25.0.2+10/src/hotspot/share/utilities/vmError.cpp openjdk-25-25.0.3+9/src/hotspot/share/utilities/vmError.cpp --- openjdk-25-25.0.2+10/src/hotspot/share/utilities/vmError.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/hotspot/share/utilities/vmError.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2024 SAP SE. All rights reserved. * Copyright (c) 2023, 2025, Red Hat, Inc. and/or its affiliates. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1857,7 +1857,7 @@ log.set_fd(-1); } - JFR_ONLY(Jfr::on_vm_shutdown(static_cast<VMErrorType>(_id) == OOM_JAVA_HEAP_FATAL, true);) + JFR_ONLY(Jfr::on_vm_shutdown(true, false, static_cast<VMErrorType>(_id) == OOM_JAVA_HEAP_FATAL);) if (PrintNMTStatistics) { fdStream fds(fd_out); diff -Nru openjdk-25-25.0.2+10/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java openjdk-25-25.0.3+9/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java --- openjdk-25-25.0.2+10/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java 2026-04-17 19:08:13.000000000 +0000 @@ -156,22 +156,39 @@ @Override public long getCpuShares() { long sharesRaw = getLongVal("cpu.weight"); - if (sharesRaw == 100 || sharesRaw <= 0) { + // cg v2 value must be in range [1,10000] + if (sharesRaw == 100 || sharesRaw <= 0 || sharesRaw > 10000) { return CgroupSubsystem.LONG_RETVAL_UNLIMITED; } int shares = (int)sharesRaw; // CPU shares (OCI) value needs to get translated into // a proper Cgroups v2 value. See: - // https://github.com/containers/crun/blob/master/crun.1.md#cpu-controller + // https://github.com/containers/crun/blob/1.24/crun.1.md#cpu-controller // // Use the inverse of (x == OCI value, y == cgroupsv2 value): - // ((262142 * y - 1)/9999) + 2 = x + // y = 10^(log2(x)^2/612 + 125/612 * log2(x) - 7.0/34.0) // - int x = 262142 * shares - 1; - double frac = x/9999.0; - x = ((int)frac) + 2; + // By re-arranging it to the standard quadratic form: + // log2(x)^2 + 125 * log2(x) - (126 + 612 * log_10(y)) = 0 + // + // Therefore, log2(x) = (-125 + sqrt( 125^2 - 4 * (-(126 + 612 * log_10(y)))))/2 + // + // As a result we have the inverse (we can discount substraction of the + // square root value since those values result in very small numbers and the + // cpu shares values - OCI - are in range [2-262144]) + // + // x = 2^((-125 + sqrt(16129 + 2448* log10(y)))/2) + // + double logMultiplicand = Math.log10(shares); + double discriminant = 16129 + 2448 * logMultiplicand; + double squareRoot = Math.sqrt(discriminant); + double exponent = (-125 + squareRoot)/2; + double scaledValue = Math.pow(2, exponent); + + int x = (int)scaledValue; if ( x <= PER_CPU_SHARES ) { - return PER_CPU_SHARES; // mimic cgroups v1 + // Return the back-mapped value. + return x; } int f = x/PER_CPU_SHARES; int lower_multiple = f * PER_CPU_SHARES; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/PBES1Core.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +47,38 @@ private final MessageDigest md; private final String algo; private byte[] salt = null; - private int iCount = 10; + // RFC 8018 and NIST SP 800-132 sec 5.2 recommend 1000 as the minimum + private int iCount = PKCS12PBECipherCore.DEFAULT_COUNT; + + // utility method for checking weak salts of PBEWithMD5AndTripleDES cipher + private static boolean isWeak(byte[] s) { + // consider salts weak if it met both of the following conditions: + // 1) s[0...3] == s[4...7] + // 2) s[0] == s[3] && s[1] == s[2] + if (Arrays.equals(s, 0, 4, s, 4, 8)) { + return (s[0] == s[3]) && (s[1] == s[2]); + } + return false; + } + + // utility method for generating 8-byte salts + private static byte[] generateSalt(String algo, SecureRandom sr) { + byte[] salt = new byte[8]; + sr.nextBytes(salt); + // check and re-generate for DESede if necessary + if (algo.equals("DESede")) { + // prevent an infinite-loop in case of a rigged SecureRandom + int numAttempts = 50; + while (isWeak(salt)) { + sr.nextBytes(salt); + if (numAttempts-- < 0) { + throw new ProviderException( + "Unable to find salts after 50 attempts"); + } + } + } + return salt; + } /** * Creates an instance of PBE Cipher using the specified CipherSpi @@ -163,8 +194,7 @@ AlgorithmParameters getParameters() { AlgorithmParameters params; if (salt == null) { - salt = new byte[8]; - SunJCE.getRandom().nextBytes(salt); + salt = generateSalt(algo, SunJCE.getRandom()); } PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount); try { @@ -227,8 +257,7 @@ if (params == null) { // create random salt and use default iteration count - salt = new byte[8]; - random.nextBytes(salt); + salt = generateSalt(algo, random); } else { if (!(params instanceof PBEParameterSpec)) { throw new InvalidAlgorithmParameterException @@ -240,6 +269,15 @@ throw new InvalidAlgorithmParameterException ("Salt must be 8 bytes long"); } + // for DESede, reject weak salts for encryption + if (algo.equals("DESede") && + (opmode == Cipher.ENCRYPT_MODE || + opmode == Cipher.WRAP_MODE) && + isWeak(salt)) { + throw new InvalidAlgorithmParameterException( + "Weak salts cannot be used for encryption"); + } + iCount = ((PBEParameterSpec) params).getIterationCount(); if (iCount <= 0) { throw new InvalidAlgorithmParameterException diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +53,7 @@ private int iCount = 0; private static final int DEFAULT_SALT_LENGTH = 20; - private static final int DEFAULT_COUNT = 1024; + static final int DEFAULT_COUNT = 1024; static final int CIPHER_KEY = 1; static final int CIPHER_IV = 2; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/RSACipherAdaptor.java openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/RSACipherAdaptor.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/RSACipherAdaptor.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/RSACipherAdaptor.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 com.sun.crypto.provider; + +import java.io.ByteArrayOutputStream; +import java.security.MessageDigest; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.SignatureSpi; +import java.security.InvalidKeyException; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidParameterException; +import java.security.SignatureException; +import java.security.spec.AlgorithmParameterSpec; +import javax.crypto.Cipher; +import javax.crypto.BadPaddingException; +import javax.crypto.IllegalBlockSizeException; + +/** + * NONEwithRSA Signature implementation using the RSA/ECB/PKCS1Padding Cipher + * implementation from SunJCE. + */ +public final class RSACipherAdaptor extends SignatureSpi { + + private final RSACipher c; + private ByteArrayOutputStream verifyBuf; + + public RSACipherAdaptor() { + c = new RSACipher(); + } + + @Override + protected void engineInitVerify(PublicKey publicKey) + throws InvalidKeyException { + c.engineInit(Cipher.DECRYPT_MODE, publicKey, null); + if (verifyBuf == null) { + verifyBuf = new ByteArrayOutputStream(128); + } else { + verifyBuf.reset(); + } + } + + @Override + protected void engineInitSign(PrivateKey privateKey) + throws InvalidKeyException { + c.engineInit(Cipher.ENCRYPT_MODE, privateKey, null); + verifyBuf = null; + } + + @Override + protected void engineInitSign(PrivateKey privateKey, SecureRandom random) + throws InvalidKeyException { + c.engineInit(Cipher.ENCRYPT_MODE, privateKey, random); + verifyBuf = null; + } + + @Override + protected void engineUpdate(byte b) throws SignatureException { + engineUpdate(new byte[] {b}, 0, 1); + } + + @Override + protected void engineUpdate(byte[] b, int off, int len) + throws SignatureException { + if (verifyBuf != null) { + verifyBuf.write(b, off, len); + } else { + byte[] out = c.engineUpdate(b, off, len); + if ((out != null) && (out.length != 0)) { + throw new SignatureException + ("Cipher unexpectedly returned data"); + } + } + } + + @Override + protected byte[] engineSign() throws SignatureException { + try { + return c.engineDoFinal(null, 0, 0); + } catch (IllegalBlockSizeException | BadPaddingException e) { + throw new SignatureException("doFinal() failed", e); + } + } + + @Override + protected boolean engineVerify(byte[] sigBytes) throws SignatureException { + try { + byte[] out = c.engineDoFinal(sigBytes, 0, sigBytes.length); + byte[] data = verifyBuf.toByteArray(); + verifyBuf.reset(); + return MessageDigest.isEqual(out, data); + } catch (BadPaddingException e) { + // e.g. wrong public key used + // return false rather than throwing exception + return false; + } catch (IllegalBlockSizeException e) { + throw new SignatureException("doFinal() failed", e); + } + } + + @Override + protected void engineSetParameter(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + if (params != null) { + throw new InvalidParameterException("Parameters not supported"); + } + } + + @Override + @SuppressWarnings("deprecation") + protected void engineSetParameter(String param, Object value) + throws InvalidParameterException { + throw new InvalidParameterException("Parameters not supported"); + } + + @Override + @SuppressWarnings("deprecation") + protected Object engineGetParameter(String param) + throws InvalidParameterException { + throw new InvalidParameterException("Parameters not supported"); + } +} diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java 2026-04-17 19:08:13.000000000 +0000 @@ -136,6 +136,12 @@ void putEntries() { // reuse attribute map and reset before each reuse HashMap<String, String> attrs = new HashMap<>(3); + attrs.put("SupportedKeyClasses", + "java.security.interfaces.RSAPublicKey" + + "|java.security.interfaces.RSAPrivateKey"); + ps("Signature", "NONEwithRSA", + "com.sun.crypto.provider.RSACipherAdaptor", null, attrs); + // continue adding cipher specific attributes attrs.put("SupportedModes", "ECB"); attrs.put("SupportedPaddings", "NOPADDING|PKCS1PADDING|OAEPPADDING" + "|OAEPWITHMD5ANDMGF1PADDING" @@ -147,9 +153,6 @@ + "|OAEPWITHSHA-512ANDMGF1PADDING" + "|OAEPWITHSHA-512/224ANDMGF1PADDING" + "|OAEPWITHSHA-512/256ANDMGF1PADDING"); - attrs.put("SupportedKeyClasses", - "java.security.interfaces.RSAPublicKey" + - "|java.security.interfaces.RSAPrivateKey"); ps("Cipher", "RSA", "com.sun.crypto.provider.RSACipher", null, attrs); diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/io/Console.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/io/Console.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/io/Console.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/io/Console.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,6 +25,7 @@ package java.io; +import java.lang.annotation.Native; import java.util.*; import java.nio.charset.Charset; import jdk.internal.access.JavaIOAccess; @@ -545,7 +546,7 @@ * @since 22 */ public boolean isTerminal() { - return istty; + return isStdinTty() && isStdoutTty(); } private static UnsupportedOperationException newUnsupportedOperationException() { @@ -553,7 +554,12 @@ "Console class itself does not provide implementation"); } - private static final boolean istty = istty(); + @Native static final int TTY_STDIN_MASK = 0x00000001; + @Native static final int TTY_STDOUT_MASK = 0x00000002; + @Native static final int TTY_STDERR_MASK = 0x00000004; + // ttyStatus() returns bit patterns above, a bit is set if the corresponding file + // descriptor is a character device + private static final int ttyStatus = ttyStatus(); private static final Charset STDIN_CHARSET = Charset.forName(System.getProperty("stdin.encoding"), UTF_8.INSTANCE); private static final Charset STDOUT_CHARSET = @@ -565,6 +571,9 @@ public Console console() { return cons; } + public boolean isStdinTty() { + return Console.isStdinTty(); + } }); } @@ -586,7 +595,7 @@ for (var jcp : ServiceLoader.load(ModuleLayer.boot(), JdkConsoleProvider.class)) { if (consModName.equals(jcp.getClass().getModule().getName())) { - var jc = jcp.console(istty, STDIN_CHARSET, STDOUT_CHARSET); + var jc = jcp.console(isStdinTty() && isStdoutTty(), STDIN_CHARSET, STDOUT_CHARSET); if (jc != null) { c = new ProxyingConsole(jc); } @@ -597,12 +606,21 @@ } // If not found, default to built-in Console - if (istty && c == null) { + if (isStdinTty() && isStdoutTty() && c == null) { c = new ProxyingConsole(new JdkConsoleImpl(STDIN_CHARSET, STDOUT_CHARSET)); } return c; } - private static native boolean istty(); + private static boolean isStdinTty() { + return (ttyStatus & TTY_STDIN_MASK) != 0; + } + private static boolean isStdoutTty() { + return (ttyStatus & TTY_STDOUT_MASK) != 0; + } + private static boolean isStderrTty() { + return (ttyStatus & TTY_STDERR_MASK) != 0; + } + private static native int ttyStatus(); } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/System.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/lang/System.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/System.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/lang/System.java 2026-04-17 19:08:13.000000000 +0000 @@ -238,10 +238,11 @@ private static volatile Console cons; /** - * Returns the unique {@link java.io.Console Console} object associated + * Returns the unique {@link Console Console} object associated * with the current Java virtual machine, if any. * * @return The system console, if any, otherwise {@code null}. + * @see Console * * @since 1.6 */ diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/VirtualThread.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/lang/VirtualThread.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/VirtualThread.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/lang/VirtualThread.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,15 +89,19 @@ * * RUNNING -> PARKING // Thread parking with LockSupport.park * PARKING -> PARKED // cont.yield successful, parked indefinitely - * PARKING -> PINNED // cont.yield failed, parked indefinitely on carrier * PARKED -> UNPARKED // unparked, may be scheduled to continue - * PINNED -> RUNNING // unparked, continue execution on same carrier * UNPARKED -> RUNNING // continue execution after park * + * PARKING -> RUNNING // cont.yield failed, need to park on carrier + * RUNNING -> PINNED // park on carrier + * PINNED -> RUNNING // unparked, continue execution on same carrier + * * RUNNING -> TIMED_PARKING // Thread parking with LockSupport.parkNanos * TIMED_PARKING -> TIMED_PARKED // cont.yield successful, timed-parked - * TIMED_PARKING -> TIMED_PINNED // cont.yield failed, timed-parked on carrier * TIMED_PARKED -> UNPARKED // unparked, may be scheduled to continue + * + * TIMED_PARKING -> RUNNING // cont.yield failed, need to park on carrier + * RUNNING -> TIMED_PINNED // park on carrier * TIMED_PINNED -> RUNNING // unparked, continue execution on same carrier * * RUNNING -> BLOCKING // blocking on monitor enter @@ -108,7 +112,7 @@ * RUNNING -> WAITING // transitional state during wait on monitor * WAITING -> WAIT // waiting on monitor * WAIT -> BLOCKED // notified, waiting to be unblocked by monitor owner - * WAIT -> UNBLOCKED // timed-out/interrupted + * WAIT -> UNBLOCKED // interrupted * * RUNNING -> TIMED_WAITING // transition state during timed-waiting on monitor * TIMED_WAITING -> TIMED_WAIT // timed-waiting on monitor @@ -838,16 +842,20 @@ * Re-enables this virtual thread for scheduling. If this virtual thread is parked * then its task is scheduled to continue, otherwise its next call to {@code park} or * {@linkplain #parkNanos(long) parkNanos} is guaranteed not to block. + * @param lazySubmit to use lazySubmit if possible * @throws RejectedExecutionException if the scheduler cannot accept a task */ - @Override - void unpark() { + private void unpark(boolean lazySubmit) { if (!getAndSetParkPermit(true) && currentThread() != this) { int s = state(); // unparked while parked if ((s == PARKED || s == TIMED_PARKED) && compareAndSetState(s, UNPARKED)) { - submitRunContinuation(); + if (lazySubmit) { + lazySubmitRunContinuation(); + } else { + submitRunContinuation(); + } return; } @@ -870,6 +878,11 @@ } } + @Override + void unpark() { + unpark(false); + } + /** * Invoked by unblocker thread to unblock this virtual thread. */ @@ -886,11 +899,7 @@ */ private void parkTimeoutExpired() { assert !VirtualThread.currentThread().isVirtual(); - if (!getAndSetParkPermit(true) - && (state() == TIMED_PARKED) - && compareAndSetState(TIMED_PARKED, UNPARKED)) { - lazySubmitRunContinuation(); - } + unpark(true); } /** diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/security/KeyStore.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/security/KeyStore.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/security/KeyStore.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/security/KeyStore.java 2026-04-17 19:08:13.000000000 +0000 @@ -37,6 +37,7 @@ import javax.security.auth.callback.*; import sun.security.util.Debug; +import sun.security.util.CryptoAlgorithmConstraints; /** * This class represents a storage facility for cryptographic @@ -844,7 +845,7 @@ * The JDK Reference Implementation additionally uses the * {@code jdk.security.provider.preferred} * {@link Security#getProperty(String) Security} property to determine - * the preferred provider order for the specified algorithm. This + * the preferred provider order for the specified keystore type. This * may be different from the order of providers returned by * {@link Security#getProviders() Security.getProviders()}. * @@ -869,6 +870,11 @@ throws KeyStoreException { Objects.requireNonNull(type, "null type name"); + + if (!CryptoAlgorithmConstraints.permits("KEYSTORE", type)) { + throw new KeyStoreException(type + " is disabled"); + } + try { Object[] objs = Security.getImpl(type, "KeyStore", (String)null); return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); @@ -917,8 +923,15 @@ throws KeyStoreException, NoSuchProviderException { Objects.requireNonNull(type, "null type name"); - if (provider == null || provider.isEmpty()) + + if (provider == null || provider.isEmpty()) { throw new IllegalArgumentException("missing provider"); + } + + if (!CryptoAlgorithmConstraints.permits("KEYSTORE", type)) { + throw new KeyStoreException(type + " is disabled"); + } + try { Object[] objs = Security.getImpl(type, "KeyStore", provider); return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); @@ -963,8 +976,15 @@ throws KeyStoreException { Objects.requireNonNull(type, "null type name"); - if (provider == null) + + if (provider == null) { throw new IllegalArgumentException("missing provider"); + } + + if (!CryptoAlgorithmConstraints.permits("KEYSTORE", type)) { + throw new KeyStoreException(type + " is disabled"); + } + try { Object[] objs = Security.getImpl(type, "KeyStore", provider); return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); @@ -1798,8 +1818,12 @@ kdebug.println(s.getAlgorithm() + " keystore detected: " + file); } - keystore = new KeyStore(impl, p, s.getAlgorithm()); - break; + String ksAlgo = s.getAlgorithm(); + if (CryptoAlgorithmConstraints.permits( + "KEYSTORE", ksAlgo)) { + keystore = new KeyStore(impl, p, ksAlgo); + break; + } } } catch (NoSuchAlgorithmException e) { // ignore diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/security/MessageDigest.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/security/MessageDigest.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/security/MessageDigest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/security/MessageDigest.java 2026-04-17 19:08:13.000000000 +0000 @@ -33,6 +33,7 @@ import sun.security.jca.GetInstance; import sun.security.util.Debug; import sun.security.util.MessageDigestSpi2; +import sun.security.util.CryptoAlgorithmConstraints; import javax.crypto.SecretKey; @@ -184,10 +185,14 @@ throws NoSuchAlgorithmException { Objects.requireNonNull(algorithm, "null algorithm name"); - MessageDigest md; + + if (!CryptoAlgorithmConstraints.permits("MessageDigest", algorithm)) { + throw new NoSuchAlgorithmException(algorithm + " is disabled"); + } GetInstance.Instance instance = GetInstance.getInstance("MessageDigest", MessageDigestSpi.class, algorithm); + MessageDigest md; if (instance.impl instanceof MessageDigest messageDigest) { md = messageDigest; md.provider = instance.provider; @@ -246,12 +251,18 @@ throws NoSuchAlgorithmException, NoSuchProviderException { Objects.requireNonNull(algorithm, "null algorithm name"); - if (provider == null || provider.isEmpty()) + + if (provider == null || provider.isEmpty()) { throw new IllegalArgumentException("missing provider"); + } + + if (!CryptoAlgorithmConstraints.permits("MessageDigest", algorithm)) { + throw new NoSuchAlgorithmException(algorithm + " is disabled"); + } - MessageDigest md; GetInstance.Instance instance = GetInstance.getInstance("MessageDigest", MessageDigestSpi.class, algorithm, provider); + MessageDigest md; if (instance.impl instanceof MessageDigest messageDigest) { md = messageDigest; md.provider = instance.provider; @@ -301,8 +312,15 @@ throws NoSuchAlgorithmException { Objects.requireNonNull(algorithm, "null algorithm name"); - if (provider == null) + + if (provider == null) { throw new IllegalArgumentException("missing provider"); + } + + if (!CryptoAlgorithmConstraints.permits("MessageDigest", algorithm)) { + throw new NoSuchAlgorithmException(algorithm + " is disabled"); + } + Object[] objs = Security.getImpl(algorithm, "MessageDigest", provider); if (objs[0] instanceof MessageDigest md) { md.provider = (Provider)objs[1]; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/security/Signature.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/security/Signature.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/security/Signature.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/security/Signature.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,14 +36,12 @@ import java.security.Provider.Service; -import javax.crypto.Cipher; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.BadPaddingException; -import javax.crypto.NoSuchPaddingException; import jdk.internal.access.JavaSecuritySignatureAccess; import jdk.internal.access.SharedSecrets; import sun.security.util.Debug; +import sun.security.util.CryptoAlgorithmConstraints; + import sun.security.jca.*; import sun.security.jca.GetInstance.Instance; import sun.security.util.KnownOIDs; @@ -213,20 +211,6 @@ this.algorithm = algorithm; } - // name of the special signature alg - private static final String RSA_SIGNATURE = "NONEwithRSA"; - - // name of the equivalent cipher alg - private static final String RSA_CIPHER = "RSA/ECB/PKCS1Padding"; - - // all the services we need to lookup for compatibility with Cipher - private static final List<ServiceId> rsaIds = List.of( - new ServiceId("Signature", "NONEwithRSA"), - new ServiceId("Cipher", "RSA/ECB/PKCS1Padding"), - new ServiceId("Cipher", "RSA/ECB"), - new ServiceId("Cipher", "RSA//PKCS1Padding"), - new ServiceId("Cipher", "RSA")); - /** * Returns a {@code Signature} object that implements the specified * signature algorithm. @@ -241,12 +225,22 @@ * the {@link Security#getProviders() Security.getProviders()} method. * * @implNote - * The JDK Reference Implementation additionally uses the - * {@code jdk.security.provider.preferred} + * The JDK Reference Implementation additionally uses the following + * security properties: + * <ul> + * <li>the {@code jdk.security.provider.preferred} * {@link Security#getProperty(String) Security} property to determine * the preferred provider order for the specified algorithm. This * may be different from the order of providers returned by * {@link Security#getProviders() Security.getProviders()}. + * </li> + * <li>the {@code jdk.crypto.disabledAlgorithms} + * {@link Security#getProperty(String) Security} property to determine + * if the specified algorithm is allowed. If the + * {@systemProperty jdk.crypto.disabledAlgorithms} is set, it supersedes + * the security property value. + * </li> + * </ul> * * @param algorithm the standard name of the algorithm requested. * See the Signature section in the <a href= @@ -268,12 +262,12 @@ public static Signature getInstance(String algorithm) throws NoSuchAlgorithmException { Objects.requireNonNull(algorithm, "null algorithm name"); - Iterator<Service> t; - if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { - t = GetInstance.getServices(rsaIds); - } else { - t = GetInstance.getServices("Signature", algorithm); + + if (!CryptoAlgorithmConstraints.permits("Signature", algorithm)) { + throw new NoSuchAlgorithmException(algorithm + " is disabled"); } + + Iterator<Service> t = GetInstance.getServices("Signature", algorithm); if (!t.hasNext()) { throw new NoSuchAlgorithmException (algorithm + " Signature not available"); @@ -329,10 +323,6 @@ } private static boolean isSpi(Service s) { - if (s.getType().equals("Cipher")) { - // must be a CipherSpi, which we can wrap with the CipherAdapter - return true; - } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { @@ -398,18 +388,11 @@ public static Signature getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { Objects.requireNonNull(algorithm, "null algorithm name"); - if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { - // exception compatibility with existing code - if (provider == null || provider.isEmpty()) { - throw new IllegalArgumentException("missing provider"); - } - Provider p = Security.getProvider(provider); - if (p == null) { - throw new NoSuchProviderException - ("no such provider: " + provider); - } - return getInstanceRSA(p); + + if (!CryptoAlgorithmConstraints.permits("Signature", algorithm)) { + throw new NoSuchAlgorithmException(algorithm + " is disabled"); } + Instance instance = GetInstance.getInstance ("Signature", SignatureSpi.class, algorithm, provider); return getInstance(instance, algorithm); @@ -450,40 +433,16 @@ public static Signature getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { Objects.requireNonNull(algorithm, "null algorithm name"); - if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { - // exception compatibility with existing code - if (provider == null) { - throw new IllegalArgumentException("missing provider"); - } - return getInstanceRSA(provider); + + if (!CryptoAlgorithmConstraints.permits("Signature", algorithm)) { + throw new NoSuchAlgorithmException(algorithm + " is disabled"); } + Instance instance = GetInstance.getInstance ("Signature", SignatureSpi.class, algorithm, provider); return getInstance(instance, algorithm); } - // return an implementation for NONEwithRSA, which is a special case - // because of the Cipher.RSA/ECB/PKCS1Padding compatibility wrapper - private static Signature getInstanceRSA(Provider p) - throws NoSuchAlgorithmException { - // try Signature first - Service s = p.getService("Signature", RSA_SIGNATURE); - if (s != null) { - Instance instance = GetInstance.getInstance(s, SignatureSpi.class); - return getInstance(instance, RSA_SIGNATURE); - } - // check Cipher - try { - Cipher c = Cipher.getInstance(RSA_CIPHER, p); - return Delegate.of(new CipherAdapter(c), RSA_SIGNATURE); - } catch (GeneralSecurityException e) { - // throw Signature style exception message to avoid confusion, - // but append Cipher exception as cause - throw new NoSuchAlgorithmException("no such algorithm: " - + RSA_SIGNATURE + " for provider " + p.getName(), e); - } - } - /** * Returns the provider of this {@code Signature} object. * @@ -1179,22 +1138,12 @@ private static SignatureSpi newInstance(Service s) throws NoSuchAlgorithmException { - if (s.getType().equals("Cipher")) { - // must be NONEwithRSA - try { - Cipher c = Cipher.getInstance(RSA_CIPHER, s.getProvider()); - return new CipherAdapter(c); - } catch (NoSuchPaddingException e) { - throw new NoSuchAlgorithmException(e); - } - } else { - Object o = s.newInstance(null); - if (!(o instanceof SignatureSpi)) { - throw new NoSuchAlgorithmException - ("Not a SignatureSpi: " + o.getClass().getName()); - } - return (SignatureSpi)o; + Object o = s.newInstance(null); + if (!(o instanceof SignatureSpi)) { + throw new NoSuchAlgorithmException + ("Not a SignatureSpi: " + o.getClass().getName()); } + return (SignatureSpi)o; } // max number of debug warnings to print from chooseFirstProvider() @@ -1471,92 +1420,4 @@ return sigSpi.engineGetParameters(); } } - - // adapter for RSA/ECB/PKCS1Padding ciphers - @SuppressWarnings("deprecation") - private static class CipherAdapter extends SignatureSpi { - - private final Cipher cipher; - - private ByteArrayOutputStream data; - - CipherAdapter(Cipher cipher) { - this.cipher = cipher; - } - - protected void engineInitVerify(PublicKey publicKey) - throws InvalidKeyException { - cipher.init(Cipher.DECRYPT_MODE, publicKey); - if (data == null) { - data = new ByteArrayOutputStream(128); - } else { - data.reset(); - } - } - - protected void engineInitSign(PrivateKey privateKey) - throws InvalidKeyException { - cipher.init(Cipher.ENCRYPT_MODE, privateKey); - data = null; - } - - protected void engineInitSign(PrivateKey privateKey, - SecureRandom random) throws InvalidKeyException { - cipher.init(Cipher.ENCRYPT_MODE, privateKey, random); - data = null; - } - - protected void engineUpdate(byte b) throws SignatureException { - engineUpdate(new byte[] {b}, 0, 1); - } - - protected void engineUpdate(byte[] b, int off, int len) - throws SignatureException { - if (data != null) { - data.write(b, off, len); - return; - } - byte[] out = cipher.update(b, off, len); - if ((out != null) && (out.length != 0)) { - throw new SignatureException - ("Cipher unexpectedly returned data"); - } - } - - protected byte[] engineSign() throws SignatureException { - try { - return cipher.doFinal(); - } catch (IllegalBlockSizeException | BadPaddingException e) { - throw new SignatureException("doFinal() failed", e); - } - } - - protected boolean engineVerify(byte[] sigBytes) - throws SignatureException { - try { - byte[] out = cipher.doFinal(sigBytes); - byte[] dataBytes = data.toByteArray(); - data.reset(); - return MessageDigest.isEqual(out, dataBytes); - } catch (BadPaddingException e) { - // e.g. wrong public key used - // return false rather than throwing exception - return false; - } catch (IllegalBlockSizeException e) { - throw new SignatureException("doFinal() failed", e); - } - } - - protected void engineSetParameter(String param, Object value) - throws InvalidParameterException { - throw new InvalidParameterException("Parameters not supported"); - } - - protected Object engineGetParameter(String param) - throws InvalidParameterException { - throw new InvalidParameterException("Parameters not supported"); - } - - } - } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/CompactNumberFormat.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/text/CompactNumberFormat.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/CompactNumberFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/text/CompactNumberFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -247,38 +247,43 @@ /** * List of positive prefix patterns of this formatter's - * compact number patterns. + * compact number patterns. This field is a read-only + * constant once initialized. */ private transient List<Patterns> positivePrefixPatterns; /** * List of negative prefix patterns of this formatter's - * compact number patterns. + * compact number patterns. This field is a read-only + * constant once initialized. */ private transient List<Patterns> negativePrefixPatterns; /** * List of positive suffix patterns of this formatter's - * compact number patterns. + * compact number patterns. This field is a read-only + * constant once initialized. */ private transient List<Patterns> positiveSuffixPatterns; /** * List of negative suffix patterns of this formatter's - * compact number patterns. + * compact number patterns. This field is a read-only + * constant once initialized. */ private transient List<Patterns> negativeSuffixPatterns; /** * List of divisors of this formatter's compact number patterns. * Divisor can be either Long or BigInteger (if the divisor value goes - * beyond long boundary) + * beyond long boundary). This field is a read-only constant + * once initialized. */ private transient List<Number> divisors; /** * List of place holders that represent minimum integer digits at each index - * for each count. + * for each count. This field is a read-only constant once initialized. */ private transient List<Patterns> placeHolderPatterns; @@ -371,7 +376,7 @@ /** * The map for plural rules that maps LDML defined tags (e.g. "one") to - * its rule. + * its rule. This field is a read-only constant once initialized. */ private transient Map<String, String> rulesMap; @@ -1512,7 +1517,7 @@ } } - private final transient DigitList digitList = new DigitList(); + private transient DigitList digitList = new DigitList(); private static final int STATUS_INFINITE = 0; private static final int STATUS_POSITIVE = 1; private static final int STATUS_LENGTH = 2; @@ -2504,8 +2509,14 @@ @Override public CompactNumberFormat clone() { CompactNumberFormat other = (CompactNumberFormat) super.clone(); + + // Cloning reference fields. Other fields (e.g., "positivePrefixPatterns") + // are not cloned since they are read-only constants after initialization. other.compactPatterns = compactPatterns.clone(); other.symbols = (DecimalFormatSymbols) symbols.clone(); + other.decimalFormat = (DecimalFormat) decimalFormat.clone(); + other.defaultDecimalFormat = (DecimalFormat) defaultDecimalFormat.clone(); + other.digitList = (DigitList) digitList.clone(); return other; } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/DigitList.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/text/DigitList.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/DigitList.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/text/DigitList.java 2026-04-17 19:08:13.000000000 +0000 @@ -361,6 +361,11 @@ decimalAt += exponent - leadingZerosAfterDecimal; } + // Eliminate trailing zeros. + while (count > 1 && digits[count - 1] == '0') { + --count; + } + if (fixedPoint) { // The negative of the exponent represents the number of leading // zeros between the decimal and the first non-zero digit, for @@ -387,11 +392,6 @@ // else fall through } - // Eliminate trailing zeros. - while (count > 1 && digits[count - 1] == '0') { - --count; - } - // Eliminate digits beyond maximum digits to be displayed. // Round up if appropriate. round(fixedPoint ? (maximumDigits + decimalAt) : maximumDigits, diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/GregorianCalendar.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/GregorianCalendar.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/GregorianCalendar.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/GregorianCalendar.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1214,8 +1214,10 @@ d.setHours(hourOfDay); time = calsys.getTime(d); - // If we stay on the same wall-clock time, try the next or previous hour. - if (internalGet(HOUR_OF_DAY) == d.getHours()) { + // If the rolled amount is not a full HOUR/HOUR_OF_DAY (12/24-hour) cycle and + // if we stay on the same wall-clock time, try the next or previous hour. + if (((field == HOUR_OF_DAY && amount % 24 != 0) || (field == HOUR && amount % 12 != 0)) + && internalGet(HOUR_OF_DAY) == d.getHours()) { hourOfDay = getRolledValue(rolledValue, amount > 0 ? +1 : -1, min, max); if (field == HOUR && internalGet(AM_PM) == PM) { hourOfDay += 12; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/DelayScheduler.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/DelayScheduler.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/DelayScheduler.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/DelayScheduler.java 2026-04-17 19:08:13.000000000 +0000 @@ -360,31 +360,36 @@ u.heapIndex = -1; } } - if (t != null) { // sift down - for (int cs; (cs = (k << 2) + 1) < n; ) { - ScheduledForkJoinTask<?> leastChild = null, c; + if (t != null) { + while (k > 0) { // sift up if replaced with smaller value + ScheduledForkJoinTask<?> parent; int pk; + if ((parent = h[pk = (k - 1) >>> 2]) == null || + parent.when <= d) + break; + parent.heapIndex = k; + h[k] = parent; + k = pk; + } + for (int cs; (cs = (k << 2) + 1) < n; ) { // sift down + ScheduledForkJoinTask<?> leastChild = null; int leastIndex = 0; - long leastValue = Long.MAX_VALUE; - for (int ck = cs, j = 4;;) { // at most 4 children - if ((c = h[ck]) == null) - break; - long cd = c.when; - if (c.status < 0 && alsoReplace < 0) { - alsoReplace = ck; // at most once per pass - c.heapIndex = -1; - } - else if (leastChild == null || cd < leastValue) { + long leastValue = d; // at most 4 children + for (int ck, j = 0; j < 4 && (ck = j + cs) < n; ++j) { + ScheduledForkJoinTask<?> c; long cd; + if ((c = h[ck]) != null && (cd = c.when) < leastValue) { leastValue = cd; leastIndex = ck; leastChild = c; } - if (--j == 0 || ++ck >= n) - break; } - if (leastChild == null || d <= leastValue) + if (leastChild == null) // already ordered break; - leastChild.heapIndex = k; - h[k] = leastChild; + if ((h[k] = leastChild).status >= 0 || alsoReplace >= 0) + leastChild.heapIndex = k; + else { + leastChild.heapIndex = -1; + alsoReplace = k; + } k = leastIndex; } t.heapIndex = k; @@ -393,6 +398,7 @@ k = alsoReplace; } } + assert checkHeap(h, n); return n; } @@ -452,6 +458,33 @@ } /** + * Invariant checks + */ + private static boolean checkHeap(ScheduledForkJoinTask<?>[] h, int n) { + for (int i = 0; i < h.length; ++i) { + ScheduledForkJoinTask<?> t = h[i]; + if (t == null) { // unused slots all null + if (i < n) + return false; + } + else { + long v = t.when; + int x = t.heapIndex; + if (x != i && x >= 0) // valid index unless removing + return false; + if (i > 0 && h[(i - 1) >>> 2].when > v) // ordered wrt parent + return false; + int cs = (i << 2) + 1; // ordered wrt children + for (int ck, j = 0; j < 4 && (ck = cs + j) < n; ++j) { + if (h[ck].when < v) + return false; + } + } + } + return true; + } + + /** * Task class for DelayScheduler operations */ @SuppressWarnings("serial") // Not designed to be serializable diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java 2026-04-17 19:08:13.000000000 +0000 @@ -1297,7 +1297,7 @@ unlockPhase(); if (room < 0) throw new RejectedExecutionException("Queue capacity exceeded"); - if ((room == 0 || a[m & (s - pk)] == null) && + if ((room == 0 || U.getReferenceAcquire(a, slotOffset(m & (s - pk))) == null) && pool != null) pool.signalWork(); // may have appeared empty } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java 2026-04-17 19:08:13.000000000 +0000 @@ -531,19 +531,22 @@ * still correct, although it may contain a misleading stack * trace. * - * @param asExecutionException true if wrap as ExecutionException + * @param asExecutionException true if wrap the result as an + * ExecutionException. This applies only to actual exceptions, not + * implicit CancellationExceptions issued when not THROWN or + * available, which are not wrapped because by default they are + * issued separately from ExecutionExceptions by callers. Which + * may require further handling when this is not true (currently + * only in InvokeAnyTask). * @return the exception, or null if none */ private Throwable getException(boolean asExecutionException) { int s; Throwable ex; Aux a; if ((s = status) >= 0 || (s & ABNORMAL) == 0) return null; - else if ((s & THROWN) == 0 || (a = aux) == null || (ex = a.ex) == null) { - ex = new CancellationException(); - if (!asExecutionException || !(this instanceof InterruptibleTask)) - return ex; // else wrap below - } - else if (a.thread != Thread.currentThread()) { + if ((s & THROWN) == 0 || (a = aux) == null || (ex = a.ex) == null) + return new CancellationException(); + if (a.thread != Thread.currentThread()) { try { Constructor<?> noArgCtor = null, oneArgCtor = null; for (Constructor<?> c : ex.getClass().getConstructors()) { @@ -1814,6 +1817,8 @@ (t = new InvokeAnyTask<T>(c, this, t))); } return timed ? get(nanos, TimeUnit.NANOSECONDS) : get(); + } catch (CancellationException ce) { + throw new ExecutionException(ce); } finally { for (; t != null; t = t.pred) t.onRootCompletion(); diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java 2026-04-17 19:08:13.000000000 +0000 @@ -267,10 +267,8 @@ @Override // to record changes public void setContextClassLoader(ClassLoader cl) { - if (ClassLoader.getSystemClassLoader() != cl) { - resetCCL = true; - super.setContextClassLoader(cl); - } + resetCCL = ClassLoader.getSystemClassLoader() != cl; + super.setContextClassLoader(cl); } @Override // to re-establish CCL if necessary diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/zip/GZIPInputStream.java openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/zip/GZIPInputStream.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/zip/GZIPInputStream.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/java/util/zip/GZIPInputStream.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 +79,11 @@ super(in, createInflater(in, size), size); usesDefaultInflater = true; try { - readHeader(in); + // we don't expect the stream to be at EOF + // and if it is, then we want readHeader to + // raise an exception, so we pass "true" for + // the "failOnEOF" param. + readHeader(in, true); } catch (IOException ioe) { this.inf.end(); throw ioe; @@ -190,12 +194,40 @@ /* * Reads GZIP member header and returns the total byte number * of this member header. + * If failOnEOF is false and if the given InputStream has already + * reached EOF when this method was invoked, then this method returns + * -1 (indicating that there's no GZIP member header). + * In all other cases of malformed header or EOF being detected + * when reading the header, this method will throw an IOException. */ - private int readHeader(InputStream this_in) throws IOException { + private int readHeader(InputStream this_in, boolean failOnEOF) throws IOException { CheckedInputStream in = new CheckedInputStream(this_in, crc); crc.reset(); + + int magic; + if (!failOnEOF) { + // read an unsigned short value representing the GZIP magic header. + // this is the same as calling readUShort(in), except that here, + // when reading the first byte, we don't raise an EOFException + // if the stream has already reached EOF. + + // read unsigned byte + int b = in.read(); + if (b == -1) { // EOF + crc.reset(); + return -1; // represents no header bytes available + } + checkUnexpectedByte(b); + // read the next unsigned byte to form the unsigned + // short. we throw the usual EOFException/ZipException + // from this point on if there is no more data or + // the data doesn't represent a header. + magic = (readUByte(in) << 8) | b; + } else { + magic = readUShort(in); + } // Check header magic - if (readUShort(in) != GZIP_MAGIC) { + if (magic != GZIP_MAGIC) { throw new ZipException("Not in GZIP format"); } // Check compression method @@ -261,7 +293,11 @@ // try concatenated case int m = 8; // this.trailer try { - m += readHeader(in); // next.header + int numNextHeaderBytes = readHeader(in, false); // next.header (if available) + if (numNextHeaderBytes == -1) { + return true; // end of stream reached + } + m += numNextHeaderBytes; } catch (IOException ze) { return true; // ignore any malformed, do nothing } @@ -295,12 +331,16 @@ if (b == -1) { throw new EOFException(); } + checkUnexpectedByte(b); + return b; + } + + private void checkUnexpectedByte(final int b) throws IOException { if (b < -1 || b > 255) { - // Report on this.in, not argument in; see read{Header, Trailer}. + // report the InputStream type which returned this unexpected byte throw new IOException(this.in.getClass().getName() - + ".read() returned value out of range -1..255: " + b); + + ".read() returned value out of range -1..255: " + b); } - return b; } private byte[] tmpbuf = new byte[128]; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/javax/crypto/Cipher.java openjdk-25-25.0.3+9/src/java.base/share/classes/javax/crypto/Cipher.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/javax/crypto/Cipher.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/javax/crypto/Cipher.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ import java.util.concurrent.ConcurrentMap; import java.util.regex.*; - import java.security.*; import java.security.Provider.Service; import java.security.spec.AlgorithmParameterSpec; @@ -46,6 +45,7 @@ import sun.security.util.Debug; import sun.security.jca.*; import sun.security.util.KnownOIDs; +import sun.security.util.CryptoAlgorithmConstraints; /** * This class provides the functionality of a cryptographic cipher for @@ -316,19 +316,23 @@ private static final String SHA512TRUNCATED = "SHA512/2"; + // Parse the specified cipher transformation for algorithm and the + // optional mode and padding. If the transformation contains only + // algorithm, then only algorithm is returned. Otherwise, the + // transformation must contain all 3 and they must be non-empty. private static String[] tokenizeTransformation(String transformation) throws NoSuchAlgorithmException { if (transformation == null) { throw new NoSuchAlgorithmException("No transformation given"); } + /* - * array containing the components of a cipher transformation: + * Components of a cipher transformation: * - * index 0: algorithm component (e.g., AES) - * index 1: feedback component (e.g., CFB) - * index 2: padding component (e.g., PKCS5Padding) + * 1) algorithm component (e.g., AES) + * 2) feedback component (e.g., CFB) - optional + * 3) padding component (e.g., PKCS5Padding) - optional */ - String[] parts = { "", "", "" }; // check if the transformation contains algorithms with "/" in their // name which can cause the parsing logic to go wrong @@ -337,27 +341,35 @@ int startIdx = (sha512Idx == -1 ? 0 : sha512Idx + SHA512TRUNCATED.length()); int endIdx = transformation.indexOf('/', startIdx); - if (endIdx == -1) { - // algorithm - parts[0] = transformation.trim(); + + boolean algorithmOnly = (endIdx == -1); + String algo = (algorithmOnly ? transformation.trim() : + transformation.substring(0, endIdx).trim()); + if (algo.isEmpty()) { + throw new NoSuchAlgorithmException("Invalid transformation: " + + "algorithm not specified-" + + transformation); + } + if (algorithmOnly) { // done + return new String[] { algo }; } else { - // algorithm/mode/padding - parts[0] = transformation.substring(0, endIdx).trim(); + // continue parsing mode and padding startIdx = endIdx+1; endIdx = transformation.indexOf('/', startIdx); if (endIdx == -1) { throw new NoSuchAlgorithmException("Invalid transformation" + " format:" + transformation); } - parts[1] = transformation.substring(startIdx, endIdx).trim(); - parts[2] = transformation.substring(endIdx+1).trim(); - } - if (parts[0].isEmpty()) { - throw new NoSuchAlgorithmException("Invalid transformation: " + - "algorithm not specified-" + String mode = transformation.substring(startIdx, endIdx).trim(); + String padding = transformation.substring(endIdx+1).trim(); + // ensure mode and padding are specified + if (mode.isEmpty() || padding.isEmpty()) { + throw new NoSuchAlgorithmException("Invalid transformation: " + + "missing mode and/or padding-" + transformation); + } + return new String[] { algo, mode, padding }; } - return parts; } // Provider attribute name for supported chaining mode @@ -453,22 +465,17 @@ throws NoSuchAlgorithmException { String[] parts = tokenizeTransformation(transformation); - String alg = parts[0]; - String mode = parts[1]; - String pad = parts[2]; - - if ((mode.length() == 0) && (pad.length() == 0)) { + if (parts.length == 1) { // Algorithm only - Transform tr = new Transform(alg, "", null, null); - return Collections.singletonList(tr); + return List.of(new Transform(parts[0], "", null, null)); } else { - // Algorithm w/ at least mode or padding or both - List<Transform> list = new ArrayList<>(4); - list.add(new Transform(alg, "/" + mode + "/" + pad, null, null)); - list.add(new Transform(alg, "/" + mode, null, pad)); - list.add(new Transform(alg, "//" + pad, mode, null)); - list.add(new Transform(alg, "", mode, pad)); - return list; + // Algorithm w/ both mode and padding + return List.of( + new Transform(parts[0], "/" + parts[1] + "/" + parts[2], + null, null), + new Transform(parts[0], "/" + parts[1], null, parts[2]), + new Transform(parts[0], "//" + parts[2], parts[1], null), + new Transform(parts[0], "", parts[1], parts[2])); } } @@ -541,6 +548,13 @@ if ((transformation == null) || transformation.isEmpty()) { throw new NoSuchAlgorithmException("Null or empty transformation"); } + + // throws NoSuchAlgorithmException if java.security disables it + if (!CryptoAlgorithmConstraints.permits("Cipher", transformation)) { + throw new NoSuchAlgorithmException(transformation + + " is disabled"); + } + List<Transform> transforms = getTransforms(transformation); List<ServiceId> cipherServices = new ArrayList<>(transforms.size()); for (Transform transform : transforms) { @@ -714,6 +728,13 @@ if (provider == null) { throw new IllegalArgumentException("Missing provider"); } + + // throws NoSuchAlgorithmException if java.security disables it + if (!CryptoAlgorithmConstraints.permits("Cipher", transformation)) { + throw new NoSuchAlgorithmException(transformation + + " is disabled"); + } + Exception failure = null; List<Transform> transforms = getTransforms(transformation); boolean providerChecked = false; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java openjdk-25-25.0.3+9/src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,4 +29,5 @@ public interface JavaIOAccess { Console console(); + boolean isStdinTty(); } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java openjdk-25-25.0.3+9/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java 2026-04-17 19:08:13.000000000 +0000 @@ -190,15 +190,16 @@ if (VM.isDirectMemoryPageAligned()) { byteAlignment = Math.max(byteAlignment, AbstractMemorySegmentImpl.NIO_ACCESS.pageSize()); } + // Always allocate at least some memory so that zero-length segments have distinct + // non-zero addresses. + byteSize = Math.max(1, byteSize); + // Align the allocation size up to a multiple of 8 so we can init the memory with longs long alignedSize = init ? Utils.alignUp(byteSize, Long.BYTES) : byteSize; // Check for wrap around if (alignedSize < 0) { throw new OutOfMemoryError(); } - // Always allocate at least some memory so that zero-length segments have distinct - // non-zero addresses. - alignedSize = Math.max(1, alignedSize); long allocationSize; long allocationBase; @@ -224,12 +225,13 @@ if (init) { initNativeMemory(result, alignedSize); } + final long cleanupByteSize = byteSize; sessionImpl.addOrCleanupIfFail(new MemorySessionImpl.ResourceList.ResourceCleanup() { @Override public void cleanup() { UNSAFE.freeMemory(allocationBase); if (shouldReserve) { - AbstractMemorySegmentImpl.NIO_ACCESS.unreserveMemory(allocationSize, byteSize); + AbstractMemorySegmentImpl.NIO_ACCESS.unreserveMemory(allocationSize, cleanupByteSize); } } }); diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java openjdk-25-25.0.3+9/src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -38,10 +38,13 @@ import java.util.Formatter; import java.util.Locale; import java.util.Objects; +import java.util.Optional; import jdk.internal.access.SharedSecrets; +import jdk.internal.util.StaticProperty; import sun.nio.cs.StreamDecoder; import sun.nio.cs.StreamEncoder; +import sun.nio.cs.UTF_8; /** * JdkConsole implementation based on the platform's TTY. @@ -103,6 +106,42 @@ @Override public char[] readPassword(Locale locale, String format, Object ... args) { + return readPassword0(false, locale, format, args); + } + + // These two methods are intended for sun.security.util.Password, so tools like keytool can + // use JdkConsoleImpl even when standard output is redirected. The Password class should first + // check if `System.console()` returns a Console instance and use it if available. Otherwise, + // it should call this method to obtain a JdkConsoleImpl. This ensures only one Console + // instance exists in the Java runtime. + private static final StableValue<Optional<JdkConsoleImpl>> INSTANCE = StableValue.of(); + public static Optional<JdkConsoleImpl> passwordConsole() { + return INSTANCE.orElseSet(() -> { + // If there's already a proper console, throw an exception + if (System.console() != null) { + throw new IllegalStateException("Can’t create a dedicated password " + + "console since a real console already exists"); + } + + // If stdin is NOT redirected, return an Optional containing a JdkConsoleImpl + // instance, otherwise an empty Optional. + return SharedSecrets.getJavaIOAccess().isStdinTty() ? + Optional.of( + new JdkConsoleImpl( + UTF_8.INSTANCE, + UTF_8.INSTANCE)) : + Optional.empty(); + }); + } + + // Dedicated entry for sun.security.util.Password when stdout is redirected. + // This method strictly avoids producing any output by using noNewLine = true + // and an empty format string. + public char[] readPasswordNoNewLine() { + return readPassword0(true, Locale.getDefault(Locale.Category.FORMAT), ""); + } + + private char[] readPassword0(boolean noNewLine, Locale locale, String format, Object ... args) { char[] passwd = null; synchronized (writeLock) { synchronized(readLock) { @@ -135,7 +174,9 @@ ioe.addSuppressed(x); } if (ioe != null) { - Arrays.fill(passwd, ' '); + if (passwd != null) { + Arrays.fill(passwd, ' '); + } try { if (reader instanceof LineReader lr) { lr.zeroOut(); @@ -146,7 +187,9 @@ throw ioe; } } - pw.println(); + if (!noNewLine) { + pw.println(); + } } } return passwd; diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/X509Factory.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/provider/X509Factory.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/X509Factory.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/provider/X509Factory.java 2026-04-17 19:08:13.000000000 +0000 @@ -66,6 +66,7 @@ public static final String END_CERT = "-----END CERTIFICATE-----"; private static final int ENC_MAX_LENGTH = 4096 * 1024; // 4 MB MAX + public static final int BER_ITERATION_COUNT = 128; // Limit nested depth private static final Cache<Object, X509CertImpl> certCache = Cache.newSoftMemoryCache(750); @@ -555,7 +556,7 @@ if (c == DerValue.tag_Sequence) { ByteArrayOutputStream bout = new ByteArrayOutputStream(2048); bout.write(c); - readBERInternal(is, bout, c); + readBERInternal(is, bout, c, BER_ITERATION_COUNT); return bout.toByteArray(); } else { try { @@ -579,12 +580,16 @@ * @param is Read from this InputStream * @param bout Write into this OutputStream * @param tag Tag already read (-1 mean not read) + * @param depth nesting depth limit * @return The current tag, used to check EOC in indefinite-length BER * @throws IOException Any parsing error */ private static int readBERInternal(InputStream is, - ByteArrayOutputStream bout, int tag) throws IOException { + ByteArrayOutputStream bout, int tag, int depth) throws IOException { + if (depth-- == 0) { + throw new IOException("Nesting sequence depth limit reached."); + } if (tag == -1) { // Not read before the call, read now tag = is.read(); if (tag == -1) { @@ -610,7 +615,7 @@ "Non constructed encoding must have definite length"); } while (true) { - int subTag = readBERInternal(is, bout, -1); + int subTag = readBERInternal(is, bout, -1, depth); if (subTag == 0) { // EOC, end of indefinite-length section break; } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +43,7 @@ /** * Class to obtain CRLs via the CRLDistributionPoints extension. - * Note that the functionality of this class must be explicitly enabled - * via a system property, see the USE_CRLDP variable below. - * + * <p> * This class uses the URICertStore class to fetch CRLs. The URICertStore * class also implements CRL caching: see the class description for more * information. diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1007,13 +1007,17 @@ // any way to convey them back to the application. // That's the default, so no need to write code. builderParams.setDate(params.date()); - builderParams.setCertPathCheckers(params.certPathCheckers()); builderParams.setSigProvider(params.sigProvider()); // Skip revocation during this build to detect circular // references. But check revocation afterwards, using the // key (or any other that works). builderParams.setRevocationEnabled(false); + // Remove itself from params to avoid circular reference. + builderParams.setCertPathCheckers(params.certPathCheckers() + .stream() + .filter(checker -> checker != this) + .toList()); // check for AuthorityInformationAccess extension if (Builder.USE_AIA) { diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/ssl/HelloCookieManager.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/ssl/HelloCookieManager.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/ssl/HelloCookieManager.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/ssl/HelloCookieManager.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -187,7 +187,7 @@ byte[] secret; d10ManagerLock.lock(); try { - if (((cookieVersion >> 24) & 0xFF) == cookie[0]) { + if ((byte) ((cookieVersion >> 24) & 0xFF) == cookie[0]) { secret = cookieSecret; } else { secret = legacySecret; // including out of window cookies diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * 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,16 @@ // Get algorithm constraints from the specified security property. static Set<String> getAlgorithms(String propertyName) { - String property = Security.getProperty(propertyName); + return getAlgorithms(propertyName, false); + } + + // Get algorithm constraints from the specified security property or + // system property if allowSystemOverride == true. + static Set<String> getAlgorithms(String propertyName, + boolean allowSystemOverride) { + String property = allowSystemOverride ? + SecurityProperties.getOverridableProperty(propertyName) : + Security.getProperty(propertyName); String[] algorithmsInProperty = null; if (property != null && !property.isEmpty()) { @@ -65,7 +74,8 @@ if (algorithmsInProperty == null) { return Collections.emptySet(); } - Set<String> algorithmsInPropertySet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); + Set<String> algorithmsInPropertySet = + new TreeSet<>(String.CASE_INSENSITIVE_ORDER); algorithmsInPropertySet.addAll(Arrays.asList(algorithmsInProperty)); return algorithmsInPropertySet; } @@ -80,17 +90,17 @@ return false; } - // decompose the algorithm into sub-elements - Set<String> elements = decomposer.decompose(algorithm); - - // check the element of the elements - for (String element : elements) { - if (algorithms.contains(element)) { - return false; + if (decomposer != null) { + // decompose the algorithm into sub-elements + Set<String> elements = decomposer.decompose(algorithm); + + // check the element of the elements + for (String element : elements) { + if (algorithms.contains(element)) { + return false; + } } } - return true; } - } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/CryptoAlgorithmConstraints.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/CryptoAlgorithmConstraints.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/CryptoAlgorithmConstraints.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/CryptoAlgorithmConstraints.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 sun.security.util; + +import java.lang.ref.SoftReference; +import java.security.AlgorithmParameters; +import java.security.CryptoPrimitive; +import java.security.Key; +import java.util.Arrays; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +/** + * This class implements the algorithm constraints for the + * "jdk.crypto.disabledAlgorithms" security property. This security property + * can be overridden by the system property of the same name. See the + * java.security file for the syntax of the property value. + */ +public class CryptoAlgorithmConstraints extends AbstractAlgorithmConstraints { + private static final Debug debug = Debug.getInstance("jca"); + + // for validating the service + private static final Set<String> SUPPORTED_SERVICES = + Set.of("Cipher", "KeyStore", "MessageDigest", "Signature"); + + // Disabled algorithm security property for JCE crypto services + private static final String PROPERTY_CRYPTO_DISABLED_ALGS = + "jdk.crypto.disabledAlgorithms"; + + private static class CryptoHolder { + static final CryptoAlgorithmConstraints CONSTRAINTS = + new CryptoAlgorithmConstraints(PROPERTY_CRYPTO_DISABLED_ALGS); + } + + private static void debug(String msg) { + if (debug != null) { + debug.println("CryptoAlgoConstraints: ", msg); + } + } + + public static boolean permits(String service, String algo) { + return CryptoHolder.CONSTRAINTS.cachedCheckAlgorithm( + service + "." + algo); + } + + private final Set<String> disabledServices; // syntax is <service>.<algo> + private volatile SoftReference<Map<String, Boolean>> cacheRef = + new SoftReference<>(null); + + /** + * Initialize algorithm constraints with the specified security property + * {@code propertyName}. Note that if a system property of the same name + * is set, it overrides the security property. + * + * @param propertyName the security property name that define the disabled + * algorithm constraints + */ + CryptoAlgorithmConstraints(String propertyName) { + super(null); + disabledServices = getAlgorithms(propertyName, true); + String[] entries = disabledServices.toArray(new String[0]); + debug("Before " + Arrays.deepToString(entries)); + + for (String dk : entries) { + int idx = dk.indexOf("."); + if (idx < 1 || idx == dk.length() - 1) { + // wrong syntax: missing "." or empty service or algorithm + throw new IllegalArgumentException("Invalid entry: " + dk); + } + String service = dk.substring(0, idx); + String algo = dk.substring(idx + 1); + if (SUPPORTED_SERVICES.stream().anyMatch(e -> e.equalsIgnoreCase + (service))) { + KnownOIDs oid = KnownOIDs.findMatch(algo); + if (oid != null) { + debug("Add oid: " + oid.value()); + disabledServices.add(service + "." + oid.value()); + debug("Add oid stdName: " + oid.stdName()); + disabledServices.add(service + "." + oid.stdName()); + for (String a : oid.aliases()) { + debug("Add oid alias: " + a); + disabledServices.add(service + "." + a); + } + } + } else { + // unsupported service + throw new IllegalArgumentException("Invalid entry: " + dk); + } + } + debug("After " + Arrays.deepToString(disabledServices.toArray())); + } + + @Override + public final boolean permits(Set<CryptoPrimitive> notUsed1, + String serviceDesc, AlgorithmParameters notUsed2) { + throw new UnsupportedOperationException("Unsupported permits() method"); + } + + @Override + public final boolean permits(Set<CryptoPrimitive> primitives, Key key) { + throw new UnsupportedOperationException("Unsupported permits() method"); + } + + @Override + public final boolean permits(Set<CryptoPrimitive> primitives, + String algorithm, Key key, AlgorithmParameters parameters) { + throw new UnsupportedOperationException("Unsupported permits() method"); + } + + // Return false if algorithm is found in the disabledServices Set. + // Otherwise, return true. + private boolean cachedCheckAlgorithm(String serviceDesc) { + Map<String, Boolean> cache; + if ((cache = cacheRef.get()) == null) { + synchronized (this) { + if ((cache = cacheRef.get()) == null) { + cache = new ConcurrentHashMap<>(); + cacheRef = new SoftReference<>(cache); + } + } + } + Boolean result = cache.get(serviceDesc); + if (result != null) { + return result; + } + result = checkAlgorithm(disabledServices, serviceDesc, null); + cache.put(serviceDesc, result); + return result; + } +} diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/KnownOIDs.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/KnownOIDs.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/KnownOIDs.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/KnownOIDs.java 2026-04-17 19:08:13.000000000 +0000 @@ -184,7 +184,7 @@ // RSASecurity // PKCS1 1.2.840.113549.1.1.* PKCS1("1.2.840.113549.1.1", "RSA", false), // RSA KeyPairGenerator and KeyFactory - RSA("1.2.840.113549.1.1.1"), // RSA encryption + RSA("1.2.840.113549.1.1.1", "RSA", "RSA/ECB/PKCS1Padding"), // RSA encryption MD2withRSA("1.2.840.113549.1.1.2"), MD5withRSA("1.2.840.113549.1.1.4"), diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/Password.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/Password.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/Password.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/Password.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved. * 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,11 +29,13 @@ import java.nio.*; import java.nio.charset.*; import java.util.Arrays; + import jdk.internal.access.SharedSecrets; +import jdk.internal.io.JdkConsoleImpl; +import jdk.internal.misc.VM; /** * A utility class for reading passwords - * */ public class Password { /** Reads user password from given input stream. */ @@ -50,30 +52,39 @@ char[] consoleEntered = null; byte[] consoleBytes = null; + char[] buf = null; try { // Only use Console if `in` is the initial System.in - Console con; - if (!isEchoOn && - in == SharedSecrets.getJavaLangAccess().initialSystemIn() && - ((con = System.console()) != null)) { - consoleEntered = con.readPassword(); - // readPassword returns "" if you just press ENTER with the built-in Console, - // to be compatible with old Password class, change to null - if (consoleEntered == null || consoleEntered.length == 0) { - return null; + if (!isEchoOn) { + if (in == SharedSecrets.getJavaLangAccess().initialSystemIn() + && ConsoleHolder.consoleIsAvailable()) { + consoleEntered = ConsoleHolder.readPassword(); + // readPassword might return null. Stop now. + if (consoleEntered == null) { + return null; + } + consoleBytes = ConsoleHolder.convertToBytes(consoleEntered); + in = new ByteArrayInputStream(consoleBytes); + } else if (in == System.in && VM.isBooted() + && System.in.available() == 0) { + // Warn if reading password from System.in but it's empty. + // This may be running in an IDE Run Window or in JShell, + // which acts like an interactive console and echoes the + // entered password. In this case, print a warning that + // the password might be echoed. If available() is not zero, + // it's more likely the input comes from a pipe, such as + // "echo password |" or "cat password_file |" where input + // will be silently consumed without echoing to the screen. + // Warn only if VM is booted and ResourcesMgr is available. + System.err.print(ResourcesMgr.getString + ("warning.input.may.be.visible.on.screen")); } - consoleBytes = convertToBytes(consoleEntered); - in = new ByteArrayInputStream(consoleBytes); } // Rest of the lines still necessary for KeyStoreLoginModule // and when there is no console. - - char[] lineBuffer; - char[] buf; - - buf = lineBuffer = new char[128]; + buf = new char[128]; int room = buf.length; int offset = 0; @@ -101,11 +112,11 @@ /* fall through */ default: if (--room < 0) { + char[] oldBuf = buf; buf = new char[offset + 128]; room = buf.length - offset - 1; - System.arraycopy(lineBuffer, 0, buf, 0, offset); - Arrays.fill(lineBuffer, ' '); - lineBuffer = buf; + System.arraycopy(oldBuf, 0, buf, 0, offset); + Arrays.fill(oldBuf, ' '); } buf[offset++] = (char) c; break; @@ -118,8 +129,6 @@ char[] ret = new char[offset]; System.arraycopy(buf, 0, ret, 0, offset); - Arrays.fill(buf, ' '); - return ret; } finally { if (consoleEntered != null) { @@ -128,35 +137,72 @@ if (consoleBytes != null) { Arrays.fill(consoleBytes, (byte)0); } + if (buf != null) { + Arrays.fill(buf, ' '); + } } } - /** - * Change a password read from Console.readPassword() into - * its original bytes. - * - * @param pass a char[] - * @return its byte[] format, similar to new String(pass).getBytes() - */ - private static byte[] convertToBytes(char[] pass) { - if (enc == null) { - synchronized (Password.class) { - enc = System.console() - .charset() - .newEncoder() - .onMalformedInput(CodingErrorAction.REPLACE) - .onUnmappableCharacter(CodingErrorAction.REPLACE); - } + // Everything on Console or JdkConsoleImpl is inside this class. + private static class ConsoleHolder { + + // primary console; may be null + private static final Console c1; + // secondary console (when stdout is redirected); may be null + private static final JdkConsoleImpl c2; + // encoder for c1 or c2 + private static final CharsetEncoder enc; + + static { + c1 = System.console(); + Charset charset; + if (c1 != null) { + c2 = null; + charset = c1.charset(); + } else { + c2 = JdkConsoleImpl.passwordConsole().orElse(null); + charset = (c2 != null) ? c2.charset() : null; + } + enc = charset == null ? null : charset.newEncoder() + .onMalformedInput(CodingErrorAction.REPLACE) + .onUnmappableCharacter(CodingErrorAction.REPLACE); } - byte[] ba = new byte[(int)(enc.maxBytesPerChar() * pass.length)]; - ByteBuffer bb = ByteBuffer.wrap(ba); - synchronized (enc) { - enc.reset().encode(CharBuffer.wrap(pass), bb, true); + + public static boolean consoleIsAvailable() { + return c1 != null || c2 != null; } - if (bb.position() < ba.length) { - ba[bb.position()] = '\n'; + + public static char[] readPassword() { + assert consoleIsAvailable(); + if (c1 != null) { + return c1.readPassword(); + } else { + try { + return c2.readPasswordNoNewLine(); + } finally { + System.err.println(); + } + } + } + + /** + * Convert a password read from console into its original bytes. + * + * @param pass a char[] + * @return its byte[] format, equivalent to new String(pass).getBytes() + * but String is immutable and cannot be cleaned up. + */ + public static byte[] convertToBytes(char[] pass) { + assert consoleIsAvailable(); + byte[] ba = new byte[(int) (enc.maxBytesPerChar() * pass.length)]; + ByteBuffer bb = ByteBuffer.wrap(ba); + synchronized (enc) { + enc.reset().encode(CharBuffer.wrap(pass), bb, true); + } + if (bb.remaining() > 0) { + bb.put((byte)'\n'); // will be recognized as a stop sign + } + return ba; } - return ba; } - private static volatile CharsetEncoder enc; } diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/resources/security.properties openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/resources/security.properties --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/util/resources/security.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/util/resources/security.properties 2026-04-17 19:08:13.000000000 +0000 @@ -74,3 +74,6 @@ # sun.security.pkcs11.SunPKCS11 PKCS11.Token.providerName.Password.=PKCS11 Token [{0}] Password:\u0020 + +# sun.security.util.Password +warning.input.may.be.visible.on.screen=[WARNING: Input may be visible on screen]\u0020 diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/validator/CADistrustPolicy.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/validator/CADistrustPolicy.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/validator/CADistrustPolicy.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/validator/CADistrustPolicy.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. * 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,6 +83,22 @@ } CamerfirmaTLSPolicy.checkDistrust(chain); } + }, + + /** + * Distrust TLS Server certificates anchored by the Chunghwa ePKI root CA + * and issued after March 17, 2026. If enabled, this policy is currently + * enforced by the PKIX and SunX509 TrustManager implementations + * of the SunJSSE provider implementation. + */ + CHUNGHWA_TLS { + void checkDistrust(String variant, X509Certificate[] chain) + throws ValidatorException { + if (!variant.equals(Validator.VAR_TLS_SERVER)) { + return; + } + ChunghwaTLSPolicy.checkDistrust(chain); + } }; /** diff -Nru openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/validator/ChunghwaTLSPolicy.java openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/validator/ChunghwaTLSPolicy.java --- openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/validator/ChunghwaTLSPolicy.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/classes/sun/security/validator/ChunghwaTLSPolicy.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 sun.security.validator; + +import java.security.cert.X509Certificate; +import java.time.LocalDate; +import java.time.Month; +import java.time.ZoneOffset; +import java.util.Date; +import java.util.Map; +import java.util.Set; + +import sun.security.util.Debug; +import sun.security.x509.X509CertImpl; + +/** + * This class checks if Chunghwa issued TLS Server certificates should be + * restricted. + */ +final class ChunghwaTLSPolicy { + + private static final Debug debug = Debug.getInstance("certpath"); + + // SHA-256 certificate fingerprint of distrusted root for TLS + // cacerts alias: chunghwaepkirootca + // DN: OU=ePKI Root Certification Authority, + // O="Chunghwa Telecom Co., Ltd.", C=TW + private static final String FINGERPRINT = + "C0A6F4DC63A24BFDCF54EF2A6A082A0A72DE35803E2FF5FF527AE5D87206DFD5"; + + // Any TLS Server certificate that is anchored by the Chunghwa + // root above and is issued after this date will be distrusted. + private static final LocalDate MARCH_17_2026 = + LocalDate.of(2026, Month.MARCH, 17); + + /** + * This method assumes the eeCert is a TLS Server Cert and chains back to + * the anchor. + * + * @param chain the end-entity's certificate chain. The end entity cert + * is at index 0, the trust anchor at index n-1. + * @throws ValidatorException if the certificate is distrusted + */ + static void checkDistrust(X509Certificate[] chain) + throws ValidatorException { + X509Certificate anchor = chain[chain.length-1]; + String fp = fingerprint(anchor); + if (fp == null) { + throw new ValidatorException("Cannot generate fingerprint for " + + "trust anchor of TLS server certificate"); + } + if (FINGERPRINT.equalsIgnoreCase(fp)) { + Date notBefore = chain[0].getNotBefore(); + LocalDate ldNotBefore = LocalDate.ofInstant(notBefore.toInstant(), + ZoneOffset.UTC); + // reject if certificate is issued after March 17, 2026 + checkNotBefore(ldNotBefore, MARCH_17_2026, anchor); + } + } + + private static String fingerprint(X509Certificate cert) { + return X509CertImpl.getFingerprint("SHA-256", cert, debug); + } + + // Check whether the certificate's notBeforeDate is after the + // distrust date for the anchor (root CA). Throw ValidatorException + // if it is after the distrust date. + private static void checkNotBefore(LocalDate notBeforeDate, + LocalDate distrustDate, X509Certificate anchor) + throws ValidatorException { + if (notBeforeDate.isAfter(distrustDate)) { + throw new ValidatorException + ("TLS Server certificate issued after " + distrustDate + + " and anchored by a distrusted legacy Chunghwa root CA: " + + anchor.getSubjectX500Principal(), + ValidatorException.T_UNTRUSTED_CERT, anchor); + } + } + + private ChunghwaTLSPolicy() {} +} diff -Nru openjdk-25-25.0.2+10/src/java.base/share/conf/security/java.security openjdk-25-25.0.3+9/src/java.base/share/conf/security/java.security --- openjdk-25-25.0.2+10/src/java.base/share/conf/security/java.security 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/conf/security/java.security 2026-04-17 19:08:13.000000000 +0000 @@ -772,6 +772,54 @@ ecdsa_sha1 usage HandshakeSignature, dsa_sha1 usage HandshakeSignature # +# Algorithm restrictions for Java Crypto API services +# +# In some environments, certain algorithms may be undesirable for certain +# cryptographic services. For example, "MD2" is generally no longer considered +# to be a secure hash algorithm. This section describes the mechanism for +# disabling algorithms at the JCA/JCE level based on service name and algorithm +# name. +# +# If a system property of the same name is also specified, it supersedes the +# security property value defined here. +# +# The syntax of the disabled services string is described as follows: +# "DisabledService {, DisabledService}" +# +# DisabledService: +# Service.AlgorithmName +# +# Service: (one of the following, more services may be added later) +# Cipher | KeyStore | MessageDigest | Signature +# +# AlgorithmName: +# (see below) +# +# The "AlgorithmName" is the standard algorithm name of the disabled +# service. See the Java Security Standard Algorithm Names Specification +# for information about Standard Algorithm Names. Matching is +# performed using a case-insensitive exact matching rule. For Cipher service, +# its algorithm is the transformation string. +# +# Note: If the property value contains entries with invalid syntax or +# unsupported services at the time of checking, an ExceptionInInitializerError +# with a cause of IllegalArgumentException will be thrown. +# +# Note: The restriction is applied in the various getInstance(...) methods +# of the supported Service classes, i.e. Cipher, KeyStore, MessageDigest, +# and Signature. If the algorithm is disabled, a NoSuchAlgorithmException will +# be thrown by the getInstance methods of Cipher, MessageDigest, and Signature +# and a KeyStoreException by the getInstance methods of KeyStore. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# Example: +# jdk.crypto.disabledAlgorithms=Cipher.RSA/ECB/PKCS1Padding, MessageDigest.MD2 +# +#jdk.crypto.disabledAlgorithms= + +# # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS) # processing in JSSE implementation. # @@ -1360,6 +1408,9 @@ # CAMERFIRMA_TLS : Distrust TLS Server certificates anchored by # a Camerfirma root CA and issued after April 15, 2025. # +# CHUNGHWA_TLS : Distrust TLS Server certificates anchored by +# a Chunghwa root CA and issued after March 17, 2026. +# # Leading and trailing whitespace surrounding each value are ignored. # Unknown values are ignored. If the property is commented out or set to the # empty String, no policies are enforced. @@ -1371,7 +1422,8 @@ # jdk.certpath.disabledAlgorithms; those restrictions are still enforced even # if this property is not enabled. # -jdk.security.caDistrustPolicies=SYMANTEC_TLS,ENTRUST_TLS,CAMERFIRMA_TLS +jdk.security.caDistrustPolicies=SYMANTEC_TLS,ENTRUST_TLS,CAMERFIRMA_TLS,\ + CHUNGHWA_TLS # # FilePermission path canonicalization diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/VERSION openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/VERSION --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/VERSION 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/VERSION 2026-04-17 19:08:13.000000000 +0000 @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2025b +tzdata2026a diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/africa openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/africa --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/africa 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/africa 2026-04-17 19:08:13.000000000 +0000 @@ -27,9 +27,9 @@ # 2009-05-17 by Arthur David Olson. # This file is by no means authoritative; if you think you know better, -# go ahead and edit the file (and please send any changes to -# tz@iana.org for general use in the future). For more, please see -# the file CONTRIBUTING in the tz distribution. +# go ahead and edit the file, and please send any changes to +# the public mailing list tz@iana.org for general use in the future. +# For more, please see the file CONTRIBUTING in the tz distribution. # From Paul Eggert (2018-05-27): # @@ -138,8 +138,9 @@ -1:00 - %z # Chad +# Fort-Lamy was renamed to N’Djamena on 1973-04-06. # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Africa/Ndjamena 1:00:12 - LMT 1912 Jan 1 # N'Djamena +Zone Africa/Ndjamena 1:00:12 - LMT 1912 Jan 1 # Fort-Lamy 1:00 - WAT 1979 Oct 14 1:00 1:00 WAST 1980 Mar 8 1:00 - WAT diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/antarctica openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/antarctica --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/antarctica 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/antarctica 2026-04-17 19:08:13.000000000 +0000 @@ -26,13 +26,10 @@ # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. -# From Paul Eggert (1999-11-15): -# To keep things manageable, we list only locations occupied year-round; see -# COMNAP - Stations and Bases -# http://www.comnap.aq/comnap/comnap.nsf/P/Stations/ -# and -# Summary of the Peri-Antarctic Islands (1998-07-23) -# http://www.spri.cam.ac.uk/bob/periant.htm +# From Paul Eggert (2025-08-16): +# To keep things manageable, list only locations occupied year-round; see +# Antarctic Facilities Information +# https://www.comnap.aq/antarctic-facilities-information # for information. # Unless otherwise specified, we have no time zone information. @@ -167,6 +164,7 @@ # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20 # Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26 +# Qinling, Inexpressible I, Terra Nova Bay, -7456+16343, since 2024-02-07 # France - year-round bases (also see "France & Italy") # diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/asia openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/asia --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/asia 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/asia 2026-04-17 19:08:13.000000000 +0000 @@ -27,9 +27,9 @@ # 2009-05-17 by Arthur David Olson. # This file is by no means authoritative; if you think you know better, -# go ahead and edit the file (and please send any changes to -# tz@iana.org for general use in the future). For more, please see -# the file CONTRIBUTING in the tz distribution. +# go ahead and edit the file, and please send any changes to +# the public mailing list tz@iana.org for general use in the future. +# For more, please see the file CONTRIBUTING in the tz distribution. # From Paul Eggert (2019-07-11): # diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/australasia openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/australasia --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/australasia 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/australasia 2026-04-17 19:08:13.000000000 +0000 @@ -960,9 +960,9 @@ # NOTES # This file is by no means authoritative; if you think you know better, -# go ahead and edit the file (and please send any changes to -# tz@iana.org for general use in the future). For more, please see -# the file CONTRIBUTING in the tz distribution. +# go ahead and edit the file, and please send any changes to +# the public mailing list tz@iana.org for general use in the future. +# For more, please see the file CONTRIBUTING in the tz distribution. # From Paul Eggert (2018-11-18): # @@ -2011,6 +2011,7 @@ # From Paul Eggert (2018-11-19): # The 1921-01-15 introduction of standard time is in Shanks; it is also in # "Standard Time Throughout the World", US National Bureau of Standards (1935), +# https://nvlpubs.nist.gov/nistpubs/Legacy/circ/nbscircular406.pdf # page 3, which does not give the UT offset. In response to a comment by # Phake Nick I set the Nauru time of occupation by Japan to # 1942-08-29/1945-09-08 by using dates from: @@ -2078,9 +2079,10 @@ # https://webspace.science.uu.nl/~gent0113/idl/idl_alaska_samoa.htm # Although Shanks & Pottenger says they both switched to UT -11:30 -# in 1911, and to -11 in 1950. many earlier sources give -11 +# in 1911, and to -11 in 1950, many earlier sources give -11 # for American Samoa, e.g., the US National Bureau of Standards # circular "Standard Time Throughout the World", 1932. +# https://nvlpubs.nist.gov/nistpubs/Legacy/circ/nbscircular399.pdf # Assume American Samoa switched to -11 in 1911, not 1950, # and that after 1950 they agreed until (western) Samoa skipped a # day in 2011. Assume also that the Samoas follow the US and New diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/etcetera openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/etcetera --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/etcetera 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/etcetera 2026-04-17 19:08:13.000000000 +0000 @@ -43,7 +43,8 @@ # which load the "UTC" file to handle seconds properly. Zone Etc/UTC 0 - UTC -# Functions like gmtime load the "GMT" file to handle leap seconds properly. +# If leap second support is enabled, functions like gmtime +# load the "GMT" file to handle leap seconds properly. # Vanguard section, which works with most .zi parsers. #Zone GMT 0 - GMT # Rearguard section, for TZUpdater 2.3.2 and earlier. diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/europe openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/europe --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/europe 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/europe 2026-04-17 19:08:13.000000000 +0000 @@ -27,9 +27,9 @@ # 2009-05-17 by Arthur David Olson. # This file is by no means authoritative; if you think you know better, -# go ahead and edit the file (and please send any changes to -# tz@iana.org for general use in the future). For more, please see -# the file CONTRIBUTING in the tz distribution. +# go ahead and edit the file, and please send any changes to +# the public mailing list tz@iana.org for general use in the future. +# For more, please see the file CONTRIBUTING in the tz distribution. # From Paul Eggert (2017-02-10): # @@ -65,7 +65,7 @@ # <https://www.jstor.org/stable/1774359>. He writes: # "It is requested that corrections and additions to these tables # may be sent to Mr. John Milne, Royal Geographical Society, -# Savile Row, London." Nowadays please email them to tz@iana.org. +# Savile Row, London." Nowadays please see the file CONTRIBUTING. # # Byalokoz EL. New Counting of Time in Russia since July 1, 1919. # This Russian-language source was consulted by Vladimir Karpinsky; see @@ -77,7 +77,7 @@ # Десятая гос. тип., 1919. # http://resolver.gpntb.ru/purl?docushare/dsweb/Get/Resource-2011/Byalokoz__E.L.__Novyy__schet__vremeni__v__techenie__sutok__izd__2(1).pdf # -# Brazil's Divisão Serviço da Hora (DSHO), +# Brazil's Divisão de Serviços da Hora (DISHO) # History of Summer Time # <http://pcdsh01.on.br/HISTHV.htm> # (1998-09-21, in Portuguese) @@ -937,7 +937,7 @@ Rule Belgium 1923 only - Apr 21 23:00s 1:00 S Rule Belgium 1924 only - Mar 29 23:00s 1:00 S Rule Belgium 1925 only - Apr 4 23:00s 1:00 S -# DSH writes that a royal decree of 1926-02-22 specified the Sun following 3rd +# DISHO writes that a royal decree of 1926-02-22 specified the Sun following 3rd # Sat in Apr (except if it's Easter, in which case it's one Sunday earlier), # to Sun following 1st Sat in Oct, and that a royal decree of 1928-09-15 # changed the transition times to 02:00 GMT. @@ -1064,9 +1064,19 @@ # Greenland # -# From Paul Eggert (2004-10-31): +# From Paul Eggert (2026-01-22): +# During World War II, Greenland was effectively independent of Denmark and +# observed daylight saving time. TIME, volume 37, page 23 (1941-04-21) +# <https://time.com/archive/6770243/war-peace-greenlands-icy-mountains/> says, +# "Penfield and West made their way to the U.S.'s most northerly consulate. +# They were astonished to find that Greenlanders, with almost 24 hours of +# sunlight a day during the summer, have daylight saving time." +# As the details are unknown they are omitted from the data for now. +# # During World War II, Germany maintained secret manned weather stations in # East Greenland and Franz Josef Land, but we don't know their time zones. +# Also, they're likely out of scope for the database +# as we lack resources to track every bit of military activity. # My source for this is Wilhelm Dege's book mentioned under Svalbard. # # From Paul Eggert (2017-12-10): @@ -1333,6 +1343,13 @@ # France # Monaco +# From Robert H. van Gent (2025-07-21): +# The most recent issue of the Annuaire [par le Bureau des Longitudes] +# on Gallica (2021) ... lists information for France +# https://gallica.bnf.fr/ark:/12148/bpt6k9127672b/f52.item +# From Paul Eggert (2025-07-21): +# Go with the 2020 Annuaire (published 2021) except as noted below. + # From Ciro Discepolo (2000-12-20): # # Henri Le Corre, Régimes horaires pour le monde entier, Éditions @@ -1394,7 +1411,6 @@ # problems in Algiers, Monaco and Tunis. # -# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule France 1916 only - Jun 14 23:00s 1:00 S Rule France 1916 1919 - Oct Sun>=1 23:00s 0 - @@ -1406,9 +1422,25 @@ Rule France 1921 only - Mar 14 23:00s 1:00 S Rule France 1921 only - Oct 25 23:00s 0 - Rule France 1922 only - Mar 25 23:00s 1:00 S -# DSH writes that a law of 1923-05-24 specified 3rd Sat in Apr at 23:00 to 1st -# Sat in Oct at 24:00; and that in 1930, because of Easter, the transitions -# were Apr 12 and Oct 5. Go with Shanks & Pottenger. +# From Robert H. van Gent (2025-07-22): +# There is a curious history behind the erroneous date for the start of +# daylight saving in France in 1923 as listed in the current issues of +# the Annuaire du Bureau des Longitudes. [See:] +# https://lists.iana.org/hyperkitty/list/tz@iana.org/message/MYQEJMSXO2AIEZ3UIXZKMTTAIPY7KNT2/ +# From Brian Inglis (2025-07-23): +# Légifrance JORF No. 0073 du 15 mars 1922 +# https://www.legifrance.gouv.fr/jorf/jo/id/JORFCONT000000008324 +# Légifrance JORF No. 0139 du 25 mai 1923 +# https://www.legifrance.gouv.fr/jorf/jo/id/JORFCONT000000008416 +# From Paul Eggert (2025-07-23): +# The latter specifies March's last Saturday at 23:00 to October's first +# Saturday at 24:00, except that if neighboring allies agree the dates +# can be moved to April's third Saturday and September's third Saturday. +# Apparently spring 1923 was tricky. DISHO writes that in 1930, +# because of Easter, the transitions were Apr 12 and Oct 5. +# Use the 2020 Annuaire dates, except for spring 1923 where +# Shanks & Pottenger's May 26 matches the dates given in the 1924 and +# 1961-2001 issues of the Annuaire. Rule France 1922 1938 - Oct Sat>=1 23:00s 0 - Rule France 1923 only - May 26 23:00s 1:00 S Rule France 1924 only - Mar 29 23:00s 1:00 S @@ -1958,7 +1990,6 @@ # From Stepan Golosunov (2016-03-07): # the act of the government of the Republic of Moldova Nr. 132 from 1990-05-04 -# http://lex.justice.md/viewdoc.php?action=view&view=doc&id=298782&lang=2 # ... says that since 1990-05-06 on the territory of the Moldavian SSR # time would be calculated as the standard time of the second time belt # plus one hour of the "summer" time. To implement that clocks would be @@ -2013,9 +2044,61 @@ # says the 2014-03-30 spring-forward transition was at 02:00 local time. # Guess that since 1997 Moldova has switched one hour before the EU. +# From Heitor David Pinto (2026-02-22): +# Soviet Moldovan resolution 132 of 1990 defined the summer time period from +# the last Sunday in March at 2:00 to the last Sunday in September at 3:00, +# matching the dates used in most of Europe at the time: +# https://web.archive.org/web/20211107050832/http://lex.justice.md/viewdoc.php?action=view&view=doc&id=298782&lang=1 +# +# It seems that in 1996 Moldova changed the end date to October like most of +# Europe, but kept the transitions at 2:00 and 3:00 rather than 1:00 UTC, +# which would have been locally 3:00 and 4:00.... +# +# The notices in the Moldovan government website and broadcaster showed the +# transitions at 2:00 and 3:00 until 2021: +# 2015 https://old.gov.md/en/node/7304 +# 2016 https://old.gov.md/en/node/12587 +# 2017 https://old.gov.md/en/node/20654 +# 2017 https://old.gov.md/en/content/moldova-upholds-winter-time-night-28-29-october +# 2018 https://old.gov.md/en/content/moldova-switch-summer-time +# 2018 https://old.gov.md/en/content/cabinet-ministers-informs-about-switch-winter-time-28-october +# 2019 https://old.gov.md/en/content/moldova-switch-summer-time-31-march +# 2019 https://old.gov.md/en/node/31122 +# 2020 https://old.gov.md/en/node/32771 +# 2020 https://old.gov.md/en/node/34497 +# 2021 https://trm.md/ro/social/moldova-trece-in-aceasta-noapte-la-ora-de-vara +# 2021 https://trm.md/en/social/republica-moldova-trece-la-ora-de-iarna1 +# +# However, since 2022, the notices showed the transitions at 3:00 and 4:00, +# matching the EU rule at 1:00 UTC: +# 2022 https://trm.md/en/social/in-acest-weekend-republica-moldova-trece-la-ora-de-vara +# 2022 https://old.gov.md/en/content/moldova-switch-winter-time +# 2023 https://moldova1.md/p/6587/ora-de-vara-2023-cum-schimbam-acele-ceasornicelor-si-cand-trecem-la-ora-de-vara +# 2023 https://old.gov.md/en/node/46662 +# 2024 https://moldova1.md/p/26535/republica-moldova-trece-la-ora-de-vara-in-acest-weekend +# 2024 https://moldova1.md/p/37768/republica-moldova-trece-in-aceasta-noapte-la-ora-de-iarna +# 2025 https://moldova1.md/p/46349/republica-moldova-trece-la-ora-de-vara-pe-30-martie-cum-ne-afecteaza-si-ce-recomanda-medicii +# 2025 https://moldova1.md/p/60469/republica-moldova-trece-la-ora-de-iarna-ceasurile-se-dau-inapoi-cu-o-ora +# +# It seems that the changes to the end date and transition times were just +# done in practice without formally changing the resolution. In late 2025, the +# government said that the Soviet resolution was still in force, and proposed +# a new resolution to replace it and formally establish the EU rule: +# ... based on the notices, it seems that in practice Moldova already +# uses the EU rule since 2022. This was also the year when Moldova applied to +# join the EU. +# +# From Robert Bastian (2026-02-26): +# This has been approved and published in the government gazette: +# https://monitorul.gov.md/ro/monitorul/view/pdf/3234/part/2#page=27 +# +# From Paul Eggert (2026-02-24): +# Also see Svetlana Rudenko, "Moldova abandons the 'Soviet era'", Logos Press, +# 2026-02-21 <https://logos-pres.md/en/news/moldova-abandons-the-soviet-era/>. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S -Rule Moldova 1997 max - Mar lastSun 2:00 1:00 S -Rule Moldova 1997 max - Oct lastSun 3:00 0 - +Rule Moldova 1997 2021 - Mar lastSun 2:00 1:00 S +Rule Moldova 1997 2021 - Oct lastSun 3:00 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Chisinau 1:55:20 - LMT 1880 @@ -2028,7 +2111,8 @@ 2:00 Russia EE%sT 1992 2:00 E-Eur EE%sT 1997 # See Romania commentary for the guessed 1997 transition to EU rules. - 2:00 Moldova EE%sT + 2:00 Moldova EE%sT 2022 + 2:00 EU EE%sT # Poland @@ -2119,12 +2203,10 @@ # all clocks therefore having to be advanced or set back correspondingly ... # Rule NAME FROM TO - IN ON AT SAVE LETTER/S -# From Tim Parenti (2024-07-01), per Paul Eggert (1999-01-30): -# DSH writes in their history that Decreto 1469 of 1915-03-30 established -# summer time and that, "despite" this, the change to the clocks was not done -# every year, depending on what Spain did, because of railroad schedules. -# In fact, that decree had nothing to do with DST; rather, it regulated the -# sending of time signals. But we do see linkage to Spain in the 1920s below. +# From Tim Parenti (2024-07-01): +# Decreto 1469 of 1915-03-30 ... had nothing to do with DST; +# rather it regulated the sending of time signals. +# But we do see linkage to Spain in the 1920s below. # https://dre.pt/dr/detalhe/decreto/1469-1915-285721 # https://dre.pt/application/conteudo/285721 # @@ -2416,7 +2498,7 @@ # Nine O'clock <http://www.nineoclock.ro/POL/1778pol.html> # (1998-10-23) reports that the switch occurred at # 04:00 local time in fall 1998. For lack of better info, -# assume that Romania and Moldova switched to EU rules in 1997, +# assume that Romania switched to EU rules in 1997, # the same year as Bulgaria. # # Rule NAME FROM TO - IN ON AT SAVE LETTER/S diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/iso3166.tab openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/iso3166.tab --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/iso3166.tab 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/iso3166.tab 2026-04-17 19:08:13.000000000 +0000 @@ -26,22 +26,22 @@ # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # -# From Paul Eggert (2023-09-06): +# From Paul Eggert (2025-07-01): # This file contains a table of two-letter country codes. Columns are -# separated by a single tab. Lines beginning with '#' are comments. +# separated by a single tab. Lines beginning with ‘#’ are comments. # All text uses UTF-8 encoding. The columns of the table are as follows: # # 1. ISO 3166-1 alpha-2 country code, current as of -# ISO/TC 46 N1108 (2023-04-05). See: ISO/TC 46 Documents +# ISO/TC 46 N1127 (2024-02-29). See: ISO/TC 46 Documents # https://www.iso.org/committee/48750.html?view=documents # 2. The usual English name for the coded region. This sometimes # departs from ISO-listed names, sometimes so that sorted subsets -# of names are useful (e.g., "Samoa (American)" and "Samoa -# (western)" rather than "American Samoa" and "Samoa"), +# of names are useful (e.g., “Samoa (American)” and “Samoa +# (western)” rather than “American Samoa” and “Samoa”), # sometimes to avoid confusion among non-experts (e.g., -# "Czech Republic" and "Turkey" rather than "Czechia" and "Türkiye"), -# and sometimes to omit needless detail or churn (e.g., "Netherlands" -# rather than "Netherlands (the)" or "Netherlands (Kingdom of the)"). +# “Czech Republic” and “Turkey” rather than “Czechia” and “Türkiye”), +# and sometimes to omit needless detail or churn (e.g., “Netherlands” +# rather than “Netherlands (the)” or “Netherlands (Kingdom of the)”). # # The table is sorted by country code. # @@ -94,7 +94,7 @@ CF Central African Rep. CG Congo (Rep.) CH Switzerland -CI Côte d'Ivoire +CI Côte d’Ivoire CK Cook Islands CL Chile CM Cameroon diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/leapseconds openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/leapseconds --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/leapseconds 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/leapseconds 2026-04-17 19:08:13.000000000 +0000 @@ -28,7 +28,8 @@ # This file is generated automatically from the data in the public-domain # NIST/IERS format leap-seconds.list file, which can be copied from # <https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list> -# or, in a variant with different comments, from +# or via a less-secure protocol and with different comments and +# less volatile last-modified and expiration timestamps, from # <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>. # For more about leap-seconds.list, please see # The NTP Timescale and Leap Seconds @@ -92,11 +93,17 @@ # Any additional leap seconds will come after this. # This Expires line is commented out for now, # so that pre-2020a zic implementations do not reject this file. -#Expires 2025 Dec 28 00:00:00 +#Expires 2026 Dec 28 00:00:00 -# POSIX timestamps for the data in this file: -#updated 1736208000 (2025-01-07 00:00:00 UTC) -#expires 1766880000 (2025-12-28 00:00:00 UTC) +# Here are POSIX timestamps for the data in this file. +# "#updated" gives the last time the leap seconds data changed +# or, if this file was derived from the IERS leap-seconds.list, +# the last time that file changed in any way. +# "#expires" gives the first time this file might be wrong; +# if this file was derived from the IERS leap-seconds.list, +# this is typically a bit less than one year after "updated". +#updated 1767698058 (2026-01-06 11:14:18 UTC) +#expires 1798416000 (2026-12-28 00:00:00 UTC) # Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) -# File expires on 28 December 2025 +# File expires on 28 December 2026 diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/northamerica openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/northamerica --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/northamerica 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/northamerica 2026-04-17 19:08:13.000000000 +0000 @@ -29,9 +29,9 @@ # also includes Central America and the Caribbean # This file is by no means authoritative; if you think you know better, -# go ahead and edit the file (and please send any changes to -# tz@iana.org for general use in the future). For more, please see -# the file CONTRIBUTING in the tz distribution. +# go ahead and edit the file, and please send any changes to +# the public mailing list tz@iana.org for general use in the future. +# For more, please see the file CONTRIBUTING in the tz distribution. # From Paul Eggert (1999-03-22): # A reliable and entertaining source about time zones is @@ -1241,6 +1241,16 @@ # _Los Angeles Times_ (1998-11-10), A1, A10; it cites # Jimmy Skaggs, _The Great Guano Rush_ (1994). +# From Rob van Gent (2025-07-23): +# Another useful source for historical time zone information appears to be +# a series of circulars with the title "Standard Time Throughout the World" +# issued between 1925 and 1950 by the U.S. Bureau of Standards. +# I found the following issues online: +# https://nvlpubs.nist.gov/nistpubs/Legacy/circ/nbscircular280.pdf (1925) +# https://nvlpubs.nist.gov/nistpubs/Legacy/circ/nbscircular399.pdf (1932) +# https://nvlpubs.nist.gov/nistpubs/Legacy/circ/nbscircular406.pdf (1935) +# https://nvlpubs.nist.gov/nistpubs/Legacy/circ/nbscircular496.pdf (1950) + ################################################################################ @@ -2457,12 +2467,35 @@ # on the same dates or with a difference of one day. # So it may be easier to implement these changes as DST with rule CA # during this whole period. -# -# From Paul Eggert (2024-08-18): -# For now, maintain the slightly-different history for Baja California, + +# From Alois Treindl (2025-07-29): +# I did a quick newspaper archive research on https://hndm.iib.unam.mx/ +# and found that Periódico Oficial del Estado de Baja California Norte +# (1973-04-20) states clearly that DST was observed from last Sunday +# in April to last Sunday in October.... I have a few more data from the +# official bulletin for DST begin or end in Baja California 1964 1967 1969 +# 1972 1973 (already sent) 1974 1975 1976 I do not know whether it is safe to +# assume that it also applied in the years where I did not yet find proof. +# The 1974 end of DST contains a reference to an Acuerdo of 1973-dec-20 which +# I could not find.... One might assume that Baja California, which followed +# US-CA in all these other yours, did the same. +# +# From Paul Eggert (2025-08-04): +# Assume that Tijuana agreed with San Diego from 1953 through 1996, +# as this agrees with Alois Treindl's data and with Shanks. +# For now, keep the slightly-different 1948/1952 history for Baja California, # as we have no information on whether 1948/1952 clocks in Tijuana followed # the decrees or followed San Diego. +# From Mark Schapiro, writing in The Nation (2002-10-28): +# https://www.thenation.com/article/archive/sowing-disaster/ +# When Mexican clocks were turned back for daylight saving time in the spring, +# the Zapotecs refused to make the adjustment, insisting that they live in +# "God's time," not in what they derisively call "Fox time," referring to +# President Vicente Fox in far-off Mexico City. +# From Paul Eggert (2025-08-04): +# Unfortunately we have no data to track this informal practice. + # From Alan Perry (1996-02-15): # A guy from our Mexico subsidiary finally found the Presidential Decree # outlining the timezone changes in Mexico. @@ -2728,7 +2761,7 @@ # Chihuahua (near US border - western side) # This includes the municipios of Janos, Ascensión, Juárez, Guadalupe, and # Práxedis G Guerrero. -# http://gaceta.diputados.gob.mx/PDF/65/2a022/nov/20221124-VII.pdf +# https://gaceta.diputados.gob.mx/PDF/65/2022/nov/20221124-VII.pdf Zone America/Ciudad_Juarez -7:05:56 - LMT 1922 Jan 1 7:00u -7:00 - MST 1927 Jun 10 -6:00 - CST 1930 Nov 15 @@ -2743,7 +2776,7 @@ # Chihuahua (near US border - eastern side) # This includes the municipios of Coyame del Sotol, Ojinaga, and Manuel # Benavides. -# http://gaceta.diputados.gob.mx/PDF/65/2a022/nov/20221124-VII.pdf +# https://gaceta.diputados.gob.mx/PDF/65/2022/nov/20221124-VII.pdf Zone America/Ojinaga -6:57:40 - LMT 1922 Jan 1 7:00u -7:00 - MST 1927 Jun 10 -6:00 - CST 1930 Nov 15 @@ -2840,9 +2873,7 @@ -8:00 1:00 PDT 1951 Sep 30 2:00 -8:00 - PST 1952 Apr 27 2:00 -8:00 1:00 PDT 1952 Sep 28 2:00 - -8:00 - PST 1954 - -8:00 CA P%sT 1961 - -8:00 - PST 1976 + -8:00 CA P%sT 1967 -8:00 US P%sT 1996 -8:00 Mexico P%sT 2001 -8:00 US P%sT 2002 Feb 20 diff -Nru openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/southamerica openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/southamerica --- openjdk-25-25.0.2+10/src/java.base/share/data/tzdata/southamerica 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/data/tzdata/southamerica 2026-04-17 19:08:13.000000000 +0000 @@ -27,9 +27,9 @@ # 2009-05-17 by Arthur David Olson. # This file is by no means authoritative; if you think you know better, -# go ahead and edit the file (and please send any changes to -# tz@iana.org for general use in the future). For more, please see -# the file CONTRIBUTING in the tz distribution. +# go ahead and edit the file, and please send any changes to +# the public mailing list tz@iana.org for general use in the future. +# For more, please see the file CONTRIBUTING in the tz distribution. # From Paul Eggert (2016-12-05): # diff -Nru openjdk-25-25.0.2+10/src/java.base/share/legal/gcc.md openjdk-25-25.0.3+9/src/java.base/share/legal/gcc.md --- openjdk-25-25.0.2+10/src/java.base/share/legal/gcc.md 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/legal/gcc.md 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,2084 @@ +## GCC - libgcc and libstdc++ 14.2.0 + +### GNU GENERAL PUBLIC LICENSE v3 + +``` + Version 3, 29 June 2007 + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + Preamble + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + 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. + The precise terms and conditions for copying, distribution and +modification follow. + TERMS AND CONDITIONS + 0. Definitions. + "This License" refers to version 3 of the GNU General Public License. + "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. + 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. + 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. + 13. Use with the GNU Affero General Public 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. + 14. Revised Versions of this License. + 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. + 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. + 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. + 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. + 15. Disclaimer of Warranty. + 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. + 16. Limitation of Liability. + 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. + 17. Interpretation of Sections 15 and 16. + 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. + 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 +state 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) <year> <name of author> + 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 3 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, see <http://www.gnu.org/licenses/>. +Also add information on how to contact you by electronic and paper mail. + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + <program> Copyright (C) <year> <name of author> + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + The GNU 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 Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. +``` + +### GCC RUNTIME LIBRARY EXCEPTION v3.1 + +``` +Version 3.1, 31 March 2009 +Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/> +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. +0. Definitions. +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. +1. Grant of Additional Permission. +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. +2. No Weakening of GCC Copyleft. +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. +``` + +### GNU GENERAL PUBLIC LICENSE v2 + +``` + GNU GENERAL PUBLIC LICENSE + 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. + + GNU GENERAL PUBLIC LICENSE + 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) <year> <name of author> + 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. +``` + +### GNU LESSER GENERAL PUBLIC LICENSE v3 + +``` + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + 0. Additional Definitions. + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + 1. Exception to Section 3 of the GNU GPL. + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + 2. Conveying Modified Versions. + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + 3. Object Code Incorporating Material from Library Header Files. + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + b) Accompany the object code with a copy of the GNU GPL and this license + document. + 4. Combined Works. + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + d) Do one of the following: + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + 5. Combined Libraries. + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + 6. Revised Versions of the GNU Lesser General Public License. + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser 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 +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. +``` + +### GNU LESSER GENERAL PUBLIC LICENSE v2.1 + +``` + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, 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.] + Preamble + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + When we speak of free software, we are referring to freedom of use, +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 and use pieces of +it in new free programs; and that you are informed that you can do +these things. + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + 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 +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, 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 library. + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + 1. You may copy and distribute verbatim copies of the Library's +complete 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 distribute a copy of this License along with the +Library. + 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 Library or any portion +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +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 Library, 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 Library. +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you 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. + If distribution of 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 satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be 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. + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library 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. + 9. 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 Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +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 with +this License. + 11. 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 Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library 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 Library. +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. + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +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 Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +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 + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 16. 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 LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 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 +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + To apply these terms, attach the following notices to the library. +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 library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + This library 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 library is distributed in the hope that 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. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Also add information on how to contact you by electronic and paper mail. +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice +That's all there is to it! +``` + +### GNU Free Documentation License v1.3 + +``` + GNU Free Documentation License + Version 1.3, 3 November 2008 + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +0. PREAMBLE +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. +1. APPLICABILITY AND DEFINITIONS +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. +The "publisher" means any person or entity that distributes copies of +the Document to the public. +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. +2. VERBATIM COPYING +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no +other conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. +3. COPYING IN QUANTITY +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to +give them a chance to provide you with an updated version of the +Document. +4. MODIFICATIONS +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. +5. COMBINING DOCUMENTS +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". +6. COLLECTIONS OF DOCUMENTS +You may make a collection consisting of the Document and other +documents released under this License, and replace the individual +copies of this License in the various documents with a single copy +that is included in the collection, provided that you follow the rules +of this License for verbatim copying of each of the documents in all +other respects. +You may extract a single document from such a collection, and +distribute it individually under this License, provided you insert a +copy of this License into the extracted document, and follow this +License in all other respects regarding verbatim copying of that +document. +7. AGGREGATION WITH INDEPENDENT WORKS +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. +8. TRANSLATION +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. +9. TERMINATION +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. +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, receipt of a copy of some or all of the same material does +not give you any rights to use it. +10. FUTURE REVISIONS OF THIS LICENSE +The Free Software Foundation may publish new, revised versions of the +GNU Free Documentation 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. See +http://www.gnu.org/copyleft/. +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. +11. RELICENSING +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +"Massive Multiauthor Collaboration" (or "MMC") contained in the site +means any set of copyrightable works thus published on the MMC site. +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. +"Incorporate" means to publish or republish a Document, in whole or in +part, as part of another Document. +An MMC is "eligible for relicensing" if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole or +in part into the MMC, (1) had no cover texts or invariant sections, and +(2) were thus incorporated prior to November 1, 2008. +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. +ADDENDUM: How to use this License for your documents +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. +``` + +### The Regents of the University of California + +``` +/*- + * Copyright (c) 1991 The Regents of the University of California. + * 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. [rescinded 22 July 1999] + * 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. + */ +``` + +### The Go Authors + +``` +Copyright (c) 2009 The Go 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: + * 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. +``` + +### Apache License v2.0 + +``` + 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. +``` + diff -Nru openjdk-25-25.0.2+10/src/java.base/share/legal/zlib.md openjdk-25-25.0.3+9/src/java.base/share/legal/zlib.md --- openjdk-25-25.0.2+10/src/java.base/share/legal/zlib.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/legal/zlib.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,9 +1,9 @@ -## zlib v1.3.1 +## zlib v1.3.2 ### zlib License <pre> -Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler +Copyright (C) 1995-2026 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 diff -Nru openjdk-25-25.0.2+10/src/java.base/share/man/java.md openjdk-25-25.0.3+9/src/java.base/share/man/java.md --- openjdk-25-25.0.2+10/src/java.base/share/man/java.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/man/java.md 2026-04-17 19:08:13.000000000 +0000 @@ -2891,6 +2891,46 @@ expensive operations. Using a lower value will cause heap memory to be uncommitted earlier, at the risk of soon having to commit it again. +`-XX:+UseShenandoahGC` +: Enables the use of the Shenandoah garbage collector. This is a low pause + time, concurrent garbage collector. Its pause times are not proportional to + the size of the heap. Shenandoah garbage collector can work with compressed + pointers. See `-XX:UseCompressedOops` for further information about + compressed pointers. + +`-XX:ShenandoahGCMode=`*mode* +: Sets the GC mode for Shenandoah GC to use. By default, this option is set + to `satb`. Among other things, this defines which barriers are in use. + Possible mode values include the following: + + `satb` + : Snapshot-at-the-beginning concurrent GC (three pass mark-evac-update). + It is a single generation GC. + + `generational` + : It is also a snapshot-at-the-beginning and concurrent GC, but it is + generational. Please see [JEP 404](https://openjdk.org/jeps/404) and + [JEP 521](https://openjdk.org/jeps/521) for its advantages and risks. + +`-XX:ShenandoahGCHeuristics=`*heuristics* +: Sets the heuristics for Shenandoah GC to use. By default, this option is + set to `adaptive`. This fine-tunes the GC mode selected, by choosing when + to start the GC, how much to process on each cycle, and what other features + to automatically enable. When `-XX:ShenandoahGCMode` is `generational`, the + only supported option is the default, `adaptive`. + + Possible heuristics are the following: + + `adaptive` + : To maintain the given amount of free heap at all times, even during + the GC cycle. + + `static` + : Trigger GC when free heap falls below a specified threshold. + + `compact` + : Run GC more frequently and with deeper targets to free up more memory. + ## Deprecated Java Options These `java` options are deprecated and might be removed in a future JDK diff -Nru openjdk-25-25.0.2+10/src/java.base/share/native/libzip/zip_util.c openjdk-25-25.0.3+9/src/java.base/share/native/libzip/zip_util.c --- openjdk-25-25.0.2+10/src/java.base/share/native/libzip/zip_util.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/native/libzip/zip_util.c 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -568,7 +568,7 @@ readCEN(jzfile *zip, jint knownTotal) { /* Following are unsigned 32-bit */ - jlong endpos, end64pos, cenpos, cenlen, cenoff; + jlong endpos, end64pos, cenpos, cenlen, cenoff, total64; /* Following are unsigned 16-bit */ jint total, tablelen, i, j; unsigned char *cenbuf = NULL; @@ -602,7 +602,16 @@ if ((end64pos = findEND64(zip, end64buf, endpos)) != -1) { cenlen = ZIP64_ENDSIZ(end64buf); cenoff = ZIP64_ENDOFF(end64buf); - total = (jint)ZIP64_ENDTOT(end64buf); + total64 = ZIP64_ENDTOT(end64buf); + /* ZIP64 size, offset and total-count fields are unsigned 64-bit + * values. Sizes and offsets that do not fit in signed jlong + * (i.e., >= 2^63), or total values that do not fit in jint, are + * not supported and indicate a corrupt or invalid zip file. + */ + if (cenlen < 0 || cenoff < 0 || total64 < 0 || total64 > INT_MAX) { + ZIP_FORMAT_ERROR("Zip64 END values exceed supported size"); + } + total = (jint)total64; endpos = end64pos; endhdrlen = ZIP64_ENDHDR; } @@ -1133,20 +1142,8 @@ } } -/* - * Returns the zip entry corresponding to the specified name, or - * NULL if not found. - */ -jzentry * -ZIP_GetEntry(jzfile *zip, char *name, jint ulen) -{ - if (ulen == 0) { - return ZIP_GetEntry2(zip, name, (jint)strlen(name), JNI_FALSE); - } - return ZIP_GetEntry2(zip, name, ulen, JNI_TRUE); -} - -jboolean equals(char* name1, int len1, char* name2, int len2) { +static jboolean +equals(const char* name1, int len1, const char* name2, int len2) { if (len1 != len2) { return JNI_FALSE; } @@ -1158,16 +1155,12 @@ return JNI_TRUE; } -/* - * Returns the zip entry corresponding to the specified name, or - * NULL if not found. - * This method supports embedded null character in "name", use ulen - * for the length of "name". - */ jzentry * -ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash) +ZIP_GetEntry(jzfile *zip, const char *name) { - unsigned int hsh = hashN(name, ulen); + // length of the entry name being searched for + const jint name_len = (jint) strlen(name); + const unsigned int hsh = hashN(name, name_len); jint idx; jzentry *ze = 0; @@ -1178,79 +1171,47 @@ idx = zip->table[hsh % zip->tablelen]; + /* Check the cached entry first */ + ze = zip->cache; + if (ze && equals(ze->name, ze->nlen, name, name_len)) { + /* Cache hit! Remove and return the cached entry. */ + zip->cache = 0; + ZIP_Unlock(zip); + return ze; + } + ze = 0; + /* - * This while loop is an optimization where a double lookup - * for name and name+/ is being performed. The name char - * array has enough room at the end to try again with a - * slash appended if the first table lookup does not succeed. + * Search down the target hash chain for a cell whose + * 32 bit hash matches the hashed name. */ - while(1) { + while (idx != ZIP_ENDCHAIN) { + jzcell *zc = &zip->entries[idx]; - /* Check the cached entry first */ - ze = zip->cache; - if (ze && equals(ze->name, ze->nlen, name, ulen)) { - /* Cache hit! Remove and return the cached entry. */ - zip->cache = 0; - ZIP_Unlock(zip); - return ze; - } - ze = 0; - - /* - * Search down the target hash chain for a cell whose - * 32 bit hash matches the hashed name. - */ - while (idx != ZIP_ENDCHAIN) { - jzcell *zc = &zip->entries[idx]; - - if (zc->hash == hsh) { - /* - * OK, we've found a ZIP entry whose 32 bit hashcode - * matches the name we're looking for. Try to read - * its entry information from the CEN. If the CEN - * name matches the name we're looking for, we're - * done. - * If the names don't match (which should be very rare) - * we keep searching. - */ - ze = newEntry(zip, zc, ACCESS_RANDOM); - if (ze && equals(ze->name, ze->nlen, name, ulen)) { - break; - } - if (ze != 0) { - /* We need to release the lock across the free call */ - ZIP_Unlock(zip); - ZIP_FreeEntry(zip, ze); - ZIP_Lock(zip); - } - ze = 0; + if (zc->hash == hsh) { + /* + * OK, we've found a ZIP entry whose 32 bit hashcode + * matches the name we're looking for. Try to read + * its entry information from the CEN. If the CEN + * name matches the name we're looking for, we're + * done. + * If the names don't match (which should be very rare) + * we keep searching. + */ + ze = newEntry(zip, zc, ACCESS_RANDOM); + if (ze && equals(ze->name, ze->nlen, name, name_len)) { + break; } - idx = zc->next; - } - - /* Entry found, return it */ - if (ze != 0) { - break; - } - - /* If no need to try appending slash, we are done */ - if (!addSlash) { - break; - } - - /* Slash is already there? */ - if (ulen > 0 && name[ulen - 1] == '/') { - break; + if (ze != 0) { + /* We need to release the lock across the free call */ + ZIP_Unlock(zip); + ZIP_FreeEntry(zip, ze); + ZIP_Lock(zip); + } + ze = 0; } - - /* Add slash and try once more */ - name[ulen++] = '/'; - name[ulen] = '\0'; - hsh = hash_append(hsh, '/'); - idx = zip->table[hsh % zip->tablelen]; - addSlash = JNI_FALSE; + idx = zc->next; } - Finally: ZIP_Unlock(zip); return ze; @@ -1462,9 +1423,9 @@ * has the size bigger than 2**32 bytes in ONE invocation. */ JNIEXPORT jzentry * -ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP) +ZIP_FindEntry(jzfile *zip, const char *name, jint *sizeP, jint *nameLenP) { - jzentry *entry = ZIP_GetEntry(zip, name, 0); + jzentry *entry = ZIP_GetEntry(zip, name); if (entry) { *sizeP = (jint)entry->size; *nameLenP = (jint)strlen(entry->name); diff -Nru openjdk-25-25.0.2+10/src/java.base/share/native/libzip/zip_util.h openjdk-25-25.0.3+9/src/java.base/share/native/libzip/zip_util.h --- openjdk-25-25.0.2+10/src/java.base/share/native/libzip/zip_util.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/share/native/libzip/zip_util.h 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -241,8 +241,15 @@ */ #define ZIP_ENDCHAIN ((jint)-1) +/* + * Returns the ZIP entry corresponding to the given (NULL terminated) + * entry name. Returns NULL if no entry is found by that name. + * If the entry is found, then the value of the given sizeP will be + * updated to the ZIP entry's size and the value of nameLenP will be + * updated to the ZIP entry name's length. + */ JNIEXPORT jzentry * -ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP); +ZIP_FindEntry(jzfile *zip, const char *name, jint *sizeP, jint *nameLenP); JNIEXPORT jboolean ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entrynm); @@ -268,8 +275,12 @@ JNIEXPORT void ZIP_Close(jzfile *zip); +/* + * Returns the ZIP entry corresponding to the given (NULL terminated) + * entry name. Returns NULL if no entry is found by that name. + */ jzentry * -ZIP_GetEntry(jzfile *zip, char *name, jint ulen); +ZIP_GetEntry(jzfile *zip, const char *name); void ZIP_Lock(jzfile *zip); void @@ -279,7 +290,6 @@ JNIEXPORT void ZIP_FreeEntry(jzfile *zip, jzentry *ze); jlong ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry); -jzentry * ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash); JNIEXPORT jboolean ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg); diff -Nru openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/Console_md.c openjdk-25-25.0.3+9/src/java.base/unix/native/libjava/Console_md.c --- openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/Console_md.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/unix/native/libjava/Console_md.c 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +31,19 @@ #include <stdlib.h> #include <unistd.h> -JNIEXPORT jboolean JNICALL -Java_java_io_Console_istty(JNIEnv *env, jclass cls) +JNIEXPORT jint JNICALL +Java_java_io_Console_ttyStatus(JNIEnv *env, jclass cls) { - return isatty(fileno(stdin)) && isatty(fileno(stdout)); + jint ret = 0; + + if (isatty(fileno(stdin))) { + ret |= java_io_Console_TTY_STDIN_MASK; + } + if (isatty(fileno(stdout))) { + ret |= java_io_Console_TTY_STDOUT_MASK; + } + if (isatty(fileno(stderr))) { + ret |= java_io_Console_TTY_STDERR_MASK; + } + return ret; } diff -Nru openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/java_props_md.c openjdk-25-25.0.3+9/src/java.base/unix/native/libjava/java_props_md.c --- openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/java_props_md.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/unix/native/libjava/java_props_md.c 2026-04-17 19:08:13.000000000 +0000 @@ -388,8 +388,12 @@ /* supported instruction sets */ { char list[258]; - sysinfo(SI_ISALIST, list, sizeof(list)); - sprops.cpu_isalist = strdup(list); + int ret = sysinfo(SI_ISALIST, list, sizeof(list)); + if (ret == 0) { + sprops.cpu_isalist = strdup(list); + } else { + sprops.cpu_isalist = NULL; + } } #else sprops.cpu_isalist = NULL; diff -Nru openjdk-25-25.0.2+10/src/java.base/unix/native/libnet/net_util_md.c openjdk-25-25.0.3+9/src/java.base/unix/native/libnet/net_util_md.c --- openjdk-25-25.0.2+10/src/java.base/unix/native/libnet/net_util_md.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/unix/native/libnet/net_util_md.c 2026-04-17 19:08:13.000000000 +0000 @@ -282,7 +282,7 @@ } else { jint address; if (family != java_net_InetAddress_IPv4) { - JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family unavailable"); + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "IPv6 protocol family unavailable"); return -1; } address = getInetAddress_addr(env, iaObj); diff -Nru openjdk-25-25.0.2+10/src/java.base/windows/native/libjava/Console_md.c openjdk-25-25.0.3+9/src/java.base/windows/native/libjava/Console_md.c --- openjdk-25-25.0.2+10/src/java.base/windows/native/libjava/Console_md.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/windows/native/libjava/Console_md.c 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,21 +31,28 @@ #include <stdlib.h> #include <Wincon.h> -JNIEXPORT jboolean JNICALL -Java_java_io_Console_istty(JNIEnv *env, jclass cls) +JNIEXPORT jint JNICALL +Java_java_io_Console_ttyStatus(JNIEnv *env, jclass cls) { + jint ret = 0; HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); + HANDLE hStdErr = GetStdHandle(STD_ERROR_HANDLE); - if (hStdIn == INVALID_HANDLE_VALUE || - hStdOut == INVALID_HANDLE_VALUE) { - return JNI_FALSE; + if (hStdIn != INVALID_HANDLE_VALUE && + GetFileType(hStdIn) == FILE_TYPE_CHAR) { + ret |= java_io_Console_TTY_STDIN_MASK; } - if (GetFileType(hStdIn) != FILE_TYPE_CHAR || - GetFileType(hStdOut) != FILE_TYPE_CHAR) { - return JNI_FALSE; + if (hStdOut != INVALID_HANDLE_VALUE && + GetFileType(hStdOut) == FILE_TYPE_CHAR) { + ret |= java_io_Console_TTY_STDOUT_MASK; } - return JNI_TRUE; + if (hStdErr != INVALID_HANDLE_VALUE && + GetFileType(hStdErr) == FILE_TYPE_CHAR) { + ret |= java_io_Console_TTY_STDERR_MASK; + } + + return ret; } diff -Nru openjdk-25-25.0.2+10/src/java.base/windows/native/libjava/java_props_md.c openjdk-25-25.0.3+9/src/java.base/windows/native/libjava/java_props_md.c --- openjdk-25-25.0.2+10/src/java.base/windows/native/libjava/java_props_md.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/windows/native/libjava/java_props_md.c 2026-04-17 19:08:13.000000000 +0000 @@ -419,17 +419,6 @@ * Operating system dwMajorVersion dwMinorVersion * ================== ============== ============== * - * Windows 95 4 0 - * Windows 98 4 10 - * Windows ME 4 90 - * Windows 3.51 3 51 - * Windows NT 4.0 4 0 - * Windows 2000 5 0 - * Windows XP 32 bit 5 1 - * Windows Server 2003 family 5 2 - * Windows XP 64 bit 5 2 - * where ((&ver.wServicePackMinor) + 2) = 1 - * and si.wProcessorArchitecture = 9 * Windows Vista family 6 0 (VER_NT_WORKSTATION) * Windows Server 2008 6 0 (!VER_NT_WORKSTATION) * Windows 7 6 1 (VER_NT_WORKSTATION) @@ -452,61 +441,19 @@ * versions are released. */ switch (platformId) { - case VER_PLATFORM_WIN32_WINDOWS: - if (majorVersion == 4) { - switch (minorVersion) { - case 0: sprops.os_name = "Windows 95"; break; - case 10: sprops.os_name = "Windows 98"; break; - case 90: sprops.os_name = "Windows Me"; break; - default: sprops.os_name = "Windows 9X (unknown)"; break; - } - } else { - sprops.os_name = "Windows 9X (unknown)"; - } - break; case VER_PLATFORM_WIN32_NT: - if (majorVersion <= 4) { - sprops.os_name = "Windows NT"; - } else if (majorVersion == 5) { - switch (minorVersion) { - case 0: sprops.os_name = "Windows 2000"; break; - case 1: sprops.os_name = "Windows XP"; break; - case 2: - /* - * From MSDN OSVERSIONINFOEX and SYSTEM_INFO documentation: - * - * "Because the version numbers for Windows Server 2003 - * and Windows XP 6u4 bit are identical, you must also test - * whether the wProductType member is VER_NT_WORKSTATION. - * and si.wProcessorArchitecture is - * PROCESSOR_ARCHITECTURE_AMD64 (which is 9) - * If it is, the operating system is Windows XP 64 bit; - * otherwise, it is Windows Server 2003." - */ - if (is_workstation && is_64bit) { - sprops.os_name = "Windows XP"; /* 64 bit */ - } else { - sprops.os_name = "Windows 2003"; - } - break; - default: sprops.os_name = "Windows NT (unknown)"; break; - } - } else if (majorVersion == 6) { + if (majorVersion == 6) { /* * See table in MSDN OSVERSIONINFOEX documentation. */ if (is_workstation) { switch (minorVersion) { - case 0: sprops.os_name = "Windows Vista"; break; - case 1: sprops.os_name = "Windows 7"; break; case 2: sprops.os_name = "Windows 8"; break; case 3: sprops.os_name = "Windows 8.1"; break; default: sprops.os_name = "Windows NT (unknown)"; } } else { switch (minorVersion) { - case 0: sprops.os_name = "Windows Server 2008"; break; - case 1: sprops.os_name = "Windows Server 2008 R2"; break; case 2: sprops.os_name = "Windows Server 2012"; break; case 3: sprops.os_name = "Windows Server 2012 R2"; break; default: sprops.os_name = "Windows NT (unknown)"; diff -Nru openjdk-25-25.0.2+10/src/java.base/windows/native/libnet/net_util_md.c openjdk-25-25.0.3+9/src/java.base/windows/native/libnet/net_util_md.c --- openjdk-25-25.0.2+10/src/java.base/windows/native/libnet/net_util_md.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.base/windows/native/libnet/net_util_md.c 2026-04-17 19:08:13.000000000 +0000 @@ -513,7 +513,7 @@ } else { jint address; if (family != java_net_InetAddress_IPv4) { - JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family unavailable"); + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "IPv6 protocol family unavailable"); return -1; } address = getInetAddress_addr(env, iaObj); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m --- openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m 2026-04-17 19:08:13.000000000 +0000 @@ -60,16 +60,14 @@ } static BOOL isValidDisplayMode(CGDisplayModeRef mode) { - // Workaround for apple bug FB13261205, since it only affects arm based macs - // and arm support started with macOS 11 ignore the workaround for previous versions - if (@available(macOS 11, *)) { - if (architecture == -1) { - architecture = [[NSRunningApplication currentApplication] executableArchitecture]; - } - if (architecture == NSBundleExecutableArchitectureARM64) { - return (CGDisplayModeGetPixelWidth(mode) >= 800); - } + // Workaround for apple bug FB13261205, only affects arm based macs + if (architecture == -1) { + architecture = [[NSRunningApplication currentApplication] executableArchitecture]; } + if (architecture == NSBundleExecutableArchitectureARM64) { + return (CGDisplayModeGetPixelWidth(mode) >= 800); + } + return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.h openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.h --- openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.h 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, JetBrains s.r.o.. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,5 +29,6 @@ @interface NavigableTextAccessibility : CommonComponentAccessibility <NSAccessibilityNavigableStaticText> @property(readonly) BOOL accessibleIsPasswordText; +@property BOOL announceEditUpdates; @end diff -Nru openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.m openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.m --- openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.m 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/NavigableTextAccessibility.m 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, JetBrains s.r.o.. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -60,6 +60,22 @@ return [fJavaRole isEqualToString:@"passwordtext"]; } +- (id)init { + self = [super init]; + if (self) { + _announceEditUpdates = YES; + } + return self; +} + +- (void)suppressEditUpdates { + _announceEditUpdates = NO; +} + +- (void)resumeEditUpdates { + _announceEditUpdates = YES; +} + // NSAccessibilityElement protocol methods - (NSRect)accessibilityFrameForRange:(NSRange)range @@ -117,6 +133,9 @@ - (NSString *)accessibilityStringForRange:(NSRange)range { + if (!_announceEditUpdates) { + return @""; + } JNIEnv *env = [ThreadUtilities getJNIEnv]; GET_CACCESSIBLETEXT_CLASS_RETURN(nil); DECLARE_STATIC_METHOD_RETURN(jm_getStringForRange, sjc_CAccessibleText, "getStringForRange", @@ -306,6 +325,12 @@ return [super accessibilityParent]; } +- (void)postSelectedTextChanged +{ + [super postSelectedTextChanged]; + [self resumeEditUpdates]; +} + /* * Other text methods - (NSRange)accessibilitySharedCharacterRange; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m --- openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ */ #import "SpinboxAccessibility.h" +#import "ThreadUtilities.h" #define INCREMENT 0 #define DECREMENT 1 @@ -44,7 +45,15 @@ - (id _Nullable)accessibilityValue { - return [super accessibilityValue]; + id val = [super accessibilityValue]; + NSArray *clist = [super accessibilityChildren]; + for (NSUInteger i = 0; i < [clist count]; i++) { + id child = [clist objectAtIndex:i]; + if ([child conformsToProtocol:@protocol(NSAccessibilityNavigableStaticText)]) { + val = [child accessibilityValue]; + } + } + return val; } - (BOOL)accessibilityPerformIncrement @@ -68,4 +77,18 @@ return [super accessibilityParent]; } +- (void)postValueChanged +{ + AWT_ASSERT_APPKIT_THREAD; + NSAccessibilityPostNotification(self, NSAccessibilityValueChangedNotification); + NSArray *clist = [super accessibilityChildren]; + for (NSUInteger i = 0; i < [clist count]; i++) { + id child = [clist objectAtIndex:i]; + if ([child conformsToProtocol:@protocol(NSAccessibilityNavigableStaticText)]) { + NSAccessibilityPostNotification(child, NSAccessibilityLayoutChangedNotification); + [child suppressEditUpdates]; + } + } +} + @end diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/WildcardTypeImpl.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/WildcardTypeImpl.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/WildcardTypeImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/WildcardTypeImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,6 +73,7 @@ * @return an array of types representing * the upper bound(s) of this type variable */ + @Override public Type[] getUpperBounds() { return this.upperBounds.clone(); } @@ -87,6 +88,7 @@ * @return an array of types representing * the lower bound(s) of this type variable */ + @Override public Type[] getLowerBounds() { return this.lowerBounds.clone(); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/decoder/NullElementHandler.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/decoder/NullElementHandler.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/decoder/NullElementHandler.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/decoder/NullElementHandler.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +61,7 @@ * * @return {@code null} by default */ + @Override public Object getValue() { return null; } @@ -70,6 +71,7 @@ * * @return {@code false} always */ + @Override public final boolean isVoid() { return false; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/decoder/ValueObjectImpl.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/decoder/ValueObjectImpl.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/decoder/ValueObjectImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/decoder/ValueObjectImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,6 +72,7 @@ * * @return the result of method execution */ + @Override public Object getValue() { return this.value; } @@ -82,6 +83,7 @@ * @return {@code true} if value should be ignored, * {@code false} otherwise */ + @Override public boolean isVoid() { return this.isVoid; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/BooleanEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/BooleanEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/BooleanEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/BooleanEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class BooleanEditor extends PropertyEditorSupport { + @Override public String getJavaInitializationString() { Object value = getValue(); return (value != null) @@ -41,6 +42,7 @@ : "null"; } + @Override public String getAsText() { Object value = getValue(); return (value instanceof Boolean) @@ -48,6 +50,7 @@ : null; } + @Override public void setAsText(String text) throws java.lang.IllegalArgumentException { if (text == null) { setValue(null); @@ -60,6 +63,7 @@ } } + @Override public String[] getTags() { return new String[] {getValidName(true), getValidName(false)}; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/ByteEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/ByteEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/ByteEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/ByteEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class ByteEditor extends NumberEditor { + @Override public String getJavaInitializationString() { Object value = getValue(); return (value != null) @@ -41,6 +42,7 @@ : "null"; } + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Byte.decode(text)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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,16 +79,19 @@ resize(ourWidth,40); } + @Override public void setValue(Object o) { Color c = (Color)o; changeColor(c); } + @Override @SuppressWarnings("deprecation") public Dimension preferredSize() { return new Dimension(ourWidth, 40); } + @Override @SuppressWarnings("deprecation") public boolean keyUp(Event e, int key) { if (e.target == text) { @@ -101,6 +104,7 @@ return (false); } + @Override public void setAsText(String s) throws java.lang.IllegalArgumentException { if (s == null) { changeColor(null); @@ -124,6 +128,7 @@ } + @Override @SuppressWarnings("deprecation") public boolean action(Event e, Object arg) { if (e.target == chooser) { @@ -132,6 +137,7 @@ return false; } + @Override public String getJavaInitializationString() { return (this.color != null) ? "new java.awt.Color(" + this.color.getRGB() + ",true)" @@ -165,14 +171,17 @@ support.firePropertyChange("", null, null); } + @Override public Object getValue() { return color; } + @Override public boolean isPaintable() { return true; } + @Override public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { Color oldColor = gfx.getColor(); gfx.setColor(Color.black); @@ -182,28 +191,34 @@ gfx.setColor(oldColor); } + @Override public String getAsText() { return (this.color != null) ? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue() : null; } + @Override public String[] getTags() { return null; } + @Override public java.awt.Component getCustomEditor() { return this; } + @Override public boolean supportsCustomEditor() { return true; } + @Override public void addPropertyChangeListener(PropertyChangeListener l) { support.addPropertyChangeListener(l); } + @Override public void removePropertyChangeListener(PropertyChangeListener l) { support.removePropertyChangeListener(l); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/DoubleEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/DoubleEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/DoubleEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/DoubleEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class DoubleEditor extends NumberEditor { + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Double.valueOf(text)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/EnumEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/EnumEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/EnumEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/EnumEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +63,12 @@ } } + @Override public Object getValue() { return this.value; } + @Override public void setValue( Object value ) { if ( ( value != null ) && !this.type.isInstance( value ) ) { throw new IllegalArgumentException( "Unsupported value: " + value ); @@ -92,12 +94,14 @@ } } + @Override public String getAsText() { return ( this.value != null ) ? ( ( Enum )this.value ).name() : null; } + @Override public void setAsText( String text ) { @SuppressWarnings("unchecked") Object tmp = ( text != null ) @@ -106,10 +110,12 @@ setValue(tmp); } + @Override public String[] getTags() { return this.tags.clone(); } + @Override public String getJavaInitializationString() { String name = getAsText(); return ( name != null ) @@ -117,27 +123,33 @@ : "null"; } + @Override public boolean isPaintable() { return false; } + @Override public void paintValue( Graphics gfx, Rectangle box ) { } + @Override public boolean supportsCustomEditor() { return false; } + @Override public Component getCustomEditor() { return null; } + @Override public void addPropertyChangeListener( PropertyChangeListener listener ) { synchronized ( this.listeners ) { this.listeners.add( listener ); } } + @Override public void removePropertyChangeListener( PropertyChangeListener listener ) { synchronized ( this.listeners ) { this.listeners.remove( listener ); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/FloatEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/FloatEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/FloatEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/FloatEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class FloatEditor extends NumberEditor { + @Override public String getJavaInitializationString() { Object value = getValue(); return (value != null) @@ -41,6 +42,7 @@ : "null"; } + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Float.valueOf(text)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,11 +78,13 @@ } + @Override @SuppressWarnings("deprecation") public Dimension preferredSize() { return new Dimension(300, 40); } + @Override public void setValue(Object o) { font = (Font) o; if (this.font == null) @@ -130,10 +132,12 @@ support.firePropertyChange("", null, null); } + @Override public Object getValue() { return (font); } + @Override public String getJavaInitializationString() { if (this.font == null) return "null"; @@ -142,6 +146,7 @@ font.getStyle() + ", " + font.getSize() + ")"; } + @Override @SuppressWarnings("deprecation") public boolean action(Event e, Object arg) { String family = familyChoser.getSelectedItem(); @@ -158,10 +163,12 @@ } + @Override public boolean isPaintable() { return true; } + @Override public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) { // Silent noop. Font oldFont = gfx.getFont(); @@ -172,6 +179,7 @@ gfx.setFont(oldFont); } + @Override public String getAsText() { if (this.font == null) { return null; @@ -195,26 +203,32 @@ return sb.toString(); } + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Font.decode(text)); } + @Override public String[] getTags() { return null; } + @Override public java.awt.Component getCustomEditor() { return this; } + @Override public boolean supportsCustomEditor() { return true; } + @Override public void addPropertyChangeListener(PropertyChangeListener l) { support.addPropertyChangeListener(l); } + @Override public void removePropertyChangeListener(PropertyChangeListener l) { support.removePropertyChangeListener(l); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/IntegerEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/IntegerEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/IntegerEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/IntegerEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +35,7 @@ public class IntegerEditor extends NumberEditor { + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Integer.decode(text)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/LongEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/LongEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/LongEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/LongEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class LongEditor extends NumberEditor { + @Override public String getJavaInitializationString() { Object value = getValue(); return (value != null) @@ -41,6 +42,7 @@ : "null"; } + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Long.decode(text)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public abstract class NumberEditor extends PropertyEditorSupport { + @Override public String getJavaInitializationString() { Object value = getValue(); return (value != null) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/ShortEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/ShortEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/ShortEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/ShortEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +35,7 @@ public class ShortEditor extends NumberEditor { + @Override public String getJavaInitializationString() { Object value = getValue(); return (value != null) @@ -42,6 +43,7 @@ : "null"; } + @Override public void setAsText(String text) throws IllegalArgumentException { setValue((text == null) ? null : Short.decode(text)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/StringEditor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/StringEditor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/editors/StringEditor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/editors/StringEditor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class StringEditor extends PropertyEditorSupport { + @Override public String getJavaInitializationString() { Object value = getValue(); if (value == null) @@ -67,6 +68,7 @@ return sb.toString(); } + @Override public void setAsText(String text) { setValue(text); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/infos/ComponentBeanInfo.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/infos/ComponentBeanInfo.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/infos/ComponentBeanInfo.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public class ComponentBeanInfo extends SimpleBeanInfo { private static final Class<java.awt.Component> beanClass = java.awt.Component.class; + @Override public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/util/Cache.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/util/Cache.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/beans/util/Cache.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/beans/util/Cache.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -405,11 +405,13 @@ */ public static enum Kind { STRONG { + @Override <T> Ref<T> create(Object owner, T value, ReferenceQueue<? super T> queue) { return new Strong<>(owner, value); } }, SOFT { + @Override <T> Ref<T> create(Object owner, T referent, ReferenceQueue<? super T> queue) { return (referent == null) ? new Strong<>(owner, referent) @@ -417,6 +419,7 @@ } }, WEAK { + @Override <T> Ref<T> create(Object owner, T referent, ReferenceQueue<? super T> queue) { return (referent == null) ? new Strong<>(owner, referent) @@ -463,6 +466,7 @@ * * @return the owner of the reference or {@code null} if the owner is unknown */ + @Override public Object getOwner() { return this.owner; } @@ -472,6 +476,7 @@ * * @return the referred object */ + @Override public T getReferent() { return this.referent; } @@ -481,6 +486,7 @@ * * @return {@code true} if the referred object was collected */ + @Override public boolean isStale() { return false; } @@ -488,6 +494,7 @@ /** * Marks this reference as removed from the cache. */ + @Override public void removeOwner() { this.owner = null; } @@ -522,6 +529,7 @@ * * @return the owner of the reference or {@code null} if the owner is unknown */ + @Override public Object getOwner() { return this.owner; } @@ -531,6 +539,7 @@ * * @return the referred object or {@code null} if it was collected */ + @Override public T getReferent() { return get(); } @@ -540,6 +549,7 @@ * * @return {@code true} if the referred object was collected */ + @Override public boolean isStale() { return null == get(); } @@ -547,6 +557,7 @@ /** * Marks this reference as removed from the cache. */ + @Override public void removeOwner() { this.owner = null; } @@ -581,6 +592,7 @@ * * @return the owner of the reference or {@code null} if the owner is unknown */ + @Override public Object getOwner() { return this.owner; } @@ -590,6 +602,7 @@ * * @return the referred object or {@code null} if it was collected */ + @Override public T getReferent() { return get(); } @@ -599,6 +612,7 @@ * * @return {@code true} if the referred object was collected */ + @Override public boolean isStale() { return null == get(); } @@ -606,6 +620,7 @@ /** * Marks this reference as removed from the cache. */ + @Override public void removeOwner() { this.owner = null; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +61,7 @@ null, null); } + @Override public void onRegistration(ServiceRegistry registry, Class<?> category) { if (registered) { @@ -69,10 +70,12 @@ registered = true; } + @Override public String getDescription(Locale locale) { return "Standard BMP Image Reader"; } + @Override public boolean canDecodeInput(Object source) throws IOException { if (!(source instanceof ImageInputStream)) { return false; @@ -87,6 +90,7 @@ return full && (b[0] == 0x42) && (b[1] == 0x4d); } + @Override public ImageReader createReaderInstance(Object extension) throws IIOException { return new BMPImageReader(this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +66,12 @@ null, null); } + @Override public String getDescription(Locale locale) { return "Standard BMP Image Writer"; } + @Override public void onRegistration(ServiceRegistry registry, Class<?> category) { if (registered) { @@ -79,6 +81,7 @@ registered = true; } + @Override public boolean canEncodeImage(ImageTypeSpecifier type) { int dataType= type.getSampleModel().getDataType(); if (dataType < DataBuffer.TYPE_BYTE || dataType > DataBuffer.TYPE_INT) @@ -99,6 +102,7 @@ return true; } + @Override public ImageWriter createWriterInstance(Object extension) throws IIOException { return new BMPImageWriter(this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,10 +94,12 @@ null, null); } + @Override public boolean isReadOnly() { return true; } + @Override public Node getAsTree(String formatName) { if (formatName.equals(nativeMetadataFormatName)) { return getNativeTree(); @@ -177,6 +179,7 @@ } // Standard tree node methods + @Override protected IIOMetadataNode getStandardChromaNode() { if ((palette != null) && (paletteSize > 0)) { @@ -202,6 +205,7 @@ return null; } + @Override protected IIOMetadataNode getStandardCompressionNode() { IIOMetadataNode node = new IIOMetadataNode("Compression"); @@ -212,6 +216,7 @@ return node; } + @Override protected IIOMetadataNode getStandardDataNode() { IIOMetadataNode node = new IIOMetadataNode("Data"); @@ -230,6 +235,7 @@ return node; } + @Override protected IIOMetadataNode getStandardDimensionNode() { if (yPixelsPerMeter > 0.0F && xPixelsPerMeter > 0.0F) { IIOMetadataNode node = new IIOMetadataNode("Dimension"); @@ -251,14 +257,17 @@ return null; } + @Override public void setFromTree(String formatName, Node root) { throw new IllegalStateException(I18N.getString("BMPMetadata1")); } + @Override public void mergeTree(String formatName, Node root) { throw new IllegalStateException(I18N.getString("BMPMetadata1")); } + @Override public void reset() { throw new IllegalStateException(I18N.getString("BMPMetadata1")); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -194,6 +194,7 @@ DATATYPE_STRING, true, null); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +33,7 @@ public BMPMetadataFormatResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +79,7 @@ // specified behavior of the methods vis-a-vis exceptions. // + @Override public float[] toRGB(float[] colorvalue) { if(colorvalue.length < getNumComponents()) { throw new ArrayIndexOutOfBoundsException @@ -93,6 +94,7 @@ return rgbvalue; } + @Override public float[] fromRGB(float[] rgbvalue) { if(rgbvalue.length < 3) { throw new ArrayIndexOutOfBoundsException @@ -107,6 +109,7 @@ return colorvalue; } + @Override public float[] toCIEXYZ(float[] colorvalue) { if(colorvalue.length < getNumComponents()) { throw new ArrayIndexOutOfBoundsException @@ -121,6 +124,7 @@ return xyzvalue; } + @Override public float[] fromCIEXYZ(float[] xyzvalue) { if(xyzvalue.length < 3) { throw new ArrayIndexOutOfBoundsException diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/InputStreamAdapter.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/InputStreamAdapter.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/InputStreamAdapter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/InputStreamAdapter.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +39,12 @@ this.stream = stream; } + @Override public int read() throws IOException { return stream.read(); } + @Override public int read(byte[] b, int off, int len) throws IOException { return stream.read(b, off, len); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleCMYKColorSpace.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,14 +58,17 @@ csRGB = ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB); } + @Override public boolean equals(Object o) { return o instanceof SimpleCMYKColorSpace; } + @Override public int hashCode() { return System.identityHashCode(theInstance); } + @Override public float[] toRGB(float[] colorvalue) { float C = colorvalue[0]; float M = colorvalue[1]; @@ -97,6 +100,7 @@ return rgbvalue; } + @Override public float[] fromRGB(float[] rgbvalue) { // Convert from sRGB to linear RGB. for (int i = 0; i < 3; i++) { @@ -128,10 +132,12 @@ return new float[] {C, M, Y, K}; } + @Override public float[] toCIEXYZ(float[] colorvalue) { return csRGB.toCIEXYZ(toRGB(colorvalue)); } + @Override public float[] fromCIEXYZ(float[] xyzvalue) { return fromRGB(csRGB.fromCIEXYZ(xyzvalue)); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +74,7 @@ protected Hashtable<String,Object> properties = new Hashtable<String,Object>(); /** Returns the X coordinate of the leftmost column of the image. */ + @Override public int getMinX() { return minX; } @@ -89,6 +90,7 @@ } /** Returns the X coordinate of the uppermost row of the image. */ + @Override public int getMinY() { return minY; } @@ -104,11 +106,13 @@ } /** Returns the width of the image. */ + @Override public int getWidth() { return width; } /** Returns the height of the image. */ + @Override public int getHeight() { return height; } @@ -119,11 +123,13 @@ } /** Returns the width of a tile. */ + @Override public int getTileWidth() { return tileWidth; } /** Returns the height of a tile. */ + @Override public int getTileHeight() { return tileHeight; } @@ -131,6 +137,7 @@ /** * Returns the X coordinate of the upper-left pixel of tile (0, 0). */ + @Override public int getTileGridXOffset() { return tileGridXOffset; } @@ -138,6 +145,7 @@ /** * Returns the Y coordinate of the upper-left pixel of tile (0, 0). */ + @Override public int getTileGridYOffset() { return tileGridYOffset; } @@ -147,6 +155,7 @@ * getMinTileX() is implemented in terms of getMinX() * and so does not need to be implemented by subclasses. */ + @Override public int getMinTileX() { return XToTileX(getMinX()); } @@ -166,6 +175,7 @@ * of getMinTileX() and getMaxTileX() and so does not need to be * implemented by subclasses. */ + @Override public int getNumXTiles() { return getMaxTileX() - getMinTileX() + 1; } @@ -175,6 +185,7 @@ * is implemented in terms of getMinY() and so does not need to be * implemented by subclasses. */ + @Override public int getMinTileY() { return YToTileY(getMinY()); } @@ -194,16 +205,19 @@ * of getMinTileY() and getMaxTileY() and so does not need to be * implemented by subclasses. */ + @Override public int getNumYTiles() { return getMaxTileY() - getMinTileY() + 1; } /** Returns the SampleModel of the image. */ + @Override public SampleModel getSampleModel() { return sampleModel; } /** Returns the ColorModel of the image. */ + @Override public ColorModel getColorModel() { return colorModel; } @@ -218,6 +232,7 @@ * <code>Object</code>, or the value * <code>java.awt.Image.UndefinedProperty.</code> */ + @Override public Object getProperty(String name) { name = name.toLowerCase(); Object value = properties.get(name); @@ -232,6 +247,7 @@ * @return an array of <code>String</code>s representing valid * property names. */ + @Override public String[] getPropertyNames() { String[] names = null; @@ -379,6 +395,7 @@ return ty*tileHeight + tileGridYOffset; } + @Override public Vector<RenderedImage> getSources() { return null; } @@ -399,6 +416,7 @@ * * @return a Raster containing a copy of this image's data. */ + @Override public Raster getData() { Rectangle rect = new Rectangle(getMinX(), getMinY(), getWidth(), getHeight()); @@ -422,6 +440,7 @@ * * @param bounds the region of the RenderedImage to be returned. */ + @Override public Raster getData(Rectangle bounds) { // Get the image bounds. Rectangle imageBounds = getBounds(); @@ -511,6 +530,7 @@ * @return a reference to the supplied WritableRaster, or to a * new WritableRaster if the supplied one was null. */ + @Override public WritableRaster copyData(WritableRaster dest) { // Get the image bounds. Rectangle imageBounds = getBounds(); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SingleTileRenderedImage.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SingleTileRenderedImage.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SingleTileRenderedImage.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SingleTileRenderedImage.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,6 +58,7 @@ /** * Returns the image's Raster as tile (0, 0). */ + @Override public Raster getTile(int tileX, int tileY) { if (tileX != 0 || tileY != 0) { throw new IllegalArgumentException("tileX != 0 || tileY != 0"); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -492,6 +492,7 @@ null); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ public StandardMetadataFormatResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SubImageInputStream.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SubImageInputStream.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SubImageInputStream.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/common/SubImageInputStream.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +43,7 @@ this.startingLength = this.length = length; } + @Override public int read() throws IOException { if (length == 0) { // Local EOF return -1; @@ -52,6 +53,7 @@ } } + @Override public int read(byte[] b, int off, int len) throws IOException { if (length == 0) { // Local EOF return -1; @@ -63,10 +65,12 @@ return bytes; } + @Override public long length() { return startingLength; } + @Override public void seek(long pos) throws IOException { stream.seek(pos - startingPos); streamPos = pos; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -115,10 +115,12 @@ null, null); } + @Override public boolean isReadOnly() { return true; } + @Override public Node getAsTree(String formatName) { if (formatName.equals(nativeMetadataFormatName)) { return getNativeTree(); @@ -252,6 +254,7 @@ return root; } + @Override public IIOMetadataNode getStandardChromaNode() { IIOMetadataNode chroma_node = new IIOMetadataNode("Chroma"); IIOMetadataNode node = null; // scratch node @@ -294,6 +297,7 @@ return chroma_node; } + @Override public IIOMetadataNode getStandardCompressionNode() { IIOMetadataNode compression_node = new IIOMetadataNode("Compression"); IIOMetadataNode node = null; // scratch node @@ -315,6 +319,7 @@ return compression_node; } + @Override public IIOMetadataNode getStandardDataNode() { IIOMetadataNode data_node = new IIOMetadataNode("Data"); IIOMetadataNode node = null; // scratch node @@ -332,6 +337,7 @@ return data_node; } + @Override public IIOMetadataNode getStandardDimensionNode() { IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension"); IIOMetadataNode node = null; // scratch node @@ -365,6 +371,7 @@ // Document not in image + @Override public IIOMetadataNode getStandardTextNode() { if (comments == null) { return null; @@ -391,6 +398,7 @@ return text_node; } + @Override public IIOMetadataNode getStandardTransparencyNode() { if (!transparentColorFlag) { return null; @@ -414,22 +422,26 @@ return transparency_node; } + @Override public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException { throw new IllegalStateException("Metadata is read-only!"); } + @Override protected void mergeNativeTree(Node root) throws IIOInvalidTreeException { throw new IllegalStateException("Metadata is read-only!"); } + @Override protected void mergeStandardTree(Node root) throws IIOInvalidTreeException { throw new IllegalStateException("Metadata is read-only!"); } + @Override public void reset() { throw new IllegalStateException("Metadata is read-only!"); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +157,7 @@ DATATYPE_STRING, true, null); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ public GIFImageMetadataFormatResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,10 +71,12 @@ ); } + @Override public String getDescription(Locale locale) { return "Standard GIF image reader"; } + @Override public boolean canDecodeInput(Object input) throws IOException { if (!(input instanceof ImageInputStream)) { return false; @@ -91,6 +93,7 @@ (b[4] == '7' || b[4] == '9') && b[5] == 'a'; } + @Override public ImageReader createReaderInstance(Object extension) { return new GIFImageReader(this); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,6 +73,7 @@ ); } + @Override public boolean canEncodeImage(ImageTypeSpecifier type) { if (type == null) { throw new IllegalArgumentException("type == null!"); @@ -94,10 +95,12 @@ } } + @Override public String getDescription(Locale locale) { return "Standard GIF image writer"; } + @Override public ImageWriter createWriterInstance(Object extension) { return new GIFImageWriter(this); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -242,6 +242,7 @@ extraMetadataFormatClassNames); } + @Override public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException { if (formatName.equals(nativeMetadataFormatName)) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -77,10 +77,12 @@ } + @Override public boolean isReadOnly() { return true; } + @Override public Node getAsTree(String formatName) { if (formatName.equals(nativeMetadataFormatName)) { return getNativeTree(); @@ -149,6 +151,7 @@ return root; } + @Override public IIOMetadataNode getStandardChromaNode() { IIOMetadataNode chroma_node = new IIOMetadataNode("Chroma"); IIOMetadataNode node = null; // scratch node @@ -190,6 +193,7 @@ return chroma_node; } + @Override public IIOMetadataNode getStandardCompressionNode() { IIOMetadataNode compression_node = new IIOMetadataNode("Compression"); IIOMetadataNode node = null; // scratch node @@ -208,6 +212,7 @@ return compression_node; } + @Override public IIOMetadataNode getStandardDataNode() { IIOMetadataNode data_node = new IIOMetadataNode("Data"); IIOMetadataNode node = null; // scratch node @@ -230,6 +235,7 @@ return data_node; } + @Override public IIOMetadataNode getStandardDimensionNode() { IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension"); IIOMetadataNode node = null; // scratch node @@ -270,6 +276,7 @@ return dimension_node; } + @Override public IIOMetadataNode getStandardDocumentNode() { IIOMetadataNode document_node = new IIOMetadataNode("Document"); IIOMetadataNode node = null; // scratch node @@ -285,32 +292,38 @@ return document_node; } + @Override public IIOMetadataNode getStandardTextNode() { // Not in stream return null; } + @Override public IIOMetadataNode getStandardTransparencyNode() { // Not in stream return null; } + @Override public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException { throw new IllegalStateException("Metadata is read-only!"); } + @Override protected void mergeNativeTree(Node root) throws IIOInvalidTreeException { throw new IllegalStateException("Metadata is read-only!"); } + @Override protected void mergeStandardTree(Node root) throws IIOInvalidTreeException { throw new IllegalStateException("Metadata is read-only!"); } + @Override public void reset() { throw new IllegalStateException("Metadata is read-only!"); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,6 +92,7 @@ "0", "255", true, true); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ public GIFStreamMetadataFormatResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,10 +49,12 @@ null, null); } + @Override public boolean isReadOnly() { return false; } + @Override public void reset() { // Fields from Image Descriptor imageLeftPosition = 0; @@ -96,6 +98,7 @@ return data.getBytes(ISO_8859_1); } + @Override protected void mergeNativeTree(Node root) throws IIOInvalidTreeException { Node node = root; if (!node.getNodeName().equals(nativeMetadataFormatName)) { @@ -292,6 +295,7 @@ } } + @Override protected void mergeStandardTree(Node root) throws IIOInvalidTreeException { Node node = root; @@ -389,6 +393,7 @@ } } + @Override public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +55,12 @@ reset(); } + @Override public boolean isReadOnly() { return false; } + @Override public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException { if (formatName.equals(nativeMetadataFormatName)) { @@ -77,6 +79,7 @@ } } + @Override public void reset() { version = null; @@ -90,6 +93,7 @@ globalColorTable = null; } + @Override protected void mergeNativeTree(Node root) throws IIOInvalidTreeException { Node node = root; if (!node.getNodeName().equals(nativeMetadataFormatName)) { @@ -164,6 +168,7 @@ } } + @Override protected void mergeStandardTree(Node root) throws IIOInvalidTreeException { Node node = root; @@ -258,6 +263,7 @@ } } + @Override public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,6 +73,7 @@ updateFromNativeNode(node, true); } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("app14Adobe"); node.setAttribute("version", Integer.toString(version)); @@ -108,6 +109,7 @@ * Writes the data for this segment to the stream in * valid JPEG format. */ + @Override void write(ImageOutputStream ios) throws IOException { length = 14; writeTag(ios); @@ -124,6 +126,7 @@ (new AdobeMarkerSegment(transform)).write(ios); } + @Override void print () { printTag("Adobe APP14"); System.out.print("Version: "); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/COMMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/COMMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/COMMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/COMMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,6 +104,7 @@ * as a user object and a string encoded using ISO-8895-1, as an * attribute. */ + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("com"); node.setAttribute("comment", getComment()); @@ -117,12 +118,14 @@ * Writes the data for this segment to the stream in * valid JPEG format, directly from the data array. */ + @Override void write(ImageOutputStream ios) throws IOException { length = 2 + data.length; writeTag(ios); ios.write(data); } + @Override void print() { printTag("COM"); System.out.println("<" + getComment() + ">"); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +90,7 @@ } } + @Override protected Object clone() { DHTMarkerSegment newGuy = (DHTMarkerSegment) super.clone(); newGuy.tables = new ArrayList<>(tables.size()); @@ -99,6 +100,7 @@ return newGuy; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("dht"); for (int i= 0; i<tables.size(); i++) { @@ -112,10 +114,12 @@ * Writes the data for this segment to the stream in * valid JPEG format. */ + @Override void write(ImageOutputStream ios) throws IOException { // We don't write DHT segments; the IJG library does. } + @Override void print() { printTag("DHT"); System.out.println("Num tables: " + tables.size()); @@ -201,6 +205,7 @@ } + @Override protected Object clone() { Htable newGuy = null; try { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +83,7 @@ } } + @Override protected Object clone() { DQTMarkerSegment newGuy = (DQTMarkerSegment) super.clone(); newGuy.tables = new ArrayList<>(tables.size()); @@ -92,6 +93,7 @@ return newGuy; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("dqt"); for (int i= 0; i<tables.size(); i++) { @@ -105,10 +107,12 @@ * Writes the data for this segment to the stream in * valid JPEG format. */ + @Override void write(ImageOutputStream ios) throws IOException { // We don't write DQT segments; the IJG library does. } + @Override void print() { printTag("DQT"); System.out.println("Num tables: " + tables.size()); @@ -264,6 +268,7 @@ } } + @Override protected Object clone() { Qtable newGuy = null; try { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +55,7 @@ updateFromNativeNode(node, true); } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("dri"); node.setAttribute("interval", Integer.toString(restartInterval)); @@ -71,10 +72,12 @@ * Writes the data for this segment to the stream in * valid JPEG format. */ + @Override void write(ImageOutputStream ios) throws IOException { // We don't write DRI segments; the IJG library does. } + @Override void print() { printTag("DRI"); System.out.println("Interval: " + restartInterval); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -154,6 +154,7 @@ /** * Returns a deep-copy clone of this object. */ + @Override protected Object clone() { JFIFMarkerSegment newGuy = (JFIFMarkerSegment) super.clone(); if (!extSegments.isEmpty()) { // Clone the list with a deep copy @@ -216,6 +217,7 @@ * Returns a tree of DOM nodes representing this object and any * subordinate JFXX extension or ICC Profile segments. */ + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("app0JFIF"); node.setAttribute("majorVersion", Integer.toString(majorVersion)); @@ -622,6 +624,7 @@ /** * Prints out the contents of this object to System.out for debugging. */ + @Override void print() { printTag("JFIF"); System.out.print("Version "); @@ -767,6 +770,7 @@ } } + @Override protected Object clone() { JFIFExtensionMarkerSegment newGuy = (JFIFExtensionMarkerSegment) super.clone(); @@ -776,6 +780,7 @@ return newGuy; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("app0JFXX"); node.setAttribute("extensionCode", Integer.toString(code)); @@ -793,6 +798,7 @@ thumb.write(ios, writer); } + @Override void print() { printTag("JFXX"); thumb.print(); @@ -826,6 +832,7 @@ abstract void write(ImageOutputStream ios, JPEGImageWriter writer) throws IOException; + @Override protected Object clone() { try { return super.clone(); @@ -907,14 +914,17 @@ } + @Override int getWidth() { return thumbWidth; } + @Override int getHeight() { return thumbHeight; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode(name); node.setAttribute("thumbWidth", Integer.toString(thumbWidth)); @@ -922,6 +932,7 @@ return node; } + @Override void write(ImageOutputStream ios, JPEGImageWriter writer) throws IOException { if ((thumbWidth > MAX_THUMB_WIDTH) @@ -949,6 +960,7 @@ writeThumbnailData(ios, data, writer); } + @Override void print() { System.out.print(name + " width: "); System.out.println(thumbWidth); @@ -978,10 +990,12 @@ super(thumb); } + @Override int getLength() { return (thumbWidth*thumbHeight*3); } + @Override BufferedImage getThumbnail(ImageInputStream iis, JPEGImageReader reader) throws IOException { @@ -1014,6 +1028,7 @@ null); } + @Override void write(ImageOutputStream ios, JPEGImageWriter writer) throws IOException { super.write(ios, writer); // width and height @@ -1050,10 +1065,12 @@ } } + @Override int getLength() { return (thumbWidth*thumbHeight + PALETTE_SIZE); } + @Override BufferedImage getThumbnail(ImageInputStream iis, JPEGImageReader reader) throws IOException { @@ -1091,6 +1108,7 @@ null); } + @Override void write(ImageOutputStream ios, JPEGImageWriter writer) throws IOException { super.write(ios, writer); // width and height @@ -1221,6 +1239,7 @@ } } + @Override int getWidth() { int retval = 0; SOFMarkerSegment sof = @@ -1232,6 +1251,7 @@ return retval; } + @Override int getHeight() { int retval = 0; SOFMarkerSegment sof = @@ -1249,21 +1269,31 @@ ThumbnailReadListener (JPEGImageReader reader) { this.reader = reader; } + @Override public void sequenceStarted(ImageReader source, int minIndex) {} + @Override public void sequenceComplete(ImageReader source) {} + @Override public void imageStarted(ImageReader source, int imageIndex) {} + @Override public void imageProgress(ImageReader source, float percentageDone) { reader.thumbnailProgress(percentageDone); } + @Override public void imageComplete(ImageReader source) {} + @Override public void thumbnailStarted(ImageReader source, int imageIndex, int thumbnailIndex) {} + @Override public void thumbnailProgress(ImageReader source, float percentageDone) {} + @Override public void thumbnailComplete(ImageReader source) {} + @Override public void readAborted(ImageReader source) {} } + @Override BufferedImage getThumbnail(ImageInputStream iis, JPEGImageReader reader) throws IOException { @@ -1279,6 +1309,7 @@ return ret; } + @Override protected Object clone() { JFIFThumbJPEG newGuy = (JFIFThumbJPEG) super.clone(); if (thumbMetadata != null) { @@ -1287,6 +1318,7 @@ return newGuy; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("JFIFthumbJPEG"); if (thumbMetadata != null) { @@ -1295,6 +1327,7 @@ return node; } + @Override int getLength() { if (data == null) { return 0; @@ -1303,6 +1336,7 @@ } } + @Override void write(ImageOutputStream ios, JPEGImageWriter writer) throws IOException { int progInterval = data.length / 20; // approx. every 5% @@ -1322,6 +1356,7 @@ } } + @Override void print () { System.out.println("JFIF thumbnail stored as JPEG"); } @@ -1445,6 +1480,7 @@ } } + @Override protected Object clone () { ICCMarkerSegment newGuy = (ICCMarkerSegment) super.clone(); if (profile != null) { @@ -1541,6 +1577,7 @@ return retval; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("app2ICC"); if (profile != null) { @@ -1553,10 +1590,12 @@ * No-op. Profiles are never written from metadata. * They are written from the ColorSpace of the image. */ + @Override void write(ImageOutputStream ios) throws IOException { // No-op } + @Override void print () { printTag("ICC Profile APP2"); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -337,6 +337,7 @@ tabids); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { // All images can have these diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,6 +122,7 @@ public JPEGImageMetadataFormatResources() {} + @Override protected Object[][] getContents() { // return a copy of the combined commonContents and imageContents; // in theory we want a deep clone of the combined arrays, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ public JPEGImageReaderResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +59,12 @@ ); } + @Override public String getDescription(Locale locale) { return "Standard JPEG Image Reader"; } + @Override public boolean canDecodeInput(Object source) throws IOException { if (!(source instanceof ImageInputStream)) { return false; @@ -80,6 +82,7 @@ return false; } + @Override public ImageReader createReaderInstance(Object extension) throws IIOException { return new JPEGImageReader(this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ public JPEGImageWriterResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +63,17 @@ ); } + @Override public String getDescription(Locale locale) { return "Standard JPEG Image Writer"; } + @Override public boolean isFormatLossless() { return false; } + @Override public boolean canEncodeImage(ImageTypeSpecifier type) { SampleModel sampleModel = type.getSampleModel(); ColorModel cm = type.getColorModel(); @@ -95,6 +98,7 @@ return true; } + @Override public ImageWriter createWriterInstance(Object extension) throws IIOException { return new JPEGImageWriter(this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -725,6 +725,7 @@ // Implement Cloneable, but restrict access + @Override protected Object clone() { JPEGMetadata newGuy = null; try { @@ -755,6 +756,7 @@ // Tree methods + @Override public Node getAsTree(String formatName) { if (formatName == null) { throw new IllegalArgumentException("null formatName!"); @@ -810,6 +812,7 @@ // Standard tree node methods + @Override protected IIOMetadataNode getStandardChromaNode() { hasAlpha = false; // Unless we find otherwise @@ -950,6 +953,7 @@ return chroma; } + @Override protected IIOMetadataNode getStandardCompressionNode() { IIOMetadataNode compression = new IIOMetadataNode("Compression"); @@ -980,6 +984,7 @@ return compression; } + @Override protected IIOMetadataNode getStandardDimensionNode() { // If we have a JFIF marker segment, we know a little // otherwise all we know is the orientation, which is always normal @@ -1055,6 +1060,7 @@ return doc; } + @Override protected IIOMetadataNode getStandardTextNode() { IIOMetadataNode text = null; // Add a text entry for each COM Marker Segment @@ -1073,6 +1079,7 @@ return text; } + @Override protected IIOMetadataNode getStandardTransparencyNode() { IIOMetadataNode trans = null; if (hasAlpha == true) { @@ -1086,10 +1093,12 @@ // Editing + @Override public boolean isReadOnly() { return false; } + @Override public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException { if (formatName == null) { @@ -2160,6 +2169,7 @@ } + @Override public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException { if (formatName == null) { @@ -2404,6 +2414,7 @@ //// End of writer support + @Override public void reset() { if (resetSequence != null) { // Otherwise no need to reset markerSequence = resetSequence; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -123,6 +123,7 @@ addObjectValue("unknown", byte[].class, 1, MAX_JPEG_DATA_SIZE); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { // Just check if it appears in the format diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public JPEGStreamMetadataFormatResources() {} + @Override protected Object[][] getContents() { // return a copy of commonContents; in theory we want a deep clone // of commonContents, but since it only contains (immutable) Strings, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -110,6 +110,7 @@ /** * Deep copy of data array. */ + @Override protected Object clone() { MarkerSegment newGuy = null; try { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ updateFromNativeNode(node, true); } + @Override protected Object clone() { SOFMarkerSegment newGuy = (SOFMarkerSegment) super.clone(); if (componentSpecs != null) { @@ -107,6 +108,7 @@ return newGuy; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("sof"); node.setAttribute("process", Integer.toString(tag-JPEG.SOF0)); @@ -154,10 +156,12 @@ * Writes the data for this segment to the stream in * valid JPEG format. */ + @Override void write(ImageOutputStream ios) throws IOException { // We don't write SOF segments; the IJG library does. } + @Override void print () { printTag("SOF"); System.out.print("Sample precision: "); @@ -231,6 +235,7 @@ 0, 3, true); } + @Override protected Object clone() { try { return super.clone(); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,6 +89,7 @@ updateFromNativeNode(node, true); } + @Override protected Object clone () { SOSMarkerSegment newGuy = (SOSMarkerSegment) super.clone(); if (componentSpecs != null) { @@ -101,6 +102,7 @@ return newGuy; } + @Override IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("sos"); node.setAttribute("numScanComponents", @@ -152,10 +154,12 @@ * Writes the data for this segment to the stream in * valid JPEG format. */ + @Override void write(ImageOutputStream ios) throws IOException { // We don't write SOS segments; the IJG library does. } + @Override void print () { printTag("SOS"); System.out.print("Start spectral selection: "); @@ -208,6 +212,7 @@ 0, 3, true); } + @Override protected Object clone() { try { return super.clone(); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +70,12 @@ ); } + @Override public String getDescription(Locale locale) { return "Standard PNG image reader"; } + @Override public boolean canDecodeInput(Object input) throws IOException { if (!(input instanceof ImageInputStream)) { return false; @@ -96,6 +98,7 @@ b[7] == (byte)10); } + @Override public ImageReader createReaderInstance(Object extension) { return new PNGImageReader(this); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +74,7 @@ ); } + @Override public boolean canEncodeImage(ImageTypeSpecifier type) { SampleModel sampleModel = type.getSampleModel(); ColorModel colorModel = type.getColorModel(); @@ -116,10 +117,12 @@ return true; } + @Override public String getDescription(Locale locale) { return "Standard PNG image writer"; } + @Override public ImageWriter createWriterInstance(Object extension) { return new PNGImageWriter(this); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -463,6 +463,7 @@ IHDR_present = true; } + @Override public boolean isReadOnly() { return false; } @@ -480,6 +481,7 @@ } // Deep clone + @Override public Object clone() { PNGMetadata metadata; try { @@ -495,6 +497,7 @@ return metadata; } + @Override public Node getAsTree(String formatName) { if (formatName.equals(nativeMetadataFormatName)) { return getNativeTree(); @@ -847,6 +850,7 @@ return numChannels; } + @Override public IIOMetadataNode getStandardChromaNode() { IIOMetadataNode chroma_node = new IIOMetadataNode("Chroma"); IIOMetadataNode node = null; // scratch node @@ -919,6 +923,7 @@ return chroma_node; } + @Override public IIOMetadataNode getStandardCompressionNode() { IIOMetadataNode compression_node = new IIOMetadataNode("Compression"); IIOMetadataNode node = null; // scratch node @@ -952,6 +957,7 @@ return sb.toString(); } + @Override public IIOMetadataNode getStandardDataNode() { IIOMetadataNode data_node = new IIOMetadataNode("Data"); IIOMetadataNode node = null; // scratch node @@ -998,6 +1004,7 @@ return data_node; } + @Override public IIOMetadataNode getStandardDimensionNode() { IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension"); IIOMetadataNode node = null; // scratch node @@ -1027,6 +1034,7 @@ return dimension_node; } + @Override public IIOMetadataNode getStandardDocumentNode() { IIOMetadataNode document_node = null; @@ -1067,6 +1075,7 @@ return document_node; } + @Override public IIOMetadataNode getStandardTextNode() { int numEntries = tEXt_keyword.size() + iTXt_keyword.size() + zTXt_keyword.size(); @@ -1114,6 +1123,7 @@ return text_node; } + @Override public IIOMetadataNode getStandardTransparencyNode() { IIOMetadataNode transparency_node = new IIOMetadataNode("Transparency"); @@ -1285,6 +1295,7 @@ return getAttribute(node, name, null, true); } + @Override public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException { if (formatName.equals(nativeMetadataFormatName)) { @@ -2267,6 +2278,7 @@ } // Reset all instance variables to their initial state + @Override public void reset() { IHDR_present = false; PLTE_present = false; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -486,6 +486,7 @@ addObjectValue("UnknownChunk", byte.class, 0, Integer.MAX_VALUE); } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ public PNGMetadataFormatResources() {} + @Override protected Object[][] getContents() { return new Object[][] { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFBaseJPEGCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -325,6 +325,7 @@ return JPEGImageMetadata; } + @Override public final int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFCIELabColorConverter.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFCIELabColorConverter.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFCIELabColorConverter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFCIELabColorConverter.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,7 @@ } } + @Override public void fromRGB(float r, float g, float b, float[] result) { float X = 0.412453f*r + 0.357580f*g + 0.180423f*b; float Y = 0.212671f*r + 0.715160f*g + 0.072169f*b; @@ -100,6 +101,7 @@ result[2] = clamp2(bStar); } + @Override public void toRGB(float x0, float x1, float x2, float[] rgb) { float LStar = x0*100.0f/255.0f; float aStar = (x1 > 128.0f) ? (x1 - 256.0f) : x1; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflateDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflateDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflateDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflateDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,6 +48,7 @@ this.predictor = predictor; } + @Override public synchronized void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflater.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflater.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflater.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFDeflater.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,6 +58,7 @@ this.deflater = new Deflater(deflateLevel); } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFExifJPEGCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFExifJPEGCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFExifJPEGCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFExifJPEGCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +39,7 @@ param); } + @Override public void setMetadata(IIOMetadata metadata) { // Set the metadata. super.setMetadata(metadata); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -242,6 +242,7 @@ * * @see #getMetadata() */ + @Override public void setMetadata(IIOMetadata metadata) { super.setMetadata(metadata); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -591,6 +591,7 @@ * Invokes the superclass method and then sets instance variables on * the basis of the metadata set on this decompressor. */ + @Override public void beginDecoding() { super.beginDecoding(); @@ -627,6 +628,7 @@ } } + @Override public void decodeRaw(byte[] b, int dstOffset, int pixelBitStride, // will always be 1 int scanlineStride) throws IOException { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFieldNode.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFieldNode.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFieldNode.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFieldNode.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -162,6 +162,7 @@ // Need to override this method to avoid a stack overflow exception // which will occur if super.appendChild is called from initialize(). + @Override public Node appendChild(Node newChild) { if (newChild == null) { throw new NullPointerException("newChild == null!"); @@ -172,53 +173,63 @@ // Override all methods which refer to child nodes. + @Override public boolean hasChildNodes() { initialize(); return super.hasChildNodes(); } + @Override public int getLength() { initialize(); return super.getLength(); } + @Override public Node getFirstChild() { initialize(); return super.getFirstChild(); } + @Override public Node getLastChild() { initialize(); return super.getLastChild(); } + @Override public Node getPreviousSibling() { initialize(); return super.getPreviousSibling(); } + @Override public Node getNextSibling() { initialize(); return super.getNextSibling(); } + @Override public Node insertBefore(Node newChild, Node refChild) { initialize(); return super.insertBefore(newChild, refChild); } + @Override public Node replaceChild(Node newChild, Node oldChild) { initialize(); return super.replaceChild(newChild, oldChild); } + @Override public Node removeChild(Node oldChild) { initialize(); return super.removeChild(oldChild); } + @Override public Node cloneNode(boolean deep) { initialize(); return super.cloneNode(deep); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +93,7 @@ rootIFD.addTIFFField(field); } + @Override public boolean isReadOnly() { return false; } @@ -149,6 +150,7 @@ return IFDRoot; } + @Override public Node getAsTree(String formatName) { if (formatName.equals(nativeMetadataFormatName)) { return getNativeTree(); @@ -181,6 +183,7 @@ "Lab", // ICCLab }; + @Override public IIOMetadataNode getStandardChromaNode() { IIOMetadataNode chroma_node = new IIOMetadataNode("Chroma"); IIOMetadataNode node = null; // scratch node @@ -278,6 +281,7 @@ return chroma_node; } + @Override public IIOMetadataNode getStandardCompressionNode() { IIOMetadataNode compression_node = new IIOMetadataNode("Compression"); IIOMetadataNode node = null; // scratch node @@ -336,6 +340,7 @@ return sb.toString(); } + @Override public IIOMetadataNode getStandardDataNode() { IIOMetadataNode data_node = new IIOMetadataNode("Data"); IIOMetadataNode node = null; // scratch node @@ -476,6 +481,7 @@ "Rotate90", }; + @Override public IIOMetadataNode getStandardDimensionNode() { IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension"); IIOMetadataNode node = null; // scratch node @@ -604,6 +610,7 @@ return dimension_node; } + @Override public IIOMetadataNode getStandardDocumentNode() { IIOMetadataNode document_node = new IIOMetadataNode("Document"); IIOMetadataNode node = null; // scratch node @@ -669,6 +676,7 @@ return document_node; } + @Override public IIOMetadataNode getStandardTextNode() { IIOMetadataNode text_node = null; IIOMetadataNode node = null; // scratch node @@ -705,6 +713,7 @@ return text_node; } + @Override public IIOMetadataNode getStandardTransparencyNode() { IIOMetadataNode transparency_node = new IIOMetadataNode("Transparency"); @@ -1579,6 +1588,7 @@ } } + @Override public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException{ if (formatName.equals(nativeMetadataFormatName)) { @@ -1597,6 +1607,7 @@ } } + @Override public void reset() { rootIFD = new TIFFIFD(tagSets); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ static { } + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return false; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +96,7 @@ public TIFFImageMetadataFormatResources() { } + @Override public Object[][] getContents() { return contents.clone(); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageReaderSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageReaderSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageReaderSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageReaderSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,10 +56,12 @@ ); } + @Override public String getDescription(Locale locale) { return "Standard TIFF image reader"; } + @Override public boolean canDecodeInput(Object input) throws IOException { if (!(input instanceof ImageInputStream)) { return false; @@ -78,10 +80,12 @@ b[2] == (byte)0x00 && b[3] == (byte)0x2a)); } + @Override public ImageReader createReaderInstance(Object extension) { return new TIFFImageReader(this); } + @Override public void onRegistration(ServiceRegistry registry, Class<?> category) { if (registered) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriterSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriterSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriterSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriterSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,18 +55,22 @@ ); } + @Override public boolean canEncodeImage(ImageTypeSpecifier type) { return true; } + @Override public String getDescription(Locale locale) { return "Standard TIFF image writer"; } + @Override public ImageWriter createWriterInstance(Object extension) { return new TIFFImageWriter(this); } + @Override public void onRegistration(ServiceRegistry registry, Class<?> category) { if (registered) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +54,7 @@ private static class JPEGSPIFilter implements ServiceRegistry.Filter { JPEGSPIFilter() {} + @Override public boolean filter(Object provider) { ImageReaderSpi readerSPI = (ImageReaderSpi)provider; @@ -112,6 +113,7 @@ * * @see #getMetadata() */ + @Override public void setMetadata(IIOMetadata metadata) { super.setMetadata(metadata); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFJPEGDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +52,7 @@ public TIFFJPEGDecompressor() {} + @Override public void beginDecoding() { // Initialize the JPEG reader if needed. if(this.JPEGReader == null) { @@ -81,6 +82,7 @@ } } + @Override public void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ super("", BaselineTIFFTagSet.COMPRESSION_NONE, true); } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLSBDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +35,7 @@ public TIFFLSBDecompressor() {} + @Override public void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,10 +41,12 @@ this.predictor = predictorValue; } + @Override public void setStream(ImageOutputStream stream) { super.setStream(stream); } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,6 +76,7 @@ flipBits = fillOrder == BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT; } + @Override public void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +39,7 @@ protected String resourceBaseName; protected String rootName; + @Override public String getRootName() { return rootName; } @@ -85,16 +86,19 @@ return info; } + @Override public int getElementMinChildren(String elementName) { TIFFElementInfo info = getElementInfo(elementName); return info.minChildren; } + @Override public int getElementMaxChildren(String elementName) { TIFFElementInfo info = getElementInfo(elementName); return info.maxChildren; } + @Override public String getElementDescription(String elementName, Locale locale) { if (!elementInfoMap.containsKey(elementName)) { throw new IllegalArgumentException("No such element: " + @@ -103,64 +107,77 @@ return getResource(elementName, locale); } + @Override public int getChildPolicy(String elementName) { TIFFElementInfo info = getElementInfo(elementName); return info.childPolicy; } + @Override public String[] getChildNames(String elementName) { TIFFElementInfo info = getElementInfo(elementName); return info.childNames; } + @Override public String[] getAttributeNames(String elementName) { TIFFElementInfo info = getElementInfo(elementName); return info.attributeNames; } + @Override public int getAttributeValueType(String elementName, String attrName) { TIFFAttrInfo info = getAttrInfo(elementName, attrName); return info.valueType; } + @Override public int getAttributeDataType(String elementName, String attrName) { TIFFAttrInfo info = getAttrInfo(elementName, attrName); return info.dataType; } + @Override public boolean isAttributeRequired(String elementName, String attrName) { TIFFAttrInfo info = getAttrInfo(elementName, attrName); return info.isRequired; } + @Override public String getAttributeDefaultValue(String elementName, String attrName) { return null; } + @Override public String[] getAttributeEnumerations(String elementName, String attrName) { throw new IllegalArgumentException("The attribute is not an enumeration."); } + @Override public String getAttributeMinValue(String elementName, String attrName) { throw new IllegalArgumentException("The attribute is not a range."); } + @Override public String getAttributeMaxValue(String elementName, String attrName) { throw new IllegalArgumentException("The attribute is not a range."); } + @Override public int getAttributeListMinLength(String elementName, String attrName) { TIFFAttrInfo info = getAttrInfo(elementName, attrName); return info.listMinLength; } + @Override public int getAttributeListMaxLength(String elementName, String attrName) { TIFFAttrInfo info = getAttrInfo(elementName, attrName); return info.listMaxLength; } + @Override public String getAttributeDescription(String elementName, String attrName, Locale locale) { String key = elementName + "/" + attrName; @@ -170,11 +187,13 @@ return getResource(key, locale); } + @Override public int getObjectValueType(String elementName) { TIFFElementInfo info = getElementInfo(elementName); return info.objectValueType; } + @Override public Class<?> getObjectClass(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { @@ -184,6 +203,7 @@ return info.objectClass; } + @Override public Object getObjectDefaultValue(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { @@ -193,6 +213,7 @@ return info.objectDefaultValue; } + @Override public Object[] getObjectEnumerations(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { @@ -202,6 +223,7 @@ return info.objectEnumerations; } + @Override public Comparable<Object> getObjectMinValue(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { @@ -211,6 +233,7 @@ return info.objectMinValue; } + @Override public Comparable<Object> getObjectMaxValue(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { @@ -220,6 +243,7 @@ return info.objectMaxValue; } + @Override public int getObjectArrayMinLength(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { @@ -229,6 +253,7 @@ return info.objectArrayMinLength; } + @Override public int getObjectArrayMaxLength(String elementName) { TIFFElementInfo info = getElementInfo(elementName); if (info.objectValueType == VALUE_NONE) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +33,7 @@ super("", BaselineTIFFTagSet.COMPRESSION_NONE, true); } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFNullDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,7 @@ // change beginDecoding() and decode() to use the active region values // when random access is easy and the entire region values otherwise. // + @Override public void beginDecoding() { // Determine number of bits per pixel. int bitsPerPixel = 0; @@ -89,6 +90,7 @@ super.beginDecoding(); } + @Override public void decode() throws IOException { super.decode(); @@ -105,6 +107,7 @@ } } + @Override public void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFOldJPEGDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -545,6 +545,7 @@ // The strategy for cases 4-5 is to concatenate a tables stream created // in initialize() with the entropy coded data in each strip or tile. // + @Override public void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsCompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsCompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsCompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsCompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -86,6 +86,7 @@ return outOffset; } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFPackBitsDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,6 +72,7 @@ return dstIndex - dstOffset; } + @Override public void decodeRaw(byte[] b, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRLECompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRLECompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRLECompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRLECompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,6 +87,7 @@ return outIndex; } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRenderedImage.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRenderedImage.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRenderedImage.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFRenderedImage.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -130,74 +130,92 @@ return newParam; } + @Override public Vector<RenderedImage> getSources() { return null; } + @Override public Object getProperty(String name) { return java.awt.Image.UndefinedProperty; } + @Override public String[] getPropertyNames() { return null; } + @Override public ColorModel getColorModel() { return its.getColorModel(); } + @Override public SampleModel getSampleModel() { return its.getSampleModel(); } + @Override public int getWidth() { return width; } + @Override public int getHeight() { return height; } + @Override public int getMinX() { return 0; } + @Override public int getMinY() { return 0; } + @Override public int getNumXTiles() { return (width + tileWidth - 1)/tileWidth; } + @Override public int getNumYTiles() { return (height + tileHeight - 1)/tileHeight; } + @Override public int getMinTileX() { return 0; } + @Override public int getMinTileY() { return 0; } + @Override public int getTileWidth() { return tileWidth; } + @Override public int getTileHeight() { return tileHeight; } + @Override public int getTileGridXOffset() { return 0; } + @Override public int getTileGridYOffset() { return 0; } + @Override public Raster getTile(int tileX, int tileY) { Rectangle tileRect = new Rectangle(tileX*tileWidth, tileY*tileHeight, @@ -206,10 +224,12 @@ return getData(tileRect); } + @Override public Raster getData() { return read(new Rectangle(0, 0, getWidth(), getHeight())); } + @Override public Raster getData(Rectangle rect) { return read(rect); } @@ -236,6 +256,7 @@ } } + @Override public WritableRaster copyData(WritableRaster raster) { if (raster == null) { return read(new Rectangle(0, 0, getWidth(), getHeight())); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +54,7 @@ null, null); } + @Override public boolean isReadOnly() { return false; } @@ -64,6 +65,7 @@ throw new IIOInvalidTreeException(reason, node); } + @Override public Node getAsTree(String formatName) { IIOMetadataNode root = new IIOMetadataNode(nativeMetadataFormatName); @@ -103,6 +105,7 @@ } } + @Override public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException { if (formatName.equals(nativeMetadataFormatName)) { @@ -115,6 +118,7 @@ } } + @Override public void reset() { this.byteOrder = ByteOrder.BIG_ENDIAN; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,7 @@ private static TIFFStreamMetadataFormat theInstance = null; + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return false; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormatResources.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormatResources.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormatResources.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFStreamMetadataFormatResources.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ public TIFFStreamMetadataFormatResources() { } + @Override public Object[][] getContents() { return contents.clone(); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT4Compressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT4Compressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT4Compressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT4Compressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +52,7 @@ * * @see #getMetadata() */ + @Override public void setMetadata(IIOMetadata metadata) { super.setMetadata(metadata); @@ -214,6 +215,7 @@ return outIndex; } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT6Compressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT6Compressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT6Compressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFT6Compressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,6 +146,7 @@ return outIndex; } + @Override public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrColorConverter.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +80,7 @@ / CodingRange) + ReferenceBlack; */ + @Override public void fromRGB(float r, float g, float b, float[] result) { // Convert RGB to full-range YCbCr. float Y = (lumaRed*r + lumaGreen*g + lumaBlue*b); @@ -95,6 +96,7 @@ referenceBlackCr; } + @Override public void toRGB(float x0, float x1, float x2, float[] rgb) { // Convert YCbCr code to full-range YCbCr. float Y = (x0 - referenceBlackY)*CODING_RANGE_Y/ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrDecompressor.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrDecompressor.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrDecompressor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFYCbCrDecompressor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ // "Chained" decompressor methods. // + @Override public void setReader(ImageReader reader) { if(decompressor != null) { decompressor.setReader(reader); @@ -102,6 +103,7 @@ super.setReader(reader); } + @Override public void setMetadata(IIOMetadata metadata) { if(decompressor != null) { decompressor.setMetadata(metadata); @@ -109,6 +111,7 @@ super.setMetadata(metadata); } + @Override public void setPhotometricInterpretation(int photometricInterpretation) { if(decompressor != null) { decompressor.setPhotometricInterpretation(photometricInterpretation); @@ -116,6 +119,7 @@ super.setPhotometricInterpretation(photometricInterpretation); } + @Override public void setCompression(int compression) { if(decompressor != null) { decompressor.setCompression(compression); @@ -123,6 +127,7 @@ super.setCompression(compression); } + @Override public void setPlanar(boolean planar) { if(decompressor != null) { decompressor.setPlanar(planar); @@ -130,6 +135,7 @@ super.setPlanar(planar); } + @Override public void setSamplesPerPixel(int samplesPerPixel) { if(decompressor != null) { decompressor.setSamplesPerPixel(samplesPerPixel); @@ -137,6 +143,7 @@ super.setSamplesPerPixel(samplesPerPixel); } + @Override public void setBitsPerSample(int[] bitsPerSample) { if(decompressor != null) { decompressor.setBitsPerSample(bitsPerSample); @@ -144,6 +151,7 @@ super.setBitsPerSample(bitsPerSample); } + @Override public void setSampleFormat(int[] sampleFormat) { if(decompressor != null) { decompressor.setSampleFormat(sampleFormat); @@ -151,6 +159,7 @@ super.setSampleFormat(sampleFormat); } + @Override public void setExtraSamples(int[] extraSamples) { if(decompressor != null) { decompressor.setExtraSamples(extraSamples); @@ -158,6 +167,7 @@ super.setExtraSamples(extraSamples); } + @Override public void setColorMap(char[] colorMap) { if(decompressor != null) { decompressor.setColorMap(colorMap); @@ -165,6 +175,7 @@ super.setColorMap(colorMap); } + @Override public void setStream(ImageInputStream stream) { if(decompressor != null) { decompressor.setStream(stream); @@ -173,6 +184,7 @@ } } + @Override public void setOffset(long offset) { if(decompressor != null) { decompressor.setOffset(offset); @@ -180,6 +192,7 @@ super.setOffset(offset); } + @Override public void setByteCount(int byteCount) throws IOException { if(decompressor != null) { decompressor.setByteCount(byteCount); @@ -187,6 +200,7 @@ super.setByteCount(byteCount); } + @Override public void setSrcMinX(int srcMinX) { if(decompressor != null) { decompressor.setSrcMinX(srcMinX); @@ -194,6 +208,7 @@ super.setSrcMinX(srcMinX); } + @Override public void setSrcMinY(int srcMinY) { if(decompressor != null) { decompressor.setSrcMinY(srcMinY); @@ -201,6 +216,7 @@ super.setSrcMinY(srcMinY); } + @Override public void setSrcWidth(int srcWidth) { if(decompressor != null) { decompressor.setSrcWidth(srcWidth); @@ -208,6 +224,7 @@ super.setSrcWidth(srcWidth); } + @Override public void setSrcHeight(int srcHeight) { if(decompressor != null) { decompressor.setSrcHeight(srcHeight); @@ -215,6 +232,7 @@ super.setSrcHeight(srcHeight); } + @Override public void setSourceXOffset(int sourceXOffset) { if(decompressor != null) { decompressor.setSourceXOffset(sourceXOffset); @@ -222,6 +240,7 @@ super.setSourceXOffset(sourceXOffset); } + @Override public void setDstXOffset(int dstXOffset) { if(decompressor != null) { decompressor.setDstXOffset(dstXOffset); @@ -229,6 +248,7 @@ super.setDstXOffset(dstXOffset); } + @Override public void setSourceYOffset(int sourceYOffset) { if(decompressor != null) { decompressor.setSourceYOffset(sourceYOffset); @@ -236,6 +256,7 @@ super.setSourceYOffset(sourceYOffset); } + @Override public void setDstYOffset(int dstYOffset) { if(decompressor != null) { decompressor.setDstYOffset(dstYOffset); @@ -260,6 +281,7 @@ } */ + @Override public void setSourceBands(int[] sourceBands) { if(decompressor != null) { decompressor.setSourceBands(sourceBands); @@ -267,6 +289,7 @@ super.setSourceBands(sourceBands); } + @Override public void setDestinationBands(int[] destinationBands) { if(decompressor != null) { decompressor.setDestinationBands(destinationBands); @@ -274,6 +297,7 @@ super.setDestinationBands(destinationBands); } + @Override public void setImage(BufferedImage image) { if(decompressor != null) { ColorModel cm = image.getColorModel(); @@ -287,6 +311,7 @@ super.setImage(image); } + @Override public void setDstMinX(int dstMinX) { if(decompressor != null) { decompressor.setDstMinX(dstMinX); @@ -294,6 +319,7 @@ super.setDstMinX(dstMinX); } + @Override public void setDstMinY(int dstMinY) { if(decompressor != null) { decompressor.setDstMinY(dstMinY); @@ -301,6 +327,7 @@ super.setDstMinY(dstMinY); } + @Override public void setDstWidth(int dstWidth) { if(decompressor != null) { decompressor.setDstWidth(dstWidth); @@ -308,6 +335,7 @@ super.setDstWidth(dstWidth); } + @Override public void setDstHeight(int dstHeight) { if(decompressor != null) { decompressor.setDstHeight(dstHeight); @@ -315,6 +343,7 @@ super.setDstHeight(dstHeight); } + @Override public void setActiveSrcMinX(int activeSrcMinX) { if(decompressor != null) { decompressor.setActiveSrcMinX(activeSrcMinX); @@ -322,6 +351,7 @@ super.setActiveSrcMinX(activeSrcMinX); } + @Override public void setActiveSrcMinY(int activeSrcMinY) { if(decompressor != null) { decompressor.setActiveSrcMinY(activeSrcMinY); @@ -329,6 +359,7 @@ super.setActiveSrcMinY(activeSrcMinY); } + @Override public void setActiveSrcWidth(int activeSrcWidth) { if(decompressor != null) { decompressor.setActiveSrcWidth(activeSrcWidth); @@ -336,6 +367,7 @@ super.setActiveSrcWidth(activeSrcWidth); } + @Override public void setActiveSrcHeight(int activeSrcHeight) { if(decompressor != null) { decompressor.setActiveSrcHeight(activeSrcHeight); @@ -353,6 +385,7 @@ } } + @Override public void beginDecoding() { if(decompressor != null) { decompressor.beginDecoding(); @@ -445,6 +478,7 @@ } } + @Override public void decodeRaw(byte[] buf, int dstOffset, int bitsPerPixel, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +63,7 @@ null, null); } + @Override public void onRegistration(ServiceRegistry registry, Class<?> category) { if (registered) { @@ -71,10 +72,12 @@ registered = true; } + @Override public String getDescription(Locale locale) { return "Standard WBMP Image Reader"; } + @Override public boolean canDecodeInput(Object source) throws IOException { if (!(source instanceof ImageInputStream)) { return false; @@ -149,6 +152,7 @@ return result; } + @Override public ImageReader createReaderInstance(Object extension) throws IIOException { return new WBMPImageReader(this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +63,12 @@ null, null, null, null); } + @Override public String getDescription(Locale locale) { return "Standard WBMP Image Writer"; } + @Override public void onRegistration(ServiceRegistry registry, Class<?> category) { if (registered) { @@ -76,6 +78,7 @@ registered = true; } + @Override public boolean canEncodeImage(ImageTypeSpecifier type) { SampleModel sm = type.getSampleModel(); if (!(sm instanceof MultiPixelPackedSampleModel)) @@ -86,6 +89,7 @@ return true; } + @Override public ImageWriter createWriterInstance(Object extension) throws IIOException { return new WBMPImageWriter(this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadata.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,10 +50,12 @@ null, null); } + @Override public boolean isReadOnly() { return true; } + @Override public Node getAsTree(String formatName) { if (formatName.equals(nativeMetadataFormatName)) { return getNativeTree(); @@ -76,14 +78,17 @@ return root; } + @Override public void setFromTree(String formatName, Node root) { throw new IllegalStateException(I18N.getString("WBMPMetadata1")); } + @Override public void mergeTree(String formatName, Node root) { throw new IllegalStateException(I18N.getString("WBMPMetadata1")); } + @Override public void reset() { throw new IllegalStateException(I18N.getString("WBMPMetadata1")); } @@ -101,6 +106,7 @@ } + @Override protected IIOMetadataNode getStandardChromaNode() { IIOMetadataNode node = new IIOMetadataNode("Chroma"); @@ -112,6 +118,7 @@ } + @Override protected IIOMetadataNode getStandardDimensionNode() { IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension"); IIOMetadataNode node = null; // scratch node diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,7 @@ + @Override public boolean canNodeAppear(String elementName, ImageTypeSpecifier imageType) { return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +43,12 @@ super(vendorName, version, inputClass); } + @Override public String getDescription(Locale locale) { return "Service provider that instantiates a FileImageInputStream from a File"; } + @Override public ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +43,12 @@ super(vendorName, version, outputClass); } + @Override public String getDescription(Locale locale) { return "Service provider that instantiates a FileImageOutputStream from a File"; } + @Override public ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,18 +46,22 @@ super(vendorName, version, inputClass); } + @Override public String getDescription(Locale locale) { return "Service provider that instantiates a FileCacheImageInputStream or MemoryCacheImageInputStream from an InputStream"; } + @Override public boolean canUseCacheFile() { return true; } + @Override public boolean needsCacheFile() { return false; } + @Override public ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,18 +46,22 @@ super(vendorName, version, outputClass); } + @Override public String getDescription(Locale locale) { return "Service provider that instantiates an OutputStreamImageOutputStream from an OutputStream"; } + @Override public boolean canUseCacheFile() { return true; } + @Override public boolean needsCacheFile() { return false; } + @Override public ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +44,12 @@ super(vendorName, version, inputClass); } + @Override public String getDescription(Locale locale) { return "Service provider that instantiates a FileImageInputStream from a RandomAccessFile"; } + @Override public ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +44,12 @@ super(vendorName, version, outputClass); } + @Override public String getDescription(Locale locale) { return "Service provider that instantiates a FileImageOutputStream from a RandomAccessFile"; } + @Override public ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/stream/CloseableDisposerRecord.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/stream/CloseableDisposerRecord.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/stream/CloseableDisposerRecord.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/stream/CloseableDisposerRecord.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,6 +41,7 @@ this.closeable = closeable; } + @Override public synchronized void dispose() { if (closeable != null) { try { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/com/sun/imageio/stream/StreamCloser.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,7 @@ if (streamCloser == null) { final Runnable streamCloserRunnable = new Runnable() { + @Override public void run() { if (toCloseQueue != null) { synchronized (StreamCloser.class) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -216,11 +216,9 @@ SynthLookAndFeel.update(context, g); - if (((JProgressBar) c).isBorderPainted()) { - context.getPainter().paintProgressBarBackground(context, - g, 0, 0, c.getWidth(), c.getHeight(), - progressBar.getOrientation()); - } + context.getPainter().paintProgressBarBackground(context, + g, 0, 0, c.getWidth(), c.getHeight(), + progressBar.getOrientation()); paint(context, g); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,6 +146,8 @@ public static final int RSTAG_INSIDE = 1; public static final int RSTAG_OUTSIDE = -1; + public static final int MAX_LINK_COUNT = 1024; + public abstract void newRow(); public abstract int classify(Edge e); @@ -195,6 +197,25 @@ } }; + private void consumeSubCurves(Vector<CurveLink> subcurves, + Vector<ChainEnd> chains, + Vector<Curve> curve) { + finalizeSubCurves(subcurves, chains); + Enumeration<CurveLink> enum_ = subcurves.elements(); + while (enum_.hasMoreElements()) { + CurveLink link = enum_.nextElement(); + curve.add(link.getMoveto()); + CurveLink nextlink = link; + while ((nextlink = nextlink.getNext()) != null) { + if (!link.absorb(nextlink)) { + curve.add(link.getSubCurve()); + link = nextlink; + } + } + curve.add(link.getSubCurve()); + } + } + private Vector<Curve> pruneEdges(Vector<Edge> edges) { int numedges = edges.size(); if (numedges < 2) { @@ -218,6 +239,8 @@ Vector<CurveLink> subcurves = new Vector<>(); Vector<ChainEnd> chains = new Vector<>(); Vector<CurveLink> links = new Vector<>(); + Vector<Curve> ret = new Vector<>(); + int linkCount = 0; // Active edges are between left (inclusive) and right (exclusive) while (left < numedges) { double y = yrange[0]; @@ -390,27 +413,22 @@ System.out.println(" "+link.getSubCurve()); } } + // If we have complex area calculation, we should consume the + // intermediate subcurves to optimize memory footprint + if (linkCount >= MAX_LINK_COUNT) { + consumeSubCurves(subcurves, chains, ret); + linkCount = 0; + chains.clear(); + subcurves.clear(); + } + linkCount += links.size(); resolveLinks(subcurves, chains, links); links.clear(); // Finally capture the bottom of the valid Y range as the top // of the next Y range. yrange[0] = yend; } - finalizeSubCurves(subcurves, chains); - Vector<Curve> ret = new Vector<>(); - Enumeration<CurveLink> enum_ = subcurves.elements(); - while (enum_.hasMoreElements()) { - CurveLink link = enum_.nextElement(); - ret.add(link.getMoveto()); - CurveLink nextlink = link; - while ((nextlink = nextlink.getNext()) != null) { - if (!link.absorb(nextlink)) { - ret.add(link.getSubCurve()); - link = nextlink; - } - } - ret.add(link.getSubCurve()); - } + consumeSubCurves(subcurves, chains, ret); return ret; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/geom/Curve.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/awt/geom/Curve.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/geom/Curve.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/awt/geom/Curve.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1046,6 +1046,9 @@ double bump = ymin; double maxbump = Math.min(ymin * 1E13, (y1 - y0) * .1); double y = y0 + bump; + if (!Double.isFinite(y1)) { + return 0; + } while (y <= y1) { if (fairlyClose(this.XforY(y), that.XforY(y))) { if ((bump *= 2) > maxbump) { @@ -1319,7 +1322,7 @@ public boolean fairlyClose(double v1, double v2) { return (Math.abs(v1 - v2) < - Math.max(Math.abs(v1), Math.abs(v2)) * 1E-10); + Math.max(Math.abs(v1), Math.abs(v2)) * 1E-8); } public abstract int getSegment(double[] coords); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,8 +92,8 @@ byte[] raster = null; IndexColorModel model = null; - String matchRegex = "(0[xX])?[0-9a-fA-F]+[\\s+]?[,|};]"; - String replaceRegex = "(0[xX])|,|[\\s+]|[};]"; + String matchRegex = "\\s*(0[xX])?((?:(?!,|\\};).)+)(,|\\};)"; + String replaceRegex = "0[xX]|,|\\s+|\\};"; String line; int lineNum = 0; @@ -111,11 +111,19 @@ } try { if (!token[2].isBlank() && state == 0) { - W = Integer.parseInt(token[2]); - state = 1; // after width is set + if (token[1].endsWith("th")) { + W = Integer.parseInt(token[2]); + } else if (token[1].endsWith("t")) { + H = Integer.parseInt(token[2]); + } + state = 1; // after first dimension is set } else if (!token[2].isBlank() && state == 1) { - H = Integer.parseInt(token[2]); - state = 2; // after height is set + if (token[1].endsWith("th")) { + W = Integer.parseInt(token[2]); + } else if (token[1].endsWith("t")) { + H = Integer.parseInt(token[2]); + } + state = 2; // after second dimension is set } } catch (NumberFormatException nfe) { // parseInt() can throw NFE @@ -147,58 +155,80 @@ error("Width or Height of XBM file not defined"); } + boolean contFlag = false; + StringBuilder sb = new StringBuilder(); + // loop to process image data while (!aborted && (line = br.readLine()) != null) { lineNum++; - if (line.contains("[]")) { - Matcher matcher = Pattern.compile(matchRegex).matcher(line); - while (matcher.find()) { - if (y >= H) { - error("Scan size of XBM file exceeds" - + " the defined width x height"); - } + if (!contFlag) { + if (line.contains("[]")) { + contFlag = true; + } else { + continue; + } + } - int startIndex = matcher.start(); - int endIndex = matcher.end(); - String hexByte = line.substring(startIndex, endIndex); - - if (!(hexByte.startsWith("0x") - || hexByte.startsWith("0X"))) { - error("Invalid hexadecimal number at Ln#:" + lineNum - + " Col#:" + (startIndex + 1)); - } - hexByte = hexByte.replaceAll(replaceRegex, ""); - if (hexByte.length() != 2) { - error("Invalid hexadecimal number at Ln#:" + lineNum - + " Col#:" + (startIndex + 1)); - } + int end = line.indexOf(';'); + if (end >= 0) { + sb.append(line, 0, end + 1); + break; + } else { + sb.append(line).append(System.lineSeparator()); + } + } - try { - n = Integer.parseInt(hexByte, 16); - } catch (NumberFormatException nfe) { - error("Error parsing hexadecimal at Ln#:" + lineNum - + " Col#:" + (startIndex + 1)); - } - for (int mask = 1; mask <= 0x80; mask <<= 1) { - if (x < W) { - if ((n & mask) != 0) - raster[x] = 1; - else - raster[x] = 0; - } - x++; - } + String resultLine = sb.toString(); + int cutOffIndex = resultLine.indexOf('{'); + resultLine = resultLine.substring(cutOffIndex + 1); + + Matcher matcher = Pattern.compile(matchRegex).matcher(resultLine); + while (matcher.find()) { + if (y >= H) { + error("Scan size of XBM file exceeds" + + " the defined width x height"); + } - if (x >= W) { - int result = setPixels(0, y, W, 1, model, raster, 0, W); - if (result <= 0) { - error("Unexpected error occurred during setPixel()"); - } - x = 0; - y++; - } + int startIndex = matcher.start(); + int endIndex = matcher.end(); + String hexByte = resultLine.substring(startIndex, endIndex); + hexByte = hexByte.replaceAll("^\\s+", ""); + + if (!(hexByte.startsWith("0x") + || hexByte.startsWith("0X"))) { + error("Invalid hexadecimal number at Ln#:" + lineNum + + " Col#:" + (startIndex + 1)); + } + hexByte = hexByte.replaceAll(replaceRegex, ""); + if (hexByte.length() != 2) { + error("Invalid hexadecimal number at Ln#:" + lineNum + + " Col#:" + (startIndex + 1)); + } + + try { + n = Integer.parseInt(hexByte, 16); + } catch (NumberFormatException nfe) { + error("Error parsing hexadecimal at Ln#:" + lineNum + + " Col#:" + (startIndex + 1)); + } + for (int mask = 1; mask <= 0x80; mask <<= 1) { + if (x < W) { + if ((n & mask) != 0) + raster[x] = 1; + else + raster[x] = 0; + } + x++; + } + + if (x >= W) { + int result = setPixels(0, y, W, 1, model, raster, 0, W); + if (result <= 0) { + error("Unexpected error occurred during setPixel()"); } + x = 0; + y++; } } imageComplete(ImageConsumer.STATICIMAGEDONE, true); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/font/CompositeFont.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/font/CompositeFont.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/font/CompositeFont.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/font/CompositeFont.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,7 +88,7 @@ /* * See if this is a windows locale which has a system EUDC font. - * If so add it as the final fallback component of the composite. + * If so add it as the first fallback component of the composite. * The caller could be responsible for this, but for now it seems * better that it is handled internally to the CompositeFont class. */ @@ -114,8 +114,8 @@ components[msCnt] = fm.getEUDCFont(); deferredInitialisation = new boolean[numSlots]; if (defer) { - for (int i=0; i<numSlots-1; i++) { - deferredInitialisation[i] = true; + for (int i = 0; i < numSlots; i++) { + deferredInitialisation[i] = (i != msCnt); } } } else { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java --- openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java 2026-04-17 19:08:13.000000000 +0000 @@ -577,6 +577,7 @@ * not all do, and it cannot be relied upon. * - each glyph maps to a single character, when multiple glyphs exist for a character they all map to it, but * no two characters map to the same glyph +* This was only true for the old, ICU layout engine which inserted 0xffff glyphs for ligaturized characters! * - multiple glyphs mapping to the same character need not be in sequence (thai, tamil have split characters) * - glyphs may be arbitrarily reordered (Indic reorders glyphs) * - all glyphs share the same bidi level @@ -712,8 +713,6 @@ while (gx != gxlimit) { // start of new cluster - int clusterExtraGlyphs = 0; - minIndex = indices[gx]; maxIndex = minIndex; @@ -730,14 +729,11 @@ while (gx != gxlimit && ((glyphinfo[gp + advx] == 0) || - (indices[gx] <= maxIndex) || - (maxIndex - minIndex > clusterExtraGlyphs))) { + (indices[gx] <= maxIndex))) { - ++clusterExtraGlyphs; // have an extra glyph in this cluster if (DEBUG) { System.err.println("gp=" +gp +" adv=" + glyphinfo[gp + advx] + - " gx="+ gx+ " i[gx]="+indices[gx] + - " clusterExtraGlyphs="+clusterExtraGlyphs); + " gx="+ gx+ " i[gx]="+indices[gx]); } // adjust advance only if new glyph has non-zero advance diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/legal/freetype.md openjdk-25-25.0.3+9/src/java.desktop/share/legal/freetype.md --- openjdk-25-25.0.2+10/src/java.desktop/share/legal/freetype.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/legal/freetype.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,4 +1,4 @@ -## The FreeType Project: Freetype v2.13.3 +## The FreeType Project: Freetype v2.14.2 ### FreeType Notice @@ -21,25 +21,24 @@ ### FreeType License ``` -Copyright (C) 1996-2024 by David Turner, Robert Wilhelm, and Werner Lemberg. -Copyright (C) 2007-2024 by Dereg Clegg and Michael Toftdal. -Copyright (C) 1996-2024 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. -Copyright (C) 2022-2024 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and -Copyright (C) 2004-2024 by Masatake YAMATO and Redhat K.K. -Copyright (C) 2007-2024 by Derek Clegg and Michael Toftdal. -Copyright (C) 2003-2024 by Masatake YAMATO, Red Hat K.K., -Copyright (C) 1996-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. -Copyright (C) 2007-2024 by David Turner. -Copyright (C) 2022-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. -Copyright (C) 2007-2024 by Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. -Copyright (C) 2008-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. -Copyright (C) 2013-2024 by Google, Inc. -Copyright (C) 2019-2024 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. -Copyright (C) 2009-2024 by Oran Agra and Mickey Gabel. -Copyright (C) 2018-2024 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. -Copyright (C) 2004-2024 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. - - +Copyright (C) 1996-2025 by David Turner, Robert Wilhelm, and Werner Lemberg. +Copyright (C) 2007-2025 by Dereg Clegg and Michael Toftdal. +Copyright (C) 1996-2025 by Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. +Copyright (C) 2022-2025 by David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and +Copyright (C) 2004-2025 by Masatake YAMATO and Redhat K.K. +Copyright (C) 2007-2025 by Derek Clegg and Michael Toftdal. +Copyright (C) 2003-2025 by Masatake YAMATO, Red Hat K.K., +Copyright (C) 1996-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. +Copyright (C) 2007-2025 by David Turner. +Copyright (C) 2022-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. +Copyright (C) 2007-2025 by Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. +Copyright (C) 2025 by Behdad Esfahbod. +Copyright (C) 2008-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. +Copyright (C) 2013-2025 by Google, Inc. +Copyright (C) 2019-2025 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. +Copyright (C) 2009-2025 by Oran Agra and Mickey Gabel. +Copyright (C) 2018-2025 by David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. +Copyright (C) 2004-2025 by David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. The FreeType Project LICENSE ---------------------------- @@ -207,6 +206,7 @@ https://www.freetype.org + ``` ### GPL v2 diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/legal/giflib.md openjdk-25-25.0.3+9/src/java.desktop/share/legal/giflib.md --- openjdk-25-25.0.2+10/src/java.desktop/share/legal/giflib.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/legal/giflib.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,9 +1,9 @@ -## GIFLIB v5.2.2 +## GIFLIB v6.1.2 ### GIFLIB License ``` -The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond += MIT 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 @@ -25,9 +25,15 @@ --------------------------------- The below applies to the following file(s): +giflib/dgif_lib.c +giflib/gifalloc.c +giflib/gif_err.c giflib/openbsd-reallocarray.c +Copyright (C) 1989 Gershon Elber Copyright (C) 2008 Otto Moerbeek <otto@drijf.net> +Copyright (C) Eric S. Raymond <esr@thyrsus.com> + SPDX-License-Identifier: MIT diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/legal/harfbuzz.md openjdk-25-25.0.3+9/src/java.desktop/share/legal/harfbuzz.md --- openjdk-25-25.0.2+10/src/java.desktop/share/legal/harfbuzz.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/legal/harfbuzz.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,4 +1,4 @@ -## Harfbuzz 11.2.0 +## Harfbuzz 12.3.2 ### Harfbuzz License diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/legal/libpng.md openjdk-25-25.0.3+9/src/java.desktop/share/legal/libpng.md --- openjdk-25-25.0.2+10/src/java.desktop/share/legal/libpng.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/legal/libpng.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,4 +1,4 @@ -## libpng v1.6.47 +## libpng v1.6.57 ### libpng License <pre> @@ -9,8 +9,8 @@ PNG Reference Library License version 2 --------------------------------------- -Copyright (c) 1995-2025 The PNG Reference Library Authors. -Copyright (C) 2018-2025 Cosmin Truta +Copyright (C) 1995-2026 The PNG Reference Library Authors. +Copyright (C) 2018-2026 Cosmin Truta Copyright (C) 1998-2018 Glenn Randers-Pehrson Copyright (C) 1996-1997 Andreas Dilger Copyright (C) 1995-1996 Guy Eric Schalnat, Group 42, Inc. @@ -158,6 +158,7 @@ Authors, for copyright and licensing purposes. * Adam Richter + * Alexander Smorkalov * Andreas Dilger * Chris Blume * Cosmin Truta @@ -167,34 +168,43 @@ * Glenn Randers-Pehrson * Greg Roelofs * Guy Eric Schalnat + * Halil Oktay * James Yu * John Bowler + * Joshua Inscoe * Kevin Bracey * Lucas Chollet * Magnus Holmgren * Mandar Sahastrabuddhe + * Manfred Schlaegl * Mans Rullgard * Matt Sarett * Mike Klein + * Mohammad Seet * Pascal Massimino * Paul Schmidt + * Petr Simecek * Philippe Antoine * Qiang Zhou * Sam Bushell * Samuel Williams * Simon-Pierre Cadieux + * Taegu Ha (하태구) * Tim Wegner + * Tobias Stoeckmann * Tom Lane * Tom Tanner * Vadim Barkov * Willem van Schaik + * Yuelin Wang (王跃林) * Zhijie Liang * Apple Inc. - Zixu Wang (王子旭) * Arm Holdings - Richard Townsend - * Google Inc. + * Google LLC - Dan Field + - Dragoș Tiselice - Leon Scroggins III - Matt Sarett - Mike Klein @@ -204,6 +214,10 @@ - GuXiWei (顾希伟) - JinBo (金波) - ZhangLixia (张利霞) + * Samsung Group + - Filip Wasil + * SpacemiT Hangzhou Technology, Co. + - Liang Junzhao (梁俊钊) The build projects, the build scripts, the test scripts, and other files in the "projects", "scripts" and "tests" directories, have @@ -214,3 +228,4 @@ other copyright owners, and are released under other open source licenses. ``` + diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * ANSI-specific configuration file (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftheader.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftheader.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftheader.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftheader.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Build macros of the FreeType 2 library. * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * User-selectable configuration macros (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -158,12 +158,12 @@ /************************************************************************** * - * If this macro is defined, try to use an inlined assembler version of the - * @FT_MulFix function, which is a 'hotspot' when loading and hinting - * glyphs, and which should be executed as fast as possible. + * If this macro is defined, try to use an inlined 64-bit or assembler + * version of the @FT_MulFix function, which is a 'hotspot' when loading + * and hinting glyphs, and which should be executed as fast as possible. * - * Note that if your compiler or CPU is not supported, this will default to - * the standard and portable implementation found in `ftcalc.c`. + * If your compiler is not C99-compliant or CPU assembly is not supported, + * you can disable this option. */ #define FT_CONFIG_OPTION_INLINE_MULFIX @@ -295,6 +295,31 @@ /************************************************************************** * + * HarfBuzz dynamic support. + * + * Define this macro if you want the HarfBuzz library to be loaded at + * runtime instead of being linked to FreeType. + * + * This option has no effect if `FT_CONFIG_OPTION_USE_HARFBUZZ` is not + * defined. + * + * When this option is enabled, FreeType will try to load the HarfBuzz + * library at runtime, using `dlopen` or `LoadLibrary`, depending on the + * platform. On Microsoft platforms, the library name looked up is + * `libharfbuzz-0.dll`. On Apple platforms, the library name looked up + * is `libharfbuzz.0.dylib`. On all other platforms, the library name + * looked up is `libharfbuzz.so.0`. This name can be overridden by + * defining the macro `FT_LIBHARFBUZZ` at FreeType compilation time. + * + * If you use a build system like cmake or the `configure` script, + * options set by those programs have precedence, overwriting the value + * here with the configured one. + */ +/* #define FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ + + + /************************************************************************** + * * Brotli support. * * FreeType uses the Brotli library to provide support for decompressing @@ -679,7 +704,7 @@ * defined. * * [1] - * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx + * https://learn.microsoft.com/typography/cleartype/truetypecleartype */ #define TT_CONFIG_OPTION_SUBPIXEL_HINTING @@ -697,7 +722,7 @@ * flags array which can be used to disambiguate, but old fonts will not * have them. * - * https://www.microsoft.com/typography/otspec/glyf.htm + * https://learn.microsoft.com/typography/opentype/spec/glyf * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED @@ -734,7 +759,13 @@ /************************************************************************** * * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an - * embedded 'BDF~' table within SFNT-based bitmap formats. + * embedded 'BDF~' table within an SFNT-based `.otb` font file. This table + * is an extension used by X11 to preserve BDF properties after conversion + * to SFNT containers. See + * + * https://fontforge.org/docs/techref/non-standard.html#non-standard-bdf + * + * for more details. */ /* #define TT_CONFIG_OPTION_BDF */ @@ -760,10 +791,10 @@ /************************************************************************** * * Option `TT_CONFIG_OPTION_GPOS_KERNING` enables a basic GPOS kerning - * implementation (for TrueType fonts only). With this defined, FreeType - * is able to get kerning pair data from the GPOS 'kern' feature as well as - * legacy 'kern' tables; without this defined, FreeType will only be able - * to use legacy 'kern' tables. + * implementation (for TrueType and OpenType fonts only). With this + * defined, FreeType is able to get kerning pair data from the GPOS 'kern' + * feature as well as legacy 'kern' tables; without this defined, FreeType + * will only be able to use legacy 'kern' tables. * * Note that FreeType does not support more advanced GPOS layout features; * even the 'kern' feature implemented here doesn't handle more diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftstdlib.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftstdlib.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/ftstdlib.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/ftstdlib.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * ANSI-specific library and header configuration file (specification * only). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/integer-types.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/integer-types.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/integer-types.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/integer-types.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType integer types definitions. * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -17,6 +17,8 @@ #ifndef FREETYPE_CONFIG_INTEGER_TYPES_H_ #define FREETYPE_CONFIG_INTEGER_TYPES_H_ +FT_BEGIN_HEADER + /* There are systems (like the Texas Instruments 'C54x) where a `char` */ /* has 16~bits. ANSI~C says that `sizeof(char)` is always~1. Since an */ /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which */ @@ -242,9 +244,34 @@ #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ #ifdef FT_INT64 + typedef FT_INT64 FT_Int64; typedef FT_UINT64 FT_UInt64; -#endif +# define FT_INT64_ZERO 0 + +#else /* !FT_INT64 */ + + /* we need to emulate 64-bit data types if none are available */ + + typedef struct FT_Int64_ + { + FT_UInt32 lo; + FT_UInt32 hi; + + } FT_Int64; + + typedef struct FT_UInt64_ + { + FT_UInt32 lo; + FT_UInt32 hi; + + } FT_UInt64; + +# define FT_INT64_ZERO { 0, 0 } + +#endif /* !FT_INT64 */ + +FT_END_HEADER #endif /* FREETYPE_CONFIG_INTEGER_TYPES_H_ */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/mac-support.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/mac-support.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/mac-support.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/mac-support.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Mac/OS X support configuration header. * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -24,6 +24,7 @@ * This is the only necessary change, so it is defined here instead * providing a new configuration file. */ +#ifdef FT_MACINTOSH #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) /* No Carbon frameworks for 64bit 10.4.x. */ /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ @@ -36,6 +37,7 @@ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) #undef FT_MACINTOSH #endif +#endif /* __APPLE__ ... */ #elif defined( __SC__ ) || defined( __MRC__ ) /* Classic MacOS compilers */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/public-macros.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/public-macros.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/config/public-macros.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/config/public-macros.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Define a set of compiler macros used in public FreeType headers. * - * Copyright (C) 2020-2024 by + * Copyright (C) 2020-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -62,8 +62,8 @@ * because it is needed by `FT_EXPORT`. */ - /* Visual C, mingw */ -#if defined( _WIN32 ) + /* Visual C, MinGW, Cygwin */ +#if defined( _WIN32 ) || defined( __CYGWIN__ ) #if defined( FT2_BUILD_LIBRARY ) && defined( DLL_EXPORT ) #define FT_PUBLIC_FUNCTION_ATTRIBUTE __declspec( dllexport ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/freetype.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/freetype.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/freetype.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/freetype.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType high-level API and common types (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -811,7 +811,7 @@ * FT_ENCODING_MS_SYMBOL :: * Microsoft Symbol encoding, used to encode mathematical symbols and * wingdings. For more information, see - * 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts', + * 'https://learn.microsoft.com/typography/opentype/spec/recom#non-standard-symbol-fonts', * 'http://www.kostis.net/charsets/symbol.htm', and * 'http://www.kostis.net/charsets/wingding.htm'. * @@ -1068,12 +1068,12 @@ * the face in the font file (starting with value~0). They are set * to~0 if there is only one face in the font file. * - * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation - * fonts only, holding the named instance index for the current face - * index (starting with value~1; value~0 indicates font access without - * a named instance). For non-variation fonts, bits 16-30 are ignored. - * If we have the third named instance of face~4, say, `face_index` is - * set to 0x00030004. + * [Since 2.6.1] Bits 16-30 are relevant to TrueType GX and OpenType + * Font Variations only, holding the named instance index for the + * current face index (starting with value~1; value~0 indicates font + * access without a named instance). For non-variation fonts, bits + * 16-30 are ignored. If we have the third named instance of face~4, + * say, `face_index` is set to 0x00030004. * * Bit 31 is always zero (that is, `face_index` is always a positive * value). @@ -1092,10 +1092,10 @@ * the face; see @FT_STYLE_FLAG_XXX for the details. * * [Since 2.6.1] Bits 16-30 hold the number of named instances - * available for the current face if we have a GX or OpenType variation - * (sub)font. Bit 31 is always zero (that is, `style_flags` is always - * a positive value). Note that a variation font has always at least - * one named instance, namely the default instance. + * available for the current face if we have a TrueType GX or OpenType + * Font Variation. Bit 31 is always zero (that is, `style_flags` is + * always a positive value). Note that a variation font has always at + * least one named instance, namely the default instance. * * num_glyphs :: * The number of glyphs in the face. If the face is scalable and has @@ -1159,7 +1159,7 @@ * Note that the bounding box might be off by (at least) one pixel for * hinted fonts. See @FT_Size_Metrics for further discussion. * - * Note that the bounding box does not vary in OpenType variation fonts + * Note that the bounding box does not vary in OpenType Font Variations * and should only be used in relation to the default instance. * * units_per_EM :: @@ -1218,7 +1218,7 @@ * Fields may be changed after a call to @FT_Attach_File or * @FT_Attach_Stream. * - * For an OpenType variation font, the values of the following fields can + * For OpenType Font Variations, the values of the following fields can * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if * the font contains an 'MVAR' table: `ascender`, `descender`, `height`, * `underline_position`, and `underline_thickness`. @@ -1336,7 +1336,7 @@ * FT_FACE_FLAG_MULTIPLE_MASTERS :: * The face contains multiple masters and is capable of interpolating * between them. Supported formats are Adobe MM, TrueType GX, and - * OpenType variation fonts. + * OpenType Font Variations. * * See section @multiple_masters for API details. * @@ -1609,7 +1609,7 @@ * * @description: * A macro that returns true whenever a face object is a named instance - * of a GX or OpenType variation font. + * of a TrueType GX or OpenType Font Variations. * * [Since 2.9] Changing the design coordinates with * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does @@ -2147,7 +2147,7 @@ * freed. * * [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of - * OpenType variation fonts for a selected instance are internally + * OpenType Font Variations for a selected instance are internally * handled as 26.6 fractional font units but returned as (rounded) * integers, as expected. To get unrounded font units, don't use * @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and @@ -2640,14 +2640,14 @@ * the face in the font file (starting with value~0). Set it to~0 if * there is only one face in the font file. * - * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation - * fonts only, specifying the named instance index for the current face - * index (starting with value~1; value~0 makes FreeType ignore named - * instances). For non-variation fonts, bits 16-30 are ignored. - * Assuming that you want to access the third named instance in face~4, - * `face_index` should be set to 0x00030004. If you want to access - * face~4 without variation handling, simply set `face_index` to - * value~4. + * [Since 2.6.1] Bits 16-30 are relevant to TrueType GX and OpenType + * Font Variations only, specifying the named instance index for the + * current face index (starting with value~1; value~0 makes FreeType + * ignore named instances). For non-variation fonts, bits 16-30 are + * ignored. Assuming that you want to access the third named instance + * in face~4, `face_index` should be set to 0x00030004. If you want + * to access face~4 without variation handling, simply set + * `face_index` to value~4. * * `FT_Open_Face` and its siblings can be used to quickly check whether * the font format of a given font resource is supported by FreeType. @@ -2914,11 +2914,11 @@ * of the available glyphs at a given ppem value is available. FreeType * silently uses outlines if there is no bitmap for a given glyph index. * - * For GX and OpenType variation fonts, a bitmap strike makes sense only - * if the default instance is active (that is, no glyph variation takes - * place); otherwise, FreeType simply ignores bitmap strikes. The same - * is true for all named instances that are different from the default - * instance. + * For TrueType GX and OpenType Font Variations, a bitmap strike makes + * sense only if the default instance is active (that is, no glyph + * variation takes place); otherwise, FreeType simply ignores bitmap + * strikes. The same is true for all named instances that are different + * from the default instance. * * Don't use this function if you are using the FreeType cache API. */ @@ -3078,7 +3078,7 @@ * is dependent entirely on how the size is defined in the source face. * The font designer chooses the final size of each glyph relative to * this size. For more information refer to - * 'https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. + * 'https://freetype.org/freetype2/docs/glyphs/glyphs-2.html'. * * Contrary to @FT_Set_Char_Size, this function doesn't have special code * to normalize zero-valued widths, heights, or resolutions, which are @@ -3441,8 +3441,10 @@ * blending of the color glyph layers associated with the glyph index, * using the same bitmap format as embedded color bitmap images. This * is mainly for convenience and works only for glyphs in 'COLR' v0 - * tables (or glyphs in 'COLR' v1 tables that exclusively use v0 - * features). For full control of color layers use + * tables. **There is no rendering support for 'COLR' v1** (with the + * exception of v1 tables that exclusively use v0 features)! You need + * a graphics library like Skia or Cairo to interpret the graphics + * commands stored in v1 tables. For full control of color layers use * @FT_Get_Color_Glyph_Layer and FreeType's color functions like * @FT_Palette_Select instead of setting @FT_LOAD_COLOR for rendering * so that the client application can handle blending by itself. @@ -3895,8 +3897,10 @@ * * This process can cost performance. There is an approximation that * does not need to know about the background color; see - * https://bel.fi/alankila/lcd/ and - * https://bel.fi/alankila/lcd/alpcor.html for details. + * https://web.archive.org/web/20211019204945/https://bel.fi/alankila/lcd/ + * and + * https://web.archive.org/web/20210211002939/https://bel.fi/alankila/lcd/alpcor.html + * for details. * * **ATTENTION**: Linear blending is even more important when dealing * with subpixel-rendered glyphs to prevent color-fringing! A @@ -3993,13 +3997,13 @@ * out of the scope of this API function -- they can be implemented * through format-specific interfaces. * - * Note that, for TrueType fonts only, this can extract data from both - * the 'kern' table and the basic, pair-wise kerning feature from the - * GPOS table (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), though - * FreeType does not support the more advanced GPOS layout features; use - * a library like HarfBuzz for those instead. If a font has both a - * 'kern' table and kern features of a GPOS table, the 'kern' table will - * be used. + * Note that, for TrueType and OpenType fonts only, this can extract data + * from both the 'kern' table and the basic, pair-wise kerning feature + * from the GPOS table (with `TT_CONFIG_OPTION_GPOS_KERNING` enabled), + * though FreeType does not support the more advanced GPOS layout + * features; use a library like HarfBuzz for those instead. If a font + * has both a 'kern' table and kern features of a GPOS table, the 'kern' + * table will be used. * * Also note for right-to-left scripts, the functionality may differ for * fonts with GPOS tables vs. 'kern' tables. For GPOS, right-to-left @@ -4314,14 +4318,13 @@ * property `no-stem-darkening` provided by the 'autofit', 'cff', * 'type1', and 't1cid' modules; see @no-stem-darkening). * - * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding - * to function @FT_Library_SetLcdFilterWeights). - * * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID * 'random' operator, corresponding to the `random-seed` property * provided by the 'cff', 'type1', and 't1cid' modules; see * @random-seed). * + * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (no longer supported). + * * Pass `NULL` as `data` in @FT_Parameter for a given tag to reset the * option and use the library or module default again. * @@ -4348,25 +4351,17 @@ * FT_Bool darken_stems = 1; * * FT_Parameter property2; - * FT_LcdFiveTapFilter custom_weight = - * { 0x11, 0x44, 0x56, 0x44, 0x11 }; - * - * FT_Parameter property3; * FT_Int32 random_seed = 314159265; * - * FT_Parameter properties[3] = { property1, - * property2, - * property3 }; + * FT_Parameter properties[2] = { property1, + * property2 }; * * * property1.tag = FT_PARAM_TAG_STEM_DARKENING; * property1.data = &darken_stems; * - * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; - * property2.data = custom_weight; - * - * property3.tag = FT_PARAM_TAG_RANDOM_SEED; - * property3.data = &random_seed; + * property2.tag = FT_PARAM_TAG_RANDOM_SEED; + * property2.data = &random_seed; * * FT_Face_Properties( face, 3, properties ); * ``` @@ -4377,7 +4372,7 @@ * FT_Parameter property; * * - * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property.tag = FT_PARAM_TAG_STEM_DARKENING; * property.data = NULL; * * FT_Face_Properties( face, 1, &property ); @@ -4530,7 +4525,7 @@ * table description in the OpenType specification for the meaning of the * various flags (which get synthesized for non-OpenType subglyphs). * - * https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description + * https://learn.microsoft.com/typography/opentype/spec/glyf#composite-glyph-description * * @values: * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: @@ -4593,7 +4588,7 @@ * interpreted depending on the flags returned in `*p_flags`. See the * OpenType specification for details. * - * https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description + * https://learn.microsoft.com/typography/opentype/spec/glyf#composite-glyph-description * */ FT_EXPORT( FT_Error ) @@ -4619,7 +4614,7 @@ * associated with a font. * * See - * https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf + * https://adobe-type-tools.github.io/font-tech-notes/pdfs/AcrobatDC_FontPolicies.pdf * for more details. * * @values: @@ -5173,8 +5168,8 @@ * */ #define FREETYPE_MAJOR 2 -#define FREETYPE_MINOR 13 -#define FREETYPE_PATCH 3 +#define FREETYPE_MINOR 14 +#define FREETYPE_PATCH 2 /************************************************************************** diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftadvanc.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftadvanc.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftadvanc.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftadvanc.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Quick computation of advance widths (specification only). * - * Copyright (C) 2008-2024 by + * Copyright (C) 2008-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftbbox.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftbbox.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftbbox.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftbbox.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType exact bbox computation (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftbdf.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -44,7 +44,8 @@ * * @description: * This section contains the declaration of functions specific to BDF and - * PCF fonts. + * PCF fonts. They also work for SFNT bitmap fonts that contain a 'BDF~' + * table like X11's `.otb` fonts. * */ @@ -151,7 +152,9 @@ * FreeType error code. 0~means success. * * @note: - * This function only works with BDF faces, returning an error otherwise. + * This function only works with BDF faces and SFNT fonts that have a + * 'BDF~' table, returning an error otherwise. For the latter, a bitmap + * strike size must be selected first. */ FT_EXPORT( FT_Error ) FT_Get_BDF_Charset_ID( FT_Face face, @@ -165,7 +168,7 @@ * FT_Get_BDF_Property * * @description: - * Retrieve a BDF property from a BDF or PCF font file. + * Retrieve a BDF property from a BDF or PCF font. * * @input: * face :: @@ -196,6 +199,9 @@ * * In case of error, `aproperty->type` is always set to * @BDF_PROPERTY_TYPE_NONE. + * + * This also works with SFNT fonts that have a 'BDF~' table, after a + * bitmap strike size has been selected. */ FT_EXPORT( FT_Error ) FT_Get_BDF_Property( FT_Face face, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftbitmap.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftbitmap.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftbitmap.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftbitmap.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (specification). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftcid.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftcid.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftcid.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftcid.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information (specification). * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * Dereg Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftcolor.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftcolor.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftcolor.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftcolor.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType's glyph color management (specification). * - * Copyright (C) 2018-2024 by + * Copyright (C) 2018-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -317,6 +317,15 @@ * @description: * The functions described here allow access of colored glyph layer data * in OpenType's 'COLR' tables. + * + * Note that FreeType does *not* provide rendering in general of glyphs + * that use a 'COLR' table! While FreeType has very limited rendering + * support for 'COLR' v0 tables (without a possibility to change the + * color palette) via @FT_Render_Glyph, there is no such convenience + * code for 'COLR' v1 tables -- while it appears that v1 is simply an + * 'improved' version of v0, this is not the case: it is a completely + * different color font format, and you need a dedicated graphics + * library like Skia or Cairo to handle a v1 table's drawing commands. */ @@ -359,7 +368,7 @@ * iteratively retrieve the colored glyph layers associated with the * current glyph slot. * - * https://docs.microsoft.com/en-us/typography/opentype/spec/colr + * https://learn.microsoft.com/typography/opentype/spec/colr * * The glyph layer data for a given glyph index, if present, provides an * alternative, multi-color glyph representation: Instead of rendering @@ -1518,7 +1527,7 @@ * * @return: * Value~1 if a clip box is found. If no clip box is found or an error - * occured, value~0 is returned. + * occurred, value~0 is returned. * * @note: * To retrieve the clip box in font units, reset scale to units-per-em @@ -1646,7 +1655,7 @@ * * @return: * Value~1 if everything is OK. Value~0 if no details can be found for - * this paint or any other error occured. + * this paint or any other error occurred. * * @since: * 2.13 diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for controlling driver modules (specification only). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -282,7 +282,7 @@ * minimize hinting techniques that were problematic with the extra * resolution of ClearType; see * http://rastertragedy.com/RTRCh4.htm#Sec1 and - * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx. + * https://learn.microsoft.com/typography/cleartype/truetypecleartype. * This technique is not to be confused with ClearType compatible widths. * ClearType backward compatibility has no direct impact on changing * advance widths, but there might be an indirect impact on disabling @@ -784,7 +784,7 @@ * * Details on subpixel hinting and some of the necessary tweaks can be * found in Greg Hitchcock's whitepaper at - * 'https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. + * 'https://learn.microsoft.com/typography/cleartype/truetypecleartype'. * Note that FreeType currently doesn't really 'subpixel hint' (6x1, 6x2, * or 6x5 supersampling) like discussed in the paper. Depending on the * chosen interpreter, it simply ignores instructions on vertical stems diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fterrdef.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fterrdef.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fterrdef.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fterrdef.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType error codes (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fterrors.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fterrors.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fterrors.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fterrors.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType error code handling (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftfntfmt.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftfntfmt.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftfntfmt.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftfntfmt.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Support functions for font formats. * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Access of TrueType's 'gasp' table (specification). * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftglyph.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftglyph.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftglyph.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftglyph.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftgzip.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftgzip.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftgzip.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftgzip.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Gzip-compressed stream support. * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * FreeType glyph image formats and default raster interface * (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -267,6 +267,10 @@ * *logical* one. For example, if @FT_Pixel_Mode is set to * `FT_PIXEL_MODE_LCD`, the logical width is a just a third of the * physical one. + * + * An empty bitmap with a NULL `buffer` is valid, with `rows` and/or + * `pitch` also set to 0. Such bitmaps might be produced while rendering + * empty or degenerate outlines. */ typedef struct FT_Bitmap_ { @@ -439,7 +443,7 @@ * rasterizer; see the `tags` field in @FT_Outline. * * Please refer to the description of the 'SCANTYPE' instruction in the - * [OpenType specification](https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions#scantype) + * [OpenType specification](https://learn.microsoft.com/typography/opentype/spec/tt_instructions#scantype) * how simple drop-outs, smart drop-outs, and stubs are defined. */ #define FT_OUTLINE_NONE 0x0 @@ -871,7 +875,7 @@ */ typedef struct FT_Span_ { - short x; + unsigned short x; unsigned short len; unsigned char coverage; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftincrem.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftincrem.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftincrem.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftincrem.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType incremental loading (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftlcdfil.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftlcdfil.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftlcdfil.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftlcdfil.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * FreeType API for color filtering of subpixel bitmap glyphs * (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -145,16 +145,10 @@ * * FT_LCD_FILTER_LEGACY :: * FT_LCD_FILTER_LEGACY1 :: - * This filter corresponds to the original libXft color filter. It - * provides high contrast output but can exhibit really bad color - * fringes if glyphs are not extremely well hinted to the pixel grid. - * This filter is only provided for comparison purposes, and might be - * disabled or stay unsupported in the future. The second value is - * provided for compatibility with FontConfig, which historically used - * different enumeration, sometimes incorrectly forwarded to FreeType. + * The legacy libXft color filter is no longer supported and ignored. * * @since: - * 2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2) + * 2.3.0 */ typedef enum FT_LcdFilter_ { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftlist.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftlist.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftlist.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftlist.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Generic list support for FreeType (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftlogging.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftlogging.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftlogging.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftlogging.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Additional debugging APIs. * - * Copyright (C) 2020-2024 by + * Copyright (C) 2020-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmac.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmac.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmac.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmac.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Additional Mac-specific API. * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmm.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmm.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmm.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmm.h 2026-04-17 19:08:13.000000000 +0000 @@ -2,9 +2,9 @@ * * ftmm.h * - * FreeType Multiple Master font interface (specification). + * FreeType variation font interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -37,24 +37,79 @@ * multiple_masters * * @title: - * Multiple Masters + * OpenType Font Variations, TrueType GX, and Adobe MM Fonts * * @abstract: - * How to manage Multiple Masters fonts. + * How to manage variable fonts with multiple design axes. * * @description: - * The following types and functions are used to manage Multiple Master - * fonts, i.e., the selection of specific design instances by setting - * design axis coordinates. + * The following types and functions manage OpenType Font Variations, + * Adobe Multiple Master (MM) fonts, and Apple TrueType GX fonts. These + * formats have in common that they allow the selection of specific + * design instances by setting design coordinates for one or more axes + * like font weight or width. * - * Besides Adobe MM fonts, the interface supports Apple's TrueType GX and - * OpenType variation fonts. Some of the routines only work with Adobe - * MM fonts, others will work with all three types. They are similar - * enough that a consistent interface makes sense. + * For historical reasons there are two interfaces. The first, older one + * can be used with Adobe MM fonts only, and the second, newer one is a + * unified interface that handles all three font formats. However, some + * differences remain and are documented accordingly; in particular, + * Adobe MM fonts don't have named instances (see below). * - * For Adobe MM fonts, macro @FT_IS_SFNT returns false. For GX and - * OpenType variation fonts, it returns true. + * For Adobe MM fonts, macro @FT_IS_SFNT returns false. For TrueType GX + * and OpenType Font Variations, it returns true. * + * We use mostly the terminology of the OpenType standard. Here are some + * important technical terms. + * + * * A 'named instance' is a tuple of design coordinates that has a + * string ID (i.e., an index into the font's 'name' table) associated + * with it. The font can tell the user that, for example, + * [Weight=700,Width=110] is 'Bold'. Another name for 'named instance' + * is 'named style'. + * + * Adobe MM fonts don't have named instances. + * + * * The 'default instance' of a variation font is that instance for + * which the nth axis coordinate is equal to the nth default axis + * coordinate (i.e., `axis[n].def` as specified in the @FT_MM_Var + * structure), with~n covering all axes. In TrueType GX and OpenType + * Font Variations, the default instance is explicitly given. In Adobe + * MM fonts, the `WeightVector` entry as found in the font file is + * taken as the default instance. + * + * For TrueType GX and OpenType Font Variations, FreeType synthesizes + * a named instance for the default instance if the font does not + * contain such an entry. + * + * * 'Design coordinates' are the axis values found in a variation font + * file. Their meaning is specified by the font designer and the + * values are rather arbitrary. + * + * For example, the 'weight' axis in design coordinates might vary + * between 100 (thin) and 900 (heavy) in font~A, while font~B + * contains values between 400 (normal) and 800 (extra bold). + * + * * 'Normalized coordinates' are design coordinates mapped to a standard + * range; they are also called 'blend coordinates'. + * + * For TrueType GX and OpenType Font Variations, the range is [-1;1], + * with the minimum mapped to value~-1, the default mapped to + * value~0, and the maximum mapped to value~1, and all other + * coordinates mapped to intervening points. Please look up the + * [OpenType + * specification](https://learn.microsoft.com/en-us/typography/opentype/spec/otvaroverview) + * on how this mapping works in detail. + * + * For Adobe MM fonts, this standard range is [0;1], with the minimum + * mapped to value~0 and the maximum mapped to value~1, and all other + * coordinates mapped to intervening points. Please look up [Adobe + * TechNote + * #5015](https://adobe-type-tools.github.io/font-tech-notes/pdfs/5015.Type1_Supp.pdf) + * on how this mapping works in detail. + * + * Assuming that the two fonts in the previous example are OpenType + * Font Variations, both font~A's [100;900] and font~B's [400;800] + * coordinate ranges get mapped to [-1;1]. */ @@ -64,14 +119,14 @@ * T1_MAX_MM_XXX * * @description: - * Multiple Masters limits as defined in their specifications. + * Adobe MM font limits as defined in their specifications. * * @values: * T1_MAX_MM_AXIS :: - * The maximum number of Multiple Masters axes. + * The maximum number of Adobe MM font axes. * * T1_MAX_MM_DESIGNS :: - * The maximum number of Multiple Masters designs. + * The maximum number of Adobe MM font designs. * * T1_MAX_MM_MAP_POINTS :: * The maximum number of elements in a design map. @@ -88,11 +143,10 @@ * FT_MM_Axis * * @description: - * A structure to model a given axis in design space for Multiple Masters - * fonts. + * A structure to model a given axis in design space for Adobe MM fonts. * - * This structure can't be used for TrueType GX or OpenType variation - * fonts. + * This structure can't be used with TrueType GX or OpenType Font + * Variations. * * @fields: * name :: @@ -119,17 +173,17 @@ * FT_Multi_Master * * @description: - * A structure to model the axes and space of a Multiple Masters font. + * A structure to model the axes and space of an Adobe MM font. * - * This structure can't be used for TrueType GX or OpenType variation - * fonts. + * This structure can't be used with TrueType GX or OpenType Font + * Variations. * * @fields: * num_axis :: * Number of axes. Cannot exceed~4. * * num_designs :: - * Number of designs; should be normally 2^num_axis even though the + * Number of designs; should be normally `2^num_axis` even though the * Type~1 specification strangely allows for intermediate designs to be * present. This number cannot exceed~16. * @@ -151,13 +205,13 @@ * FT_Var_Axis * * @description: - * A structure to model a given axis in design space for Multiple - * Masters, TrueType GX, and OpenType variation fonts. + * A structure to model a given axis in design space for Adobe MM fonts, + * TrueType GX, and OpenType Font Variations. * * @fields: * name :: * The axis's name. Not always meaningful for TrueType GX or OpenType - * variation fonts. + * Font Variations. * * minimum :: * The axis's minimum design coordinate. @@ -171,17 +225,17 @@ * * tag :: * The axis's tag (the equivalent to 'name' for TrueType GX and - * OpenType variation fonts). FreeType provides default values for + * OpenType Font Variations). FreeType provides default values for * Adobe MM fonts if possible. * * strid :: * The axis name entry in the font's 'name' table. This is another * (and often better) version of the 'name' field for TrueType GX or - * OpenType variation fonts. Not meaningful for Adobe MM fonts. + * OpenType Font Variations. Not meaningful for Adobe MM fonts. * * @note: * The fields `minimum`, `def`, and `maximum` are 16.16 fractional values - * for TrueType GX and OpenType variation fonts. For Adobe MM fonts, the + * for TrueType GX and OpenType Font Variations. For Adobe MM fonts, the * values are whole numbers (i.e., the fractional part is zero). */ typedef struct FT_Var_Axis_ @@ -205,7 +259,7 @@ * * @description: * A structure to model a named instance in a TrueType GX or OpenType - * variation font. + * Font Variations. * * This structure can't be used for Adobe MM fonts. * @@ -215,11 +269,11 @@ * entry for each axis. * * strid :: - * The entry in 'name' table identifying this instance. + * An index into the 'name' table identifying this instance. * * psid :: - * The entry in 'name' table identifying a PostScript name for this - * instance. Value 0xFFFF indicates a missing entry. + * An index into the 'name' table identifying a PostScript name for + * this instance. Value 0xFFFF indicates a missing entry. */ typedef struct FT_Var_Named_Style_ { @@ -236,39 +290,33 @@ * FT_MM_Var * * @description: - * A structure to model the axes and space of an Adobe MM, TrueType GX, - * or OpenType variation font. + * A structure to model the axes and space of Adobe MM fonts, TrueType + * GX, or OpenType Font Variations. * * Some fields are specific to one format and not to the others. * * @fields: * num_axis :: * The number of axes. The maximum value is~4 for Adobe MM fonts; no - * limit in TrueType GX or OpenType variation fonts. + * limit in TrueType GX or OpenType Font Variations. * * num_designs :: - * The number of designs; should be normally 2^num_axis for Adobe MM - * fonts. Not meaningful for TrueType GX or OpenType variation fonts + * The number of designs; should be normally `2^num_axis` for Adobe MM + * fonts. Not meaningful for TrueType GX or OpenType Font Variations * (where every glyph could have a different number of designs). * * num_namedstyles :: - * The number of named styles; a 'named style' is a tuple of design - * coordinates that has a string ID (in the 'name' table) associated - * with it. The font can tell the user that, for example, - * [Weight=1.5,Width=1.1] is 'Bold'. Another name for 'named style' is - * 'named instance'. - * - * For Adobe Multiple Masters fonts, this value is always zero because - * the format does not support named styles. + * The number of named instances. For Adobe MM fonts, this value is + * always zero. * * axis :: - * An axis descriptor table. TrueType GX and OpenType variation fonts + * An axis descriptor table. TrueType GX and OpenType Font Variations * contain slightly more data than Adobe MM fonts. Memory management * of this pointer is done internally by FreeType. * * namedstyle :: - * A named style (instance) table. Only meaningful for TrueType GX and - * OpenType variation fonts. Memory management of this pointer is done + * An array of named instances. Only meaningful for TrueType GX and + * OpenType Font Variations. Memory management of this pointer is done * internally by FreeType. */ typedef struct FT_MM_Var_ @@ -290,8 +338,8 @@ * @description: * Retrieve a variation descriptor of a given Adobe MM font. * - * This function can't be used with TrueType GX or OpenType variation - * fonts. + * This function can't be used with TrueType GX or OpenType Font + * Variations. * * @input: * face :: @@ -299,7 +347,7 @@ * * @output: * amaster :: - * The Multiple Masters descriptor. + * The Adobe MM font's variation descriptor. * * @return: * FreeType error code. 0~means success. @@ -366,8 +414,8 @@ * For Adobe MM fonts, choose an interpolated font design through design * coordinates. * - * This function can't be used with TrueType GX or OpenType variation - * fonts. + * This function can't be used with TrueType GX or OpenType Font + * Variations. * * @inout: * face :: @@ -391,8 +439,8 @@ * * [Since 2.9] If `num_coords` is larger than zero, this function sets * the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field - * (i.e., @FT_IS_VARIATION will return true). If `num_coords` is zero, - * this bit flag gets unset. + * (i.e., @FT_IS_VARIATION returns true). If `num_coords` is zero, this + * bit flag gets unset. */ FT_EXPORT( FT_Error ) FT_Set_MM_Design_Coordinates( FT_Face face, @@ -428,7 +476,7 @@ * * @note: * The design coordinates are 16.16 fractional values for TrueType GX and - * OpenType variation fonts. For Adobe MM fonts, the values are supposed + * OpenType Font Variations. For Adobe MM fonts, the values are supposed * to be whole numbers (i.e., the fractional part is zero). * * [Since 2.8.1] To reset all axes to the default values, call the @@ -438,8 +486,14 @@ * * [Since 2.9] If `num_coords` is larger than zero, this function sets * the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field - * (i.e., @FT_IS_VARIATION will return true). If `num_coords` is zero, - * this bit flag gets unset. + * (i.e., @FT_IS_VARIATION returns true). If `num_coords` is zero, this + * bit flag gets unset. + * + * [Since 2.14] This function also sets the @FT_FACE_FLAG_VARIATION bit + * in @FT_Face's `face_flags` field (i.e., @FT_IS_VARIATION returns + * true) if any of the provided coordinates is different from the face's + * default value for the corresponding axis, that is, the set up face is + * not at its default position. */ FT_EXPORT( FT_Error ) FT_Set_Var_Design_Coordinates( FT_Face face, @@ -468,14 +522,14 @@ * * @output: * coords :: - * The design coordinates array. + * The design coordinates array, which must be allocated by the user. * * @return: * FreeType error code. 0~means success. * * @note: * The design coordinates are 16.16 fractional values for TrueType GX and - * OpenType variation fonts. For Adobe MM fonts, the values are whole + * OpenType Font Variations. For Adobe MM fonts, the values are whole * numbers (i.e., the fractional part is zero). * * @since: @@ -493,8 +547,7 @@ * FT_Set_MM_Blend_Coordinates * * @description: - * Choose an interpolated font design through normalized blend - * coordinates. + * Choose an interpolated font design through normalized coordinates. * * This function works with all supported variation formats. * @@ -509,9 +562,10 @@ * the number of axes, use default values for the remaining axes. * * coords :: - * The design coordinates array. Each element is a 16.16 fractional - * value and must be between 0 and 1.0 for Adobe MM fonts, and between - * -1.0 and 1.0 for TrueType GX and OpenType variation fonts. + * The normalized coordinates array. Each element is a 16.16 + * fractional value and must be between 0 and 1.0 for Adobe MM fonts, + * and between -1.0 and 1.0 for TrueType GX and OpenType Font + * Variations. * * @return: * FreeType error code. 0~means success. @@ -524,8 +578,14 @@ * * [Since 2.9] If `num_coords` is larger than zero, this function sets * the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field - * (i.e., @FT_IS_VARIATION will return true). If `num_coords` is zero, - * this bit flag gets unset. + * (i.e., @FT_IS_VARIATION returns true). If `num_coords` is zero, this + * bit flag gets unset. + * + * [Since 2.14] This function also sets the @FT_FACE_FLAG_VARIATION bit + * in @FT_Face's `face_flags` field (i.e., @FT_IS_VARIATION returns + * true) if any of the provided coordinates is different from the face's + * default value for the corresponding axis, that is, the set up face is + * not at its default position. */ FT_EXPORT( FT_Error ) FT_Set_MM_Blend_Coordinates( FT_Face face, @@ -539,8 +599,8 @@ * FT_Get_MM_Blend_Coordinates * * @description: - * Get the normalized blend coordinates of the currently selected - * interpolated font. + * Get the normalized coordinates of the currently selected interpolated + * font. * * This function works with all supported variation formats. * @@ -549,14 +609,14 @@ * A handle to the source face. * * num_coords :: - * The number of normalized blend coordinates to retrieve. If it is - * larger than the number of axes, set the excess values to~0.5 for - * Adobe MM fonts, and to~0 for TrueType GX and OpenType variation - * fonts. + * The number of normalized coordinates to retrieve. If it is larger + * than the number of axes, set the excess values to~0.5 for Adobe MM + * fonts, and to~0 for TrueType GX and OpenType Font Variations. * * @output: * coords :: - * The normalized blend coordinates array (as 16.16 fractional values). + * The normalized coordinates array (as 16.16 fractional values), which + * must be allocated by the user. * * @return: * FreeType error code. 0~means success. @@ -610,8 +670,8 @@ * For Adobe MM fonts, choose an interpolated font design by directly * setting the weight vector. * - * This function can't be used with TrueType GX or OpenType variation - * fonts. + * This function can't be used with TrueType GX or OpenType Font + * Variations. * * @inout: * face :: @@ -630,16 +690,16 @@ * FreeType error code. 0~means success. * * @note: - * Adobe Multiple Master fonts limit the number of designs, and thus the - * length of the weight vector to 16~elements. + * Adobe MM fonts limit the number of designs, and thus the length of the + * weight vector, to 16~elements. * * If `len` is larger than zero, this function sets the * @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field (i.e., - * @FT_IS_VARIATION will return true). If `len` is zero, this bit flag - * is unset and the weight vector array is reset to the default values. + * @FT_IS_VARIATION returns true). If `len` is zero, this bit flag is + * unset and the weight vector array is reset to the default values. * * The Adobe documentation also states that the values in the - * WeightVector array must total 1.0 +/-~0.001. In practice this does + * `WeightVector` array must total 1.0 +/-~0.001. In practice this does * not seem to be enforced, so is not enforced here, either. * * @since: @@ -659,8 +719,8 @@ * @description: * For Adobe MM fonts, retrieve the current weight vector of the font. * - * This function can't be used with TrueType GX or OpenType variation - * fonts. + * This function can't be used with TrueType GX or OpenType Font + * Variations. * * @inout: * face :: @@ -677,14 +737,14 @@ * * @output: * weightvector :: - * An array to be filled. + * An array to be filled; it must be allocated by the user. * * @return: * FreeType error code. 0~means success. * * @note: - * Adobe Multiple Master fonts limit the number of designs, and thus the - * length of the WeightVector to~16. + * Adobe MM fonts limit the number of designs, and thus the length of the + * weight vector, to~16 elements. * * @since: * 2.10 @@ -760,8 +820,8 @@ * A handle to the source face. * * instance_index :: - * The index of the requested instance, starting with value 1. If set - * to value 0, FreeType switches to font access without a named + * The index of the requested instance, starting with value~1. If set + * to value~0, FreeType switches to font access without a named * instance. * * @return: @@ -771,11 +831,11 @@ * The function uses the value of `instance_index` to set bits 16-30 of * the face's `face_index` field. It also resets any variation applied * to the font, and the @FT_FACE_FLAG_VARIATION bit of the face's - * `face_flags` field gets reset to zero (i.e., @FT_IS_VARIATION will - * return false). + * `face_flags` field gets reset to zero (i.e., @FT_IS_VARIATION returns + * false). * - * For Adobe MM fonts (which don't have named instances) this function - * simply resets the current face to the default instance. + * For Adobe MM fonts, this function resets the current face to the + * default instance. * * @since: * 2.9 @@ -794,10 +854,6 @@ * Retrieve the index of the default named instance, to be used with * @FT_Set_Named_Instance. * - * The default instance of a variation font is that instance for which - * the nth axis coordinate is equal to `axis[n].def` (as specified in the - * @FT_MM_Var structure), with~n covering all axes. - * * FreeType synthesizes a named instance for the default instance if the * font does not contain such an entry. * @@ -813,8 +869,8 @@ * FreeType error code. 0~means success. * * @note: - * For Adobe MM fonts (which don't have named instances) this function - * always returns zero for `instance_index`. + * For Adobe MM fonts, this function always returns zero for + * `instance_index`. * * @since: * 2.13.1 diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType modules public interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmoderr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmoderr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftmoderr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftmoderr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType module error offsets (specification). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftoutln.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftoutln.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftoutln.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftoutln.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Support for the FT_Outline type used to store glyph shapes of * most scalable font formats (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftparams.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for possible FT_Parameter tags (specification only). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -133,11 +133,8 @@ * FT_PARAM_TAG_LCD_FILTER_WEIGHTS * * @description: - * An @FT_Parameter tag to be used with @FT_Face_Properties. The - * corresponding argument specifies the five LCD filter weights for a - * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding the - * global default values or the values set up with - * @FT_Library_SetLcdFilterWeights. + * Overriding global LCD filter weights with custom values for a given + * face is no longer supported and ignored. * * @since: * 2.8 diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftrender.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftrender.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftrender.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftrender.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType renderer modules public interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsizes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsizes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsizes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsizes.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType size objects management (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsnames.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsnames.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsnames.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsnames.h 2026-04-17 19:08:13.000000000 +0000 @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftstroke.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftstroke.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftstroke.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftstroke.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType path stroker (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsynth.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsynth.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsynth.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsynth.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * FreeType synthesizing code for emboldening and slanting * (specification). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsystem.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsystem.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ftsystem.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ftsystem.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType low-level system interface definition (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fttrigon.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fttrigon.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fttrigon.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fttrigon.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (specification). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fttypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fttypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/fttypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/fttypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType simple types definitions (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/autohint.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/autohint.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/autohint.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/autohint.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level 'autohint' module-specific interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/cffotypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/cffotypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/cffotypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/cffotypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Basic OpenType/CFF object type definitions (specification). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/cfftypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/cfftypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/cfftypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/cfftypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Basic OpenType/CFF type definitions and interface (specification * only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -191,8 +191,8 @@ FT_UInt weight; FT_Bool is_fixed_pitch; FT_Fixed italic_angle; - FT_Fixed underline_position; - FT_Fixed underline_thickness; + FT_Short underline_position; + FT_UShort underline_thickness; FT_Int paint_type; FT_Int charstring_type; FT_Matrix font_matrix; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/compiler-macros.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/compiler-macros.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/compiler-macros.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/compiler-macros.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Compiler-specific macro definitions used internally by FreeType. * - * Copyright (C) 2020-2024 by + * Copyright (C) 2020-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -128,8 +128,8 @@ * before a function declaration. */ - /* Visual C, mingw */ -#if defined( _WIN32 ) + /* Visual C, MinGW, Cygwin */ +#if defined( _WIN32 ) || defined( __CYGWIN__ ) #define FT_INTERNAL_FUNCTION_ATTRIBUTE /* empty */ /* gcc, clang */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftcalc.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftcalc.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftcalc.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftcalc.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Arithmetic computations (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -27,17 +27,87 @@ FT_BEGIN_HEADER + /* + * The following macros have two purposes. + * + * - Tag places where overflow is expected and harmless. + * + * - Avoid run-time undefined behavior sanitizer errors. + * + * Use with care! + */ +#define ADD_INT( a, b ) \ + (FT_Int)( (FT_UInt)(a) + (FT_UInt)(b) ) +#define SUB_INT( a, b ) \ + (FT_Int)( (FT_UInt)(a) - (FT_UInt)(b) ) +#define MUL_INT( a, b ) \ + (FT_Int)( (FT_UInt)(a) * (FT_UInt)(b) ) +#define NEG_INT( a ) \ + (FT_Int)( (FT_UInt)0 - (FT_UInt)(a) ) + +#define ADD_LONG( a, b ) \ + (FT_Long)( (FT_ULong)(a) + (FT_ULong)(b) ) +#define SUB_LONG( a, b ) \ + (FT_Long)( (FT_ULong)(a) - (FT_ULong)(b) ) +#define MUL_LONG( a, b ) \ + (FT_Long)( (FT_ULong)(a) * (FT_ULong)(b) ) +#define NEG_LONG( a ) \ + (FT_Long)( (FT_ULong)0 - (FT_ULong)(a) ) + +#define ADD_INT32( a, b ) \ + (FT_Int32)( (FT_UInt32)(a) + (FT_UInt32)(b) ) +#define SUB_INT32( a, b ) \ + (FT_Int32)( (FT_UInt32)(a) - (FT_UInt32)(b) ) +#define MUL_INT32( a, b ) \ + (FT_Int32)( (FT_UInt32)(a) * (FT_UInt32)(b) ) +#define NEG_INT32( a ) \ + (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) ) + +#ifdef FT_INT64 + +#define ADD_INT64( a, b ) \ + (FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) ) +#define SUB_INT64( a, b ) \ + (FT_Int64)( (FT_UInt64)(a) - (FT_UInt64)(b) ) +#define MUL_INT64( a, b ) \ + (FT_Int64)( (FT_UInt64)(a) * (FT_UInt64)(b) ) +#define NEG_INT64( a ) \ + (FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) ) + +#endif /* FT_INT64 */ + + /************************************************************************** * * FT_MulDiv() and FT_MulFix() are declared in freetype.h. * */ -#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER - /* Provide assembler fragments for performance-critical functions. */ - /* These must be defined `static __inline__' with GCC. */ +#ifdef FT_CONFIG_OPTION_INLINE_MULFIX -#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ +#ifdef FT_INT64 + + static inline FT_Long + FT_MulFix_64( FT_Long a, + FT_Long b ) + { + FT_Int64 ab = MUL_INT64( a, b ); + + + ab = ADD_INT64( ab, 0x8000 + ( ab >> 63 ) ); /* rounding phase */ + + return (FT_Long)( ab >> 16 ); + } + + +#define FT_MulFix( a, b ) FT_MulFix_64( a, b ) + +#elif !defined( FT_CONFIG_OPTION_NO_ASSEMBLER ) + /* Provide 32-bit assembler fragments for optimized FT_MulFix. */ + /* These must be defined `static __inline__' or similar. */ + +#if defined( __arm__ ) && \ + ( defined( __thumb2__ ) || !defined( __thumb__ ) ) #define FT_MULFIX_ASSEMBLER FT_MulFix_arm @@ -49,6 +119,7 @@ { FT_Int32 t, t2; +#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ __asm { @@ -60,28 +131,8 @@ mov a, t2, lsr #16 /* a = t2 >> 16 */ orr a, a, t, lsl #16 /* a |= t << 16 */ } - return a; - } - -#endif /* __CC_ARM || __ARMCC__ */ - - -#ifdef __GNUC__ - -#if defined( __arm__ ) && \ - ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ - !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) - -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - FT_Int32 t, t2; +#elif defined( __GNUC__ ) __asm__ __volatile__ ( "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ @@ -98,26 +149,25 @@ : "=r"(a), "=&r"(t2), "=&r"(t) : "r"(a), "r"(b) : "cc" ); - return a; - } -#endif /* __arm__ && */ - /* ( __thumb2__ || !__thumb__ ) && */ - /* !( __CC_ARM || __ARMCC__ ) */ +#endif + return a; + } -#if defined( __i386__ ) +#elif defined( __i386__ ) || defined( _M_IX86 ) #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 /* documentation is in freetype.h */ - static __inline__ FT_Int32 + static __inline FT_Int32 FT_MulFix_i386( FT_Int32 a, FT_Int32 b ) { FT_Int32 result; +#if defined( __GNUC__ ) __asm__ __volatile__ ( "imul %%edx\n" @@ -132,27 +182,8 @@ : "=a"(result), "=d"(b) : "a"(a), "d"(b) : "%ecx", "cc" ); - return result; - } - -#endif /* i386 */ - -#endif /* __GNUC__ */ - - -#ifdef _MSC_VER /* Visual C++ */ -#ifdef _M_IX86 - -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - FT_Int32 result; +#elif defined( _MSC_VER ) __asm { @@ -169,81 +200,21 @@ add eax, edx mov result, eax } - return result; - } - -#endif /* _M_IX86 */ -#endif /* _MSC_VER */ - - -#if defined( __GNUC__ ) && defined( __x86_64__ ) - -#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 - - static __inline__ FT_Int32 - FT_MulFix_x86_64( FT_Int32 a, - FT_Int32 b ) - { - /* Temporarily disable the warning that C90 doesn't support */ - /* `long long'. */ -#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wlong-long" #endif -#if 1 - /* Technically not an assembly fragment, but GCC does a really good */ - /* job at inlining it and generating good machine code for it. */ - long long ret, tmp; - - - ret = (long long)a * b; - tmp = ret >> 63; - ret += 0x8000 + tmp; - - return (FT_Int32)( ret >> 16 ); -#else - - /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ - /* code from the lines below. The main issue is that `wide_a' is not */ - /* properly initialized by sign-extending `a'. Instead, the generated */ - /* machine code assumes that the register that contains `a' on input */ - /* can be used directly as a 64-bit value, which is wrong most of the */ - /* time. */ - long long wide_a = (long long)a; - long long wide_b = (long long)b; - long long result; - - - __asm__ __volatile__ ( - "imul %2, %1\n" - "mov %1, %0\n" - "sar $63, %0\n" - "lea 0x8000(%1, %0), %0\n" - "sar $16, %0\n" - : "=&r"(result), "=&r"(wide_a) - : "r"(wide_b) - : "cc" ); - - return (FT_Int32)result; -#endif - -#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) -#pragma GCC diagnostic pop -#endif + return result; } -#endif /* __GNUC__ && __x86_64__ */ - -#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ - +#endif /* __i386__ || _M_IX86 */ -#ifdef FT_CONFIG_OPTION_INLINE_MULFIX #ifdef FT_MULFIX_ASSEMBLER #define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) ) #endif -#endif + +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ + +#endif /* FT_CONFIG_OPTION_INLINE_MULFIX */ /************************************************************************** @@ -278,40 +249,6 @@ FT_Long c ); - /************************************************************************** - * - * @function: - * FT_MulAddFix - * - * @description: - * Compute `(s[0] * f[0] + s[1] * f[1] + ...) / 0x10000`, where `s[n]` is - * usually a 16.16 scalar. - * - * @input: - * s :: - * The array of scalars. - * f :: - * The array of factors. - * count :: - * The number of entries in the array. - * - * @return: - * The result of `(s[0] * f[0] + s[1] * f[1] + ...) / 0x10000`. - * - * @note: - * This function is currently used for the scaled delta computation of - * variation stores. It internally uses 64-bit data types when - * available, otherwise it emulates 64-bit math by using 32-bit - * operations, which produce a correct result but most likely at a slower - * performance in comparison to the implementation base on `int64_t`. - * - */ - FT_BASE( FT_Int32 ) - FT_MulAddFix( FT_Fixed* s, - FT_Int32* f, - FT_UInt count ); - - /* * A variant of FT_Matrix_Multiply which scales its result afterwards. The * idea is that both `a' and `b' are scaled by factors of 10 so that the @@ -455,6 +392,10 @@ #define FT_MSB( x ) FT_MSB_i386( x ) +#elif defined( __CC_ARM ) + +#define FT_MSB( x ) ( 31 - __clz( x ) ) + #elif defined( __SunOS_5_11 ) #include <string.h> @@ -526,55 +467,6 @@ #define ROUND_F26DOT6( x ) ( ( (x) + 32 - ( x < 0 ) ) & -64 ) - /* - * The following macros have two purposes. - * - * - Tag places where overflow is expected and harmless. - * - * - Avoid run-time sanitizer errors. - * - * Use with care! - */ -#define ADD_INT( a, b ) \ - (FT_Int)( (FT_UInt)(a) + (FT_UInt)(b) ) -#define SUB_INT( a, b ) \ - (FT_Int)( (FT_UInt)(a) - (FT_UInt)(b) ) -#define MUL_INT( a, b ) \ - (FT_Int)( (FT_UInt)(a) * (FT_UInt)(b) ) -#define NEG_INT( a ) \ - (FT_Int)( (FT_UInt)0 - (FT_UInt)(a) ) - -#define ADD_LONG( a, b ) \ - (FT_Long)( (FT_ULong)(a) + (FT_ULong)(b) ) -#define SUB_LONG( a, b ) \ - (FT_Long)( (FT_ULong)(a) - (FT_ULong)(b) ) -#define MUL_LONG( a, b ) \ - (FT_Long)( (FT_ULong)(a) * (FT_ULong)(b) ) -#define NEG_LONG( a ) \ - (FT_Long)( (FT_ULong)0 - (FT_ULong)(a) ) - -#define ADD_INT32( a, b ) \ - (FT_Int32)( (FT_UInt32)(a) + (FT_UInt32)(b) ) -#define SUB_INT32( a, b ) \ - (FT_Int32)( (FT_UInt32)(a) - (FT_UInt32)(b) ) -#define MUL_INT32( a, b ) \ - (FT_Int32)( (FT_UInt32)(a) * (FT_UInt32)(b) ) -#define NEG_INT32( a ) \ - (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) ) - -#ifdef FT_INT64 - -#define ADD_INT64( a, b ) \ - (FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) ) -#define SUB_INT64( a, b ) \ - (FT_Int64)( (FT_UInt64)(a) - (FT_UInt64)(b) ) -#define MUL_INT64( a, b ) \ - (FT_Int64)( (FT_UInt64)(a) * (FT_UInt64)(b) ) -#define NEG_INT64( a ) \ - (FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) ) - -#endif /* FT_INT64 */ - FT_END_HEADER diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdebug.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdebug.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdebug.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdebug.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Debugging and logging component (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdrv.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdrv.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdrv.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftdrv.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType internal font driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftgloadr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftgloadr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftgloadr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftgloadr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph loader (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/fthash.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/fthash.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/fthash.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/fthash.h 2026-04-17 19:08:13.000000000 +0000 @@ -117,6 +117,18 @@ FT_Hash hash, FT_Memory memory ); + FT_Error + ft_hash_str_insert_no_overwrite( const char* key, + size_t data, + FT_Hash hash, + FT_Memory memory ); + + FT_Error + ft_hash_num_insert_no_overwrite( FT_Int num, + size_t data, + FT_Hash hash, + FT_Memory memory ); + size_t* ft_hash_str_lookup( const char* key, FT_Hash hash ); @@ -125,6 +137,17 @@ ft_hash_num_lookup( FT_Int num, FT_Hash hash ); + FT_Bool + ft_hash_num_iterator( FT_UInt *idx, + FT_Int *key, + size_t *value, + FT_Hash hash ); + + FT_Bool + ft_hash_str_iterator( FT_UInt *idx, + const char* *key, + size_t *value, + FT_Hash hash ); FT_END_HEADER diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmemory.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmemory.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmemory.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmemory.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType memory management macros (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmmtypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmmtypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmmtypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftmmtypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * OpenType Variations type definitions for internal use * with the multi-masters service (specification). * - * Copyright (C) 2022-2024 by + * Copyright (C) 2022-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and * Dominik Röttsches. * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType private base classes (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -275,6 +275,28 @@ FT_GlyphSlot slot, FT_Render_Mode mode ); + + /************************************************************************** + * + * @Function: + * find_unicode_charmap + * + * @Description: + * This function finds a Unicode charmap, if there is one. And if there + * is more than one, it tries to favour the more extensive one, i.e., one + * that supports UCS-4 against those which are limited to the BMP (UCS-2 + * encoding.) + * + * If a unicode charmap is found, `face->charmap` is set to it. + * + * This function is called from `open_face`, from `FT_Select_Charmap(..., + * FT_ENCODING_UNICODE)`, and also from `afadjust.c` in the 'autofit' + * module. + */ + FT_BASE( FT_Error ) + find_unicode_charmap( FT_Face face ); + + #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, @@ -343,11 +365,6 @@ * Value~0 means to use the font's value. Value~-1 means to use the * CFF driver's default. * - * lcd_weights :: - * lcd_filter_func :: - * These fields specify the LCD filtering weights and callback function - * for ClearType-style subpixel rendering. - * * refcount :: * A counter initialized to~1 at the time an @FT_Face structure is * created. @FT_Reference_Face increments this counter, and @@ -369,11 +386,6 @@ FT_Char no_stem_darkening; FT_Int32 random_seed; -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */ - FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ -#endif - FT_Int refcount; } FT_Face_InternalRec; @@ -498,9 +510,9 @@ */ typedef struct FT_ModuleRec_ { - FT_Module_Class* clazz; - FT_Library library; - FT_Memory memory; + const FT_Module_Class* clazz; + FT_Library library; + FT_Memory memory; } FT_ModuleRec; @@ -702,9 +714,9 @@ const FT_Vector* origin ); /* Allocate a new bitmap buffer in a glyph slot. */ + /* Dimensions must be preset in advance. */ FT_BASE( FT_Error ) - ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, - FT_ULong size ); + ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot ); /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */ @@ -867,10 +879,6 @@ * lcd_weights :: * The LCD filter weights for ClearType-style subpixel rendering. * - * lcd_filter_func :: - * The LCD filtering callback function for for ClearType-style subpixel - * rendering. - * * lcd_geometry :: * This array specifies LCD subpixel geometry and controls Harmony LCD * rendering technique, alternative to ClearType. @@ -904,7 +912,6 @@ #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */ - FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ #else FT_Vector lcd_geometry[3]; /* RGB subpixel positions */ #endif @@ -973,17 +980,6 @@ #endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ - /* Define default raster's interface. The default raster is located in */ - /* `src/base/ftraster.c'. */ - /* */ - /* Client applications can register new rasters through the */ - /* FT_Set_Raster() API. */ - -#ifndef FT_NO_DEFAULT_RASTER - FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; -#endif - - /************************************************************************** * * @macro: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpsprop.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpsprop.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpsprop.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftpsprop.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Get and set properties of PostScript drivers (specification). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftrfork.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftrfork.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftrfork.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftrfork.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (specification). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * Masatake YAMATO and Redhat K.K. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftserv.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftserv.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftserv.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftserv.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType services (specification only). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftstream.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftstream.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftstream.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftstream.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Stream handling (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Tracing handling (specification only). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -19,7 +19,7 @@ /* definitions of trace levels for FreeType 2 */ /* the maximum string length (if the argument to `FT_TRACE_DEF` */ - /* gets used as a string) plus one charachter for ':' plus */ + /* gets used as a string) plus one character for ':' plus */ /* another one for the trace level */ #define FT_MAX_TRACE_LEVEL_LENGTH (9 + 1 + 1) @@ -159,6 +159,7 @@ FT_TRACE_DEF( gxvtrak ) /* autofit components */ +FT_TRACE_DEF( afadjust ) FT_TRACE_DEF( afcjk ) FT_TRACE_DEF( afglobal ) FT_TRACE_DEF( afhints ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType validation support (specification). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/psaux.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/psaux.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/psaux.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/psaux.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Auxiliary functions and data structures related to PostScript fonts * (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/pshints.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/pshints.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/pshints.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/pshints.h 2026-04-17 19:08:13.000000000 +0000 @@ -6,7 +6,7 @@ * recorders (specification only). These are used to support native * T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers. * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svbdf.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svbdf.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svbdf.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svbdf.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType BDF services (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcfftl.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcfftl.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcfftl.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcfftl.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType CFF tables loader service (specification). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcid.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcid.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcid.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svcid.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType CID font services (specification). * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svfntfmt.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svfntfmt.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svfntfmt.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svfntfmt.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType font format service (specification only). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgldict.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgldict.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgldict.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgldict.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph dictionary services (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgxval.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgxval.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgxval.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgxval.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svkern.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svkern.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svkern.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svkern.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType Kerning service (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmetric.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmetric.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmetric.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmetric.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType services for metrics variations (specification). * - * Copyright (C) 2016-2024 by + * Copyright (C) 2016-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -77,7 +77,7 @@ typedef void (*FT_Metrics_Adjust_Func)( FT_Face face ); - typedef FT_Error + typedef void (*FT_Size_Reset_Func)( FT_Size size ); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svmm.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType Multiple Masters and GX var services (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svotval.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svotval.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svotval.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svotval.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType OpenType validation service (specification). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpfr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpfr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpfr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpfr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Internal PFR service functions (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpostnm.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpostnm.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpostnm.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpostnm.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType PostScript name services (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svprop.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svprop.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svprop.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svprop.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType property service (specification). * - * Copyright (C) 2012-2024 by + * Copyright (C) 2012-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpscmap.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpscmap.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpscmap.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpscmap.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType PostScript charmap service (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpsinfo.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpsinfo.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpsinfo.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svpsinfo.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType PostScript info service (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svsfnt.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svsfnt.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svsfnt.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svsfnt.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType SFNT table loading service (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttcmap.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttcmap.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttcmap.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttcmap.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType TrueType/sfnt cmap extra information service. * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * Masatake YAMATO, Redhat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svtteng.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svtteng.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svtteng.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svtteng.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType TrueType engine query service (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttglyf.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttglyf.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttglyf.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svttglyf.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType TrueType glyph service. * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svwinfnt.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svwinfnt.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svwinfnt.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svwinfnt.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType Windows FNT/FONT service (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level 'sfnt' driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -612,7 +612,7 @@ * * @return: * Value~1 if a ClipBox is found. If no clip box is found or an - * error occured, value~0 is returned. + * error occurred, value~0 is returned. */ typedef FT_Bool ( *TT_Get_Color_Glyph_ClipBox_Func )( TT_Face face, @@ -707,7 +707,7 @@ * * @return: * Value~1 if everything is OK. Value~0 if no details can be found for - * this paint or any other error occured. + * this paint or any other error occurred. */ typedef FT_Bool ( *TT_Get_Paint_Func )( TT_Face face, @@ -808,7 +808,7 @@ * corresponding (1,0) Apple entry. * * @return: - * 1 if there is either a win or apple entry (or both), 0 otheriwse. + * 1 if there is either a win or apple entry (or both), 0 otherwise. */ typedef FT_Bool (*TT_Get_Name_ID_Func)( TT_Face face, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/svginterface.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/svginterface.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/svginterface.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/svginterface.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Interface of ot-svg module (specification only). * - * Copyright (C) 2022-2024 by + * Copyright (C) 2022-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/t1types.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/t1types.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/t1types.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/t1types.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Basic Type1/Type2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Basic SFNT/TrueType type definitions and interface (specification * only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -930,8 +930,8 @@ * resolution and scaling independent parts of a TrueType font resource. * * @note: - * The TT_Face structure is also used as a 'parent class' for the - * OpenType-CFF class (T2_Face). + * The TT_Face structure is also used for CFF support; see file + * `cffotypes.h`. */ typedef struct TT_FaceRec_* TT_Face; @@ -1276,10 +1276,6 @@ * * If varied by the `CVAR' table, non-integer values are possible. * - * interpreter :: - * A pointer to the TrueType bytecode interpreters field is also used - * to hook the debugger in 'ttdebug'. - * * extra :: * Reserved for third-party font drivers. * @@ -1521,10 +1517,6 @@ FT_ULong cvt_size; FT_Int32* cvt; - /* A pointer to the bytecode interpreter to use. This is also */ - /* used to hook the debugger for the `ttdebug' utility. */ - TT_Interpreter interpreter; - /************************************************************************ * @@ -1582,11 +1574,6 @@ FT_UInt32 kern_avail_bits; FT_UInt32 kern_order_bits; -#ifdef TT_CONFIG_OPTION_GPOS_KERNING - FT_Byte* gpos_table; - FT_Bool gpos_kerning_available; -#endif - #ifdef TT_CONFIG_OPTION_BDF TT_BDFRec bdf; #endif /* TT_CONFIG_OPTION_BDF */ @@ -1608,6 +1595,15 @@ /* since 2.12 */ void* svg; +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + /* since 2.13.3 */ + FT_Byte* gpos_table; + /* since 2.14 */ + /* This is actually an array of GPOS lookup subtables. */ + FT_UInt32* gpos_lookups_kerning; + FT_UInt num_gpos_lookups_kerning; +#endif + } TT_FaceRec; @@ -1621,15 +1617,6 @@ * coordinates. * * @fields: - * memory :: - * A handle to the memory manager. - * - * max_points :: - * The maximum size in points of the zone. - * - * max_contours :: - * Max size in links contours of the zone. - * * n_points :: * The current number of points in the zone. * @@ -1653,9 +1640,6 @@ */ typedef struct TT_GlyphZoneRec_ { - FT_Memory memory; - FT_UShort max_points; - FT_UShort max_contours; FT_UShort n_points; /* number of points in zone */ FT_UShort n_contours; /* number of contours */ @@ -1714,7 +1698,6 @@ TT_GlyphZoneRec zone; TT_ExecContext exec; - FT_Byte* instructions; FT_ULong ins_pos; /* for possible extensibility in other formats */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/wofftypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/wofftypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/internal/wofftypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/internal/wofftypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Basic WOFF/WOFF2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/otsvg.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/otsvg.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/otsvg.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/otsvg.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Interface for OT-SVG support related things (specification). * - * Copyright (C) 2022-2024 by + * Copyright (C) 2022-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/t1tables.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/t1tables.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/t1tables.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/t1tables.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Basic Type 1/Type 2 tables definitions and interface (specification * only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -92,7 +92,7 @@ FT_String* full_name; FT_String* family_name; FT_String* weight; - FT_Long italic_angle; + FT_Fixed italic_angle; FT_Bool is_fixed_pitch; FT_Short underline_position; FT_UShort underline_thickness; @@ -645,7 +645,7 @@ PS_DICT_UNDERLINE_POSITION, /* FT_Short */ PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ PS_DICT_FS_TYPE, /* FT_UShort */ - PS_DICT_ITALIC_ANGLE, /* FT_Long */ + PS_DICT_ITALIC_ANGLE, /* FT_Fixed */ PS_DICT_MAX = PS_DICT_ITALIC_ANGLE diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ttnameid.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ttnameid.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/ttnameid.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/ttnameid.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType name ID definitions (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -436,7 +436,7 @@ * * The canonical source for Microsoft's IDs is * - * https://docs.microsoft.com/en-us/windows/desktop/Intl/language-identifier-constants-and-strings , + * https://learn.microsoft.com/windows/win32/intl/language-identifier-constants-and-strings , * * however, we only provide macros for language identifiers present in * the OpenType specification: Microsoft has abandoned the concept of @@ -847,113 +847,113 @@ /* --------------- */ /* Bit 0 Basic Latin */ -#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ +#define TT_UCR_BASIC_LATIN (1UL << 0) /* U+0020-U+007E */ /* Bit 1 C1 Controls and Latin-1 Supplement */ -#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ +#define TT_UCR_LATIN1_SUPPLEMENT (1UL << 1) /* U+0080-U+00FF */ /* Bit 2 Latin Extended-A */ -#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ +#define TT_UCR_LATIN_EXTENDED_A (1UL << 2) /* U+0100-U+017F */ /* Bit 3 Latin Extended-B */ -#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ +#define TT_UCR_LATIN_EXTENDED_B (1UL << 3) /* U+0180-U+024F */ /* Bit 4 IPA Extensions */ /* Phonetic Extensions */ /* Phonetic Extensions Supplement */ -#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ +#define TT_UCR_IPA_EXTENSIONS (1UL << 4) /* U+0250-U+02AF */ /* U+1D00-U+1D7F */ /* U+1D80-U+1DBF */ /* Bit 5 Spacing Modifier Letters */ /* Modifier Tone Letters */ -#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ +#define TT_UCR_SPACING_MODIFIER (1UL << 5) /* U+02B0-U+02FF */ /* U+A700-U+A71F */ /* Bit 6 Combining Diacritical Marks */ /* Combining Diacritical Marks Supplement */ -#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L << 6) /* U+0300-U+036F */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1UL << 6) /* U+0300-U+036F */ /* U+1DC0-U+1DFF */ /* Bit 7 Greek and Coptic */ -#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ +#define TT_UCR_GREEK (1UL << 7) /* U+0370-U+03FF */ /* Bit 8 Coptic */ -#define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ +#define TT_UCR_COPTIC (1UL << 8) /* U+2C80-U+2CFF */ /* Bit 9 Cyrillic */ /* Cyrillic Supplement */ /* Cyrillic Extended-A */ /* Cyrillic Extended-B */ -#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ +#define TT_UCR_CYRILLIC (1UL << 9) /* U+0400-U+04FF */ /* U+0500-U+052F */ /* U+2DE0-U+2DFF */ /* U+A640-U+A69F */ /* Bit 10 Armenian */ -#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ +#define TT_UCR_ARMENIAN (1UL << 10) /* U+0530-U+058F */ /* Bit 11 Hebrew */ -#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ +#define TT_UCR_HEBREW (1UL << 11) /* U+0590-U+05FF */ /* Bit 12 Vai */ -#define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ +#define TT_UCR_VAI (1UL << 12) /* U+A500-U+A63F */ /* Bit 13 Arabic */ /* Arabic Supplement */ -#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ +#define TT_UCR_ARABIC (1UL << 13) /* U+0600-U+06FF */ /* U+0750-U+077F */ /* Bit 14 NKo */ -#define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ +#define TT_UCR_NKO (1UL << 14) /* U+07C0-U+07FF */ /* Bit 15 Devanagari */ -#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ - /* Bit 16 Bengali */ -#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ +#define TT_UCR_DEVANAGARI (1UL << 15) /* U+0900-U+097F */ + /* Bit 16 Bangla (Bengali) */ +#define TT_UCR_BENGALI (1UL << 16) /* U+0980-U+09FF */ /* Bit 17 Gurmukhi */ -#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ +#define TT_UCR_GURMUKHI (1UL << 17) /* U+0A00-U+0A7F */ /* Bit 18 Gujarati */ -#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ - /* Bit 19 Oriya */ -#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ +#define TT_UCR_GUJARATI (1UL << 18) /* U+0A80-U+0AFF */ + /* Bit 19 Oriya (Odia) */ +#define TT_UCR_ORIYA (1UL << 19) /* U+0B00-U+0B7F */ /* Bit 20 Tamil */ -#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ +#define TT_UCR_TAMIL (1UL << 20) /* U+0B80-U+0BFF */ /* Bit 21 Telugu */ -#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ +#define TT_UCR_TELUGU (1UL << 21) /* U+0C00-U+0C7F */ /* Bit 22 Kannada */ -#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ +#define TT_UCR_KANNADA (1UL << 22) /* U+0C80-U+0CFF */ /* Bit 23 Malayalam */ -#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ +#define TT_UCR_MALAYALAM (1UL << 23) /* U+0D00-U+0D7F */ /* Bit 24 Thai */ -#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ +#define TT_UCR_THAI (1UL << 24) /* U+0E00-U+0E7F */ /* Bit 25 Lao */ -#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ +#define TT_UCR_LAO (1UL << 25) /* U+0E80-U+0EFF */ /* Bit 26 Georgian */ /* Georgian Supplement */ -#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ +#define TT_UCR_GEORGIAN (1UL << 26) /* U+10A0-U+10FF */ /* U+2D00-U+2D2F */ /* Bit 27 Balinese */ -#define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ +#define TT_UCR_BALINESE (1UL << 27) /* U+1B00-U+1B7F */ /* Bit 28 Hangul Jamo */ -#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ +#define TT_UCR_HANGUL_JAMO (1UL << 28) /* U+1100-U+11FF */ /* Bit 29 Latin Extended Additional */ /* Latin Extended-C */ /* Latin Extended-D */ -#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ +#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1UL << 29) /* U+1E00-U+1EFF */ /* U+2C60-U+2C7F */ /* U+A720-U+A7FF */ /* Bit 30 Greek Extended */ -#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ +#define TT_UCR_GREEK_EXTENDED (1UL << 30) /* U+1F00-U+1FFF */ /* Bit 31 General Punctuation */ /* Supplemental Punctuation */ -#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ +#define TT_UCR_GENERAL_PUNCTUATION (1UL << 31) /* U+2000-U+206F */ /* U+2E00-U+2E7F */ /* ulUnicodeRange2 */ /* --------------- */ /* Bit 32 Superscripts And Subscripts */ -#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ +#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1UL << 0) /* U+2070-U+209F */ /* Bit 33 Currency Symbols */ -#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ +#define TT_UCR_CURRENCY_SYMBOLS (1UL << 1) /* U+20A0-U+20CF */ /* Bit 34 Combining Diacritical Marks For Symbols */ #define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ - (1L << 2) /* U+20D0-U+20FF */ + (1UL << 2) /* U+20D0-U+20FF */ /* Bit 35 Letterlike Symbols */ -#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ +#define TT_UCR_LETTERLIKE_SYMBOLS (1UL << 3) /* U+2100-U+214F */ /* Bit 36 Number Forms */ -#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ +#define TT_UCR_NUMBER_FORMS (1UL << 4) /* U+2150-U+218F */ /* Bit 37 Arrows */ /* Supplemental Arrows-A */ /* Supplemental Arrows-B */ /* Miscellaneous Symbols and Arrows */ -#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ +#define TT_UCR_ARROWS (1UL << 5) /* U+2190-U+21FF */ /* U+27F0-U+27FF */ /* U+2900-U+297F */ /* U+2B00-U+2BFF */ @@ -961,52 +961,52 @@ /* Supplemental Mathematical Operators */ /* Miscellaneous Mathematical Symbols-A */ /* Miscellaneous Mathematical Symbols-B */ -#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ +#define TT_UCR_MATHEMATICAL_OPERATORS (1UL << 6) /* U+2200-U+22FF */ /* U+2A00-U+2AFF */ /* U+27C0-U+27EF */ /* U+2980-U+29FF */ /* Bit 39 Miscellaneous Technical */ -#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ +#define TT_UCR_MISCELLANEOUS_TECHNICAL (1UL << 7) /* U+2300-U+23FF */ /* Bit 40 Control Pictures */ -#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ +#define TT_UCR_CONTROL_PICTURES (1UL << 8) /* U+2400-U+243F */ /* Bit 41 Optical Character Recognition */ -#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ +#define TT_UCR_OCR (1UL << 9) /* U+2440-U+245F */ /* Bit 42 Enclosed Alphanumerics */ -#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ +#define TT_UCR_ENCLOSED_ALPHANUMERICS (1UL << 10) /* U+2460-U+24FF */ /* Bit 43 Box Drawing */ -#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ +#define TT_UCR_BOX_DRAWING (1UL << 11) /* U+2500-U+257F */ /* Bit 44 Block Elements */ -#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ +#define TT_UCR_BLOCK_ELEMENTS (1UL << 12) /* U+2580-U+259F */ /* Bit 45 Geometric Shapes */ -#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ +#define TT_UCR_GEOMETRIC_SHAPES (1UL << 13) /* U+25A0-U+25FF */ /* Bit 46 Miscellaneous Symbols */ -#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ +#define TT_UCR_MISCELLANEOUS_SYMBOLS (1UL << 14) /* U+2600-U+26FF */ /* Bit 47 Dingbats */ -#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ +#define TT_UCR_DINGBATS (1UL << 15) /* U+2700-U+27BF */ /* Bit 48 CJK Symbols and Punctuation */ -#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ +#define TT_UCR_CJK_SYMBOLS (1UL << 16) /* U+3000-U+303F */ /* Bit 49 Hiragana */ -#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ +#define TT_UCR_HIRAGANA (1UL << 17) /* U+3040-U+309F */ /* Bit 50 Katakana */ /* Katakana Phonetic Extensions */ -#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ +#define TT_UCR_KATAKANA (1UL << 18) /* U+30A0-U+30FF */ /* U+31F0-U+31FF */ /* Bit 51 Bopomofo */ /* Bopomofo Extended */ -#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ +#define TT_UCR_BOPOMOFO (1UL << 19) /* U+3100-U+312F */ /* U+31A0-U+31BF */ /* Bit 52 Hangul Compatibility Jamo */ -#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ +#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1UL << 20) /* U+3130-U+318F */ /* Bit 53 Phags-Pa */ -#define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ -#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ -#define TT_UCR_PHAGSPA +#define TT_UCR_PHAGSPA (1UL << 21) /* U+A840-U+A87F */ +#define TT_UCR_KANBUN TT_UCR_PHAGSPA /* deprecated */ +#define TT_UCR_CJK_MISC TT_UCR_PHAGSPA /* deprecated */ /* Bit 54 Enclosed CJK Letters and Months */ -#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ +#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1UL << 22) /* U+3200-U+32FF */ /* Bit 55 CJK Compatibility */ -#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ +#define TT_UCR_CJK_COMPATIBILITY (1UL << 23) /* U+3300-U+33FF */ /* Bit 56 Hangul Syllables */ -#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ +#define TT_UCR_HANGUL (1UL << 24) /* U+AC00-U+D7A3 */ /* Bit 57 High Surrogates */ /* High Private Use Surrogates */ /* Low Surrogates */ @@ -1017,12 +1017,12 @@ /* Basic Multilingual Plane that is */ /* supported by this font. So it really */ /* means >= U+10000. */ -#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ +#define TT_UCR_SURROGATES (1UL << 25) /* U+D800-U+DB7F */ /* U+DB80-U+DBFF */ /* U+DC00-U+DFFF */ #define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES /* Bit 58 Phoenician */ -#define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ +#define TT_UCR_PHOENICIAN (1UL << 26) /*U+10900-U+1091F*/ /* Bit 59 CJK Unified Ideographs */ /* CJK Radicals Supplement */ /* Kangxi Radicals */ @@ -1030,7 +1030,7 @@ /* CJK Unified Ideographs Extension A */ /* CJK Unified Ideographs Extension B */ /* Kanbun */ -#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ +#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1UL << 27) /* U+4E00-U+9FFF */ /* U+2E80-U+2EFF */ /* U+2F00-U+2FDF */ /* U+2FF0-U+2FFF */ @@ -1038,178 +1038,178 @@ /*U+20000-U+2A6DF*/ /* U+3190-U+319F */ /* Bit 60 Private Use */ -#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ +#define TT_UCR_PRIVATE_USE (1UL << 28) /* U+E000-U+F8FF */ /* Bit 61 CJK Strokes */ /* CJK Compatibility Ideographs */ /* CJK Compatibility Ideographs Supplement */ -#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ +#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1UL << 29) /* U+31C0-U+31EF */ /* U+F900-U+FAFF */ /*U+2F800-U+2FA1F*/ /* Bit 62 Alphabetic Presentation Forms */ -#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ +#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1UL << 30) /* U+FB00-U+FB4F */ /* Bit 63 Arabic Presentation Forms-A */ -#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L << 31) /* U+FB50-U+FDFF */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1UL << 31) /* U+FB50-U+FDFF */ /* ulUnicodeRange3 */ /* --------------- */ /* Bit 64 Combining Half Marks */ -#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ +#define TT_UCR_COMBINING_HALF_MARKS (1UL << 0) /* U+FE20-U+FE2F */ /* Bit 65 Vertical forms */ /* CJK Compatibility Forms */ -#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ +#define TT_UCR_CJK_COMPATIBILITY_FORMS (1UL << 1) /* U+FE10-U+FE1F */ /* U+FE30-U+FE4F */ /* Bit 66 Small Form Variants */ -#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ +#define TT_UCR_SMALL_FORM_VARIANTS (1UL << 2) /* U+FE50-U+FE6F */ /* Bit 67 Arabic Presentation Forms-B */ -#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L << 3) /* U+FE70-U+FEFE */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1UL << 3) /* U+FE70-U+FEFF */ /* Bit 68 Halfwidth and Fullwidth Forms */ -#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ +#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1UL << 4) /* U+FF00-U+FFEF */ /* Bit 69 Specials */ -#define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ +#define TT_UCR_SPECIALS (1UL << 5) /* U+FFF0-U+FFFF */ /* Bit 70 Tibetan */ -#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ +#define TT_UCR_TIBETAN (1UL << 6) /* U+0F00-U+0FFF */ /* Bit 71 Syriac */ -#define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ +#define TT_UCR_SYRIAC (1UL << 7) /* U+0700-U+074F */ /* Bit 72 Thaana */ -#define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ +#define TT_UCR_THAANA (1UL << 8) /* U+0780-U+07BF */ /* Bit 73 Sinhala */ -#define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ +#define TT_UCR_SINHALA (1UL << 9) /* U+0D80-U+0DFF */ /* Bit 74 Myanmar */ -#define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ +#define TT_UCR_MYANMAR (1UL << 10) /* U+1000-U+109F */ /* Bit 75 Ethiopic */ /* Ethiopic Supplement */ /* Ethiopic Extended */ -#define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ +#define TT_UCR_ETHIOPIC (1UL << 11) /* U+1200-U+137F */ /* U+1380-U+139F */ /* U+2D80-U+2DDF */ /* Bit 76 Cherokee */ -#define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ +#define TT_UCR_CHEROKEE (1UL << 12) /* U+13A0-U+13FF */ /* Bit 77 Unified Canadian Aboriginal Syllabics */ -#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ +#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1UL << 13) /* U+1400-U+167F */ /* Bit 78 Ogham */ -#define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ +#define TT_UCR_OGHAM (1UL << 14) /* U+1680-U+169F */ /* Bit 79 Runic */ -#define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ +#define TT_UCR_RUNIC (1UL << 15) /* U+16A0-U+16FF */ /* Bit 80 Khmer */ /* Khmer Symbols */ -#define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ +#define TT_UCR_KHMER (1UL << 16) /* U+1780-U+17FF */ /* U+19E0-U+19FF */ /* Bit 81 Mongolian */ -#define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ +#define TT_UCR_MONGOLIAN (1UL << 17) /* U+1800-U+18AF */ /* Bit 82 Braille Patterns */ -#define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ +#define TT_UCR_BRAILLE (1UL << 18) /* U+2800-U+28FF */ /* Bit 83 Yi Syllables */ /* Yi Radicals */ -#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ +#define TT_UCR_YI (1UL << 19) /* U+A000-U+A48F */ /* U+A490-U+A4CF */ /* Bit 84 Tagalog */ /* Hanunoo */ /* Buhid */ /* Tagbanwa */ -#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ +#define TT_UCR_PHILIPPINE (1UL << 20) /* U+1700-U+171F */ /* U+1720-U+173F */ /* U+1740-U+175F */ /* U+1760-U+177F */ /* Bit 85 Old Italic */ -#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ +#define TT_UCR_OLD_ITALIC (1UL << 21) /*U+10300-U+1032F*/ /* Bit 86 Gothic */ -#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ +#define TT_UCR_GOTHIC (1UL << 22) /*U+10330-U+1034F*/ /* Bit 87 Deseret */ -#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ +#define TT_UCR_DESERET (1UL << 23) /*U+10400-U+1044F*/ /* Bit 88 Byzantine Musical Symbols */ /* Musical Symbols */ /* Ancient Greek Musical Notation */ -#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ +#define TT_UCR_MUSICAL_SYMBOLS (1UL << 24) /*U+1D000-U+1D0FF*/ /*U+1D100-U+1D1FF*/ /*U+1D200-U+1D24F*/ /* Bit 89 Mathematical Alphanumeric Symbols */ -#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ +#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1UL << 25) /*U+1D400-U+1D7FF*/ /* Bit 90 Private Use (plane 15) */ /* Private Use (plane 16) */ -#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ +#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1UL << 26) /*U+F0000-U+FFFFD*/ /*U+100000-U+10FFFD*/ /* Bit 91 Variation Selectors */ /* Variation Selectors Supplement */ -#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ +#define TT_UCR_VARIATION_SELECTORS (1UL << 27) /* U+FE00-U+FE0F */ /*U+E0100-U+E01EF*/ /* Bit 92 Tags */ -#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ +#define TT_UCR_TAGS (1UL << 28) /*U+E0000-U+E007F*/ /* Bit 93 Limbu */ -#define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ +#define TT_UCR_LIMBU (1UL << 29) /* U+1900-U+194F */ /* Bit 94 Tai Le */ -#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ +#define TT_UCR_TAI_LE (1UL << 30) /* U+1950-U+197F */ /* Bit 95 New Tai Lue */ -#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ +#define TT_UCR_NEW_TAI_LUE (1UL << 31) /* U+1980-U+19DF */ /* ulUnicodeRange4 */ /* --------------- */ /* Bit 96 Buginese */ -#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ +#define TT_UCR_BUGINESE (1UL << 0) /* U+1A00-U+1A1F */ /* Bit 97 Glagolitic */ -#define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ +#define TT_UCR_GLAGOLITIC (1UL << 1) /* U+2C00-U+2C5F */ /* Bit 98 Tifinagh */ -#define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ +#define TT_UCR_TIFINAGH (1UL << 2) /* U+2D30-U+2D7F */ /* Bit 99 Yijing Hexagram Symbols */ -#define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ +#define TT_UCR_YIJING (1UL << 3) /* U+4DC0-U+4DFF */ /* Bit 100 Syloti Nagri */ -#define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ +#define TT_UCR_SYLOTI_NAGRI (1UL << 4) /* U+A800-U+A82F */ /* Bit 101 Linear B Syllabary */ /* Linear B Ideograms */ /* Aegean Numbers */ -#define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ +#define TT_UCR_LINEAR_B (1UL << 5) /*U+10000-U+1007F*/ /*U+10080-U+100FF*/ /*U+10100-U+1013F*/ /* Bit 102 Ancient Greek Numbers */ -#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ +#define TT_UCR_ANCIENT_GREEK_NUMBERS (1UL << 6) /*U+10140-U+1018F*/ /* Bit 103 Ugaritic */ -#define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ +#define TT_UCR_UGARITIC (1UL << 7) /*U+10380-U+1039F*/ /* Bit 104 Old Persian */ -#define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ +#define TT_UCR_OLD_PERSIAN (1UL << 8) /*U+103A0-U+103DF*/ /* Bit 105 Shavian */ -#define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ +#define TT_UCR_SHAVIAN (1UL << 9) /*U+10450-U+1047F*/ /* Bit 106 Osmanya */ -#define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ +#define TT_UCR_OSMANYA (1UL << 10) /*U+10480-U+104AF*/ /* Bit 107 Cypriot Syllabary */ -#define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ +#define TT_UCR_CYPRIOT_SYLLABARY (1UL << 11) /*U+10800-U+1083F*/ /* Bit 108 Kharoshthi */ -#define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ +#define TT_UCR_KHAROSHTHI (1UL << 12) /*U+10A00-U+10A5F*/ /* Bit 109 Tai Xuan Jing Symbols */ -#define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ +#define TT_UCR_TAI_XUAN_JING (1UL << 13) /*U+1D300-U+1D35F*/ /* Bit 110 Cuneiform */ /* Cuneiform Numbers and Punctuation */ -#define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ +#define TT_UCR_CUNEIFORM (1UL << 14) /*U+12000-U+123FF*/ /*U+12400-U+1247F*/ /* Bit 111 Counting Rod Numerals */ -#define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ +#define TT_UCR_COUNTING_ROD_NUMERALS (1UL << 15) /*U+1D360-U+1D37F*/ /* Bit 112 Sundanese */ -#define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ +#define TT_UCR_SUNDANESE (1UL << 16) /* U+1B80-U+1BBF */ /* Bit 113 Lepcha */ -#define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ +#define TT_UCR_LEPCHA (1UL << 17) /* U+1C00-U+1C4F */ /* Bit 114 Ol Chiki */ -#define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ +#define TT_UCR_OL_CHIKI (1UL << 18) /* U+1C50-U+1C7F */ /* Bit 115 Saurashtra */ -#define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ +#define TT_UCR_SAURASHTRA (1UL << 19) /* U+A880-U+A8DF */ /* Bit 116 Kayah Li */ -#define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ +#define TT_UCR_KAYAH_LI (1UL << 20) /* U+A900-U+A92F */ /* Bit 117 Rejang */ -#define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ +#define TT_UCR_REJANG (1UL << 21) /* U+A930-U+A95F */ /* Bit 118 Cham */ -#define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ +#define TT_UCR_CHAM (1UL << 22) /* U+AA00-U+AA5F */ /* Bit 119 Ancient Symbols */ -#define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ +#define TT_UCR_ANCIENT_SYMBOLS (1UL << 23) /*U+10190-U+101CF*/ /* Bit 120 Phaistos Disc */ -#define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ +#define TT_UCR_PHAISTOS_DISC (1UL << 24) /*U+101D0-U+101FF*/ /* Bit 121 Carian */ /* Lycian */ /* Lydian */ -#define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ +#define TT_UCR_OLD_ANATOLIAN (1UL << 25) /*U+102A0-U+102DF*/ /*U+10280-U+1029F*/ /*U+10920-U+1093F*/ /* Bit 122 Domino Tiles */ /* Mahjong Tiles */ -#define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ +#define TT_UCR_GAME_TILES (1UL << 26) /*U+1F030-U+1F09F*/ /*U+1F000-U+1F02F*/ /* Bit 123-127 Reserved for process-internal usage */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/tttables.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/tttables.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/tttables.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/tttables.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Basic SFNT/TrueType tables definitions and interface * (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -192,7 +192,7 @@ * A pointer into the 'hmtx' table. * * @note: - * For an OpenType variation font, the values of the following fields can + * For OpenType Font Variations, the values of the following fields can * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if * the font contains an 'MVAR' table: `caret_Slope_Rise`, * `caret_Slope_Run`, and `caret_Offset`. @@ -310,7 +310,7 @@ * A pointer into the 'vmtx' table. * * @note: - * For an OpenType variation font, the values of the following fields can + * For OpenType Font Variations, the values of the following fields can * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if * the font contains an 'MVAR' table: `Ascender`, `Descender`, * `Line_Gap`, `caret_Slope_Rise`, `caret_Slope_Run`, and `caret_Offset`. @@ -359,7 +359,7 @@ * table. In this case, the `version` field is always set to 0xFFFF. * * @note: - * For an OpenType variation font, the values of the following fields can + * For OpenType Font Variations, the values of the following fields can * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if * the font contains an 'MVAR' table: `sCapHeight`, `sTypoAscender`, * `sTypoDescender`, `sTypoLineGap`, `sxHeight`, `usWinAscent`, @@ -442,7 +442,7 @@ * them. * * @note: - * For an OpenType variation font, the values of the following fields can + * For OpenType Font Variations, the values of the following fields can * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if * the font contains an 'MVAR' table: `underlinePosition` and * `underlineThickness`. @@ -705,6 +705,9 @@ * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new * one with @FT_MAKE_TAG. * + * [Since 2.14] Use value~1 if you want to access the table directory + * of the (currently selected) font. + * * offset :: * The starting offset in the table (or file if tag~==~0). * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/tttags.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/tttags.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/freetype/tttags.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/freetype/tttags.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Tags for TrueType and OpenType tables (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/ft2build.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/ft2build.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/include/ft2build.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/include/ft2build.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType 2 build and setup macros. * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,1621 @@ +/**************************************************************************** + * + * afadjust.c + * + * Auto-fitter routines to adjust components based on charcode (body). + * + * Copyright (C) 2023-2025 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * Written by Craig White <gerzytet@gmail.com>. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + +#include "afadjust.h" +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ +# include "afgsub.h" +#endif + +#include <freetype/freetype.h> +#include <freetype/internal/ftobjs.h> +#include <freetype/internal/ftmemory.h> +#include <freetype/internal/ftdebug.h> + +#define AF_ADJUSTMENT_DATABASE_LENGTH \ + ( sizeof ( adjustment_database ) / \ + sizeof ( adjustment_database[0] ) ) + +#undef FT_COMPONENT +#define FT_COMPONENT afadjust + + + typedef struct AF_AdjustmentDatabaseEntry_ + { + FT_UInt32 codepoint; + FT_UInt32 flags; + + } AF_AdjustmentDatabaseEntry; + + + /* + All entries in this list must be sorted by ascending Unicode code + points. The table entries are 3 numbers consisting of: + + - Unicode code point. + - The vertical adjustment type. This should be a combination of the + AF_ADJUST_XXX and AF_IGNORE_XXX macros. + */ + static AF_AdjustmentDatabaseEntry adjustment_database[] = + { + /* C0 Controls and Basic Latin */ + { 0x21, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ! */ + { 0x51, AF_IGNORE_CAPITAL_BOTTOM } , /* Q */ + { 0x3F, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ? */ + { 0x69, AF_ADJUST_UP }, /* i */ + { 0x6A, AF_ADJUST_UP }, /* j */ +#if 0 + /* XXX TODO */ + { 0x7E, AF_ADJUST_TILDE_TOP }, /* ~ */ +#endif + + /* C1 Controls and Latin-1 Supplement */ + { 0xA1, AF_ADJUST_UP }, /* ¡ */ + { 0xA6, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ¦ */ + { 0xAA, AF_ADJUST_UP }, /* ª */ + { 0xBA, AF_ADJUST_UP }, /* º */ + { 0xBF, AF_ADJUST_UP }, /* ¿ */ + + { 0xC0, AF_ADJUST_UP }, /* À */ + { 0xC1, AF_ADJUST_UP }, /* Á */ + { 0xC2, AF_ADJUST_UP }, /* Â */ + { 0xC3, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ã */ + { 0xC4, AF_ADJUST_UP }, /* Ä */ + { 0xC5, AF_ADJUST_UP }, /* Å */ + { 0xC7, AF_IGNORE_CAPITAL_BOTTOM }, /* Ç */ + { 0xC8, AF_ADJUST_UP }, /* È */ + { 0xC9, AF_ADJUST_UP }, /* É */ + { 0xCA, AF_ADJUST_UP }, /* Ê */ + { 0xCB, AF_ADJUST_UP }, /* Ë */ + { 0xCC, AF_ADJUST_UP }, /* Ì */ + { 0xCD, AF_ADJUST_UP }, /* Í */ + { 0xCE, AF_ADJUST_UP }, /* Î */ + { 0xCF, AF_ADJUST_UP }, /* Ï */ + + { 0xD1, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ñ */ + { 0xD2, AF_ADJUST_UP }, /* Ò */ + { 0xD3, AF_ADJUST_UP }, /* Ó */ + { 0xD4, AF_ADJUST_UP }, /* Ô */ + { 0xD5, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Õ */ + { 0xD6, AF_ADJUST_UP }, /* Ö */ + { 0xD8, AF_IGNORE_CAPITAL_TOP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ø */ + { 0xD9, AF_ADJUST_UP }, /* Ù */ + { 0xDA, AF_ADJUST_UP }, /* Ú */ + { 0xDB, AF_ADJUST_UP }, /* Û */ + { 0xDC, AF_ADJUST_UP }, /* Ü */ + { 0xDD, AF_ADJUST_UP }, /* Ý */ + + { 0xE0, AF_ADJUST_UP }, /* à */ + { 0xE1, AF_ADJUST_UP }, /* á */ + { 0xE2, AF_ADJUST_UP }, /* â */ + { 0xE3, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ã */ + { 0xE4, AF_ADJUST_UP }, /* ä */ + { 0xE5, AF_ADJUST_UP }, /* å */ + { 0xE7, AF_IGNORE_SMALL_BOTTOM }, /* ç */ + { 0xE8, AF_ADJUST_UP }, /* è */ + { 0xE9, AF_ADJUST_UP }, /* é */ + { 0xEA, AF_ADJUST_UP }, /* ê */ + { 0xEB, AF_ADJUST_UP }, /* ë */ + { 0xEC, AF_ADJUST_UP }, /* ì */ + { 0xED, AF_ADJUST_UP }, /* í */ + { 0xEE, AF_ADJUST_UP }, /* î */ + { 0xEF, AF_ADJUST_UP }, /* ï */ + + { 0xF1, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ñ */ + { 0xF2, AF_ADJUST_UP }, /* ò */ + { 0xF3, AF_ADJUST_UP }, /* ó */ + { 0xF4, AF_ADJUST_UP }, /* ô */ + { 0xF5, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* õ */ + { 0xF6, AF_ADJUST_UP }, /* ö */ + { 0xF8, AF_IGNORE_SMALL_TOP | AF_IGNORE_SMALL_BOTTOM }, /* ø */ + { 0xF9, AF_ADJUST_UP }, /* ù */ + { 0xFA, AF_ADJUST_UP }, /* ú */ + { 0xFB, AF_ADJUST_UP }, /* û */ + { 0xFC, AF_ADJUST_UP }, /* ü */ + { 0xFD, AF_ADJUST_UP }, /* ý */ + { 0xFF, AF_ADJUST_UP }, /* ÿ */ + + /* Latin Extended-A */ + { 0x100, AF_ADJUST_UP }, /* Ā */ + { 0x101, AF_ADJUST_UP }, /* ā */ + { 0x102, AF_ADJUST_UP }, /* Ă */ + { 0x103, AF_ADJUST_UP }, /* ă */ + { 0x104, AF_IGNORE_CAPITAL_BOTTOM }, /* Ą */ + { 0x105, AF_IGNORE_SMALL_BOTTOM }, /* ą */ + { 0x106, AF_ADJUST_UP }, /* Ć */ + { 0x107, AF_ADJUST_UP }, /* ć */ + { 0x108, AF_ADJUST_UP }, /* Ĉ */ + { 0x109, AF_ADJUST_UP }, /* ĉ */ + { 0x10A, AF_ADJUST_UP }, /* Ċ */ + { 0x10B, AF_ADJUST_UP }, /* ċ */ + { 0x10C, AF_ADJUST_UP }, /* Č */ + { 0x10D, AF_ADJUST_UP }, /* č */ + { 0x10E, AF_ADJUST_UP }, /* Ď */ + + { 0x112, AF_ADJUST_UP }, /* Ē */ + { 0x113, AF_ADJUST_UP }, /* ē */ + { 0x114, AF_ADJUST_UP }, /* Ĕ */ + { 0x115, AF_ADJUST_UP }, /* ĕ */ + { 0x116, AF_ADJUST_UP }, /* Ė */ + { 0x117, AF_ADJUST_UP }, /* ė */ + { 0x118, AF_IGNORE_CAPITAL_BOTTOM }, /* Ę */ + { 0x119, AF_IGNORE_SMALL_BOTTOM }, /* ę */ + { 0x11A, AF_ADJUST_UP }, /* Ě */ + { 0x11B, AF_ADJUST_UP }, /* ě */ + { 0x11C, AF_ADJUST_UP }, /* Ĝ */ + { 0x11D, AF_ADJUST_UP }, /* ĝ */ + { 0x11E, AF_ADJUST_UP }, /* Ğ */ + { 0x11F, AF_ADJUST_UP }, /* ğ */ + + { 0x120, AF_ADJUST_UP }, /* Ġ */ + { 0x121, AF_ADJUST_UP }, /* ġ */ + { 0x122, AF_ADJUST_DOWN }, /* Ģ */ + { 0x123, AF_ADJUST_UP }, /* ģ */ + { 0x124, AF_ADJUST_UP }, /* Ĥ */ + { 0x125, AF_ADJUST_UP }, /* ĥ */ + { 0x128, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ĩ */ + { 0x129, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ĩ */ + { 0x12A, AF_ADJUST_UP }, /* Ī */ + { 0x12B, AF_ADJUST_UP }, /* ī */ + { 0x12C, AF_ADJUST_UP }, /* Ĭ */ + { 0x12D, AF_ADJUST_UP }, /* ĭ */ + { 0x12E, AF_IGNORE_CAPITAL_BOTTOM }, /* Į */ + { 0x12F, AF_ADJUST_UP | AF_IGNORE_SMALL_BOTTOM }, /* į */ + + { 0x130, AF_ADJUST_UP }, /* İ */ + { 0x133, AF_ADJUST_UP }, /* ij */ + { 0x134, AF_ADJUST_UP }, /* Ĵ */ + { 0x135, AF_ADJUST_UP }, /* ĵ */ + { 0x136, AF_ADJUST_DOWN }, /* Ķ */ + { 0x137, AF_ADJUST_DOWN }, /* ķ */ + { 0x139, AF_ADJUST_UP }, /* Ĺ */ + { 0x13A, AF_ADJUST_UP }, /* ĺ */ + { 0x13B, AF_ADJUST_DOWN }, /* Ļ */ + { 0x13C, AF_ADJUST_DOWN }, /* ļ */ + + { 0x143, AF_ADJUST_UP }, /* Ń */ + { 0x144, AF_ADJUST_UP }, /* ń */ + { 0x145, AF_ADJUST_DOWN }, /* Ņ */ + { 0x146, AF_ADJUST_DOWN }, /* ņ */ + { 0x147, AF_ADJUST_UP }, /* Ň */ + { 0x148, AF_ADJUST_UP }, /* ň */ + { 0x14C, AF_ADJUST_UP }, /* Ō */ + { 0x14D, AF_ADJUST_UP }, /* ō */ + { 0x14E, AF_ADJUST_UP }, /* Ŏ */ + { 0x14F, AF_ADJUST_UP }, /* ŏ */ + + { 0x150, AF_ADJUST_UP }, /* Ő */ + { 0x151, AF_ADJUST_UP }, /* ő */ + { 0x154, AF_ADJUST_UP }, /* Ŕ */ + { 0x155, AF_ADJUST_UP }, /* ŕ */ + { 0x156, AF_ADJUST_DOWN }, /* Ŗ */ + { 0x157, AF_ADJUST_DOWN }, /* ŗ */ + { 0x158, AF_ADJUST_UP }, /* Ř */ + { 0x159, AF_ADJUST_UP }, /* ř */ + { 0x15A, AF_ADJUST_UP }, /* Ś */ + { 0x15B, AF_ADJUST_UP }, /* ś */ + { 0x15C, AF_ADJUST_UP }, /* Ŝ */ + { 0x15D, AF_ADJUST_UP }, /* ŝ */ + { 0x15E, AF_IGNORE_CAPITAL_BOTTOM }, /* Ş */ + { 0x15F, AF_IGNORE_SMALL_BOTTOM }, /* ş */ + + { 0x160, AF_ADJUST_UP }, /* Š */ + { 0x161, AF_ADJUST_UP }, /* š */ + { 0x162, AF_IGNORE_CAPITAL_BOTTOM }, /* Ţ */ + { 0x163, AF_IGNORE_SMALL_BOTTOM }, /* ţ */ + { 0x164, AF_ADJUST_UP }, /* Ť */ + { 0x168, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ũ */ + { 0x169, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ũ */ + { 0x16A, AF_ADJUST_UP }, /* Ū */ + { 0x16B, AF_ADJUST_UP }, /* ū */ + { 0x16C, AF_ADJUST_UP }, /* Ŭ */ + { 0x16D, AF_ADJUST_UP }, /* ŭ */ + { 0x16E, AF_ADJUST_UP }, /* Ů */ + { 0x16F, AF_ADJUST_UP }, /* ů */ + + { 0x170, AF_ADJUST_UP }, /* Ű */ + { 0x171, AF_ADJUST_UP }, /* ű */ + { 0x172, AF_IGNORE_CAPITAL_BOTTOM }, /* Ų */ + { 0x173, AF_IGNORE_SMALL_BOTTOM }, /* ų */ + { 0x174, AF_ADJUST_UP }, /* Ŵ */ + { 0x175, AF_ADJUST_UP }, /* ŵ */ + { 0x176, AF_ADJUST_UP }, /* Ŷ */ + { 0x177, AF_ADJUST_UP }, /* ŷ */ + { 0x178, AF_ADJUST_UP }, /* Ÿ */ + { 0x179, AF_ADJUST_UP }, /* Ź */ + { 0x17A, AF_ADJUST_UP }, /* ź */ + { 0x17B, AF_ADJUST_UP }, /* Ż */ + { 0x17C, AF_ADJUST_UP }, /* ż */ + { 0x17D, AF_ADJUST_UP }, /* Ž */ + { 0x17E, AF_ADJUST_UP }, /* ž */ + + /* Latin Extended-B */ + { 0x187, AF_IGNORE_CAPITAL_TOP }, /* Ƈ */ + { 0x188, AF_IGNORE_SMALL_TOP }, /* ƈ */ + + { 0x1A0, AF_IGNORE_CAPITAL_TOP }, /* Ơ */ + { 0x1A1, AF_IGNORE_SMALL_TOP }, /* ơ */ + { 0x1A5, AF_IGNORE_SMALL_TOP }, /* ƥ */ + { 0x1AB, AF_IGNORE_SMALL_BOTTOM }, /* ƫ */ + { 0x1AE, AF_IGNORE_CAPITAL_BOTTOM }, /* Ʈ */ + { 0x1AF, AF_IGNORE_CAPITAL_TOP }, /* Ư */ + + { 0x1B0, AF_IGNORE_SMALL_TOP }, /* ư */ + { 0x1B4, AF_IGNORE_SMALL_TOP }, /* ƴ */ + + { 0x1C3, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ǃ */ + { 0x1C4, AF_ADJUST_UP }, /* DŽ */ +#if 0 + { 0x1C5, AF_ADJUST_UP }, /* Dž */ + { 0x1C6, AF_ADJUST_UP }, /* dž */ + { 0x1C8, AF_ADJUST_UP }, /* Lj */ + { 0x1C9, AF_ADJUST_UP }, /* lj */ + { 0x1CB, AF_ADJUST_UP }, /* Nj */ +#endif + { 0x1CC, AF_ADJUST_UP }, /* nj */ + { 0x1CD, AF_ADJUST_UP }, /* Ǎ */ + { 0x1CE, AF_ADJUST_UP }, /* ǎ */ + { 0x1CF, AF_ADJUST_UP }, /* Ǐ */ + + { 0x1D0, AF_ADJUST_UP }, /* ǐ */ + { 0x1D1, AF_ADJUST_UP }, /* Ǒ */ + { 0x1D2, AF_ADJUST_UP }, /* ǒ */ + { 0x1D3, AF_ADJUST_UP }, /* Ǔ */ + { 0x1D4, AF_ADJUST_UP }, /* ǔ */ + { 0x1D5, AF_ADJUST_UP2 }, /* Ǖ */ + { 0x1D6, AF_ADJUST_UP2 }, /* ǖ */ + { 0x1D7, AF_ADJUST_UP2 }, /* Ǘ */ + { 0x1D8, AF_ADJUST_UP2 }, /* ǘ */ + { 0x1D9, AF_ADJUST_UP2 }, /* Ǚ */ + { 0x1DA, AF_ADJUST_UP2 }, /* ǚ */ + { 0x1DB, AF_ADJUST_UP2 }, /* Ǜ */ + { 0x1DC, AF_ADJUST_UP2 }, /* ǜ */ + { 0x1DE, AF_ADJUST_UP2 }, /* Ǟ */ + { 0x1DF, AF_ADJUST_UP2 }, /* ǟ */ + + { 0x1E0, AF_ADJUST_UP2 }, /* Ǡ */ + { 0x1E1, AF_ADJUST_UP2 }, /* ǡ */ + { 0x1E2, AF_ADJUST_UP }, /* Ǣ */ + { 0x1E3, AF_ADJUST_UP }, /* ǣ */ + { 0x1E6, AF_ADJUST_UP }, /* Ǧ */ + { 0x1E7, AF_ADJUST_UP }, /* ǧ */ + { 0x1E8, AF_ADJUST_UP }, /* Ǩ */ + { 0x1E9, AF_ADJUST_UP }, /* ǩ */ + { 0x1EA, AF_IGNORE_CAPITAL_BOTTOM }, /* Ǫ */ + { 0x1EB, AF_IGNORE_SMALL_BOTTOM }, /* ǫ */ + { 0x1EC, AF_ADJUST_UP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ǭ */ + { 0x1ED, AF_ADJUST_UP | AF_IGNORE_SMALL_BOTTOM }, /* ǭ */ + { 0x1EE, AF_ADJUST_UP }, /* Ǯ */ + { 0x1EF, AF_ADJUST_UP }, /* ǯ */ + + { 0x1F0, AF_ADJUST_UP }, /* ǰ */ + { 0x1F4, AF_ADJUST_UP }, /* Ǵ */ + { 0x1F5, AF_ADJUST_UP }, /* ǵ */ + { 0x1F8, AF_ADJUST_UP }, /* Ǹ */ + { 0x1F9, AF_ADJUST_UP }, /* ǹ */ + { 0x1FA, AF_ADJUST_UP2 }, /* Ǻ */ + { 0x1FB, AF_ADJUST_UP2 }, /* ǻ */ + { 0x1FC, AF_ADJUST_UP }, /* Ǽ */ + { 0x1FD, AF_ADJUST_UP }, /* ǽ */ + { 0x1FE, AF_ADJUST_UP }, /* Ǿ */ + { 0x1FF, AF_ADJUST_UP }, /* ǿ */ + + { 0x200, AF_ADJUST_UP }, /* Ȁ */ + { 0x201, AF_ADJUST_UP }, /* ȁ */ + { 0x202, AF_ADJUST_UP }, /* Ȃ */ + { 0x203, AF_ADJUST_UP }, /* ȃ */ + { 0x204, AF_ADJUST_UP }, /* Ȅ */ + { 0x205, AF_ADJUST_UP }, /* ȅ */ + { 0x206, AF_ADJUST_UP }, /* Ȇ */ + { 0x207, AF_ADJUST_UP }, /* ȇ */ + { 0x208, AF_ADJUST_UP }, /* Ȉ */ + { 0x209, AF_ADJUST_UP }, /* ȉ */ + { 0x20A, AF_ADJUST_UP }, /* Ȋ */ + { 0x20B, AF_ADJUST_UP }, /* ȋ */ + { 0x20C, AF_ADJUST_UP }, /* Ȍ */ + { 0x20D, AF_ADJUST_UP }, /* ȍ */ + { 0x20E, AF_ADJUST_UP }, /* Ȏ */ + { 0x20F, AF_ADJUST_UP }, /* ȏ */ + + { 0x210, AF_ADJUST_UP }, /* Ȑ */ + { 0x211, AF_ADJUST_UP }, /* ȑ */ + { 0x212, AF_ADJUST_UP }, /* Ȓ */ + { 0x213, AF_ADJUST_UP }, /* ȓ */ + { 0x214, AF_ADJUST_UP }, /* Ȕ */ + { 0x215, AF_ADJUST_UP }, /* ȕ */ + { 0x216, AF_ADJUST_UP }, /* Ȗ */ + { 0x217, AF_ADJUST_UP }, /* ȗ */ + { 0x218, AF_ADJUST_DOWN }, /* Ș */ + { 0x219, AF_ADJUST_DOWN }, /* ș */ + { 0x21A, AF_ADJUST_DOWN }, /* Ț */ + { 0x21B, AF_ADJUST_DOWN }, /* ț */ + { 0x21E, AF_ADJUST_UP }, /* Ȟ */ + { 0x21F, AF_ADJUST_UP }, /* ȟ */ + + { 0x224, AF_IGNORE_CAPITAL_BOTTOM }, /* Ȥ */ + { 0x225, AF_IGNORE_SMALL_BOTTOM }, /* ȥ */ + { 0x226, AF_ADJUST_UP }, /* Ȧ */ + { 0x227, AF_ADJUST_UP }, /* ȧ */ + { 0x228, AF_IGNORE_CAPITAL_BOTTOM }, /* Ȩ */ + { 0x229, AF_IGNORE_SMALL_BOTTOM }, /* ȩ */ + { 0x22A, AF_ADJUST_UP2 }, /* Ȫ */ + { 0x22B, AF_ADJUST_UP2 }, /* ȫ */ + { 0x22C, AF_ADJUST_UP2 }, /* Ȭ */ + { 0x22D, AF_ADJUST_UP2 }, /* ȭ */ + { 0x22E, AF_ADJUST_UP }, /* Ȯ */ + { 0x22F, AF_ADJUST_UP }, /* ȯ */ + + { 0x230, AF_ADJUST_UP2 }, /* Ȱ */ + { 0x231, AF_ADJUST_UP2 }, /* ȱ */ + { 0x232, AF_ADJUST_UP }, /* Ȳ */ + { 0x233, AF_ADJUST_UP }, /* ȳ */ + { 0x23A, AF_IGNORE_CAPITAL_TOP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ⱥ */ + { 0x23B, AF_IGNORE_CAPITAL_TOP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ȼ */ + { 0x23F, AF_IGNORE_SMALL_BOTTOM }, /* ȿ */ + + { 0x240, AF_IGNORE_SMALL_BOTTOM }, /* ɀ */ + { 0x249, AF_ADJUST_UP }, /* ɉ */ + + /* IPA Extensions */ + { 0x256, AF_IGNORE_SMALL_BOTTOM }, /* ɖ */ + + { 0x260, AF_IGNORE_SMALL_TOP }, /* ɠ */ + { 0x267, AF_IGNORE_SMALL_BOTTOM }, /* ɧ */ + { 0x268, AF_ADJUST_UP }, /* ɨ */ + + { 0x272, AF_IGNORE_SMALL_BOTTOM }, /* ɲ */ + { 0x273, AF_IGNORE_SMALL_BOTTOM }, /* ɳ */ + { 0x27B, AF_IGNORE_SMALL_BOTTOM }, /* ɻ */ + { 0x27D, AF_IGNORE_SMALL_BOTTOM }, /* ɽ */ + + { 0x282, AF_IGNORE_SMALL_BOTTOM }, /* ʂ */ + { 0x288, AF_IGNORE_SMALL_BOTTOM }, /* ʈ */ + + { 0x290, AF_IGNORE_SMALL_BOTTOM }, /* ʐ */ + { 0x29B, AF_IGNORE_SMALL_TOP }, /* ʛ */ + + { 0x2A0, AF_IGNORE_SMALL_TOP }, /* ʠ */ + + /* Spacing Modifier Letters */ + { 0x2B2, AF_ADJUST_UP }, /* ʲ */ + { 0x2B5, AF_IGNORE_SMALL_BOTTOM }, /* ʵ */ + + /* Greek and Coptic */ + { 0x390, AF_ADJUST_UP2 }, /* ΐ */ + + { 0x3AA, AF_ADJUST_UP }, /* Ϊ */ + { 0x3AB, AF_ADJUST_UP }, /* Ϋ */ + { 0x3AC, AF_ADJUST_UP }, /* ά */ + { 0x3AD, AF_ADJUST_UP }, /* έ */ + { 0x3AE, AF_ADJUST_UP }, /* ή */ + { 0x3AF, AF_ADJUST_UP }, /* ί */ + + { 0x3B0, AF_ADJUST_UP2 }, /* ΰ */ + + { 0x3CA, AF_ADJUST_UP }, /* ϊ */ + { 0x3CB, AF_ADJUST_UP }, /* ϋ */ + { 0x3CC, AF_ADJUST_UP }, /* ό */ + { 0x3CD, AF_ADJUST_UP }, /* ύ */ + { 0x3CE, AF_ADJUST_UP }, /* ώ */ + { 0x3CF, AF_IGNORE_CAPITAL_BOTTOM }, /* Ϗ */ + + { 0x3D4, AF_ADJUST_UP }, /* ϔ */ + { 0x3D7, AF_IGNORE_SMALL_BOTTOM }, /* ϗ */ + { 0x3D9, AF_IGNORE_SMALL_BOTTOM }, /* ϙ */ + + { 0x3E2, AF_IGNORE_CAPITAL_BOTTOM }, /* Ϣ */ + { 0x3E3, AF_IGNORE_SMALL_BOTTOM }, /* ϣ */ + + { 0x3F3, AF_ADJUST_UP }, /* ϳ */ + + /* Cyrillic */ + { 0x400, AF_ADJUST_UP }, /* Ѐ */ + { 0x401, AF_ADJUST_UP }, /* Ё */ + { 0x403, AF_ADJUST_UP }, /* Ѓ */ + { 0x407, AF_ADJUST_UP }, /* Ї */ + { 0x40C, AF_ADJUST_UP }, /* Ќ */ + { 0x40D, AF_ADJUST_UP }, /* Ѝ */ + { 0x40E, AF_ADJUST_UP }, /* Ў */ + { 0x40F, AF_IGNORE_CAPITAL_BOTTOM }, /* Џ */ + + { 0x419, AF_ADJUST_UP }, /* Й */ + + { 0x426, AF_IGNORE_CAPITAL_BOTTOM }, /* Ц */ + { 0x429, AF_IGNORE_CAPITAL_BOTTOM }, /* Щ */ + + { 0x439, AF_ADJUST_UP }, /* й */ + + { 0x446, AF_IGNORE_SMALL_BOTTOM }, /* ц */ + { 0x449, AF_IGNORE_SMALL_BOTTOM }, /* щ */ + + { 0x450, AF_ADJUST_UP }, /* ѐ */ + { 0x451, AF_ADJUST_UP }, /* ё */ + { 0x453, AF_ADJUST_UP }, /* ѓ */ + { 0x456, AF_ADJUST_UP }, /* і */ + { 0x457, AF_ADJUST_UP }, /* ї */ + { 0x458, AF_ADJUST_UP }, /* ј */ + { 0x45C, AF_ADJUST_UP }, /* ќ */ + { 0x45D, AF_ADJUST_UP }, /* ѝ */ + { 0x45E, AF_ADJUST_UP }, /* ў */ + { 0x45F, AF_IGNORE_SMALL_BOTTOM }, /* џ */ + + { 0x476, AF_ADJUST_UP }, /* Ѷ */ + { 0x477, AF_ADJUST_UP }, /* ѷ */ + { 0x47C, AF_ADJUST_UP2 }, /* Ѽ */ + { 0x47D, AF_ADJUST_UP2 }, /* ѽ */ + { 0x47E, AF_ADJUST_UP }, /* Ѿ */ + { 0x47F, AF_ADJUST_UP }, /* ѿ */ + + { 0x480, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҁ */ + { 0x481, AF_IGNORE_SMALL_BOTTOM }, /* ҁ */ + { 0x48A, AF_ADJUST_UP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ҋ */ + { 0x48B, AF_ADJUST_UP | AF_IGNORE_SMALL_BOTTOM }, /* ҋ */ + + { 0x490, AF_IGNORE_CAPITAL_TOP }, /* Ґ */ + { 0x491, AF_IGNORE_SMALL_TOP }, /* ґ */ + { 0x496, AF_IGNORE_CAPITAL_BOTTOM }, /* Җ */ + { 0x497, AF_IGNORE_SMALL_BOTTOM }, /* җ */ + { 0x498, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҙ */ + { 0x499, AF_IGNORE_SMALL_BOTTOM }, /* ҙ */ + { 0x49A, AF_IGNORE_CAPITAL_BOTTOM }, /* Қ */ + { 0x49B, AF_IGNORE_SMALL_BOTTOM }, /* қ */ + + { 0x4A2, AF_IGNORE_CAPITAL_BOTTOM }, /* Ң */ + { 0x4A3, AF_IGNORE_SMALL_BOTTOM }, /* ң */ + { 0x4AA, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҫ */ + { 0x4AB, AF_IGNORE_SMALL_BOTTOM }, /* ҫ */ + { 0x4AC, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҭ */ + { 0x4AD, AF_IGNORE_SMALL_BOTTOM }, /* ҭ */ + + { 0x4B2, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҳ */ + { 0x4B3, AF_IGNORE_SMALL_BOTTOM }, /* ҳ */ + { 0x4B4, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҵ */ + { 0x4B5, AF_IGNORE_SMALL_BOTTOM }, /* ҵ */ + { 0x4B6, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҷ */ + { 0x4B7, AF_IGNORE_SMALL_BOTTOM }, /* ҷ */ + { 0x4BE, AF_IGNORE_CAPITAL_BOTTOM }, /* Ҿ */ + { 0x4BF, AF_IGNORE_SMALL_BOTTOM }, /* ҿ */ + + { 0x4C1, AF_ADJUST_UP }, /* Ӂ */ + { 0x4C2, AF_ADJUST_UP }, /* ӂ */ + { 0x4C5, AF_IGNORE_CAPITAL_BOTTOM }, /* Ӆ */ + { 0x4C6, AF_IGNORE_SMALL_BOTTOM }, /* ӆ */ + { 0x4C9, AF_IGNORE_CAPITAL_BOTTOM }, /* Ӊ */ + { 0x4CA, AF_IGNORE_SMALL_BOTTOM }, /* ӊ */ + { 0x4CB, AF_IGNORE_CAPITAL_BOTTOM }, /* Ӌ */ + { 0x4CC, AF_IGNORE_SMALL_BOTTOM }, /* ӌ */ + { 0x4CD, AF_IGNORE_CAPITAL_BOTTOM }, /* Ӎ */ + { 0x4CE, AF_IGNORE_SMALL_BOTTOM }, /* ӎ */ + + { 0x4D0, AF_ADJUST_UP }, /* Ӑ */ + { 0x4D1, AF_ADJUST_UP }, /* ӑ */ + { 0x4D2, AF_ADJUST_UP }, /* Ӓ */ + { 0x4D3, AF_ADJUST_UP }, /* ӓ */ + { 0x4D6, AF_ADJUST_UP }, /* Ӗ */ + { 0x4D7, AF_ADJUST_UP }, /* ӗ */ + { 0x4DA, AF_ADJUST_UP }, /* Ӛ */ + { 0x4DB, AF_ADJUST_UP }, /* ӛ */ + { 0x4DC, AF_ADJUST_UP }, /* Ӝ */ + { 0x4DD, AF_ADJUST_UP }, /* ӝ */ + { 0x4DE, AF_ADJUST_UP }, /* Ӟ */ + { 0x4DF, AF_ADJUST_UP }, /* ӟ */ + + { 0x4E2, AF_ADJUST_UP }, /* Ӣ */ + { 0x4E3, AF_ADJUST_UP }, /* ӣ */ + { 0x4E4, AF_ADJUST_UP }, /* Ӥ */ + { 0x4E5, AF_ADJUST_UP }, /* ӥ */ + { 0x4E6, AF_ADJUST_UP }, /* Ӧ */ + { 0x4E7, AF_ADJUST_UP }, /* ӧ */ + { 0x4EA, AF_ADJUST_UP }, /* Ӫ */ + { 0x4EB, AF_ADJUST_UP }, /* ӫ */ + { 0x4EC, AF_ADJUST_UP }, /* Ӭ */ + { 0x4ED, AF_ADJUST_UP }, /* ӭ */ + { 0x4EE, AF_ADJUST_UP }, /* Ӯ */ + { 0x4EF, AF_ADJUST_UP }, /* ӯ */ + + { 0x4F0, AF_ADJUST_UP }, /* Ӱ */ + { 0x4F1, AF_ADJUST_UP }, /* ӱ */ + { 0x4F2, AF_ADJUST_UP }, /* Ӳ */ + { 0x4F3, AF_ADJUST_UP }, /* ӳ */ + { 0x4F4, AF_ADJUST_UP }, /* Ӵ */ + { 0x4F5, AF_ADJUST_UP }, /* ӵ */ + { 0x4F6, AF_IGNORE_CAPITAL_BOTTOM }, /* Ӷ */ + { 0x4F7, AF_IGNORE_SMALL_BOTTOM }, /* ӷ */ + { 0x4F8, AF_ADJUST_UP }, /* Ӹ */ + { 0x4F9, AF_ADJUST_UP }, /* ӹ */ + { 0x4FA, AF_IGNORE_CAPITAL_BOTTOM }, /* Ӻ */ + { 0x4FB, AF_IGNORE_SMALL_BOTTOM }, /* ӻ */ + + /* Cyrillic Supplement */ + { 0x506, AF_IGNORE_CAPITAL_BOTTOM }, /* Ԇ */ + { 0x507, AF_IGNORE_SMALL_BOTTOM }, /* ԇ */ + + { 0x524, AF_IGNORE_CAPITAL_BOTTOM }, /* Ԥ */ + { 0x525, AF_IGNORE_SMALL_BOTTOM }, /* ԥ */ + { 0x526, AF_IGNORE_CAPITAL_BOTTOM }, /* Ԧ */ + { 0x527, AF_IGNORE_SMALL_BOTTOM }, /* ԧ */ + { 0x52E, AF_IGNORE_CAPITAL_BOTTOM }, /* Ԯ */ + { 0x52F, AF_IGNORE_SMALL_BOTTOM }, /* ԯ */ + + /* Cherokee */ + { 0x13A5, AF_ADJUST_UP }, /* Ꭵ */ + + /* Phonetic Extensions */ + { 0x1D09, AF_ADJUST_DOWN }, /* ᴉ */ + + { 0x1D4E, AF_ADJUST_DOWN }, /* ᵎ */ + + { 0x1D51, AF_IGNORE_SMALL_BOTTOM }, /* ᵑ */ + + { 0x1D62, AF_ADJUST_UP }, /* ᵢ */ + + /* Phonetic Extensions Supplement */ + { 0x1D80, AF_IGNORE_SMALL_BOTTOM }, /* ᶀ */ + { 0x1D81, AF_IGNORE_SMALL_BOTTOM }, /* ᶁ */ + { 0x1D82, AF_IGNORE_SMALL_BOTTOM }, /* ᶂ */ + { 0x1D84, AF_IGNORE_SMALL_BOTTOM }, /* ᶄ */ + { 0x1D85, AF_IGNORE_SMALL_BOTTOM }, /* ᶅ */ + { 0x1D86, AF_IGNORE_SMALL_BOTTOM }, /* ᶆ */ + { 0x1D87, AF_IGNORE_SMALL_BOTTOM }, /* ᶇ */ + { 0x1D89, AF_IGNORE_SMALL_BOTTOM }, /* ᶉ */ + { 0x1D8A, AF_IGNORE_SMALL_BOTTOM }, /* ᶊ */ + { 0x1D8C, AF_IGNORE_SMALL_BOTTOM }, /* ᶌ */ + { 0x1D8D, AF_IGNORE_SMALL_BOTTOM }, /* ᶍ */ + { 0x1D8E, AF_IGNORE_SMALL_BOTTOM }, /* ᶎ */ + { 0x1D8F, AF_IGNORE_SMALL_BOTTOM }, /* ᶏ */ + + { 0x1D90, AF_IGNORE_SMALL_BOTTOM }, /* ᶐ */ + { 0x1D91, AF_IGNORE_SMALL_BOTTOM }, /* ᶑ */ + { 0x1D92, AF_IGNORE_SMALL_BOTTOM }, /* ᶒ */ + { 0x1D93, AF_IGNORE_SMALL_BOTTOM }, /* ᶓ */ + { 0x1D94, AF_IGNORE_SMALL_BOTTOM }, /* ᶔ */ + { 0x1D95, AF_IGNORE_SMALL_BOTTOM }, /* ᶕ */ + { 0x1D96, AF_ADJUST_UP | AF_IGNORE_SMALL_BOTTOM }, /* ᶖ */ + { 0x1D97, AF_IGNORE_SMALL_BOTTOM }, /* ᶗ */ + { 0x1D98, AF_IGNORE_SMALL_BOTTOM }, /* ᶘ */ + { 0x1D99, AF_IGNORE_SMALL_BOTTOM }, /* ᶙ */ + { 0x1D9A, AF_IGNORE_SMALL_BOTTOM }, /* ᶚ */ + + { 0x1DA4, AF_ADJUST_UP }, /* ᶤ */ + { 0x1DA8, AF_ADJUST_UP }, /* ᶨ */ + { 0x1DA9, AF_IGNORE_SMALL_BOTTOM }, /* ᶩ */ + { 0x1DAA, AF_IGNORE_SMALL_BOTTOM }, /* ᶪ */ + { 0x1DAC, AF_IGNORE_SMALL_BOTTOM }, /* ᶬ */ + { 0x1DAE, AF_IGNORE_SMALL_BOTTOM }, /* ᶮ */ + { 0x1DAF, AF_IGNORE_SMALL_BOTTOM }, /* ᶯ */ + + { 0x1DB3, AF_IGNORE_SMALL_BOTTOM }, /* ᶳ */ + { 0x1DB5, AF_IGNORE_SMALL_BOTTOM }, /* ᶵ */ + { 0x1DBC, AF_IGNORE_SMALL_BOTTOM }, /* ᶼ */ + + /* Latin Extended Additional */ + { 0x1E00, AF_ADJUST_DOWN }, /* Ḁ */ + { 0x1E01, AF_ADJUST_DOWN }, /* ḁ */ + { 0x1E02, AF_ADJUST_UP }, /* Ḃ */ + { 0x1E03, AF_ADJUST_UP }, /* ḃ */ + { 0x1E04, AF_ADJUST_DOWN }, /* Ḅ */ + { 0x1E05, AF_ADJUST_DOWN }, /* ḅ */ + { 0x1E06, AF_ADJUST_DOWN }, /* Ḇ */ + { 0x1E07, AF_ADJUST_DOWN }, /* ḇ */ + { 0x1E08, AF_ADJUST_UP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ḉ */ + { 0x1E09, AF_ADJUST_UP | AF_IGNORE_SMALL_BOTTOM }, /* ḉ */ + { 0x1E0A, AF_ADJUST_UP }, /* Ḋ */ + { 0x1E0B, AF_ADJUST_UP }, /* ḋ */ + { 0x1E0C, AF_ADJUST_DOWN }, /* Ḍ */ + { 0x1E0D, AF_ADJUST_DOWN }, /* ḍ */ + { 0x1E0E, AF_ADJUST_DOWN }, /* Ḏ */ + { 0x1E0F, AF_ADJUST_DOWN }, /* ḏ */ + + { 0x1E10, AF_ADJUST_DOWN }, /* Ḑ */ + { 0x1E11, AF_ADJUST_DOWN }, /* ḑ */ + { 0x1E12, AF_ADJUST_DOWN }, /* Ḓ */ + { 0x1E13, AF_ADJUST_DOWN }, /* ḓ */ + { 0x1E14, AF_ADJUST_UP2 }, /* Ḕ */ + { 0x1E15, AF_ADJUST_UP2 }, /* ḕ */ + { 0x1E16, AF_ADJUST_UP2 }, /* Ḗ */ + { 0x1E17, AF_ADJUST_UP2 }, /* ḗ */ + { 0x1E18, AF_ADJUST_DOWN }, /* Ḙ */ + { 0x1E19, AF_ADJUST_DOWN }, /* ḙ */ + { 0x1E1A, AF_ADJUST_DOWN | AF_ADJUST_TILDE_BOTTOM }, /* Ḛ */ + { 0x1E1B, AF_ADJUST_DOWN | AF_ADJUST_TILDE_BOTTOM }, /* ḛ */ + { 0x1E1C, AF_ADJUST_UP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ḝ */ + { 0x1E1D, AF_ADJUST_UP | AF_IGNORE_SMALL_BOTTOM }, /* ḝ */ + { 0x1E1E, AF_ADJUST_UP }, /* Ḟ */ + { 0x1E1F, AF_ADJUST_UP }, /* ḟ */ + + { 0x1E20, AF_ADJUST_UP }, /* Ḡ */ + { 0x1E21, AF_ADJUST_UP }, /* ḡ */ + { 0x1E22, AF_ADJUST_UP }, /* Ḣ */ + { 0x1E23, AF_ADJUST_UP }, /* ḣ */ + { 0x1E24, AF_ADJUST_DOWN }, /* Ḥ */ + { 0x1E25, AF_ADJUST_DOWN }, /* ḥ */ + { 0x1E26, AF_ADJUST_UP }, /* Ḧ */ + { 0x1E27, AF_ADJUST_UP }, /* ḧ */ + { 0x1E28, AF_IGNORE_CAPITAL_BOTTOM }, /* Ḩ */ + { 0x1E29, AF_IGNORE_SMALL_BOTTOM }, /* ḩ */ + { 0x1E2A, AF_ADJUST_DOWN }, /* Ḫ */ + { 0x1E2B, AF_ADJUST_DOWN }, /* ḫ */ + { 0x1E2C, AF_ADJUST_DOWN | AF_ADJUST_TILDE_BOTTOM }, /* Ḭ */ + { 0x1E2D, AF_ADJUST_UP | AF_ADJUST_DOWN | AF_ADJUST_TILDE_BOTTOM }, /* ḭ */ + { 0x1E2E, AF_ADJUST_UP2 }, /* Ḯ */ + { 0x1E2F, AF_ADJUST_UP2 }, /* ḯ */ + + { 0x1E30, AF_ADJUST_UP }, /* Ḱ */ + { 0x1E31, AF_ADJUST_UP }, /* ḱ */ + { 0x1E32, AF_ADJUST_DOWN }, /* Ḳ */ + { 0x1E33, AF_ADJUST_DOWN }, /* ḳ */ + { 0x1E34, AF_ADJUST_DOWN }, /* Ḵ */ + { 0x1E35, AF_ADJUST_DOWN }, /* ḵ */ + { 0x1E36, AF_ADJUST_DOWN }, /* Ḷ */ + { 0x1E37, AF_ADJUST_DOWN }, /* ḷ */ + { 0x1E38, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ḹ */ + { 0x1E39, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ḹ */ + { 0x1E3A, AF_ADJUST_DOWN }, /* Ḻ */ + { 0x1E3B, AF_ADJUST_DOWN }, /* ḻ */ + { 0x1E3C, AF_ADJUST_DOWN }, /* Ḽ */ + { 0x1E3D, AF_ADJUST_DOWN }, /* ḽ */ + { 0x1E3E, AF_ADJUST_UP }, /* Ḿ */ + { 0x1E3F, AF_ADJUST_UP }, /* ḿ */ + + { 0x1E40, AF_ADJUST_UP }, /* Ṁ */ + { 0x1E41, AF_ADJUST_UP }, /* ṁ */ + { 0x1E42, AF_ADJUST_DOWN }, /* Ṃ */ + { 0x1E43, AF_ADJUST_DOWN }, /* ṃ */ + { 0x1E44, AF_ADJUST_UP }, /* Ṅ */ + { 0x1E45, AF_ADJUST_UP }, /* ṅ */ + { 0x1E46, AF_ADJUST_DOWN }, /* Ṇ */ + { 0x1E47, AF_ADJUST_DOWN }, /* ṇ */ + { 0x1E48, AF_ADJUST_DOWN }, /* Ṉ */ + { 0x1E49, AF_ADJUST_DOWN }, /* ṉ */ + { 0x1E4A, AF_ADJUST_DOWN }, /* Ṋ */ + { 0x1E4B, AF_ADJUST_DOWN }, /* ṋ */ + { 0x1E4C, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP2 }, /* Ṍ */ + { 0x1E4D, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP2 }, /* ṍ */ + { 0x1E4E, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP2 }, /* Ṏ */ + { 0x1E4F, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP2 }, /* ṏ */ + + { 0x1E50, AF_ADJUST_UP2 }, /* Ṑ */ + { 0x1E51, AF_ADJUST_UP2 }, /* ṑ */ + { 0x1E52, AF_ADJUST_UP2 }, /* Ṓ */ + { 0x1E53, AF_ADJUST_UP2 }, /* ṓ */ + { 0x1E54, AF_ADJUST_UP }, /* Ṕ */ + { 0x1E55, AF_ADJUST_UP }, /* ṕ */ + { 0x1E56, AF_ADJUST_UP }, /* Ṗ */ + { 0x1E57, AF_ADJUST_UP }, /* ṗ */ + { 0x1E58, AF_ADJUST_UP }, /* Ṙ */ + { 0x1E59, AF_ADJUST_UP }, /* ṙ */ + { 0x1E5A, AF_ADJUST_DOWN }, /* Ṛ */ + { 0x1E5B, AF_ADJUST_DOWN }, /* ṛ */ + { 0x1E5C, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ṝ */ + { 0x1E5D, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ṝ */ + { 0x1E5E, AF_ADJUST_DOWN }, /* Ṟ */ + { 0x1E5F, AF_ADJUST_DOWN }, /* ṟ */ + + { 0x1E60, AF_ADJUST_UP }, /* Ṡ */ + { 0x1E61, AF_ADJUST_UP }, /* ṡ */ + { 0x1E62, AF_ADJUST_DOWN }, /* Ṣ */ + { 0x1E63, AF_ADJUST_DOWN }, /* ṣ */ + { 0x1E64, AF_ADJUST_UP }, /* Ṥ */ + { 0x1E65, AF_ADJUST_UP }, /* ṥ */ + { 0x1E66, AF_ADJUST_UP }, /* Ṧ */ + { 0x1E67, AF_ADJUST_UP }, /* ṧ */ + { 0x1E68, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ṩ */ + { 0x1E69, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ṩ */ + { 0x1E6A, AF_ADJUST_UP }, /* Ṫ */ + { 0x1E6B, AF_ADJUST_UP }, /* ṫ */ + { 0x1E6C, AF_ADJUST_DOWN }, /* Ṭ */ + { 0x1E6D, AF_ADJUST_DOWN }, /* ṭ */ + { 0x1E6E, AF_ADJUST_DOWN }, /* Ṯ */ + { 0x1E6F, AF_ADJUST_DOWN }, /* ṯ */ + + { 0x1E70, AF_ADJUST_DOWN }, /* Ṱ */ + { 0x1E71, AF_ADJUST_DOWN }, /* ṱ */ + { 0x1E72, AF_ADJUST_DOWN }, /* Ṳ */ + { 0x1E73, AF_ADJUST_DOWN }, /* ṳ */ + { 0x1E74, AF_ADJUST_DOWN | AF_ADJUST_TILDE_BOTTOM }, /* Ṵ */ + { 0x1E75, AF_ADJUST_DOWN | AF_ADJUST_TILDE_BOTTOM }, /* ṵ */ + { 0x1E76, AF_ADJUST_DOWN }, /* Ṷ */ + { 0x1E77, AF_ADJUST_DOWN }, /* ṷ */ + { 0x1E78, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP2 }, /* Ṹ */ + { 0x1E79, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP2 }, /* ṹ */ + { 0x1E7A, AF_ADJUST_UP2 }, /* Ṻ */ + { 0x1E7B, AF_ADJUST_UP2 }, /* ṻ */ + { 0x1E7C, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ṽ */ + { 0x1E7D, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ṽ */ + { 0x1E7E, AF_ADJUST_DOWN }, /* Ṿ */ + { 0x1E7F, AF_ADJUST_DOWN }, /* ṿ */ + + { 0x1E80, AF_ADJUST_UP }, /* Ẁ */ + { 0x1E81, AF_ADJUST_UP }, /* ẁ */ + { 0x1E82, AF_ADJUST_UP }, /* Ẃ */ + { 0x1E83, AF_ADJUST_UP }, /* ẃ */ + { 0x1E84, AF_ADJUST_UP }, /* Ẅ */ + { 0x1E85, AF_ADJUST_UP }, /* ẅ */ + { 0x1E86, AF_ADJUST_UP }, /* Ẇ */ + { 0x1E87, AF_ADJUST_UP }, /* ẇ */ + { 0x1E88, AF_ADJUST_DOWN }, /* Ẉ */ + { 0x1E89, AF_ADJUST_DOWN }, /* ẉ */ + { 0x1E8A, AF_ADJUST_UP }, /* Ẋ */ + { 0x1E8B, AF_ADJUST_UP }, /* ẋ */ + { 0x1E8C, AF_ADJUST_UP }, /* Ẍ */ + { 0x1E8D, AF_ADJUST_UP }, /* ẍ */ + { 0x1E8E, AF_ADJUST_UP }, /* Ẏ */ + { 0x1E8F, AF_ADJUST_UP }, /* ẏ */ + + { 0x1E90, AF_ADJUST_UP }, /* Ẑ */ + { 0x1E91, AF_ADJUST_UP }, /* ẑ */ + { 0x1E92, AF_ADJUST_DOWN }, /* Ẓ */ + { 0x1E93, AF_ADJUST_DOWN }, /* ẓ */ + { 0x1E94, AF_ADJUST_DOWN }, /* Ẕ */ + { 0x1E95, AF_ADJUST_DOWN }, /* ẕ */ + { 0x1E96, AF_ADJUST_DOWN }, /* ẖ */ + { 0x1E97, AF_ADJUST_UP }, /* ẗ */ + { 0x1E98, AF_ADJUST_UP }, /* ẘ */ + { 0x1E99, AF_ADJUST_UP }, /* ẙ */ + { 0x1E9A, AF_ADJUST_UP }, /* ẚ */ + { 0x1E9B, AF_ADJUST_UP }, /* ẛ */ + + { 0x1EA0, AF_ADJUST_DOWN }, /* Ạ */ + { 0x1EA1, AF_ADJUST_DOWN }, /* ạ */ + { 0x1EA2, AF_ADJUST_UP }, /* Ả */ + { 0x1EA3, AF_ADJUST_UP }, /* ả */ + { 0x1EA4, AF_ADJUST_UP2 }, /* Ấ */ + { 0x1EA5, AF_ADJUST_UP2 }, /* ấ */ + { 0x1EA6, AF_ADJUST_UP2 }, /* Ầ */ + { 0x1EA7, AF_ADJUST_UP2 }, /* ầ */ + { 0x1EA8, AF_ADJUST_UP2 }, /* Ẩ */ + { 0x1EA9, AF_ADJUST_UP2 }, /* ẩ */ + { 0x1EAA, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* Ẫ */ + { 0x1EAB, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ẫ */ + { 0x1EAC, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ậ */ + { 0x1EAD, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ậ */ + { 0x1EAE, AF_ADJUST_UP2 }, /* Ắ */ + { 0x1EAF, AF_ADJUST_UP2 }, /* ắ */ + + { 0x1EB0, AF_ADJUST_UP2 }, /* Ằ */ + { 0x1EB1, AF_ADJUST_UP2 }, /* ằ */ + { 0x1EB2, AF_ADJUST_UP2 }, /* Ẳ */ + { 0x1EB3, AF_ADJUST_UP2 }, /* ẳ */ + { 0x1EB4, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* Ẵ */ + { 0x1EB5, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ẵ */ + { 0x1EB6, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ặ */ + { 0x1EB7, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ặ */ + { 0x1EB8, AF_ADJUST_DOWN }, /* Ẹ */ + { 0x1EB9, AF_ADJUST_DOWN }, /* ẹ */ + { 0x1EBA, AF_ADJUST_UP }, /* Ẻ */ + { 0x1EBB, AF_ADJUST_UP }, /* ẻ */ + { 0x1EBC, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ẽ */ + { 0x1EBD, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ẽ */ + { 0x1EBE, AF_ADJUST_UP2 }, /* Ế */ + { 0x1EBF, AF_ADJUST_UP2 }, /* ế */ + + { 0x1EC0, AF_ADJUST_UP2 }, /* Ề */ + { 0x1EC1, AF_ADJUST_UP2 }, /* ề */ + { 0x1EC2, AF_ADJUST_UP2 }, /* Ể */ + { 0x1EC3, AF_ADJUST_UP2 }, /* ể */ + { 0x1EC4, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* Ễ */ + { 0x1EC5, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ễ */ + { 0x1EC6, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ệ */ + { 0x1EC7, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ệ */ + { 0x1EC8, AF_ADJUST_UP }, /* Ỉ */ + { 0x1EC9, AF_ADJUST_UP }, /* ỉ */ + { 0x1ECA, AF_ADJUST_DOWN }, /* Ị */ + { 0x1ECB, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ị */ + { 0x1ECC, AF_ADJUST_DOWN }, /* Ọ */ + { 0x1ECD, AF_ADJUST_DOWN }, /* ọ */ + { 0x1ECE, AF_ADJUST_UP }, /* Ỏ */ + { 0x1ECF, AF_ADJUST_UP }, /* ỏ */ + + { 0x1ED0, AF_ADJUST_UP2 }, /* Ố */ + { 0x1ED1, AF_ADJUST_UP2 }, /* ố */ + { 0x1ED2, AF_ADJUST_UP2 }, /* Ồ */ + { 0x1ED3, AF_ADJUST_UP2 }, /* ồ */ + { 0x1ED4, AF_ADJUST_UP2 }, /* Ổ */ + { 0x1ED5, AF_ADJUST_UP2 }, /* ổ */ + { 0x1ED6, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* Ỗ */ + { 0x1ED7, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ỗ */ + { 0x1ED8, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* Ộ */ + { 0x1ED9, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ộ */ + { 0x1EDA, AF_ADJUST_UP | AF_IGNORE_CAPITAL_TOP }, /* Ớ */ + { 0x1EDB, AF_ADJUST_UP | AF_IGNORE_SMALL_TOP }, /* ớ */ + { 0x1EDC, AF_ADJUST_UP | AF_IGNORE_CAPITAL_TOP }, /* Ờ */ + { 0x1EDD, AF_ADJUST_UP | AF_IGNORE_SMALL_TOP }, /* ờ */ + { 0x1EDE, AF_ADJUST_UP | AF_IGNORE_CAPITAL_TOP }, /* Ở */ + { 0x1EDF, AF_ADJUST_UP | AF_IGNORE_SMALL_TOP }, /* ở */ + + { 0x1EE0, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_IGNORE_CAPITAL_TOP }, /* Ỡ */ + { 0x1EE1, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_IGNORE_SMALL_TOP }, /* ỡ */ + { 0x1EE2, AF_ADJUST_DOWN | AF_IGNORE_CAPITAL_TOP }, /* Ợ */ + { 0x1EE3, AF_ADJUST_DOWN | AF_IGNORE_SMALL_TOP }, /* ợ */ + { 0x1EE4, AF_ADJUST_DOWN }, /* Ụ */ + { 0x1EE5, AF_ADJUST_DOWN }, /* ụ */ + { 0x1EE6, AF_ADJUST_UP }, /* Ủ */ + { 0x1EE7, AF_ADJUST_UP }, /* ủ */ + { 0x1EE8, AF_ADJUST_UP | AF_IGNORE_CAPITAL_TOP }, /* Ứ */ + { 0x1EE9, AF_ADJUST_UP | AF_IGNORE_SMALL_TOP }, /* ứ */ + { 0x1EEA, AF_ADJUST_UP | AF_IGNORE_CAPITAL_TOP }, /* Ừ */ + { 0x1EEB, AF_ADJUST_UP | AF_IGNORE_SMALL_TOP }, /* ừ */ + { 0x1EEC, AF_ADJUST_UP | AF_IGNORE_CAPITAL_TOP }, /* Ử */ + { 0x1EED, AF_ADJUST_UP | AF_IGNORE_SMALL_TOP }, /* ử */ + { 0x1EEE, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_IGNORE_CAPITAL_TOP }, /* Ữ */ + { 0x1EEF, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_IGNORE_SMALL_TOP }, /* ữ */ + + { 0x1EF0, AF_ADJUST_DOWN | AF_IGNORE_CAPITAL_TOP }, /* Ự */ + { 0x1EF1, AF_ADJUST_DOWN | AF_IGNORE_SMALL_TOP }, /* ự */ + { 0x1EF2, AF_ADJUST_UP }, /* Ỳ */ + { 0x1EF3, AF_ADJUST_UP }, /* ỳ */ + { 0x1EF4, AF_ADJUST_DOWN }, /* Ỵ */ + { 0x1EF5, AF_ADJUST_DOWN }, /* ỵ */ + { 0x1EF6, AF_ADJUST_UP }, /* Ỷ */ + { 0x1EF7, AF_ADJUST_UP }, /* ỷ */ + { 0x1EF8, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* Ỹ */ + { 0x1EF9, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ỹ */ + + /* Greek Extended */ + { 0x1F00, AF_ADJUST_UP }, /* ἀ */ + { 0x1F01, AF_ADJUST_UP }, /* ἁ */ + { 0x1F02, AF_ADJUST_UP }, /* ἂ */ + { 0x1F03, AF_ADJUST_UP }, /* ἃ */ + { 0x1F04, AF_ADJUST_UP }, /* ἄ */ + { 0x1F05, AF_ADJUST_UP }, /* ἅ */ + { 0x1F06, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ἆ */ + { 0x1F07, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ἇ */ + + { 0x1F10, AF_ADJUST_UP }, /* ἐ */ + { 0x1F11, AF_ADJUST_UP }, /* ἑ */ + { 0x1F12, AF_ADJUST_UP }, /* ἒ */ + { 0x1F13, AF_ADJUST_UP }, /* ἓ */ + { 0x1F14, AF_ADJUST_UP }, /* ἔ */ + { 0x1F15, AF_ADJUST_UP }, /* ἕ */ + + { 0x1F20, AF_ADJUST_UP }, /* ἠ */ + { 0x1F21, AF_ADJUST_UP }, /* ἡ */ + { 0x1F22, AF_ADJUST_UP }, /* ἢ */ + { 0x1F23, AF_ADJUST_UP }, /* ἣ */ + { 0x1F24, AF_ADJUST_UP }, /* ἤ */ + { 0x1F25, AF_ADJUST_UP }, /* ἥ */ + { 0x1F26, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ἦ */ + { 0x1F27, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ἧ */ + + { 0x1F30, AF_ADJUST_UP }, /* ἰ */ + { 0x1F31, AF_ADJUST_UP }, /* ἱ */ + { 0x1F32, AF_ADJUST_UP }, /* ἲ */ + { 0x1F33, AF_ADJUST_UP }, /* ἳ */ + { 0x1F34, AF_ADJUST_UP }, /* ἴ */ + { 0x1F35, AF_ADJUST_UP }, /* ἵ */ + { 0x1F36, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ἶ */ + { 0x1F37, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ἷ */ + + { 0x1F40, AF_ADJUST_UP }, /* ὀ */ + { 0x1F41, AF_ADJUST_UP }, /* ὁ */ + { 0x1F42, AF_ADJUST_UP }, /* ὂ */ + { 0x1F43, AF_ADJUST_UP }, /* ὃ */ + { 0x1F44, AF_ADJUST_UP }, /* ὄ */ + { 0x1F45, AF_ADJUST_UP }, /* ὅ */ + + { 0x1F50, AF_ADJUST_UP }, /* ὐ */ + { 0x1F51, AF_ADJUST_UP }, /* ὑ */ + { 0x1F52, AF_ADJUST_UP }, /* ὒ */ + { 0x1F53, AF_ADJUST_UP }, /* ὓ */ + { 0x1F54, AF_ADJUST_UP }, /* ὔ */ + { 0x1F55, AF_ADJUST_UP }, /* ὕ */ + { 0x1F56, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ὖ */ + { 0x1F57, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ὗ */ + + { 0x1F60, AF_ADJUST_UP }, /* ὠ */ + { 0x1F61, AF_ADJUST_UP }, /* ὡ */ + { 0x1F62, AF_ADJUST_UP }, /* ὢ */ + { 0x1F63, AF_ADJUST_UP }, /* ὣ */ + { 0x1F64, AF_ADJUST_UP }, /* ὤ */ + { 0x1F65, AF_ADJUST_UP }, /* ὥ */ + { 0x1F66, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ὦ */ + { 0x1F67, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ὧ */ + + { 0x1F70, AF_ADJUST_UP }, /* ὰ */ + { 0x1F71, AF_ADJUST_UP }, /* ά */ + { 0x1F72, AF_ADJUST_UP }, /* ὲ */ + { 0x1F73, AF_ADJUST_UP }, /* έ */ + { 0x1F74, AF_ADJUST_UP }, /* ὴ */ + { 0x1F75, AF_ADJUST_UP }, /* ή */ + { 0x1F76, AF_ADJUST_UP }, /* ὶ */ + { 0x1F77, AF_ADJUST_UP }, /* ί */ + { 0x1F78, AF_ADJUST_UP }, /* ὸ */ + { 0x1F79, AF_ADJUST_UP }, /* ό */ + { 0x1F7A, AF_ADJUST_UP }, /* ὺ */ + { 0x1F7B, AF_ADJUST_UP }, /* ύ */ + { 0x1F7C, AF_ADJUST_UP }, /* ὼ */ + { 0x1F7D, AF_ADJUST_UP }, /* ώ */ + + { 0x1F80, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾀ */ + { 0x1F81, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾁ */ + { 0x1F82, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾂ */ + { 0x1F83, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾃ */ + { 0x1F84, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾄ */ + { 0x1F85, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾅ */ + { 0x1F86, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾆ */ + { 0x1F87, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾇ */ + { 0x1F88, AF_ADJUST_DOWN }, /* ᾈ */ + { 0x1F89, AF_ADJUST_DOWN }, /* ᾉ */ + { 0x1F8A, AF_ADJUST_DOWN }, /* ᾊ */ + { 0x1F8B, AF_ADJUST_DOWN }, /* ᾋ */ + { 0x1F8C, AF_ADJUST_DOWN }, /* ᾌ */ + { 0x1F8D, AF_ADJUST_DOWN }, /* ᾍ */ + { 0x1F8E, AF_ADJUST_DOWN }, /* ᾎ */ + { 0x1F8F, AF_ADJUST_DOWN }, /* ᾏ */ + + { 0x1F90, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾐ */ + { 0x1F91, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾑ */ + { 0x1F92, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾒ */ + { 0x1F93, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾓ */ + { 0x1F94, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾔ */ + { 0x1F95, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾕ */ + { 0x1F96, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾖ */ + { 0x1F97, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾗ */ + { 0x1F98, AF_ADJUST_DOWN }, /* ᾘ */ + { 0x1F99, AF_ADJUST_DOWN }, /* ᾙ */ + { 0x1F9A, AF_ADJUST_DOWN }, /* ᾚ */ + { 0x1F9B, AF_ADJUST_DOWN }, /* ᾛ */ + { 0x1F9C, AF_ADJUST_DOWN }, /* ᾜ */ + { 0x1F9D, AF_ADJUST_DOWN }, /* ᾝ */ + { 0x1F9E, AF_ADJUST_DOWN }, /* ᾞ */ + { 0x1F9F, AF_ADJUST_DOWN }, /* ᾟ */ + + { 0x1FA0, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾠ */ + { 0x1FA1, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾡ */ + { 0x1FA2, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾢ */ + { 0x1FA3, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾣ */ + { 0x1FA4, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾤ */ + { 0x1FA5, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾥ */ + { 0x1FA6, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾦ */ + { 0x1FA7, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾧ */ + { 0x1FA8, AF_ADJUST_DOWN }, /* ᾨ */ + { 0x1FA9, AF_ADJUST_DOWN }, /* ᾩ */ + { 0x1FAA, AF_ADJUST_DOWN }, /* ᾪ */ + { 0x1FAB, AF_ADJUST_DOWN }, /* ᾫ */ + { 0x1FAC, AF_ADJUST_DOWN }, /* ᾬ */ + { 0x1FAD, AF_ADJUST_DOWN }, /* ᾭ */ + { 0x1FAE, AF_ADJUST_DOWN }, /* ᾮ */ + { 0x1FAF, AF_ADJUST_DOWN }, /* ᾯ */ + + { 0x1FB0, AF_ADJUST_UP }, /* ᾰ */ + { 0x1FB1, AF_ADJUST_UP }, /* ᾱ */ + { 0x1FB2, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾲ */ + { 0x1FB3, AF_ADJUST_DOWN }, /* ᾳ */ + { 0x1FB4, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ᾴ */ + { 0x1FB6, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ᾶ */ + { 0x1FB7, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ᾷ */ + { 0x1FB8, AF_ADJUST_UP }, /* Ᾰ */ + { 0x1FB9, AF_ADJUST_UP }, /* Ᾱ */ + { 0x1FBC, AF_ADJUST_DOWN }, /* ᾼ */ + + { 0x1FC2, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ῂ */ + { 0x1FC3, AF_ADJUST_DOWN }, /* ῃ */ + { 0x1FC4, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ῄ */ + { 0x1FC6, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ῆ */ + { 0x1FC7, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ῇ */ + { 0x1FCC, AF_ADJUST_DOWN }, /* ῌ */ + + { 0x1FD0, AF_ADJUST_UP }, /* ῐ */ + { 0x1FD1, AF_ADJUST_UP }, /* ῑ */ + { 0x1FD2, AF_ADJUST_UP2 }, /* ῒ */ + { 0x1FD3, AF_ADJUST_UP2 }, /* ΐ */ + { 0x1FD6, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ῖ */ + { 0x1FD7, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ῗ */ + { 0x1FD8, AF_ADJUST_UP }, /* Ῐ */ + { 0x1FD9, AF_ADJUST_UP }, /* Ῑ */ + + { 0x1FE0, AF_ADJUST_UP }, /* ῠ */ + { 0x1FE1, AF_ADJUST_UP }, /* ῡ */ + { 0x1FE2, AF_ADJUST_UP2 }, /* ῢ */ + { 0x1FE3, AF_ADJUST_UP2 }, /* ΰ */ + { 0x1FE4, AF_ADJUST_UP }, /* ῤ */ + { 0x1FE5, AF_ADJUST_UP }, /* ῥ */ + { 0x1FE6, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ῦ */ + { 0x1FE7, AF_ADJUST_UP2 | AF_ADJUST_TILDE_TOP }, /* ῧ */ + { 0x1FE8, AF_ADJUST_UP }, /* Ῠ */ + { 0x1FE9, AF_ADJUST_UP }, /* Ῡ */ + { 0x1FF2, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ῲ */ + { 0x1FF3, AF_ADJUST_DOWN }, /* ῳ */ + { 0x1FF4, AF_ADJUST_UP | AF_ADJUST_DOWN }, /* ῴ */ + { 0x1FF6, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP }, /* ῶ */ + { 0x1FF7, AF_ADJUST_UP | AF_ADJUST_TILDE_TOP | AF_ADJUST_DOWN }, /* ῷ */ + { 0x1FFC, AF_ADJUST_DOWN }, /* ῼ */ + + /* General Punctuation */ + { 0x203C, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ‼ */ + { 0x203D, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ‽ */ + + { 0x2047, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ⁇ */ + { 0x2048, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ⁈ */ + { 0x2049, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ⁉ */ + + /* Superscripts and Subscripts */ + { 0x2071, AF_ADJUST_UP }, /* ⁱ */ + + /* Currency Symbols */ + { 0x20AB, AF_ADJUST_DOWN }, /* ₫ */ + + { 0x20C0, AF_ADJUST_DOWN }, /* ⃀ */ + + /* Number Forms */ + { 0x2170, AF_ADJUST_UP }, /* ⅰ */ + { 0x2171, AF_ADJUST_UP }, /* ⅱ */ + { 0x2172, AF_ADJUST_UP }, /* ⅲ */ + { 0x2173, AF_ADJUST_UP }, /* ⅳ */ + { 0x2175, AF_ADJUST_UP }, /* ⅵ */ + { 0x2176, AF_ADJUST_UP }, /* ⅶ */ + { 0x2177, AF_ADJUST_UP }, /* ⅷ */ + { 0x2178, AF_ADJUST_UP }, /* ⅸ */ + { 0x217A, AF_ADJUST_UP }, /* ⅺ */ + { 0x217B, AF_ADJUST_UP }, /* ⅻ */ + + /* Latin Extended-C */ + { 0x2C64, AF_IGNORE_CAPITAL_BOTTOM } , /* Ɽ */ + { 0x2C67, AF_IGNORE_CAPITAL_BOTTOM } , /* Ⱨ */ + { 0x2C68, AF_IGNORE_SMALL_BOTTOM } , /* ⱨ */ + { 0x2C69, AF_IGNORE_CAPITAL_BOTTOM } , /* Ⱪ */ + { 0x2C6A, AF_IGNORE_SMALL_BOTTOM } , /* ⱪ */ + { 0x2C6B, AF_IGNORE_CAPITAL_BOTTOM } , /* Ⱬ */ + { 0x2C6C, AF_IGNORE_SMALL_BOTTOM } , /* ⱬ */ + { 0x2C6E, AF_IGNORE_CAPITAL_BOTTOM } , /* Ɱ */ + + { 0x2C7C, AF_ADJUST_UP }, /* ⱼ */ + { 0x2C7E, AF_IGNORE_CAPITAL_BOTTOM } , /* Ȿ */ + { 0x2C7F, AF_IGNORE_CAPITAL_BOTTOM } , /* Ɀ */ + + /* Coptic */ + { 0x2CC2, AF_ADJUST_UP }, /* Ⳃ */ + { 0x2CC3, AF_ADJUST_UP }, /* ⳃ */ + + /* Supplemental Punctuation */ + { 0x2E18, AF_ADJUST_UP }, /* ⸘ */ + + { 0x2E2E, AF_ADJUST_UP | AF_ADJUST_NO_HEIGHT_CHECK }, /* ⸮ */ + + /* Cyrillic Extended-B */ + { 0xA640, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꙁ */ + { 0xA641, AF_IGNORE_SMALL_BOTTOM } , /* ꙁ */ + { 0xA642, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꙃ */ + { 0xA643, AF_IGNORE_SMALL_BOTTOM } , /* ꙃ */ + + { 0xA680, AF_IGNORE_CAPITAL_TOP } , /* Ꚁ */ + { 0xA681, AF_IGNORE_SMALL_TOP } , /* ꚁ */ + { 0xA688, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꚉ */ + { 0xA689, AF_IGNORE_SMALL_BOTTOM } , /* ꚉ */ + { 0xA68A, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꚋ */ + { 0xA68B, AF_IGNORE_SMALL_BOTTOM } , /* ꚋ */ + { 0xA68E, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꚏ */ + { 0xA68F, AF_IGNORE_SMALL_BOTTOM } , /* ꚏ */ + + { 0xA690, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꚑ */ + { 0xA691, AF_IGNORE_SMALL_BOTTOM } , /* ꚑ */ + { 0xA696, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꚗ */ + { 0xA697, AF_IGNORE_SMALL_BOTTOM } , /* ꚗ */ + + /* Latin Extended-D */ + { 0xA726, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꜧ */ + { 0xA727, AF_IGNORE_SMALL_BOTTOM } , /* ꜧ */ + + { 0xA756, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꝗ */ + { 0xA758, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꝙ */ + + { 0xA771, AF_IGNORE_SMALL_BOTTOM } , /* ꝱ */ + { 0xA772, AF_IGNORE_SMALL_BOTTOM } , /* ꝲ */ + { 0xA773, AF_IGNORE_SMALL_BOTTOM } , /* ꝳ */ + { 0xA774, AF_IGNORE_SMALL_BOTTOM } , /* ꝴ */ + { 0xA776, AF_IGNORE_SMALL_BOTTOM } , /* ꝶ */ + + { 0xA790, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꞑ */ + { 0xA791, AF_IGNORE_SMALL_BOTTOM } , /* ꞑ */ + { 0xA794, AF_IGNORE_SMALL_BOTTOM } , /* ꞔ */ + { 0xA795, AF_IGNORE_SMALL_BOTTOM } , /* ꞕ */ + + { 0xA7C0, AF_IGNORE_CAPITAL_TOP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ꟁ */ + { 0xA7C1, AF_IGNORE_SMALL_TOP | AF_IGNORE_SMALL_BOTTOM }, /* ꟁ */ + { 0xA7C4, AF_IGNORE_CAPITAL_BOTTOM } , /* Ꞔ */ + { 0xA7C5, AF_IGNORE_CAPITAL_BOTTOM } , /* Ʂ */ + { 0xA7C6, AF_IGNORE_CAPITAL_BOTTOM } , /* Ᶎ */ + { 0xA7CC, AF_IGNORE_CAPITAL_TOP | AF_IGNORE_CAPITAL_BOTTOM }, /* Ꟍ */ + { 0xA7CD, AF_IGNORE_SMALL_TOP | AF_IGNORE_SMALL_BOTTOM }, /* ꟍ */ + + /* Latin Extended-E */ + { 0xAB3C, AF_IGNORE_SMALL_BOTTOM } , /* ꬼ */ + + { 0xAB46, AF_IGNORE_SMALL_BOTTOM } , /* ꭆ */ + + { 0xAB5C, AF_IGNORE_SMALL_BOTTOM } , /* ꭜ */ + + { 0xAB66, AF_IGNORE_SMALL_BOTTOM } , /* ꭦ */ + { 0xAB67, AF_IGNORE_SMALL_BOTTOM } , /* ꭧ */ + }; + + + FT_LOCAL_DEF( FT_UInt32 ) + af_adjustment_database_lookup( FT_UInt32 codepoint ) + { + /* Binary search for database entry */ + FT_Offset low = 0; + FT_Offset high = AF_ADJUSTMENT_DATABASE_LENGTH - 1; + + + while ( high >= low ) + { + FT_Offset mid = ( low + high ) / 2; + FT_UInt32 mid_codepoint = adjustment_database[mid].codepoint; + + + if ( mid_codepoint < codepoint ) + low = mid + 1; + else if ( mid_codepoint > codepoint ) + high = mid - 1; + else + return adjustment_database[mid].flags; + } + + return 0; + } + + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + + static FT_Error + add_substitute( FT_Int glyph_idx, + size_t value, + FT_UInt32 codepoint, + FT_Hash reverse_map, + FT_Hash subst_map, + FT_Memory memory ) + { + FT_Error error; + + FT_Int first_substitute = (FT_Int)( value & 0xFFFF ); + + FT_UInt used = reverse_map->used; + + + /* + OpenType features like 'unic' map lowercase letter glyphs to uppercase + forms (and vice versa), which could lead to the use of wrong entries + in the adjustment database. For this reason we don't overwrite, + prioritizing cmap entries. + + XXX Note, however, that this cannot cover all cases since there might + be contradictory entries for glyphs not in the cmap. A possible + solution might be to specially mark pairs of related lowercase and + uppercase characters in the adjustment database that have diacritics + on different vertical sides (for example, U+0122 'Ģ' and U+0123 'ģ'). + The auto-hinter could then perform a topological analysis to do the + right thing. + */ + error = ft_hash_num_insert_no_overwrite( first_substitute, codepoint, + reverse_map, memory ); + if ( error ) + return error; + + if ( reverse_map->used > used ) + { + size_t* subst = ft_hash_num_lookup( first_substitute, subst_map ); + + + if ( subst ) + { + error = add_substitute( first_substitute, *subst, codepoint, + reverse_map, subst_map, memory ); + if ( error ) + return error; + } + } + + /* The remaining substitutes. */ + if ( value & 0xFFFF0000U ) + { + FT_UInt num_substitutes = value >> 16; + + FT_UInt i; + + + for ( i = 1; i <= num_substitutes; i++ ) + { + FT_Int idx = glyph_idx + (FT_Int)( i << 16 ); + size_t* substitute = ft_hash_num_lookup( idx, subst_map ); + + + used = reverse_map->used; + + error = ft_hash_num_insert_no_overwrite( *substitute, + codepoint, + reverse_map, + memory ); + if ( error ) + return error; + + if ( reverse_map->used > used ) + { + size_t* subst = ft_hash_num_lookup( *substitute, subst_map ); + + + if ( subst ) + { + error = add_substitute( *substitute, *subst, codepoint, + reverse_map, subst_map, memory ); + if ( error ) + return error; + } + } + } + } + + return FT_Err_Ok; + } + +#endif /* FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + /* Construct a 'reverse cmap' (i.e., a mapping from glyph indices to */ + /* character codes) for all glyphs that an input code point could turn */ + /* into. */ + /* */ + /* If HarfBuzz support is not available, this is the direct inversion */ + /* of the cmap table, otherwise the mapping gets extended with data */ + /* from the 'GSUB' table. */ + FT_LOCAL_DEF( FT_Error ) + af_reverse_character_map_new( FT_Hash *map, + AF_StyleMetrics metrics ) + { + FT_Error error; + + AF_FaceGlobals globals = metrics->globals; + FT_Face face = globals->face; + FT_Memory memory = face->memory; + + FT_CharMap old_charmap; + + FT_UInt32 codepoint; + FT_Offset i; + + + FT_TRACE4(( "af_reverse_character_map_new:" + " building reverse character map (style `%s')\n", + af_style_names[metrics->style_class->style] )); + + /* Search for a unicode charmap. */ + /* If there isn't one, create a blank map. */ + + /* Back up `face->charmap` because `find_unicode_charmap` sets it. */ + old_charmap = face->charmap; + + if ( ( error = find_unicode_charmap( face ) ) ) + goto Exit; + + *map = NULL; + if ( FT_QNEW( *map ) ) + goto Exit; + + error = ft_hash_num_init( *map, memory ); + if ( error ) + goto Exit; + + /* Initialize reverse cmap with data directly from the cmap table. */ + for ( i = 0; i < AF_ADJUSTMENT_DATABASE_LENGTH; i++ ) + { + FT_Int cmap_glyph; + + + /* + We cannot restrict `codepoint` to character ranges; we have no + control what data the script-specific portion of the GSUB table + actually holds. + + An example is `arial.ttf` version 7.00; in this font, there are + lookups for Cyrillic (lookup 43), Greek (lookup 44), and Latin + (lookup 45) that map capital letter glyphs to small capital glyphs. + It is tempting to expect that script-specific versions of the 'c2sc' + feature only use script-specific lookups. However, this is not the + case in this font: the feature uses all three lookups regardless of + the script. + + The auto-hinter, while assigning glyphs to styles, uses the first + coverage result it encounters for a particular glyph. For example, + if the coverage for Cyrillic is tested before Latin (as is currently + the case), glyphs without a cmap entry that are covered in 'c2sc' + are treated as Cyrillic. + + If we now look at glyph 3498, which is a small-caps version of the + Latin character 'A grave' (U+00C0, glyph 172), we can see that it is + registered as belonging to a Cyrillic style due to the algorithm + just described. As a result, checking only for characters from the + Latin range would miss this glyph; we thus have to test all + character codes in the database. + */ + codepoint = adjustment_database[i].codepoint; + + cmap_glyph = (FT_Int)FT_Get_Char_Index( face, codepoint ); + if ( cmap_glyph == 0 ) + continue; + + error = ft_hash_num_insert( cmap_glyph, codepoint, *map, memory ); + if ( error ) + goto Exit; + } + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + + if ( ft_hb_enabled( globals ) ) + { + hb_font_t *hb_font; + hb_face_t *hb_face; + + hb_set_t *gsub_lookups; + hb_script_t script; + + unsigned int script_count = 1; + hb_tag_t script_tags[2] = { HB_TAG_NONE, HB_TAG_NONE }; + + FT_Hash subst_map = NULL; + + hb_codepoint_t idx; + FT_UInt hash_idx; + FT_Int glyph_idx; + size_t value; + + + /* No need to check whether HarfBuzz has allocation issues; */ + /* it continues to work in such cases and simply returns */ + /* 'empty' objects that do nothing. */ + + hb_font = globals->hb_font; + hb_face = hb( font_get_face )( hb_font ); + + gsub_lookups = hb( set_create )(); + + script = af_hb_scripts[metrics->style_class->script]; + + hb( ot_tags_from_script_and_language )( script, NULL, + &script_count, script_tags, + NULL, NULL ); + + /* Compute set of all script-specific GSUB lookups. */ + hb( ot_layout_collect_lookups )( hb_face, + HB_OT_TAG_GSUB, + script_tags, NULL, NULL, + gsub_lookups ); + +#ifdef FT_DEBUG_LEVEL_TRACE + { + FT_Bool have_idx = FALSE; + + + FT_TRACE4(( " GSUB lookups to check:\n" )); + + FT_TRACE4(( " " )); + idx = HB_SET_VALUE_INVALID; + while ( hb( set_next )( gsub_lookups, &idx ) ) + if ( idx < globals->gsub_lookup_count && + globals->gsub_lookups_single_alternate[idx] ) + { + have_idx = TRUE; + FT_TRACE4(( " %u", idx )); + } + if ( !have_idx ) + FT_TRACE4(( " (none)" )); + FT_TRACE4(( "\n" )); + + FT_TRACE4(( "\n" )); + } +#endif + + if ( FT_QNEW( subst_map ) ) + goto Exit_HarfBuzz; + + error = ft_hash_num_init( subst_map, memory ); + if ( error ) + goto Exit_HarfBuzz; + + idx = HB_SET_VALUE_INVALID; + while ( hb( set_next )( gsub_lookups, &idx ) ) + { + FT_UInt32 offset; + + + /* HarfBuzz only validates lookup indices while */ + /* processing lookups, not while collecting them, */ + /* so we have to do that by ourselves. */ + if ( idx < globals->gsub_lookup_count ) + offset = globals->gsub_lookups_single_alternate[idx]; + else + offset = 0; + + /* Put all substitutions into a single hash table. Note that */ + /* the hash values usually contain more than a single character */ + /* code; this can happen if different 'SingleSubst' subtables */ + /* map a given glyph index to different substitutions, or if */ + /* 'AlternateSubst' subtable entries are present. */ + if ( offset ) + af_map_lookup( globals, subst_map, offset ); + } + + /* + Now iterate over the collected substitution data in `subst_map` + (using recursion to resolve one-to-many mappings) and insert the + data into the reverse cmap. + + As an example, suppose we have the following cmap and substitution + data: + + cmap: X -> a + Y -> b + Z -> c + + substitutions: a -> b + b -> c, d + d -> e + + The reverse map now becomes as follows. + + a -> X + b -> Y + c -> Z (via cmap, ignoring mapping from 'b') + d -> Y (via 'b') + e -> Y (via 'b' and 'd') + */ + + hash_idx = 0; + while ( ft_hash_num_iterator( &hash_idx, + &glyph_idx, + &value, + subst_map ) ) + { + size_t* val; + + + /* Ignore keys that do not point to the first substitute. */ + if ( (FT_UInt)glyph_idx & 0xFFFF0000U ) + continue; + + /* Ignore glyph indices that are not related to accents. */ + val = ft_hash_num_lookup( glyph_idx, *map ); + if ( !val ) + continue; + + codepoint = *val; + + error = add_substitute( glyph_idx, value, codepoint, + *map, subst_map, memory ); + if ( error ) + break; + } + + Exit_HarfBuzz: + hb( set_destroy )( gsub_lookups ); + + ft_hash_num_free( subst_map, memory ); + FT_FREE( subst_map ); + + if ( error ) + goto Exit; + } + +#endif /* FT_CONFIG_OPTION_USE_HARFBUZZ */ + + FT_TRACE4(( " reverse character map built successfully" + " with %u entries\n", ( *map )->used )); + +#ifdef FT_DEBUG_LEVEL_TRACE + + { + FT_UInt cnt; + + + FT_TRACE7(( " gidx code flags\n" )); + /* " XXXXX 0xXXXX XXXXXXXXXXX..." */ + FT_TRACE7(( " ------------------------------\n" )); + + for ( cnt = 0; cnt < globals->glyph_count; cnt++ ) + { + size_t* val; + FT_UInt32 adj_type; + + const char* flag_names[] = + { + "up", /* AF_ADJUST_UP */ + "down", /* AF_ADJUST_DOWN */ + "double up", /* AF_ADJUST_UP2 */ + "double down", /* AF_ADJUST_DOWN2 */ + + "top tilde", /* AF_ADJUST_TILDE_TOP */ + "bottom tilde", /* AF_ADJUST_TILDE_BOTTOM */ + "below-top tilde", /* AF_ADJUST_TILDE_TOP2 */ + "above-bottom tilde", /* AF_ADJUST_TILDE_BOTTOM2 */ + + "ignore capital top", /* AF_IGNORE_CAPITAL_TOP */ + "ignore capital bottom", /* AF_IGNORE_CAPITAL_BOTTOM */ + "ignore small top", /* AF_IGNORE_SMALL_TOP */ + "ignore small bottom", /* AF_IGNORE_SMALL_BOTTOM */ + }; + size_t flag_names_size = sizeof ( flag_names ) / sizeof ( char* ); + + char flag_str[256]; + int need_comma; + + size_t j; + + + val = ft_hash_num_lookup( (FT_Int)cnt, *map ); + if ( !val ) + continue; + codepoint = *val; + + adj_type = af_adjustment_database_lookup( codepoint ); + if ( !adj_type ) + continue; + + flag_str[0] = '\0'; + need_comma = 0; + + for ( j = 0; j < flag_names_size; j++ ) + { + if ( adj_type & (1 << j ) ) + { + if ( !need_comma ) + need_comma = 1; + else + strcat( flag_str, ", " ); + strcat( flag_str, flag_names[j] ); + } + } + + FT_TRACE7(( " %5u 0x%04X %s\n", cnt, codepoint, flag_str )); + } + } + +#endif /* FT_DEBUG_LEVEL_TRACE */ + + + Exit: + face->charmap = old_charmap; + + if ( error ) + { + FT_TRACE4(( " error while building reverse character map." + " Using blank map.\n" )); + + if ( *map ) + ft_hash_num_free( *map, memory ); + + FT_FREE( *map ); + *map = NULL; + return error; + } + + return FT_Err_Ok; + } + + + FT_LOCAL_DEF( FT_Error ) + af_reverse_character_map_done( FT_Hash map, + FT_Memory memory ) + { + if ( map ) + ft_hash_num_free( map, memory ); + FT_FREE( map ); + + return FT_Err_Ok; + } + + +/* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,130 @@ +/**************************************************************************** + * + * afadjust.h + * + * Auto-fitter routines to adjust components based on charcode (header). + * + * Copyright (C) 2023-2025 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * Written by Craig White <gerzytet@gmail.com>. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + +#ifndef AFADJUST_H_ +#define AFADJUST_H_ + +#include <freetype/fttypes.h> + +#include "afglobal.h" +#include "aftypes.h" + + +FT_BEGIN_HEADER + + /* + * Adjustment type flags. + * + * They also specify topological constraints that the auto-hinter relies + * on. For example, using `AF_ADJUST_UP` implies that we have two + * enclosing contours, one for the base glyph and one for the diacritic + * above, and no other contour inbetween or above. With 'enclosing' it is + * meant that such a contour can contain more inner contours. + * + */ + + /* Find the topmost contour and push it up until its lowest point is */ + /* one pixel above the highest point not enclosed by that contour. */ +#define AF_ADJUST_UP 0x01 + + /* Find the bottommost contour and push it down until its highest point */ + /* is one pixel below the lowest point not enclosed by that contour. */ +#define AF_ADJUST_DOWN 0x02 + + /* Find the contour below the topmost contour and push it up, together */ + /* with the topmost contour, until its lowest point is one pixel above */ + /* the highest point not enclosed by that contour. This flag is */ + /* mutually exclusive with `AF_ADJUST_UP`. */ +#define AF_ADJUST_UP2 0x04 + + /* Find the contour above the bottommost contour and push it down, */ + /* together with the bottommost contour, until its highest point is */ + /* one pixel below the lowest point not enclosed by that contour. */ + /* This flag is mutually exclusive with `AF_ADJUST_DOWN`. */ +#define AF_ADJUST_DOWN2 0x08 + + /* The topmost contour is a tilde. Enlarge it vertically so that it */ + /* stays legible at small sizes, not degenerating to a horizontal line. */ +#define AF_ADJUST_TILDE_TOP 0x10 + + /* The bottommost contour is a tilde. Enlarge it vertically so that it */ + /* stays legible at small sizes, not degenerating to a horizontal line. */ +#define AF_ADJUST_TILDE_BOTTOM 0x20 + + /* The contour below the topmost contour is a tilde. Enlarge it */ + /* vertically so that it stays legible at small sizes, not degenerating */ + /* to a horizontal line. To be used with `AF_ADJUST_UP2` only. */ +#define AF_ADJUST_TILDE_TOP2 0x40 + + /* The contour above the bottommost contour is a tilde. Enlarge it */ + /* vertically so that it stays legible at small sizes, not degenerating */ + /* to a horizontal line. To be used with `AF_ADJUST_DOWN2` only. */ +#define AF_ADJUST_TILDE_BOTTOM2 0x80 + + /* Make the auto-hinter ignore any diacritic (either a separate contour */ + /* or part of the base character outline) that is attached to the top */ + /* of an uppercase base character. */ +#define AF_IGNORE_CAPITAL_TOP 0x100 + + /* Make the auto-hinter ignore any diacritic (either a separate contour */ + /* or part of the base character outline) that is attached to the */ + /* bottom of an uppercase base character. */ +#define AF_IGNORE_CAPITAL_BOTTOM 0x200 + + /* Make the auto-hinter ignore any diacritic (either a separate contour */ + /* or part of the base character outline) that is attached to the top */ + /* of a lowercase base character. */ +#define AF_IGNORE_SMALL_TOP 0x400 + + /* Make the auto-hinter ignore any diacritic (either a separate contour */ + /* or part of the base character outline) that is attached to the */ + /* bottom of a lowercase base character. */ +#define AF_IGNORE_SMALL_BOTTOM 0x800 + + /* By default, the AF_ADJUST_XXX flags are applied only if diacritics */ + /* have a 'small' height (based on some heuristic checks). If this */ + /* flag is set, no such check is performed. */ +#define AF_ADJUST_NO_HEIGHT_CHECK 0x1000 + + /* No adjustment, i.e., no flag is set. */ +#define AF_ADJUST_NONE 0x00 + + + FT_LOCAL( FT_UInt32 ) + af_adjustment_database_lookup( FT_UInt32 codepoint ); + + /* Allocate and populate the reverse character map, */ + /* using the character map within the face. */ + FT_LOCAL( FT_Error ) + af_reverse_character_map_new( FT_Hash *map, + AF_StyleMetrics metrics ); + + /* Free the reverse character map. */ + FT_LOCAL( FT_Error ) + af_reverse_character_map_done( FT_Hash map, + FT_Memory memory ); + + +FT_END_HEADER + +#endif /* AFADJUST_H_ */ + + +/* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.c 2026-04-17 19:08:13.000000000 +0000 @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -467,24 +467,24 @@ af_blue_stringsets[] = { /* */ - { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_ARABIC_BOTTOM, 0 }, { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_ARMENIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_AVESTAN_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -508,14 +508,14 @@ { AF_BLUE_STRING_CHAKMA_BOTTOM, 0 }, { AF_BLUE_STRING_CHAKMA_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 }, { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_CARIAN_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -527,24 +527,24 @@ { AF_BLUE_STRING_CHEROKEE_SMALL, 0 }, { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0 }, { AF_BLUE_STRING_CYPRIOT_SMALL, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_CYPRIOT_SMALL, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }, - { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }, + { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | @@ -553,12 +553,12 @@ { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }, { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -578,23 +578,23 @@ { AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GOTHIC_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_GREEK_SMALL, 0 }, - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_GREEK_SMALL, 0 }, + { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, { AF_BLUE_STRING_GUJARATI_BOTTOM, 0 }, @@ -643,45 +643,45 @@ { AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_LAO_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 }, - { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 }, + { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 }, - { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 }, + { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_LISU_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_MALAYALAM_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MEDEFAIDRIN_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MEDEFAIDRIN_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_MONGOLIAN_TOP_BASE, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_MONGOLIAN_BOTTOM_BASE, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -691,12 +691,12 @@ { AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_MYANMAR_DESCENDER, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_NKO_BOTTOM, 0 }, + { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_NKO_BOTTOM, 0 }, { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_NKO_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_OL_CHIKI, 0 }, @@ -704,15 +704,15 @@ { AF_BLUE_STRING_OLD_TURKIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 }, - { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM }, + { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 }, + { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_OSMANYA_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, @@ -723,13 +723,13 @@ { AF_BLUE_STRING_SAURASHTRA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 }, - { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 }, + { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 }, + { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 }, { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, - { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 }, - { AF_BLUE_STRING_MAX, 0 }, + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM }, + { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_SINHALA_BOTTOM, 0 }, { AF_BLUE_STRING_SINHALA_DESCENDER, 0 }, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.cin openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.cin --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.cin 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.cin 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat 2026-04-17 19:08:13.000000000 +0000 @@ -2,7 +2,7 @@ // // Auto-fitter data for blue strings. // -// Copyright (C) 2013-2024 by +// Copyright (C) 2013-2025 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, @@ -699,12 +699,12 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: AF_BLUE_STRINGSET_ADLM - { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_ADLAM_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } { AF_BLUE_STRING_ADLAM_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_ARAB { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -713,14 +713,14 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_ARMN - { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_ARMENIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_AVST { AF_BLUE_STRING_AVESTAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -756,14 +756,14 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_CANS - { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM, 0 } { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_CARI { AF_BLUE_STRING_CARIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -781,12 +781,12 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_COPT - { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_COPTIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } { AF_BLUE_STRING_COPTIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_CPRT { AF_BLUE_STRING_CYPRIOT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -796,13 +796,13 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_CYRL - { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } - { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } + { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_DEVA { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -815,12 +815,12 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_DSRT - { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_DESERET_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } { AF_BLUE_STRING_DESERET_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_DESERET_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_ETHI { AF_BLUE_STRING_ETHIOPIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -848,12 +848,12 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_GLAG - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_GOTH { AF_BLUE_STRING_GOTHIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -861,14 +861,14 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_GREK - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_GREEK_SMALL, 0 } - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_GREEK_SMALL, 0 } + { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_GUJR { AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | @@ -935,34 +935,34 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_LATN - { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_LATIN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_LATB - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 } - { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 } + { AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_LATP - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 } - { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 } + { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_LISU { AF_BLUE_STRING_LISU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -975,15 +975,15 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_MEDF - { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_MEDEFAIDRIN_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MEDEFAIDRIN_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MEDEFAIDRIN_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MEDEFAIDRIN_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_MONG { AF_BLUE_STRING_MONGOLIAN_TOP_BASE, AF_BLUE_PROPERTY_LATIN_TOP } @@ -999,12 +999,12 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_NKOO - { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_NKO_BOTTOM, 0 } + { AF_BLUE_STRING_NKO_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_NKO_BOTTOM, 0 } { AF_BLUE_STRING_NKO_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_NKO_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_NONE { AF_BLUE_STRING_MAX, 0 } @@ -1020,15 +1020,15 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_OSGE - { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, 0 } - { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 } - { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } + { AF_BLUE_STRING_OSAGE_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM, AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM } + { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0 } + { AF_BLUE_STRING_OSAGE_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_OSMA { AF_BLUE_STRING_OSMANYA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } @@ -1047,13 +1047,13 @@ { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_SHAW - { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } - { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 } - { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 } + { AF_BLUE_STRING_SHAVIAN_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_SHAVIAN_BOTTOM, 0 } + { AF_BLUE_STRING_SHAVIAN_DESCENDER, 0 } { AF_BLUE_STRING_SHAVIAN_SMALL_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_X_HEIGHT } - { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0 } - { AF_BLUE_STRING_MAX, 0 } + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM } + { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_SINH { AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.h 2026-04-17 19:08:13.000000000 +0000 @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -314,14 +314,17 @@ /* Properties are specific to a writing system. We assume that a given */ /* blue string can't be used in more than a single writing system, which */ /* is a safe bet. */ -#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */ +#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must be value 1 */ #define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 ) #define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 ) #define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 ) #define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 ) -#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */ -#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */ +#define AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM ( 1U << 5 ) +#define AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM ( 1U << 6 ) + +#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must be value 1 */ +#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must be value 2 */ #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.hin openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.hin --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afblue.hin 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afblue.hin 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -99,14 +99,17 @@ /* Properties are specific to a writing system. We assume that a given */ /* blue string can't be used in more than a single writing system, which */ /* is a safe bet. */ -#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */ +#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must be value 1 */ #define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 ) #define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 ) #define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 ) #define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 ) -#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */ -#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */ +#define AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM ( 1U << 5 ) +#define AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM ( 1U << 6 ) + +#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must be value 1 */ +#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must be value 2 */ #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (body). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -90,12 +90,8 @@ /* If HarfBuzz is not available, we need a pointer to a single */ /* unsigned long value. */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - void* shaper_buf; -#else FT_ULong shaper_buf_; void* shaper_buf = &shaper_buf_; -#endif const char* p; @@ -105,9 +101,8 @@ p = script_class->standard_charstring; -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - shaper_buf = af_shaper_buf_create( face ); -#endif + if ( ft_hb_enabled( metrics->root.globals ) ) + shaper_buf = af_shaper_buf_create( metrics->root.globals ); /* We check a list of standard characters. The first match wins. */ @@ -144,7 +139,7 @@ break; } - af_shaper_buf_destroy( face, shaper_buf ); + af_shaper_buf_destroy( metrics->root.globals, shaper_buf ); if ( !glyph_index ) goto Exit; @@ -152,7 +147,7 @@ if ( !glyph_index ) goto Exit; - FT_TRACE5(( "standard character: U+%04lX (glyph index %ld)\n", + FT_TRACE5(( "standard character: U+%04lX (glyph index %lu)\n", ch, glyph_index )); error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); @@ -297,12 +292,8 @@ /* If HarfBuzz is not available, we need a pointer to a single */ /* unsigned long value. */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - void* shaper_buf; -#else FT_ULong shaper_buf_; void* shaper_buf = &shaper_buf_; -#endif /* we walk over the blue character strings as specified in the */ @@ -313,9 +304,8 @@ FT_TRACE5(( "==========================\n" )); FT_TRACE5(( "\n" )); -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - shaper_buf = af_shaper_buf_create( face ); -#endif + if ( ft_hb_enabled( metrics->root.globals ) ) + shaper_buf = af_shaper_buf_create( metrics->root.globals ); for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ ) { @@ -340,7 +330,7 @@ }; - FT_TRACE5(( "blue zone %d (%s):\n", + FT_TRACE5(( "blue zone %u (%s):\n", axis->blue_count, cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | AF_CJK_IS_TOP_BLUE( bs ) ] )); @@ -553,7 +543,7 @@ } /* end for loop */ - af_shaper_buf_destroy( face, shaper_buf ); + af_shaper_buf_destroy( metrics->root.globals, shaper_buf ); FT_TRACE5(( "\n" )); @@ -572,23 +562,20 @@ /* If HarfBuzz is not available, we need a pointer to a single */ /* unsigned long value. */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - void* shaper_buf; -#else FT_ULong shaper_buf_; void* shaper_buf = &shaper_buf_; -#endif /* in all supported charmaps, digits have character codes 0x30-0x39 */ const char digits[] = "0 1 2 3 4 5 6 7 8 9"; const char* p; + FT_UNUSED( face ); + p = digits; -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - shaper_buf = af_shaper_buf_create( face ); -#endif + if ( ft_hb_enabled( metrics->root.globals ) ) + shaper_buf = af_shaper_buf_create( metrics->root.globals ); while ( *p ) { @@ -624,7 +611,7 @@ } } - af_shaper_buf_destroy( face, shaper_buf ); + af_shaper_buf_destroy( metrics->root.globals, shaper_buf ); metrics->root.digits_have_same_width = same_width; } @@ -710,7 +697,7 @@ FT_Pos delta1, delta2; - blue->ref.fit = FT_PIX_ROUND( blue->ref.cur ); + blue->ref.fit = FT_PIX_ROUND( blue->ref.cur ); /* shoot is under shoot for cjk */ delta1 = FT_DivFix( blue->ref.fit, scale ) - blue->shoot.org; @@ -736,7 +723,7 @@ blue->shoot.fit = blue->ref.fit - delta2; - FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]:\n", + FT_TRACE5(( ">> active cjk blue zone %c%u[%ld/%ld]:\n", ( dim == AF_DIMENSION_HORZ ) ? 'H' : 'V', nn, blue->ref.org, blue->shoot.org )); FT_TRACE5(( " ref: cur=%.2f fit=%.2f\n", @@ -1378,7 +1365,7 @@ } - /* Initalize hinting engine. */ + /* Initialize hinting engine. */ FT_LOCAL_DEF( FT_Error ) af_cjk_hints_init( AF_GlyphHints hints, @@ -2185,7 +2172,7 @@ af_cjk_align_edge_points( AF_GlyphHints hints, AF_Dimension dim ) { - AF_AxisHints axis = & hints->axis[dim]; + AF_AxisHints axis = &hints->axis[dim]; AF_Edge edges = axis->edges; AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); AF_Edge edge; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afcjk.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afcover.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afcover.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afcover.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afcover.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter coverages (specification only). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.c 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (body). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afdummy.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aferrors.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aferrors.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aferrors.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aferrors.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Autofitter error codes (specification only). * - * Copyright (C) 2005-2024 by + * Copyright (C) 2005-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter routines to compute global hinting values (body). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -22,6 +22,11 @@ #include "afws-decl.h" #include <freetype/internal/ftdebug.h> +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ +# include "afgsub.h" +# include "ft-hb-ft.h" +#endif + /************************************************************************** * @@ -184,7 +189,7 @@ if ( gindex != 0 && gindex < globals->glyph_count && ( gstyles[gindex] & AF_STYLE_MASK ) == AF_STYLE_UNASSIGNED ) - gstyles[gindex] = ss; + gstyles[gindex] = ss | AF_HAS_CMAP_ENTRY; for (;;) { @@ -195,7 +200,7 @@ if ( gindex < globals->glyph_count && ( gstyles[gindex] & AF_STYLE_MASK ) == AF_STYLE_UNASSIGNED ) - gstyles[gindex] = ss; + gstyles[gindex] = ss | AF_HAS_CMAP_ENTRY; } } @@ -301,7 +306,7 @@ if ( !( count % 10 ) ) FT_TRACE4(( " " )); - FT_TRACE4(( " %d", idx )); + FT_TRACE4(( " %u", idx )); count++; if ( !( count % 10 ) ) @@ -356,8 +361,21 @@ globals->scale_down_factor = 0; #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - globals->hb_font = hb_ft_font_create_( face, NULL ); - globals->hb_buf = hb_buffer_create(); + if ( ft_hb_enabled ( globals ) ) + { + globals->hb_font = ft_hb_ft_font_create( globals ); + globals->hb_buf = hb( buffer_create )(); + + af_parse_gsub( globals ); + } + else + { + globals->hb_font = NULL; + globals->hb_buf = NULL; + + globals->gsub = NULL; + globals->gsub_lookups_single_alternate = NULL; + } #endif error = af_face_globals_compute_style_coverage( globals ); @@ -405,8 +423,14 @@ } #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - hb_font_destroy( globals->hb_font ); - hb_buffer_destroy( globals->hb_buf ); + if ( ft_hb_enabled ( globals ) ) + { + hb( font_destroy )( globals->hb_font ); + hb( buffer_destroy )( globals->hb_buf ); + + FT_FREE( globals->gsub ); + FT_FREE( globals->gsub_lookups_single_alternate ); + } #endif /* no need to free `globals->glyph_styles'; */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Auto-fitter routines to compute global hinting values * (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -73,15 +73,17 @@ /* default script for OpenType; ignored if HarfBuzz isn't used */ #define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN - /* a bit mask for AF_DIGIT and AF_NONBASE */ -#define AF_STYLE_MASK 0x3FFF + /* a bit mask for AF_DIGIT, AF_NONBASE, and AF_HAS_CMAP_ENTRY */ +#define AF_STYLE_MASK 0x1FFF /* an uncovered glyph */ #define AF_STYLE_UNASSIGNED AF_STYLE_MASK - /* if this flag is set, we have an ASCII digit */ + /* if this flag is set, we have an ASCII digit */ #define AF_DIGIT 0x8000U /* if this flag is set, we have a non-base character */ #define AF_NONBASE 0x4000U + /* if this flag is set, the glyph has a (direct) cmap entry */ +#define AF_HAS_CMAP_ENTRY 0x2000U /* `increase-x-height' property */ #define AF_PROP_INCREASE_X_HEIGHT_MIN 6 @@ -111,6 +113,13 @@ #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ hb_font_t* hb_font; hb_buffer_t* hb_buf; /* for feature comparison */ + + /* The GSUB table. */ + FT_Byte* gsub; + /* An array of lookup offsets (of `gsub_lookup_count` elements), */ + /* with only SingleSubst and AlternateSubst lookups non-NULL. */ + FT_UShort gsub_lookup_count; + FT_UInt32* gsub_lookups_single_alternate; #endif /* per-face auto-hinter properties */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afhints.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afhints.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afhints.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afhints.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (body). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -840,6 +840,10 @@ if ( hints->contours != hints->embedded.contours ) FT_FREE( hints->contours ); + if ( hints->contour_y_minima != hints->embedded.contour_y_minima ) + FT_FREE( hints->contour_y_minima ); + if ( hints->contour_y_maxima != hints->embedded.contour_y_maxima ) + FT_FREE( hints->contour_y_maxima ); hints->max_contours = 0; hints->num_contours = 0; @@ -896,19 +900,30 @@ { if ( !hints->contours ) { - hints->contours = hints->embedded.contours; + hints->contours = hints->embedded.contours; + hints->contour_y_minima = hints->embedded.contour_y_minima; + hints->contour_y_maxima = hints->embedded.contour_y_maxima; + hints->max_contours = AF_CONTOURS_EMBEDDED; } } else if ( new_max > old_max ) { if ( hints->contours == hints->embedded.contours ) - hints->contours = NULL; + { + hints->contours = NULL; + hints->contour_y_minima = NULL; + hints->contour_y_maxima = NULL; + } new_max = ( new_max + 3 ) & ~3; /* round up to a multiple of 4 */ if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) ) goto Exit; + if ( FT_RENEW_ARRAY( hints->contour_y_minima, old_max, new_max ) ) + goto Exit; + if ( FT_RENEW_ARRAY( hints->contour_y_maxima, old_max, new_max ) ) + goto Exit; hints->max_contours = new_max; } @@ -1324,7 +1339,7 @@ af_glyph_hints_align_edge_points( AF_GlyphHints hints, AF_Dimension dim ) { - AF_AxisHints axis = & hints->axis[dim]; + AF_AxisHints axis = &hints->axis[dim]; AF_Segment segments = axis->segments; AF_Segment segment_limit = FT_OFFSET( segments, axis->num_segments ); AF_Segment seg; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afhints.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afhints.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afhints.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afhints.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -222,6 +222,9 @@ /* the distance to the next point is very small */ #define AF_FLAG_NEAR ( 1U << 5 ) + /* prevent the auto-hinter from adding such a point to a segment */ +#define AF_FLAG_IGNORE ( 1U << 6 ) + /* edge hint flags */ #define AF_EDGE_NORMAL 0 @@ -229,6 +232,7 @@ #define AF_EDGE_SERIF ( 1U << 1 ) #define AF_EDGE_DONE ( 1U << 2 ) #define AF_EDGE_NEUTRAL ( 1U << 3 ) /* edge aligns to a neutral blue zone */ +#define AF_EDGE_NO_BLUE ( 1U << 4 ) /* do not align edge to blue zone */ typedef struct AF_PointRec_* AF_Point; @@ -303,6 +307,7 @@ } AF_EdgeRec; + #define AF_SEGMENTS_EMBEDDED 18 /* number of embedded segments */ #define AF_EDGES_EMBEDDED 12 /* number of embedded edges */ @@ -346,9 +351,11 @@ FT_Int num_points; /* number of used points */ AF_Point points; /* points array */ - FT_Int max_contours; /* number of allocated contours */ - FT_Int num_contours; /* number of used contours */ - AF_Point* contours; /* contours array */ + FT_Int max_contours; /* number of allocated contours */ + FT_Int num_contours; /* number of used contours */ + AF_Point* contours; /* contours array */ + FT_Pos* contour_y_minima; /* array with y maxima of contours */ + FT_Pos* contour_y_maxima; /* array with y minima of contours */ AF_AxisHintsRec axis[AF_DIMENSION_MAX]; @@ -357,11 +364,13 @@ /* implementations */ AF_StyleMetrics metrics; - /* Two arrays to avoid allocation penalty. */ + /* Some arrays to avoid allocation penalty. */ /* The `embedded' structure must be the last element! */ struct { AF_Point contours[AF_CONTOURS_EMBEDDED]; + FT_Pos contour_y_minima[AF_CONTOURS_EMBEDDED]; + FT_Pos contour_y_maxima[AF_CONTOURS_EMBEDDED]; AF_PointRec points[AF_POINTS_EMBEDDED]; } embedded; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afindic.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afindic.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afindic.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afindic.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for Indic writing system (body). * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afindic.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afindic.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afindic.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afindic.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for Indic writing system * (specification). * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for latin writing system (body). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -22,6 +22,7 @@ #include "afglobal.h" #include "aflatin.h" #include "aferrors.h" +#include "afadjust.h" /************************************************************************** @@ -81,12 +82,8 @@ /* If HarfBuzz is not available, we need a pointer to a single */ /* unsigned long value. */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - void* shaper_buf; -#else FT_ULong shaper_buf_; void* shaper_buf = &shaper_buf_; -#endif const char* p; @@ -97,9 +94,9 @@ p = script_class->standard_charstring; -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - shaper_buf = af_shaper_buf_create( face ); -#endif + if ( ft_hb_enabled ( metrics->root.globals ) ) + shaper_buf = af_shaper_buf_create( metrics->root.globals ); + /* * We check a list of standard characters to catch features like * `c2sc' (small caps from caps) that don't contain lowercase letters @@ -140,7 +137,7 @@ break; } - af_shaper_buf_destroy( face, shaper_buf ); + af_shaper_buf_destroy( metrics->root.globals, shaper_buf ); if ( !glyph_index ) { @@ -149,7 +146,7 @@ goto Exit; } - FT_TRACE5(( "standard character: U+%04lX (glyph index %ld)\n", + FT_TRACE5(( "standard character: U+%04lX (glyph index %lu)\n", ch, glyph_index )); error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); @@ -334,12 +331,8 @@ /* If HarfBuzz is not available, we need a pointer to a single */ /* unsigned long value. */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - void* shaper_buf; -#else FT_ULong shaper_buf_; void* shaper_buf = &shaper_buf_; -#endif /* we walk over the blue character strings as specified in the */ @@ -349,9 +342,8 @@ FT_TRACE5(( "============================\n" )); FT_TRACE5(( "\n" )); -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - shaper_buf = af_shaper_buf_create( face ); -#endif + if ( ft_hb_enabled ( metrics->root.globals ) ) + shaper_buf = af_shaper_buf_create( metrics->root.globals ); for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ ) { @@ -367,7 +359,7 @@ FT_Bool have_flag = 0; - FT_TRACE5(( "blue zone %d", axis->blue_count )); + FT_TRACE5(( "blue zone %u", axis->blue_count )); if ( bs->properties ) { @@ -407,6 +399,20 @@ FT_TRACE5(( "long" )); } + if ( AF_LATIN_IS_CAPITAL_BOTTOM_BLUE( bs ) ) + { + if ( have_flag ) + FT_TRACE5(( ", " )); + FT_TRACE5(( "capital bottom" )); + } + + if ( AF_LATIN_IS_SMALL_BOTTOM_BLUE( bs ) ) + { + if ( have_flag ) + FT_TRACE5(( ", " )); + FT_TRACE5(( "small bottom" )); + } + FT_TRACE5(( ")" )); } @@ -454,9 +460,9 @@ } if ( AF_LATIN_IS_TOP_BLUE( bs ) ) - best_y_extremum = FT_INT_MIN; + best_y_extremum = FT_LONG_MIN; else - best_y_extremum = FT_INT_MAX; + best_y_extremum = FT_LONG_MAX; /* iterate over all glyph elements of the character cluster */ /* and get the data of the `biggest' one */ @@ -487,7 +493,7 @@ if ( num_idx == 1 ) FT_TRACE5(( " U+%04lX contains no (usable) outlines\n", ch )); else - FT_TRACE5(( " component %d of cluster starting with U+%04lX" + FT_TRACE5(( " component %u of cluster starting with U+%04lX" " contains no (usable) outlines\n", i, ch )); #endif continue; @@ -825,7 +831,7 @@ if ( num_idx == 1 ) FT_TRACE5(( " U+%04lX: best_y = %5ld", ch, best_y )); else - FT_TRACE5(( " component %d of cluster starting with U+%04lX:" + FT_TRACE5(( " component %u of cluster starting with U+%04lX:" " best_y = %5ld", i, ch, best_y )); #endif @@ -879,8 +885,8 @@ } /* end for loop */ - if ( !( best_y_extremum == FT_INT_MIN || - best_y_extremum == FT_INT_MAX ) ) + if ( !( best_y_extremum == FT_LONG_MIN || + best_y_extremum == FT_LONG_MAX ) ) { if ( best_round ) rounds[num_rounds++] = best_y_extremum; @@ -959,6 +965,10 @@ blue->flags |= AF_LATIN_BLUE_SUB_TOP; if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) blue->flags |= AF_LATIN_BLUE_NEUTRAL; + if ( AF_LATIN_IS_CAPITAL_BOTTOM_BLUE( bs ) ) + blue->flags |= AF_LATIN_BLUE_BOTTOM; + if ( AF_LATIN_IS_SMALL_BOTTOM_BLUE( bs ) ) + blue->flags |= AF_LATIN_BLUE_BOTTOM_SMALL; /* * The following flag is used later to adjust the y and x scales @@ -973,7 +983,7 @@ } /* end for loop */ - af_shaper_buf_destroy( face, shaper_buf ); + af_shaper_buf_destroy( metrics->root.globals, shaper_buf ); if ( axis->blue_count ) { @@ -1070,23 +1080,20 @@ /* If HarfBuzz is not available, we need a pointer to a single */ /* unsigned long value. */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - void* shaper_buf; -#else FT_ULong shaper_buf_; void* shaper_buf = &shaper_buf_; -#endif /* in all supported charmaps, digits have character codes 0x30-0x39 */ const char digits[] = "0 1 2 3 4 5 6 7 8 9"; const char* p; + FT_UNUSED( face ); + p = digits; -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - shaper_buf = af_shaper_buf_create( face ); -#endif + if ( ft_hb_enabled ( metrics->root.globals ) ) + shaper_buf = af_shaper_buf_create( metrics->root.globals ); while ( *p ) { @@ -1122,7 +1129,7 @@ } } - af_shaper_buf_destroy( face, shaper_buf ); + af_shaper_buf_destroy( metrics->root.globals, shaper_buf ); metrics->root.digits_have_same_width = same_width; } @@ -1155,6 +1162,9 @@ af_latin_metrics_check_digits( metrics, face ); } + af_reverse_character_map_new( &metrics->root.reverse_charmap, + &metrics->root ); + Exit: face->charmap = oldmap; return error; @@ -1263,7 +1273,7 @@ max_height = FT_MAX( max_height, -Axis->blues[nn].descender ); } - dist = FT_MulFix( max_height, new_scale - scale ); + dist = FT_MulFix( max_height, new_scale - scale ); if ( -128 < dist && dist < 128 ) { @@ -1466,13 +1476,13 @@ AF_LatinBlue blue = &axis->blues[nn]; - FT_TRACE5(( " reference %d: %ld scaled to %.2f%s\n", + FT_TRACE5(( " reference %u: %ld scaled to %.2f%s\n", nn, blue->ref.org, (double)blue->ref.fit / 64, ( blue->flags & AF_LATIN_BLUE_ACTIVE ) ? "" : " (inactive)" )); - FT_TRACE5(( " overshoot %d: %ld scaled to %.2f%s\n", + FT_TRACE5(( " overshoot %u: %ld scaled to %.2f%s\n", nn, blue->shoot.org, (double)blue->shoot.fit / 64, @@ -1484,6 +1494,17 @@ } + FT_CALLBACK_DEF( void ) + af_latin_metrics_done( AF_StyleMetrics metrics_ ) + { + AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_; + + + af_reverse_character_map_done( metrics->root.reverse_charmap, + metrics->root.globals->face->memory ); + } + + /* Scale global values in both directions. */ FT_LOCAL_DEF( void ) @@ -1617,7 +1638,8 @@ FT_Pos prev_max_on_coord = max_on_coord; - if ( FT_ABS( last->out_dir ) == major_dir && + if ( !( point->flags & AF_FLAG_IGNORE ) && + FT_ABS( last->out_dir ) == major_dir && FT_ABS( point->out_dir ) == major_dir ) { /* we are already on an edge, try to locate its start */ @@ -1676,13 +1698,17 @@ max_on_coord = v; } - if ( point->out_dir != segment_dir || point == last ) + if ( point->flags & AF_FLAG_IGNORE || + point->out_dir != segment_dir || + point == last ) { /* check whether the new segment's start point is identical to */ /* the previous segment's end point; for example, this might */ /* happen for spikes */ - if ( !prev_segment || segment->first != prev_segment->last ) + if ( point->flags & AF_FLAG_IGNORE || + !prev_segment || + segment->first != prev_segment->last ) { /* points are different: we are just leaving an edge, thus */ /* record a new segment */ @@ -1842,7 +1868,8 @@ /* if we are not on an edge, check whether the major direction */ /* coincides with the current point's `out' direction, or */ /* whether we have a single-point contour */ - if ( !on_edge && + if ( !( point->flags & AF_FLAG_IGNORE ) && + !on_edge && ( FT_ABS( point->out_dir ) == major_dir || point == point->prev ) ) { @@ -2521,6 +2548,9 @@ FT_Pos best_dist; /* initial threshold */ + if ( edge->flags & AF_EDGE_NO_BLUE ) + continue; + /* compute the initial threshold as a fraction of the EM size */ /* (the value 40 is heuristic) */ best_dist = FT_MulFix( metrics->units_per_em / 40, scale ); @@ -2610,7 +2640,7 @@ } - /* Initalize hinting engine. */ + /* Initialize hinting engine. */ static FT_Error af_latin_hints_init( AF_GlyphHints hints, @@ -2737,6 +2767,1198 @@ } +#undef FT_COMPONENT +#define FT_COMPONENT afadjust + + + static void + af_move_contour_vertically( AF_Point contour, + FT_Int movement ) + { + AF_Point point = contour; + AF_Point first_point = point; + + + if ( point ) + { + do + { + point->y += movement; + point = point->next; + + } while ( point != first_point ); + } + } + + + /* Move all contours higher than `limit` by `delta`. */ + static void + af_move_contours_up( AF_GlyphHints hints, + FT_Pos limit, + FT_Pos delta ) + { + FT_Int contour; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y = hints->contour_y_minima[contour]; + FT_Pos max_y = hints->contour_y_maxima[contour]; + + + if ( min_y < max_y && + min_y > limit ) + af_move_contour_vertically( hints->contours[contour], + delta ); + } + } + + + static void + af_move_contours_down( AF_GlyphHints hints, + FT_Pos limit, + FT_Pos delta ) + { + FT_Int contour; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y = hints->contour_y_minima[contour]; + FT_Pos max_y = hints->contour_y_maxima[contour]; + + + if ( min_y < max_y && + max_y < limit ) + af_move_contour_vertically( hints->contours[contour], + -delta ); + } + } + + + /* Compute vertical extrema of all contours and store them in the */ + /* `contour_y_minima` and `contour_y_maxima` arrays of `hints`. */ + static void + af_compute_vertical_extrema( AF_GlyphHints hints ) + { + FT_Int contour; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y = FT_LONG_MAX; + FT_Pos max_y = FT_LONG_MIN; + + AF_Point first_point = hints->contours[contour]; + AF_Point point = first_point; + + + if ( !first_point || first_point->next->next == first_point ) + goto End_loop; + + do + { + if ( point->y < min_y ) + min_y = point->y; + if ( point->y > max_y ) + max_y = point->y; + + point = point->next; + + } while ( point != first_point ); + + End_loop: + hints->contour_y_minima[contour] = min_y; + hints->contour_y_maxima[contour] = max_y; + } + } + + + static FT_Int + af_find_highest_contour( AF_GlyphHints hints ) + { + FT_Int highest_contour = 0; + FT_Pos highest_min_y = FT_LONG_MAX; + FT_Pos highest_max_y = FT_LONG_MIN; + + FT_Int contour; + + + /* At this point we have one 'lower' (usually the base glyph) */ + /* and one 'upper' object (usually the diacritic glyph). If */ + /* there are more contours, they must be enclosed within either */ + /* 'lower' or 'upper'. To find this enclosing 'upper' contour */ + /* it is thus sufficient to search for the contour with the */ + /* highest y maximum value. */ + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos current_min_y = hints->contour_y_minima[contour]; + FT_Pos current_max_y = hints->contour_y_maxima[contour]; + + + /* If we have two contours with the same maximum value, take */ + /* the one that has a smaller height. */ + if ( current_max_y > highest_max_y || + ( current_max_y == highest_max_y && + current_min_y > highest_min_y ) ) + { + highest_min_y = current_min_y; + highest_max_y = current_max_y; + highest_contour = contour; + } + } + + return highest_contour; + } + + + static FT_Int + af_find_second_highest_contour( AF_GlyphHints hints ) + { + FT_Int highest_contour; + FT_Pos highest_min_y; + + FT_Int second_highest_contour = 0; + FT_Pos second_highest_max_y = FT_LONG_MIN; + + FT_Int contour; + + + if ( hints->num_contours < 3 ) + return 0; + + highest_contour = af_find_highest_contour( hints ); + highest_min_y = hints->contour_y_minima[highest_contour]; + + /* Search the contour with the largest vertical maximum that has a */ + /* vertical minimum lower than the vertical minimum of the topmost */ + /* contour. */ + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos current_min_y; + FT_Pos current_max_y; + + + if ( contour == highest_contour ) + continue; + + current_min_y = hints->contour_y_minima[contour]; + current_max_y = hints->contour_y_maxima[contour]; + + if ( current_max_y > second_highest_max_y && + current_min_y < highest_min_y ) + { + second_highest_max_y = current_max_y; + second_highest_contour = contour; + } + } + + return second_highest_contour; + } + + + static FT_Int + af_find_lowest_contour( AF_GlyphHints hints ) + { + FT_Int lowest_contour = 0; + FT_Pos lowest_min_y = FT_LONG_MAX; + FT_Pos lowest_max_y = FT_LONG_MIN; + + FT_Int contour; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos current_min_y = hints->contour_y_minima[contour]; + FT_Pos current_max_y = hints->contour_y_maxima[contour]; + + + if ( current_min_y < lowest_min_y || + ( current_min_y == lowest_min_y && + current_max_y < lowest_max_y ) ) + { + lowest_min_y = current_min_y; + lowest_max_y = current_max_y; + lowest_contour = contour; + } + } + + return lowest_contour; + } + + + static FT_Int + af_find_second_lowest_contour( AF_GlyphHints hints ) + { + FT_Int lowest_contour; + FT_Pos lowest_max_y; + + FT_Int second_lowest_contour = 0; + FT_Pos second_lowest_min_y = FT_LONG_MAX; + + FT_Int contour; + + + if ( hints->num_contours < 3 ) + return 0; + + lowest_contour = af_find_lowest_contour( hints ); + lowest_max_y = hints->contour_y_maxima[lowest_contour]; + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos current_min_y; + FT_Pos current_max_y; + + + if ( contour == lowest_contour ) + continue; + + current_min_y = hints->contour_y_minima[contour]; + current_max_y = hints->contour_y_maxima[contour]; + + if ( current_min_y < second_lowest_min_y && + current_max_y > lowest_max_y ) + { + second_lowest_min_y = current_min_y; + second_lowest_contour = contour; + } + } + + return second_lowest_contour; + } + + + /* While aligning edges to blue zones, make the auto-hinter */ + /* ignore the ones that are higher than `pos`. */ + static void + af_prevent_top_blue_alignment( AF_GlyphHints hints, + FT_Pos pos ) + { + AF_AxisHints axis = &hints->axis[AF_DIMENSION_VERT]; + + AF_Edge edges = axis->edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); + AF_Edge edge; + + + for ( edge = edges; edge < edge_limit; edge++ ) + if ( edge->pos > pos ) + edge->flags |= AF_EDGE_NO_BLUE; + } + + + static void + af_prevent_bottom_blue_alignment( AF_GlyphHints hints, + FT_Pos pos ) + { + AF_AxisHints axis = &hints->axis[AF_DIMENSION_VERT]; + + AF_Edge edges = axis->edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); + AF_Edge edge; + + + for ( edge = edges; edge < edge_limit; edge++ ) + if ( edge->pos < pos ) + edge->flags |= AF_EDGE_NO_BLUE; + } + + + static void + af_latin_get_base_glyph_blues( AF_GlyphHints hints, + FT_Bool is_capital, + AF_LatinBlue* top, + AF_LatinBlue* bottom ) + { + AF_LatinMetrics metrics = (AF_LatinMetrics)hints->metrics; + AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT]; + + FT_UInt top_flag; + FT_UInt bottom_flag; + + FT_UInt i; + + + top_flag = is_capital ? AF_LATIN_BLUE_TOP + : AF_LATIN_BLUE_ADJUSTMENT; + top_flag |= AF_LATIN_BLUE_ACTIVE; + + for ( i = 0; i < axis->blue_count; i++ ) + if ( ( axis->blues[i].flags & top_flag ) == top_flag ) + break; + if ( i < axis->blue_count ) + *top = &axis->blues[i]; + + bottom_flag = is_capital ? AF_LATIN_BLUE_BOTTOM + : AF_LATIN_BLUE_BOTTOM_SMALL; + bottom_flag |= AF_LATIN_BLUE_ACTIVE; + + for ( i = 0; i < axis->blue_count; i++ ) + if ( ( axis->blues[i].flags & bottom_flag ) == bottom_flag ) + break; + if ( i < axis->blue_count ) + *bottom = &axis->blues[i]; + } + + + /* Make the auto-hinter ignore top blue zones while aligning edges. */ + /* This affects everything that is higher than a vertical position */ + /* based on the lowercase or uppercase top and bottom blue zones */ + /* (depending on `is_capital`). */ + static void + af_latin_ignore_top( AF_GlyphHints hints, + AF_LatinBlue top_blue, + AF_LatinBlue bottom_blue ) + { + FT_Pos base_glyph_height; + FT_Pos limit; + + + /* Ignore blue zones that are higher than a heuristic threshold */ + /* (value 7 corresponds to approx. 14%, which should be sufficient */ + /* to exceed the height of uppercase serifs. We also add a quarter */ + /* of a pixel as a safety measure. */ + base_glyph_height = top_blue->shoot.cur - bottom_blue->shoot.cur; + limit = top_blue->shoot.cur + base_glyph_height / 7 + 16; + + af_prevent_top_blue_alignment( hints, limit ); + } + + + static void + af_latin_ignore_bottom( AF_GlyphHints hints, + AF_LatinBlue top_blue, + AF_LatinBlue bottom_blue ) + { + FT_Pos base_glyph_height; + FT_Pos limit; + + + base_glyph_height = top_blue->shoot.cur - bottom_blue->shoot.cur; + limit = bottom_blue->shoot.cur - base_glyph_height / 7 - 16; + + af_prevent_bottom_blue_alignment( hints, limit ); + } + + + static void + af_touch_contour( AF_GlyphHints hints, + FT_Int contour ) + { + AF_Point first_point = hints->contours[contour]; + AF_Point p = first_point; + + + do + { + p = p->next; + + p->flags |= AF_FLAG_IGNORE; + if ( !( p->flags & AF_FLAG_CONTROL ) ) + p->flags |= AF_FLAG_TOUCH_Y; + + } while ( p != first_point ); + } + + + static void + af_touch_top_contours( AF_GlyphHints hints, + FT_Int limit_contour ) + { + FT_Pos limit = hints->contour_y_minima[limit_contour]; + + FT_Int contour; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y = hints->contour_y_minima[contour]; + FT_Pos max_y = hints->contour_y_maxima[contour]; + + + if ( min_y < max_y && + min_y >= limit ) + af_touch_contour( hints, contour ); + } + } + + + static void + af_touch_bottom_contours( AF_GlyphHints hints, + FT_Int limit_contour ) + { + FT_Pos limit = hints->contour_y_minima[limit_contour]; + + FT_Int contour; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y = hints->contour_y_minima[contour]; + FT_Pos max_y = hints->contour_y_maxima[contour]; + + + if ( min_y < max_y && + max_y <= limit ) + af_touch_contour( hints, contour ); + } + } + + + /* Stretch tilde vertically, if necessary, and return the height */ + /* difference between the original and the stretched outline. */ + static FT_Pos + af_latin_stretch_top_tilde( AF_GlyphHints hints, + FT_Int tilde_contour ) + { + AF_Point p = hints->contours[tilde_contour]; + AF_Point first_point = p; + + FT_Pos min_y = hints->contour_y_minima[tilde_contour]; + FT_Pos max_y = hints->contour_y_maxima[tilde_contour]; + + FT_Pos min_measurement = FT_LONG_MAX; + FT_Bool measurement_taken = FALSE; + + FT_Pos height; + FT_Pos extremum_threshold; + FT_Pos target_height; + + + if ( min_y == max_y ) + return 0; + + FT_TRACE4(( "af_latin_stretch_top_tilde: min y: %ld, max y: %ld\n", + min_y, max_y )); + + height = SUB_LONG( max_y, min_y ); + extremum_threshold = height / 8; /* Value 8 is heuristic. */ + + /* Find points that are local vertical round extrema, and which */ + /* do not coincide with the vertical extreme values (i.e., we */ + /* search for the 'other' wiggles in the tilde), then measure the */ + /* distance to the vertical extreme values. Try to find the one */ + /* with the smallest distance. */ + /* */ + /* The algorithm only works for tilde shapes that don't deviate */ + /* from the standard shape too much. In particular, the wiggles */ + /* must be round extrema. */ + do + { + p = p->next; + + if ( !( p->flags & AF_FLAG_CONTROL ) && + p->prev->y == p->y && p->next->y == p->y && + p->y != min_y && p->y != max_y && + p->prev->flags & AF_FLAG_CONTROL && + p->next->flags & AF_FLAG_CONTROL ) + { + /* This point could be a candidate. Find the next and previous */ + /* on-curve points, and make sure they are both either above or */ + /* below the point, then make the measurement. */ + AF_Point prev_on = p->prev; + AF_Point next_on = p->next; + + FT_Pos measurement; + + + while ( prev_on->flags & AF_FLAG_CONTROL ) + prev_on = prev_on->prev; + while ( next_on->flags & AF_FLAG_CONTROL ) + next_on = next_on->next; + + if ( next_on->y > p->y && prev_on->y > p->y ) + measurement = SUB_LONG( p->y, min_y ); + else if ( next_on->y < p->y && prev_on->y < p->y ) + measurement = SUB_LONG( max_y, p->y ); + else + continue; + + /* Ignore hits that are too near to a vertical extremum. */ + if ( measurement < extremum_threshold ) + continue; + + if ( !measurement_taken || measurement < min_measurement ) + { + measurement_taken = TRUE; + min_measurement = measurement; + } + } + + } while ( p != first_point ); + + if ( !measurement_taken ) + min_measurement = 0; + + FT_TRACE4(( "af_latin_stretch_top_tilde: min measurement %ld\n", + min_measurement )); + + /* To preserve the stretched shape we prevent that the tilde */ + /* gets auto-hinted; we do this for all contours equal or */ + /* above the vertical minimum of `tilde_contour`. */ + af_touch_top_contours( hints, tilde_contour ); + + /* XXX This is an important element of the algorithm; */ + /* we need a description. */ + target_height = min_measurement + 64; + if ( height >= target_height ) + return 0; + + /* Do the scaling. */ + p = first_point; + do + { + p = p->next; + /* We adjust the height of the diacritic only, which means */ + /* we are never dealing with (valid) large numbers and can */ + /* thus avoid `FT_MulFix`. */ + p->y = ADD_LONG( MUL_LONG( SUB_LONG( p->y, + min_y ), + target_height ) / height, + min_y ); + + } while ( p != first_point ); + + return target_height - height; + } + + + static FT_Pos + af_latin_stretch_bottom_tilde( AF_GlyphHints hints, + FT_Int tilde_contour ) + { + AF_Point p = hints->contours[tilde_contour]; + AF_Point first_point = p; + + FT_Pos min_y = hints->contour_y_minima[tilde_contour]; + FT_Pos max_y = hints->contour_y_maxima[tilde_contour]; + + FT_Pos min_measurement = FT_LONG_MAX; + FT_Bool measurement_taken = FALSE; + + FT_Pos height; + FT_Pos extremum_threshold; + FT_Pos target_height; + + + if ( min_y == max_y ) + return 0; + + FT_TRACE4(( "af_latin_stretch_bottom_tilde: min y: %ld, max y: %ld\n", + min_y, max_y )); + + height = SUB_LONG( max_y, min_y ); + extremum_threshold = height / 8; + + do + { + p = p->next; + + if ( !( p->flags & AF_FLAG_CONTROL ) && + p->prev->y == p->y && p->next->y == p->y && + p->y != min_y && p->y != max_y && + p->prev->flags & AF_FLAG_CONTROL && + p->next->flags & AF_FLAG_CONTROL ) + { + AF_Point prev_on = p->prev; + AF_Point next_on = p->next; + + FT_Pos measurement; + + + while ( prev_on->flags & AF_FLAG_CONTROL ) + prev_on = prev_on->prev; + while ( next_on->flags & AF_FLAG_CONTROL ) + next_on = next_on->next; + + if ( next_on->y > p->y && prev_on->y > p->y ) + measurement = SUB_LONG( p->y, min_y ); + else if ( next_on->y < p->y && prev_on->y < p->y ) + measurement = SUB_LONG( max_y, p->y ); + else + continue; + + if ( measurement < extremum_threshold ) + continue; + + if ( !measurement_taken || measurement < min_measurement ) + { + measurement_taken = TRUE; + min_measurement = measurement; + } + } + + } while ( p != first_point ); + + if ( !measurement_taken ) + min_measurement = 0; + + FT_TRACE4(( "af_latin_stretch_bottom_tilde: min measurement %ld\n", + min_measurement )); + + af_touch_bottom_contours( hints, tilde_contour ); + + target_height = min_measurement + 64; + if ( height >= target_height ) + return 0; + + p = first_point; + do + { + p = p->next; + p->y = ADD_LONG( MUL_LONG( SUB_LONG( p->y, + max_y ), + target_height ) / height, + max_y ); + + } while ( p != first_point ); + + return target_height - height; + } + + + /* + As part of `af_latin_stretch_top_tilde`, normally all points in the + tilde are marked as touched, so the existing grid fitting will leave the + tilde misaligned with the grid. + + This function moves the tilde contour down to be grid-fitted. We assume + that if moving the tilde down would cause it to touch or overlap another + countour, the vertical adjustment step will fix it. + + Because the vertical adjustment step comes after all other grid-fitting + steps, the top edge of the contour under the tilde is usually aligned + with a horizontal grid line. The vertical gap enforced by the vertical + adjustment is exactly one pixel, so if the top edge of the contour below + the tilde is on a grid line, the resulting tilde contour will also be + grid-aligned. + + But in cases where the gap is already big enough so that the vertical + adjustment does nothing, this function ensures that even without the + intervention of the vertical adjustment step, the tilde will be + grid-aligned. + + Return the vertical alignment amount. + */ + static FT_Pos + af_latin_align_top_tilde( AF_GlyphHints hints, + FT_Int tilde_contour ) + { + AF_Point p = hints->contours[tilde_contour]; + AF_Point first_point = p; + + FT_Pos min_y = p->y; + FT_Pos max_y = p->y; + + FT_Pos min_y_rounded; + FT_Pos delta; + FT_Pos height; + + + /* Find vertical extrema of the (now stretched) tilde contour. */ + do + { + p = p->next; + if ( p->y < min_y ) + min_y = p->y; + if ( p->y > max_y ) + max_y = p->y; + + } while ( p != first_point ); + + /* Align bottom of the tilde to the grid. */ + min_y_rounded = FT_PIX_ROUND_LONG( min_y ); + delta = SUB_LONG( min_y_rounded, min_y ); + height = SUB_LONG( max_y, min_y ); + + /* If the tilde is less than 3 pixels tall, snap the center of it */ + /* to the grid instead of the bottom to improve readability. */ + if ( height < 64 * 3 ) + delta += ( FT_PIX_ROUND( height ) - height ) / 2; + + af_move_contour_vertically( first_point, delta ); + + return delta; + } + + + static FT_Pos + af_latin_align_bottom_tilde( AF_GlyphHints hints, + FT_Int tilde_contour ) + { + AF_Point p = hints->contours[tilde_contour]; + AF_Point first_point = p; + + FT_Pos min_y = p->y; + FT_Pos max_y = p->y; + + FT_Pos max_y_rounded; + FT_Pos delta; + FT_Pos height; + + + do + { + p = p->next; + if ( p->y < min_y ) + min_y = p->y; + if ( p->y > max_y ) + max_y = p->y; + + } while ( p != first_point ); + + max_y_rounded = FT_PIX_ROUND_LONG( max_y ); + delta = SUB_LONG( max_y_rounded, max_y ); + height = SUB_LONG( max_y, min_y ); + + if ( height < 64 * 3 ) + delta -= ( FT_PIX_ROUND( height ) - height ) / 2; + + af_move_contour_vertically( first_point, delta ); + + return delta; + } + + + /* Return 1 if the given contour overlaps horizontally with the bounding */ + /* box of all other contours combined. This is a helper for function */ + /* `af_glyph_hints_apply_vertical_separation_adjustments`. */ + static FT_Bool + af_check_contour_horizontal_overlap( AF_GlyphHints hints, + FT_Int contour_index ) + { + FT_Pos contour_max_x = FT_LONG_MIN; + FT_Pos contour_min_x = FT_LONG_MAX; + FT_Pos others_max_x = FT_LONG_MIN; + FT_Pos others_min_x = FT_LONG_MAX; + + FT_Int contour; + + FT_Bool horizontal_overlap; + + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + AF_Point first_point = hints->contours[contour]; + AF_Point p = first_point; + + + /* Ignore dimensionless contours (i.e., contours with only one or */ + /* two points). */ + if ( first_point->next->next == first_point ) + continue; + + do + { + p = p->next; + + if ( contour == contour_index ) + { + if ( p->x < contour_min_x ) + contour_min_x = p->x; + if ( p->x > contour_max_x ) + contour_max_x = p->x; + } + else + { + if ( p->x < others_min_x ) + others_min_x = p->x; + if ( p->x > others_max_x ) + others_max_x = p->x; + } + } while ( p != first_point ); + } + + horizontal_overlap = + ( others_min_x <= contour_max_x && contour_max_x <= others_max_x ) || + ( others_min_x <= contour_min_x && contour_min_x <= others_max_x ) || + ( contour_max_x >= others_max_x && contour_min_x <= others_min_x ); + + return horizontal_overlap; + } + + + static void + af_glyph_hints_apply_vertical_separation_adjustments( + AF_GlyphHints hints, + AF_Dimension dim, + FT_UInt glyph_index, + FT_Pos accent_height_limit, + FT_Hash reverse_charmap ) + { + FT_Bool adjust_top = FALSE; + FT_Bool adjust_below_top = FALSE; + + FT_Bool adjust_bottom = FALSE; + FT_Bool adjust_above_bottom = FALSE; + + size_t* val; + FT_UInt32 adj_type = AF_ADJUST_NONE; + + + FT_TRACE4(( "Entering" + " af_glyph_hints_apply_vertical_separation_adjustments\n" )); + + if ( dim != AF_DIMENSION_VERT ) + return; + + val = ft_hash_num_lookup( (FT_Int)glyph_index, reverse_charmap ); + if ( val ) + { + FT_UInt codepoint = *val; + + + adj_type = af_adjustment_database_lookup( codepoint ); + + if ( adj_type ) + { + adjust_top = !!( adj_type & AF_ADJUST_UP ); + adjust_below_top = !!( adj_type & AF_ADJUST_UP2 ); + + adjust_bottom = !!( adj_type & AF_ADJUST_DOWN ); + adjust_above_bottom = !!( adj_type & AF_ADJUST_DOWN2 ); + } + } + + if ( ( ( adjust_top || adjust_bottom ) && + hints->num_contours >= 2 ) || + ( ( adjust_below_top || adjust_above_bottom ) && + hints->num_contours >= 3 ) ) + { + /* Recompute vertical extrema, this time acting on already */ + /* auto-hinted outlines. */ + af_compute_vertical_extrema( hints ); + } + + if ( ( adjust_top && hints->num_contours >= 2 ) || + ( adjust_below_top && hints->num_contours >= 3 ) ) + { + FT_Int high_contour; + FT_Pos high_min_y; + FT_Pos high_max_y; + FT_Pos high_height; + + FT_Int tilde_contour; + FT_Pos tilde_min_y; + FT_Pos tilde_max_y; + FT_Pos tilde_height; + + FT_Int contour; + FT_Bool horizontal_overlap; + + FT_Pos min_distance = 64; + FT_Pos adjustment_amount; + FT_Pos calculated_amount; + FT_Pos centering_adjustment = 0; + FT_Pos pos; + + FT_Bool is_top_tilde = !!( adj_type & AF_ADJUST_TILDE_TOP ); + FT_Bool is_below_top_tilde = !!( adj_type & AF_ADJUST_TILDE_TOP2 ); + + + FT_TRACE4(( "af_glyph_hints_apply_vertical_separation_adjustments:\n" + " Applying vertical adjustment: %s\n", + adjust_top ? "AF_ADJUST_TOP" : "AF_ADJUST_TOP2" )); + + high_contour = adjust_below_top + ? af_find_second_highest_contour( hints ) + : af_find_highest_contour( hints ); + + /* Check for a horizontal overlap between the high contour and the */ + /* rest. If there is no overlap, do not adjust. */ + horizontal_overlap = + af_check_contour_horizontal_overlap( hints, high_contour ); + if ( !horizontal_overlap ) + { + FT_TRACE4(( " High contour does not horizontally overlap" + " with other contours.\n" + " Skipping adjustment.\n" )); + return; + } + + high_min_y = hints->contour_y_minima[high_contour]; + high_max_y = hints->contour_y_maxima[high_contour]; + high_height = SUB_LONG( high_max_y, high_min_y ); + + if ( high_height > accent_height_limit ) + { + FT_TRACE4(( " High contour height (%.2f) exceeds accent height" + " limit (%.2f).\n" + " Skipping adjustment.\n", + (double)high_height / 64, + (double)accent_height_limit / 64 )); + return; + } + + /* If the difference between the vertical minimum of the high */ + /* contour and the vertical maximum of another contour is less */ + /* than a pixel, shift up the high contour to make the distance */ + /* one pixel. */ + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y; + FT_Pos max_y; + FT_Pos distance; + + + if ( contour == high_contour ) + continue; + + min_y = hints->contour_y_minima[contour]; + max_y = hints->contour_y_maxima[contour]; + + /* We also check that the y minimum of the 'other' contour */ + /* is below the high contour to avoid potential false hits */ + /* with contours enclosed in the high one. */ + distance = SUB_LONG( high_min_y, max_y ); + if ( distance < 64 && + distance < min_distance && + min_y < high_min_y ) + min_distance = distance; + } + + adjustment_amount = 64 - min_distance; + + if ( is_top_tilde || is_below_top_tilde ) + { + tilde_contour = adjust_top + ? high_contour + : ( is_below_top_tilde + ? high_contour + : af_find_highest_contour( hints ) ); + + tilde_min_y = hints->contour_y_minima[tilde_contour]; + tilde_max_y = hints->contour_y_maxima[tilde_contour]; + tilde_height = SUB_LONG( tilde_max_y, tilde_min_y); + + /* The vertical separation adjustment potentially undoes a */ + /* tilde center alignment. If it would grid-align a tilde */ + /* less than 3 pixels in height, shift additionally to */ + /* re-center the tilde. */ + + pos = ADD_LONG( high_min_y, adjustment_amount ); + if ( adjust_below_top && is_top_tilde ) + pos += high_height; + + if ( pos % 64 == 0 && tilde_height < 3 * 64 ) + { + centering_adjustment = ( FT_PIX_ROUND( tilde_height ) - + tilde_height ) / 2; + + FT_TRACE4(( " Additional tilde centering adjustment: %ld\n", + centering_adjustment )); + } + } + + if ( ( adjust_top && is_top_tilde ) || + ( adjust_below_top && is_below_top_tilde ) ) + calculated_amount = adjustment_amount + centering_adjustment; + else + calculated_amount = adjustment_amount; + + /* allow a delta of 2/64px to handle rounding differences */ + FT_TRACE4(( " Calculated adjustment amount: %ld%s\n", + calculated_amount, + ( calculated_amount < -2 || + ( adjustment_amount > 66 && calculated_amount > 66 ) ) + ? " (out of range [-2;66], not adjusting)" : "" )); + + if ( calculated_amount != 0 && + calculated_amount >= -2 && + ( calculated_amount <= 66 || adjustment_amount <= 66 ) ) + { + /* Value 8 is heuristic. */ + FT_Pos height_delta = high_height / 8; + FT_Pos min_y_limit = SUB_LONG( high_min_y, height_delta ); + + + FT_TRACE4(( " Pushing high contour %ld units up\n", + calculated_amount )); + + /* While we use only a single contour (the 'high' one) for */ + /* computing `adjustment_amount`, we apply it to all contours */ + /* that are (approximately) in the same vertical range or */ + /* higher. This covers, for example, the inner contour of */ + /* the Czech ring accent or the second acute accent in the */ + /* Hungarian double acute accent. */ + af_move_contours_up( hints, min_y_limit, adjustment_amount ); + + if ( adjust_below_top && is_top_tilde ) + { + FT_TRACE4(( " Pushing top tilde %ld units up\n", + centering_adjustment )); + + af_move_contours_up( hints, + ADD_LONG( min_y_limit, high_height ), + centering_adjustment ); + } + } + } + + if ( ( adjust_bottom && hints->num_contours >= 2 ) || + ( adjust_above_bottom && hints->num_contours >= 3 ) ) + { + FT_Int low_contour; + FT_Pos low_min_y; + FT_Pos low_max_y; + FT_Pos low_height; + + FT_Int tilde_contour; + FT_Pos tilde_min_y; + FT_Pos tilde_max_y; + FT_Pos tilde_height; + + FT_Int contour; + FT_Bool horizontal_overlap; + + FT_Pos min_distance = 64; + FT_Pos adjustment_amount; + FT_Pos calculated_amount; + FT_Pos centering_adjustment = 0; + FT_Pos pos; + + FT_Bool is_bottom_tilde = + !!( adj_type & AF_ADJUST_TILDE_BOTTOM ); + FT_Bool is_above_bottom_tilde = + !!( adj_type & AF_ADJUST_TILDE_BOTTOM2 ); + + + FT_TRACE4(( "af_glyph_hints_apply_vertical_separation_adjustments:\n" + " Applying vertical adjustment: %s\n", + adjust_bottom ? "AF_ADJUST_DOWN": "AF_ADJUST_DOWN2" )); + + low_contour = adjust_above_bottom + ? af_find_second_lowest_contour( hints ) + : af_find_lowest_contour( hints ); + + horizontal_overlap = + af_check_contour_horizontal_overlap( hints, low_contour ); + if ( !horizontal_overlap ) + { + FT_TRACE4(( " Low contour does not horizontally overlap" + " with other contours.\n" + " Skipping adjustment.\n" )); + return; + } + + low_min_y = hints->contour_y_minima[low_contour]; + low_max_y = hints->contour_y_maxima[low_contour]; + low_height = SUB_LONG( low_max_y, low_min_y ); + + if ( low_height > accent_height_limit ) + { + FT_TRACE4(( " Low contour height (%.2f) exceeds accent height" + " limit (%.2f).\n" + " Skipping adjustment.\n", + (double)low_height / 64, + (double)accent_height_limit / 64 )); + return; + } + + for ( contour = 0; contour < hints->num_contours; contour++ ) + { + FT_Pos min_y; + FT_Pos max_y; + FT_Pos distance; + + + if ( contour == low_contour ) + continue; + + min_y = hints->contour_y_minima[contour]; + max_y = hints->contour_y_maxima[contour]; + + distance = SUB_LONG( min_y, low_max_y ); + if ( distance < 64 && + distance < min_distance && + max_y > low_max_y ) + min_distance = distance; + } + + adjustment_amount = 64 - min_distance; + + if ( is_bottom_tilde || is_above_bottom_tilde ) + { + tilde_contour = adjust_bottom + ? low_contour + : ( is_above_bottom_tilde + ? low_contour + : af_find_lowest_contour( hints ) ); + + tilde_min_y = hints->contour_y_minima[tilde_contour]; + tilde_max_y = hints->contour_y_maxima[tilde_contour]; + tilde_height = SUB_LONG( tilde_max_y, tilde_min_y ); + + pos = SUB_LONG( low_max_y, adjustment_amount ); + if ( adjust_above_bottom && is_bottom_tilde ) + pos -= low_height; + + if ( pos % 64 == 0 && tilde_height < 3 * 64 ) + { + centering_adjustment = ( FT_PIX_ROUND( tilde_height ) - + tilde_height ) / 2; + + FT_TRACE4(( " Additional tilde centering adjustment: %ld\n", + centering_adjustment )); + } + } + + if ( ( adjust_bottom && is_bottom_tilde ) || + ( adjust_above_bottom && is_above_bottom_tilde ) ) + calculated_amount = adjustment_amount + centering_adjustment; + else + calculated_amount = adjustment_amount; + + FT_TRACE4(( " Calculated adjustment amount: %ld%s\n", + calculated_amount, + ( calculated_amount < -2 || + ( adjustment_amount > 66 && calculated_amount > 66 ) ) + ? " (out of range [-2;66], not adjusting)" : "" )); + + if ( calculated_amount != 0 && + calculated_amount >= -2 && + ( calculated_amount <= 66 || adjustment_amount <= 66 ) ) + { + FT_Pos height_delta = low_height / 8; + FT_Pos max_y_limit = ADD_LONG( low_max_y, height_delta ); + + + FT_TRACE4(( " Pushing low contour %ld units down\n", + calculated_amount )); + + af_move_contours_down( hints, max_y_limit, adjustment_amount ); + + if ( adjust_above_bottom && is_bottom_tilde ) + { + FT_TRACE4(( " Pushing bottom tilde %ld units down\n", + centering_adjustment )); + + af_move_contours_down( hints, + SUB_LONG( max_y_limit, low_height ), + centering_adjustment ); + } + } + } + +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !( ( ( adjust_top || adjust_bottom ) && + hints->num_contours >= 2 ) || + ( ( adjust_below_top || adjust_above_bottom ) && + hints->num_contours >= 3 ) ) ) + FT_TRACE4(( "af_glyph_hints_apply_vertical_separation_adjustments:\n" + " No vertical adjustment applied\n" )); +#endif + + FT_TRACE4(( "Exiting" + " af_glyph_hints_apply_vertical_separation_adjustments\n" )); + } + + +#undef FT_COMPONENT +#define FT_COMPONENT aflatin + + /* Compute the snapped width of a given stem, ignoring very thin ones. */ /* There is a lot of voodoo in this function; changing the hard-coded */ /* parameters influence the whole hinting process. */ @@ -2998,13 +4220,15 @@ af_latin_hint_edges( AF_GlyphHints hints, AF_Dimension dim ) { - AF_AxisHints axis = &hints->axis[dim]; - AF_Edge edges = axis->edges; - AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); - FT_PtrDist n_edges; - AF_Edge edge; - AF_Edge anchor = NULL; - FT_Int has_serifs = 0; + AF_AxisHints axis = &hints->axis[dim]; + + AF_Edge edges = axis->edges; + AF_Edge edge_limit = FT_OFFSET( edges, axis->num_edges ); + AF_Edge edge; + FT_PtrDist n_edges; + + AF_Edge anchor = NULL; + FT_Bool has_non_stem_edges = 0; AF_StyleClass style_class = hints->metrics->style_class; AF_ScriptClass script_class = af_script_classes[style_class->script]; @@ -3131,7 +4355,7 @@ edge2 = edge->link; if ( !edge2 ) { - has_serifs++; + has_non_stem_edges = TRUE; continue; } @@ -3408,7 +4632,7 @@ } } - if ( has_serifs || !anchor ) + if ( has_non_stem_edges || !anchor ) { /* * now hint the remaining edges (serifs and single) in order @@ -3426,9 +4650,75 @@ if ( edge->serif ) { + AF_Edge e, top, bottom; + FT_Pos min_pos, max_pos; + + + /* Check whether we have a real serif -- if there are */ + /* other edges with overlapping (or enclosed) segments */ + /* between the primary and serif edge, we have not. */ + /* */ + /* Such a situation might happen if an accent is very */ + /* near to its base glyph (for example, Vietnamese */ + /* uppercase letters with two accents in `arial.ttf`), */ + /* and the segment detection algorithm classifies the */ + /* top of the accent incorrectly as a serif. */ delta = edge->serif->opos - edge->opos; if ( delta < 0 ) + { delta = -delta; + + top = edge; + bottom = edge->serif; + } + else + { + top = edge->serif; + bottom = edge; + } + + if ( delta < 64 + 32 ) + { + /* take care of outline orientation while computing extrema */ + min_pos = FT_MIN( FT_MIN( FT_MIN( top->first->first->v, + top->first->last->v ), + FT_MIN( top->last->first->v, + top->last->last->v ) ), + FT_MIN( FT_MIN( bottom->first->first->v, + bottom->first->last->v ), + FT_MIN( bottom->last->first->v, + bottom->last->last->v ) ) ); + max_pos = FT_MAX( FT_MAX( FT_MAX( top->first->first->v, + top->first->last->v ), + FT_MAX( top->last->first->v, + top->last->last->v ) ), + FT_MAX( FT_MAX( bottom->first->first->v, + bottom->first->last->v ), + FT_MAX( bottom->last->first->v, + bottom->last->last->v ) ) ); + + for ( e = bottom + 1; e < top; e++ ) + { + FT_Pos e_min = FT_MIN( FT_MIN( e->first->first->v, + e->first->last->v ), + FT_MIN( e->last->first->v, + e->last->last->v ) ); + FT_Pos e_max = FT_MAX( FT_MAX( e->first->first->v, + e->first->last->v ), + FT_MAX( e->last->first->v, + e->last->last->v ) ); + + if ( !( ( e_min < min_pos && e_max < min_pos ) || + ( e_min > max_pos && e_max > max_pos ) ) ) + { + delta = 1000; /* not a real serif */ + break; + } + } + + if ( delta == 1000 ) + continue; + } } if ( delta < 64 + 16 ) @@ -3562,6 +4852,8 @@ AF_LatinAxis axis; + FT_Pos accent_height_limit = 0; + error = af_glyph_hints_reload( hints, outline ); if ( error ) @@ -3581,11 +4873,172 @@ if ( AF_HINTS_DO_VERTICAL( hints ) ) { + size_t* val; + + FT_Int top_tilde_contour = 0; + FT_Int bottom_tilde_contour = 0; + + FT_Int below_top_tilde_contour = 0; + FT_Int above_bottom_tilde_contour = 0; + + AF_LatinBlue capital_top_blue = NULL; + AF_LatinBlue capital_bottom_blue = NULL; + + AF_LatinBlue small_top_blue = NULL; + AF_LatinBlue small_bottom_blue = NULL; + + FT_Bool have_flags = FALSE; + + FT_Bool is_top_tilde = FALSE; + FT_Bool is_bottom_tilde = FALSE; + + FT_Bool is_below_top_tilde = FALSE; + FT_Bool is_above_bottom_tilde = FALSE; + + FT_Bool ignore_capital_top = FALSE; + FT_Bool ignore_capital_bottom = FALSE; + + FT_Bool ignore_small_top = FALSE; + FT_Bool ignore_small_bottom = FALSE; + + FT_Bool do_height_check = TRUE; + + FT_Pos limit; + FT_Pos y_offset; + + + val = ft_hash_num_lookup( (FT_Int)glyph_index, + metrics->root.reverse_charmap ); + if ( val ) + { + FT_UInt codepoint = *val; + FT_UInt32 adj_type = af_adjustment_database_lookup( codepoint ); + + + if ( adj_type ) + { + have_flags = !!adj_type; + + is_top_tilde = !!( adj_type & AF_ADJUST_TILDE_TOP ); + is_bottom_tilde = !!( adj_type & AF_ADJUST_TILDE_BOTTOM ); + + is_below_top_tilde = !!( adj_type & AF_ADJUST_TILDE_TOP2 ); + is_above_bottom_tilde = !!( adj_type & AF_ADJUST_TILDE_BOTTOM2 ); + + ignore_capital_top = !!( adj_type & AF_IGNORE_CAPITAL_TOP ); + ignore_capital_bottom = !!( adj_type & AF_IGNORE_CAPITAL_BOTTOM ); + + ignore_small_top = !!( adj_type & AF_IGNORE_SMALL_TOP ); + ignore_small_bottom = !!( adj_type & AF_IGNORE_SMALL_BOTTOM ); + + do_height_check = !( adj_type & AF_ADJUST_NO_HEIGHT_CHECK ); + } + } + + if ( is_top_tilde || is_bottom_tilde || + is_below_top_tilde || is_above_bottom_tilde ) + af_compute_vertical_extrema( hints ); + + /* Process inner tilde glyphs first. */ + if ( is_below_top_tilde ) + { + below_top_tilde_contour = af_find_second_highest_contour( hints ); + + y_offset = af_latin_stretch_top_tilde( + hints, below_top_tilde_contour ); + y_offset += af_latin_align_top_tilde( + hints, below_top_tilde_contour ); + + limit = hints->contour_y_minima[below_top_tilde_contour]; + af_move_contours_up( hints, limit, y_offset ); + } + if ( is_above_bottom_tilde ) + { + above_bottom_tilde_contour = af_find_second_lowest_contour( hints ); + + y_offset = af_latin_stretch_bottom_tilde( + hints, above_bottom_tilde_contour ); + y_offset -= af_latin_align_bottom_tilde( + hints, above_bottom_tilde_contour ); + + limit = hints->contour_y_maxima[above_bottom_tilde_contour]; + af_move_contours_down( hints, limit, y_offset ); + } + + if ( is_top_tilde ) + { + top_tilde_contour = af_find_highest_contour( hints ); + + (void)af_latin_stretch_top_tilde( hints, top_tilde_contour ); + (void)af_latin_align_top_tilde( hints, top_tilde_contour ); + } + if ( is_bottom_tilde ) + { + bottom_tilde_contour = af_find_lowest_contour( hints ); + + (void)af_latin_stretch_bottom_tilde( hints, bottom_tilde_contour ); + (void)af_latin_align_bottom_tilde( hints, bottom_tilde_contour ); + } + axis = &metrics->axis[AF_DIMENSION_VERT]; error = af_latin_hints_detect_features( hints, axis->width_count, axis->widths, AF_DIMENSION_VERT ); + + if ( have_flags ) + { + af_latin_get_base_glyph_blues( hints, + TRUE, + &capital_top_blue, + &capital_bottom_blue ); + af_latin_get_base_glyph_blues( hints, + FALSE, + &small_top_blue, + &small_bottom_blue ); + + if ( do_height_check ) + { + /* Set a heuristic limit for the accent height so that */ + /* `af_glyph_hints_apply_vertical_separation_adjustments` */ + /* can correctly ignore the case where an accent is */ + /* unexpectedly not the highest (or lowest) contour. */ + + /* Either 2/3 of the lowercase blue zone height... */ + if ( small_top_blue && small_bottom_blue ) + accent_height_limit = 2 * ( small_top_blue->shoot.cur - + small_bottom_blue->shoot.cur ) / 3; + /* or 1/2 of the uppercase blue zone height... */ + else if ( capital_top_blue && capital_bottom_blue ) + accent_height_limit = ( capital_top_blue->shoot.cur - + capital_bottom_blue->shoot.cur ) / 2; + /* or half of the standard PostScript ascender value (8/10) */ + /* of the EM value, scaled. */ + else + accent_height_limit = FT_MulFix( metrics->units_per_em * 4 / 10, + metrics->root.scaler.y_scale ); + } + } + + if ( capital_top_blue && capital_bottom_blue ) + { + if ( ignore_capital_top ) + af_latin_ignore_top( hints, + capital_top_blue, capital_bottom_blue ); + if ( ignore_capital_bottom ) + af_latin_ignore_bottom( hints, + capital_top_blue, capital_bottom_blue ); + } + if ( small_top_blue && small_bottom_blue ) + { + if ( ignore_small_top ) + af_latin_ignore_top( hints, + small_top_blue, small_bottom_blue ); + if ( ignore_small_bottom ) + af_latin_ignore_bottom( hints, + small_top_blue, small_bottom_blue ); + } + if ( error ) goto Exit; @@ -3604,6 +5057,12 @@ af_glyph_hints_align_edge_points( hints, (AF_Dimension)dim ); af_glyph_hints_align_strong_points( hints, (AF_Dimension)dim ); af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim ); + af_glyph_hints_apply_vertical_separation_adjustments( + hints, + (AF_Dimension)dim, + glyph_index, + accent_height_limit, + metrics->root.reverse_charmap ); } } @@ -3632,7 +5091,7 @@ (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init, /* style_metrics_init */ (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale, /* style_metrics_scale */ - (AF_WritingSystem_DoneMetricsFunc) NULL, /* style_metrics_done */ + (AF_WritingSystem_DoneMetricsFunc) af_latin_metrics_done, /* style_metrics_done */ (AF_WritingSystem_GetStdWidthsFunc)af_latin_get_standard_widths, /* style_metrics_getstdw */ (AF_WritingSystem_InitHintsFunc) af_latin_hints_init, /* style_hints_init */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aflatin.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for latin writing system * (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -61,17 +61,26 @@ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_X_HEIGHT ) #define AF_LATIN_IS_LONG_BLUE( b ) \ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_LONG ) +#define AF_LATIN_IS_CAPITAL_BOTTOM_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM ) +#define AF_LATIN_IS_SMALL_BOTTOM_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM ) #define AF_LATIN_MAX_WIDTHS 16 -#define AF_LATIN_BLUE_ACTIVE ( 1U << 0 ) /* zone height is <= 3/4px */ -#define AF_LATIN_BLUE_TOP ( 1U << 1 ) /* we have a top blue zone */ -#define AF_LATIN_BLUE_SUB_TOP ( 1U << 2 ) /* we have a subscript top */ - /* blue zone */ -#define AF_LATIN_BLUE_NEUTRAL ( 1U << 3 ) /* we have neutral blue zone */ -#define AF_LATIN_BLUE_ADJUSTMENT ( 1U << 4 ) /* used for scale adjustment */ - /* optimization */ +#define AF_LATIN_BLUE_ACTIVE ( 1U << 0 ) /* zone height is <= 3/4px */ +#define AF_LATIN_BLUE_TOP ( 1U << 1 ) /* we have a top blue zone */ +#define AF_LATIN_BLUE_SUB_TOP ( 1U << 2 ) /* we have a subscript */ + /* top blue zone */ +#define AF_LATIN_BLUE_NEUTRAL ( 1U << 3 ) /* we have a neutral blue */ + /* zone */ +#define AF_LATIN_BLUE_ADJUSTMENT ( 1U << 4 ) /* used for scale adjustm. */ + /* optimization */ +#define AF_LATIN_BLUE_BOTTOM ( 1U << 5 ) /* we have a capital */ + /* letter bottom blue zone */ +#define AF_LATIN_BLUE_BOTTOM_SMALL ( 1U << 6 ) /* we have a small letter */ + /* bottom blue zone */ typedef struct AF_LatinBlueRec_ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afloader.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afloader.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afloader.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afloader.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (body). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -524,16 +524,18 @@ bbox.xMin = FT_PIX_FLOOR( bbox.xMin ); bbox.yMin = FT_PIX_FLOOR( bbox.yMin ); - bbox.xMax = FT_PIX_CEIL( bbox.xMax ); - bbox.yMax = FT_PIX_CEIL( bbox.yMax ); + bbox.xMax = FT_PIX_CEIL_LONG( bbox.xMax ); + bbox.yMax = FT_PIX_CEIL_LONG( bbox.yMax ); - slot->metrics.width = bbox.xMax - bbox.xMin; - slot->metrics.height = bbox.yMax - bbox.yMin; + slot->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin ); + slot->metrics.height = SUB_LONG( bbox.yMax, bbox.yMin ); slot->metrics.horiBearingX = bbox.xMin; slot->metrics.horiBearingY = bbox.yMax; - slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x ); - slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y ); + slot->metrics.vertBearingX = FT_PIX_FLOOR( ADD_LONG( bbox.xMin, + vvector.x ) ); + slot->metrics.vertBearingY = FT_PIX_FLOOR( ADD_LONG( bbox.yMax, + vvector.y ) ); /* for mono-width fonts (like Andale, Courier, etc.) we need */ /* to keep the original rounded advance width; ditto for */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afloader.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afloader.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afloader.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afloader.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (body). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -146,7 +146,7 @@ if ( !af_style_classes[ss] ) { - FT_TRACE2(( "af_property_set: Invalid value %d for property `%s'\n", + FT_TRACE2(( "af_property_set: Invalid value %u for property `%s'\n", *fallback_script, property_name )); return FT_THROW( Invalid_Argument ); } @@ -412,6 +412,11 @@ module->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4; module->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4; +#if defined( FT_CONFIG_OPTION_USE_HARFBUZZ ) && \ + defined( FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC ) + ft_hb_funcs_init( module ); +#endif + return FT_Err_Ok; } @@ -421,6 +426,11 @@ { FT_UNUSED( ft_module ); +#if defined( FT_CONFIG_OPTION_USE_HARFBUZZ ) && \ + defined( FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC ) + ft_hb_funcs_done( (AF_Module)ft_module ); +#endif + #ifdef FT_DEBUG_AUTOFIT if ( af_debug_hints_rec_->memory ) af_glyph_hints_done( af_debug_hints_rec_ ); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (specification). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -22,6 +22,7 @@ #include <freetype/internal/ftobjs.h> #include <freetype/ftmodapi.h> +#include "ft-hb.h" FT_BEGIN_HEADER @@ -40,6 +41,11 @@ FT_Bool no_stem_darkening; FT_Int darken_params[8]; +#if defined( FT_CONFIG_OPTION_USE_HARFBUZZ ) && \ + defined( FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC ) + ft_hb_funcs_t* hb_funcs; +#endif + } AF_ModuleRec, *AF_Module; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afranges.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afranges.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afranges.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afranges.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (body). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -73,9 +73,11 @@ { AF_UNIRANGE_REC( 0x0600, 0x06FF ), /* Arabic */ AF_UNIRANGE_REC( 0x0750, 0x07FF ), /* Arabic Supplement */ + AF_UNIRANGE_REC( 0x0870, 0x089F ), /* Arabic Extended-B */ AF_UNIRANGE_REC( 0x08A0, 0x08FF ), /* Arabic Extended-A */ AF_UNIRANGE_REC( 0xFB50, 0xFDFF ), /* Arabic Presentation Forms-A */ AF_UNIRANGE_REC( 0xFE70, 0xFEFF ), /* Arabic Presentation Forms-B */ + AF_UNIRANGE_REC( 0x10EC0, 0x10EFF ), /* Arabic Extended-C */ AF_UNIRANGE_REC( 0x1EE00, 0x1EEFF ), /* Arabic Mathematical Alphabetic Symbols */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -90,8 +92,9 @@ AF_UNIRANGE_REC( 0x06DF, 0x06E4 ), AF_UNIRANGE_REC( 0x06E7, 0x06E8 ), AF_UNIRANGE_REC( 0x06EA, 0x06ED ), - AF_UNIRANGE_REC( 0x08D4, 0x08E1 ), - AF_UNIRANGE_REC( 0x08D3, 0x08FF ), + AF_UNIRANGE_REC( 0x0897, 0x089F ), + AF_UNIRANGE_REC( 0x08CA, 0x08E1 ), + AF_UNIRANGE_REC( 0x08E3, 0x08FF ), AF_UNIRANGE_REC( 0xFBB2, 0xFBC1 ), AF_UNIRANGE_REC( 0xFE70, 0xFE70 ), AF_UNIRANGE_REC( 0xFE72, 0xFE72 ), @@ -101,6 +104,7 @@ AF_UNIRANGE_REC( 0xFE7A, 0xFE7A ), AF_UNIRANGE_REC( 0xFE7C, 0xFE7C ), AF_UNIRANGE_REC( 0xFE7E, 0xFE7E ), + AF_UNIRANGE_REC( 0x10EFD, 0x10EFF ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -198,8 +202,9 @@ const AF_Script_UniRangeRec af_cans_uniranges[] = { - AF_UNIRANGE_REC( 0x1400, 0x167F ), /* Unified Canadian Aboriginal Syllabics */ - AF_UNIRANGE_REC( 0x18B0, 0x18FF ), /* Unified Canadian Aboriginal Syllabics Extended */ + AF_UNIRANGE_REC( 0x1400, 0x167F ), /* Unified Canadian Aboriginal Syllabics */ + AF_UNIRANGE_REC( 0x18B0, 0x18FF ), /* Unified Canadian Aboriginal Syllabics Extended */ + AF_UNIRANGE_REC( 0x11AB0, 0x11ABF ), /* Unified Canadian Aboriginal Syllabics Extended-A */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -259,6 +264,9 @@ }; + /* TODO: Split off data for new 'cyrb' (subscript) and 'cyrp' */ + /* (superscript) groups (mainly from the Extended-D block), */ + /* in analogy to 'latb' and 'latp'? */ const AF_Script_UniRangeRec af_cyrl_uniranges[] = { AF_UNIRANGE_REC( 0x0400, 0x04FF ), /* Cyrillic */ @@ -266,6 +274,7 @@ AF_UNIRANGE_REC( 0x2DE0, 0x2DFF ), /* Cyrillic Extended-A */ AF_UNIRANGE_REC( 0xA640, 0xA69F ), /* Cyrillic Extended-B */ AF_UNIRANGE_REC( 0x1C80, 0x1C8F ), /* Cyrillic Extended-C */ + AF_UNIRANGE_REC( 0x1E030, 0x1E08F ), /* Cyrillic Extended-D */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -285,15 +294,16 @@ const AF_Script_UniRangeRec af_deva_uniranges[] = { - AF_UNIRANGE_REC( 0x0900, 0x093B ), /* Devanagari */ + AF_UNIRANGE_REC( 0x0900, 0x093B ), /* Devanagari */ /* omitting U+093C nukta */ - AF_UNIRANGE_REC( 0x093D, 0x0950 ), /* ... continued */ + AF_UNIRANGE_REC( 0x093D, 0x0950 ), /* ... continued */ /* omitting U+0951 udatta, U+0952 anudatta */ - AF_UNIRANGE_REC( 0x0953, 0x0963 ), /* ... continued */ + AF_UNIRANGE_REC( 0x0953, 0x0963 ), /* ... continued */ /* omitting U+0964 danda, U+0965 double danda */ - AF_UNIRANGE_REC( 0x0966, 0x097F ), /* ... continued */ - AF_UNIRANGE_REC( 0x20B9, 0x20B9 ), /* (new) Rupee sign */ - AF_UNIRANGE_REC( 0xA8E0, 0xA8FF ), /* Devanagari Extended */ + AF_UNIRANGE_REC( 0x0966, 0x097F ), /* ... continued */ + AF_UNIRANGE_REC( 0x20B9, 0x20B9 ), /* (new) Rupee sign */ + AF_UNIRANGE_REC( 0xA8E0, 0xA8FF ), /* Devanagari Extended */ + AF_UNIRANGE_REC( 0x11B00, 0x11B5F ), /* Devanagari Extended-A */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -329,6 +339,7 @@ AF_UNIRANGE_REC( 0x1380, 0x139F ), /* Ethiopic Supplement */ AF_UNIRANGE_REC( 0x2D80, 0x2DDF ), /* Ethiopic Extended */ AF_UNIRANGE_REC( 0xAB00, 0xAB2F ), /* Ethiopic Extended-A */ + AF_UNIRANGE_REC( 0x1E7E0, 0x1E7FF ), /* Ethiopic Extended-B */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -534,7 +545,7 @@ { AF_UNIRANGE_REC( 0x0EB1, 0x0EB1 ), AF_UNIRANGE_REC( 0x0EB4, 0x0EBC ), - AF_UNIRANGE_REC( 0x0EC8, 0x0ECD ), + AF_UNIRANGE_REC( 0x0EC8, 0x0ECE ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -567,12 +578,15 @@ AF_UNIRANGE_REC( 0x2C7E, 0x2C7F ), /* ... continued */ AF_UNIRANGE_REC( 0x2E00, 0x2E7F ), /* Supplemental Punctuation */ AF_UNIRANGE_REC( 0xA720, 0xA76F ), /* Latin Extended-D */ - AF_UNIRANGE_REC( 0xA771, 0xA7F7 ), /* ... continued */ + AF_UNIRANGE_REC( 0xA771, 0xA7F0 ), /* ... continued */ + AF_UNIRANGE_REC( 0xA7F2, 0xA7F7 ), /* ... continued */ AF_UNIRANGE_REC( 0xA7FA, 0xA7FF ), /* ... continued */ AF_UNIRANGE_REC( 0xAB30, 0xAB5B ), /* Latin Extended-E */ - AF_UNIRANGE_REC( 0xAB60, 0xAB6F ), /* ... continued */ + AF_UNIRANGE_REC( 0xAB60, 0xAB68 ), /* ... continued */ + AF_UNIRANGE_REC( 0xAB6A, 0xAB6F ), /* ... continued */ AF_UNIRANGE_REC( 0xFB00, 0xFB06 ), /* Alphab. Present. Forms (Latin Ligs) */ AF_UNIRANGE_REC( 0x1D400, 0x1D7FF ), /* Mathematical Alphanumeric Symbols */ + AF_UNIRANGE_REC( 0x1DF00, 0x1DFFF ), /* Latin Extended-G */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -588,7 +602,7 @@ AF_UNIRANGE_REC( 0x02B9, 0x02DF ), AF_UNIRANGE_REC( 0x02E5, 0x02FF ), AF_UNIRANGE_REC( 0x0300, 0x036F ), - AF_UNIRANGE_REC( 0x1AB0, 0x1ABE ), + AF_UNIRANGE_REC( 0x1AB0, 0x1AEB ), AF_UNIRANGE_REC( 0x1DC0, 0x1DFF ), AF_UNIRANGE_REC( 0x2017, 0x2017 ), AF_UNIRANGE_REC( 0x203E, 0x203E ), @@ -625,8 +639,11 @@ AF_UNIRANGE_REC( 0x2070, 0x207F ), /* superscript digits and letters */ AF_UNIRANGE_REC( 0x2C7D, 0x2C7D ), /* modifier letter capital v */ AF_UNIRANGE_REC( 0xA770, 0xA770 ), /* modifier letter us */ + AF_UNIRANGE_REC( 0xA7F1, 0xA7F1 ), /* modifier letter capital s */ AF_UNIRANGE_REC( 0xA7F8, 0xA7F9 ), /* more modifier letters */ AF_UNIRANGE_REC( 0xAB5C, 0xAB5F ), /* more modifier letters */ + AF_UNIRANGE_REC( 0xAB69, 0xAB69 ), /* modifier letter small turned w */ + AF_UNIRANGE_REC( 0x10780, 0x107FB ), /* Latin Extended-F */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -638,7 +655,8 @@ const AF_Script_UniRangeRec af_lisu_uniranges[] = { - AF_UNIRANGE_REC( 0xA4D0, 0xA4FF ), /* Lisu */ + AF_UNIRANGE_REC( 0xA4D0, 0xA4FF ), /* Lisu */ + AF_UNIRANGE_REC( 0x11FB0, 0x11FBF ), /* Lisu Supplement */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -696,6 +714,7 @@ AF_UNIRANGE_REC( 0x1000, 0x109F ), /* Myanmar */ AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ), /* Myanmar Extended-B */ AF_UNIRANGE_REC( 0xAA60, 0xAA7F ), /* Myanmar Extended-A */ + AF_UNIRANGE_REC( 0x116D0, 0x116FF ), /* Myanmar Extended-C */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -836,6 +855,7 @@ const AF_Script_UniRangeRec af_sinh_nonbase_uniranges[] = { + AF_UNIRANGE_REC( 0x0D81, 0x0D81 ), AF_UNIRANGE_REC( 0x0DCA, 0x0DCA ), AF_UNIRANGE_REC( 0x0DD2, 0x0DD6 ), AF_UNIRANGE_REC( 0, 0 ) @@ -859,7 +879,8 @@ const AF_Script_UniRangeRec af_taml_uniranges[] = { - AF_UNIRANGE_REC( 0x0B80, 0x0BFF ), /* Tamil */ + AF_UNIRANGE_REC( 0x0B80, 0x0BFF ), /* Tamil */ + AF_UNIRANGE_REC( 0x11FC0, 0x11FFF ), /* Tamil Supplement */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -899,6 +920,7 @@ { AF_UNIRANGE_REC( 0x0C00, 0x0C00 ), AF_UNIRANGE_REC( 0x0C04, 0x0C04 ), + AF_UNIRANGE_REC( 0x0C3C, 0x0C3C ), AF_UNIRANGE_REC( 0x0C3E, 0x0C40 ), AF_UNIRANGE_REC( 0x0C46, 0x0C56 ), AF_UNIRANGE_REC( 0x0C62, 0x0C63 ), @@ -992,6 +1014,7 @@ AF_UNIRANGE_REC( 0xA806, 0xA806 ), AF_UNIRANGE_REC( 0xA80B, 0xA80B ), AF_UNIRANGE_REC( 0xA825, 0xA826 ), + AF_UNIRANGE_REC( 0xA82C, 0xA82C ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -1048,15 +1071,21 @@ AF_UNIRANGE_REC( 0xFE10, 0xFE1F ), /* Vertical forms */ AF_UNIRANGE_REC( 0xFE30, 0xFE4F ), /* CJK Compatibility Forms */ AF_UNIRANGE_REC( 0xFF00, 0xFFEF ), /* Halfwidth and Fullwidth Forms */ + AF_UNIRANGE_REC( 0x1AFF0, 0x1AFFF ), /* Kana Extended-B */ AF_UNIRANGE_REC( 0x1B000, 0x1B0FF ), /* Kana Supplement */ AF_UNIRANGE_REC( 0x1B100, 0x1B12F ), /* Kana Extended-A */ + AF_UNIRANGE_REC( 0x1B130, 0x1B16F ), /* Small Kana Extension */ AF_UNIRANGE_REC( 0x1D300, 0x1D35F ), /* Tai Xuan Hing Symbols */ AF_UNIRANGE_REC( 0x20000, 0x2A6DF ), /* CJK Unified Ideographs Extension B */ AF_UNIRANGE_REC( 0x2A700, 0x2B73F ), /* CJK Unified Ideographs Extension C */ AF_UNIRANGE_REC( 0x2B740, 0x2B81F ), /* CJK Unified Ideographs Extension D */ AF_UNIRANGE_REC( 0x2B820, 0x2CEAF ), /* CJK Unified Ideographs Extension E */ AF_UNIRANGE_REC( 0x2CEB0, 0x2EBEF ), /* CJK Unified Ideographs Extension F */ + AF_UNIRANGE_REC( 0x2EBF0, 0x2EE5D ), /* CJK Unified Ideographs Extension I */ AF_UNIRANGE_REC( 0x2F800, 0x2FA1F ), /* CJK Compatibility Ideographs Supplement */ + AF_UNIRANGE_REC( 0x30000, 0x3134A ), /* CJK Unified Ideographs Extension G */ + AF_UNIRANGE_REC( 0x31350, 0x323AF ), /* CJK Unified Ideographs Extension H */ + AF_UNIRANGE_REC( 0x323B0, 0x33479 ), /* CJK Unified Ideographs Extension J */ AF_UNIRANGE_REC( 0, 0 ) }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afranges.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afranges.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afranges.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afranges.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (specification). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afscript.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afscript.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afscript.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afscript.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter scripts (specification only). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (body). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -22,8 +22,8 @@ #include "aftypes.h" #include "afshaper.h" -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ /************************************************************************** * @@ -89,17 +89,18 @@ #define SCRIPT( s, S, d, h, H, ss ) h, - static const hb_script_t scripts[] = + FT_LOCAL_ARRAY_DEF( hb_script_t ) + af_hb_scripts[] = { #include "afscript.h" }; - FT_Error - af_shaper_get_coverage( AF_FaceGlobals globals, - AF_StyleClass style_class, - FT_UShort* gstyles, - FT_Bool default_script ) + static FT_Error + af_shaper_get_coverage_hb( AF_FaceGlobals globals, + AF_StyleClass style_class, + FT_UShort* gstyles, + FT_Bool default_script ) { hb_face_t* face; @@ -124,10 +125,10 @@ if ( !globals || !style_class || !gstyles ) return FT_THROW( Invalid_Argument ); - face = hb_font_get_face( globals->hb_font ); + face = hb( font_get_face )( globals->hb_font ); coverage_tags = coverages[style_class->coverage]; - script = scripts[style_class->script]; + script = af_hb_scripts[style_class->script]; /* Convert a HarfBuzz script tag into the corresponding OpenType */ /* tag or tags -- some Indic scripts like Devanagari have an old */ @@ -137,19 +138,19 @@ hb_tag_t tags[3]; - hb_ot_tags_from_script_and_language( script, - HB_LANGUAGE_INVALID, - &tags_count, - tags, - NULL, - NULL ); + hb( ot_tags_from_script_and_language )( script, + HB_LANGUAGE_INVALID, + &tags_count, + tags, + NULL, + NULL ); script_tags[0] = tags_count > 0 ? tags[0] : HB_TAG_NONE; script_tags[1] = tags_count > 1 ? tags[1] : HB_TAG_NONE; script_tags[2] = tags_count > 2 ? tags[2] : HB_TAG_NONE; } - /* If the second tag is HB_OT_TAG_DEFAULT_SCRIPT, change that to */ - /* HB_TAG_NONE except for the default script. */ + /* If the second tag is HB_OT_TAG_DEFAULT_SCRIPT, change that to */ + /* HB_TAG_NONE except for the default script. */ if ( default_script ) { if ( script_tags[0] == HB_TAG_NONE ) @@ -170,15 +171,15 @@ goto Exit; } - gsub_lookups = hb_set_create(); - hb_ot_layout_collect_lookups( face, - HB_OT_TAG_GSUB, - script_tags, - NULL, - coverage_tags, - gsub_lookups ); + gsub_lookups = hb( set_create )(); + hb( ot_layout_collect_lookups )( face, + HB_OT_TAG_GSUB, + script_tags, + NULL, + coverage_tags, + gsub_lookups ); - if ( hb_set_is_empty( gsub_lookups ) ) + if ( hb( set_is_empty )( gsub_lookups ) ) goto Exit; /* nothing to do */ FT_TRACE4(( "GSUB lookups (style `%s'):\n", @@ -189,22 +190,22 @@ count = 0; #endif - gsub_glyphs = hb_set_create(); - for ( idx = HB_SET_VALUE_INVALID; hb_set_next( gsub_lookups, &idx ); ) + gsub_glyphs = hb( set_create )(); + for ( idx = HB_SET_VALUE_INVALID; hb( set_next )( gsub_lookups, &idx ); ) { #ifdef FT_DEBUG_LEVEL_TRACE - FT_TRACE4(( " %d", idx )); + FT_TRACE4(( " %u", idx )); count++; #endif /* get output coverage of GSUB feature */ - hb_ot_layout_lookup_collect_glyphs( face, - HB_OT_TAG_GSUB, - idx, - NULL, - NULL, - NULL, - gsub_glyphs ); + hb( ot_layout_lookup_collect_glyphs )( face, + HB_OT_TAG_GSUB, + idx, + NULL, + NULL, + NULL, + gsub_glyphs ); } #ifdef FT_DEBUG_LEVEL_TRACE @@ -218,34 +219,34 @@ af_style_names[style_class->style] )); FT_TRACE4(( " " )); - gpos_lookups = hb_set_create(); - hb_ot_layout_collect_lookups( face, - HB_OT_TAG_GPOS, - script_tags, - NULL, - coverage_tags, - gpos_lookups ); + gpos_lookups = hb( set_create )(); + hb( ot_layout_collect_lookups )( face, + HB_OT_TAG_GPOS, + script_tags, + NULL, + coverage_tags, + gpos_lookups ); #ifdef FT_DEBUG_LEVEL_TRACE count = 0; #endif - gpos_glyphs = hb_set_create(); - for ( idx = HB_SET_VALUE_INVALID; hb_set_next( gpos_lookups, &idx ); ) + gpos_glyphs = hb( set_create )(); + for ( idx = HB_SET_VALUE_INVALID; hb( set_next )( gpos_lookups, &idx ); ) { #ifdef FT_DEBUG_LEVEL_TRACE - FT_TRACE4(( " %d", idx )); + FT_TRACE4(( " %u", idx )); count++; #endif /* get input coverage of GPOS feature */ - hb_ot_layout_lookup_collect_glyphs( face, - HB_OT_TAG_GPOS, - idx, - NULL, - gpos_glyphs, - NULL, - NULL ); + hb( ot_layout_lookup_collect_glyphs )( face, + HB_OT_TAG_GPOS, + idx, + NULL, + gpos_glyphs, + NULL, + NULL ); } #ifdef FT_DEBUG_LEVEL_TRACE @@ -281,14 +282,14 @@ GET_UTF8_CHAR( ch, p ); - for ( idx = HB_SET_VALUE_INVALID; hb_set_next( gsub_lookups, - &idx ); ) + for ( idx = HB_SET_VALUE_INVALID; hb( set_next )( gsub_lookups, + &idx ); ) { hb_codepoint_t gidx = FT_Get_Char_Index( globals->face, ch ); - if ( hb_ot_layout_lookup_would_substitute( face, idx, - &gidx, 1, 1 ) ) + if ( hb( ot_layout_lookup_would_substitute )( face, idx, + &gidx, 1, 1 ) ) { found = 1; break; @@ -352,14 +353,14 @@ * */ if ( style_class->coverage != AF_COVERAGE_DEFAULT ) - hb_set_subtract( gsub_glyphs, gpos_glyphs ); + hb( set_subtract )( gsub_glyphs, gpos_glyphs ); #ifdef FT_DEBUG_LEVEL_TRACE FT_TRACE4(( " glyphs without GPOS data (`*' means already assigned)" )); count = 0; #endif - for ( idx = HB_SET_VALUE_INVALID; hb_set_next( gsub_glyphs, &idx ); ) + for ( idx = HB_SET_VALUE_INVALID; hb( set_next )( gsub_glyphs, &idx ); ) { #ifdef FT_DEBUG_LEVEL_TRACE if ( !( count % 10 ) ) @@ -368,7 +369,7 @@ FT_TRACE4(( " " )); } - FT_TRACE4(( " %d", idx )); + FT_TRACE4(( " %u", idx )); count++; #endif @@ -397,10 +398,10 @@ #endif Exit: - hb_set_destroy( gsub_lookups ); - hb_set_destroy( gsub_glyphs ); - hb_set_destroy( gpos_lookups ); - hb_set_destroy( gpos_glyphs ); + hb( set_destroy )( gsub_lookups ); + hb( set_destroy )( gsub_glyphs ); + hb( set_destroy )( gpos_lookups ); + hb( set_destroy )( gpos_glyphs ); return FT_Err_Ok; } @@ -437,31 +438,33 @@ }; - void* - af_shaper_buf_create( FT_Face face ) + static void* + af_shaper_buf_create_hb( AF_FaceGlobals globals ) { - FT_UNUSED( face ); + FT_UNUSED( globals ); - return (void*)hb_buffer_create(); + return (void*)hb( buffer_create )(); } - void - af_shaper_buf_destroy( FT_Face face, - void* buf ) + static void + af_shaper_buf_destroy_hb( AF_FaceGlobals globals, + void* buf ) { - FT_UNUSED( face ); + FT_UNUSED( globals ); - hb_buffer_destroy( (hb_buffer_t*)buf ); + hb( buffer_destroy )( (hb_buffer_t*)buf ); } - const char* - af_shaper_get_cluster( const char* p, - AF_StyleMetrics metrics, - void* buf_, - unsigned int* count ) + static const char* + af_shaper_get_cluster_hb( const char* p, + AF_StyleMetrics metrics, + void* buf_, + unsigned int* count ) { + AF_FaceGlobals globals = metrics->globals; + AF_StyleClass style_class; const hb_feature_t* feature; FT_Int upem; @@ -472,6 +475,8 @@ hb_font_t* font; hb_codepoint_t dummy; + FT_UNUSED( globals ); + upem = (FT_Int)metrics->globals->face->units_per_EM; style_class = metrics->style_class; @@ -480,7 +485,7 @@ font = metrics->globals->hb_font; /* we shape at a size of units per EM; this means font units */ - hb_font_set_scale( font, upem, upem ); + hb( font_set_scale )( font, upem, upem ); while ( *p == ' ' ) p++; @@ -492,15 +497,15 @@ len = (int)( q - p ); /* feed character(s) to the HarfBuzz buffer */ - hb_buffer_clear_contents( buf ); - hb_buffer_add_utf8( buf, p, len, 0, len ); + hb( buffer_clear_contents )( buf ); + hb( buffer_add_utf8 )( buf, p, len, 0, len ); /* we let HarfBuzz guess the script and writing direction */ - hb_buffer_guess_segment_properties( buf ); + hb( buffer_guess_segment_properties )( buf ); /* shape buffer, which means conversion from character codes to */ /* glyph indices, possibly applying a feature */ - hb_shape( font, buf, feature, feature ? 1 : 0 ); + hb( shape )( font, buf, feature, feature ? 1 : 0 ); if ( feature ) { @@ -517,13 +522,13 @@ /* glyph indices; otherwise the affected glyph or glyphs aren't */ /* available at all in the feature */ - hb_buffer_clear_contents( hb_buf ); - hb_buffer_add_utf8( hb_buf, p, len, 0, len ); - hb_buffer_guess_segment_properties( hb_buf ); - hb_shape( font, hb_buf, NULL, 0 ); + hb( buffer_clear_contents )( hb_buf ); + hb( buffer_add_utf8 )( hb_buf, p, len, 0, len ); + hb( buffer_guess_segment_properties )( hb_buf ); + hb( shape )( font, hb_buf, NULL, 0 ); - ginfo = hb_buffer_get_glyph_infos( buf, &gcount ); - hb_ginfo = hb_buffer_get_glyph_infos( hb_buf, &hb_gcount ); + ginfo = hb( buffer_get_glyph_infos )( buf, &gcount ); + hb_ginfo = hb( buffer_get_glyph_infos )( hb_buf, &hb_gcount ); if ( gcount == hb_gcount ) { @@ -537,12 +542,12 @@ if ( i == gcount ) { /* both buffers have identical glyph indices */ - hb_buffer_clear_contents( buf ); + hb( buffer_clear_contents )( buf ); } } } - *count = hb_buffer_get_length( buf ); + *count = hb( buffer_get_length )( buf ); #ifdef FT_DEBUG_LEVEL_TRACE if ( feature && *count > 1 ) @@ -554,23 +559,25 @@ } - FT_ULong - af_shaper_get_elem( AF_StyleMetrics metrics, - void* buf_, - unsigned int idx, - FT_Long* advance, - FT_Long* y_offset ) + static FT_ULong + af_shaper_get_elem_hb( AF_StyleMetrics metrics, + void* buf_, + unsigned int idx, + FT_Long* advance, + FT_Long* y_offset ) { + AF_FaceGlobals globals = metrics->globals; + hb_buffer_t* buf = (hb_buffer_t*)buf_; hb_glyph_info_t* ginfo; hb_glyph_position_t* gpos; unsigned int gcount; - FT_UNUSED( metrics ); + FT_UNUSED( globals ); - ginfo = hb_buffer_get_glyph_infos( buf, &gcount ); - gpos = hb_buffer_get_glyph_positions( buf, &gcount ); + ginfo = hb( buffer_get_glyph_infos )( buf, &gcount ); + gpos = hb( buffer_get_glyph_positions )( buf, &gcount ); if ( idx >= gcount ) return 0; @@ -584,14 +591,14 @@ } -#else /* !FT_CONFIG_OPTION_USE_HARFBUZZ */ +#endif /* FT_CONFIG_OPTION_USE_HARFBUZZ */ - FT_Error - af_shaper_get_coverage( AF_FaceGlobals globals, - AF_StyleClass style_class, - FT_UShort* gstyles, - FT_Bool default_script ) + static FT_Error + af_shaper_get_coverage_nohb( AF_FaceGlobals globals, + AF_StyleClass style_class, + FT_UShort* gstyles, + FT_Bool default_script ) { FT_UNUSED( globals ); FT_UNUSED( style_class ); @@ -602,29 +609,29 @@ } - void* - af_shaper_buf_create( FT_Face face ) + static void* + af_shaper_buf_create_nohb( AF_FaceGlobals globals ) { - FT_UNUSED( face ); + FT_UNUSED( globals ); return NULL; } - void - af_shaper_buf_destroy( FT_Face face, - void* buf ) + static void + af_shaper_buf_destroy_nohb( AF_FaceGlobals globals, + void* buf ) { - FT_UNUSED( face ); + FT_UNUSED( globals ); FT_UNUSED( buf ); } - const char* - af_shaper_get_cluster( const char* p, - AF_StyleMetrics metrics, - void* buf_, - unsigned int* count ) + static const char* + af_shaper_get_cluster_nohb( const char* p, + AF_StyleMetrics metrics, + void* buf_, + unsigned int* count ) { FT_Face face = metrics->globals->face; FT_ULong ch, dummy = 0; @@ -656,12 +663,12 @@ } - FT_ULong - af_shaper_get_elem( AF_StyleMetrics metrics, - void* buf_, - unsigned int idx, - FT_Long* advance, - FT_Long* y_offset ) + static FT_ULong + af_shaper_get_elem_nohb( AF_StyleMetrics metrics, + void* buf_, + unsigned int idx, + FT_Long* advance, + FT_Long* y_offset ) { FT_Face face = metrics->globals->face; FT_ULong glyph_index = *(FT_ULong*)buf_; @@ -684,7 +691,90 @@ } -#endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ */ + /********************************************************************/ + + FT_Error + af_shaper_get_coverage( AF_FaceGlobals globals, + AF_StyleClass style_class, + FT_UShort* gstyles, + FT_Bool default_script ) + { +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + if ( ft_hb_enabled( globals ) ) + return af_shaper_get_coverage_hb( globals, + style_class, + gstyles, + default_script ); + else +#endif + return af_shaper_get_coverage_nohb( globals, + style_class, + gstyles, + default_script ); + } + + + void* + af_shaper_buf_create( AF_FaceGlobals globals ) + { +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + if ( ft_hb_enabled( globals ) ) + return af_shaper_buf_create_hb( globals ); + else +#endif + return af_shaper_buf_create_nohb( globals ); + } + + + void + af_shaper_buf_destroy( AF_FaceGlobals globals, + void* buf ) + { +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + if ( ft_hb_enabled( globals ) ) + af_shaper_buf_destroy_hb( globals, buf ); + else +#endif + af_shaper_buf_destroy_nohb( globals, buf ); + } + + + const char* + af_shaper_get_cluster( const char* p, + AF_StyleMetrics metrics, + void* buf_, + unsigned int* count ) + { +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + if ( ft_hb_enabled( metrics->globals ) ) + return af_shaper_get_cluster_hb( p, metrics, buf_, count ); + else +#endif + return af_shaper_get_cluster_nohb( p, metrics, buf_, count ); + } + + + FT_ULong + af_shaper_get_elem( AF_StyleMetrics metrics, + void* buf_, + unsigned int idx, + FT_Long* advance, + FT_Long* y_offset ) + { +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + if ( ft_hb_enabled( metrics->globals ) ) + return af_shaper_get_elem_hb( metrics, + buf_, + idx, + advance, + y_offset ); +#endif + return af_shaper_get_elem_nohb( metrics, + buf_, + idx, + advance, + y_offset ); + } /* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afshaper.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (specification). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -23,17 +23,14 @@ #include <freetype/freetype.h> -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - -#include <hb.h> -#include <hb-ot.h> -#include "ft-hb.h" +FT_BEGIN_HEADER +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + FT_LOCAL_ARRAY( hb_script_t ) + af_hb_scripts[]; #endif -FT_BEGIN_HEADER - FT_Error af_shaper_get_coverage( AF_FaceGlobals globals, AF_StyleClass style_class, @@ -42,11 +39,11 @@ void* - af_shaper_buf_create( FT_Face face ); + af_shaper_buf_create( AF_FaceGlobals globals ); void - af_shaper_buf_destroy( FT_Face face, - void* buf ); + af_shaper_buf_destroy( AF_FaceGlobals globals, + void* buf ); const char* af_shaper_get_cluster( const char* p, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter styles (specification only). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -50,36 +50,36 @@ AF_COVERAGE_ ## C ) #undef META_STYLE_LATIN -#define META_STYLE_LATIN( s, S, ds ) \ - STYLE_LATIN( s, S, c2cp, C2CP, ds, \ +#define META_STYLE_LATIN( s, S, ds ) \ + STYLE_LATIN( s, S, c2cp, C2CP, ds, \ "petite capitals from capitals", \ - PETITE_CAPITALS_FROM_CAPITALS ) \ - STYLE_LATIN( s, S, c2sc, C2SC, ds, \ + PETITE_CAPITALS_FROM_CAPITALS ) \ + STYLE_LATIN( s, S, c2sc, C2SC, ds, \ "small capitals from capitals", \ - SMALL_CAPITALS_FROM_CAPITALS ) \ - STYLE_LATIN( s, S, ordn, ORDN, ds, \ - "ordinals", \ - ORDINALS ) \ - STYLE_LATIN( s, S, pcap, PCAP, ds, \ - "petite capitals", \ - PETITE_CAPITALS ) \ - STYLE_LATIN( s, S, sinf, SINF, ds, \ - "scientific inferiors", \ - SCIENTIFIC_INFERIORS ) \ - STYLE_LATIN( s, S, smcp, SMCP, ds, \ - "small capitals", \ - SMALL_CAPITALS ) \ - STYLE_LATIN( s, S, subs, SUBS, ds, \ - "subscript", \ - SUBSCRIPT ) \ - STYLE_LATIN( s, S, sups, SUPS, ds, \ - "superscript", \ - SUPERSCRIPT ) \ - STYLE_LATIN( s, S, titl, TITL, ds, \ - "titling", \ - TITLING ) \ - STYLE_LATIN( s, S, dflt, DFLT, ds, \ - "default", \ + SMALL_CAPITALS_FROM_CAPITALS ) \ + STYLE_LATIN( s, S, ordn, ORDN, ds, \ + "ordinals", \ + ORDINALS ) \ + STYLE_LATIN( s, S, pcap, PCAP, ds, \ + "petite capitals", \ + PETITE_CAPITALS ) \ + STYLE_LATIN( s, S, sinf, SINF, ds, \ + "scientific inferiors", \ + SCIENTIFIC_INFERIORS ) \ + STYLE_LATIN( s, S, smcp, SMCP, ds, \ + "small capitals", \ + SMALL_CAPITALS ) \ + STYLE_LATIN( s, S, subs, SUBS, ds, \ + "subscript", \ + SUBSCRIPT ) \ + STYLE_LATIN( s, S, sups, SUPS, ds, \ + "superscript", \ + SUPERSCRIPT ) \ + STYLE_LATIN( s, S, titl, TITL, ds, \ + "titling", \ + TITLING ) \ + STYLE_LATIN( s, S, dflt, DFLT, ds, \ + "default", \ DEFAULT ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter types (specification only). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -35,6 +35,7 @@ #include <freetype/freetype.h> #include <freetype/ftoutln.h> +#include <freetype/internal/fthash.h> #include <freetype/internal/ftobjs.h> #include <freetype/internal/ftdebug.h> @@ -406,6 +407,7 @@ typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals; + /* This is the main structure that combines everything. Autofit modules */ /* specific to writing systems derive their structures from it, for */ /* example `AF_LatinMetrics'. */ @@ -418,6 +420,8 @@ AF_FaceGlobals globals; /* to access properties */ + FT_Hash reverse_charmap; + } AF_StyleMetricsRec; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afws-decl.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afws-decl.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afws-decl.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afws-decl.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter writing system declarations (specification only). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afws-iter.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afws-iter.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/afws-iter.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/afws-iter.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auto-fitter writing systems iterator (specification only). * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,197 @@ +/**************************************************************************** + * + * ft-hb.c + * + * FreeType-HarfBuzz bridge (body). + * + * Copyright (C) 2025 by + * Behdad Esfahbod. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + +#if !defined( _WIN32 ) && !defined( _GNU_SOURCE ) +# define _GNU_SOURCE 1 /* for RTLD_DEFAULT */ +#endif + +#include <freetype/freetype.h> +#include <freetype/internal/ftmemory.h> + +#include "afglobal.h" + +#include "ft-hb.h" + + +#if defined( FT_CONFIG_OPTION_USE_HARFBUZZ ) && \ + defined( FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC ) + +#ifndef FT_LIBHARFBUZZ +# ifdef _WIN32 +# define FT_LIBHARFBUZZ "libharfbuzz-0.dll" +# else +# ifdef __APPLE__ +# define FT_LIBHARFBUZZ "libharfbuzz.0.dylib" +# else +# define FT_LIBHARFBUZZ "libharfbuzz.so.0" +# endif +# endif +#endif + +#ifdef _WIN32 + +# include <windows.h> + +#else /* !_WIN32 */ + +# include <dlfcn.h> + + /* The GCC pragma suppresses the warning "ISO C forbids */ + /* assignment between function pointer and 'void *'", which */ + /* inevitably gets emitted with `-Wpedantic`; see the man */ + /* page of function `dlsym` for more information. */ +# if defined( __GNUC__ ) +# pragma GCC diagnostic push +# ifndef __cplusplus +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# endif + +#endif /* !_WIN32 */ + + + FT_LOCAL_DEF( void ) + ft_hb_funcs_init( struct AF_ModuleRec_ *af_module ) + { + FT_Memory memory = af_module->root.memory; + FT_Error error; + + ft_hb_funcs_t *funcs = NULL; + ft_hb_version_atleast_func_t version_atleast = NULL; + +#ifdef _WIN32 + HANDLE lib; +# define DLSYM( lib, name ) \ + (ft_ ## name ## _func_t)GetProcAddress( lib, #name ) +#else + void *lib; +# define DLSYM( lib, name ) \ + (ft_ ## name ## _func_t)dlsym( lib, #name ) +#endif + + + af_module->hb_funcs = NULL; + + if ( FT_NEW( funcs ) ) + return; + FT_ZERO( funcs ); + +#ifdef _WIN32 + + lib = LoadLibraryA( FT_LIBHARFBUZZ ); + if ( !lib ) + goto Fail; + version_atleast = DLSYM( lib, hb_version_atleast ); + +#else /* !_WIN32 */ + +# ifdef RTLD_DEFAULT +# define FT_RTLD_FLAGS RTLD_LAZY | RTLD_GLOBAL + lib = RTLD_DEFAULT; + version_atleast = DLSYM( lib, hb_version_atleast ); +# else +# define FT_RTLD_FLAGS RTLD_LAZY +# endif + + if ( !version_atleast ) + { + /* Load the HarfBuzz library. + * + * We never close the library, since we opened it with RTLD_GLOBAL. + * This is important for the case where we are using HarfBuzz as a + * shared library, and we want to use the symbols from the library in + * other shared libraries or clients. HarfBuzz holds onto global + * variables, and closing the library will cause them to be + * invalidated. + */ + lib = dlopen( FT_LIBHARFBUZZ, FT_RTLD_FLAGS ); + if ( !lib ) + goto Fail; + version_atleast = DLSYM( lib, hb_version_atleast ); + } + +#endif /* !_WIN32 */ + + if ( !version_atleast ) + goto Fail; + + /* Load all symbols we use. */ +#define HB_EXTERN( ret, name, args ) \ + { \ + funcs->name = DLSYM( lib, name ); \ + if ( !funcs->name ) \ + goto Fail; \ + } +#include "ft-hb-decls.h" +#undef HB_EXTERN + +#undef DLSYM + + af_module->hb_funcs = funcs; + return; + + Fail: + if ( funcs ) + FT_FREE( funcs ); + } + + + FT_LOCAL_DEF( void ) + ft_hb_funcs_done( struct AF_ModuleRec_ *af_module ) + { + FT_Memory memory = af_module->root.memory; + + + if ( af_module->hb_funcs ) + { + FT_FREE( af_module->hb_funcs ); + af_module->hb_funcs = NULL; + } + } + + + FT_LOCAL_DEF( FT_Bool ) + ft_hb_enabled( struct AF_FaceGlobalsRec_ *globals ) + { + return globals->module->hb_funcs != NULL; + } + +#ifndef _WIN32 +# if defined( __GNUC__ ) +# pragma GCC diagnostic pop +# endif +#endif + +#else /* !FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ + + FT_LOCAL_DEF( FT_Bool ) + ft_hb_enabled( struct AF_FaceGlobalsRec_ *globals ) + { + FT_UNUSED( globals ); + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + return TRUE; +#else + return FALSE; +#endif + } + +#endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ + + +/* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,82 @@ +/**************************************************************************** + * + * ft-hb.h + * + * FreeType-HarfBuzz bridge (specification). + * + * Copyright (C) 2025 by + * Behdad Esfahbod. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + +#ifndef FT_HB_H +#define FT_HB_H + +#include <freetype/internal/compiler-macros.h> +#include <freetype/freetype.h> + + +FT_BEGIN_HEADER + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + +# include "ft-hb-types.h" + +# ifdef FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC + +# define HB_EXTERN( ret, name, args ) \ + typedef ret (*ft_ ## name ## _func_t) args; +# include "ft-hb-decls.h" +# undef HB_EXTERN + + typedef struct ft_hb_funcs_t + { +# define HB_EXTERN( ret, name, args ) \ + ft_ ## name ## _func_t name; +# include "ft-hb-decls.h" +# undef HB_EXTERN + } ft_hb_funcs_t; + + struct AF_ModuleRec_; + + FT_LOCAL( void ) + ft_hb_funcs_init( struct AF_ModuleRec_ *af_module ); + + FT_LOCAL( void ) + ft_hb_funcs_done( struct AF_ModuleRec_ *af_module ); + +# define hb( x ) globals->module->hb_funcs->hb_ ## x + +# else /* !FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ + +# define HB_EXTERN( ret, name, args ) \ + ret name args; +# include "ft-hb-decls.h" +# undef HB_EXTERN + +# define hb( x ) hb_ ## x + +# endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC */ + +#endif /* FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + struct AF_FaceGlobalsRec_; + + FT_LOCAL( FT_Bool ) + ft_hb_enabled( struct AF_FaceGlobalsRec_ *globals ); + + +FT_END_HEADER + +#endif /* FT_HB_H */ + + +/* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftadvanc.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftadvanc.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftadvanc.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftadvanc.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Quick computation of advance widths (body). * - * Copyright (C) 2008-2024 by + * Copyright (C) 2008-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -20,6 +20,7 @@ #include <freetype/ftadvanc.h> #include <freetype/internal/ftobjs.h> +#include <freetype/internal/ftcalc.h> static FT_Error @@ -47,11 +48,43 @@ /* (see `FT_Load_Glyph' implementation in src/base/ftobjs.c) */ for ( nn = 0; nn < count; nn++ ) - advances[nn] = FT_MulDiv( advances[nn], scale, 64 ); + advances[nn] = FT_MulFix( 1024 * advances[nn], scale ); return FT_Err_Ok; } + /* loading (and hinting) to calculate the advances is slow */ + /* unless TrueType hdmx table is provided as an accelerator */ + static FT_Error + ft_load_advances( FT_Face face, + FT_UInt gindex, + FT_UInt count, + FT_Int32 flags, + FT_Fixed *padvances ) + { + FT_UInt nn; + FT_Error error = FT_Err_Ok; + FT_Pos factor = flags & FT_LOAD_NO_SCALE ? 1 : 1024; + FT_Pos* advance = flags & FT_LOAD_VERTICAL_LAYOUT + ? &face->glyph->advance.y + : &face->glyph->advance.x; + + + flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; + + for ( nn = 0; nn < count; nn++ ) + { + error = FT_Load_Glyph( face, gindex + nn, flags ); + if ( error ) + break; + + /* scale from 26.6 to 16.16, unless NO_SCALE was requested */ + padvances[nn] = *advance * factor; + } + + return error; + } + /* at the moment, we can perform fast advance retrieval only in */ /* the following cases: */ @@ -102,7 +135,10 @@ return error; } - return FT_Get_Advances( face, gindex, 1, flags, padvance ); + if ( flags & FT_ADVANCE_FLAG_FAST_ONLY ) + return FT_THROW( Unimplemented_Feature ); + + return ft_load_advances( face, gindex, 1, flags, padvance ); } @@ -115,12 +151,9 @@ FT_Int32 flags, FT_Fixed *padvances ) { - FT_Error error = FT_Err_Ok; - FT_Face_GetAdvancesFunc func; - FT_UInt num, end, nn; - FT_Int factor; + FT_UInt num, end; if ( !face ) @@ -140,6 +173,9 @@ func = face->driver->clazz->get_advances; if ( func && LOAD_ADVANCE_FAST_CHECK( face, flags ) ) { + FT_Error error; + + error = func( face, start, count, flags, padvances ); if ( !error ) return ft_face_scale_advances_( face, padvances, count, flags ); @@ -148,26 +184,10 @@ return error; } - error = FT_Err_Ok; - if ( flags & FT_ADVANCE_FLAG_FAST_ONLY ) return FT_THROW( Unimplemented_Feature ); - flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; - factor = ( flags & FT_LOAD_NO_SCALE ) ? 1 : 1024; - for ( nn = 0; nn < count; nn++ ) - { - error = FT_Load_Glyph( face, start + nn, flags ); - if ( error ) - break; - - /* scale from 26.6 to 16.16, unless NO_SCALE was requested */ - padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT ) - ? face->glyph->advance.y * factor - : face->glyph->advance.x * factor; - } - - return error; + return ft_load_advances( face, start, count, flags, padvances ); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftbase.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftbase.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftbase.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftbase.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Private functions used in the `base' module (specification). * - * Copyright (C) 2008-2024 by + * Copyright (C) 2008-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. * * This file is part of the FreeType project, and may only be used, @@ -34,7 +34,7 @@ #ifdef FT_CONFIG_OPTION_MAC_FONTS /* MacOS resource fork cannot exceed 16MB at least for Carbon code; */ - /* see https://support.microsoft.com/en-us/kb/130437 */ + /* see https://jeffpar.github.io/kbarchive/kb/130/Q130437/ */ #define FT_MAC_RFORK_MAX_LEN 0x00FFFFFFUL diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftbbox.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftbbox.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftbbox.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftbbox.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType bbox computation (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (body). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -876,13 +876,13 @@ #ifdef FT_DEBUG_LEVEL_TRACE FT_TRACE5(( "FT_Bitmap_Blend:\n" )); - FT_TRACE5(( " source bitmap: (%ld, %ld) -- (%ld, %ld); %d x %d\n", + FT_TRACE5(( " source bitmap: (%ld, %ld) -- (%ld, %ld); %u x %u\n", source_llx / 64, source_lly / 64, source_urx / 64, source_ury / 64, source_->width, source_->rows )); if ( target->width && target->rows ) - FT_TRACE5(( " target bitmap: (%ld, %ld) -- (%ld, %ld); %d x %d\n", + FT_TRACE5(( " target bitmap: (%ld, %ld) -- (%ld, %ld); %u x %u\n", target_llx / 64, target_lly / 64, target_urx / 64, target_ury / 64, target->width, target->rows )); @@ -890,7 +890,7 @@ FT_TRACE5(( " target bitmap: empty\n" )); if ( final_width && final_rows ) - FT_TRACE5(( " final bitmap: (%ld, %ld) -- (%ld, %ld); %d x %d\n", + FT_TRACE5(( " final bitmap: (%ld, %ld) -- (%ld, %ld); %u x %u\n", final_llx / 64, final_lly / 64, final_urx / 64, final_ury / 64, final_width, final_rows )); @@ -922,14 +922,7 @@ target->pitch = (int)final_width * 4; target->num_grays = 256; - if ( FT_LONG_MAX / target->pitch < (int)target->rows ) - { - FT_TRACE5(( "FT_Blend_Bitmap: target bitmap too large (%d x %d)\n", - final_width, final_rows )); - return FT_THROW( Invalid_Argument ); - } - - if ( FT_ALLOC( target->buffer, target->pitch * (int)target->rows ) ) + if ( FT_ALLOC_MULT( target->buffer, target->rows, target->pitch ) ) return error; free_target_bitmap_on_error = 1; @@ -950,16 +943,9 @@ new_pitch = (int)final_width * 4; - if ( FT_LONG_MAX / new_pitch < (int)final_rows ) - { - FT_TRACE5(( "FT_Blend_Bitmap: target bitmap too large (%d x %d)\n", - final_width, final_rows )); - return FT_THROW( Invalid_Argument ); - } - /* TODO: provide an in-buffer solution for large bitmaps */ /* to avoid allocation of a new buffer */ - if ( FT_ALLOC( buffer, new_pitch * (int)final_rows ) ) + if ( FT_ALLOC_MULT( buffer, final_rows, new_pitch ) ) goto Error; /* copy data to new buffer */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftcalc.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftcalc.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftcalc.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftcalc.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Arithmetic computations (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -38,24 +38,11 @@ #include <freetype/internal/ftdebug.h> #include <freetype/internal/ftobjs.h> - -#ifdef FT_MULFIX_ASSEMBLER -#undef FT_MulFix + /* cancel inlining macro from internal/ftcalc.h */ +#ifdef FT_MulFix +# undef FT_MulFix #endif -/* we need to emulate a 64-bit data type if a real one isn't available */ - -#ifndef FT_INT64 - - typedef struct FT_Int64_ - { - FT_UInt32 lo; - FT_UInt32 hi; - - } FT_Int64; - -#endif /* !FT_INT64 */ - /************************************************************************** * @@ -88,7 +75,7 @@ FT_EXPORT_DEF( FT_Fixed ) FT_RoundFix( FT_Fixed a ) { - return ( ADD_LONG( a, 0x8000L - ( a < 0 ) ) ) & ~0xFFFFL; + return ADD_LONG( a, 0x8000L - ( a < 0 ) ) & ~0xFFFFL; } @@ -97,7 +84,7 @@ FT_EXPORT_DEF( FT_Fixed ) FT_CeilFix( FT_Fixed a ) { - return ( ADD_LONG( a, 0xFFFFL ) ) & ~0xFFFFL; + return ADD_LONG( a, 0xFFFFL ) & ~0xFFFFL; } @@ -225,18 +212,18 @@ FT_MulFix( FT_Long a_, FT_Long b_ ) { -#ifdef FT_MULFIX_ASSEMBLER +#ifdef FT_CONFIG_OPTION_INLINE_MULFIX - return FT_MULFIX_ASSEMBLER( (FT_Int32)a_, (FT_Int32)b_ ); + return FT_MulFix_64( a_, b_ ); #else - FT_Int64 ab = (FT_Int64)a_ * (FT_Int64)b_; + FT_Int64 ab = MUL_INT64( a_, b_ ); /* this requires arithmetic right shift of signed numbers */ - return (FT_Long)( ( ab + 0x8000L - ( ab < 0 ) ) >> 16 ); + return (FT_Long)( ( ab + 0x8000L + ( ab >> 63 ) ) >> 16 ); -#endif /* FT_MULFIX_ASSEMBLER */ +#endif /* FT_CONFIG_OPTION_INLINE_MULFIX */ } @@ -975,43 +962,36 @@ #else - FT_Int result; + FT_Int64 z1, z2; + FT_Int result; - if ( ADD_LONG( FT_ABS( in_x ), FT_ABS( out_y ) ) <= 131071L && - ADD_LONG( FT_ABS( in_y ), FT_ABS( out_x ) ) <= 131071L ) + if ( (FT_ULong)FT_ABS( in_x ) + (FT_ULong)FT_ABS( out_y ) <= 92681UL ) { - FT_Long z1 = MUL_LONG( in_x, out_y ); - FT_Long z2 = MUL_LONG( in_y, out_x ); - - - if ( z1 > z2 ) - result = +1; - else if ( z1 < z2 ) - result = -1; - else - result = 0; + z1.lo = (FT_UInt32)in_x * (FT_UInt32)out_y; + z1.hi = (FT_UInt32)( (FT_Int32)z1.lo >> 31 ); /* sign-expansion */ } - else /* products might overflow 32 bits */ - { - FT_Int64 z1, z2; - - - /* XXX: this function does not allow 64-bit arguments */ + else ft_multo64( (FT_UInt32)in_x, (FT_UInt32)out_y, &z1 ); - ft_multo64( (FT_UInt32)in_y, (FT_UInt32)out_x, &z2 ); - if ( z1.hi > z2.hi ) - result = +1; - else if ( z1.hi < z2.hi ) - result = -1; - else if ( z1.lo > z2.lo ) - result = +1; - else if ( z1.lo < z2.lo ) - result = -1; - else - result = 0; + if ( (FT_ULong)FT_ABS( in_y ) + (FT_ULong)FT_ABS( out_x ) <= 92681UL ) + { + z2.lo = (FT_UInt32)in_y * (FT_UInt32)out_x; + z2.hi = (FT_UInt32)( (FT_Int32)z2.lo >> 31 ); /* sign-expansion */ } + else + ft_multo64( (FT_UInt32)in_y, (FT_UInt32)out_x, &z2 ); + + if ( (FT_Int32)z1.hi > (FT_Int32)z2.hi ) + result = +1; + else if ( (FT_Int32)z1.hi < (FT_Int32)z2.hi ) + result = -1; + else if ( z1.lo > z2.lo ) + result = +1; + else if ( z1.lo < z2.lo ) + result = -1; + else + result = 0; /* XXX: only the sign of return value, +1/0/-1 must be used */ return result; @@ -1065,62 +1045,4 @@ } - FT_BASE_DEF( FT_Int32 ) - FT_MulAddFix( FT_Fixed* s, - FT_Int32* f, - FT_UInt count ) - { - FT_UInt i; - FT_Int64 temp; - - -#ifdef FT_INT64 - temp = 0; - - for ( i = 0; i < count; ++i ) - temp += (FT_Int64)s[i] * f[i]; - - return (FT_Int32)( ( temp + 0x8000 ) >> 16 ); -#else - temp.hi = 0; - temp.lo = 0; - - for ( i = 0; i < count; ++i ) - { - FT_Int64 multResult; - - FT_Int sign = 1; - FT_UInt32 carry = 0; - - FT_UInt32 scalar; - FT_UInt32 factor; - - - FT_MOVE_SIGN( FT_UInt32, s[i], scalar, sign ); - FT_MOVE_SIGN( FT_UInt32, f[i], factor, sign ); - - ft_multo64( scalar, factor, &multResult ); - - if ( sign < 0 ) - { - /* Emulated `FT_Int64` negation. */ - carry = ( multResult.lo == 0 ); - - multResult.lo = ~multResult.lo + 1; - multResult.hi = ~multResult.hi + carry; - } - - FT_Add64( &temp, &multResult, &temp ); - } - - /* Shift and round value. */ - return (FT_Int32)( ( ( temp.hi << 16 ) | ( temp.lo >> 16 ) ) - + ( 1 & ( temp.lo >> 15 ) ) ); - - -#endif /* !FT_INT64 */ - - } - - /* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftcid.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftcid.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftcid.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftcid.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information. * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftcolor.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftcolor.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftcolor.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftcolor.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType's glyph color management (body). * - * Copyright (C) 2018-2024 by + * Copyright (C) 2018-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -56,9 +56,7 @@ FT_Color* *apalette ) { FT_Error error; - - TT_Face ttface; - SFNT_Service sfnt; + TT_Face ttface = (TT_Face)face; if ( !face ) @@ -72,14 +70,17 @@ return FT_Err_Ok; } - ttface = (TT_Face)face; - sfnt = (SFNT_Service)ttface->sfnt; + if ( palette_index != ttface->palette_index ) + { + SFNT_Service sfnt = (SFNT_Service)ttface->sfnt; + - error = sfnt->set_palette( ttface, palette_index ); - if ( error ) - return error; + error = sfnt->set_palette( ttface, palette_index ); + if ( error ) + return error; - ttface->palette_index = palette_index; + ttface->palette_index = palette_index; + } if ( apalette ) *apalette = ttface->palette; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftdbgmem.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftdbgmem.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftdbgmem.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftdbgmem.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Memory debugger (body). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -139,7 +139,6 @@ } FT_MemTableRec; -#define FT_MEM_SIZE_MIN 7 #define FT_MEM_SIZE_MAX 13845163 #define FT_FILENAME( x ) ( (x) ? (x) : "unknown file" ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftdebug.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftdebug.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftdebug.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftdebug.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Debugging and logging component (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -64,7 +64,7 @@ * with the actual log message if set to true. * * 5. The flag `ft_timestamp_flag` prints time along with the actual log - * message if set to ture. + * message if set to true. * * 6. `ft_have_newline_char` is used to differentiate between a log * message with and without a trailing newline character. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftfntfmt.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftfntfmt.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftfntfmt.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftfntfmt.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType utility file for font formats (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftfstype.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftfstype.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftfstype.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftfstype.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType utility file to access FSType data (body). * - * Copyright (C) 2008-2024 by + * Copyright (C) 2008-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftgasp.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftgasp.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftgasp.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftgasp.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Access of TrueType's `gasp' table (body). * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftgloadr.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftgloadr.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftgloadr.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftgloadr.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph loader (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftglyph.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftglyph.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftglyph.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftglyph.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -62,7 +62,7 @@ FT_GlyphSlot slot ) { FT_BitmapGlyph glyph = (FT_BitmapGlyph)bitmap_glyph; - FT_Error error = FT_Err_Ok; + FT_Error error; FT_Library library = FT_GLYPH( glyph )->library; @@ -75,17 +75,8 @@ glyph->left = slot->bitmap_left; glyph->top = slot->bitmap_top; - /* do lazy copying whenever possible */ - if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) - { - glyph->bitmap = slot->bitmap; - slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; - } - else - { - FT_Bitmap_Init( &glyph->bitmap ); - error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap ); - } + FT_Bitmap_Init( &glyph->bitmap ); + error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap ); Exit: return error; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/fthash.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/fthash.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/fthash.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/fthash.c 2026-04-17 19:08:13.000000000 +0000 @@ -41,6 +41,7 @@ #include <freetype/internal/fthash.h> #include <freetype/internal/ftmemory.h> +#include <freetype/internal/ftobjs.h> #define INITIAL_HT_SIZE 241 @@ -233,7 +234,8 @@ hash_insert( FT_Hashkey key, size_t data, FT_Hash hash, - FT_Memory memory ) + FT_Memory memory, + FT_Bool overwrite ) { FT_Hashnode nn; FT_Hashnode* bp = hash_bucket( key, hash ); @@ -259,7 +261,7 @@ hash->used++; } - else + else if ( overwrite ) nn->data = data; Exit: @@ -278,7 +280,7 @@ hk.str = key; - return hash_insert( hk, data, hash, memory ); + return hash_insert( hk, data, hash, memory, TRUE ); } @@ -293,7 +295,37 @@ hk.num = num; - return hash_insert( hk, data, hash, memory ); + return hash_insert( hk, data, hash, memory, TRUE ); + } + + + FT_Error + ft_hash_str_insert_no_overwrite( const char* key, + size_t data, + FT_Hash hash, + FT_Memory memory ) + { + FT_Hashkey hk; + + + hk.str = key; + + return hash_insert( hk, data, hash, memory, FALSE ); + } + + + FT_Error + ft_hash_num_insert_no_overwrite( FT_Int num, + size_t data, + FT_Hash hash, + FT_Memory memory ) + { + FT_Hashkey hk; + + + hk.num = num; + + return hash_insert( hk, data, hash, memory, FALSE ); } @@ -335,4 +367,68 @@ } + FT_Bool + ft_hash_num_iterator( FT_UInt *idx, + FT_Int *key, + size_t *value, + FT_Hash hash ) + { + FT_Hashnode nn = NULL; + + + while ( 1 ) + { + if ( *idx >= hash->size ) + return 0; + + nn = hash->table[*idx]; + if ( nn ) + break; + + (*idx)++; + } + + if ( key ) + *key = nn->key.num; + if ( value ) + *value = nn->data; + + (*idx)++; + + return 1; + } + + + FT_Bool + ft_hash_str_iterator( FT_UInt *idx, + const char* *key, + size_t *value, + FT_Hash hash ) + { + FT_Hashnode nn = NULL; + + + while ( 1 ) + { + if ( *idx >= hash->size ) + return 0; + + nn = hash->table[*idx]; + if ( nn ) + break; + + (*idx)++; + } + + if ( key ) + *key = nn->key.str; + if ( value ) + *value = nn->data; + + (*idx)++; + + return 1; + } + + /* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftinit.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftinit.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftinit.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftinit.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType initialization layer (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType API for color filtering of subpixel bitmap glyphs (body). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -25,264 +25,27 @@ #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING -/* define USE_LEGACY to implement the legacy filter */ -#define USE_LEGACY - -#define FT_SHIFTCLAMP( x ) ( x >>= 8, (FT_Byte)( x > 255 ? 255 : x ) ) - - - /* add padding according to filter weights */ + /* add padding sufficient for a 5-tap filter, */ + /* which is 2/3 of a pixel */ FT_BASE_DEF( void ) ft_lcd_padding( FT_BBox* cbox, FT_GlyphSlot slot, FT_Render_Mode mode ) { - FT_Byte* lcd_weights; - FT_Bitmap_LcdFilterFunc lcd_filter_func; - - - /* Per-face LCD filtering takes priority if set up. */ - if ( slot->face && slot->face->internal->lcd_filter_func ) - { - lcd_weights = slot->face->internal->lcd_weights; - lcd_filter_func = slot->face->internal->lcd_filter_func; - } - else - { - lcd_weights = slot->library->lcd_weights; - lcd_filter_func = slot->library->lcd_filter_func; - } - - if ( lcd_filter_func == ft_lcd_filter_fir ) - { - if ( mode == FT_RENDER_MODE_LCD ) - { - cbox->xMin -= lcd_weights[0] ? 43 : - lcd_weights[1] ? 22 : 0; - cbox->xMax += lcd_weights[4] ? 43 : - lcd_weights[3] ? 22 : 0; - } - else if ( mode == FT_RENDER_MODE_LCD_V ) - { - cbox->yMin -= lcd_weights[0] ? 43 : - lcd_weights[1] ? 22 : 0; - cbox->yMax += lcd_weights[4] ? 43 : - lcd_weights[3] ? 22 : 0; - } - } - } - - - /* FIR filter used by the default and light filters */ - FT_BASE_DEF( void ) - ft_lcd_filter_fir( FT_Bitmap* bitmap, - FT_LcdFiveTapFilter weights ) - { - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; - FT_Int pitch = bitmap->pitch; - FT_Byte* origin = bitmap->buffer; - FT_Byte mode = bitmap->pixel_mode; - - - /* take care of bitmap flow */ - if ( pitch > 0 && height > 0 ) - origin += pitch * (FT_Int)( height - 1 ); - - /* horizontal in-place FIR filter */ - if ( mode == FT_PIXEL_MODE_LCD && width >= 2 ) - { - FT_Byte* line = origin; - - - /* `fir' must be at least 32 bit wide, since the sum of */ - /* the values in `weights' can exceed 0xFF */ - - for ( ; height > 0; height--, line -= pitch ) - { - FT_UInt fir[5]; - FT_UInt val, xx; - - - val = line[0]; - fir[2] = weights[2] * val; - fir[3] = weights[3] * val; - fir[4] = weights[4] * val; - - val = line[1]; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - for ( xx = 2; xx < width; xx++ ) - { - val = line[xx]; - fir[0] = fir[1] + weights[0] * val; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - line[xx - 2] = FT_SHIFTCLAMP( fir[0] ); - } - - line[xx - 2] = FT_SHIFTCLAMP( fir[1] ); - line[xx - 1] = FT_SHIFTCLAMP( fir[2] ); - } - } - - /* vertical in-place FIR filter */ - else if ( mode == FT_PIXEL_MODE_LCD_V && height >= 2 ) - { - FT_Byte* column = origin; - - - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column; - FT_UInt fir[5]; - FT_UInt val, yy; - - - val = col[0]; - fir[2] = weights[2] * val; - fir[3] = weights[3] * val; - fir[4] = weights[4] * val; - col -= pitch; - - val = col[0]; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - col -= pitch; - - for ( yy = 2; yy < height; yy++, col -= pitch ) - { - val = col[0]; - fir[0] = fir[1] + weights[0] * val; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - col[pitch * 2] = FT_SHIFTCLAMP( fir[0] ); - } - - col[pitch * 2] = FT_SHIFTCLAMP( fir[1] ); - col[pitch] = FT_SHIFTCLAMP( fir[2] ); - } - } - } - - -#ifdef USE_LEGACY - - /* intra-pixel filter used by the legacy filter */ - static void - _ft_lcd_filter_legacy( FT_Bitmap* bitmap, - FT_Byte* weights ) - { - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; - FT_Int pitch = bitmap->pitch; - FT_Byte* origin = bitmap->buffer; - FT_Byte mode = bitmap->pixel_mode; - - static const unsigned int filters[3][3] = - { - { 65538 * 9/13, 65538 * 1/6, 65538 * 1/13 }, - { 65538 * 3/13, 65538 * 4/6, 65538 * 3/13 }, - { 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 } - }; - - FT_UNUSED( weights ); - - - /* take care of bitmap flow */ - if ( pitch > 0 && height > 0 ) - origin += pitch * (FT_Int)( height - 1 ); + FT_UNUSED( slot ); - /* horizontal in-place intra-pixel filter */ - if ( mode == FT_PIXEL_MODE_LCD && width >= 3 ) + if ( mode == FT_RENDER_MODE_LCD ) { - FT_Byte* line = origin; - - - for ( ; height > 0; height--, line -= pitch ) - { - FT_UInt xx; - - - for ( xx = 0; xx < width; xx += 3 ) - { - FT_UInt r, g, b; - FT_UInt p; - - - p = line[xx]; - r = filters[0][0] * p; - g = filters[0][1] * p; - b = filters[0][2] * p; - - p = line[xx + 1]; - r += filters[1][0] * p; - g += filters[1][1] * p; - b += filters[1][2] * p; - - p = line[xx + 2]; - r += filters[2][0] * p; - g += filters[2][1] * p; - b += filters[2][2] * p; - - line[xx] = (FT_Byte)( r / 65536 ); - line[xx + 1] = (FT_Byte)( g / 65536 ); - line[xx + 2] = (FT_Byte)( b / 65536 ); - } - } + cbox->xMin -= 43; + cbox->xMax += 43; } - else if ( mode == FT_PIXEL_MODE_LCD_V && height >= 3 ) + else if ( mode == FT_RENDER_MODE_LCD_V ) { - FT_Byte* column = origin; - - - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column - 2 * pitch; - - - for ( ; height > 0; height -= 3, col -= 3 * pitch ) - { - FT_UInt r, g, b; - FT_UInt p; - - - p = col[0]; - r = filters[0][0] * p; - g = filters[0][1] * p; - b = filters[0][2] * p; - - p = col[pitch]; - r += filters[1][0] * p; - g += filters[1][1] * p; - b += filters[1][2] * p; - - p = col[pitch * 2]; - r += filters[2][0] * p; - g += filters[2][1] * p; - b += filters[2][2] * p; - - col[0] = (FT_Byte)( r / 65536 ); - col[pitch] = (FT_Byte)( g / 65536 ); - col[pitch * 2] = (FT_Byte)( b / 65536 ); - } - } + cbox->yMin -= 43; + cbox->yMax += 43; } } -#endif /* USE_LEGACY */ - /* documentation in ftlcdfil.h */ @@ -297,7 +60,6 @@ return FT_THROW( Invalid_Argument ); ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; return FT_Err_Ok; } @@ -321,32 +83,23 @@ switch ( filter ) { case FT_LCD_FILTER_NONE: - library->lcd_filter_func = NULL; + ft_memset( library->lcd_weights, + 0, + FT_LCD_FILTER_FIVE_TAPS ); break; case FT_LCD_FILTER_DEFAULT: ft_memcpy( library->lcd_weights, default_weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; break; case FT_LCD_FILTER_LIGHT: ft_memcpy( library->lcd_weights, light_weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; break; -#ifdef USE_LEGACY - - case FT_LCD_FILTER_LEGACY: - case FT_LCD_FILTER_LEGACY1: - library->lcd_filter_func = _ft_lcd_filter_legacy; - break; - -#endif - default: return FT_THROW( Invalid_Argument ); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftmac.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftmac.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftmac.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftmac.c 2026-04-17 19:08:13.000000000 +0000 @@ -8,7 +8,7 @@ * This file is for Mac OS X only; see builds/mac/ftoldmac.c for * classic platforms built by MPW. * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftmm.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftmm.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftmm.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftmm.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Multiple Master font support (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -292,6 +292,9 @@ if ( num_coords && !coords ) return FT_THROW( Invalid_Argument ); + if ( !num_coords && !FT_IS_VARIATION( face ) ) + return FT_Err_Ok; /* nothing to be done */ + error = ft_face_get_mm_service( face, &service_mm ); if ( !error ) { @@ -299,15 +302,21 @@ if ( service_mm->set_var_design ) error = service_mm->set_var_design( face, num_coords, coords ); - if ( !error || error == -1 ) + if ( !error || error == -1 || error == -2 ) { FT_Bool is_variation_old = FT_IS_VARIATION( face ); - if ( num_coords ) - face->face_flags |= FT_FACE_FLAG_VARIATION; - else - face->face_flags &= ~FT_FACE_FLAG_VARIATION; + if ( error != -1 ) + { + if ( error == -2 ) /* -2 means is_variable. */ + { + face->face_flags |= FT_FACE_FLAG_VARIATION; + error = FT_Err_Ok; + } + else + face->face_flags &= ~FT_FACE_FLAG_VARIATION; + } if ( service_mm->construct_ps_name ) { @@ -474,15 +483,21 @@ if ( service_mm->set_mm_blend ) error = service_mm->set_mm_blend( face, num_coords, coords ); - if ( !error || error == -1 ) + if ( !error || error == -1 || error == -2 ) { FT_Bool is_variation_old = FT_IS_VARIATION( face ); - if ( num_coords ) - face->face_flags |= FT_FACE_FLAG_VARIATION; - else - face->face_flags &= ~FT_FACE_FLAG_VARIATION; + if ( error != -1 ) + { + if ( error == -2 ) /* -2 means is_variable. */ + { + face->face_flags |= FT_FACE_FLAG_VARIATION; + error = FT_Err_Ok; + } + else + face->face_flags &= ~FT_FACE_FLAG_VARIATION; + } if ( service_mm->construct_ps_name ) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftobjs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftobjs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftobjs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftobjs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType private base classes (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -524,12 +524,28 @@ bitmap->rows = (unsigned int)height; bitmap->pitch = pitch; - if ( pbox.xMin < -0x8000 || pbox.xMax > 0x7FFF || - pbox.yMin < -0x8000 || pbox.yMax > 0x7FFF ) + /* Flag the bounding box size unsuitable for rendering. */ + /* FT_Renderer modules should check the return value. */ + /* The limit is based on the ppem value when available. */ { - FT_TRACE3(( "ft_glyphslot_preset_bitmap: [%ld %ld %ld %ld]\n", - pbox.xMin, pbox.yMin, pbox.xMax, pbox.yMax )); - return 1; + FT_Face face = slot->face; + FT_Pos xlim = 0x8000; + FT_Pos ylim = 0x8000; + + + if ( face ) + { + xlim = FT_MIN( xlim, 10 * face->size->metrics.x_ppem ); + ylim = FT_MIN( ylim, 10 * face->size->metrics.y_ppem ); + } + + if ( pbox.xMin < -xlim || pbox.xMax >= xlim || + pbox.yMin < -ylim || pbox.yMax >= ylim ) + { + FT_TRACE3(( "ft_glyphslot_preset_bitmap: [%ld %ld %ld %ld]\n", + pbox.xMin, pbox.yMin, pbox.xMax, pbox.yMax )); + return 1; + } } return 0; @@ -549,8 +565,7 @@ FT_BASE_DEF( FT_Error ) - ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, - FT_ULong size ) + ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot ) { FT_Memory memory = FT_FACE_MEMORY( slot->face ); FT_Error error; @@ -561,7 +576,10 @@ else slot->internal->flags |= FT_GLYPH_OWN_BITMAP; - FT_MEM_ALLOC( slot->bitmap.buffer, size ); + /* dimensions must be preset */ + FT_MEM_ALLOC_MULT( slot->bitmap.buffer, + slot->bitmap.rows, + slot->bitmap.pitch ); return error; } @@ -905,7 +923,6 @@ FT_Library library; FT_Bool autohint = FALSE; FT_Module hinter; - TT_Face ttface = (TT_Face)face; if ( !face || !face->size || !face->glyph ) @@ -983,6 +1000,7 @@ { FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags ); FT_Bool is_light_type1; + TT_Face ttface = (TT_Face)face; /* only the new Adobe engine (for both CFF and Type 1) is `light'; */ @@ -994,8 +1012,7 @@ /* the check for `num_locations' assures that we actually */ /* test for instructions in a TTF and not in a CFF-based OTF */ /* */ - /* since `maxSizeOfInstructions' might be unreliable, we */ - /* check the size of the `fpgm' and `prep' tables, too -- */ + /* we check the size of the `fpgm' and `prep' tables, too -- */ /* the assumption is that there don't exist real TTFs where */ /* both `fpgm' and `prep' tables are missing */ if ( ( mode == FT_RENDER_MODE_LIGHT && @@ -1003,9 +1020,8 @@ !is_light_type1 ) ) || ( FT_IS_SFNT( face ) && ttface->num_locations && - ttface->max_profile.maxSizeOfInstructions == 0 && ttface->font_program_size == 0 && - ttface->cvt_program_size == 0 ) ) + ttface->cvt_program_size <= 7 ) ) autohint = TRUE; } } @@ -1172,9 +1188,9 @@ } #ifdef FT_DEBUG_LEVEL_TRACE - FT_TRACE5(( "FT_Load_Glyph: index %d, flags 0x%x\n", + FT_TRACE5(( "FT_Load_Glyph: index %u, flags 0x%x\n", glyph_index, load_flags )); - FT_TRACE5(( " bitmap %dx%d %s, %s (mode %d)\n", + FT_TRACE5(( " bitmap %ux%u %s, %s (mode %d)\n", slot->bitmap.width, slot->bitmap.rows, slot->outline.points ? @@ -1253,14 +1269,14 @@ FT_Driver driver = (FT_Driver)driver_; - /* finalize client-specific data */ - if ( size->generic.finalizer ) - size->generic.finalizer( size ); - /* finalize format-specific stuff */ if ( driver->clazz->done_size ) driver->clazz->done_size( size ); + /* finalize client-specific data */ + if ( size->generic.finalizer ) + size->generic.finalizer( size ); + FT_FREE( size->internal ); FT_FREE( size ); } @@ -1322,10 +1338,6 @@ driver ); face->size = NULL; - /* now discard client data */ - if ( face->generic.finalizer ) - face->generic.finalizer( face ); - /* discard charmaps */ destroy_charmaps( face, memory ); @@ -1340,6 +1352,10 @@ face->stream = NULL; + /* now discard client data */ + if ( face->generic.finalizer ) + face->generic.finalizer( face ); + /* get rid of it */ if ( face->internal ) { @@ -1359,21 +1375,9 @@ } - /************************************************************************** - * - * @Function: - * find_unicode_charmap - * - * @Description: - * This function finds a Unicode charmap, if there is one. - * And if there is more than one, it tries to favour the more - * extensive one, i.e., one that supports UCS-4 against those which - * are limited to the BMP (said UCS-2 encoding.) - * - * This function is called from open_face() (just below), and also - * from FT_Select_Charmap( ..., FT_ENCODING_UNICODE ). - */ - static FT_Error + /* documentation is in ftobjs.h */ + + FT_BASE_DEF( FT_Error ) find_unicode_charmap( FT_Face face ) { FT_CharMap* first; @@ -1427,7 +1431,10 @@ if ( ( cur[0]->platform_id == TT_PLATFORM_MICROSOFT && cur[0]->encoding_id == TT_MS_ID_UCS_4 ) || ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE && - cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) ) + cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) || + ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE && + cur[0]->encoding_id == TT_APPLE_ID_FULL_UNICODE && + FT_Get_CMap_Format( cur[0] ) == 13 ) ) { face->charmap = cur[0]; return FT_Err_Ok; @@ -2125,7 +2132,7 @@ if ( pfb_pos > pfb_len || pfb_pos + rlen > pfb_len ) goto Exit2; - FT_TRACE3(( " Load POST fragment #%d (%ld byte) to buffer" + FT_TRACE3(( " Load POST fragment #%d (%lu byte) to buffer" " %p + 0x%08lx\n", i, rlen, (void*)pfb_data, pfb_pos )); @@ -2398,7 +2405,7 @@ is_darwin_vfs = ft_raccess_rule_by_darwin_vfs( library, i ); if ( is_darwin_vfs && vfs_rfork_has_no_font ) { - FT_TRACE3(( "Skip rule %d: darwin vfs resource fork" + FT_TRACE3(( "Skip rule %u: darwin vfs resource fork" " is already checked and" " no font is found\n", i )); @@ -2407,7 +2414,7 @@ if ( errors[i] ) { - FT_TRACE3(( "Error 0x%x has occurred in rule %d\n", + FT_TRACE3(( "Error 0x%x has occurred in rule %u\n", errors[i], i )); continue; } @@ -2415,7 +2422,7 @@ args2.flags = FT_OPEN_PATHNAME; args2.pathname = file_names[i] ? file_names[i] : args->pathname; - FT_TRACE3(( "Try rule %d: %s (offset=%ld) ...", + FT_TRACE3(( "Try rule %u: %s (offset=%ld) ...", i, args2.pathname, offsets[i] )); error = FT_Stream_New( library, &args2, &stream2 ); @@ -2812,11 +2819,6 @@ internal->refcount = 1; internal->no_stem_darkening = -1; - -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - /* Per-face filtering can only be set up by FT_Face_Properties */ - internal->lcd_filter_func = NULL; -#endif } if ( aface ) @@ -4046,18 +4048,8 @@ } else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS ) { -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - if ( properties->data ) - { - ft_memcpy( face->internal->lcd_weights, - properties->data, - FT_LCD_FILTER_FIVE_TAPS ); - face->internal->lcd_filter_func = ft_lcd_filter_fir; - } -#else error = FT_THROW( Unimplemented_Feature ); goto Exit; -#endif } else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED ) { @@ -5044,9 +5036,9 @@ static void Destroy_Module( FT_Module module ) { - FT_Memory memory = module->memory; - FT_Module_Class* clazz = module->clazz; - FT_Library library = module->library; + const FT_Module_Class* clazz = module->clazz; + FT_Library library = module->library; + FT_Memory memory = module->memory; if ( library && library->auto_hinter == module ) @@ -5125,9 +5117,9 @@ goto Exit; /* base initialization */ + module->clazz = clazz; module->library = library; module->memory = memory; - module->clazz = (FT_Module_Class*)clazz; /* check whether the module is a renderer - this must be performed */ /* before the normal module initialization */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftoutln.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftoutln.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftoutln.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftoutln.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType outline management (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftpatent.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftpatent.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftpatent.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftpatent.c 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * FreeType API for checking patented TrueType bytecode instructions * (body). Obsolete, retained for backward compatibility. * - * Copyright (C) 2007-2024 by + * Copyright (C) 2007-2025 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftpsprop.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftpsprop.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftpsprop.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftpsprop.c 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Get and set properties of PostScript drivers (body). * See `ftdriver.h' for available properties. * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftrfork.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftrfork.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftrfork.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftrfork.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (body). * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * Masatake YAMATO and Redhat K.K. * * FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are @@ -269,14 +269,8 @@ * According to Inside Macintosh: More Macintosh Toolbox, * "Resource IDs" (1-46), there are some reserved IDs. * However, FreeType2 is not a font synthesizer, no need - * to check the acceptable resource ID. + * to check the acceptable resource ID or its attributes. */ - if ( temp < 0 ) - { - error = FT_THROW( Invalid_Table ); - goto Exit; - } - ref[j].offset = temp & 0xFFFFFFL; FT_TRACE3(( " [%d]:" diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftsnames.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftsnames.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftsnames.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftsnames.c 2026-04-17 19:08:13.000000000 +0000 @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftstream.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftstream.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftstream.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftstream.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * I/O stream support (body). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -242,7 +242,7 @@ FT_ULong read_bytes; - FT_TRACE7(( "FT_Stream_EnterFrame: %ld bytes\n", count )); + FT_TRACE7(( "FT_Stream_EnterFrame: %lu bytes\n", count )); /* check for nested frame access */ FT_ASSERT( stream && stream->cursor == 0 ); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftstroke.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftstroke.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftstroke.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftstroke.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType path stroker (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1070,7 +1070,7 @@ if ( theta == FT_ANGLE_PI2 ) theta = -rotate; - phi = stroker->angle_in + theta + rotate; + phi = stroker->angle_in + theta + rotate; FT_Vector_From_Polar( &sigma, stroker->miter_limit, theta ); @@ -1371,7 +1371,7 @@ arc[1] = *control; arc[2] = stroker->center; - while ( arc >= bez_stack ) + do { FT_Angle angle_in, angle_out; @@ -1524,10 +1524,12 @@ } } - arc -= 2; - stroker->angle_in = angle_out; - } + + if ( arc == bez_stack ) + break; + arc -= 2; + } while ( 1 ); stroker->center = *to; stroker->line_length = 0; @@ -1577,7 +1579,7 @@ arc[2] = *control1; arc[3] = stroker->center; - while ( arc >= bez_stack ) + do { FT_Angle angle_in, angle_mid, angle_out; @@ -1741,10 +1743,12 @@ } } - arc -= 3; - stroker->angle_in = angle_out; - } + + if ( arc == bez_stack ) + break; + arc -= 3; + } while ( 1 ); stroker->center = *to; stroker->line_length = 0; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftsynth.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftsynth.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftsynth.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftsynth.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType synthesizing code for emboldening and slanting (body). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -141,7 +141,7 @@ /* * XXX: overflow check for 16-bit system, for compatibility * with FT_GlyphSlot_Embolden() since FreeType 2.1.10. - * unfortunately, this function return no informations + * unfortunately, this function returns no information * about the cause of error. */ if ( ( ystr >> 6 ) > FT_INT_MAX || ( ystr >> 6 ) < FT_INT_MIN ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftsystem.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftsystem.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftsystem.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftsystem.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * ANSI-specific FreeType low-level system interface (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -280,7 +280,7 @@ stream->close = ft_ansi_stream_close; FT_TRACE1(( "FT_Stream_Open:" )); - FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n", + FT_TRACE1(( " opened `%s' (%lu bytes) successfully\n", filepathname, stream->size )); return FT_Err_Ok; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/fttrigon.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/fttrigon.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/fttrigon.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/fttrigon.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (body). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/fttype1.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/fttype1.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/fttype1.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/fttype1.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType utility file for PS names support (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftutil.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftutil.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/base/ftutil.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/base/ftutil.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType utility file for memory and list management (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -424,11 +424,10 @@ while ( cur ) { FT_ListNode next = cur->next; - void* data = cur->data; if ( destroy ) - destroy( memory, data, user ); + destroy( memory, cur->data, user ); FT_FREE( cur ); cur = next; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffcmap.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType font driver implementation (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. * * This file is part of the FreeType project, and may only be used, @@ -121,7 +121,20 @@ kerning->y = 0; if ( sfnt ) - kerning->x = sfnt->get_kerning( cffface, left_glyph, right_glyph ); + { + /* Use 'kern' table if available since that can be faster; otherwise */ + /* use GPOS kerning pairs if available. */ + if ( cffface->kern_avail_bits ) + kerning->x = sfnt->get_kerning( cffface, + left_glyph, + right_glyph ); +#ifdef TT_CONFIG_OPTION_GPOS_KERNING + else if ( cffface->num_gpos_lookups_kerning ) + kerning->x = sfnt->get_gpos_kerning( cffface, + left_glyph, + right_glyph ); +#endif + } return FT_Err_Ok; } @@ -168,25 +181,7 @@ CFF_Size cffsize = (CFF_Size)size; - if ( !cffslot ) - return FT_THROW( Invalid_Slot_Handle ); - - FT_TRACE1(( "cff_glyph_load: glyph index %d\n", glyph_index )); - - /* check whether we want a scaled outline or bitmap */ - if ( !cffsize ) - load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING; - - /* reset the size object if necessary */ - if ( load_flags & FT_LOAD_NO_SCALE ) - size = NULL; - - if ( size ) - { - /* these two objects must have the same parent */ - if ( size->face != slot->face ) - return FT_THROW( Invalid_Face_Handle ); - } + FT_TRACE1(( "cff_glyph_load: glyph index %u\n", glyph_index )); /* now load the glyph outline if necessary */ error = cff_slot_load( cffslot, cffsize, glyph_index, load_flags ); @@ -205,105 +200,70 @@ FT_Int32 flags, FT_Fixed* advances ) { - FT_UInt nn; - FT_Error error = FT_Err_Ok; - FT_GlyphSlot slot = face->glyph; + CFF_Face cffface = (CFF_Face)face; + FT_Bool horz; + FT_UInt nn; + + if ( !FT_IS_SFNT( face ) ) + return FT_THROW( Unimplemented_Feature ); - if ( FT_IS_SFNT( face ) ) + horz = !( flags & FT_LOAD_VERTICAL_LAYOUT ); + + if ( horz ) { /* OpenType 1.7 mandates that the data from `hmtx' table be used; */ /* it is no longer necessary that those values are identical to */ /* the values in the `CFF' table */ + if ( !cffface->horizontal.number_Of_HMetrics ) + return FT_THROW( Unimplemented_Feature ); - CFF_Face cffface = (CFF_Face)face; - FT_Short dummy; - - - if ( flags & FT_LOAD_VERTICAL_LAYOUT ) - { #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - /* no fast retrieval for blended MM fonts without VVAR table */ - if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) && - !( cffface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ) - return FT_THROW( Unimplemented_Feature ); + /* no fast retrieval for blended MM fonts without HVAR table */ + if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) && + !( cffface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ) + return FT_THROW( Unimplemented_Feature ); #endif + } + else /* vertical */ + { + /* check whether we have data from the `vmtx' table at all; */ + /* otherwise we extract the info from the CFF glyphstrings */ + /* (instead of synthesizing a global value using the `OS/2' */ + /* table) */ + if ( !cffface->vertical_info ) + return FT_THROW( Unimplemented_Feature ); - /* check whether we have data from the `vmtx' table at all; */ - /* otherwise we extract the info from the CFF glyphstrings */ - /* (instead of synthesizing a global value using the `OS/2' */ - /* table) */ - if ( !cffface->vertical_info ) - goto Missing_Table; - - for ( nn = 0; nn < count; nn++ ) - { - FT_UShort ah; - - - ( (SFNT_Service)cffface->sfnt )->get_metrics( cffface, - 1, - start + nn, - &dummy, - &ah ); - - FT_TRACE5(( " idx %d: advance height %d font unit%s\n", - start + nn, - ah, - ah == 1 ? "" : "s" )); - advances[nn] = ah; - } - } - else - { #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - /* no fast retrieval for blended MM fonts without HVAR table */ - if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) && - !( cffface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ) - return FT_THROW( Unimplemented_Feature ); + /* no fast retrieval for blended MM fonts without VVAR table */ + if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) && + !( cffface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ) + return FT_THROW( Unimplemented_Feature ); #endif - - /* check whether we have data from the `hmtx' table at all */ - if ( !cffface->horizontal.number_Of_HMetrics ) - goto Missing_Table; - - for ( nn = 0; nn < count; nn++ ) - { - FT_UShort aw; - - - ( (SFNT_Service)cffface->sfnt )->get_metrics( cffface, - 0, - start + nn, - &dummy, - &aw ); - - FT_TRACE5(( " idx %d: advance width %d font unit%s\n", - start + nn, - aw, - aw == 1 ? "" : "s" )); - advances[nn] = aw; - } - } - - return error; } - Missing_Table: - flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; - + /* proceed to fast advances */ for ( nn = 0; nn < count; nn++ ) { - error = cff_glyph_load( slot, face->size, start + nn, flags ); - if ( error ) - break; - - advances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT ) - ? slot->linearVertAdvance - : slot->linearHoriAdvance; + FT_UShort aw; + FT_Short dummy; + + + ( (SFNT_Service)cffface->sfnt )->get_metrics( cffface, + !horz, + start + nn, + &dummy, + &aw ); + + FT_TRACE5(( " idx %u: advance %s %d font unit%s\n", + start + nn, + horz ? "width" : "height", + aw, + aw == 1 ? "" : "s" )); + advances[nn] = aw; } - return error; + return FT_Err_Ok; } @@ -496,8 +456,8 @@ dict->weight ); font_info->italic_angle = dict->italic_angle; font_info->is_fixed_pitch = dict->is_fixed_pitch; - font_info->underline_position = (FT_Short)dict->underline_position; - font_info->underline_thickness = (FT_UShort)dict->underline_thickness; + font_info->underline_position = dict->underline_position; + font_info->underline_thickness = dict->underline_thickness; cff->font_info = font_info; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level OpenType driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cfferrs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cfferrs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cfferrs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cfferrs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CFF error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffgload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffgload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffgload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffgload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -238,24 +238,12 @@ else if ( glyph_index >= cff->num_glyphs ) return FT_THROW( Invalid_Argument ); - if ( load_flags & FT_LOAD_NO_RECURSE ) - load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING; - - glyph->x_scale = 0x10000L; - glyph->y_scale = 0x10000L; - if ( size ) - { - glyph->x_scale = size->root.metrics.x_scale; - glyph->y_scale = size->root.metrics.y_scale; - } - #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS /* try to load embedded bitmap if any */ /* */ /* XXX: The convention should be emphasized in */ /* the documents because it can be confusing. */ - if ( size ) { CFF_Face cff_face = (CFF_Face)size->root.face; SFNT_Service sfnt = (SFNT_Service)cff_face->sfnt; @@ -284,9 +272,6 @@ FT_Short dummy; - glyph->root.outline.n_points = 0; - glyph->root.outline.n_contours = 0; - glyph->root.metrics.width = (FT_Pos)metrics.width * 64; glyph->root.metrics.height = (FT_Pos)metrics.height * 64; @@ -423,6 +408,25 @@ #endif /* FT_CONFIG_OPTION_SVG */ + /* top-level code ensures that FT_LOAD_NO_HINTING is set */ + /* if FT_LOAD_NO_SCALE is active */ + hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); + scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 ); + + glyph->hint = hinting; + glyph->scaled = scaled; + + if ( scaled ) + { + glyph->x_scale = size->root.metrics.x_scale; + glyph->y_scale = size->root.metrics.y_scale; + } + else + { + glyph->x_scale = 0x10000L; + glyph->y_scale = 0x10000L; + } + /* if we have a CID subfont, use its matrix (which has already */ /* been multiplied with the root matrix) */ @@ -457,18 +461,6 @@ font_offset = cff->top_font.font_dict.font_offset; } - glyph->root.outline.n_points = 0; - glyph->root.outline.n_contours = 0; - - /* top-level code ensures that FT_LOAD_NO_HINTING is set */ - /* if FT_LOAD_NO_SCALE is active */ - hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); - scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 ); - - glyph->hint = hinting; - glyph->scaled = scaled; - glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; /* by default */ - { #ifdef CFF_CONFIG_OPTION_OLD_ENGINE PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face ); @@ -602,10 +594,8 @@ { /* Now, set the metrics -- this is rather simple, as */ /* the left side bearing is the xMin, and the top side */ - /* bearing the yMax. */ - - /* For composite glyphs, return only left side bearing and */ - /* advance width. */ + /* bearing the yMax. For composite glyphs, return only */ + /* left side bearing and advance width. */ if ( load_flags & FT_LOAD_NO_RECURSE ) { FT_Slot_Internal internal = glyph->root.internal; @@ -624,6 +614,12 @@ FT_Bool has_vertical_info; + glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; + + glyph->root.outline.flags = FT_OUTLINE_REVERSE_FILL; + if ( size && size->root.metrics.y_ppem < 24 ) + glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION; + if ( face->horizontal.number_Of_HMetrics ) { FT_Short horiBearingX = 0; @@ -677,14 +673,6 @@ glyph->root.linearVertAdvance = metrics->vertAdvance; - glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; - - glyph->root.outline.flags = 0; - if ( size && size->root.metrics.y_ppem < 24 ) - glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION; - - glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL; - /* apply the font matrix, if any */ if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L || font_matrix.xy != 0 || font_matrix.yx != 0 ) @@ -707,7 +695,7 @@ metrics->vertAdvance += font_offset.y; } - if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || force_scaling ) + if ( scaled || force_scaling ) { /* scale the outline and the metrics */ FT_Int n; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffgload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffgload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffgload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffgload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType and CFF data/program tables loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -442,7 +442,7 @@ if ( cur_offset != 0 ) { FT_TRACE0(( "cff_index_get_pointers:" - " invalid first offset value %ld set to zero\n", + " invalid first offset value %lu set to zero\n", cur_offset )); cur_offset = 0; } @@ -559,8 +559,8 @@ idx->data_offset > stream->size - off2 + 1 ) { FT_ERROR(( "cff_index_access_element:" - " offset to next entry (%ld)" - " exceeds the end of stream (%ld)\n", + " offset to next entry (%lu)" + " exceeds the end of stream (%lu)\n", off2, stream->size - idx->data_offset + 1 )); off2 = stream->size - idx->data_offset + 1; } @@ -982,7 +982,7 @@ if ( glyph_sid > 0xFFFFL - nleft ) { FT_ERROR(( "cff_charset_load: invalid SID range trimmed" - " nleft=%d -> %ld\n", nleft, 0xFFFFL - glyph_sid )); + " nleft=%u -> %ld\n", nleft, 0xFFFFL - glyph_sid )); nleft = ( FT_UInt )( 0xFFFFL - glyph_sid ); } @@ -1315,7 +1315,7 @@ if ( numOperands > count ) { - FT_TRACE4(( " cff_blend_doBlend: Stack underflow %d argument%s\n", + FT_TRACE4(( " cff_blend_doBlend: Stack underflow %u argument%s\n", count, count == 1 ? "" : "s" )); @@ -1466,7 +1466,7 @@ if ( master == 0 ) { blend->BV[master] = FT_FIXED_ONE; - FT_TRACE4(( " build blend vector len %d\n", len )); + FT_TRACE4(( " build blend vector len %u\n", len )); FT_TRACE4(( " [ %f ", blend->BV[master] / 65536.0 )); continue; } @@ -2014,8 +2014,8 @@ /* set defaults */ FT_ZERO( top ); - top->underline_position = -( 100L << 16 ); - top->underline_thickness = 50L << 16; + top->underline_position = -100; + top->underline_thickness = 50; top->charstring_type = 2; top->font_matrix.xx = 0x10000L; top->font_matrix.yy = 0x10000L; @@ -2341,7 +2341,7 @@ if ( face_index > 0 && subfont_index >= font->name_index.count ) { FT_ERROR(( "cff_font_load:" - " invalid subfont index for pure CFF font (%d)\n", + " invalid subfont index for pure CFF font (%u)\n", subfont_index )); error = FT_THROW( Invalid_Argument ); goto Exit; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType & CFF data/program tables loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType objects manager (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -537,8 +537,8 @@ sfnt_format = 1; - /* now, the font can be either an OpenType/CFF font, or an SVG CEF */ - /* font; in the latter case it doesn't have a `head' table */ + /* the font may be OpenType/CFF, SVG CEF, or sfnt/CFF; a `head' table */ + /* implies OpenType/CFF, otherwise just look for an optional cmap */ error = face->goto_table( face, TTAG_head, stream, 0 ); if ( !error ) { @@ -554,7 +554,9 @@ { /* load the `cmap' table explicitly */ error = sfnt->load_cmap( face, stream ); - if ( error ) + + /* this may fail because CID-keyed fonts don't have a cmap */ + if ( FT_ERR_NEQ( error, Table_Missing ) && FT_ERR_NEQ( error, Ok ) ) goto Exit; } @@ -651,7 +653,7 @@ { s = cff_index_get_sid_string( cff, idx ); if ( s ) - FT_TRACE4(( " %5d %s\n", idx, s )); + FT_TRACE4(( " %5u %s\n", idx, s )); } /* In Multiple Master CFFs, two SIDs hold the Normalize Design */ @@ -666,7 +668,7 @@ FT_PtrDist l; - FT_TRACE4(( " %5d ", idx + 390 )); + FT_TRACE4(( " %5u ", idx + 390 )); for ( l = 0; l < s1len; l++ ) FT_TRACE4(( "%c", s1[l] )); FT_TRACE4(( "\n" )); @@ -681,7 +683,7 @@ FT_PtrDist l; - FT_TRACE4(( " %5d ", cff->num_strings + 390 )); + FT_TRACE4(( " %5u ", cff->num_strings + 390 )); for ( l = 0; l < s1len; l++ ) FT_TRACE4(( "%c", s1[l] )); FT_TRACE4(( "\n" )); @@ -844,10 +846,8 @@ cffface->height = (FT_Short)( cffface->ascender - cffface->descender ); - cffface->underline_position = - (FT_Short)( dict->underline_position >> 16 ); - cffface->underline_thickness = - (FT_Short)( dict->underline_thickness >> 16 ); + cffface->underline_position = (FT_Short)dict->underline_position; + cffface->underline_thickness = (FT_Short)dict->underline_thickness; /* retrieve font family & style name */ if ( dict->family_name ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffobjs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType objects manager (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffparse.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffparse.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffparse.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffparse.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CFF token stream parser (body) * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -892,7 +892,7 @@ dict->cid_supplement )); error = FT_Err_Ok; - FT_TRACE4(( " %d %d %ld\n", + FT_TRACE4(( " %u %u %ld\n", dict->cid_registry, dict->cid_ordering, dict->cid_supplement )); @@ -929,7 +929,7 @@ priv->vsindex = (FT_UInt)cff_parse_num( parser, data++ ); - FT_TRACE4(( " %d\n", priv->vsindex )); + FT_TRACE4(( " %u\n", priv->vsindex )); error = FT_Err_Ok; @@ -979,7 +979,7 @@ goto Exit; } - FT_TRACE4(( " %d value%s blended\n", + FT_TRACE4(( " %u value%s blended\n", numBlends, numBlends == 1 ? "" : "s" )); @@ -1014,7 +1014,7 @@ if ( dict->maxstack < CFF2_DEFAULT_STACK ) dict->maxstack = CFF2_DEFAULT_STACK; - FT_TRACE4(( " %d\n", dict->maxstack )); + FT_TRACE4(( " %u\n", dict->maxstack )); Exit: return error; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffparse.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffparse.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cffparse.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cffparse.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CFF token stream parser (specification) * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cfftoken.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cfftoken.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cff/cfftoken.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cff/cfftoken.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CFF token definitions (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -30,8 +30,8 @@ CFF_FIELD_STRING ( 4, weight, "Weight" ) CFF_FIELD_BOOL ( 0x101, is_fixed_pitch, "isFixedPitch" ) CFF_FIELD_FIXED ( 0x102, italic_angle, "ItalicAngle" ) - CFF_FIELD_FIXED ( 0x103, underline_position, "UnderlinePosition" ) - CFF_FIELD_FIXED ( 0x104, underline_thickness, "UnderlineThickness" ) + CFF_FIELD_NUM ( 0x103, underline_position, "UnderlinePosition" ) + CFF_FIELD_NUM ( 0x104, underline_thickness, "UnderlineThickness" ) CFF_FIELD_NUM ( 0x105, paint_type, "PaintType" ) CFF_FIELD_NUM ( 0x106, charstring_type, "CharstringType" ) CFF_FIELD_CALLBACK( 0x107, font_matrix, "FontMatrix" ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/ciderrs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/ciderrs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/ciderrs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/ciderrs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidgload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidgload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidgload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidgload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID-keyed Type1 Glyph Loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -103,20 +103,20 @@ if ( ( cid->fd_bytes == 1 && fd_select == 0xFFU ) || ( cid->fd_bytes == 2 && fd_select == 0xFFFFU ) ) { - FT_TRACE1(( "cid_load_glyph: fail for glyph index %d:\n", + FT_TRACE1(( "cid_load_glyph: fail for glyph index %u:\n", glyph_index )); - FT_TRACE1(( " FD number %ld is the maximum\n", + FT_TRACE1(( " FD number %lu is the maximum\n", fd_select )); - FT_TRACE1(( " integer fitting into %d byte%s\n", + FT_TRACE1(( " integer fitting into %u byte%s\n", cid->fd_bytes, cid->fd_bytes == 1 ? "" : "s" )); } else { - FT_TRACE0(( "cid_load_glyph: fail for glyph index %d:\n", + FT_TRACE0(( "cid_load_glyph: fail for glyph index %u:\n", glyph_index )); - FT_TRACE0(( " FD number %ld is larger\n", + FT_TRACE0(( " FD number %lu is larger\n", fd_select )); - FT_TRACE0(( " than number of dictionaries (%d)\n", + FT_TRACE0(( " than number of dictionaries (%u)\n", cid->num_dicts )); } @@ -125,7 +125,7 @@ } else if ( off2 > stream->size ) { - FT_TRACE0(( "cid_load_glyph: fail for glyph index %d:\n", + FT_TRACE0(( "cid_load_glyph: fail for glyph index %u:\n", glyph_index )); FT_TRACE0(( " end of the glyph data\n" )); FT_TRACE0(( " is beyond the data stream\n" )); @@ -135,7 +135,7 @@ } else if ( off1 > off2 ) { - FT_TRACE0(( "cid_load_glyph: fail for glyph index %d:\n", + FT_TRACE0(( "cid_load_glyph: fail for glyph index %u:\n", glyph_index )); FT_TRACE0(( " the end position of glyph data\n" )); FT_TRACE0(( " is set before the start position\n" )); @@ -252,8 +252,8 @@ cs_offset = decoder->lenIV >= 0 ? (FT_UInt)decoder->lenIV : 0; if ( cs_offset > glyph_length ) { - FT_TRACE0(( "cid_load_glyph: fail for glyph_index=%d, " - "offset to the charstring is beyond glyph length\n", + FT_TRACE0(( "cid_load_glyph: fail for glyph_index=%u," + " offset to the charstring is beyond glyph length\n", glyph_index )); error = FT_THROW( Invalid_Offset ); goto Exit; @@ -452,16 +452,12 @@ glyph->x_scale = cidsize->metrics.x_scale; glyph->y_scale = cidsize->metrics.y_scale; - cidglyph->outline.n_points = 0; - cidglyph->outline.n_contours = 0; - hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 && ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 ); glyph->hint = hinting; glyph->scaled = scaled; - cidglyph->format = FT_GLYPH_FORMAT_OUTLINE; error = psaux->t1_decoder_funcs->init( &decoder, cidglyph->face, @@ -501,12 +497,8 @@ /* now set the metrics -- this is rather simple, as */ /* the left side bearing is the xMin, and the top side */ - /* bearing the yMax */ - cidglyph->outline.flags &= FT_OUTLINE_OWNER; - cidglyph->outline.flags |= FT_OUTLINE_REVERSE_FILL; - - /* for composite glyphs, return only left side bearing and */ - /* advance width */ + /* bearing the yMax; for composite glyphs, return only */ + /* left side bearing and advance width */ if ( load_flags & FT_LOAD_NO_RECURSE ) { FT_Slot_Internal internal = cidglyph->internal; @@ -527,6 +519,13 @@ FT_Glyph_Metrics* metrics = &cidglyph->metrics; + cidglyph->format = FT_GLYPH_FORMAT_OUTLINE; + + cidglyph->outline.flags &= FT_OUTLINE_OWNER; + cidglyph->outline.flags |= FT_OUTLINE_REVERSE_FILL; + if ( cidsize->metrics.y_ppem < 24 ) + cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; + /* copy the _unscaled_ advance width */ metrics->horiAdvance = FIXED_TO_INT( decoder.builder.advance.x ); @@ -539,11 +538,6 @@ face->cid.font_bbox.yMin ) >> 16; cidglyph->linearVertAdvance = metrics->vertAdvance; - cidglyph->format = FT_GLYPH_FORMAT_OUTLINE; - - if ( cidsize->metrics.y_ppem < 24 ) - cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; - /* apply the font matrix, if any */ if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L || font_matrix.xy != 0 || font_matrix.yx != 0 ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidgload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidgload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidgload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidgload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID objects manager (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidobjs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID objects manager (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidparse.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidparse.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidparse.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidparse.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidparse.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidparse.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidparse.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidparse.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidriver.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidriver.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidriver.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidriver.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID driver interface (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidriver.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidriver.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidriver.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidriver.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level CID driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidtoken.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidtoken.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/cid/cidtoken.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/cid/cidtoken.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * CID token definitions (specification only). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -47,7 +47,7 @@ T1_FIELD_STRING( "FullName", full_name, 0 ) T1_FIELD_STRING( "FamilyName", family_name, 0 ) T1_FIELD_STRING( "Weight", weight, 0 ) - T1_FIELD_NUM ( "ItalicAngle", italic_angle, 0 ) + T1_FIELD_FIXED ( "ItalicAngle", italic_angle, 0 ) T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch, 0 ) T1_FIELD_NUM ( "UnderlinePosition", underline_position, 0 ) T1_FIELD_NUM ( "UnderlineThickness", underline_thickness, 0 ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * AFM parser (body). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/afmparse.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * AFM parser (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (body). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -2141,7 +2141,7 @@ decoder->locals_bias ); - FT_TRACE4(( " callsubr (idx %d, entering level %td)\n", + FT_TRACE4(( " callsubr (idx %u, entering level %td)\n", idx, zone - decoder->zones + 1 )); @@ -2185,7 +2185,7 @@ decoder->globals_bias ); - FT_TRACE4(( " callgsubr (idx %d, entering level %td)\n", + FT_TRACE4(( " callgsubr (idx %u, entering level %td)\n", idx, zone - decoder->zones + 1 )); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/cffdecode.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (specification). * - * Copyright (C) 2017-2024 by + * Copyright (C) 2017-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psauxerr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psauxerr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psauxerr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psauxerr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PS auxiliary module error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (body). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psauxmod.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (specification). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -46,9 +46,6 @@ const CFF_Decoder_FuncsRec cff_decoder_funcs; - FT_EXPORT_VAR( const FT_Module_Class ) psaux_driver_class; - - FT_DECLARE_MODULE( psaux_module_class ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psconv.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psconv.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psconv.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psconv.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Some convenience conversions (body). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psconv.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psconv.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psconv.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psconv.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Some convenience conversions (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c 2026-04-17 19:08:13.000000000 +0000 @@ -618,7 +618,7 @@ /* Our copy of it does not change that requirement. */ cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 ); - charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack ); + charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack ); /* catch errors so far */ if ( *error ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -460,6 +460,9 @@ case '%': skip_comment( &cur, limit ); break; + + default: + break; } } @@ -1145,7 +1148,7 @@ FT_ERROR(( "ps_parser_load_field:" " expected a name or string\n" )); FT_ERROR(( " " - " but found token of type %d instead\n", + " but found token of type %u instead\n", token.type )); error = FT_THROW( Invalid_File_Format ); goto Exit; @@ -1225,7 +1228,7 @@ if ( result < 0 || (FT_UInt)result < max_objects ) { FT_ERROR(( "ps_parser_load_field:" - " expected %d integer%s in the %s subarray\n", + " expected %u integer%s in the %s subarray\n", max_objects, max_objects > 1 ? "s" : "", i == 0 ? "first" : ( i == 1 ? "second" diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/psobjs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 character map support (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1cmap.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 character map support (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (body). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1633,7 +1633,7 @@ default: FT_ERROR(( "t1_decoder_parse_charstrings:" - " unhandled opcode %d\n", op )); + " unhandled opcode %u\n", op )); goto Syntax_Error; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psaux/t1decode.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (specification). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (body). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used @@ -35,10 +35,6 @@ #endif -#define COMPUTE_INFLEXS /* compute inflection points to optimize `S' */ - /* and similar glyphs */ - - /*************************************************************************/ /*************************************************************************/ /***** *****/ @@ -100,7 +96,7 @@ if ( idx >= table->max_hints ) { - FT_TRACE0(( "psh_hint_table_record: invalid hint index %d\n", idx )); + FT_TRACE0(( "psh_hint_table_record: invalid hint index %u\n", idx )); return; } @@ -920,117 +916,6 @@ #define psh_corner_orientation ft_corner_orientation -#ifdef COMPUTE_INFLEXS - - /* compute all inflex points in a given glyph */ - static void - psh_glyph_compute_inflections( PSH_Glyph glyph ) - { - FT_UInt n; - - - for ( n = 0; n < glyph->num_contours; n++ ) - { - PSH_Point first, start, end, before, after; - FT_Pos in_x, in_y, out_x, out_y; - FT_Int orient_prev, orient_cur; - FT_Int finished = 0; - - - /* we need at least 4 points to create an inflection point */ - if ( glyph->contours[n].count < 4 ) - continue; - - /* compute first segment in contour */ - first = glyph->contours[n].start; - - start = end = first; - do - { - end = end->next; - if ( end == first ) - goto Skip; - - in_x = end->org_u - start->org_u; - in_y = end->org_v - start->org_v; - - } while ( in_x == 0 && in_y == 0 ); - - /* extend the segment start whenever possible */ - before = start; - do - { - do - { - start = before; - before = before->prev; - if ( before == first ) - goto Skip; - - out_x = start->org_u - before->org_u; - out_y = start->org_v - before->org_v; - - } while ( out_x == 0 && out_y == 0 ); - - orient_prev = psh_corner_orientation( in_x, in_y, out_x, out_y ); - - } while ( orient_prev == 0 ); - - first = start; - in_x = out_x; - in_y = out_y; - - /* now, process all segments in the contour */ - do - { - /* first, extend current segment's end whenever possible */ - after = end; - do - { - do - { - end = after; - after = after->next; - if ( after == first ) - finished = 1; - - out_x = after->org_u - end->org_u; - out_y = after->org_v - end->org_v; - - } while ( out_x == 0 && out_y == 0 ); - - orient_cur = psh_corner_orientation( in_x, in_y, out_x, out_y ); - - } while ( orient_cur == 0 ); - - if ( ( orient_cur ^ orient_prev ) < 0 ) - { - do - { - psh_point_set_inflex( start ); - start = start->next; - } - while ( start != end ); - - psh_point_set_inflex( start ); - } - - start = end; - end = after; - orient_prev = orient_cur; - in_x = out_x; - in_y = out_y; - - } while ( !finished ); - - Skip: - ; - } - } - -#endif /* COMPUTE_INFLEXS */ - - static void psh_glyph_done( PSH_Glyph glyph ) { @@ -1258,11 +1143,6 @@ glyph->outline = outline; glyph->globals = globals; -#ifdef COMPUTE_INFLEXS - psh_glyph_load_points( glyph, 0 ); - psh_glyph_compute_inflections( glyph ); -#endif /* COMPUTE_INFLEXS */ - /* now deal with hints tables */ error = psh_hint_table_init( &glyph->hint_tables [0], &ps_hints->dimension[0].hints, @@ -1285,122 +1165,47 @@ } - /* compute all extrema in a glyph for a given dimension */ + /* compute all extreme and inflection points */ + /* in a glyph for a given dimension */ static void psh_glyph_compute_extrema( PSH_Glyph glyph ) { FT_UInt n; - /* first of all, compute all local extrema */ for ( n = 0; n < glyph->num_contours; n++ ) { - PSH_Point first = glyph->contours[n].start; - PSH_Point point, before, after; + PSH_Point first, point, before, after; - if ( glyph->contours[n].count == 0 ) + /* we need at least 3 points to create an extremum */ + if ( glyph->contours[n].count < 3 ) continue; - point = first; - before = point; + first = glyph->contours[n].start; + point = first->prev; + after = first; do { - before = before->prev; - if ( before == first ) - goto Skip; - - } while ( before->org_u == point->org_u ); - - first = point = before->next; - - for (;;) - { - after = point; - do - { - after = after->next; - if ( after == first ) - goto Next; - - } while ( after->org_u == point->org_u ); - - if ( before->org_u < point->org_u ) - { - if ( after->org_u < point->org_u ) - { - /* local maximum */ - goto Extremum; - } - } - else /* before->org_u > point->org_u */ - { - if ( after->org_u > point->org_u ) - { - /* local minimum */ - Extremum: - do - { - psh_point_set_extremum( point ); - point = point->next; - - } while ( point != after ); - } - } - - before = after->prev; + before = point; point = after; + after = point->next; - } /* for */ - - Next: - ; - } - - /* for each extremum, determine its direction along the */ - /* orthogonal axis */ - for ( n = 0; n < glyph->num_points; n++ ) - { - PSH_Point point, before, after; - - - point = &glyph->points[n]; - before = point; - after = point; - - if ( psh_point_is_extremum( point ) ) - { - do - { - before = before->prev; - if ( before == point ) - goto Skip; - - } while ( before->org_v == point->org_v ); + if ( ( before->org_u < point->org_u && point->org_u < after->org_u ) || + ( before->org_u > point->org_u && point->org_u > after->org_u ) ) + continue; - do - { - after = after->next; - if ( after == point ) - goto Skip; + /* otherwise this is either extremum or inflection point */ + psh_point_set_extremum( point ); - } while ( after->org_v == point->org_v ); - } - - if ( before->org_v < point->org_v && - after->org_v > point->org_v ) - { - psh_point_set_positive( point ); - } - else if ( before->org_v > point->org_v && - after->org_v < point->org_v ) - { - psh_point_set_negative( point ); - } + /* also note its direction */ + if ( before->org_v < after->org_v ) + psh_point_set_positive( point ); + else if ( before->org_v > after->org_v ) + psh_point_set_negative( point ); - Skip: - ; + } while ( after != first ); } } @@ -1836,8 +1641,7 @@ point->dir_in != point->dir_out ) continue; - if ( !psh_point_is_extremum( point ) && - !psh_point_is_inflex( point ) ) + if ( !psh_point_is_extremum( point ) ) continue; point->flags &= ~PSH_POINT_SMOOTH; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshalgo.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (specification). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * PostScript hinter global hinting management (body). * Inspired by the new auto-hinter module. * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used @@ -376,36 +376,24 @@ /* not. We simply need to compare the vertical scale */ /* parameter to the raw bluescale value. Here is why: */ /* */ - /* We need to suppress overshoots for all pointsizes. */ - /* At 300dpi that satisfies: */ + /* The specs explain how the bluescale is calculated */ + /* from the desired maximum rounded pointsize at 300 dpi */ + /* and assuming upem of 1000. */ /* */ - /* pointsize < 240*bluescale + 0.49 */ + /* bluescale = ( pointsize - 0.49 ) / 240 */ /* */ - /* This corresponds to: */ + /* For unrounded pointsize in general terms */ /* */ - /* pixelsize < 1000*bluescale + 49/24 */ + /* bluescale = ( pointsize * dpi / 72 ) / upem */ /* */ - /* scale*EM_Size < 1000*bluescale + 49/24 */ + /* which is */ /* */ - /* However, for normal Type 1 fonts, EM_Size is 1000! */ - /* We thus only check: */ + /* bluescale = pixelsize / upem */ /* */ - /* scale < bluescale + 49/24000 */ + /* Therefore, the bluescale value can be used directly */ + /* as a scale limit, now that it is in comparable units */ /* */ - /* which we shorten to */ - /* */ - /* "scale < bluescale" */ - /* */ - /* Note that `blue_scale' is stored 1000 times its real */ - /* value, and that `scale' converts from font units to */ - /* fractional pixels. */ - /* */ - - /* 1000 / 64 = 125 / 8 */ - if ( scale >= 0x20C49BAL ) - blues->no_overshoots = FT_BOOL( scale < blues->blue_scale * 8 / 125 ); - else - blues->no_overshoots = FT_BOOL( scale * 125 < blues->blue_scale * 8 ); + blues->no_overshoots = FT_BOOL( scale < blues->blue_scale ); /* */ /* The blue threshold is the font units distance under */ @@ -420,8 +408,8 @@ FT_Int threshold = blues->blue_shift; - while ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 ) - threshold--; + if ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 ) + threshold = 32 * 0x10000L / scale; blues->blue_threshold = threshold; } @@ -708,7 +696,6 @@ /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */ { - FT_Fixed max_scale; FT_Short max_height = 1; @@ -725,11 +712,12 @@ priv->family_other_blues, max_height ); - /* BlueScale is scaled 1000 times */ - max_scale = FT_DivFix( 1000, max_height ); - globals->blues.blue_scale = priv->blue_scale < max_scale - ? priv->blue_scale - : max_scale; + /* restrict BlueScale value that is amplified 1000-fold and */ + /* rescale it to be comparable to the metrics scale */ + if ( FT_MulFix( max_height, priv->blue_scale ) < 1000 ) + globals->blues.blue_scale = priv->blue_scale * 8 / 125; + else + globals->blues.blue_scale = 64 * 0x10000L / max_height; } globals->blues.blue_shift = priv->blue_shift; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript hinter global hinting management. * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType PostScript hinter module implementation (body). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshmod.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript hinter module interface (specification). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshnterr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshnterr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshnterr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshnterr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PS Hinter error codes (specification only). * - * Copyright (C) 2003-2024 by + * Copyright (C) 2003-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType PostScript hints recorder (body). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -467,7 +467,7 @@ table->num_masks--; } else - FT_TRACE0(( "ps_mask_table_merge: ignoring invalid indices (%d,%d)\n", + FT_TRACE0(( "ps_mask_table_merge: ignoring invalid indices (%u,%u)\n", index1, index2 )); Exit: @@ -817,7 +817,7 @@ /* limit "dimension" to 0..1 */ if ( dimension > 1 ) { - FT_TRACE0(( "ps_hints_stem: invalid dimension (%d) used\n", + FT_TRACE0(( "ps_hints_stem: invalid dimension (%u) used\n", dimension )); dimension = ( dimension != 0 ); } @@ -870,7 +870,7 @@ /* limit "dimension" to 0..1 */ if ( dimension > 1 ) { - FT_TRACE0(( "ps_hints_t1stem3: invalid dimension (%d) used\n", + FT_TRACE0(( "ps_hints_t1stem3: invalid dimension (%u) used\n", dimension )); dimension = ( dimension != 0 ); } @@ -976,7 +976,7 @@ if ( bit_count != count1 + count2 ) { FT_TRACE0(( "ps_hints_t2mask:" - " called with invalid bitcount %d (instead of %d)\n", + " called with invalid bitcount %u (instead of %u)\n", bit_count, count1 + count2 )); /* simply ignore the operator */ @@ -1022,7 +1022,7 @@ if ( bit_count != count1 + count2 ) { FT_TRACE0(( "ps_hints_t2counter:" - " called with invalid bitcount %d (instead of %d)\n", + " called with invalid bitcount %u (instead of %u)\n", bit_count, count1 + count2 )); /* simply ignore the operator */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/pshinter/pshrec.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Postscript (Type1/Type2) hints recorder (specification). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * psnames module implementation (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/psmodule.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level psnames module interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/psnamerr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/psnamerr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/psnamerr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/psnamerr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PS names module error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/pstables.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/pstables.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/psnames/pstables.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/psnames/pstables.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PostScript glyph names. * - * Copyright (C) 2005-2024 by + * Copyright (C) 2005-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftmisc.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftmisc.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftmisc.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftmisc.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Miscellaneous macros for stand-alone rasterizer (specification * only). * - * Copyright (C) 2005-2024 by + * Copyright (C) 2005-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftraster.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftraster.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftraster.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftraster.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -251,7 +251,11 @@ /* On the other hand, SMulDiv means `Slow MulDiv', and is used typically */ /* for clipping computations. It simply uses the FT_MulDiv() function */ /* defined in `ftcalc.h'. */ -#define SMulDiv_No_Round FT_MulDiv_No_Round +#ifdef FT_INT64 +#define SMulDiv( a, b, c ) (Long)( (FT_Int64)(a) * (b) / (c) ) +#else +#define SMulDiv FT_MulDiv_No_Round +#endif /* The rasterizer is a very general purpose component; please leave */ /* the following redefinitions there (you never know your target */ @@ -653,7 +657,7 @@ ras.cProfile->height = 0; } - ras.cProfile->flags = ras.dropOutControl; + ras.cProfile->flags = ras.dropOutControl; switch ( aState ) { @@ -967,14 +971,14 @@ goto Fin; } - Ix = SMulDiv_No_Round( e - y1, Dx, Dy ); + Ix = SMulDiv( e - y1, Dx, Dy ); x1 += Ix; *top++ = x1; if ( --size ) { Ax = Dx * ( e - y1 ) - Dy * Ix; /* remainder */ - Ix = FMulDiv( ras.precision, Dx, Dy ); + Ix = SMulDiv( ras.precision, Dx, Dy ); Rx = Dx * ras.precision - Dy * Ix; /* remainder */ Dx = 1; @@ -1090,8 +1094,8 @@ PLong top; - y1 = arc[degree].y; - y2 = arc[0].y; + y1 = arc[degree].y; + y2 = arc[0].y; if ( y2 < miny || y1 > maxy ) return SUCCESS; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftraster.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftraster.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftraster.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftraster.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/ftrend1.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/rasterrs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/rasterrs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/raster/rasterrs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/raster/rasterrs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * monochrome renderer error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * @@ -420,10 +420,7 @@ if ( populate_map_and_metrics ) { /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */ - FT_ULong size = map->rows * (FT_ULong)map->pitch; - - - error = ft_glyphslot_alloc_bitmap( slot, size ); + error = ft_glyphslot_alloc_bitmap( slot ); if ( error ) goto DestroyExit; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/pngshim.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2024 by + * Copyright (C) 2013-2025 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -895,7 +895,7 @@ FT_TRACE0(( "sfnt_get_var_ps_name:" " Shortening variation PS name prefix\n" )); FT_TRACE0(( " " - " to %d characters\n", len )); + " to %u characters\n", len )); } face->var_postscript_prefix = result; @@ -1142,12 +1142,7 @@ FT_Error error; - /* XXX: I don't know whether this is correct, since - * tt_face_find_bdf_prop only returns something correct if we have - * previously selected a size that is listed in the BDF table. - * Should we change the BDF table format to include single offsets - * for `CHARSET_REGISTRY' and `CHARSET_ENCODING'? - */ + /* We expect that a bitmap strike has been selected. */ error = tt_face_find_bdf_prop( face, "CHARSET_REGISTRY", ®istry ); if ( !error ) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sferrors.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sferrors.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sferrors.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sferrors.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * SFNT error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * SFNT object management (base). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -579,6 +579,9 @@ if ( face_instance_index < 0 && face_index > 0 ) face_index--; + /* Note that `face_index` is also used to enumerate elements */ + /* of containers like a Mac Resource; this means we must */ + /* check whether we actually have a TTC. */ if ( face_index >= face->ttc_header.count ) { if ( face_instance_index >= 0 ) @@ -1127,9 +1130,9 @@ flags |= FT_FACE_FLAG_VERTICAL; /* kerning available ? */ - if ( TT_FACE_HAS_KERNING( face ) + if ( face->kern_avail_bits #ifdef TT_CONFIG_OPTION_GPOS_KERNING - || face->gpos_kerning_available + || face->num_gpos_lookups_kerning #endif ) flags |= FT_FACE_FLAG_KERNING; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * SFNT object management (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * WOFF format management (base). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * WOFFF format management (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * WOFF2 format management (base). * - * Copyright (C) 2019-2024 by + * Copyright (C) 2019-2025 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -902,7 +902,7 @@ substreams[i].offset = pos + offset; substreams[i].size = substream_size; - FT_TRACE5(( " Substream %d: offset = %lu; size = %lu;\n", + FT_TRACE5(( " Substream %u: offset = %lu; size = %lu;\n", i, substreams[i].offset, substreams[i].size )); offset += substream_size; } @@ -1043,7 +1043,6 @@ FT_ULong total_n_points = 0; FT_UShort n_points_contour; FT_UInt j; - FT_ULong flag_size; FT_ULong triplet_size; FT_ULong triplet_bytes_used; FT_Bool have_overlap = FALSE; @@ -1088,8 +1087,8 @@ } substreams[N_POINTS_STREAM].offset = FT_STREAM_POS(); - flag_size = total_n_points; - if ( flag_size > substreams[FLAG_STREAM].size ) + points_size += total_n_points; + if ( points_size > substreams[FLAG_STREAM].size ) goto Fail; flags_buf = stream->base + substreams[FLAG_STREAM].offset; @@ -1106,8 +1105,7 @@ triplet_bytes_used = 0; /* Create array to store point information. */ - points_size = total_n_points; - if ( FT_QNEW_ARRAY( points, points_size ) ) + if ( FT_QNEW_ARRAY( points, total_n_points ) ) goto Fail; if ( triplet_decode( flags_buf, @@ -1118,7 +1116,7 @@ &triplet_bytes_used ) ) goto Fail; - substreams[FLAG_STREAM].offset += flag_size; + substreams[FLAG_STREAM].offset += total_n_points; substreams[GLYPH_STREAM].offset += triplet_bytes_used; if ( FT_STREAM_SEEK( substreams[GLYPH_STREAM].offset ) || @@ -1592,7 +1590,7 @@ WOFF2_TableRec table = *( indices[nn] ); - FT_TRACE3(( "Seeking to %ld with table size %ld.\n", + FT_TRACE3(( "Seeking to %lu with table size %lu.\n", table.src_offset, table.src_length )); FT_TRACE3(( "Table tag: %c%c%c%c.\n", (FT_Char)( table.Tag >> 24 ), @@ -1943,7 +1941,7 @@ src_offset += table->TransformLength; table->dst_offset = 0; - FT_TRACE2(( " %c%c%c%c %08d %08d %08ld %08ld %08ld\n", + FT_TRACE2(( " %c%c%c%c %08d %08d %08lu %08lu %08lu\n", (FT_Char)( table->Tag >> 24 ), (FT_Char)( table->Tag >> 16 ), (FT_Char)( table->Tag >> 8 ), diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff2.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * WOFFF2 format management (specification). * - * Copyright (C) 2019-2024 by + * Copyright (C) 2019-2025 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (body). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -179,7 +179,7 @@ cmap_info->format = 0; - cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); + cmap_info->language = TT_PEEK_USHORT( p ); return FT_Err_Ok; } @@ -596,7 +596,7 @@ cmap_info->format = 2; - cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); + cmap_info->language = TT_PEEK_USHORT( p ); return FT_Err_Ok; } @@ -1539,7 +1539,7 @@ cmap_info->format = 4; - cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); + cmap_info->language = TT_PEEK_USHORT( p ); return FT_Err_Ok; } @@ -1712,7 +1712,7 @@ cmap_info->format = 6; - cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); + cmap_info->language = TT_PEEK_USHORT( p ); return FT_Err_Ok; } @@ -2009,7 +2009,7 @@ cmap_info->format = 8; - cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); + cmap_info->language = TT_PEEK_ULONG( p ); return FT_Err_Ok; } @@ -2184,7 +2184,7 @@ cmap_info->format = 10; - cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); + cmap_info->language = TT_PEEK_ULONG( p ); return FT_Err_Ok; } @@ -2528,7 +2528,7 @@ cmap_info->format = 12; - cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); + cmap_info->language = TT_PEEK_ULONG( p ); return FT_Err_Ok; } @@ -2844,7 +2844,7 @@ cmap_info->format = 13; - cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); + cmap_info->language = TT_PEEK_ULONG( p ); return FT_Err_Ok; } @@ -3792,7 +3792,7 @@ return FT_THROW( Invalid_Table ); /* Version 1.8.3 of the OpenType specification contains the following */ - /* (https://docs.microsoft.com/en-us/typography/opentype/spec/cmap): */ + /* (https://learn.microsoft.com/typography/opentype/spec/cmap): */ /* */ /* The 'cmap' table version number remains at 0x0000 for fonts that */ /* make use of the newer subtable formats. */ @@ -3803,7 +3803,7 @@ p += 2; num_cmaps = TT_NEXT_USHORT( p ); - FT_TRACE4(( "tt_face_build_cmaps: %d cmaps\n", num_cmaps )); + FT_TRACE4(( "tt_face_build_cmaps: %u cmaps\n", num_cmaps )); limit = table + face->cmap_size; for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2024 by + * Copyright (C) 2002-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmapc.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmapc.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmapc.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmapc.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TT CMAP classes definitions (specification only). * - * Copyright (C) 2009-2024 by + * Copyright (C) 2009-2025 by * Oran Agra and Mickey Gabel. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (body). * - * Copyright (C) 2018-2024 by + * Copyright (C) 2018-2025 by * David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. @@ -51,7 +51,7 @@ #define COLOR_STOP_SIZE 6U #define VAR_IDX_BASE_SIZE 4U #define LAYER_SIZE 4U -/* https://docs.microsoft.com/en-us/typography/opentype/spec/colr#colr-header */ +/* https://learn.microsoft.com/typography/opentype/spec/colr#colr-header */ /* 3 * uint16 + 2 * Offset32 */ #define COLRV0_HEADER_SIZE 14U /* COLRV0_HEADER_SIZE + 5 * Offset32 */ @@ -1749,7 +1749,6 @@ FT_UInt x, y; FT_Byte b, g, r, alpha; - FT_ULong size; FT_Byte* src; FT_Byte* dst; @@ -1767,13 +1766,9 @@ dstSlot->bitmap.pitch = (int)dstSlot->bitmap.width * 4; dstSlot->bitmap.num_grays = 256; - size = dstSlot->bitmap.rows * (unsigned int)dstSlot->bitmap.pitch; - - error = ft_glyphslot_alloc_bitmap( dstSlot, size ); + error = ft_glyphslot_alloc_bitmap( dstSlot ); if ( error ) return error; - - FT_MEM_ZERO( dstSlot->bitmap.buffer, size ); } else { @@ -1805,8 +1800,7 @@ FT_Byte* q; - size = rows * pitch; - if ( FT_ALLOC( buf, size ) ) + if ( FT_ALLOC_MULT( buf, rows, pitch ) ) return error; p = dstSlot->bitmap.buffer; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcolr.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (specification). * - * Copyright (C) 2018-2024 by + * Copyright (C) 2018-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (body). * - * Copyright (C) 2018-2024 by + * Copyright (C) 2018-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttcpal.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (specification). * - * Copyright (C) 2018-2024 by + * Copyright (C) 2018-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang <shaozhang@fb.com>. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.c 2026-04-17 19:08:13.000000000 +0000 @@ -2,10 +2,9 @@ * * ttkern.c * - * Load the basic TrueType kerning table. This doesn't handle - * kerning data within the GPOS table at the moment. + * Routines to parse and access the 'kern' table for kerning (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttkern.h 2026-04-17 19:08:13.000000000 +0000 @@ -2,10 +2,10 @@ * * ttkern.h * - * Load the basic TrueType kerning table. This doesn't handle - * kerning data within the GPOS table at the moment. + * Routines to parse and access the 'kern' table for kerning + * (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -40,8 +40,6 @@ FT_UInt left_glyph, FT_UInt right_glyph ); -#define TT_FACE_HAS_KERNING( face ) ( (face)->kern_avail_bits != 0 ) - FT_END_HEADER diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.c 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -535,7 +535,8 @@ * The tag of table to load. Use the value 0 if you want * to access the whole font file, else set this parameter * to a valid TrueType table tag that you can forge with - * the MAKE_TT_TAG macro. + * the MAKE_TT_TAG macro. Use value 1 to access the table + * directory. * * offset :: * The starting offset in the table (or the file if @@ -577,7 +578,29 @@ FT_ULong size; - if ( tag != 0 ) + if ( tag == 0 ) + { + /* The whole font file. */ + size = face->root.stream->size; + } + else if ( tag == 1 ) + { + /* The currently selected font's table directory. */ + /* */ + /* Note that `face_index` is also used to enumerate elements */ + /* of containers like a Mac Resource; this means we must */ + /* check whether we actually have a TTC (with multiple table */ + /* directories). */ + FT_Long idx = face->root.face_index & 0xFFFF; + + + if ( idx >= face->ttc_header.count ) + idx = 0; + + offset += face->ttc_header.offsets[idx]; + size = 4 + 8 + 16 * face->num_tables; + } + else { /* look for tag in font directory */ table = tt_face_lookup_table( face, tag ); @@ -590,9 +613,6 @@ offset += table->Offset; size = table->Length; } - else - /* tag == 0 -- the user wants to access the font file directly */ - size = face->root.stream->size; if ( length && *length == 0 ) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttload.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (body). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -306,7 +306,7 @@ } #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( var && face->blend ) + if ( var && FT_IS_VARIATION( &face->root ) ) { FT_Face f = FT_FACE( face ); FT_Int a = (FT_Int)*aadvance; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (specification). * - * Copyright (C) 2006-2024 by + * Copyright (C) 2006-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.h 2026-04-17 19:08:13.000000000 +0000 @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (body). * - * Copyright (C) 2005-2024 by + * Copyright (C) 2005-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Copyright 2013 by Google, Inc. @@ -342,7 +342,7 @@ FT_TRACE2(( "tt_face_load_strike_metrics:" " sanitizing invalid ascender and descender\n" )); FT_TRACE2(( " " - " values for strike %ld (%dppem, %dppem)\n", + " values for strike %lu (%dppem, %dppem)\n", strike_index, metrics->x_ppem, metrics->y_ppem )); @@ -547,7 +547,6 @@ FT_Error error = FT_Err_Ok; FT_UInt width, height; FT_Bitmap* map = decoder->bitmap; - FT_ULong size; if ( !decoder->metrics_loaded ) @@ -599,17 +598,11 @@ goto Exit; } - size = map->rows * (FT_ULong)map->pitch; - - /* check that there is no empty image */ - if ( size == 0 ) - goto Exit; /* exit successfully! */ - if ( metrics_only ) goto Exit; /* only metrics are requested */ - error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size ); - if ( error ) + error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph ); + if ( error || !map->buffer ) goto Exit; decoder->bitmap_allocated = 1; @@ -993,7 +986,7 @@ goto Fail; } - FT_TRACE3(( "tt_sbit_decoder_load_compound: loading %d component%s\n", + FT_TRACE3(( "tt_sbit_decoder_load_compound: loading %u component%s\n", num_components, num_components == 1 ? "" : "s" )); @@ -1419,7 +1412,7 @@ image_start = image_offset + image_start; FT_TRACE3(( "tt_sbit_decoder_load_image:" - " found sbit (format %d) for glyph index %d\n", + " found sbit (format %u) for glyph index %u\n", image_format, glyph_index )); return tt_sbit_decoder_load_bitmap( decoder, @@ -1438,13 +1431,13 @@ if ( recurse_count ) { FT_TRACE4(( "tt_sbit_decoder_load_image:" - " missing subglyph sbit with glyph index %d\n", + " missing subglyph sbit with glyph index %u\n", glyph_index )); return FT_THROW( Invalid_Composite ); } FT_TRACE4(( "tt_sbit_decoder_load_image:" - " no sbit found for glyph index %d\n", glyph_index )); + " no sbit found for glyph index %u\n", glyph_index )); return FT_THROW( Missing_Bitmap ); } @@ -1462,12 +1455,13 @@ FT_Int originOffsetX, originOffsetY; FT_Tag graphicType; FT_Int recurse_depth = 0; + FT_Bool flipped = FALSE; FT_Error error; FT_Byte* p; - FT_UNUSED( map ); #ifndef FT_CONFIG_OPTION_USE_PNG + FT_UNUSED( map ); FT_UNUSED( metrics_only ); #endif @@ -1517,12 +1511,16 @@ switch ( graphicType ) { + case FT_MAKE_TAG( 'f', 'l', 'i', 'p' ): + flipped = !flipped; + FALL_THROUGH; + case FT_MAKE_TAG( 'd', 'u', 'p', 'e' ): - if ( recurse_depth < 4 ) + if ( recurse_depth++ < 4 ) { glyph_index = FT_GET_USHORT(); FT_FRAME_EXIT(); - recurse_depth++; + goto retry; } error = FT_THROW( Invalid_File_Format ); @@ -1540,6 +1538,38 @@ glyph_end - glyph_start - 8, TRUE, metrics_only ); + if ( flipped && !metrics_only && !error ) + { + FT_UInt32* curr_pos = (FT_UInt32*)map->buffer; + + /* `Load_SBit_Png` always returns a pixmap with 32 bits per pixel */ + /* and no extra pitch bytes. */ + FT_UInt width = map->width; + FT_UInt y; + + + for ( y = 0; y < map->rows; y++ ) + { + FT_UInt32* left = curr_pos; + FT_UInt32* right = curr_pos + width - 1; + + + while ( left < right ) + { + FT_UInt32 value; + + + value = *right; + *right = *left; + *left = value; + + left++; + right--; + } + + curr_pos += width; + } + } #else error = FT_THROW( Unimplemented_Feature ); #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (base). * - * Copyright (C) 2019-2024 by + * Copyright (C) 2019-2025 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/sfnt/woff2tags.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (specification). * - * Copyright (C) 2019-2024 by + * Copyright (C) 2019-2025 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * A new `perfect' anti-aliasing renderer (body). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -157,10 +157,6 @@ #define ft_memset memset -#define ft_setjmp setjmp -#define ft_longjmp longjmp -#define ft_jmp_buf jmp_buf - typedef ptrdiff_t FT_PtrDist; @@ -170,8 +166,8 @@ #define Smooth_Err_Invalid_Argument -3 #define Smooth_Err_Raster_Overflow -4 -#define FT_BEGIN_HEADER -#define FT_END_HEADER +#define FT_BEGIN_HEADER /* nothing */ +#define FT_END_HEADER /* nothing */ #include "ftimage.h" #include "ftgrays.h" @@ -495,6 +491,7 @@ TCoord min_ey, max_ey; TCoord count_ey; /* same as (max_ey - min_ey) */ + int error; /* pool overflow exception */ PCell cell; /* current cell */ PCell cell_free; /* call allocation next free slot */ PCell cell_null; /* last cell, used as dumpster and limit */ @@ -510,8 +507,6 @@ FT_Raster_Span_Func render_span; void* render_span_data; - ft_jmp_buf jump_buffer; - } gray_TWorker, *gray_PWorker; #if defined( _MSC_VER ) @@ -613,9 +608,14 @@ } /* insert new cell */ - cell = ras.cell_free++; - if ( cell >= ras.cell_null ) - ft_longjmp( ras.jump_buffer, 1 ); + cell = ras.cell_free; + if ( cell == ras.cell_null ) + { + ras.error = FT_THROW( Raster_Overflow ); + goto Found; + } + + ras.cell_free = cell + 1; cell->x = ex; cell->area = 0; @@ -1353,7 +1353,8 @@ ras.x = x; ras.y = y; - return 0; + + return ras.error; } @@ -1365,7 +1366,8 @@ gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) ); - return 0; + + return ras.error; } @@ -1378,7 +1380,8 @@ gray_render_conic( RAS_VAR_ control, to ); - return 0; + + return ras.error; } @@ -1392,7 +1395,8 @@ gray_render_cubic( RAS_VAR_ control1, control2, to ); - return 0; + + return ras.error; } @@ -1700,30 +1704,22 @@ gray_convert_glyph_inner( RAS_ARG_ int continued ) { - volatile int error; + int error; - if ( ft_setjmp( ras.jump_buffer ) == 0 ) - { - if ( continued ) - FT_Trace_Disable(); - error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras ); - if ( continued ) - FT_Trace_Enable(); - - FT_TRACE7(( "band [%d..%d]: %td cell%s remaining\n", - ras.min_ey, - ras.max_ey, - ras.cell_null - ras.cell_free, - ras.cell_null - ras.cell_free == 1 ? "" : "s" )); - } - else - { - error = FT_THROW( Raster_Overflow ); - - FT_TRACE7(( "band [%d..%d]: to be bisected\n", - ras.min_ey, ras.max_ey )); - } + if ( continued ) + FT_Trace_Disable(); + error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras ); + if ( continued ) + FT_Trace_Enable(); + + FT_TRACE7(( error == Smooth_Err_Raster_Overflow + ? "band [%d..%d]: to be bisected\n" + : "band [%d..%d]: %td cell%s remaining\n", + ras.min_ey, + ras.max_ey, + ras.cell_null - ras.cell_free, + ras.cell_null - ras.cell_free == 1 ? "" : "s" )); return error; } @@ -1808,7 +1804,7 @@ FT_FILL_RULE( coverage, cover, fill ); span[n].coverage = (unsigned char)coverage; - span[n].x = (short)x; + span[n].x = (unsigned short)x; span[n].len = (unsigned short)( cell->x - x ); if ( ++n == FT_MAX_GRAY_SPANS ) @@ -1827,7 +1823,7 @@ FT_FILL_RULE( coverage, area, fill ); span[n].coverage = (unsigned char)coverage; - span[n].x = (short)cell->x; + span[n].x = (unsigned short)cell->x; span[n].len = 1; if ( ++n == FT_MAX_GRAY_SPANS ) @@ -1873,6 +1869,7 @@ TCoord* band; int continued = 0; + int error = Smooth_Err_Ok; /* Initialize the null cell at the end of the poll. */ @@ -1907,7 +1904,6 @@ do { TCoord i; - int error; ras.min_ex = band[1]; @@ -1922,6 +1918,7 @@ ras.cell_free = buffer + n; ras.cell = ras.cell_null; + ras.error = Smooth_Err_Ok; error = gray_convert_glyph_inner( RAS_VAR_ continued ); continued = 1; @@ -1936,7 +1933,7 @@ continue; } else if ( error != Smooth_Err_Raster_Overflow ) - return error; + goto Exit; /* render pool overflow; we will reduce the render band by half */ i = ( band[0] - band[1] ) >> 1; @@ -1945,7 +1942,8 @@ if ( i == 0 ) { FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" )); - return FT_THROW( Raster_Overflow ); + error = FT_THROW( Raster_Overflow ); + goto Exit; } band++; @@ -1954,7 +1952,11 @@ } while ( band >= bands ); } - return Smooth_Err_Ok; + Exit: + ras.cell = ras.cell_free = ras.cell_null = NULL; + ras.ycells = NULL; + + return error; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * FreeType smooth renderer declaration * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -19,11 +19,6 @@ #ifndef FTGRAYS_H_ #define FTGRAYS_H_ -#ifdef __cplusplus - extern "C" { -#endif - - #ifdef STANDALONE_ #include "ftimage.h" #else @@ -31,6 +26,7 @@ #include <freetype/ftimage.h> #endif +FT_BEGIN_HEADER /************************************************************************** * @@ -46,10 +42,7 @@ FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_grays_raster; - -#ifdef __cplusplus - } -#endif +FT_END_HEADER #endif /* FTGRAYS_H_ */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftsmerrs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftsmerrs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftsmerrs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftsmerrs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * smooth renderer error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (body). * - * Copyright (C) 2000-2024 by + * Copyright (C) 2000-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -80,6 +80,7 @@ { unsigned char* origin; /* pixmap origin at the bottom-left */ int pitch; /* pitch to go down one row */ + unsigned char wght[5]; /* filtering weights */ } TOrigin; @@ -274,6 +275,32 @@ } + /* This function applies a horizontal filter in direct rendering mode */ + static void + ft_smooth_lcd_spans( int y, + int count, + const FT_Span* spans, + void* target_ ) /* TOrigin* */ + { + TOrigin* target = (TOrigin*)target_; + + unsigned char* dst_line = target->origin - y * target->pitch - 2; + unsigned char* dst; + unsigned short w; + + + for ( ; count--; spans++ ) + for ( dst = dst_line + spans->x, w = spans->len; w--; dst++ ) + { + dst[0] += ( spans->coverage * target->wght[0] + 85 ) >> 8; + dst[1] += ( spans->coverage * target->wght[1] + 85 ) >> 8; + dst[2] += ( spans->coverage * target->wght[2] + 85 ) >> 8; + dst[3] += ( spans->coverage * target->wght[3] + 85 ) >> 8; + dst[4] += ( spans->coverage * target->wght[4] + 85 ) >> 8; + } + } + + static FT_Error ft_smooth_raster_lcd( FT_Renderer render, FT_Outline* outline, @@ -285,11 +312,47 @@ FT_Vector* vec; FT_Raster_Params params; + TOrigin target; - params.target = bitmap; - params.source = outline; - params.flags = FT_RASTER_FLAG_AA; + if ( render->root.library->lcd_weights[2] ) + { + /* Reject outlines that are too wide for 16-bit FT_Span. */ + /* Other limits are applied upstream with the same error code. */ + if ( bitmap->width > 0x7FFF ) + return FT_THROW( Raster_Overflow ); + + /* Set up direct rendering for instant filtering. */ + params.source = outline; + params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT; + params.gray_spans = ft_smooth_lcd_spans; + params.user = ⌖ + + params.clip_box.xMin = 0; + params.clip_box.yMin = 0; + params.clip_box.xMax = bitmap->width; + params.clip_box.yMax = bitmap->rows; + + if ( bitmap->pitch < 0 ) + target.origin = bitmap->buffer; + else + target.origin = bitmap->buffer + + ( bitmap->rows - 1 ) * (unsigned int)bitmap->pitch; + + target.pitch = bitmap->pitch; + + target.wght[0] = render->root.library->lcd_weights[0]; + target.wght[1] = render->root.library->lcd_weights[1]; + target.wght[2] = render->root.library->lcd_weights[2]; + target.wght[3] = render->root.library->lcd_weights[3]; + target.wght[4] = render->root.library->lcd_weights[4]; + } + else + { + params.target = bitmap; + params.source = outline; + params.flags = FT_RASTER_FLAG_AA; + } /* implode outline */ for ( vec = points; vec < points_end; vec++ ) @@ -306,6 +369,32 @@ } + /* This function applies a vertical filter in direct rendering mode */ + static void + ft_smooth_lcdv_spans( int y, + int count, + const FT_Span* spans, + void* target_ ) /* TOrigin* */ + { + TOrigin* target = (TOrigin*)target_; + + int pitch = target->pitch; + unsigned char* dst_line = target->origin - ( y + 2 ) * pitch; + unsigned char* dst; + unsigned short w; + + + for ( ; count--; spans++ ) + for ( dst = dst_line + spans->x, w = spans->len; w--; dst++ ) + { + dst[ 0] += ( spans->coverage * target->wght[0] + 85 ) >> 8; + dst[ pitch] += ( spans->coverage * target->wght[1] + 85 ) >> 8; + dst[2 * pitch] += ( spans->coverage * target->wght[2] + 85 ) >> 8; + dst[3 * pitch] += ( spans->coverage * target->wght[3] + 85 ) >> 8; + dst[4 * pitch] += ( spans->coverage * target->wght[4] + 85 ) >> 8; + } + } + static FT_Error ft_smooth_raster_lcdv( FT_Renderer render, FT_Outline* outline, @@ -317,11 +406,42 @@ FT_Vector* vec; FT_Raster_Params params; + TOrigin target; - params.target = bitmap; - params.source = outline; - params.flags = FT_RASTER_FLAG_AA; + if ( render->root.library->lcd_weights[2] ) + { + /* Set up direct rendering for instant filtering. */ + params.source = outline; + params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT; + params.gray_spans = ft_smooth_lcdv_spans; + params.user = ⌖ + + params.clip_box.xMin = 0; + params.clip_box.yMin = 0; + params.clip_box.xMax = bitmap->width; + params.clip_box.yMax = bitmap->rows; + + if ( bitmap->pitch < 0 ) + target.origin = bitmap->buffer; + else + target.origin = bitmap->buffer + + ( bitmap->rows - 1 ) * (unsigned int)bitmap->pitch; + + target.pitch = bitmap->pitch; + + target.wght[0] = render->root.library->lcd_weights[0]; + target.wght[1] = render->root.library->lcd_weights[1]; + target.wght[2] = render->root.library->lcd_weights[2]; + target.wght[3] = render->root.library->lcd_weights[3]; + target.wght[4] = render->root.library->lcd_weights[4]; + } + else + { + params.target = bitmap; + params.source = outline; + params.flags = FT_RASTER_FLAG_AA; + } /* implode outline */ for ( vec = points; vec < points_end; vec++ ) @@ -494,12 +614,6 @@ else y_shift += 64 * (FT_Int)bitmap->rows; - if ( origin ) - { - x_shift += origin->x; - y_shift += origin->y; - } - /* translate outline to render it into the bitmap */ if ( x_shift || y_shift ) FT_Outline_Translate( outline, x_shift, y_shift ); @@ -527,33 +641,6 @@ error = ft_smooth_raster_lcd ( render, outline, bitmap ); else if ( mode == FT_RENDER_MODE_LCD_V ) error = ft_smooth_raster_lcdv( render, outline, bitmap ); - -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - /* finally apply filtering */ - { - FT_Byte* lcd_weights; - FT_Bitmap_LcdFilterFunc lcd_filter_func; - - - /* Per-face LCD filtering takes priority if set up. */ - if ( slot->face && slot->face->internal->lcd_filter_func ) - { - lcd_weights = slot->face->internal->lcd_weights; - lcd_filter_func = slot->face->internal->lcd_filter_func; - } - else - { - lcd_weights = slot->library->lcd_weights; - lcd_filter_func = slot->library->lcd_filter_func; - } - - if ( lcd_filter_func ) - lcd_filter_func( bitmap, lcd_weights ); - } - -#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - } Exit: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType font driver implementation (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -220,12 +220,12 @@ { /* Use 'kern' table if available since that can be faster; otherwise */ /* use GPOS kerning pairs if available. */ - if ( ttface->kern_avail_bits != 0 ) + if ( ttface->kern_avail_bits ) kerning->x = sfnt->get_kerning( ttface, left_glyph, right_glyph ); #ifdef TT_CONFIG_OPTION_GPOS_KERNING - else if ( ttface->gpos_kerning_available ) + else if ( ttface->num_gpos_lookups_kerning ) kerning->x = sfnt->get_gpos_kerning( ttface, left_glyph, right_glyph ); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttdriver.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level TrueType driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/tterrors.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/tterrors.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/tterrors.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/tterrors.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -660,7 +660,7 @@ } while ( subglyph->flags & MORE_COMPONENTS ); gloader->current.num_subglyphs = num_subglyphs; - FT_TRACE5(( " %d component%s\n", + FT_TRACE5(( " %u component%s\n", num_subglyphs, num_subglyphs > 1 ? "s" : "" )); @@ -674,7 +674,7 @@ for ( i = 0; i < num_subglyphs; i++ ) { if ( num_subglyphs > 1 ) - FT_TRACE7(( " subglyph %d:\n", i )); + FT_TRACE7(( " subglyph %u:\n", i )); FT_TRACE7(( " glyph index: %d\n", subglyph->index )); @@ -777,15 +777,11 @@ TT_Hint_Glyph( TT_Loader loader, FT_Bool is_composite ) { -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - TT_Face face = loader->face; - TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); -#endif - TT_GlyphZone zone = &loader->zone; #ifdef TT_USE_BYTECODE_INTERPRETER TT_ExecContext exec = loader->exec; + TT_Size size = loader->size; FT_Long n_ins = exec->glyphSize; #else FT_UNUSED( is_composite ); @@ -797,9 +793,6 @@ if ( n_ins > 0 ) FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points ); - /* Reset graphics state. */ - exec->GS = loader->size->GS; - /* XXX: UNDOCUMENTED! Hinting instructions of a composite glyph */ /* completely refer to the (already) hinted subglyphs. */ if ( is_composite ) @@ -811,8 +804,8 @@ } else { - exec->metrics.x_scale = loader->size->metrics->x_scale; - exec->metrics.y_scale = loader->size->metrics->y_scale; + exec->metrics.x_scale = size->metrics->x_scale; + exec->metrics.y_scale = size->metrics->y_scale; } #endif @@ -838,7 +831,7 @@ exec->is_composite = is_composite; exec->pts = *zone; - error = TT_Run_Context( exec ); + error = TT_Run_Context( exec, size ); if ( error && exec->pedantic_hinting ) return error; @@ -854,8 +847,7 @@ /* to change bearings or advance widths. */ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && - exec->backward_compatibility ) + if ( exec->backward_compatibility ) return FT_Err_Ok; #endif @@ -1152,30 +1144,15 @@ x = FT_MulFix( x, x_scale ); y = FT_MulFix( y, y_scale ); - if ( subglyph->flags & ROUND_XY_TO_GRID ) + if ( subglyph->flags & ROUND_XY_TO_GRID && + IS_HINTED( loader->load_flags ) ) { - TT_Face face = loader->face; - TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); - - - if ( IS_HINTED( loader->load_flags ) ) - { - /* - * We round the horizontal offset only if there is hinting along - * the x axis; this corresponds to integer advance width values. - * - * Theoretically, a glyph's bytecode can toggle ClearType's - * `backward compatibility' mode, which would allow modification - * of the advance width. In reality, however, applications - * neither allow nor expect modified advance widths if subpixel - * rendering is active. - * - */ - if ( driver->interpreter_version == TT_INTERPRETER_VERSION_35 ) - x = FT_PIX_ROUND( x ); +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + if ( !loader->exec->backward_compatibility ) +#endif + x = FT_PIX_ROUND( x ); - y = FT_PIX_ROUND( y ); - } + y = FT_PIX_ROUND( y ); } } } @@ -1204,8 +1181,6 @@ { FT_Error error; FT_Outline* outline = &loader->gloader->base.outline; - FT_Stream stream = loader->stream; - FT_UShort n_ins; FT_UInt i; @@ -1224,8 +1199,10 @@ #ifdef TT_USE_BYTECODE_INTERPRETER { - TT_ExecContext exec = loader->exec; + TT_ExecContext exec = loader->exec; FT_Memory memory = exec->memory; + FT_Stream stream = loader->stream; + FT_UShort n_ins; if ( exec->glyphSize ) @@ -1378,8 +1355,9 @@ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && loader->exec && - loader->exec->subpixel_hinting_lean && - loader->exec->grayscale_cleartype ) + loader->exec->mode != FT_RENDER_MODE_MONO && + loader->exec->mode != FT_RENDER_MODE_LCD && + loader->exec->mode != FT_RENDER_MODE_LCD_V ) { loader->pp3.x = loader->advance / 2; loader->pp4.x = loader->advance / 2; @@ -1444,13 +1422,13 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( recurse_count ) - FT_TRACE5(( " nesting level: %d\n", recurse_count )); + FT_TRACE5(( " nesting level: %u\n", recurse_count )); #endif /* some fonts have an incorrect value of `maxComponentDepth' */ if ( recurse_count > face->max_profile.maxComponentDepth ) { - FT_TRACE1(( "load_truetype_glyph: maxComponentDepth set to %d\n", + FT_TRACE1(( "load_truetype_glyph: maxComponentDepth set to %u\n", recurse_count )); face->max_profile.maxComponentDepth = (FT_UShort)recurse_count; } @@ -1566,18 +1544,18 @@ if ( header_only ) goto Exit; - if ( loader->byte_len == 0 || loader->n_contours == 0 ) - { #ifdef FT_CONFIG_OPTION_INCREMENTAL - tt_get_metrics_incremental( loader, glyph_index ); + tt_get_metrics_incremental( loader, glyph_index ); #endif - tt_loader_set_pp( loader ); + tt_loader_set_pp( loader ); + /* shortcut for empty glyphs */ + if ( loader->byte_len == 0 || loader->n_contours == 0 ) + { #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) || - FT_IS_VARIATION( FT_FACE( face ) ) ) + if ( !IS_DEFAULT_INSTANCE( FT_FACE( face ) ) ) { /* a small outline structure with four elements for */ /* communication with `TT_Vary_Apply_Glyph_Deltas' */ @@ -1627,11 +1605,6 @@ goto Exit; } -#ifdef FT_CONFIG_OPTION_INCREMENTAL - tt_get_metrics_incremental( loader, glyph_index ); -#endif - tt_loader_set_pp( loader ); - /***********************************************************************/ /***********************************************************************/ @@ -1735,8 +1708,7 @@ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) || - FT_IS_VARIATION( FT_FACE( face ) ) ) + if ( !IS_DEFAULT_INSTANCE( FT_FACE( face ) ) ) { FT_UShort i, limit; FT_SubGlyph subglyph; @@ -1953,6 +1925,9 @@ #ifdef FT_CONFIG_OPTION_INCREMENTAL + /* restore the original stream */ + loader->stream = face->root.stream; + if ( glyph_data_loaded ) face->root.internal->incremental_interface->funcs->free_glyph_data( face->root.internal->incremental_interface->object, @@ -2112,7 +2087,6 @@ { TT_Face face = (TT_Face)glyph->face; SFNT_Service sfnt = (SFNT_Service)face->sfnt; - FT_Stream stream = face->root.stream; FT_Error error; TT_SBit_MetricsRec sbit_metrics; @@ -2121,14 +2095,11 @@ size->strike_index, glyph_index, (FT_UInt)load_flags, - stream, + face->root.stream, &glyph->bitmap, &sbit_metrics ); if ( !error ) { - glyph->outline.n_points = 0; - glyph->outline.n_contours = 0; - glyph->metrics.width = (FT_Pos)sbit_metrics.width * 64; glyph->metrics.height = (FT_Pos)sbit_metrics.height * 64; @@ -2153,6 +2124,50 @@ glyph->bitmap_top = sbit_metrics.horiBearingY; } } + /* a missing glyph in a bitmap-only font is assumed whitespace */ + /* that needs to be constructed using metrics data from `hmtx' */ + /* and, optionally, `vmtx' tables */ + else if ( FT_ERR_EQ( error, Missing_Bitmap ) && + !FT_IS_SCALABLE( glyph->face ) && + face->horz_metrics_size ) + { + FT_Fixed x_scale = size->root.metrics.x_scale; + FT_Fixed y_scale = size->root.metrics.y_scale; + + FT_Short left_bearing = 0; + FT_Short top_bearing = 0; + + FT_UShort advance_width = 0; + FT_UShort advance_height = 0; + + + TT_Get_HMetrics( face, glyph_index, + &left_bearing, + &advance_width ); + TT_Get_VMetrics( face, glyph_index, + 0, + &top_bearing, + &advance_height ); + + glyph->metrics.width = 0; + glyph->metrics.height = 0; + + glyph->metrics.horiBearingX = FT_MulFix( left_bearing, x_scale ); + glyph->metrics.horiBearingY = 0; + glyph->metrics.horiAdvance = FT_MulFix( advance_width, x_scale ); + + glyph->metrics.vertBearingX = 0; + glyph->metrics.vertBearingY = FT_MulFix( top_bearing, y_scale ); + glyph->metrics.vertAdvance = FT_MulFix( advance_height, y_scale ); + + glyph->format = FT_GLYPH_FORMAT_BITMAP; + glyph->bitmap.pixel_mode = FT_PIXEL_MODE_MONO; + + glyph->bitmap_left = 0; + glyph->bitmap_top = 0; + + error = FT_Err_Ok; + } return error; } @@ -2168,15 +2183,6 @@ FT_Bool glyf_table_only ) { TT_Face face = (TT_Face)glyph->face; - FT_Stream stream = face->root.stream; - -#ifdef TT_USE_BYTECODE_INTERPRETER - FT_Error error; - FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC ); -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( glyph->face ); -#endif -#endif FT_ZERO( loader ); @@ -2186,122 +2192,80 @@ /* load execution context */ if ( IS_HINTED( load_flags ) && !glyf_table_only ) { + FT_Error error; TT_ExecContext exec; - FT_Bool grayscale = TRUE; + FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags ); + FT_Bool grayscale = FT_BOOL( mode != FT_RENDER_MODE_MONO ); + FT_Bool reexecute = FALSE; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - FT_Bool subpixel_hinting_lean; - FT_Bool grayscale_cleartype; + TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( glyph->face ); #endif - FT_Bool reexecute = FALSE; - - if ( size->bytecode_ready < 0 || size->cvt_ready < 0 ) + if ( size->bytecode_ready > 0 ) + return size->bytecode_ready; + if ( size->bytecode_ready < 0 ) { - error = tt_size_ready_bytecode( size, pedantic ); + FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC ); + + + error = tt_size_init_bytecode( size, pedantic ); if ( error ) return error; } - else if ( size->bytecode_ready ) - return size->bytecode_ready; - else if ( size->cvt_ready ) - return size->cvt_ready; - /* query new execution context */ exec = size->context; - if ( !exec ) - return FT_THROW( Could_Not_Find_Context ); - - grayscale = FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != - FT_RENDER_MODE_MONO ); #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* reset backward compatibility; note that */ + /* the CVT program always runs without it */ + exec->backward_compatibility = 0; + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 ) { - subpixel_hinting_lean = - FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != - FT_RENDER_MODE_MONO ); - grayscale_cleartype = - FT_BOOL( subpixel_hinting_lean && - !( ( load_flags & - FT_LOAD_TARGET_LCD ) || - ( load_flags & - FT_LOAD_TARGET_LCD_V ) ) ); - exec->vertical_lcd_lean = - FT_BOOL( subpixel_hinting_lean && - ( load_flags & - FT_LOAD_TARGET_LCD_V ) ); - grayscale = FT_BOOL( grayscale && !subpixel_hinting_lean ); - } - else - { - subpixel_hinting_lean = FALSE; - grayscale_cleartype = FALSE; - exec->vertical_lcd_lean = FALSE; - } -#endif + grayscale = FALSE; - error = TT_Load_Context( exec, face, size ); - if ( error ) - return error; - - { -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 ) + /* any mode change requires a re-execution of the CVT program */ + if ( mode != exec->mode ) { - /* a change from mono to subpixel rendering (and vice versa) */ - /* requires a re-execution of the CVT program */ - if ( subpixel_hinting_lean != exec->subpixel_hinting_lean ) - { - FT_TRACE4(( "tt_loader_init: subpixel hinting change," - " re-executing `prep' table\n" )); - - exec->subpixel_hinting_lean = subpixel_hinting_lean; - reexecute = TRUE; - } - - /* a change from colored to grayscale subpixel rendering (and */ - /* vice versa) requires a re-execution of the CVT program */ - if ( grayscale_cleartype != exec->grayscale_cleartype ) - { - FT_TRACE4(( "tt_loader_init: grayscale subpixel hinting change," - " re-executing `prep' table\n" )); + FT_TRACE4(( "tt_loader_init: render mode change," + " re-executing `prep' table\n" )); - exec->grayscale_cleartype = grayscale_cleartype; - reexecute = TRUE; - } + exec->mode = mode; + reexecute = TRUE; } + } #endif - /* a change from mono to grayscale rendering (and vice versa) */ - /* requires a re-execution of the CVT program */ - if ( grayscale != exec->grayscale ) - { - FT_TRACE4(( "tt_loader_init: grayscale hinting change," - " re-executing `prep' table\n" )); + /* a change from mono to grayscale rendering (and vice versa) */ + /* requires a re-execution of the CVT program */ + if ( grayscale != exec->grayscale ) + { + FT_TRACE4(( "tt_loader_init: grayscale hinting change," + " re-executing `prep' table\n" )); - exec->grayscale = grayscale; - reexecute = TRUE; - } + exec->grayscale = grayscale; + reexecute = TRUE; } - if ( reexecute ) + if ( size->cvt_ready > 0 ) + return size->cvt_ready; + if ( size->cvt_ready < 0 || reexecute ) { - error = tt_size_run_prep( size, pedantic ); - if ( error ) - return error; - error = TT_Load_Context( exec, face, size ); + error = tt_size_run_prep( size ); if ( error ) return error; } + TT_Load_Context( exec, face, size ); + /* check whether the cvt program has disabled hinting */ - if ( exec->GS.instruct_control & 1 ) + if ( size->GS.instruct_control & 1 ) load_flags |= FT_LOAD_NO_HINTING; - /* load default graphics state -- if needed */ - if ( exec->GS.instruct_control & 2 ) - exec->GS = tt_default_graphics_state; + /* check whether GS modifications should be reverted */ + if ( size->GS.instruct_control & 2 ) + size->GS = tt_default_graphics_state; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL /* @@ -2318,28 +2282,24 @@ * */ if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && - subpixel_hinting_lean && + mode != FT_RENDER_MODE_MONO && !FT_IS_TRICKY( glyph->face ) ) - exec->backward_compatibility = !( exec->GS.instruct_control & 4 ); - else - exec->backward_compatibility = FALSE; + exec->backward_compatibility = ( size->GS.instruct_control & 4 ) ^ 4; + #endif /* TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL */ - exec->pedantic_hinting = FT_BOOL( load_flags & FT_LOAD_PEDANTIC ); loader->exec = exec; - loader->instructions = exec->glyphIns; /* Use the hdmx table if any unless FT_LOAD_COMPUTE_METRICS */ /* is set or backward compatibility mode of the v38 or v40 */ /* interpreters is active. See `ttinterp.h' for details on */ /* backward compatibility mode. */ - if ( IS_HINTED( loader->load_flags ) && - !( loader->load_flags & FT_LOAD_COMPUTE_METRICS ) && + if ( IS_HINTED( load_flags ) && + !( load_flags & FT_LOAD_COMPUTE_METRICS ) && #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 && - exec->backward_compatibility ) && + !exec->backward_compatibility && #endif - !face->postscript.isFixedPitch ) + !face->postscript.isFixedPitch ) { loader->widthp = size->widthp; } @@ -2364,7 +2324,7 @@ loader->face = face; loader->size = size; loader->glyph = (FT_GlyphSlot)glyph; - loader->stream = stream; + loader->stream = face->root.stream; loader->composites.head = NULL; loader->composites.tail = NULL; @@ -2426,84 +2386,26 @@ TT_LoaderRec loader; - FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index )); + FT_TRACE1(( "TT_Load_Glyph: glyph index %u\n", glyph_index )); #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS /* try to load embedded bitmap (if any) */ - if ( size->strike_index != 0xFFFFFFFFUL && - ( load_flags & FT_LOAD_NO_BITMAP ) == 0 && - IS_DEFAULT_INSTANCE( glyph->face ) ) + if ( size->strike_index != 0xFFFFFFFFUL && + !( load_flags & FT_LOAD_NO_BITMAP && + FT_IS_SCALABLE( glyph->face ) ) && + IS_DEFAULT_INSTANCE( glyph->face ) ) { - FT_Fixed x_scale = size->root.metrics.x_scale; - FT_Fixed y_scale = size->root.metrics.y_scale; - - error = load_sbit_image( size, glyph, glyph_index, load_flags ); - if ( FT_ERR_EQ( error, Missing_Bitmap ) ) - { - /* the bitmap strike is incomplete and misses the requested glyph; */ - /* if we have a bitmap-only font, return an empty glyph */ - if ( !FT_IS_SCALABLE( glyph->face ) ) - { - FT_Short left_bearing = 0; - FT_Short top_bearing = 0; - - FT_UShort advance_width = 0; - FT_UShort advance_height = 0; - - - /* to return an empty glyph, however, we need metrics data */ - /* from the `hmtx' (or `vmtx') table; the assumption is that */ - /* empty glyphs are missing intentionally, representing */ - /* whitespace - not having at least horizontal metrics is */ - /* thus considered an error */ - if ( !face->horz_metrics_size ) - return error; - - /* we now construct an empty bitmap glyph */ - TT_Get_HMetrics( face, glyph_index, - &left_bearing, - &advance_width ); - TT_Get_VMetrics( face, glyph_index, - 0, - &top_bearing, - &advance_height ); - - glyph->outline.n_points = 0; - glyph->outline.n_contours = 0; - - glyph->metrics.width = 0; - glyph->metrics.height = 0; - - glyph->metrics.horiBearingX = FT_MulFix( left_bearing, x_scale ); - glyph->metrics.horiBearingY = 0; - glyph->metrics.horiAdvance = FT_MulFix( advance_width, x_scale ); - - glyph->metrics.vertBearingX = 0; - glyph->metrics.vertBearingY = FT_MulFix( top_bearing, y_scale ); - glyph->metrics.vertAdvance = FT_MulFix( advance_height, y_scale ); - - glyph->format = FT_GLYPH_FORMAT_BITMAP; - glyph->bitmap.pixel_mode = FT_PIXEL_MODE_MONO; - - glyph->bitmap_left = 0; - glyph->bitmap_top = 0; - - return FT_Err_Ok; - } - } - else if ( error ) - { - /* return error if font is not scalable */ - if ( !FT_IS_SCALABLE( glyph->face ) ) - return error; - } - else + if ( !error ) { if ( FT_IS_SCALABLE( glyph->face ) || FT_HAS_SBIX( glyph->face ) ) { + FT_Fixed x_scale = size->root.metrics.x_scale; + FT_Fixed y_scale = size->root.metrics.y_scale; + + /* for the bbox we need the header only */ (void)tt_loader_init( &loader, size, glyph, load_flags, TRUE ); (void)load_truetype_glyph( &loader, glyph_index, 0, TRUE ); @@ -2550,8 +2452,10 @@ y_scale ); } - return FT_Err_Ok; + goto Exit; } + else if ( !FT_IS_SCALABLE( glyph->face ) ) + goto Exit; } if ( load_flags & FT_LOAD_SBITS_ONLY ) @@ -2563,7 +2467,7 @@ #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ - if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid ) + if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.ppem ) { error = FT_THROW( Invalid_Size_Handle ); goto Exit; @@ -2614,7 +2518,7 @@ glyph->metrics.horiAdvance = FT_MulFix( advanceX, x_scale ); glyph->metrics.vertAdvance = FT_MulFix( advanceY, y_scale ); - return error; + goto Exit; } FT_TRACE3(( "Failed to load SVG glyph\n" )); @@ -2642,10 +2546,6 @@ goto Done; } - glyph->format = FT_GLYPH_FORMAT_OUTLINE; - glyph->num_subglyphs = 0; - glyph->outline.flags = 0; - /* main loading loop */ error = load_truetype_glyph( &loader, glyph_index, 0, FALSE ); if ( !error ) @@ -2657,9 +2557,18 @@ } else { + glyph->format = FT_GLYPH_FORMAT_OUTLINE; + glyph->outline = loader.gloader->base.outline; glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS; + /* Set the `high precision' bit flag. This is _critical_ to */ + /* get correct output for monochrome TrueType glyphs at all */ + /* sizes using the bytecode interpreter. */ + if ( !( load_flags & FT_LOAD_NO_SCALE ) && + size->metrics->y_ppem < 24 ) + glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; + /* Translate array so that (0,0) is the glyph's origin. Note */ /* that this behaviour is independent on the value of bit 1 of */ /* the `flags' field in the `head' table -- at least major */ @@ -2708,14 +2617,6 @@ error = compute_glyph_metrics( &loader, glyph_index ); } - /* Set the `high precision' bit flag. */ - /* This is _critical_ to get correct output for monochrome */ - /* TrueType glyphs at all sizes using the bytecode interpreter. */ - /* */ - if ( !( load_flags & FT_LOAD_NO_SCALE ) && - size->metrics->y_ppem < 24 ) - glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; - FT_TRACE1(( " subglyphs = %u, contours = %hu, points = %hu," " flags = 0x%.3x\n", loader.gloader->base.num_subglyphs, @@ -2727,11 +2628,8 @@ tt_loader_done( &loader ); Exit: -#ifdef FT_DEBUG_LEVEL_TRACE - if ( error ) - FT_TRACE1(( " failed (error code 0x%x)\n", - error )); -#endif + FT_TRACE1(( error ? " failed (error code 0x%x)\n" : "", + error )); return error; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. * * This file is part of the FreeType project, and may only be used, @@ -489,8 +489,9 @@ FT_UShort axis_count; FT_UInt region_count; - FT_UInt i, j; - FT_Bool long_words; + FT_UInt i, j; + FT_Byte* bytes; + FT_Bool long_words; GX_Blend blend = ttface->blend; FT_ULong* dataOffsetArray = NULL; @@ -526,11 +527,15 @@ if ( FT_QNEW_ARRAY( dataOffsetArray, data_count ) ) goto Exit; + if ( FT_FRAME_ENTER( data_count * 4 ) ) + goto Exit; + + bytes = stream->cursor; + for ( i = 0; i < data_count; i++ ) - { - if ( FT_READ_ULONG( dataOffsetArray[i] ) ) - goto Exit; - } + dataOffsetArray[i] = FT_NEXT_ULONG( bytes ); + + FT_FRAME_EXIT(); /* parse array of region records (region list) */ if ( FT_STREAM_SEEK( offset + region_offset ) ) @@ -564,13 +569,26 @@ goto Exit; itemStore->regionCount = region_count; - for ( i = 0; i < itemStore->regionCount; i++ ) + if ( FT_FRAME_ENTER( (FT_Long)region_count * axis_count * 6 ) ) + { + FT_TRACE2(( "tt_var_load_item_variation_store:" + " not enough data for variation regions\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + bytes = stream->cursor; + + for ( i = 0; i < region_count; i++ ) { GX_AxisCoords axisCoords; if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList, axis_count ) ) + { + FT_FRAME_EXIT(); goto Exit; + } axisCoords = itemStore->varRegionList[i].axisList; @@ -579,10 +597,9 @@ FT_Int start, peak, end; - if ( FT_READ_SHORT( start ) || - FT_READ_SHORT( peak ) || - FT_READ_SHORT( end ) ) - goto Exit; + start = FT_NEXT_SHORT( bytes ); + peak = FT_NEXT_SHORT( bytes ); + end = FT_NEXT_SHORT( bytes ); /* immediately tag invalid ranges with special peak = 0 */ if ( ( start < 0 && end > 0 ) || start > peak || peak > end ) @@ -594,6 +611,8 @@ } } + FT_FRAME_EXIT(); + /* end of region list parse */ /* use dataOffsetArray now to parse varData items */ @@ -625,7 +644,7 @@ /* check some data consistency */ if ( word_delta_count > region_idx_count ) { - FT_TRACE2(( "bad short count %d or region count %d\n", + FT_TRACE2(( "bad short count %d or region count %u\n", word_delta_count, region_idx_count )); error = FT_THROW( Invalid_Table ); @@ -634,7 +653,7 @@ if ( region_idx_count > itemStore->regionCount ) { - FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n", + FT_TRACE2(( "inconsistent regionCount %u in varData[%u]\n", region_idx_count, i )); error = FT_THROW( Invalid_Table ); @@ -648,29 +667,39 @@ varData->wordDeltaCount = word_delta_count; varData->longWords = long_words; + if ( FT_FRAME_ENTER( region_idx_count * 2 ) ) + { + FT_TRACE2(( "tt_var_load_item_variation_store:" + " not enough data for region indices\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + bytes = stream->cursor; + for ( j = 0; j < varData->regionIdxCount; j++ ) { - if ( FT_READ_USHORT( varData->regionIndices[j] ) ) - goto Exit; + varData->regionIndices[j] = FT_NEXT_USHORT( bytes ); if ( varData->regionIndices[j] >= itemStore->regionCount ) { - FT_TRACE2(( "bad region index %d\n", + FT_TRACE2(( "bad region index %u\n", varData->regionIndices[j] )); + FT_FRAME_EXIT(); error = FT_THROW( Invalid_Table ); goto Exit; } } + FT_FRAME_EXIT(); + per_region_size = word_delta_count + region_idx_count; if ( long_words ) per_region_size *= 2; - if ( FT_NEW_ARRAY( varData->deltaSet, per_region_size * item_count ) ) + if ( FT_QALLOC_MULT( varData->deltaSet, item_count, per_region_size ) ) goto Exit; - if ( FT_Stream_Read( stream, - varData->deltaSet, - per_region_size * item_count ) ) + if ( FT_STREAM_READ( varData->deltaSet, item_count * per_region_size ) ) { FT_TRACE2(( "deltaSet read failed." )); error = FT_THROW( Invalid_Table ); @@ -706,6 +735,7 @@ FT_UInt innerIndexMask; FT_ULong i; FT_UInt j; + FT_Byte* bytes; if ( FT_STREAM_SEEK( offset ) || @@ -757,6 +787,16 @@ if ( FT_NEW_ARRAY( map->outerIndex, map->mapCount ) ) goto Exit; + if ( FT_FRAME_ENTER( map->mapCount * entrySize ) ) + { + FT_TRACE2(( "tt_var_load_delta_set_index_mapping:" + " invalid number of delta-set index mappings\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + bytes = stream->cursor; + for ( i = 0; i < map->mapCount; i++ ) { FT_UInt mapData = 0; @@ -769,9 +809,7 @@ FT_Byte data; - if ( FT_READ_BYTE( data ) ) - goto Exit; - + data = FT_NEXT_BYTE( bytes ); mapData = ( mapData << 8 ) | data; } @@ -789,7 +827,7 @@ if ( outerIndex >= itemStore->dataCount ) { - FT_TRACE2(( "outerIndex[%ld] == %d out of range\n", + FT_TRACE2(( "outerIndex[%lu] == %u out of range\n", i, outerIndex )); error = FT_THROW( Invalid_Table ); @@ -802,7 +840,7 @@ if ( innerIndex >= itemStore->varData[outerIndex].itemCount ) { - FT_TRACE2(( "innerIndex[%ld] == %d out of range\n", + FT_TRACE2(( "innerIndex[%lu] == %u out of range\n", i, innerIndex )); error = FT_THROW( Invalid_Table ); @@ -812,6 +850,8 @@ map->innerIndex[i] = innerIndex; } + FT_FRAME_EXIT(); + Exit: return error; } @@ -965,28 +1005,181 @@ } + static FT_Fixed + tt_calculate_scalar( GX_AxisCoords axis, + FT_UInt axisCount, + FT_Fixed* normalizedcoords ) + { + FT_Fixed scalar = 0x10000L; + FT_UInt j; + + + /* Inner loop steps through axes in this region. */ + for ( j = 0; j < axisCount; j++, axis++ ) + { + FT_Fixed ncv = normalizedcoords[j]; + + + /* Compute the scalar contribution of this axis, */ + /* with peak of 0 used for invalid axes. */ + if ( axis->peakCoord == ncv || + axis->peakCoord == 0 ) + continue; + + /* Ignore this region if coordinates are out of range. */ + else if ( ncv <= axis->startCoord || + ncv >= axis->endCoord ) + { + scalar = 0; + break; + } + + /* Cumulative product of all the axis scalars. */ + else if ( ncv < axis->peakCoord ) + scalar = FT_MulDiv( scalar, + ncv - axis->startCoord, + axis->peakCoord - axis->startCoord ); + else /* ncv > axis->peakCoord */ + scalar = FT_MulDiv( scalar, + axis->endCoord - ncv, + axis->endCoord - axis->peakCoord ); + + } /* per-axis loop */ + + return scalar; + } + + + static FT_Int64 + ft_mul_add_delta_scalar( FT_Int64 returnValue, + FT_Int32 delta, + FT_Int32 scalar ) + { + +#ifdef FT_INT64 + + return returnValue + (FT_Int64)delta * scalar; + +#else /* !FT_INT64 */ + + if ( (FT_UInt32)( delta + 0x8000 ) <= 0x20000 ) + { + /* Fast path: multiplication result fits into 32 bits. */ + + FT_Int32 lo = delta * scalar; + + + returnValue.lo += (FT_UInt32)lo; + + if ( returnValue.lo < (FT_UInt32)lo ) + returnValue.hi += ( lo < 0 ) ? 0 : 1; + + if ( lo < 0 ) + returnValue.hi -= 1; + + return returnValue; + } + else + { + /* Slow path: full 32x32 -> 64-bit signed multiplication. */ + + FT_Int64 product; + + /* Get absolute values. */ + FT_UInt32 a = ( delta < 0 ) ? -delta : delta; + FT_UInt32 b = ( scalar < 0 ) ? -scalar : scalar; + + /* Prepare unsigned multiplication. */ + FT_UInt32 a_lo = a & 0xFFFF; + FT_UInt32 a_hi = a >> 16; + + FT_UInt32 b_lo = b & 0xFFFF; + FT_UInt32 b_hi = b >> 16; + + /* Partial products. */ + FT_UInt32 p0 = a_lo * b_lo; + FT_UInt32 p1 = a_lo * b_hi; + FT_UInt32 p2 = a_hi * b_lo; + FT_UInt32 p3 = a_hi * b_hi; + + /* Combine: result = p3 << 32 + (p1 + p2) << 16 + p0 */ + FT_UInt32 mid = p1 + p2; + FT_UInt32 mid_carry = ( mid < p1 ); + + FT_UInt32 carry; + + + product.lo = ( mid << 16 ) + ( p0 & 0xFFFF ); + carry = ( product.lo < ( p0 & 0xFFFF ) ) ? 1 : 0; + product.hi = p3 + ( mid >> 16 ) + mid_carry + carry; + + /* If result should be negative, negate. */ + if ( ( delta < 0 ) ^ ( scalar < 0 ) ) + { + product.lo = ~product.lo + 1; + product.hi = ~product.hi + ( product.lo == 0 ? 1 : 0 ); + } + + /* Add to `returnValue`. */ + returnValue.lo += product.lo; + if ( returnValue.lo < product.lo ) + returnValue.hi++; + returnValue.hi += product.hi; + + return returnValue; + } + +#endif /* !FT_INT64 */ + + } + + + static FT_ItemVarDelta + ft_round_and_shift16( FT_Int64 returnValue ) + { + +#ifdef FT_INT64 + + return (FT_ItemVarDelta)( returnValue + 0x8000L ) >> 16; + +#else /* !FT_INT64 */ + + FT_UInt hi = returnValue.hi; + FT_UInt lo = returnValue.lo; + + FT_UInt delta; + + + /* Add 0x8000 to round. */ + lo += 0x8000; + if ( lo < 0x8000 ) /* overflow occurred */ + hi += 1; + + /* Shift right by 16 bits. */ + delta = ( hi << 16 ) | ( lo >> 16 ); + + return (FT_ItemVarDelta)delta; + +#endif /* !FT_INT64 */ + + } + + FT_LOCAL_DEF( FT_ItemVarDelta ) tt_var_get_item_delta( FT_Face face, /* TT_Face */ GX_ItemVarStore itemStore, FT_UInt outerIndex, FT_UInt innerIndex ) { - TT_Face ttface = (TT_Face)face; - FT_Stream stream = FT_FACE_STREAM( face ); - FT_Memory memory = stream->memory; - FT_Error error = FT_Err_Ok; + TT_Face ttface = (TT_Face)face; + + GX_ItemVarData varData; - GX_ItemVarData varData; - FT_ItemVarDelta* deltaSet = NULL; - FT_ItemVarDelta deltaSetStack[16]; - - FT_Fixed* scalars = NULL; - FT_Fixed scalarsStack[16]; - - FT_UInt master, j; - FT_ItemVarDelta returnValue = 0; - FT_UInt per_region_size; - FT_Byte* bytes; + FT_UInt master; + FT_Int64 returnValue = FT_INT64_ZERO; + FT_UInt shift_base = 1; + FT_UInt per_region_size; + FT_Byte* bytes; if ( !ttface->blend || !ttface->blend->normalizedcoords ) @@ -1011,113 +1204,63 @@ if ( varData->regionIdxCount == 0 ) return 0; /* Avoid "applying zero offset to null pointer". */ - if ( varData->regionIdxCount < 16 ) - { - deltaSet = deltaSetStack; - scalars = scalarsStack; - } - else - { - if ( FT_QNEW_ARRAY( deltaSet, varData->regionIdxCount ) ) - goto Exit; - if ( FT_QNEW_ARRAY( scalars, varData->regionIdxCount ) ) - goto Exit; - } - /* Parse delta set. */ /* */ /* Deltas are (word_delta_count + region_idx_count) bytes each */ /* if `longWords` isn't set, and twice as much otherwise. */ per_region_size = varData->wordDeltaCount + varData->regionIdxCount; if ( varData->longWords ) + { + shift_base = 2; per_region_size *= 2; + } bytes = varData->deltaSet + per_region_size * innerIndex; - if ( varData->longWords ) - { - for ( master = 0; master < varData->wordDeltaCount; master++ ) - deltaSet[master] = FT_NEXT_LONG( bytes ); - for ( ; master < varData->regionIdxCount; master++ ) - deltaSet[master] = FT_NEXT_SHORT( bytes ); - } - else - { - for ( master = 0; master < varData->wordDeltaCount; master++ ) - deltaSet[master] = FT_NEXT_SHORT( bytes ); - for ( ; master < varData->regionIdxCount; master++ ) - deltaSet[master] = FT_NEXT_CHAR( bytes ); - } - /* outer loop steps through master designs to be blended */ for ( master = 0; master < varData->regionIdxCount; master++ ) { - FT_Fixed scalar = 0x10000L; - FT_UInt regionIndex = varData->regionIndices[master]; + FT_UInt regionIndex = varData->regionIndices[master]; GX_AxisCoords axis = itemStore->varRegionList[regionIndex].axisList; + FT_Fixed scalar = tt_calculate_scalar( + axis, + itemStore->axisCount, + ttface->blend->normalizedcoords ); - /* inner loop steps through axes in this region */ - for ( j = 0; j < itemStore->axisCount; j++, axis++ ) - { - FT_Fixed ncv = ttface->blend->normalizedcoords[j]; + if ( scalar ) + { + FT_Int delta; - /* compute the scalar contribution of this axis */ - /* with peak of 0 used for invalid axes */ - if ( axis->peakCoord == ncv || - axis->peakCoord == 0 ) - continue; - /* ignore this region if coords are out of range */ - else if ( ncv <= axis->startCoord || - ncv >= axis->endCoord ) + if ( varData->longWords ) { - scalar = 0; - break; + if ( master < varData->wordDeltaCount ) + delta = FT_NEXT_LONG( bytes ); + else + delta = FT_NEXT_SHORT( bytes ); + } + else + { + if ( master < varData->wordDeltaCount ) + delta = FT_NEXT_SHORT( bytes ); + else + delta = FT_NEXT_CHAR( bytes ); } - /* cumulative product of all the axis scalars */ - else if ( ncv < axis->peakCoord ) - scalar = FT_MulDiv( scalar, - ncv - axis->startCoord, - axis->peakCoord - axis->startCoord ); - else /* ncv > axis->peakCoord */ - scalar = FT_MulDiv( scalar, - axis->endCoord - ncv, - axis->endCoord - axis->peakCoord ); - - } /* per-axis loop */ - - scalars[master] = scalar; + returnValue = ft_mul_add_delta_scalar( returnValue, delta, scalar ); + } + else + { + /* Branch-free, yay. */ + bytes += shift_base << ( master < varData->wordDeltaCount ); + } } /* per-region loop */ - - /* Compute the scaled delta for this region. - * - * From: https://docs.microsoft.com/en-us/typography/opentype/spec/otvarcommonformats#item-variation-store-header-and-item-variation-data-subtables: - * - * `Fixed` is a 32-bit (16.16) type and, in the general case, requires - * 32-bit deltas. As described above, the `DeltaSet` record can - * accommodate deltas that are, logically, either 16-bit or 32-bit. - * When scaled deltas are applied to `Fixed` values, the `Fixed` value - * is treated like a 32-bit integer. - * - * `FT_MulAddFix` internally uses 64-bit precision; it thus can handle - * deltas ranging from small 8-bit to large 32-bit values that are - * applied to 16.16 `FT_Fixed` / OpenType `Fixed` values. - */ - returnValue = FT_MulAddFix( scalars, deltaSet, varData->regionIdxCount ); - - Exit: - if ( scalars != scalarsStack ) - FT_FREE( scalars ); - if ( deltaSet != deltaSetStack ) - FT_FREE( deltaSet ); - - return returnValue; + return ft_round_and_shift16( returnValue ); } @@ -1643,6 +1786,7 @@ GX_Blend blend = face->blend; FT_Error error; FT_UInt i, j; + FT_Byte* bytes; FT_ULong table_len; FT_ULong gvar_start; FT_ULong offsetToData; @@ -1734,6 +1878,8 @@ if ( FT_FRAME_ENTER( offsets_len ) ) goto Exit; + bytes = stream->cursor; + /* offsets (one more offset than glyphs, to mark size of last) */ if ( FT_QNEW_ARRAY( blend->glyphoffsets, gvar_head.glyphCount + 1 ) ) goto Fail2; @@ -1744,16 +1890,24 @@ FT_ULong max_offset = 0; + if ( stream->limit - stream->cursor < gvar_head.glyphCount * 4 ) + { + FT_TRACE2(( "ft_var_load_gvar:" + " glyph variation data offset not enough\n" )); + error = FT_THROW( Invalid_Table ); + goto Fail; + } + for ( i = 0; i <= gvar_head.glyphCount; i++ ) { - blend->glyphoffsets[i] = offsetToData + FT_GET_ULONG(); + blend->glyphoffsets[i] = offsetToData + FT_NEXT_ULONG( bytes ); if ( max_offset <= blend->glyphoffsets[i] ) max_offset = blend->glyphoffsets[i]; else { FT_TRACE2(( "ft_var_load_gvar:" - " glyph variation data offset %d not monotonic\n", + " glyph variation data offset %u not monotonic\n", i )); blend->glyphoffsets[i] = max_offset; } @@ -1762,7 +1916,7 @@ if ( limit < blend->glyphoffsets[i] ) { FT_TRACE2(( "ft_var_load_gvar:" - " glyph variation data offset %d out of range\n", + " glyph variation data offset %u out of range\n", i )); blend->glyphoffsets[i] = limit; } @@ -1774,16 +1928,24 @@ FT_ULong max_offset = 0; + if ( stream->limit - stream->cursor < gvar_head.glyphCount * 2 ) + { + FT_TRACE2(( "ft_var_load_gvar:" + " glyph variation data offset not enough\n" )); + error = FT_THROW( Invalid_Table ); + goto Fail; + } + for ( i = 0; i <= gvar_head.glyphCount; i++ ) { - blend->glyphoffsets[i] = offsetToData + FT_GET_USHORT() * 2; + blend->glyphoffsets[i] = offsetToData + FT_NEXT_USHORT( bytes ) * 2; if ( max_offset <= blend->glyphoffsets[i] ) max_offset = blend->glyphoffsets[i]; else { FT_TRACE2(( "ft_var_load_gvar:" - " glyph variation data offset %d not monotonic\n", + " glyph variation data offset %u not monotonic\n", i )); blend->glyphoffsets[i] = max_offset; } @@ -1792,7 +1954,7 @@ if ( limit < blend->glyphoffsets[i] ) { FT_TRACE2(( "ft_var_load_gvar:" - " glyph variation data offset %d out of range\n", + " glyph variation data offset %u out of range\n", i )); blend->glyphoffsets[i] = limit; } @@ -1814,6 +1976,8 @@ goto Fail; } + bytes = stream->cursor; + if ( FT_QNEW_ARRAY( blend->tuplecoords, gvar_head.axisCount * gvar_head.globalCoordCount ) ) goto Fail2; @@ -1824,13 +1988,17 @@ for ( j = 0; j < (FT_UInt)gvar_head.axisCount; j++ ) { blend->tuplecoords[i * gvar_head.axisCount + j] = - FT_fdot14ToFixed( FT_GET_SHORT() ); + FT_fdot14ToFixed( FT_NEXT_SHORT( bytes ) ); FT_TRACE5(( "%.5f ", (double)blend->tuplecoords[i * gvar_head.axisCount + j] / 65536 )); } FT_TRACE5(( "]\n" )); } + if ( FT_NEW_ARRAY( blend->tuplescalars, + gvar_head.globalCoordCount ) ) + goto Fail2; + blend->tuplecount = gvar_head.globalCoordCount; FT_TRACE5(( "\n" )); @@ -1896,15 +2064,25 @@ for ( i = 0; i < blend->num_axis; i++ ) { - FT_Fixed ncv = blend->normalizedcoords[i]; + FT_Fixed ncv; - FT_TRACE6(( " axis %d coordinate %.5f:\n", i, (double)ncv / 65536 )); + if ( tuple_coords[i] == 0 ) + { + FT_TRACE6(( " tuple coordinate is zero, ignore\n" )); + continue; + } - /* It's not clear why (for intermediate tuples) we don't need */ - /* to check against start/end -- the documentation says we don't. */ - /* Similarly, it's unclear why we don't need to scale along the */ - /* axis. */ + ncv = blend->normalizedcoords[i]; + + FT_TRACE6(( " axis %u coordinate %.5f:\n", i, (double)ncv / 65536 )); + + if ( ncv == 0 ) + { + FT_TRACE6(( " axis coordinate is zero, stop\n" )); + apply = 0; + break; + } if ( tuple_coords[i] == ncv ) { @@ -1914,12 +2092,6 @@ continue; } - if ( tuple_coords[i] == 0 ) - { - FT_TRACE6(( " tuple coordinate is zero, ignore\n" )); - continue; - } - if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) ) { /* not an intermediate tuple */ @@ -2001,7 +2173,7 @@ if ( num_coords > mmvar->num_axis ) { FT_TRACE2(( "ft_var_to_normalized:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", mmvar->num_axis, num_coords )); num_coords = mmvar->num_axis; } @@ -2016,7 +2188,7 @@ FT_Fixed coord = coords[i]; - FT_TRACE5(( " %d: %.5f\n", i, (double)coord / 65536 )); + FT_TRACE5(( " %u: %.5f\n", i, (double)coord / 65536 )); if ( coord > a->maximum || coord < a->minimum ) { FT_TRACE1(( "ft_var_to_normalized: design coordinate %.5f\n", @@ -2156,7 +2328,7 @@ if ( num_coords > blend->num_axis ) { FT_TRACE2(( "ft_var_to_design:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } @@ -2516,7 +2688,7 @@ " minimum default maximum flags\n" )); /* " XXXX.XXXXX XXXX.XXXXX XXXX.XXXXX 0xXXXX" */ - FT_TRACE5(( " %3d `%s'" + FT_TRACE5(( " %3u `%s'" " %10.5f %10.5f %10.5f 0x%04X%s\n", i, a->name, @@ -2608,7 +2780,7 @@ (void)FT_STREAM_SEEK( pos ); - FT_TRACE5(( " named instance %d (%s%s%s, %s%s%s)\n", + FT_TRACE5(( " named instance %u (%s%s%s, %s%s%s)\n", i, strname ? "name: `" : "", strname ? strname : "unnamed", @@ -2636,7 +2808,7 @@ FT_UInt strid = ~0U; - /* The default instance is missing in array the */ + /* The default instance is missing in the array */ /* of named instances; try to synthesize an entry. */ /* If this fails, `default_named_instance` remains */ /* at value zero, which doesn't do any harm. */ @@ -2766,10 +2938,18 @@ } manageCvt; - face->doblend = FALSE; - if ( !face->blend ) { + face->doblend = FALSE; + for ( i = 0; i < num_coords; i++ ) + if ( coords[i] ) + { + face->doblend = TRUE; + break; + } + if ( !face->doblend ) + goto Exit; + if ( FT_SET_ERROR( TT_Get_MM_Var( FT_FACE( face ), NULL ) ) ) goto Exit; } @@ -2780,7 +2960,7 @@ if ( num_coords > mmvar->num_axis ) { FT_TRACE2(( "TT_Set_MM_Blend:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", mmvar->num_axis, num_coords )); num_coords = mmvar->num_axis; } @@ -2882,11 +3062,7 @@ /* return value -1 indicates `no change' */ if ( !have_diff ) - { - face->doblend = TRUE; - return -1; - } for ( ; i < mmvar->num_axis; i++ ) { @@ -2915,7 +3091,15 @@ blend->normalizedcoords, blend->coords ); - face->doblend = TRUE; + face->doblend = FALSE; + for ( i = 0; i < blend->num_axis; i++ ) + { + if ( blend->normalizedcoords[i] ) + { + face->doblend = TRUE; + break; + } + } if ( face->cvt ) { @@ -2941,6 +3125,9 @@ } } + for ( i = 0 ; i < blend->tuplecount ; i++ ) + blend->tuplescalars[i] = (FT_Fixed)-0x20000L; + Exit: return error; } @@ -2980,7 +3167,24 @@ FT_UInt num_coords, FT_Fixed* coords ) { - return tt_set_mm_blend( (TT_Face)face, num_coords, coords, 1 ); + FT_Error error; + + + error = tt_set_mm_blend( (TT_Face)face, num_coords, coords, 1 ); + if ( error == FT_Err_Ok ) + { + FT_UInt i; + + + for ( i = 0; i < num_coords; i++ ) + if ( coords[i] ) + { + error = -2; /* -2 means is_variable. */ + break; + } + } + + return error; } @@ -3043,7 +3247,7 @@ if ( num_coords > blend->num_axis ) { FT_TRACE2(( "TT_Get_MM_Blend:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } @@ -3125,7 +3329,7 @@ if ( num_coords > mmvar->num_axis ) { FT_TRACE2(( "TT_Set_Var_Design:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", mmvar->num_axis, num_coords )); num_coords = mmvar->num_axis; } @@ -3201,6 +3405,15 @@ if ( error ) goto Exit; + for ( i = 0; i < num_coords; i++ ) + { + if ( normalized[i] ) + { + error = -2; /* -2 means is_variable. */ + break; + } + } + Exit: FT_FREE( normalized ); return error; @@ -3237,10 +3450,12 @@ FT_UInt num_coords, FT_Fixed* coords ) { - TT_Face ttface = (TT_Face)face; - FT_Error error = FT_Err_Ok; - GX_Blend blend; - FT_UInt i, nc; + TT_Face ttface = (TT_Face)face; + FT_Error error = FT_Err_Ok; + GX_Blend blend; + FT_MM_Var* mmvar; + FT_Var_Axis* a; + FT_UInt i, nc; if ( !ttface->blend ) @@ -3263,24 +3478,26 @@ if ( num_coords > blend->num_axis ) { FT_TRACE2(( "TT_Get_Var_Design:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } + mmvar = blend->mmvar; + a = mmvar->axis; if ( ttface->doblend ) { - for ( i = 0; i < nc; i++ ) + for ( i = 0; i < nc; i++, a++ ) coords[i] = blend->coords[i]; } else { - for ( i = 0; i < nc; i++ ) - coords[i] = 0; + for ( i = 0; i < nc; i++, a++ ) + coords[i] = a->def; } - for ( ; i < num_coords; i++ ) - coords[i] = 0; + for ( ; i < num_coords; i++, a++ ) + coords[i] = a->def; return FT_Err_Ok; } @@ -3373,6 +3590,9 @@ error = TT_Set_Var_Design( face, 0, NULL ); } + if ( error == -1 || error == -2 ) + error = FT_Err_Ok; + Exit: return error; } @@ -3591,7 +3811,7 @@ FT_Stream_SeekSet( stream, here ); } - FT_TRACE5(( "cvar: there %s %d tuple%s:\n", + FT_TRACE5(( "cvar: there %s %u tuple%s:\n", ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "is" : "are", tupleCount & GX_TC_TUPLE_COUNT_MASK, ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "" : "s" )); @@ -3610,7 +3830,7 @@ FT_Fixed apply; - FT_TRACE6(( " tuple %d:\n", i )); + FT_TRACE6(( " tuple %u:\n", i )); tupleDataSize = FT_GET_USHORT(); tupleIndex = FT_GET_USHORT(); @@ -3676,7 +3896,7 @@ if ( !points || !deltas ) ; /* failure, ignore it */ - else if ( localpoints == ALL_POINTS ) + else if ( points == ALL_POINTS ) { #ifdef FT_DEBUG_LEVEL_TRACE int count = 0; @@ -3697,7 +3917,7 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( old_cvt_delta != cvt_deltas[j] ) { - FT_TRACE7(( " %d: %f -> %f\n", + FT_TRACE7(( " %u: %f -> %f\n", j, (double)( FT_fdot6ToFixed( face->cvt[j] ) + old_cvt_delta ) / 65536, @@ -4027,7 +4247,7 @@ FT_Outline* outline, FT_Vector* unrounded ) { - FT_Error error; + FT_Error error = FT_Err_Ok; TT_Face face = loader->face; FT_Stream stream = face->root.stream; FT_Memory memory = stream->memory; @@ -4047,6 +4267,15 @@ FT_ULong here; FT_UInt i, j; + FT_UInt peak_coords_size; + FT_UInt point_deltas_x_size; + FT_UInt points_org_size; + FT_UInt points_out_size; + FT_UInt has_delta_size; + FT_UInt pool_size; + FT_Byte* pool = NULL; + FT_Byte* p; + FT_Fixed* peak_coords = NULL; FT_Fixed* tuple_coords; FT_Fixed* im_start_coords; @@ -4067,21 +4296,24 @@ FT_Fixed* point_deltas_y = NULL; - if ( !face->doblend || !blend ) - return FT_THROW( Invalid_Argument ); - for ( i = 0; i < n_points; i++ ) { unrounded[i].x = INT_TO_F26DOT6( outline->points[i].x ); unrounded[i].y = INT_TO_F26DOT6( outline->points[i].y ); } + if ( !face->doblend ) + goto Exit; + + if ( !blend ) + return FT_THROW( Invalid_Argument ); + if ( glyph_index >= blend->gv_glyphcnt || blend->glyphoffsets[glyph_index] == blend->glyphoffsets[glyph_index + 1] ) { FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" - " no variation data for glyph %d\n", glyph_index )); + " no variation data for glyph %u\n", glyph_index )); return FT_Err_Ok; } @@ -4125,18 +4357,41 @@ FT_Stream_SeekSet( stream, here ); } - FT_TRACE5(( "gvar: there %s %d tuple%s:\n", + FT_TRACE5(( "gvar: there %s %u tuple%s:\n", ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "is" : "are", tupleCount & GX_TC_TUPLE_COUNT_MASK, ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ? "" : "s" )); - if ( FT_QNEW_ARRAY( peak_coords, 3 * blend->num_axis ) || - FT_NEW_ARRAY( point_deltas_x, 2 * n_points ) || - FT_QNEW_ARRAY( points_org, n_points ) || - FT_QNEW_ARRAY( points_out, n_points ) || - FT_QNEW_ARRAY( has_delta, n_points ) ) + peak_coords_size = ALIGN_SIZE( 3 * blend->num_axis * + sizeof ( *peak_coords ) ); + point_deltas_x_size = ALIGN_SIZE( 2 * n_points * + sizeof ( *point_deltas_x ) ); + points_org_size = ALIGN_SIZE( n_points * sizeof ( *points_org ) ); + points_out_size = ALIGN_SIZE( n_points * sizeof ( *points_out ) ); + has_delta_size = ALIGN_SIZE( n_points * sizeof ( *has_delta ) ); + + pool_size = peak_coords_size + + point_deltas_x_size + + points_org_size + + points_out_size + + has_delta_size; + + if ( FT_ALLOC( pool, pool_size ) ) goto Exit; + p = pool; + peak_coords = (FT_Fixed*)p; + p += peak_coords_size; + point_deltas_x = (FT_Fixed*)p; + p += point_deltas_x_size; + points_org = (FT_Vector*)p; + p += points_org_size; + points_out = (FT_Vector*)p; + p += points_out_size; + has_delta = (FT_Bool*)p; + + FT_ARRAY_ZERO( point_deltas_x, 2 * n_points ); + im_start_coords = peak_coords + blend->num_axis; im_end_coords = im_start_coords + blend->num_axis; point_deltas_y = point_deltas_x + n_points; @@ -4147,27 +4402,70 @@ points_org[j].y = FT_intToFixed( outline->points[j].y ); } - for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ ) + p = stream->cursor; + + tupleCount &= GX_TC_TUPLE_COUNT_MASK; + for ( i = 0; i < tupleCount; i++ ) { - FT_UInt tupleDataSize; - FT_UInt tupleIndex; - FT_Fixed apply; + FT_UInt tupleDataSize; + FT_UInt tupleIndex; + FT_Fixed apply; + FT_Fixed* tupleScalars; - FT_TRACE6(( " tuple %d:\n", i )); + FT_TRACE6(( " tuple %u:\n", i )); - tupleDataSize = FT_GET_USHORT(); - tupleIndex = FT_GET_USHORT(); + tupleScalars = blend->tuplescalars; + + /* Enter frame for four bytes. */ + if ( 4 > stream->limit - p ) + { + FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" + " invalid glyph variation array header\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + tupleDataSize = FT_NEXT_USHORT( p ); + tupleIndex = FT_NEXT_USHORT( p ); + + if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) + tupleScalars = NULL; if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD ) { + if ( 2 * blend->num_axis > (FT_UInt)( stream->limit - p ) ) + { + FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" + " invalid glyph variation array header\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + for ( j = 0; j < blend->num_axis; j++ ) - peak_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + peak_coords[j] = FT_fdot14ToFixed( FT_NEXT_SHORT( p ) ); + tuple_coords = peak_coords; + tupleScalars = NULL; } else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) < blend->tuplecount ) + { + FT_Fixed scalar = + tupleScalars + ? tupleScalars[tupleIndex & GX_TI_TUPLE_INDEX_MASK] + : (FT_Fixed)-0x20000; + + + if ( scalar != (FT_Fixed)-0x20000 ) + { + apply = scalar; + goto apply_found; + } + tuple_coords = blend->tuplecoords + - ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis; + ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * + blend->num_axis; + } else { FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" @@ -4179,10 +4477,18 @@ if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) { + if ( 4 * blend->num_axis > (FT_UInt)( stream->limit - p ) ) + { + FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:" + " invalid glyph variation array header\n" )); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + for ( j = 0; j < blend->num_axis; j++ ) - im_start_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + im_start_coords[j] = FT_fdot14ToFixed( FT_NEXT_SHORT( p ) ); for ( j = 0; j < blend->num_axis; j++ ) - im_end_coords[j] = FT_fdot14ToFixed( FT_GET_SHORT() ); + im_end_coords[j] = FT_fdot14ToFixed( FT_NEXT_SHORT( p ) ); } apply = ft_var_apply_tuple( blend, @@ -4191,6 +4497,11 @@ im_start_coords, im_end_coords ); + if ( tupleScalars ) + tupleScalars[tupleIndex & GX_TI_TUPLE_INDEX_MASK] = apply; + + apply_found: + if ( apply == 0 ) /* tuple isn't active for our blend */ { offsetToData += tupleDataSize; @@ -4247,7 +4558,7 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( point_delta_x || point_delta_y ) { - FT_TRACE7(( " %d: (%f, %f) -> (%f, %f)\n", + FT_TRACE7(( " %u: (%f, %f) -> (%f, %f)\n", j, (double)( FT_intToFixed( outline->points[j].x ) + old_point_delta_x ) / 65536, @@ -4321,7 +4632,7 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( point_delta_x || point_delta_y ) { - FT_TRACE7(( " %d: (%f, %f) -> (%f, %f)\n", + FT_TRACE7(( " %u: (%f, %f) -> (%f, %f)\n", j, (double)( FT_intToFixed( outline->points[j].x ) + old_point_delta_x ) / 65536, @@ -4402,11 +4713,7 @@ Exit: if ( sharedpoints != ALL_POINTS ) FT_FREE( sharedpoints ); - FT_FREE( points_org ); - FT_FREE( points_out ); - FT_FREE( has_delta ); - FT_FREE( peak_coords ); - FT_FREE( point_deltas_x ); + FT_FREE( pool ); FExit: FT_FRAME_EXIT(); @@ -4577,6 +4884,7 @@ FT_FREE( blend->mvar_table ); } + FT_FREE( blend->tuplescalars ); FT_FREE( blend->tuplecoords ); FT_FREE( blend->glyphoffsets ); FT_FREE( blend ); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader (specification) * - * Copyright (C) 2004-2024 by + * Copyright (C) 2004-2025 by * David Turner, Robert Wilhelm, Werner Lemberg and George Williams. * * This file is part of the FreeType project, and may only be used, @@ -255,6 +255,10 @@ * A two-dimensional array that holds the shared tuple coordinates * in the `gvar' table. * + * tuplescalars :: + * A one-dimensional array that holds the shared tuple + * scalars in the `gvar' table for current face coordinates. + * * gv_glyphcnt :: * The number of glyphs handled in the `gvar' table. * @@ -293,6 +297,7 @@ FT_UInt tuplecount; FT_Fixed* tuplecoords; /* tuplecoords[tuplecount][num_axis] */ + FT_Fixed* tuplescalars; /* tuplescalars[tuplecount] */ FT_UInt gv_glyphcnt; FT_ULong* glyphoffsets; /* glyphoffsets[gv_glyphcnt + 1] */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -27,6 +27,8 @@ #include <freetype/ftdriver.h> #include <freetype/ftmm.h> +#ifdef TT_USE_BYTECODE_INTERPRETER + #include "ttinterp.h" #include "tterrors.h" #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT @@ -34,9 +36,6 @@ #endif -#ifdef TT_USE_BYTECODE_INTERPRETER - - /************************************************************************** * * The macro FT_COMPONENT is used in trace mode. It is an implicit @@ -89,58 +88,37 @@ #define FAILURE 1 - /************************************************************************** - * - * CODERANGE FUNCTIONS - * - */ + /* The default value for `scan_control' is documented as FALSE in the */ + /* TrueType specification. This is confusing since it implies a */ + /* Boolean value. However, this is not the case, thus both the */ + /* default values of our `scan_type' and `scan_control' fields (which */ + /* the documentation's `scan_control' variable is split into) are */ + /* zero. */ + /* */ + /* The rounding compensation should logically belong here but poorly */ + /* described in the OpenType specs. It was probably important in the */ + /* days of dot matrix printers. The values are referenced by color */ + /* as Gray, Black, and White in order. The Apple specification says */ + /* that the Gray compensation is always zero. The fourth value is */ + /* not described at all, but Greg says that it is the same as Gray. */ + /* FreeType sets all compensation values to zero. */ + + const TT_GraphicsState tt_default_graphics_state = + { + 0, 0, 0, 1, 1, 1, + { 0x4000, 0 }, { 0x4000, 0 }, { 0x4000, 0 }, + 1, 1, { 0, 0, 0, 0 }, + + 64, 68, 0, 0, 9, 3, + TRUE, 0, FALSE, 0 + }; /************************************************************************** * - * @Function: - * TT_Goto_CodeRange - * - * @Description: - * Switches to a new code range (updates the code related elements in - * `exec', and `IP'). - * - * @Input: - * range :: - * The new execution code range. - * - * IP :: - * The new IP in the new code range. + * CODERANGE FUNCTIONS * - * @InOut: - * exec :: - * The target execution context. */ - FT_LOCAL_DEF( void ) - TT_Goto_CodeRange( TT_ExecContext exec, - FT_Int range, - FT_Long IP ) - { - TT_CodeRange* coderange; - - - FT_ASSERT( range >= 1 && range <= 3 ); - - coderange = &exec->codeRangeTable[range - 1]; - - FT_ASSERT( coderange->base ); - - /* NOTE: Because the last instruction of a program may be a CALL */ - /* which will return to the first byte *after* the code */ - /* range, we test for IP <= Size instead of IP < Size. */ - /* */ - FT_ASSERT( IP <= coderange->size ); - - exec->code = coderange->base; - exec->codeSize = coderange->size; - exec->IP = IP; - exec->curRange = range; - } /************************************************************************** @@ -168,13 +146,19 @@ FT_LOCAL_DEF( void ) TT_Set_CodeRange( TT_ExecContext exec, FT_Int range, - void* base, + FT_Byte* base, FT_Long length ) { FT_ASSERT( range >= 1 && range <= 3 ); - exec->codeRangeTable[range - 1].base = (FT_Byte*)base; + exec->codeRangeTable[range - 1].base = base; exec->codeRangeTable[range - 1].size = length; + + exec->code = base; + exec->codeSize = length; + exec->IP = 0; + exec->curRange = range; + exec->iniRange = range; } @@ -224,9 +208,6 @@ * exec :: * A handle to the target execution context. * - * memory :: - * A handle to the parent memory object. - * * @Note: * Only the glyph loader and debugger should call this function. */ @@ -240,10 +221,6 @@ exec->maxPoints = 0; exec->maxContours = 0; - /* free stack */ - FT_FREE( exec->stack ); - exec->stackSize = 0; - /* free glyf cvt working area */ FT_FREE( exec->glyfCvt ); exec->glyfCvtSize = 0; @@ -295,79 +272,31 @@ * * Note that not all members of `TT_ExecContext` get initialized. */ - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) TT_Load_Context( TT_ExecContext exec, TT_Face face, TT_Size size ) { - FT_Int i; - TT_MaxProfile* maxp; - FT_Error error; - FT_Memory memory = exec->memory; + FT_Memory memory = exec->memory; exec->face = face; - maxp = &face->max_profile; exec->size = size; - if ( size ) - { - exec->numFDefs = size->num_function_defs; - exec->maxFDefs = size->max_function_defs; - exec->numIDefs = size->num_instruction_defs; - exec->maxIDefs = size->max_instruction_defs; - exec->FDefs = size->function_defs; - exec->IDefs = size->instruction_defs; - exec->pointSize = size->point_size; - exec->tt_metrics = size->ttmetrics; - exec->metrics = *size->metrics; - - exec->maxFunc = size->max_func; - exec->maxIns = size->max_ins; - - for ( i = 0; i < TT_MAX_CODE_RANGES; i++ ) - exec->codeRangeTable[i] = size->codeRangeTable[i]; - - /* set graphics state */ - exec->GS = size->GS; - - exec->cvtSize = size->cvt_size; - exec->cvt = size->cvt; - - exec->storeSize = size->storage_size; - exec->storage = size->storage; - - exec->twilight = size->twilight; - - /* In case of multi-threading it can happen that the old size object */ - /* no longer exists, thus we must clear all glyph zone references. */ - FT_ZERO( &exec->zp0 ); - exec->zp1 = exec->zp0; - exec->zp2 = exec->zp0; - } - - /* XXX: We reserve a little more elements on the stack to deal safely */ - /* with broken fonts like arialbs, courbs, timesbs, etc. */ - if ( FT_QRENEW_ARRAY( exec->stack, - exec->stackSize, - maxp->maxStackElements + 32 ) ) - return error; - exec->stackSize = maxp->maxStackElements + 32; + /* CVT and storage are not persistent in FreeType */ + /* reset them after they might have been modified */ + exec->storage = exec->stack + exec->stackSize; + exec->cvt = exec->storage + exec->storeSize; /* free previous glyph code range */ FT_FREE( exec->glyphIns ); exec->glyphSize = 0; - exec->pts.n_points = 0; - exec->pts.n_contours = 0; - - exec->zp1 = exec->pts; - exec->zp2 = exec->pts; - exec->zp0 = exec->pts; - - exec->instruction_trap = FALSE; + exec->pointSize = size->point_size; + exec->tt_metrics = size->ttmetrics; + exec->metrics = *size->metrics; - return FT_Err_Ok; + exec->twilight = size->twilight; } @@ -394,89 +323,22 @@ TT_Save_Context( TT_ExecContext exec, TT_Size size ) { - FT_Int i; - - - /* XXX: Will probably disappear soon with all the code range */ - /* management, which is now rather obsolete. */ - /* */ - size->num_function_defs = exec->numFDefs; - size->num_instruction_defs = exec->numIDefs; - - size->max_func = exec->maxFunc; - size->max_ins = exec->maxIns; + /* UNDOCUMENTED! */ + /* Only these GS values can be modified by the CVT program. */ - for ( i = 0; i < TT_MAX_CODE_RANGES; i++ ) - size->codeRangeTable[i] = exec->codeRangeTable[i]; + size->GS.minimum_distance = exec->GS.minimum_distance; + size->GS.control_value_cutin = exec->GS.control_value_cutin; + size->GS.single_width_cutin = exec->GS.single_width_cutin; + size->GS.single_width_value = exec->GS.single_width_value; + size->GS.delta_base = exec->GS.delta_base; + size->GS.delta_shift = exec->GS.delta_shift; + size->GS.auto_flip = exec->GS.auto_flip; + size->GS.instruct_control = exec->GS.instruct_control; + size->GS.scan_control = exec->GS.scan_control; + size->GS.scan_type = exec->GS.scan_type; } - /************************************************************************** - * - * @Function: - * TT_Run_Context - * - * @Description: - * Executes one or more instructions in the execution context. - * - * @Input: - * exec :: - * A handle to the target execution context. - * - * @Return: - * TrueType error code. 0 means success. - */ - FT_LOCAL_DEF( FT_Error ) - TT_Run_Context( TT_ExecContext exec ) - { - TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ); - - exec->zp0 = exec->pts; - exec->zp1 = exec->pts; - exec->zp2 = exec->pts; - - exec->GS.gep0 = 1; - exec->GS.gep1 = 1; - exec->GS.gep2 = 1; - - exec->GS.projVector.x = 0x4000; - exec->GS.projVector.y = 0x0000; - - exec->GS.freeVector = exec->GS.projVector; - exec->GS.dualVector = exec->GS.projVector; - - exec->GS.round_state = 1; - exec->GS.loop = 1; - - /* some glyphs leave something on the stack. so we clean it */ - /* before a new execution. */ - exec->top = 0; - exec->callTop = 0; - - return exec->face->interpreter( exec ); - } - - - /* The default value for `scan_control' is documented as FALSE in the */ - /* TrueType specification. This is confusing since it implies a */ - /* Boolean value. However, this is not the case, thus both the */ - /* default values of our `scan_type' and `scan_control' fields (which */ - /* the documentation's `scan_control' variable is split into) are */ - /* zero. */ - - const TT_GraphicsState tt_default_graphics_state = - { - 0, 0, 0, - { 0x4000, 0 }, - { 0x4000, 0 }, - { 0x4000, 0 }, - - 1, 64, 1, - TRUE, 68, 0, 0, 9, 3, - 0, FALSE, 0, 1, 1, 1 - }; - - /* documentation is in ttinterp.h */ FT_EXPORT_DEF( TT_ExecContext ) @@ -485,7 +347,8 @@ FT_Memory memory; FT_Error error; - TT_ExecContext exec = NULL; + TT_ExecContext exec = NULL; + FT_DebugHook_Func interp; if ( !driver ) @@ -497,6 +360,15 @@ if ( FT_NEW( exec ) ) goto Fail; + /* set `exec->interpreter' according to the debug hook present, */ + /* which is used by 'ttdebug'. */ + interp = driver->root.root.library->debug_hooks[FT_DEBUG_HOOK_TRUETYPE]; + + if ( interp ) + exec->interpreter = (TT_Interpreter)interp; + else + exec->interpreter = (TT_Interpreter)TT_RunIns; + /* create callStack here, other allocations delayed */ exec->memory = memory; exec->callSize = 32; @@ -1160,20 +1032,35 @@ #undef PACK -#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER +#ifdef FT_INT64 + +#define TT_MulFix14( a, b ) TT_MulFix14_64( a, b ) + + static inline FT_F26Dot6 + TT_MulFix14_64( FT_F26Dot6 a, + FT_F2Dot14 b ) + { + FT_Int64 ab = MUL_INT64( a, b ); + + + ab = ADD_INT64( ab, 0x2000 + ( ab >> 63 ) ); /* rounding phase */ + + return (FT_F26Dot6)( ab >> 14 ); + } + +#elif !defined( FT_CONFIG_OPTION_NO_ASSEMBLER ) #if defined( __arm__ ) && \ ( defined( __thumb2__ ) || !defined( __thumb__ ) ) #define TT_MulFix14 TT_MulFix14_arm - static FT_Int32 + static __inline FT_Int32 TT_MulFix14_arm( FT_Int32 a, - FT_Int b ) + FT_Int32 b ) { FT_Int32 t, t2; - #if defined( __CC_ARM ) || defined( __ARMCC__ ) __asm @@ -1199,8 +1086,8 @@ #endif "adds %1, %1, %0\n\t" /* %1 += %0 */ "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #14\n\t" /* %0 = %1 >> 16 */ - "orr %0, %0, %2, lsl #18\n\t" /* %0 |= %2 << 16 */ + "mov %0, %1, lsr #14\n\t" /* %0 = %1 >> 14 */ + "orr %0, %0, %2, lsl #18\n\t" /* %0 |= %2 << 18 */ : "=r"(a), "=&r"(t2), "=&r"(t) : "r"(a), "r"(b) : "cc" ); @@ -1210,49 +1097,60 @@ return a; } -#endif /* __arm__ && ( __thumb2__ || !__thumb__ ) */ +#elif defined( __i386__ ) || defined( _M_IX86 ) -#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ - - -#if defined( __GNUC__ ) && \ - ( defined( __i386__ ) || defined( __x86_64__ ) ) +#define TT_MulFix14 TT_MulFix14_i386 -#define TT_MulFix14 TT_MulFix14_long_long - - /* Temporarily disable the warning that C90 doesn't support `long long'. */ -#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 -#pragma GCC diagnostic push -#endif -#pragma GCC diagnostic ignored "-Wlong-long" + /* documentation is in freetype.h */ - /* This is declared `noinline' because inlining the function results */ - /* in slower code. The `pure' attribute indicates that the result */ - /* only depends on the parameters. */ - static __attribute__(( noinline )) - __attribute__(( pure )) FT_Int32 - TT_MulFix14_long_long( FT_Int32 a, - FT_Int b ) + static __inline FT_Int32 + TT_MulFixi14_i386( FT_Int32 a, + FT_Int32 b ) { + FT_Int32 result; - long long ret = (long long)a * b; +#if defined( __GNUC__ ) - /* The following line assumes that right shifting of signed values */ - /* will actually preserve the sign bit. The exact behaviour is */ - /* undefined, but this is true on x86 and x86_64. */ - long long tmp = ret >> 63; + __asm__ __volatile__ ( + "imul %%edx\n" + "movl %%edx, %%ecx\n" + "sarl $31, %%ecx\n" + "addl $0x2000, %%ecx\n" + "addl %%ecx, %%eax\n" + "adcl $0, %%edx\n" + "shrl $14, %%eax\n" + "shll $18, %%edx\n" + "addl %%edx, %%eax\n" + : "=a"(result), "=d"(b) + : "a"(a), "d"(b) + : "%ecx", "cc" ); +#elif defined( _MSC_VER) - ret += 0x2000 + tmp; + __asm + { + mov eax, a + mov edx, b + imul edx + mov ecx, edx + sar ecx, 31 + add ecx, 2000h + add eax, ecx + adc edx, 0 + shr eax, 14 + shl edx, 18 + add eax, edx + mov result, eax + } - return (FT_Int32)( ret >> 14 ); +#endif + + return result; } -#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 -#pragma GCC diagnostic pop -#endif +#endif /* __i386__ || _M_IX86 */ -#endif /* __GNUC__ && ( __i386__ || __x86_64__ ) */ +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ #ifndef TT_MulFix14 @@ -1262,92 +1160,59 @@ /* for platforms where sizeof(int) == 2. */ static FT_Int32 TT_MulFix14( FT_Int32 a, - FT_Int b ) + FT_Int16 b ) { - FT_Int32 sign; - FT_UInt32 ah, al, mid, lo, hi; - + FT_Int32 m, hi; + FT_UInt32 l, lo; - sign = a ^ b; - if ( a < 0 ) - a = -a; - if ( b < 0 ) - b = -b; + /* compute a*b as 64-bit (hi_lo) value */ + l = (FT_UInt32)( ( a & 0xFFFFU ) * b ); + m = ( a >> 16 ) * b; - ah = (FT_UInt32)( ( a >> 16 ) & 0xFFFFU ); - al = (FT_UInt32)( a & 0xFFFFU ); + lo = l + ( (FT_UInt32)m << 16 ); + hi = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo < l ); - lo = al * b; - mid = ah * b; - hi = mid >> 16; - mid = ( mid << 16 ) + ( 1 << 13 ); /* rounding */ - lo += mid; - if ( lo < mid ) - hi += 1; - - mid = ( lo >> 14 ) | ( hi << 18 ); + /* divide the result by 2^14 with rounding */ + l = lo + 0x2000U + (FT_UInt32)( hi >> 31 ); /* rounding phase */ + hi += ( l < lo ); - return sign >= 0 ? (FT_Int32)mid : -(FT_Int32)mid; + return (FT_F26Dot6)( ( (FT_UInt32)hi << 18 ) | ( l >> 14 ) ); } #endif /* !TT_MulFix14 */ -#if defined( __GNUC__ ) && \ - ( defined( __i386__ ) || \ - defined( __x86_64__ ) || \ - defined( __arm__ ) ) +#ifdef FT_INT64 -#define TT_DotFix14 TT_DotFix14_long_long - -#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 -#pragma GCC diagnostic push -#endif -#pragma GCC diagnostic ignored "-Wlong-long" - - static __attribute__(( pure )) FT_Int32 - TT_DotFix14_long_long( FT_Int32 ax, - FT_Int32 ay, - FT_Int bx, - FT_Int by ) + /* compute (ax*bx+ay*by)/2^14 with maximum accuracy and rounding */ + static inline FT_F26Dot6 + TT_DotFix14( FT_F26Dot6 ax, + FT_F26Dot6 ay, + FT_F2Dot14 bx, + FT_F2Dot14 by ) { - /* Temporarily disable the warning that C90 doesn't support */ - /* `long long'. */ - - long long temp1 = (long long)ax * bx; - long long temp2 = (long long)ay * by; - + FT_Int64 c = ADD_INT64( MUL_INT64( ax, bx ), MUL_INT64( ay, by ) ); - temp1 += temp2; - temp2 = temp1 >> 63; - temp1 += 0x2000 + temp2; - return (FT_Int32)( temp1 >> 14 ); + c = ADD_INT64( c, 0x2000 + ( c >> 63 ) ); /* rounding phase */ + return (FT_F26Dot6)( c >> 14 ); } -#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 -#pragma GCC diagnostic pop -#endif - -#endif /* __GNUC__ && (__arm__ || __i386__ || __x86_64__) */ - - -#ifndef TT_DotFix14 +#else - /* compute (ax*bx+ay*by)/2^14 with maximum accuracy and rounding */ - static FT_Int32 - TT_DotFix14( FT_Int32 ax, - FT_Int32 ay, - FT_Int bx, - FT_Int by ) + static inline FT_F26Dot6 + TT_DotFix14( FT_F26Dot6 ax, + FT_F26Dot6 ay, + FT_F2Dot14 bx, + FT_F2Dot14 by ) { - FT_Int32 m, s, hi1, hi2, hi; + FT_Int32 m, hi1, hi2, hi; FT_UInt32 l, lo1, lo2, lo; - /* compute ax*bx as 64-bit value */ + /* compute ax*bx as 64-bit (hi_lo) value */ l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx ); m = ( ax >> 16 ) * bx; @@ -1366,18 +1231,13 @@ hi = hi1 + hi2 + ( lo < lo1 ); /* divide the result by 2^14 with rounding */ - s = hi >> 31; - l = lo + (FT_UInt32)s; - hi += s + ( l < lo ); - lo = l; - - l = lo + 0x2000U; + l = lo + 0x2000U + (FT_UInt32)( hi >> 31 ); /* rounding phase */ hi += ( l < lo ); - return (FT_Int32)( ( (FT_UInt32)hi << 18 ) | ( l >> 14 ) ); + return (FT_F26Dot6)( ( (FT_UInt32)hi << 18 ) | ( l >> 14 ) ); } -#endif /* TT_DotFix14 */ +#endif /* !FT_INT64 */ /************************************************************************** @@ -1534,31 +1394,6 @@ /************************************************************************** * * @Function: - * GetShortIns - * - * @Description: - * Returns a short integer taken from the instruction stream at - * address IP. - * - * @Return: - * Short read at code[IP]. - * - * @Note: - * This one could become a macro. - */ - static FT_Short - GetShortIns( TT_ExecContext exc ) - { - /* Reading a byte stream so there is no endianness (DaveP) */ - exc->IP += 2; - return (FT_Short)( ( exc->code[exc->IP - 2] << 8 ) + - exc->code[exc->IP - 1] ); - } - - - /************************************************************************** - * - * @Function: * Ins_Goto_CodeRange * * @Description: @@ -1609,6 +1444,7 @@ exc->code = range->base; exc->codeSize = range->size; exc->IP = aIP; + exc->length = 0; exc->curRange = aRange; return SUCCESS; @@ -1671,48 +1507,33 @@ FT_UShort point, FT_F26Dot6 distance ) { - FT_F26Dot6 v; + FT_Fixed v; - v = exc->GS.freeVector.x; - + v = exc->moveVector.x; if ( v != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL /* Exception to the post-IUP curfew: Allow the x component of */ /* diagonal moves, but only post-IUP. DejaVu tries to adjust */ /* diagonal stems like on `Z' and `z' post-IUP. */ - if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility ) - zone->cur[point].x = ADD_LONG( zone->cur[point].x, - FT_MulDiv( distance, - v, - exc->F_dot_P ) ); - else + if ( !exc->backward_compatibility ) #endif - - if ( NO_SUBPIXEL_HINTING ) zone->cur[point].x = ADD_LONG( zone->cur[point].x, - FT_MulDiv( distance, - v, - exc->F_dot_P ) ); + FT_MulFix( distance, v ) ); zone->tags[point] |= FT_CURVE_TAG_TOUCH_X; } - v = exc->GS.freeVector.y; - + v = exc->moveVector.y; if ( v != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility && - exc->iupx_called && - exc->iupy_called ) ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( exc->backward_compatibility != 0x7 ) #endif zone->cur[point].y = ADD_LONG( zone->cur[point].y, - FT_MulDiv( distance, - v, - exc->F_dot_P ) ); + FT_MulFix( distance, v ) ); zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y; } @@ -1745,24 +1566,20 @@ FT_UShort point, FT_F26Dot6 distance ) { - FT_F26Dot6 v; + FT_Fixed v; - v = exc->GS.freeVector.x; + v = exc->moveVector.x; if ( v != 0 ) zone->org[point].x = ADD_LONG( zone->org[point].x, - FT_MulDiv( distance, - v, - exc->F_dot_P ) ); + FT_MulFix( distance, v ) ); - v = exc->GS.freeVector.y; + v = exc->moveVector.y; if ( v != 0 ) zone->org[point].y = ADD_LONG( zone->org[point].y, - FT_MulDiv( distance, - v, - exc->F_dot_P ) ); + FT_MulFix( distance, v ) ); } @@ -1784,12 +1601,8 @@ FT_F26Dot6 distance ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility ) - zone->cur[point].x = ADD_LONG( zone->cur[point].x, distance ); - else + if ( !exc->backward_compatibility ) #endif - - if ( NO_SUBPIXEL_HINTING ) zone->cur[point].x = ADD_LONG( zone->cur[point].x, distance ); zone->tags[point] |= FT_CURVE_TAG_TOUCH_X; @@ -1805,9 +1618,8 @@ FT_UNUSED( exc ); #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility && - exc->iupx_called && exc->iupy_called ) ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( exc->backward_compatibility != 0x7 ) #endif zone->cur[point].y = ADD_LONG( zone->cur[point].y, distance ); @@ -1860,8 +1672,8 @@ * distance :: * The distance (not) to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * The compensated distance. @@ -1869,10 +1681,10 @@ static FT_F26Dot6 Round_None( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; + FT_UNUSED( exc ); if ( distance >= 0 ) @@ -1903,8 +1715,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -1912,10 +1724,10 @@ static FT_F26Dot6 Round_To_Grid( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; + FT_UNUSED( exc ); if ( distance >= 0 ) @@ -1948,8 +1760,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -1957,10 +1769,10 @@ static FT_F26Dot6 Round_To_Half_Grid( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; + FT_UNUSED( exc ); if ( distance >= 0 ) @@ -1995,8 +1807,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -2004,10 +1816,10 @@ static FT_F26Dot6 Round_Down_To_Grid( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; + FT_UNUSED( exc ); if ( distance >= 0 ) @@ -2039,8 +1851,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -2048,10 +1860,10 @@ static FT_F26Dot6 Round_Up_To_Grid( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; + FT_UNUSED( exc ); if ( distance >= 0 ) @@ -2084,8 +1896,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -2093,10 +1905,10 @@ static FT_F26Dot6 Round_To_Double_Grid( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; + FT_UNUSED( exc ); if ( distance >= 0 ) @@ -2129,8 +1941,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -2144,9 +1956,8 @@ static FT_F26Dot6 Round_Super( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; @@ -2185,8 +1996,8 @@ * distance :: * The distance to round. * - * color :: - * The engine compensation color. + * compensation :: + * The engine compensation. * * @Return: * Rounded distance. @@ -2198,9 +2009,8 @@ static FT_F26Dot6 Round_Super_45( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ) + FT_F26Dot6 compensation ) { - FT_F26Dot6 compensation = exc->tt_metrics.compensations[color]; FT_F26Dot6 val; @@ -2230,59 +2040,6 @@ /************************************************************************** * * @Function: - * Compute_Round - * - * @Description: - * Sets the rounding mode. - * - * @Input: - * round_mode :: - * The rounding mode to be used. - */ - static void - Compute_Round( TT_ExecContext exc, - FT_Byte round_mode ) - { - switch ( round_mode ) - { - case TT_Round_Off: - exc->func_round = (TT_Round_Func)Round_None; - break; - - case TT_Round_To_Grid: - exc->func_round = (TT_Round_Func)Round_To_Grid; - break; - - case TT_Round_Up_To_Grid: - exc->func_round = (TT_Round_Func)Round_Up_To_Grid; - break; - - case TT_Round_Down_To_Grid: - exc->func_round = (TT_Round_Func)Round_Down_To_Grid; - break; - - case TT_Round_To_Half_Grid: - exc->func_round = (TT_Round_Func)Round_To_Half_Grid; - break; - - case TT_Round_To_Double_Grid: - exc->func_round = (TT_Round_Func)Round_To_Double_Grid; - break; - - case TT_Round_Super: - exc->func_round = (TT_Round_Func)Round_Super; - break; - - case TT_Round_Super_45: - exc->func_round = (TT_Round_Func)Round_Super_45; - break; - } - } - - - /************************************************************************** - * - * @Function: * SetSuperRound * * @Description: @@ -2481,14 +2238,45 @@ static void Compute_Funcs( TT_ExecContext exc ) { - if ( exc->GS.freeVector.x == 0x4000 ) - exc->F_dot_P = exc->GS.projVector.x; - else if ( exc->GS.freeVector.y == 0x4000 ) - exc->F_dot_P = exc->GS.projVector.y; - else - exc->F_dot_P = - ( (FT_Long)exc->GS.projVector.x * exc->GS.freeVector.x + - (FT_Long)exc->GS.projVector.y * exc->GS.freeVector.y ) >> 14; + FT_Long F_dot_P = + ( (FT_Long)exc->GS.projVector.x * exc->GS.freeVector.x + + (FT_Long)exc->GS.projVector.y * exc->GS.freeVector.y + + 0x2000L ) >> 14; + + + if ( F_dot_P >= 0x3FFEL ) + { + /* commonly collinear */ + exc->moveVector.x = exc->GS.freeVector.x * 4; + exc->moveVector.y = exc->GS.freeVector.y * 4; + } + else if ( -0x400L < F_dot_P && F_dot_P < 0x400L ) + { + /* prohibitively orthogonal */ + exc->moveVector.x = 0; + exc->moveVector.y = 0; + } + else + { + exc->moveVector.x = exc->GS.freeVector.x * 0x10000L / F_dot_P; + exc->moveVector.y = exc->GS.freeVector.y * 0x10000L / F_dot_P; + } + + if ( F_dot_P >= 0x3FFEL && exc->GS.freeVector.x == 0x4000 ) + { + exc->func_move = (TT_Move_Func)Direct_Move_X; + exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig_X; + } + else if ( F_dot_P >= 0x3FFEL && exc->GS.freeVector.y == 0x4000 ) + { + exc->func_move = (TT_Move_Func)Direct_Move_Y; + exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y; + } + else + { + exc->func_move = (TT_Move_Func)Direct_Move; + exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig; + } if ( exc->GS.projVector.x == 0x4000 ) exc->func_project = (TT_Project_Func)Project_x; @@ -2504,29 +2292,6 @@ else exc->func_dualproj = (TT_Project_Func)Dual_Project; - exc->func_move = (TT_Move_Func)Direct_Move; - exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig; - - if ( exc->F_dot_P == 0x4000L ) - { - if ( exc->GS.freeVector.x == 0x4000 ) - { - exc->func_move = (TT_Move_Func)Direct_Move_X; - exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig_X; - } - else if ( exc->GS.freeVector.y == 0x4000 ) - { - exc->func_move = (TT_Move_Func)Direct_Move_Y; - exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y; - } - } - - /* at small sizes, F_dot_P can become too small, resulting */ - /* in overflows and `spikes' in a number of glyphs like `w'. */ - - if ( FT_ABS( exc->F_dot_P ) < 0x400L ) - exc->F_dot_P = 0x4000L; - /* Disable cached aspect ratio */ exc->tt_metrics.ratio = 0; } @@ -2799,7 +2564,7 @@ Ins_ODD( TT_ExecContext exc, FT_Long* args ) { - args[0] = ( ( exc->func_round( exc, args[0], 3 ) & 127 ) == 64 ); + args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 64 ) == 64 ); } @@ -2813,7 +2578,7 @@ Ins_EVEN( TT_ExecContext exc, FT_Long* args ) { - args[0] = ( ( exc->func_round( exc, args[0], 3 ) & 127 ) == 0 ); + args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 64 ) == 0 ); } @@ -3020,7 +2785,7 @@ FT_MEM_QRENEW_ARRAY( exc->glyfStorage, exc->glyfStoreSize, exc->storeSize ); - exc->error = error; + exc->error = error; if ( error ) return; @@ -3143,7 +2908,8 @@ Ins_ROUND( TT_ExecContext exc, FT_Long* args ) { - args[0] = exc->func_round( exc, args[0], exc->opcode & 3 ); + args[0] = exc->func_round( exc, args[0], + exc->GS.compensation[exc->opcode & 3] ); } @@ -3157,7 +2923,8 @@ Ins_NROUND( TT_ExecContext exc, FT_Long* args ) { - args[0] = Round_None( exc, args[0], exc->opcode & 3 ); + args[0] = Round_None( exc, args[0], + exc->GS.compensation[exc->opcode & 3] ); } @@ -3211,13 +2978,11 @@ } else { - K = exc->stack[exc->args - L]; + K = args[-L]; - FT_ARRAY_MOVE( &exc->stack[exc->args - L ], - &exc->stack[exc->args - L + 1], - ( L - 1 ) ); + FT_ARRAY_MOVE( args - L, args - L + 1, L - 1 ); - exc->stack[exc->args - 1] = K; + args[-1] = K; } } @@ -3244,7 +3009,7 @@ args[0] = 0; } else - args[0] = exc->stack[exc->args - L]; + args[0] = args[-L]; } @@ -3314,8 +3079,7 @@ exc->length = 2 - exc->length * exc->code[exc->IP + 1]; } - if ( exc->IP + exc->length <= exc->codeSize ) - return SUCCESS; + return SUCCESS; } Fail_Overflow: @@ -3363,6 +3127,9 @@ nIfs--; Out = FT_BOOL( nIfs == 0 ); break; + + default: + break; } } while ( Out == 0 ); } @@ -3396,6 +3163,9 @@ case 0x59: /* EIF */ nIfs--; break; + + default: + break; } } while ( nIfs != 0 ); } @@ -3439,7 +3209,7 @@ return; } - exc->step_ins = FALSE; + exc->length = 0; if ( args[0] < 0 ) { @@ -3540,10 +3310,10 @@ return; } - rec->range = exc->curRange; - rec->opc = (FT_UInt16)n; - rec->start = exc->IP + 1; - rec->active = TRUE; + rec->range = exc->curRange; + rec->opc = (FT_UInt16)n; + rec->start = exc->IP + 1; + rec->active = TRUE; if ( n > exc->maxFunc ) exc->maxFunc = (FT_UInt16)n; @@ -3555,14 +3325,17 @@ { switch ( exc->opcode ) { - case 0x89: /* IDEF */ - case 0x2C: /* FDEF */ + case 0x89: /* IDEF */ + case 0x2C: /* FDEF */ exc->error = FT_THROW( Nested_DEFS ); return; case 0x2D: /* ENDF */ rec->end = exc->IP; return; + + default: + break; } } } @@ -3592,12 +3365,11 @@ pRec->Cur_Count--; - exc->step_ins = FALSE; - if ( pRec->Cur_Count > 0 ) { exc->callTop++; - exc->IP = pRec->Def->start; + exc->IP = pRec->Def->start; + exc->length = 0; } else /* Loop through the current function */ @@ -3685,8 +3457,6 @@ Ins_Goto_CodeRange( exc, def->range, def->start ); - exc->step_ins = FALSE; - return; Fail: @@ -3764,8 +3534,6 @@ Ins_Goto_CodeRange( exc, def->range, def->start ); - exc->step_ins = FALSE; - exc->loopcall_counter += (FT_ULong)args[0]; if ( exc->loopcall_counter > exc->loopcall_counter_max ) exc->error = FT_THROW( Execution_Too_Long ); @@ -3845,9 +3613,13 @@ case 0x2C: /* FDEF */ exc->error = FT_THROW( Nested_DEFS ); return; + case 0x2D: /* ENDF */ def->end = exc->IP; return; + + default: + break; } } } @@ -3870,10 +3642,23 @@ Ins_NPUSHB( TT_ExecContext exc, FT_Long* args ) { - FT_UShort L, K; + FT_Long IP = exc->IP; + FT_Int L, K; - L = (FT_UShort)exc->code[exc->IP + 1]; + if ( ++IP >= exc->codeSize ) + { + exc->error = FT_THROW( Code_Overflow ); + return; + } + + L = exc->code[IP]; + + if ( IP + L >= exc->codeSize ) + { + exc->error = FT_THROW( Code_Overflow ); + return; + } if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) { @@ -3881,10 +3666,11 @@ return; } - for ( K = 1; K <= L; K++ ) - args[K - 1] = exc->code[exc->IP + K + 1]; + for ( K = 0; K < L; K++ ) + args[K] = exc->code[++IP]; exc->new_top += L; + exc->IP = IP; } @@ -3898,10 +3684,23 @@ Ins_NPUSHW( TT_ExecContext exc, FT_Long* args ) { - FT_UShort L, K; + FT_Long IP = exc->IP; + FT_Int L, K; - L = (FT_UShort)exc->code[exc->IP + 1]; + if ( ++IP >= exc->codeSize ) + { + exc->error = FT_THROW( Code_Overflow ); + return; + } + + L = exc->code[IP]; + + if ( IP + 2 * L >= exc->codeSize ) + { + exc->error = FT_THROW( Code_Overflow ); + return; + } if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) { @@ -3909,13 +3708,12 @@ return; } - exc->IP += 2; - - for ( K = 0; K < L; K++ ) - args[K] = GetShortIns( exc ); + /* note casting for sign-extension */ + for ( K = 0; K < L; K++, IP += 2 ) + args[K] = (FT_Short)( exc->code[IP + 1] << 8 ) | exc->code[IP + 2]; - exc->step_ins = FALSE; exc->new_top += L; + exc->IP = IP; } @@ -3929,10 +3727,17 @@ Ins_PUSHB( TT_ExecContext exc, FT_Long* args ) { - FT_UShort L, K; + FT_Long IP = exc->IP; + FT_Int L, K; - L = (FT_UShort)( exc->opcode - 0xB0 + 1 ); + L = exc->opcode - 0xB0 + 1; + + if ( IP + L >= exc->codeSize ) + { + exc->error = FT_THROW( Code_Overflow ); + return; + } if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) { @@ -3940,8 +3745,10 @@ return; } - for ( K = 1; K <= L; K++ ) - args[K - 1] = exc->code[exc->IP + K]; + for ( K = 0; K < L; K++ ) + args[K] = exc->code[++IP]; + + exc->IP = IP; } @@ -3955,10 +3762,17 @@ Ins_PUSHW( TT_ExecContext exc, FT_Long* args ) { - FT_UShort L, K; + FT_Long IP = exc->IP; + FT_Int L, K; - L = (FT_UShort)( exc->opcode - 0xB8 + 1 ); + L = exc->opcode - 0xB8 + 1; + + if ( IP + 2 * L >= exc->codeSize ) + { + exc->error = FT_THROW( Code_Overflow ); + return; + } if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) { @@ -3966,12 +3780,11 @@ return; } - exc->IP++; - - for ( K = 0; K < L; K++ ) - args[K] = GetShortIns( exc ); + /* note casting for sign-extension */ + for ( K = 0; K < L; K++, IP += 2 ) + args[K] = (FT_Short)( exc->code[IP + 1] << 8 ) | exc->code[IP + 2]; - exc->step_ins = FALSE; + exc->IP = IP; } @@ -4142,15 +3955,12 @@ Ins_SPVFS( TT_ExecContext exc, FT_Long* args ) { - FT_Short S; FT_Long X, Y; /* Only use low 16bits, then sign extend */ - S = (FT_Short)args[1]; - Y = (FT_Long)S; - S = (FT_Short)args[0]; - X = (FT_Long)S; + Y = (FT_Short)args[1]; + X = (FT_Short)args[0]; Normalize( X, Y, &exc->GS.projVector ); @@ -4169,15 +3979,12 @@ Ins_SFVFS( TT_ExecContext exc, FT_Long* args ) { - FT_Short S; FT_Long X, Y; /* Only use low 16bits, then sign extend */ - S = (FT_Short)args[1]; - Y = (FT_Long)S; - S = (FT_Short)args[0]; - X = S; + Y = (FT_Short)args[1]; + X = (FT_Short)args[0]; Normalize( X, Y, &exc->GS.freeVector ); Compute_Funcs( exc ); @@ -4915,7 +4722,7 @@ /* compatibility hacks and lets them program points to the grid like */ /* it's 1996. They might sign a waiver for just one glyph, though. */ if ( SUBPIXEL_HINTING_MINIMAL ) - exc->backward_compatibility = !FT_BOOL( L == 4 ); + exc->backward_compatibility = ( L & 4 ) ^ 4; #endif } else if ( exc->pedantic_hinting ) @@ -4999,32 +4806,31 @@ * Stack: uint32... --> */ static void - Ins_FLIPPT( TT_ExecContext exc ) + Ins_FLIPPT( TT_ExecContext exc, + FT_Long* args ) { + FT_Long loop = exc->GS.loop; FT_UShort point; -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backward compatibility mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility && - exc->iupx_called && - exc->iupy_called ) - goto Fail; -#endif - - if ( exc->top < exc->GS.loop ) + if ( exc->new_top < loop ) { if ( exc->pedantic_hinting ) exc->error = FT_THROW( Too_Few_Arguments ); goto Fail; } - while ( exc->GS.loop > 0 ) - { - exc->args--; + exc->new_top -= loop; - point = (FT_UShort)exc->stack[exc->args]; +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( exc->backward_compatibility == 0x7 ) + goto Fail; +#endif + + while ( loop-- ) + { + point = (FT_UShort)*(--args); if ( BOUNDS( point, exc->pts.n_points ) ) { @@ -5036,13 +4842,10 @@ } else exc->pts.tags[point] ^= FT_CURVE_TAG_ON; - - exc->GS.loop--; } Fail: exc->GS.loop = 1; - exc->new_top = exc->args; } @@ -5061,10 +4864,7 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL /* See `ttinterp.h' for details on backward compatibility mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility && - exc->iupx_called && - exc->iupy_called ) + if ( exc->backward_compatibility == 0x7 ) return; #endif @@ -5099,10 +4899,7 @@ #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL /* See `ttinterp.h' for details on backward compatibility mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility && - exc->iupx_called && - exc->iupy_called ) + if ( exc->backward_compatibility == 0x7 ) return; #endif @@ -5158,8 +4955,8 @@ d = PROJECT( zp.cur + p, zp.org + p ); - *x = FT_MulDiv( d, (FT_Long)exc->GS.freeVector.x, exc->F_dot_P ); - *y = FT_MulDiv( d, (FT_Long)exc->GS.freeVector.y, exc->F_dot_P ); + *x = FT_MulFix( d, exc->moveVector.x ); + *y = FT_MulFix( d, exc->moveVector.y ); return SUCCESS; } @@ -5176,8 +4973,8 @@ if ( exc->GS.freeVector.x != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility ) ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( !exc->backward_compatibility ) #endif exc->zp2.cur[point].x = ADD_LONG( exc->zp2.cur[point].x, dx ); @@ -5188,10 +4985,8 @@ if ( exc->GS.freeVector.y != 0 ) { #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( !( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility && - exc->iupx_called && - exc->iupy_called ) ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( exc->backward_compatibility != 0x7 ) #endif exc->zp2.cur[point].y = ADD_LONG( exc->zp2.cur[point].y, dy ); @@ -5208,8 +5003,10 @@ * Stack: uint32... --> */ static void - Ins_SHP( TT_ExecContext exc ) + Ins_SHP( TT_ExecContext exc, + FT_Long* args ) { + FT_Long loop = exc->GS.loop; TT_GlyphZoneRec zp; FT_UShort refp; @@ -5217,20 +5014,21 @@ FT_UShort point; - if ( exc->top < exc->GS.loop ) + if ( exc->new_top < loop ) { if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Invalid_Reference ); + exc->error = FT_THROW( Too_Few_Arguments ); goto Fail; } + exc->new_top -= loop; + if ( Compute_Point_Displacement( exc, &dx, &dy, &zp, &refp ) ) return; - while ( exc->GS.loop > 0 ) + while ( loop-- ) { - exc->args--; - point = (FT_UShort)exc->stack[exc->args]; + point = (FT_UShort)*(--args); if ( BOUNDS( point, exc->zp2.n_points ) ) { @@ -5242,13 +5040,10 @@ } else Move_Zp2_Point( exc, point, dx, dy, TRUE ); - - exc->GS.loop--; } Fail: exc->GS.loop = 1; - exc->new_top = exc->args; } @@ -5364,6 +5159,7 @@ Ins_SHPIX( TT_ExecContext exc, FT_Long* args ) { + FT_Long loop = exc->GS.loop; FT_F26Dot6 dx, dy; FT_UShort point; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL @@ -5373,22 +5169,21 @@ #endif - - if ( exc->top < exc->GS.loop + 1 ) + if ( exc->new_top < loop ) { if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Invalid_Reference ); + exc->error = FT_THROW( Too_Few_Arguments ); goto Fail; } + exc->new_top -= loop; + dx = TT_MulFix14( args[0], exc->GS.freeVector.x ); dy = TT_MulFix14( args[0], exc->GS.freeVector.y ); - while ( exc->GS.loop > 0 ) + while ( loop-- ) { - exc->args--; - - point = (FT_UShort)exc->stack[exc->args]; + point = (FT_UShort)*(--args); if ( BOUNDS( point, exc->zp2.n_points ) ) { @@ -5400,8 +5195,7 @@ } else #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility ) + if ( exc->backward_compatibility ) { /* Special case: allow SHPIX to move points in the twilight zone. */ /* Otherwise, treat SHPIX the same as DELTAP. Unbreaks various */ @@ -5409,7 +5203,7 @@ /* that would glitch severely after calling ALIGNRP after a */ /* blocked SHPIX. */ if ( in_twilight || - ( !( exc->iupx_called && exc->iupy_called ) && + ( exc->backward_compatibility != 0x7 && ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) || ( exc->zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) ) ) ) Move_Zp2_Point( exc, point, 0, dy, TRUE ); @@ -5417,13 +5211,10 @@ else #endif Move_Zp2_Point( exc, point, dx, dy, TRUE ); - - exc->GS.loop--; } Fail: exc->GS.loop = 1; - exc->new_top = exc->args; } @@ -5502,7 +5293,7 @@ if ( ( exc->opcode & 1 ) != 0 ) { cur_dist = FAST_PROJECT( &exc->zp0.cur[point] ); - distance = SUB_LONG( exc->func_round( exc, cur_dist, 3 ), cur_dist ); + distance = SUB_LONG( exc->func_round( exc, cur_dist, 0 ), cur_dist ); } else distance = 0; @@ -5566,7 +5357,7 @@ if ( exc->GS.gep0 == 0 ) /* If in twilight zone */ { exc->zp0.org[point].x = TT_MulFix14( distance, - exc->GS.freeVector.x ); + exc->GS.freeVector.x ); exc->zp0.org[point].y = TT_MulFix14( distance, exc->GS.freeVector.y ); exc->zp0.cur[point] = exc->zp0.org[point]; @@ -5587,7 +5378,7 @@ if ( delta > control_value_cutin ) distance = org_dist; - distance = exc->func_round( exc, distance, 3 ); + distance = exc->func_round( exc, distance, 0 ); } exc->func_move( exc, &exc->zp0, point, SUB_LONG( distance, org_dist ) ); @@ -5609,7 +5400,7 @@ FT_Long* args ) { FT_UShort point = 0; - FT_F26Dot6 org_dist, distance; + FT_F26Dot6 org_dist, distance, compensation; point = (FT_UShort)args[0]; @@ -5664,11 +5455,11 @@ /* single width cut-in test */ /* |org_dist - single_width_value| < single_width_cutin */ - if ( exc->GS.single_width_cutin > 0 && - org_dist < exc->GS.single_width_value + - exc->GS.single_width_cutin && - org_dist > exc->GS.single_width_value - - exc->GS.single_width_cutin ) + if ( exc->GS.single_width_cutin > 0 && + org_dist < ADD_LONG( exc->GS.single_width_value, + exc->GS.single_width_cutin ) && + org_dist > SUB_LONG( exc->GS.single_width_value, + exc->GS.single_width_cutin ) ) { if ( org_dist >= 0 ) org_dist = exc->GS.single_width_value; @@ -5678,12 +5469,12 @@ /* round flag */ + compensation = exc->GS.compensation[exc->opcode & 3]; + if ( ( exc->opcode & 4 ) != 0 ) - { - distance = exc->func_round( exc, org_dist, exc->opcode & 3 ); - } + distance = exc->func_round( exc, org_dist, compensation ); else - distance = Round_None( exc, org_dist, exc->opcode & 3 ); + distance = Round_None( exc, org_dist, compensation ); /* minimum distance flag */ @@ -5735,7 +5526,8 @@ FT_F26Dot6 cvt_dist, distance, cur_dist, - org_dist; + org_dist, + compensation; FT_F26Dot6 delta; @@ -5801,6 +5593,8 @@ /* control value cut-in and round */ + compensation = exc->GS.compensation[exc->opcode & 3]; + if ( ( exc->opcode & 4 ) != 0 ) { /* XXX: UNDOCUMENTED! Only perform cut-in test when both points */ @@ -5831,16 +5625,16 @@ cvt_dist = org_dist; } - distance = exc->func_round( exc, cvt_dist, exc->opcode & 3 ); + distance = exc->func_round( exc, cvt_dist, compensation ); } else - distance = Round_None( exc, cvt_dist, exc->opcode & 3 ); + distance = Round_None( exc, cvt_dist, compensation ); /* minimum distance test */ if ( ( exc->opcode & 8 ) != 0 ) { - FT_F26Dot6 minimum_distance = exc->GS.minimum_distance; + FT_F26Dot6 minimum_distance = exc->GS.minimum_distance; if ( org_dist >= 0 ) @@ -5862,11 +5656,10 @@ Fail: exc->GS.rp1 = exc->GS.rp0; + exc->GS.rp2 = point; if ( ( exc->opcode & 16 ) != 0 ) exc->GS.rp0 = point; - - exc->GS.rp2 = point; } @@ -5877,25 +5670,33 @@ * Stack: uint32 uint32... --> */ static void - Ins_ALIGNRP( TT_ExecContext exc ) + Ins_ALIGNRP( TT_ExecContext exc, + FT_Long* args ) { + FT_Long loop = exc->GS.loop; FT_UShort point; FT_F26Dot6 distance; - if ( exc->top < exc->GS.loop || - BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) + if ( exc->new_top < loop ) { if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Invalid_Reference ); + exc->error = FT_THROW( Too_Few_Arguments ); goto Fail; } - while ( exc->GS.loop > 0 ) + exc->new_top -= loop; + + if ( BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) { - exc->args--; + if ( exc->pedantic_hinting ) + exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } - point = (FT_UShort)exc->stack[exc->args]; + while ( loop-- ) + { + point = (FT_UShort)*(--args); if ( BOUNDS( point, exc->zp1.n_points ) ) { @@ -5912,13 +5713,10 @@ exc->func_move( exc, &exc->zp1, point, NEG_LONG( distance ) ); } - - exc->GS.loop--; } Fail: exc->GS.loop = 1; - exc->new_top = exc->args; } @@ -6060,15 +5858,26 @@ /* SOMETIMES, DUMBER CODE IS BETTER CODE */ static void - Ins_IP( TT_ExecContext exc ) + Ins_IP( TT_ExecContext exc, + FT_Long* args ) { + FT_Long loop = exc->GS.loop; FT_F26Dot6 old_range, cur_range; FT_Vector* orus_base; FT_Vector* cur_base; FT_Int twilight; - if ( exc->top < exc->GS.loop ) + if ( exc->new_top < loop ) + { + if ( exc->pedantic_hinting ) + exc->error = FT_THROW( Too_Few_Arguments ); + goto Fail; + } + + exc->new_top -= loop; + + if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) ) { if ( exc->pedantic_hinting ) exc->error = FT_THROW( Invalid_Reference ); @@ -6084,13 +5893,6 @@ exc->GS.gep1 == 0 || exc->GS.gep2 == 0 ); - if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) ) - { - if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Invalid_Reference ); - goto Fail; - } - if ( twilight ) orus_base = &exc->zp0.org[exc->GS.rp1]; else @@ -6102,8 +5904,7 @@ /* fonts out there (e.g. [aeu]grave in monotype.ttf) */ /* calling IP[] with bad values of rp[12]. */ /* Do something sane when this odd thing happens. */ - if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) || - BOUNDS( exc->GS.rp2, exc->zp1.n_points ) ) + if ( BOUNDS( exc->GS.rp2, exc->zp1.n_points ) ) { old_range = 0; cur_range = 0; @@ -6132,9 +5933,9 @@ cur_range = PROJECT( &exc->zp1.cur[exc->GS.rp2], cur_base ); } - for ( ; exc->GS.loop > 0; exc->GS.loop-- ) + while ( loop-- ) { - FT_UInt point = (FT_UInt)exc->stack[--exc->args]; + FT_UInt point = (FT_UInt)*(--args); FT_F26Dot6 org_dist, cur_dist, new_dist; @@ -6206,7 +6007,6 @@ Fail: exc->GS.loop = 1; - exc->new_top = exc->args; } @@ -6405,17 +6205,10 @@ /* See `ttinterp.h' for details on backward compatibility mode. */ /* Allow IUP until it has been called on both axes. Immediately */ /* return on subsequent ones. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility ) - { - if ( exc->iupx_called && exc->iupy_called ) - return; - - if ( exc->opcode & 1 ) - exc->iupx_called = TRUE; - else - exc->iupy_called = TRUE; - } + if ( exc->backward_compatibility == 0x7 ) + return; + else if ( exc->backward_compatibility ) + exc->backward_compatibility |= 1 << ( exc->opcode & 1 ); #endif /* ignore empty outlines */ @@ -6507,30 +6300,50 @@ Ins_DELTAP( TT_ExecContext exc, FT_Long* args ) { - FT_ULong nump, k; + FT_Long nump; FT_UShort A; - FT_ULong C, P; - FT_Long B; + FT_Long B, P, F; - P = (FT_ULong)exc->func_cur_ppem( exc ); - nump = (FT_ULong)args[0]; /* some points theoretically may occur more - than once, thus UShort isn't enough */ + nump = args[0]; /* signed value for convenience */ - for ( k = 1; k <= nump; k++ ) + if ( nump < 0 || nump > exc->new_top / 2 ) { - if ( exc->args < 2 ) - { - if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Too_Few_Arguments ); - exc->args = 0; - goto Fail; - } + if ( exc->pedantic_hinting ) + exc->error = FT_THROW( Too_Few_Arguments ); - exc->args -= 2; + nump = exc->new_top / 2; + } + + exc->new_top -= 2 * nump; + + P = exc->func_cur_ppem( exc ) - exc->GS.delta_base; - A = (FT_UShort)exc->stack[exc->args + 1]; - B = exc->stack[exc->args]; + switch ( exc->opcode ) + { + case 0x5D: + break; + + case 0x71: + P -= 16; + break; + + case 0x72: + P -= 32; + break; + } + + /* check applicable range of adjusted ppem */ + if ( P & ~0xF ) /* P < 0 || P > 15 */ + return; + + P <<= 4; + F = 1L << ( 6 - exc->GS.delta_shift ); + + while ( nump-- ) + { + A = (FT_UShort)*(--args); + B = *(--args); /* XXX: Because some popular fonts contain some invalid DeltaP */ /* instructions, we simply ignore them when the stacked */ @@ -6538,41 +6351,28 @@ /* error. As a delta instruction doesn't change a glyph */ /* in great ways, this shouldn't be a problem. */ - if ( !BOUNDS( A, exc->zp0.n_points ) ) + if ( BOUNDS( A, exc->zp0.n_points ) ) { - C = ( (FT_ULong)B & 0xF0 ) >> 4; - - switch ( exc->opcode ) + if ( exc->pedantic_hinting ) { - case 0x5D: - break; - - case 0x71: - C += 16; - break; - - case 0x72: - C += 32; - break; + exc->error = FT_THROW( Invalid_Reference ); + return; } - - C += exc->GS.delta_base; - - if ( P == C ) + } + else + { + if ( ( B & 0xF0 ) == P ) { - B = ( (FT_ULong)B & 0xF ) - 8; + B = ( B & 0xF ) - 8; if ( B >= 0 ) B++; - B *= 1L << ( 6 - exc->GS.delta_shift ); - + B *= F; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - /* See `ttinterp.h' for details on backward compatibility */ - /* mode. */ - if ( SUBPIXEL_HINTING_MINIMAL && - exc->backward_compatibility ) + /* See `ttinterp.h' for details on backward compatibility mode. */ + if ( exc->backward_compatibility ) { - if ( !( exc->iupx_called && exc->iupy_called ) && + if ( exc->backward_compatibility != 0x7 && ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) || ( exc->zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) ) exc->func_move( exc, &exc->zp0, A, B ); @@ -6582,13 +6382,7 @@ exc->func_move( exc, &exc->zp0, A, B ); } } - else - if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Invalid_Reference ); } - - Fail: - exc->new_top = exc->args; } @@ -6602,28 +6396,50 @@ Ins_DELTAC( TT_ExecContext exc, FT_Long* args ) { - FT_ULong nump, k; - FT_ULong A, C, P; - FT_Long B; + FT_Long nump; + FT_ULong A; + FT_Long B, P, F; - P = (FT_ULong)exc->func_cur_ppem( exc ); - nump = (FT_ULong)args[0]; + nump = args[0]; /* signed value for convenience */ - for ( k = 1; k <= nump; k++ ) + if ( nump < 0 || nump > exc->new_top / 2 ) { - if ( exc->args < 2 ) - { - if ( exc->pedantic_hinting ) - exc->error = FT_THROW( Too_Few_Arguments ); - exc->args = 0; - goto Fail; - } + if ( exc->pedantic_hinting ) + exc->error = FT_THROW( Too_Few_Arguments ); - exc->args -= 2; + nump = exc->new_top / 2; + } + + exc->new_top -= 2 * nump; + + P = exc->func_cur_ppem( exc ) - exc->GS.delta_base; - A = (FT_ULong)exc->stack[exc->args + 1]; - B = exc->stack[exc->args]; + switch ( exc->opcode ) + { + case 0x73: + break; + + case 0x74: + P -= 16; + break; + + case 0x75: + P -= 32; + break; + } + + /* check applicable range of adjusted ppem */ + if ( P & ~0xF ) /* P < 0 || P > 15 */ + return; + + P <<= 4; + F = 1L << ( 6 - exc->GS.delta_shift ); + + while ( nump-- ) + { + A = (FT_ULong)*(--args); + B = *(--args); if ( BOUNDSL( A, exc->cvtSize ) ) { @@ -6635,38 +6451,17 @@ } else { - C = ( (FT_ULong)B & 0xF0 ) >> 4; - - switch ( exc->opcode ) + if ( ( B & 0xF0 ) == P ) { - case 0x73: - break; - - case 0x74: - C += 16; - break; - - case 0x75: - C += 32; - break; - } - - C += exc->GS.delta_base; - - if ( P == C ) - { - B = ( (FT_ULong)B & 0xF ) - 8; + B = ( B & 0xF ) - 8; if ( B >= 0 ) B++; - B *= 1L << ( 6 - exc->GS.delta_shift ); + B *= F; exc->func_move_cvt( exc, A, B ); } } } - - Fail: - exc->new_top = exc->args; } @@ -6736,7 +6531,7 @@ /* Otherwise, instructions may behave weirdly and rendering results */ /* may differ between v35 and v40 mode, e.g., in `Times New Roman */ /* Bold Italic'. */ - if ( SUBPIXEL_HINTING_MINIMAL && exc->subpixel_hinting_lean ) + if ( SUBPIXEL_HINTING_MINIMAL && exc->mode != FT_RENDER_MODE_MONO ) { /********************************* * HINTING FOR SUBPIXEL @@ -6753,7 +6548,7 @@ * Selector Bit: 8 * Return Bit(s): 15 */ - if ( ( args[0] & 256 ) != 0 && exc->vertical_lcd_lean ) + if ( ( args[0] & 256 ) != 0 && exc->mode == FT_RENDER_MODE_LCD_V ) K |= 1 << 15; /********************************* @@ -6774,7 +6569,7 @@ * The only smoothing method FreeType supports unless someone sets * FT_LOAD_TARGET_MONO. */ - if ( ( args[0] & 2048 ) != 0 && exc->subpixel_hinting_lean ) + if ( ( args[0] & 2048 ) != 0 && exc->mode != FT_RENDER_MODE_MONO ) K |= 1 << 18; /********************************* @@ -6786,7 +6581,10 @@ * Grayscale rendering is what FreeType does anyway unless someone * sets FT_LOAD_TARGET_MONO or FT_LOAD_TARGET_LCD(_V) */ - if ( ( args[0] & 4096 ) != 0 && exc->grayscale_cleartype ) + if ( ( args[0] & 4096 ) != 0 && + exc->mode != FT_RENDER_MODE_MONO && + exc->mode != FT_RENDER_MODE_LCD && + exc->mode != FT_RENDER_MODE_LCD_V ) K |= 1 << 19; } #endif @@ -6833,6 +6631,8 @@ for ( i = 0; i < num_axes; i++ ) args[i] = 0; } + + exc->new_top += num_axes; } @@ -6883,7 +6683,6 @@ Ins_Goto_CodeRange( exc, def->range, def->start ); - exc->step_ins = FALSE; return; } } @@ -6928,96 +6727,22 @@ TT_RunIns( void* exec ) { TT_ExecContext exc = (TT_ExecContext)exec; + FT_ULong ins_counter = 0; - FT_ULong ins_counter = 0; /* executed instructions counter */ - FT_ULong num_twilight_points; - FT_UShort i; - - - /* We restrict the number of twilight points to a reasonable, */ - /* heuristic value to avoid slow execution of malformed bytecode. */ - num_twilight_points = FT_MAX( 30, - 2 * ( exc->pts.n_points + exc->cvtSize ) ); - if ( exc->twilight.n_points > num_twilight_points ) - { - if ( num_twilight_points > 0xFFFFU ) - num_twilight_points = 0xFFFFU; - - FT_TRACE5(( "TT_RunIns: Resetting number of twilight points\n" )); - FT_TRACE5(( " from %d to the more reasonable value %ld\n", - exc->twilight.n_points, - num_twilight_points )); - exc->twilight.n_points = (FT_UShort)num_twilight_points; - } - - /* Set up loop detectors. We restrict the number of LOOPCALL loops */ - /* and the number of JMPR, JROT, and JROF calls with a negative */ - /* argument to values that depend on various parameters like the */ - /* size of the CVT table or the number of points in the current */ - /* glyph (if applicable). */ - /* */ - /* The idea is that in real-world bytecode you either iterate over */ - /* all CVT entries (in the `prep' table), or over all points (or */ - /* contours, in the `glyf' table) of a glyph, and such iterations */ - /* don't happen very often. */ - exc->loopcall_counter = 0; - exc->neg_jump_counter = 0; - - /* The maximum values are heuristic. */ - if ( exc->pts.n_points ) - exc->loopcall_counter_max = FT_MAX( 50, - 10 * exc->pts.n_points ) + - FT_MAX( 50, - exc->cvtSize / 10 ); - else - exc->loopcall_counter_max = 300 + 22 * exc->cvtSize; - - /* as a protection against an unreasonable number of CVT entries */ - /* we assume at most 100 control values per glyph for the counter */ - if ( exc->loopcall_counter_max > - 100 * (FT_ULong)exc->face->root.num_glyphs ) - exc->loopcall_counter_max = 100 * (FT_ULong)exc->face->root.num_glyphs; - - FT_TRACE5(( "TT_RunIns: Limiting total number of loops in LOOPCALL" - " to %ld\n", exc->loopcall_counter_max )); - - exc->neg_jump_counter_max = exc->loopcall_counter_max; - FT_TRACE5(( "TT_RunIns: Limiting total number of backward jumps" - " to %ld\n", exc->neg_jump_counter_max )); - - /* set PPEM and CVT functions */ - exc->tt_metrics.ratio = 0; - if ( exc->metrics.x_ppem != exc->metrics.y_ppem ) - { - /* non-square pixels, use the stretched routines */ - exc->func_cur_ppem = Current_Ppem_Stretched; - exc->func_read_cvt = Read_CVT_Stretched; - exc->func_write_cvt = Write_CVT_Stretched; - exc->func_move_cvt = Move_CVT_Stretched; - } - else - { - /* square pixels, use normal routines */ - exc->func_cur_ppem = Current_Ppem; - exc->func_read_cvt = Read_CVT; - exc->func_write_cvt = Write_CVT; - exc->func_move_cvt = Move_CVT; - } - - exc->iniRange = exc->curRange; - - Compute_Funcs( exc ); - Compute_Round( exc, (FT_Byte)exc->GS.round_state ); - - /* These flags cancel execution of some opcodes after IUP is called */ -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL - exc->iupx_called = FALSE; - exc->iupy_called = FALSE; -#endif do { + /* increment instruction counter and check if we didn't */ + /* run this program for too long (e.g. infinite loops). */ + if ( ++ins_counter > TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES ) + { + exc->error = FT_THROW( Execution_Too_Long ); + goto LErrorLabel_; + } + + exc->error = FT_Err_Ok; exc->opcode = exc->code[exc->IP]; + exc->length = 1; #ifdef FT_DEBUG_LEVEL_TRACE if ( ft_trace_levels[trace_ttinterp] >= 6 ) @@ -7041,17 +6766,6 @@ } #endif /* FT_DEBUG_LEVEL_TRACE */ - if ( ( exc->length = opcode_length[exc->opcode] ) < 0 ) - { - if ( exc->IP + 1 >= exc->codeSize ) - goto LErrorCodeOverflow_; - - exc->length = 2 - exc->length * exc->code[exc->IP + 1]; - } - - if ( exc->IP + exc->length > exc->codeSize ) - goto LErrorCodeOverflow_; - /* First, let's check for empty stack and overflow */ exc->args = exc->top - ( Pop_Push_Count[exc->opcode] >> 4 ); @@ -7059,6 +6773,9 @@ /* One can also interpret it as the index of the last argument. */ if ( exc->args < 0 ) { + FT_UShort i; + + if ( exc->pedantic_hinting ) { exc->error = FT_THROW( Too_Few_Arguments ); @@ -7071,21 +6788,7 @@ exc->args = 0; } -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - if ( exc->opcode == 0x91 ) - { - /* this is very special: GETVARIATION returns */ - /* a variable number of arguments */ - - /* it is the job of the application to `activate' GX handling, */ - /* that is, calling any of the GX API functions on the current */ - /* font to select a variation instance */ - if ( exc->face->blend ) - exc->new_top = exc->args + exc->face->blend->num_axis; - } - else -#endif - exc->new_top = exc->args + ( Pop_Push_Count[exc->opcode] & 15 ); + exc->new_top = exc->args + ( Pop_Push_Count[exc->opcode] & 15 ); /* `new_top' is the new top of the stack, after the instruction's */ /* execution. `top' will be set to `new_top' after the `switch' */ @@ -7096,9 +6799,6 @@ goto LErrorLabel_; } - exc->step_ins = TRUE; - exc->error = FT_Err_Ok; - { FT_Long* args = exc->stack + exc->args; FT_Byte opcode = exc->opcode; @@ -7281,7 +6981,7 @@ case 0x32: /* SHP */ case 0x33: /* SHP */ - Ins_SHP( exc ); + Ins_SHP( exc, args ); break; case 0x34: /* SHC */ @@ -7299,7 +6999,7 @@ break; case 0x39: /* IP */ - Ins_IP( exc ); + Ins_IP( exc, args ); break; case 0x3A: /* MSIRP */ @@ -7308,7 +7008,7 @@ break; case 0x3C: /* AlignRP */ - Ins_ALIGNRP( exc ); + Ins_ALIGNRP( exc, args ); break; case 0x3D: /* RTDG */ @@ -7544,7 +7244,7 @@ break; case 0x80: /* FLIPPT */ - Ins_FLIPPT( exc ); + Ins_FLIPPT( exc, args ); break; case 0x81: /* FLIPRGON */ @@ -7642,13 +7342,13 @@ { switch ( exc->error ) { - /* looking for redefined instructions */ case FT_ERR( Invalid_Opcode ): { TT_DefRecord* def = exc->IDefs; TT_DefRecord* limit = FT_OFFSET( def, exc->numIDefs ); + /* looking for redefined instructions */ for ( ; def < limit; def++ ) { if ( def->active && exc->opcode == (FT_Byte)def->opc ) @@ -7678,37 +7378,15 @@ } } } - - exc->error = FT_THROW( Invalid_Opcode ); - goto LErrorLabel_; - -#if 0 - break; /* Unreachable code warning suppression. */ - /* Leave to remind in case a later change the editor */ - /* to consider break; */ -#endif + FALL_THROUGH; default: goto LErrorLabel_; - -#if 0 - break; -#endif } } exc->top = exc->new_top; - - if ( exc->step_ins ) - exc->IP += exc->length; - - /* increment instruction counter and check if we didn't */ - /* run this program for too long (e.g. infinite loops). */ - if ( ++ins_counter > TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES ) - { - exc->error = FT_THROW( Execution_Too_Long ); - goto LErrorLabel_; - } + exc->IP += exc->length; LSuiteLabel_: if ( exc->IP >= exc->codeSize ) @@ -7724,15 +7402,12 @@ } while ( !exc->instruction_trap ); LNo_Error_: - FT_TRACE4(( " %ld instruction%s executed\n", + FT_TRACE4(( " %lu instruction%s executed\n", ins_counter, ins_counter == 1 ? "" : "s" )); return FT_Err_Ok; - LErrorCodeOverflow_: - exc->error = FT_THROW( Code_Overflow ); - LErrorLabel_: if ( exc->error && !exc->instruction_trap ) FT_TRACE1(( " The interpreter returned error 0x%x\n", exc->error )); @@ -7740,6 +7415,126 @@ return exc->error; } + + /************************************************************************** + * + * @Function: + * TT_Run_Context + * + * @Description: + * Executes one or more instructions in the execution context. + * + * @Input: + * exec :: + * A handle to the target execution context. + * + * @Return: + * TrueType error code. 0 means success. + */ + FT_LOCAL_DEF( FT_Error ) + TT_Run_Context( TT_ExecContext exec, + TT_Size size ) + { + FT_ULong num_twilight_points; + + + exec->zp0 = exec->pts; + exec->zp1 = exec->pts; + exec->zp2 = exec->pts; + + /* We restrict the number of twilight points to a reasonable, */ + /* heuristic value to avoid slow execution of malformed bytecode. */ + /* The selected value is large enough to support fonts hinted */ + /* with `ttfautohint`, which uses twilight points to store */ + /* vertical coordinates of (auto-hinter) segments. */ + num_twilight_points = FT_MAX( 30, + 2 * ( exec->pts.n_points + exec->cvtSize ) ); + if ( exec->twilight.n_points > num_twilight_points ) + { + if ( num_twilight_points > 0xFFFFU ) + num_twilight_points = 0xFFFFU; + + FT_TRACE5(( "TT_RunIns: Resetting number of twilight points\n" )); + FT_TRACE5(( " from %d to the more reasonable value %lu\n", + exec->twilight.n_points, + num_twilight_points )); + exec->twilight.n_points = (FT_UShort)num_twilight_points; + } + + /* Set up loop detectors. We restrict the number of LOOPCALL loops */ + /* and the number of JMPR, JROT, and JROF calls with a negative */ + /* argument to values that depend on various parameters like the */ + /* size of the CVT table or the number of points in the current */ + /* glyph (if applicable). */ + /* */ + /* The idea is that in real-world bytecode you either iterate over */ + /* all CVT entries (in the `prep' table), or over all points (or */ + /* contours, in the `glyf' table) of a glyph, and such iterations */ + /* don't happen very often. */ + exec->loopcall_counter = 0; + exec->neg_jump_counter = 0; + + /* The maximum values are heuristic. */ + if ( exec->pts.n_points ) + exec->loopcall_counter_max = FT_MAX( 50, + 10 * exec->pts.n_points ) + + FT_MAX( 50, + exec->cvtSize / 10 ); + else + exec->loopcall_counter_max = 300 + 22 * exec->cvtSize; + + /* as a protection against an unreasonable number of CVT entries */ + /* we assume at most 100 control values per glyph for the counter */ + if ( exec->loopcall_counter_max > + 100 * (FT_ULong)exec->face->root.num_glyphs ) + exec->loopcall_counter_max = 100 * (FT_ULong)exec->face->root.num_glyphs; + + FT_TRACE5(( "TT_RunIns: Limiting total number of loops in LOOPCALL" + " to %lu\n", exec->loopcall_counter_max )); + + exec->neg_jump_counter_max = exec->loopcall_counter_max; + FT_TRACE5(( "TT_RunIns: Limiting total number of backward jumps" + " to %lu\n", exec->neg_jump_counter_max )); + + /* set PPEM and CVT functions */ + if ( exec->metrics.x_ppem != exec->metrics.y_ppem ) + { + /* non-square pixels, use the stretched routines */ + exec->func_cur_ppem = Current_Ppem_Stretched; + exec->func_read_cvt = Read_CVT_Stretched; + exec->func_write_cvt = Write_CVT_Stretched; + exec->func_move_cvt = Move_CVT_Stretched; + } + else + { + /* square pixels, use normal routines */ + exec->func_cur_ppem = Current_Ppem; + exec->func_read_cvt = Read_CVT; + exec->func_write_cvt = Write_CVT; + exec->func_move_cvt = Move_CVT; + } + + /* reset graphics state */ + exec->GS = size->GS; + exec->func_round = (TT_Round_Func)Round_To_Grid; + Compute_Funcs( exec ); + +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* Reset IUP tracking bits in the backward compatibility mode. */ + /* See `ttinterp.h' for details. */ + exec->backward_compatibility &= ~0x3; +#endif + + /* some glyphs leave something on the stack, */ + /* so we clean it before a new execution. */ + exec->top = 0; + exec->callTop = 0; + + exec->instruction_trap = FALSE; + + return exec->interpreter( exec ); + } + #else /* !TT_USE_BYTECODE_INTERPRETER */ /* ANSI C doesn't like empty source files */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -41,6 +41,60 @@ /************************************************************************** * + * EXECUTION SUBTABLES + * + * These sub-tables relate to instruction execution. + * + */ + + +#define TT_MAX_CODE_RANGES 3 + + + /************************************************************************** + * + * There can only be 3 active code ranges at once: + * - the Font Program + * - the CVT Program + * - a glyph's instructions set + */ + typedef enum TT_CodeRange_Tag_ + { + tt_coderange_none = 0, + tt_coderange_font, + tt_coderange_cvt, + tt_coderange_glyph + + } TT_CodeRange_Tag; + + + typedef struct TT_CodeRange_ + { + FT_Byte* base; + FT_Long size; + + } TT_CodeRange; + + typedef TT_CodeRange TT_CodeRangeTable[TT_MAX_CODE_RANGES]; + + + /************************************************************************** + * + * Defines a function/instruction definition record. + */ + typedef struct TT_DefRecord_ + { + FT_Int range; /* in which code range is it located? */ + FT_Long start; /* where does it start? */ + FT_Long end; /* where does it end? */ + FT_UInt opc; /* function #, or instruction code */ + FT_Bool active; /* is it active? */ + + } TT_DefRecord, *TT_DefArray; + + + /************************************************************************** + * * Function types used by the interpreter, depending on various modes * (e.g. the rounding mode, whether to render a vertical or horizontal * line etc). @@ -51,7 +105,7 @@ typedef FT_F26Dot6 (*TT_Round_Func)( TT_ExecContext exc, FT_F26Dot6 distance, - FT_Int color ); + FT_F26Dot6 compensation ); /* Point displacement along the freedom vector routine */ typedef void @@ -111,12 +165,13 @@ TT_Face face; /* ! */ TT_Size size; /* ! */ FT_Memory memory; + TT_Interpreter interpreter; /* instructions state */ FT_Error error; /* last execution error */ - FT_Long top; /* @ top of exec. stack */ + FT_Long top; /* @! top of exec. stack */ FT_Long stackSize; /* ! size of exec. stack */ FT_Long* stack; /* ! current exec. stack */ @@ -142,11 +197,9 @@ FT_Long IP; /* current instruction pointer */ FT_Long codeSize; /* size of current range */ - FT_Byte opcode; /* current opcode */ - FT_Int length; /* length of current opcode */ + FT_Byte opcode; /* current opcode */ + FT_Int length; /* opcode length or increment */ - FT_Bool step_ins; /* true if the interpreter must */ - /* increment IP after ins. exec */ FT_ULong cvtSize; /* ! */ FT_Long* cvt; /* ! */ FT_ULong glyfCvtSize; @@ -166,9 +219,9 @@ FT_UInt maxFunc; /* ! maximum function index */ FT_UInt maxIns; /* ! maximum instruction index */ - FT_Int callTop, /* @ top of call stack during execution */ - callSize; /* size of call stack */ - TT_CallStack callStack; /* call stack */ + FT_Int callTop, /* @! top of call stack during execution */ + callSize; /* size of call stack */ + TT_CallStack callStack; /* call stack */ FT_UShort maxPoints; /* capacity of this context's `pts' */ FT_Short maxContours; /* record, expressed in points and */ @@ -189,16 +242,14 @@ FT_Bool instruction_trap; /* ! If `True', the interpreter */ /* exits after each instruction */ - TT_GraphicsState default_GS; /* graphics state resulting from */ - /* the prep program */ FT_Bool is_composite; /* true if the glyph is composite */ FT_Bool pedantic_hinting; /* true if pedantic interpretation */ /* latest interpreter additions */ - FT_Long F_dot_P; /* dot product of freedom and projection */ - /* vectors */ - TT_Round_Func func_round; /* current rounding function */ + TT_Round_Func func_round; /* current rounding function */ + + FT_Vector moveVector; /* "projected" freedom vector */ TT_Project_Func func_project, /* current projection function */ func_dualproj, /* current dual proj. function */ @@ -327,34 +378,13 @@ * */ - /* Using v40 implies subpixel hinting, unless FT_RENDER_MODE_MONO has been - * requested. Used to detect interpreter */ - /* version switches. `_lean' to differentiate from the Infinality */ - /* `subpixel_hinting', which is managed differently. */ - FT_Bool subpixel_hinting_lean; - - /* Long side of a LCD subpixel is vertical (e.g., screen is rotated). */ - /* `_lean' to differentiate from the Infinality `vertical_lcd', which */ - /* is managed differently. */ - FT_Bool vertical_lcd_lean; - - /* Default to backward compatibility mode in v40 interpreter. If */ - /* this is false, it implies the interpreter is in v35 or in native */ - /* ClearType mode. */ - FT_Bool backward_compatibility; - - /* Useful for detecting and denying post-IUP trickery that is usually */ - /* used to fix pixel patterns (`superhinting'). */ - FT_Bool iupx_called; - FT_Bool iupy_called; - - /* ClearType hinting and grayscale rendering, as used by Universal */ - /* Windows Platform apps (Windows 8 and above). Like the standard */ - /* colorful ClearType mode, it utilizes a vastly increased virtual */ - /* resolution on the x axis. Different from bi-level hinting and */ - /* grayscale rendering, the old mode from Win9x days that roughly */ - /* adheres to the physical pixel grid on both axes. */ - FT_Bool grayscale_cleartype; + /* Activate backward compatibility (bit 2) and track IUP (bits 0-1). */ + /* If this is zero, it means that the interpreter is either in v35 */ + /* or in native ClearType mode. */ + FT_Int backward_compatibility; + + FT_Render_Mode mode; /* target render mode */ + #endif /* TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL */ /* We maintain two counters (in addition to the instruction counter) */ @@ -371,22 +401,15 @@ extern const TT_GraphicsState tt_default_graphics_state; -#ifdef TT_USE_BYTECODE_INTERPRETER - FT_LOCAL( void ) - TT_Goto_CodeRange( TT_ExecContext exec, - FT_Int range, - FT_Long IP ); - FT_LOCAL( void ) TT_Set_CodeRange( TT_ExecContext exec, FT_Int range, - void* base, + FT_Byte* base, FT_Long length ); FT_LOCAL( void ) TT_Clear_CodeRange( TT_ExecContext exec, FT_Int range ); -#endif /* TT_USE_BYTECODE_INTERPRETER */ /************************************************************************** @@ -413,22 +436,21 @@ TT_New_Context( TT_Driver driver ); -#ifdef TT_USE_BYTECODE_INTERPRETER FT_LOCAL( void ) TT_Done_Context( TT_ExecContext exec ); - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) TT_Load_Context( TT_ExecContext exec, TT_Face face, TT_Size size ); FT_LOCAL( void ) TT_Save_Context( TT_ExecContext exec, - TT_Size ins ); + TT_Size size ); FT_LOCAL( FT_Error ) - TT_Run_Context( TT_ExecContext exec ); -#endif /* TT_USE_BYTECODE_INTERPRETER */ + TT_Run_Context( TT_ExecContext exec, + TT_Size size ); /************************************************************************** diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Objects manager (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -67,23 +67,13 @@ * A pointer to the target glyph zone. */ FT_LOCAL_DEF( void ) - tt_glyphzone_done( TT_GlyphZone zone ) + tt_glyphzone_done( FT_Memory memory, + TT_GlyphZone zone ) { - FT_Memory memory = zone->memory; + FT_FREE( zone->org ); - - if ( memory ) - { - FT_FREE( zone->contours ); - FT_FREE( zone->tags ); - FT_FREE( zone->cur ); - FT_FREE( zone->org ); - FT_FREE( zone->orus ); - - zone->max_points = zone->n_points = 0; - zone->max_contours = zone->n_contours = 0; - zone->memory = NULL; - } + zone->n_points = 0; + zone->n_contours = 0; } @@ -119,23 +109,22 @@ TT_GlyphZone zone ) { FT_Error error; + FT_Long size = 3 * maxPoints * sizeof ( FT_Vector ) + + maxContours * sizeof ( FT_UShort ) + + maxPoints * sizeof ( FT_Byte ); - FT_ZERO( zone ); - zone->memory = memory; - - if ( FT_NEW_ARRAY( zone->org, maxPoints ) || - FT_NEW_ARRAY( zone->cur, maxPoints ) || - FT_NEW_ARRAY( zone->orus, maxPoints ) || - FT_NEW_ARRAY( zone->tags, maxPoints ) || - FT_NEW_ARRAY( zone->contours, maxContours ) ) + if ( !FT_ALLOC( zone->org, size ) ) { - tt_glyphzone_done( zone ); - } - else - { - zone->max_points = maxPoints; - zone->max_contours = maxContours; + zone->n_points = maxPoints; + zone->n_contours = maxContours; + + zone->cur = zone->org + maxPoints; + zone->orus = zone->cur + maxPoints; + zone->contours = (FT_UShort*)( zone->orus + maxPoints ); + zone->tags = (FT_Byte*)( zone->contours + maxContours ); + + zone->first_point = 0; } return error; @@ -488,8 +477,7 @@ int j, k; - FT_MEM_SET( num_matched_ids, 0, - sizeof ( int ) * TRICK_SFNT_IDS_NUM_FACES ); + FT_ARRAY_ZERO( num_matched_ids, TRICK_SFNT_IDS_NUM_FACES ); has_cvt = FALSE; has_fpgm = FALSE; has_prep = FALSE; @@ -787,7 +775,7 @@ FT_UInt instance_index = (FT_UInt)face_index >> 16; - if ( FT_HAS_MULTIPLE_MASTERS( ttface ) ) + if ( instance_index && FT_HAS_MULTIPLE_MASTERS( ttface ) ) { error = FT_Set_Named_Instance( ttface, instance_index ); if ( error ) @@ -885,59 +873,18 @@ * size :: * A handle to the size object. * - * pedantic :: - * Set if bytecode execution should be pedantic. - * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) - tt_size_run_fpgm( TT_Size size, - FT_Bool pedantic ) + tt_size_run_fpgm( TT_Size size ) { TT_Face face = (TT_Face)size->root.face; - TT_ExecContext exec; + TT_ExecContext exec = size->context; FT_Error error; - exec = size->context; - - error = TT_Load_Context( exec, face, size ); - if ( error ) - return error; - - exec->callTop = 0; - exec->top = 0; - - exec->period = 64; - exec->phase = 0; - exec->threshold = 0; - - exec->instruction_trap = FALSE; - exec->F_dot_P = 0x4000L; - - exec->pedantic_hinting = pedantic; - - { - FT_Size_Metrics* size_metrics = &exec->metrics; - TT_Size_Metrics* tt_metrics = &exec->tt_metrics; - - - size_metrics->x_ppem = 0; - size_metrics->y_ppem = 0; - size_metrics->x_scale = 0; - size_metrics->y_scale = 0; - - tt_metrics->ppem = 0; - tt_metrics->scale = 0; - tt_metrics->ratio = 0x10000L; - } - - /* allow font program execution */ - TT_Set_CodeRange( exec, - tt_coderange_font, - face->font_program, - (FT_Long)face->font_program_size ); + TT_Load_Context( exec, face, size ); /* disable CVT and glyph programs coderange */ TT_Clear_CodeRange( exec, tt_coderange_cvt ); @@ -945,15 +892,19 @@ if ( face->font_program_size > 0 ) { - TT_Goto_CodeRange( exec, tt_coderange_font, 0 ); + /* allow font program execution */ + TT_Set_CodeRange( exec, + tt_coderange_font, + face->font_program, + (FT_Long)face->font_program_size ); + + exec->pts.n_points = 0; + exec->pts.n_contours = 0; FT_TRACE4(( "Executing `fpgm' table.\n" )); - error = face->interpreter( exec ); -#ifdef FT_DEBUG_LEVEL_TRACE - if ( error ) - FT_TRACE4(( " interpretation failed with error code 0x%x\n", - error )); -#endif + error = TT_Run_Context( exec, size ); + FT_TRACE4(( error ? " failed (error code 0x%x)\n" : "", + error )); } else error = FT_Err_Ok; @@ -979,212 +930,146 @@ * size :: * A handle to the size object. * - * pedantic :: - * Set if bytecode execution should be pedantic. - * * @Return: * FreeType error code. 0 means success. */ FT_LOCAL_DEF( FT_Error ) - tt_size_run_prep( TT_Size size, - FT_Bool pedantic ) + tt_size_run_prep( TT_Size size ) { TT_Face face = (TT_Face)size->root.face; - TT_ExecContext exec; + TT_ExecContext exec = size->context; FT_Error error; FT_UInt i; + /* set default GS, twilight points, and storage */ + /* before CV program can modify them. */ + size->GS = tt_default_graphics_state; + + /* all twilight points are originally zero */ + FT_ARRAY_ZERO( size->twilight.org, size->twilight.n_points ); + FT_ARRAY_ZERO( size->twilight.cur, size->twilight.n_points ); + + TT_Load_Context( exec, face, size ); + + /* clear storage area */ + FT_ARRAY_ZERO( exec->storage, exec->storeSize ); + /* Scale the cvt values to the new ppem. */ /* By default, we use the y ppem value for scaling. */ FT_TRACE6(( "CVT values:\n" )); - for ( i = 0; i < size->cvt_size; i++ ) + for ( i = 0; i < exec->cvtSize; i++ ) { /* Unscaled CVT values are already stored in 26.6 format. */ /* Note that this scaling operation is very sensitive to rounding; */ /* the integer division by 64 must be applied to the first argument. */ - size->cvt[i] = FT_MulFix( face->cvt[i] / 64, size->ttmetrics.scale ); - FT_TRACE6(( " %3d: %f (%f)\n", - i, (double)face->cvt[i] / 64, (double)size->cvt[i] / 64 )); + exec->cvt[i] = FT_MulFix( face->cvt[i] / 64, size->ttmetrics.scale ); + FT_TRACE6(( " %3u: %f (%f)\n", + i, (double)face->cvt[i] / 64, (double)exec->cvt[i] / 64 )); } FT_TRACE6(( "\n" )); - exec = size->context; - - error = TT_Load_Context( exec, face, size ); - if ( error ) - return error; - - exec->callTop = 0; - exec->top = 0; - - exec->instruction_trap = FALSE; - - exec->pedantic_hinting = pedantic; - - TT_Set_CodeRange( exec, - tt_coderange_cvt, - face->cvt_program, - (FT_Long)face->cvt_program_size ); - TT_Clear_CodeRange( exec, tt_coderange_glyph ); if ( face->cvt_program_size > 0 ) { - TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 ); + /* allow CV program execution */ + TT_Set_CodeRange( exec, + tt_coderange_cvt, + face->cvt_program, + (FT_Long)face->cvt_program_size ); + + exec->pts.n_points = 0; + exec->pts.n_contours = 0; FT_TRACE4(( "Executing `prep' table.\n" )); - error = face->interpreter( exec ); -#ifdef FT_DEBUG_LEVEL_TRACE - if ( error ) - FT_TRACE4(( " interpretation failed with error code 0x%x\n", - error )); -#endif + error = TT_Run_Context( exec, size ); + FT_TRACE4(( error ? " failed (error code 0x%x)\n" : "", + error )); } else error = FT_Err_Ok; size->cvt_ready = error; - /* UNDOCUMENTED! The MS rasterizer doesn't allow the following */ - /* graphics state variables to be modified by the CVT program. */ - - exec->GS.dualVector.x = 0x4000; - exec->GS.dualVector.y = 0; - exec->GS.projVector.x = 0x4000; - exec->GS.projVector.y = 0x0; - exec->GS.freeVector.x = 0x4000; - exec->GS.freeVector.y = 0x0; - - exec->GS.rp0 = 0; - exec->GS.rp1 = 0; - exec->GS.rp2 = 0; - - exec->GS.gep0 = 1; - exec->GS.gep1 = 1; - exec->GS.gep2 = 1; - - exec->GS.loop = 1; - - /* save as default graphics state */ - size->GS = exec->GS; - - TT_Save_Context( exec, size ); + if ( !error ) + TT_Save_Context( exec, size ); return error; } static void - tt_size_done_bytecode( FT_Size ftsize ) + tt_size_done_bytecode( TT_Size size ) { - TT_Size size = (TT_Size)ftsize; - TT_Face face = (TT_Face)ftsize->face; - FT_Memory memory = face->root.memory; + FT_Memory memory = size->root.face->memory; + TT_ExecContext exec = size->context; - if ( size->context ) + + if ( exec ) { - TT_Done_Context( size->context ); + FT_FREE( exec->stack ); + FT_FREE( exec->FDefs ); + + TT_Done_Context( exec ); size->context = NULL; } - FT_FREE( size->cvt ); - size->cvt_size = 0; - - /* free storage area */ - FT_FREE( size->storage ); - size->storage_size = 0; - /* twilight zone */ - tt_glyphzone_done( &size->twilight ); - - FT_FREE( size->function_defs ); - FT_FREE( size->instruction_defs ); - - size->num_function_defs = 0; - size->max_function_defs = 0; - size->num_instruction_defs = 0; - size->max_instruction_defs = 0; - - size->max_func = 0; - size->max_ins = 0; - - size->bytecode_ready = -1; - size->cvt_ready = -1; + tt_glyphzone_done( memory, &size->twilight ); } /* Initialize bytecode-related fields in the size object. */ /* We do this only if bytecode interpretation is really needed. */ - static FT_Error - tt_size_init_bytecode( FT_Size ftsize, + FT_LOCAL_DEF( FT_Error ) + tt_size_init_bytecode( TT_Size size, FT_Bool pedantic ) { FT_Error error; - TT_Size size = (TT_Size)ftsize; - TT_Face face = (TT_Face)ftsize->face; - FT_Memory memory = face->root.memory; + TT_Face face = (TT_Face)size->root.face; + FT_Memory memory = size->root.face->memory; FT_UShort n_twilight; TT_MaxProfile* maxp = &face->max_profile; + TT_ExecContext exec; - /* clean up bytecode related data */ - FT_FREE( size->function_defs ); - FT_FREE( size->instruction_defs ); - FT_FREE( size->cvt ); - FT_FREE( size->storage ); - - if ( size->context ) - TT_Done_Context( size->context ); - tt_glyphzone_done( &size->twilight ); - - size->bytecode_ready = -1; - size->cvt_ready = -1; - - size->context = TT_New_Context( (TT_Driver)face->root.driver ); + exec = TT_New_Context( (TT_Driver)face->root.driver ); + if ( !exec ) + return FT_THROW( Could_Not_Find_Context ); - size->max_function_defs = maxp->maxFunctionDefs; - size->max_instruction_defs = maxp->maxInstructionDefs; + size->context = exec; - size->num_function_defs = 0; - size->num_instruction_defs = 0; + exec->pedantic_hinting = pedantic; - size->max_func = 0; - size->max_ins = 0; + exec->maxFDefs = maxp->maxFunctionDefs; + exec->maxIDefs = maxp->maxInstructionDefs; - size->cvt_size = face->cvt_size; - size->storage_size = maxp->maxStorage; + if ( FT_NEW_ARRAY( exec->FDefs, exec->maxFDefs + exec->maxIDefs ) ) + goto Fail; - /* Set default metrics */ - { - TT_Size_Metrics* tt_metrics = &size->ttmetrics; + exec->IDefs = exec->FDefs + exec->maxFDefs; + exec->numFDefs = 0; + exec->numIDefs = 0; - tt_metrics->rotated = FALSE; - tt_metrics->stretched = FALSE; + exec->maxFunc = 0; + exec->maxIns = 0; - /* Set default engine compensation. Value 3 is not described */ - /* in the OpenType specification (as of Mai 2019), but Greg */ - /* says that MS handles it the same as `gray'. */ - /* */ - /* The Apple specification says that the compensation for */ - /* `gray' is always zero. FreeType doesn't do any */ - /* compensation at all. */ - tt_metrics->compensations[0] = 0; /* gray */ - tt_metrics->compensations[1] = 0; /* black */ - tt_metrics->compensations[2] = 0; /* white */ - tt_metrics->compensations[3] = 0; /* zero */ - } + /* XXX: We reserve a little more elements on the stack to deal */ + /* with broken fonts like arialbs, courbs, timesbs, etc. */ + exec->stackSize = maxp->maxStackElements + 32; + exec->storeSize = maxp->maxStorage; + exec->cvtSize = face->cvt_size; - /* allocate function defs, instruction defs, cvt, and storage area */ - if ( FT_NEW_ARRAY( size->function_defs, size->max_function_defs ) || - FT_NEW_ARRAY( size->instruction_defs, size->max_instruction_defs ) || - FT_NEW_ARRAY( size->cvt, size->cvt_size ) || - FT_NEW_ARRAY( size->storage, size->storage_size ) ) - goto Exit; + if ( FT_NEW_ARRAY( exec->stack, + exec->stackSize + + (FT_Long)( exec->storeSize + exec->cvtSize ) ) ) + goto Fail; - /* reserve twilight zone */ + /* reserve twilight zone and set GS before fpgm is executed, */ + /* just in case, even though fpgm should not touch them */ n_twilight = maxp->maxTwilightPoints; /* there are 4 phantom points (do we need this?) */ @@ -1192,22 +1077,13 @@ error = tt_glyphzone_new( memory, n_twilight, 0, &size->twilight ); if ( error ) - goto Exit; - - size->twilight.n_points = n_twilight; - - size->GS = tt_default_graphics_state; - - /* set `face->interpreter' according to the debug hook present */ - { - FT_Library library = face->root.driver->root.library; + goto Fail; + size->GS = tt_default_graphics_state; + size->cvt_ready = -1; - face->interpreter = (TT_Interpreter) - library->debug_hooks[FT_DEBUG_HOOK_TRUETYPE]; - if ( !face->interpreter ) - face->interpreter = (TT_Interpreter)TT_RunIns; - } + size->ttmetrics.rotated = FALSE; + size->ttmetrics.stretched = FALSE; /* Fine, now run the font program! */ @@ -1217,59 +1093,11 @@ /* to be executed just once; calling it again is completely useless */ /* and might even lead to extremely slow behaviour if it is malformed */ /* (containing an infinite loop, for example). */ - error = tt_size_run_fpgm( size, pedantic ); + error = tt_size_run_fpgm( size ); return error; - Exit: - if ( error ) - tt_size_done_bytecode( ftsize ); - - return error; - } - - - FT_LOCAL_DEF( FT_Error ) - tt_size_ready_bytecode( TT_Size size, - FT_Bool pedantic ) - { - FT_Error error = FT_Err_Ok; - - - if ( size->bytecode_ready < 0 ) - error = tt_size_init_bytecode( (FT_Size)size, pedantic ); - else - error = size->bytecode_ready; - - if ( error ) - goto Exit; - - /* rescale CVT when needed */ - if ( size->cvt_ready < 0 ) - { - FT_UShort i; - - - /* all twilight points are originally zero */ - for ( i = 0; i < size->twilight.n_points; i++ ) - { - size->twilight.org[i].x = 0; - size->twilight.org[i].y = 0; - size->twilight.cur[i].x = 0; - size->twilight.cur[i].y = 0; - } - - /* clear storage area */ - for ( i = 0; i < size->storage_size; i++ ) - size->storage[i] = 0; - - size->GS = tt_default_graphics_state; - - error = tt_size_run_prep( size, pedantic ); - } - else - error = size->cvt_ready; - - Exit: + Fail: + tt_size_done_bytecode( size ); return error; } @@ -1300,11 +1128,9 @@ #ifdef TT_USE_BYTECODE_INTERPRETER size->bytecode_ready = -1; - size->cvt_ready = -1; #endif - size->ttmetrics.valid = FALSE; - size->strike_index = 0xFFFFFFFFUL; + size->strike_index = 0xFFFFFFFFUL; return error; } @@ -1325,14 +1151,11 @@ FT_LOCAL_DEF( void ) tt_size_done( FT_Size ttsize ) /* TT_Size */ { - TT_Size size = (TT_Size)ttsize; - - #ifdef TT_USE_BYTECODE_INTERPRETER - tt_size_done_bytecode( ttsize ); + tt_size_done_bytecode( (TT_Size)ttsize ); +#else + FT_UNUSED( ttsize ); #endif - - size->ttmetrics.valid = FALSE; } @@ -1353,21 +1176,13 @@ * function must take `FT_Size` as a result. The passed `FT_Size` is * expected to point to a `TT_Size`. */ - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) tt_size_reset_height( FT_Size ft_size ) { TT_Size size = (TT_Size)ft_size; - TT_Face face = (TT_Face)size->root.face; + TT_Face face = (TT_Face)ft_size->face; FT_Size_Metrics* size_metrics = &size->hinted_metrics; - size->ttmetrics.valid = FALSE; - - /* copy the result from base layer */ - *size_metrics = size->root.metrics; - - if ( size_metrics->x_ppem < 1 || size_metrics->y_ppem < 1 ) - return FT_THROW( Invalid_PPem ); - /* This bit flag, if set, indicates that the ppems must be */ /* rounded to integers. Nearly all TrueType fonts have this bit */ /* set, as hinting won't work really well otherwise. */ @@ -1385,10 +1200,6 @@ FT_MulFix( face->root.height, size_metrics->y_scale ) ); } - - size->ttmetrics.valid = TRUE; - - return FT_Err_Ok; } @@ -1408,14 +1219,20 @@ FT_LOCAL_DEF( FT_Error ) tt_size_reset( TT_Size size ) { - FT_Error error; TT_Face face = (TT_Face)size->root.face; FT_Size_Metrics* size_metrics = &size->hinted_metrics; - error = tt_size_reset_height( (FT_Size)size ); - if ( error ) - return error; + /* invalidate the size object first */ + size->ttmetrics.ppem = 0; + + if ( size->root.metrics.x_ppem == 0 || size->root.metrics.y_ppem == 0 ) + return FT_THROW( Invalid_PPem ); + + /* copy the result from base layer */ + *size_metrics = size->root.metrics; + + tt_size_reset_height( (FT_Size)size ); if ( face->header.Flags & 8 ) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Objects manager (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -53,6 +53,8 @@ typedef FT_GlyphSlot TT_GlyphSlot; +#ifdef TT_USE_BYTECODE_INTERPRETER + /************************************************************************** * * @Struct: @@ -67,21 +69,27 @@ FT_UShort rp1; FT_UShort rp2; + FT_UShort gep0; + FT_UShort gep1; + FT_UShort gep2; + FT_UnitVector dualVector; FT_UnitVector projVector; FT_UnitVector freeVector; FT_Long loop; - FT_F26Dot6 minimum_distance; FT_Int round_state; + FT_F26Dot6 compensation[4]; /* device-specific compensations */ - FT_Bool auto_flip; + /* default values below can be modified by 'fpgm' and 'prep' */ + FT_F26Dot6 minimum_distance; FT_F26Dot6 control_value_cutin; FT_F26Dot6 single_width_cutin; FT_F26Dot6 single_width_value; FT_UShort delta_base; FT_UShort delta_shift; + FT_Bool auto_flip; FT_Byte instruct_control; /* According to Greg Hitchcock from Microsoft, the `scan_control' */ /* variable as documented in the TrueType specification is a 32-bit */ @@ -90,17 +98,12 @@ FT_Bool scan_control; FT_Int scan_type; - FT_UShort gep0; - FT_UShort gep1; - FT_UShort gep2; - } TT_GraphicsState; -#ifdef TT_USE_BYTECODE_INTERPRETER - FT_LOCAL( void ) - tt_glyphzone_done( TT_GlyphZone zone ); + tt_glyphzone_done( FT_Memory memory, + TT_GlyphZone zone ); FT_LOCAL( FT_Error ) tt_glyphzone_new( FT_Memory memory, @@ -114,73 +117,6 @@ /************************************************************************** * - * EXECUTION SUBTABLES - * - * These sub-tables relate to instruction execution. - * - */ - - -#define TT_MAX_CODE_RANGES 3 - - - /************************************************************************** - * - * There can only be 3 active code ranges at once: - * - the Font Program - * - the CVT Program - * - a glyph's instructions set - */ - typedef enum TT_CodeRange_Tag_ - { - tt_coderange_none = 0, - tt_coderange_font, - tt_coderange_cvt, - tt_coderange_glyph - - } TT_CodeRange_Tag; - - - typedef struct TT_CodeRange_ - { - FT_Byte* base; - FT_Long size; - - } TT_CodeRange; - - typedef TT_CodeRange TT_CodeRangeTable[TT_MAX_CODE_RANGES]; - - - /************************************************************************** - * - * Defines a function/instruction definition record. - */ - typedef struct TT_DefRecord_ - { - FT_Int range; /* in which code range is it located? */ - FT_Long start; /* where does it start? */ - FT_Long end; /* where does it end? */ - FT_UInt opc; /* function #, or instruction code */ - FT_Bool active; /* is it active? */ - - } TT_DefRecord, *TT_DefArray; - - - /************************************************************************** - * - * Subglyph transformation record. - */ - typedef struct TT_Transform_ - { - FT_Fixed xx, xy; /* transformation matrix coefficients */ - FT_Fixed yx, yy; - FT_F26Dot6 ox, oy; /* offsets */ - - } TT_Transform; - - - /************************************************************************** - * * A note regarding non-squared pixels: * * (This text will probably go into some docs at some time; for now, it @@ -251,13 +187,9 @@ FT_Long x_ratio; FT_Long y_ratio; - FT_UShort ppem; /* maximum ppem size */ FT_Long ratio; /* current ratio */ FT_Fixed scale; - - FT_F26Dot6 compensations[4]; /* device-specific compensations */ - - FT_Bool valid; + FT_UShort ppem; /* maximum ppem size */ FT_Bool rotated; /* `is the glyph rotated?'-flag */ FT_Bool stretched; /* `is the glyph stretched?'-flag */ @@ -288,27 +220,8 @@ FT_Long point_size; /* for the `MPS' bytecode instruction */ - FT_UInt num_function_defs; /* number of function definitions */ - FT_UInt max_function_defs; - TT_DefArray function_defs; /* table of function definitions */ - - FT_UInt num_instruction_defs; /* number of ins. definitions */ - FT_UInt max_instruction_defs; - TT_DefArray instruction_defs; /* table of ins. definitions */ - - FT_UInt max_func; - FT_UInt max_ins; - - TT_CodeRangeTable codeRangeTable; - TT_GraphicsState GS; - FT_ULong cvt_size; /* the scaled control value table */ - FT_Long* cvt; - - FT_UShort storage_size; /* The storage area is now part of */ - FT_Long* storage; /* the instance */ - TT_GlyphZoneRec twilight; /* The instance's twilight zone */ TT_ExecContext context; @@ -375,20 +288,18 @@ #ifdef TT_USE_BYTECODE_INTERPRETER FT_LOCAL( FT_Error ) - tt_size_run_fpgm( TT_Size size, - FT_Bool pedantic ); + tt_size_run_fpgm( TT_Size size ); FT_LOCAL( FT_Error ) - tt_size_run_prep( TT_Size size, - FT_Bool pedantic ); + tt_size_run_prep( TT_Size size ); FT_LOCAL( FT_Error ) - tt_size_ready_bytecode( TT_Size size, - FT_Bool pedantic ); + tt_size_init_bytecode( TT_Size size, + FT_Bool pedantic ); #endif /* TT_USE_BYTECODE_INTERPRETER */ - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) tt_size_reset_height( FT_Size size ); FT_LOCAL( FT_Error ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -110,7 +110,7 @@ if ( face->num_locations != (FT_ULong)face->root.num_glyphs + 1 ) { - FT_TRACE2(( "glyph count mismatch! loca: %ld, maxp: %ld\n", + FT_TRACE2(( "glyph count mismatch! loca: %lu, maxp: %ld\n", face->num_locations - 1, face->root.num_glyphs )); /* we only handle the case where `maxp' gives a larger value */ @@ -151,7 +151,7 @@ face->num_locations = (FT_ULong)face->root.num_glyphs + 1; table_len = new_loca_len; - FT_TRACE2(( "adjusting num_locations to %ld\n", + FT_TRACE2(( "adjusting num_locations to %lu\n", face->num_locations )); } else @@ -225,7 +225,7 @@ if ( pos1 > ttface->glyf_len ) { FT_TRACE1(( "tt_face_get_location:" - " too large offset (0x%08lx) found for glyph index %d,\n", + " too large offset (0x%08lx) found for glyph index %u,\n", pos1, gindex )); FT_TRACE1(( " " " exceeding the end of `glyf' table (0x%08lx)\n", @@ -240,17 +240,17 @@ if ( gindex == ttface->num_locations - 2 ) { FT_TRACE1(( "tt_face_get_location:" - " too large size (%ld bytes) found for glyph index %d,\n", + " too large size (%lu bytes) found for glyph index %u,\n", pos2 - pos1, gindex )); FT_TRACE1(( " " - " truncating at the end of `glyf' table to %ld bytes\n", + " truncating at the end of `glyf' table to %lu bytes\n", ttface->glyf_len - pos1 )); pos2 = ttface->glyf_len; } else { FT_TRACE1(( "tt_face_get_location:" - " too large offset (0x%08lx) found for glyph index %d,\n", + " too large offset (0x%08lx) found for glyph index %u,\n", pos2, gindex + 1 )); FT_TRACE1(( " " " exceeding the end of `glyf' table (0x%08lx)\n", @@ -419,7 +419,7 @@ if ( FT_FRAME_EXTRACT( table_len, face->font_program ) ) goto Exit; - FT_TRACE2(( "loaded, %12ld bytes\n", face->font_program_size )); + FT_TRACE2(( "loaded, %12lu bytes\n", face->font_program_size )); } Exit: @@ -482,7 +482,7 @@ if ( FT_FRAME_EXTRACT( table_len, face->cvt_program ) ) goto Exit; - FT_TRACE2(( "loaded, %12ld bytes\n", face->cvt_program_size )); + FT_TRACE2(( "loaded, %12lu bytes\n", face->cvt_program_size )); } Exit: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttpload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1013 +0,0 @@ -/**************************************************************************** - * - * ttsubpix.c - * - * TrueType Subpixel Hinting. - * - * Copyright (C) 2010-2023 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - */ - -#include <freetype/internal/ftdebug.h> -#include <freetype/internal/ftcalc.h> -#include <freetype/internal/ftstream.h> -#include <freetype/internal/sfnt.h> -#include <freetype/tttags.h> -#include <freetype/ftoutln.h> -#include <freetype/ftdriver.h> - -#include "ttsubpix.h" - - -#if defined( TT_USE_BYTECODE_INTERPRETER ) && \ - defined( TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY ) - - /************************************************************************** - * - * These rules affect how the TT Interpreter does hinting, with the - * goal of doing subpixel hinting by (in general) ignoring x moves. - * Some of these rules are fixes that go above and beyond the - * stated techniques in the MS whitepaper on Cleartype, due to - * artifacts in many glyphs. So, these rules make some glyphs render - * better than they do in the MS rasterizer. - * - * "" string or 0 int/char indicates to apply to all glyphs. - * "-" used as dummy placeholders, but any non-matching string works. - * - * Some of this could arguably be implemented in fontconfig, however: - * - * - Fontconfig can't set things on a glyph-by-glyph basis. - * - The tweaks that happen here are very low-level, from an average - * user's point of view and are best implemented in the hinter. - * - * The goal is to make the subpixel hinting techniques as generalized - * as possible across all fonts to prevent the need for extra rules such - * as these. - * - * The rule structure is designed so that entirely new rules can easily - * be added when a new compatibility feature is discovered. - * - * The rule structures could also use some enhancement to handle ranges. - * - * ****************** WORK IN PROGRESS ******************* - */ - - /* These are `classes' of fonts that can be grouped together and used in */ - /* rules below. A blank entry "" is required at the end of these! */ -#define FAMILY_CLASS_RULES_SIZE 7 - - static const SPH_Font_Class FAMILY_CLASS_Rules - [FAMILY_CLASS_RULES_SIZE] = - { - { "MS Legacy Fonts", - { "Aharoni", - "Andale Mono", - "Andalus", - "Angsana New", - "AngsanaUPC", - "Arabic Transparent", - "Arial Black", - "Arial Narrow", - "Arial Unicode MS", - "Arial", - "Batang", - "Browallia New", - "BrowalliaUPC", - "Comic Sans MS", - "Cordia New", - "CordiaUPC", - "Courier New", - "DFKai-SB", - "David Transparent", - "David", - "DilleniaUPC", - "Estrangelo Edessa", - "EucrosiaUPC", - "FangSong_GB2312", - "Fixed Miriam Transparent", - "FrankRuehl", - "Franklin Gothic Medium", - "FreesiaUPC", - "Garamond", - "Gautami", - "Georgia", - "Gulim", - "Impact", - "IrisUPC", - "JasmineUPC", - "KaiTi_GB2312", - "KodchiangUPC", - "Latha", - "Levenim MT", - "LilyUPC", - "Lucida Console", - "Lucida Sans Unicode", - "MS Gothic", - "MS Mincho", - "MV Boli", - "Mangal", - "Marlett", - "Microsoft Sans Serif", - "Mingliu", - "Miriam Fixed", - "Miriam Transparent", - "Miriam", - "Narkisim", - "Palatino Linotype", - "Raavi", - "Rod Transparent", - "Rod", - "Shruti", - "SimHei", - "Simplified Arabic Fixed", - "Simplified Arabic", - "Simsun", - "Sylfaen", - "Symbol", - "Tahoma", - "Times New Roman", - "Traditional Arabic", - "Trebuchet MS", - "Tunga", - "Verdana", - "Webdings", - "Wingdings", - "", - }, - }, - { "Core MS Legacy Fonts", - { "Arial Black", - "Arial Narrow", - "Arial Unicode MS", - "Arial", - "Comic Sans MS", - "Courier New", - "Garamond", - "Georgia", - "Impact", - "Lucida Console", - "Lucida Sans Unicode", - "Microsoft Sans Serif", - "Palatino Linotype", - "Tahoma", - "Times New Roman", - "Trebuchet MS", - "Verdana", - "", - }, - }, - { "Apple Legacy Fonts", - { "Geneva", - "Times", - "Monaco", - "Century", - "Chalkboard", - "Lobster", - "Century Gothic", - "Optima", - "Lucida Grande", - "Gill Sans", - "Baskerville", - "Helvetica", - "Helvetica Neue", - "", - }, - }, - { "Legacy Sans Fonts", - { "Andale Mono", - "Arial Unicode MS", - "Arial", - "Century Gothic", - "Comic Sans MS", - "Franklin Gothic Medium", - "Geneva", - "Lucida Console", - "Lucida Grande", - "Lucida Sans Unicode", - "Lucida Sans Typewriter", - "Microsoft Sans Serif", - "Monaco", - "Tahoma", - "Trebuchet MS", - "Verdana", - "", - }, - }, - - { "Misc Legacy Fonts", - { "Dark Courier", "", }, }, - { "Verdana Clones", - { "DejaVu Sans", - "Bitstream Vera Sans", "", }, }, - { "Verdana and Clones", - { "DejaVu Sans", - "Bitstream Vera Sans", - "Verdana", "", }, }, - }; - - - /* Define this to force natural (i.e. not bitmap-compatible) widths. */ - /* The default leans strongly towards natural widths except for a few */ - /* legacy fonts where a selective combination produces nicer results. */ -/* #define FORCE_NATURAL_WIDTHS */ - - - /* Define `classes' of styles that can be grouped together and used in */ - /* rules below. A blank entry "" is required at the end of these! */ -#define STYLE_CLASS_RULES_SIZE 5 - - static const SPH_Font_Class STYLE_CLASS_Rules - [STYLE_CLASS_RULES_SIZE] = - { - { "Regular Class", - { "Regular", - "Book", - "Medium", - "Roman", - "Normal", - "", - }, - }, - { "Regular/Italic Class", - { "Regular", - "Book", - "Medium", - "Italic", - "Oblique", - "Roman", - "Normal", - "", - }, - }, - { "Bold/BoldItalic Class", - { "Bold", - "Bold Italic", - "Black", - "", - }, - }, - { "Bold/Italic/BoldItalic Class", - { "Bold", - "Bold Italic", - "Black", - "Italic", - "Oblique", - "", - }, - }, - { "Regular/Bold Class", - { "Regular", - "Book", - "Medium", - "Normal", - "Roman", - "Bold", - "Black", - "", - }, - }, - }; - - - /* Force special legacy fixes for fonts. */ -#define COMPATIBILITY_MODE_RULES_SIZE 1 - - static const SPH_TweakRule COMPATIBILITY_MODE_Rules - [COMPATIBILITY_MODE_RULES_SIZE] = - { - { "Verdana Clones", 0, "", 0 }, - }; - - - /* Don't do subpixel (ignore_x_mode) hinting; do normal hinting. */ -#define PIXEL_HINTING_RULES_SIZE 2 - - static const SPH_TweakRule PIXEL_HINTING_Rules - [PIXEL_HINTING_RULES_SIZE] = - { - /* these characters are almost always safe */ - { "Courier New", 12, "Italic", 'z' }, - { "Courier New", 11, "Italic", 'z' }, - }; - - - /* Subpixel hinting ignores SHPIX rules on X. Force SHPIX for these. */ -#define DO_SHPIX_RULES_SIZE 1 - - static const SPH_TweakRule DO_SHPIX_Rules - [DO_SHPIX_RULES_SIZE] = - { - { "-", 0, "", 0 }, - }; - - - /* Skip Y moves that start with a point that is not on a Y pixel */ - /* boundary and don't move that point to a Y pixel boundary. */ -#define SKIP_NONPIXEL_Y_MOVES_RULES_SIZE 4 - - static const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules - [SKIP_NONPIXEL_Y_MOVES_RULES_SIZE] = - { - /* fix vwxyz thinness */ - { "Consolas", 0, "", 0 }, - /* Fix thin middle stems */ - { "Core MS Legacy Fonts", 0, "Regular", 0 }, - /* Cyrillic small letter I */ - { "Legacy Sans Fonts", 0, "", 0 }, - /* Fix artifacts with some Regular & Bold */ - { "Verdana Clones", 0, "", 0 }, - }; - - -#define SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1 - - static const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions - [SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] = - { - /* Fixes < and > */ - { "Courier New", 0, "Regular", 0 }, - }; - - - /* Skip Y moves that start with a point that is not on a Y pixel */ - /* boundary and don't move that point to a Y pixel boundary. */ -#define SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE 2 - - static const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_DELTAP_Rules - [SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE] = - { - /* Maintain thickness of diagonal in 'N' */ - { "Times New Roman", 0, "Regular/Bold Class", 'N' }, - { "Georgia", 0, "Regular/Bold Class", 'N' }, - }; - - - /* Skip Y moves that move a point off a Y pixel boundary. */ -#define SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE 1 - - static const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules - [SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE] = - { - { "-", 0, "", 0 }, - }; - - -#define SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1 - - static const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules_Exceptions - [SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] = - { - { "-", 0, "", 0 }, - }; - - - /* Round moves that don't move a point to a Y pixel boundary. */ -#define ROUND_NONPIXEL_Y_MOVES_RULES_SIZE 2 - - static const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules - [ROUND_NONPIXEL_Y_MOVES_RULES_SIZE] = - { - /* Droid font instructions don't snap Y to pixels */ - { "Droid Sans", 0, "Regular/Italic Class", 0 }, - { "Droid Sans Mono", 0, "", 0 }, - }; - - -#define ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1 - - static const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions - [ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] = - { - { "-", 0, "", 0 }, - }; - - - /* Allow a Direct_Move along X freedom vector if matched. */ -#define ALLOW_X_DMOVE_RULES_SIZE 1 - - static const SPH_TweakRule ALLOW_X_DMOVE_Rules - [ALLOW_X_DMOVE_RULES_SIZE] = - { - /* Fixes vanishing diagonal in 4 */ - { "Verdana", 0, "Regular", '4' }, - }; - - - /* Return MS rasterizer version 35 if matched. */ -#define RASTERIZER_35_RULES_SIZE 8 - - static const SPH_TweakRule RASTERIZER_35_Rules - [RASTERIZER_35_RULES_SIZE] = - { - /* This seems to be the only way to make these look good */ - { "Times New Roman", 0, "Regular", 'i' }, - { "Times New Roman", 0, "Regular", 'j' }, - { "Times New Roman", 0, "Regular", 'm' }, - { "Times New Roman", 0, "Regular", 'r' }, - { "Times New Roman", 0, "Regular", 'a' }, - { "Times New Roman", 0, "Regular", 'n' }, - { "Times New Roman", 0, "Regular", 'p' }, - { "Times", 0, "", 0 }, - }; - - - /* Don't round to the subpixel grid. Round to pixel grid. */ -#define NORMAL_ROUND_RULES_SIZE 1 - - static const SPH_TweakRule NORMAL_ROUND_Rules - [NORMAL_ROUND_RULES_SIZE] = - { - /* Fix serif thickness for certain ppems */ - /* Can probably be generalized somehow */ - { "Courier New", 0, "", 0 }, - }; - - - /* Skip IUP instructions if matched. */ -#define SKIP_IUP_RULES_SIZE 1 - - static const SPH_TweakRule SKIP_IUP_Rules - [SKIP_IUP_RULES_SIZE] = - { - { "Arial", 13, "Regular", 'a' }, - }; - - - /* Skip MIAP Twilight hack if matched. */ -#define MIAP_HACK_RULES_SIZE 1 - - static const SPH_TweakRule MIAP_HACK_Rules - [MIAP_HACK_RULES_SIZE] = - { - { "Geneva", 12, "", 0 }, - }; - - - /* Skip DELTAP instructions if matched. */ -#define ALWAYS_SKIP_DELTAP_RULES_SIZE 23 - - static const SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules - [ALWAYS_SKIP_DELTAP_RULES_SIZE] = - { - { "Georgia", 0, "Regular", 'k' }, - /* fix various problems with e in different versions */ - { "Trebuchet MS", 14, "Regular", 'e' }, - { "Trebuchet MS", 13, "Regular", 'e' }, - { "Trebuchet MS", 15, "Regular", 'e' }, - { "Trebuchet MS", 0, "Italic", 'v' }, - { "Trebuchet MS", 0, "Italic", 'w' }, - { "Trebuchet MS", 0, "Regular", 'Y' }, - { "Arial", 11, "Regular", 's' }, - /* prevent problems with '3' and others */ - { "Verdana", 10, "Regular", 0 }, - { "Verdana", 9, "Regular", 0 }, - /* Cyrillic small letter short I */ - { "Legacy Sans Fonts", 0, "", 0x438 }, - { "Legacy Sans Fonts", 0, "", 0x439 }, - { "Arial", 10, "Regular", '6' }, - { "Arial", 0, "Bold/BoldItalic Class", 'a' }, - /* Make horizontal stems consistent with the rest */ - { "Arial", 24, "Bold", 'a' }, - { "Arial", 25, "Bold", 'a' }, - { "Arial", 24, "Bold", 's' }, - { "Arial", 25, "Bold", 's' }, - { "Arial", 34, "Bold", 's' }, - { "Arial", 35, "Bold", 's' }, - { "Arial", 36, "Bold", 's' }, - { "Arial", 25, "Regular", 's' }, - { "Arial", 26, "Regular", 's' }, - }; - - - /* Always do DELTAP instructions if matched. */ -#define ALWAYS_DO_DELTAP_RULES_SIZE 1 - - static const SPH_TweakRule ALWAYS_DO_DELTAP_Rules - [ALWAYS_DO_DELTAP_RULES_SIZE] = - { - { "-", 0, "", 0 }, - }; - - - /* Don't allow ALIGNRP after IUP. */ -#define NO_ALIGNRP_AFTER_IUP_RULES_SIZE 1 - - static const SPH_TweakRule NO_ALIGNRP_AFTER_IUP_Rules - [NO_ALIGNRP_AFTER_IUP_RULES_SIZE] = - { - /* Prevent creation of dents in outline */ - { "-", 0, "", 0 }, - }; - - - /* Don't allow DELTAP after IUP. */ -#define NO_DELTAP_AFTER_IUP_RULES_SIZE 1 - - static const SPH_TweakRule NO_DELTAP_AFTER_IUP_Rules - [NO_DELTAP_AFTER_IUP_RULES_SIZE] = - { - { "-", 0, "", 0 }, - }; - - - /* Don't allow CALL after IUP. */ -#define NO_CALL_AFTER_IUP_RULES_SIZE 1 - - static const SPH_TweakRule NO_CALL_AFTER_IUP_Rules - [NO_CALL_AFTER_IUP_RULES_SIZE] = - { - /* Prevent creation of dents in outline */ - { "-", 0, "", 0 }, - }; - - - /* De-embolden these glyphs slightly. */ -#define DEEMBOLDEN_RULES_SIZE 9 - - static const SPH_TweakRule DEEMBOLDEN_Rules - [DEEMBOLDEN_RULES_SIZE] = - { - { "Courier New", 0, "Bold", 'A' }, - { "Courier New", 0, "Bold", 'W' }, - { "Courier New", 0, "Bold", 'w' }, - { "Courier New", 0, "Bold", 'M' }, - { "Courier New", 0, "Bold", 'X' }, - { "Courier New", 0, "Bold", 'K' }, - { "Courier New", 0, "Bold", 'x' }, - { "Courier New", 0, "Bold", 'z' }, - { "Courier New", 0, "Bold", 'v' }, - }; - - - /* Embolden these glyphs slightly. */ -#define EMBOLDEN_RULES_SIZE 2 - - static const SPH_TweakRule EMBOLDEN_Rules - [EMBOLDEN_RULES_SIZE] = - { - { "Courier New", 0, "Regular", 0 }, - { "Courier New", 0, "Italic", 0 }, - }; - - - /* This is a CVT hack that makes thick horizontal stems on 2, 5, 7 */ - /* similar to Windows XP. */ -#define TIMES_NEW_ROMAN_HACK_RULES_SIZE 12 - - static const SPH_TweakRule TIMES_NEW_ROMAN_HACK_Rules - [TIMES_NEW_ROMAN_HACK_RULES_SIZE] = - { - { "Times New Roman", 16, "Italic", '2' }, - { "Times New Roman", 16, "Italic", '5' }, - { "Times New Roman", 16, "Italic", '7' }, - { "Times New Roman", 16, "Regular", '2' }, - { "Times New Roman", 16, "Regular", '5' }, - { "Times New Roman", 16, "Regular", '7' }, - { "Times New Roman", 17, "Italic", '2' }, - { "Times New Roman", 17, "Italic", '5' }, - { "Times New Roman", 17, "Italic", '7' }, - { "Times New Roman", 17, "Regular", '2' }, - { "Times New Roman", 17, "Regular", '5' }, - { "Times New Roman", 17, "Regular", '7' }, - }; - - - /* This fudges distance on 2 to get rid of the vanishing stem issue. */ - /* A real solution to this is certainly welcome. */ -#define COURIER_NEW_2_HACK_RULES_SIZE 15 - - static const SPH_TweakRule COURIER_NEW_2_HACK_Rules - [COURIER_NEW_2_HACK_RULES_SIZE] = - { - { "Courier New", 10, "Regular", '2' }, - { "Courier New", 11, "Regular", '2' }, - { "Courier New", 12, "Regular", '2' }, - { "Courier New", 13, "Regular", '2' }, - { "Courier New", 14, "Regular", '2' }, - { "Courier New", 15, "Regular", '2' }, - { "Courier New", 16, "Regular", '2' }, - { "Courier New", 17, "Regular", '2' }, - { "Courier New", 18, "Regular", '2' }, - { "Courier New", 19, "Regular", '2' }, - { "Courier New", 20, "Regular", '2' }, - { "Courier New", 21, "Regular", '2' }, - { "Courier New", 22, "Regular", '2' }, - { "Courier New", 23, "Regular", '2' }, - { "Courier New", 24, "Regular", '2' }, - }; - - -#ifndef FORCE_NATURAL_WIDTHS - - /* Use compatible widths with these glyphs. Compatible widths is always */ - /* on when doing B/W TrueType instructing, but is used selectively here, */ - /* typically on glyphs with 3 or more vertical stems. */ -#define COMPATIBLE_WIDTHS_RULES_SIZE 38 - - static const SPH_TweakRule COMPATIBLE_WIDTHS_Rules - [COMPATIBLE_WIDTHS_RULES_SIZE] = - { - { "Arial Unicode MS", 12, "Regular Class", 'm' }, - { "Arial Unicode MS", 14, "Regular Class", 'm' }, - /* Cyrillic small letter sha */ - { "Arial", 10, "Regular Class", 0x448 }, - { "Arial", 11, "Regular Class", 'm' }, - { "Arial", 12, "Regular Class", 'm' }, - /* Cyrillic small letter sha */ - { "Arial", 12, "Regular Class", 0x448 }, - { "Arial", 13, "Regular Class", 0x448 }, - { "Arial", 14, "Regular Class", 'm' }, - /* Cyrillic small letter sha */ - { "Arial", 14, "Regular Class", 0x448 }, - { "Arial", 15, "Regular Class", 0x448 }, - { "Arial", 17, "Regular Class", 'm' }, - { "DejaVu Sans", 15, "Regular Class", 0 }, - { "Microsoft Sans Serif", 11, "Regular Class", 0 }, - { "Microsoft Sans Serif", 12, "Regular Class", 0 }, - { "Segoe UI", 11, "Regular Class", 0 }, - { "Monaco", 0, "Regular Class", 0 }, - { "Segoe UI", 12, "Regular Class", 'm' }, - { "Segoe UI", 14, "Regular Class", 'm' }, - { "Tahoma", 11, "Regular Class", 0 }, - { "Times New Roman", 16, "Regular Class", 'c' }, - { "Times New Roman", 16, "Regular Class", 'm' }, - { "Times New Roman", 16, "Regular Class", 'o' }, - { "Times New Roman", 16, "Regular Class", 'w' }, - { "Trebuchet MS", 11, "Regular Class", 0 }, - { "Trebuchet MS", 12, "Regular Class", 0 }, - { "Trebuchet MS", 14, "Regular Class", 0 }, - { "Trebuchet MS", 15, "Regular Class", 0 }, - { "Ubuntu", 12, "Regular Class", 'm' }, - /* Cyrillic small letter sha */ - { "Verdana", 10, "Regular Class", 0x448 }, - { "Verdana", 11, "Regular Class", 0x448 }, - { "Verdana and Clones", 12, "Regular Class", 'i' }, - { "Verdana and Clones", 12, "Regular Class", 'j' }, - { "Verdana and Clones", 12, "Regular Class", 'l' }, - { "Verdana and Clones", 12, "Regular Class", 'm' }, - { "Verdana and Clones", 13, "Regular Class", 'i' }, - { "Verdana and Clones", 13, "Regular Class", 'j' }, - { "Verdana and Clones", 13, "Regular Class", 'l' }, - { "Verdana and Clones", 14, "Regular Class", 'm' }, - }; - - - /* Scaling slightly in the x-direction prior to hinting results in */ - /* more visually pleasing glyphs in certain cases. */ - /* This sometimes needs to be coordinated with compatible width rules. */ - /* A value of 1000 corresponds to a scaled value of 1.0. */ - -#define X_SCALING_RULES_SIZE 50 - - static const SPH_ScaleRule X_SCALING_Rules[X_SCALING_RULES_SIZE] = - { - { "DejaVu Sans", 12, "Regular Class", 'm', 950 }, - { "Verdana and Clones", 12, "Regular Class", 'a', 1100 }, - { "Verdana and Clones", 13, "Regular Class", 'a', 1050 }, - { "Arial", 11, "Regular Class", 'm', 975 }, - { "Arial", 12, "Regular Class", 'm', 1050 }, - /* Cyrillic small letter el */ - { "Arial", 13, "Regular Class", 0x43B, 950 }, - { "Arial", 13, "Regular Class", 'o', 950 }, - { "Arial", 13, "Regular Class", 'e', 950 }, - { "Arial", 14, "Regular Class", 'm', 950 }, - /* Cyrillic small letter el */ - { "Arial", 15, "Regular Class", 0x43B, 925 }, - { "Bitstream Vera Sans", 10, "Regular/Italic Class", 0, 1100 }, - { "Bitstream Vera Sans", 12, "Regular/Italic Class", 0, 1050 }, - { "Bitstream Vera Sans", 16, "Regular Class", 0, 1050 }, - { "Bitstream Vera Sans", 9, "Regular/Italic Class", 0, 1050 }, - { "DejaVu Sans", 12, "Regular Class", 'l', 975 }, - { "DejaVu Sans", 12, "Regular Class", 'i', 975 }, - { "DejaVu Sans", 12, "Regular Class", 'j', 975 }, - { "DejaVu Sans", 13, "Regular Class", 'l', 950 }, - { "DejaVu Sans", 13, "Regular Class", 'i', 950 }, - { "DejaVu Sans", 13, "Regular Class", 'j', 950 }, - { "DejaVu Sans", 10, "Regular/Italic Class", 0, 1100 }, - { "DejaVu Sans", 12, "Regular/Italic Class", 0, 1050 }, - { "Georgia", 10, "", 0, 1050 }, - { "Georgia", 11, "", 0, 1100 }, - { "Georgia", 12, "", 0, 1025 }, - { "Georgia", 13, "", 0, 1050 }, - { "Georgia", 16, "", 0, 1050 }, - { "Georgia", 17, "", 0, 1030 }, - { "Liberation Sans", 12, "Regular Class", 'm', 1100 }, - { "Lucida Grande", 11, "Regular Class", 'm', 1100 }, - { "Microsoft Sans Serif", 11, "Regular Class", 'm', 950 }, - { "Microsoft Sans Serif", 12, "Regular Class", 'm', 1050 }, - { "Segoe UI", 12, "Regular Class", 'H', 1050 }, - { "Segoe UI", 12, "Regular Class", 'm', 1050 }, - { "Segoe UI", 14, "Regular Class", 'm', 1050 }, - { "Tahoma", 11, "Regular Class", 'i', 975 }, - { "Tahoma", 11, "Regular Class", 'l', 975 }, - { "Tahoma", 11, "Regular Class", 'j', 900 }, - { "Tahoma", 11, "Regular Class", 'm', 918 }, - { "Verdana", 10, "Regular/Italic Class", 0, 1100 }, - { "Verdana", 12, "Regular Class", 'm', 975 }, - { "Verdana", 12, "Regular/Italic Class", 0, 1050 }, - { "Verdana", 13, "Regular/Italic Class", 'i', 950 }, - { "Verdana", 13, "Regular/Italic Class", 'j', 950 }, - { "Verdana", 13, "Regular/Italic Class", 'l', 950 }, - { "Verdana", 16, "Regular Class", 0, 1050 }, - { "Verdana", 9, "Regular/Italic Class", 0, 1050 }, - { "Times New Roman", 16, "Regular Class", 'm', 918 }, - { "Trebuchet MS", 11, "Regular Class", 'm', 800 }, - { "Trebuchet MS", 12, "Regular Class", 'm', 800 }, - }; - -#else - -#define COMPATIBLE_WIDTHS_RULES_SIZE 1 - - static const SPH_TweakRule COMPATIBLE_WIDTHS_Rules - [COMPATIBLE_WIDTHS_RULES_SIZE] = - { - { "-", 0, "", 0 }, - }; - - -#define X_SCALING_RULES_SIZE 1 - - static const SPH_ScaleRule X_SCALING_Rules - [X_SCALING_RULES_SIZE] = - { - { "-", 0, "", 0, 1000 }, - }; - -#endif /* FORCE_NATURAL_WIDTHS */ - - - static FT_Bool - is_member_of_family_class( const FT_String* detected_font_name, - const FT_String* rule_font_name ) - { - FT_UInt i, j; - - - /* Does font name match rule family? */ - if ( ft_strcmp( detected_font_name, rule_font_name ) == 0 ) - return TRUE; - - /* Is font name a wildcard ""? */ - if ( ft_strcmp( rule_font_name, "" ) == 0 ) - return TRUE; - - /* Is font name contained in a class list? */ - for ( i = 0; i < FAMILY_CLASS_RULES_SIZE; i++ ) - { - if ( ft_strcmp( FAMILY_CLASS_Rules[i].name, rule_font_name ) == 0 ) - { - for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ ) - { - if ( ft_strcmp( FAMILY_CLASS_Rules[i].member[j], "" ) == 0 ) - continue; - if ( ft_strcmp( FAMILY_CLASS_Rules[i].member[j], - detected_font_name ) == 0 ) - return TRUE; - } - } - } - - return FALSE; - } - - - static FT_Bool - is_member_of_style_class( const FT_String* detected_font_style, - const FT_String* rule_font_style ) - { - FT_UInt i, j; - - - /* Does font style match rule style? */ - if ( ft_strcmp( detected_font_style, rule_font_style ) == 0 ) - return TRUE; - - /* Is font style a wildcard ""? */ - if ( ft_strcmp( rule_font_style, "" ) == 0 ) - return TRUE; - - /* Is font style contained in a class list? */ - for ( i = 0; i < STYLE_CLASS_RULES_SIZE; i++ ) - { - if ( ft_strcmp( STYLE_CLASS_Rules[i].name, rule_font_style ) == 0 ) - { - for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ ) - { - if ( ft_strcmp( STYLE_CLASS_Rules[i].member[j], "" ) == 0 ) - continue; - if ( ft_strcmp( STYLE_CLASS_Rules[i].member[j], - detected_font_style ) == 0 ) - return TRUE; - } - } - } - - return FALSE; - } - - - FT_LOCAL_DEF( FT_Bool ) - sph_test_tweak( TT_Face face, - const FT_String* family, - FT_UInt ppem, - const FT_String* style, - FT_UInt glyph_index, - const SPH_TweakRule* rule, - FT_UInt num_rules ) - { - FT_UInt i; - - - /* rule checks may be able to be optimized further */ - for ( i = 0; i < num_rules; i++ ) - { - if ( family && - ( is_member_of_family_class ( family, rule[i].family ) ) ) - if ( rule[i].ppem == 0 || - rule[i].ppem == ppem ) - if ( style && - is_member_of_style_class ( style, rule[i].style ) ) - if ( rule[i].glyph == 0 || - FT_Get_Char_Index( (FT_Face)face, - rule[i].glyph ) == glyph_index ) - return TRUE; - } - - return FALSE; - } - - - static FT_UInt - scale_test_tweak( TT_Face face, - const FT_String* family, - FT_UInt ppem, - const FT_String* style, - FT_UInt glyph_index, - const SPH_ScaleRule* rule, - FT_UInt num_rules ) - { - FT_UInt i; - - - /* rule checks may be able to be optimized further */ - for ( i = 0; i < num_rules; i++ ) - { - if ( family && - ( is_member_of_family_class ( family, rule[i].family ) ) ) - if ( rule[i].ppem == 0 || - rule[i].ppem == ppem ) - if ( style && - is_member_of_style_class( style, rule[i].style ) ) - if ( rule[i].glyph == 0 || - FT_Get_Char_Index( (FT_Face)face, - rule[i].glyph ) == glyph_index ) - return rule[i].scale; - } - - return 1000; - } - - - FT_LOCAL_DEF( FT_UInt ) - sph_test_tweak_x_scaling( TT_Face face, - const FT_String* family, - FT_UInt ppem, - const FT_String* style, - FT_UInt glyph_index ) - { - return scale_test_tweak( face, family, ppem, style, glyph_index, - X_SCALING_Rules, X_SCALING_RULES_SIZE ); - } - - -#define TWEAK_RULES( x ) \ - if ( sph_test_tweak( face, family, ppem, style, glyph_index, \ - x##_Rules, x##_RULES_SIZE ) ) \ - loader->exec->sph_tweak_flags |= SPH_TWEAK_##x - -#define TWEAK_RULES_EXCEPTIONS( x ) \ - if ( sph_test_tweak( face, family, ppem, style, glyph_index, \ - x##_Rules_Exceptions, x##_RULES_EXCEPTIONS_SIZE ) ) \ - loader->exec->sph_tweak_flags &= ~SPH_TWEAK_##x - - - FT_LOCAL_DEF( void ) - sph_set_tweaks( TT_Loader loader, - FT_UInt glyph_index ) - { - TT_Face face = loader->face; - FT_String* family = face->root.family_name; - FT_UInt ppem = loader->size->metrics->x_ppem; - FT_String* style = face->root.style_name; - - - /* don't apply rules if style isn't set */ - if ( !face->root.style_name ) - return; - -#ifdef SPH_DEBUG_MORE_VERBOSE - printf( "%s,%d,%s,%c=%d ", - family, ppem, style, glyph_index, glyph_index ); -#endif - - TWEAK_RULES( PIXEL_HINTING ); - - if ( loader->exec->sph_tweak_flags & SPH_TWEAK_PIXEL_HINTING ) - { - loader->exec->ignore_x_mode = FALSE; - return; - } - - TWEAK_RULES( ALLOW_X_DMOVE ); - TWEAK_RULES( ALWAYS_DO_DELTAP ); - TWEAK_RULES( ALWAYS_SKIP_DELTAP ); - TWEAK_RULES( DEEMBOLDEN ); - TWEAK_RULES( DO_SHPIX ); - TWEAK_RULES( EMBOLDEN ); - TWEAK_RULES( MIAP_HACK ); - TWEAK_RULES( NORMAL_ROUND ); - TWEAK_RULES( NO_ALIGNRP_AFTER_IUP ); - TWEAK_RULES( NO_CALL_AFTER_IUP ); - TWEAK_RULES( NO_DELTAP_AFTER_IUP ); - TWEAK_RULES( RASTERIZER_35 ); - TWEAK_RULES( SKIP_IUP ); - - TWEAK_RULES( SKIP_OFFPIXEL_Y_MOVES ); - TWEAK_RULES_EXCEPTIONS( SKIP_OFFPIXEL_Y_MOVES ); - - TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES_DELTAP ); - - TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES ); - TWEAK_RULES_EXCEPTIONS( SKIP_NONPIXEL_Y_MOVES ); - - TWEAK_RULES( ROUND_NONPIXEL_Y_MOVES ); - TWEAK_RULES_EXCEPTIONS( ROUND_NONPIXEL_Y_MOVES ); - - if ( loader->exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 ) - { - if ( loader->exec->rasterizer_version != TT_INTERPRETER_VERSION_35 ) - { - loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35; - loader->exec->size->cvt_ready = -1; - - tt_size_ready_bytecode( - loader->exec->size, - FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) ); - } - else - loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35; - } - else - { - if ( loader->exec->rasterizer_version != - SPH_OPTION_SET_RASTERIZER_VERSION ) - { - loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; - loader->exec->size->cvt_ready = -1; - - tt_size_ready_bytecode( - loader->exec->size, - FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) ); - } - else - loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; - } - - if ( IS_HINTED( loader->load_flags ) ) - { - TWEAK_RULES( TIMES_NEW_ROMAN_HACK ); - TWEAK_RULES( COURIER_NEW_2_HACK ); - } - - if ( sph_test_tweak( face, family, ppem, style, glyph_index, - COMPATIBILITY_MODE_Rules, COMPATIBILITY_MODE_RULES_SIZE ) ) - loader->exec->face->sph_compatibility_mode = TRUE; - - - if ( IS_HINTED( loader->load_flags ) ) - { - if ( sph_test_tweak( face, family, ppem, style, glyph_index, - COMPATIBLE_WIDTHS_Rules, COMPATIBLE_WIDTHS_RULES_SIZE ) ) - loader->exec->compatible_widths |= TRUE; - } - } - -#else /* !(TT_USE_BYTECODE_INTERPRETER && */ - /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */ - - /* ANSI C doesn't like empty source files */ - typedef int _tt_subpix_dummy; - -#endif /* !(TT_USE_BYTECODE_INTERPRETER && */ - /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */ - - -/* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -/**************************************************************************** - * - * ttsubpix.h - * - * TrueType Subpixel Hinting. - * - * Copyright (C) 2010-2023 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - */ - - -#ifndef TTSUBPIX_H_ -#define TTSUBPIX_H_ - -#include "ttobjs.h" -#include "ttinterp.h" - - -FT_BEGIN_HEADER - - -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY - - /************************************************************************** - * - * ID flags to identify special functions at FDEF and runtime. - * - */ -#define SPH_FDEF_INLINE_DELTA_1 0x0000001 -#define SPH_FDEF_INLINE_DELTA_2 0x0000002 -#define SPH_FDEF_DIAGONAL_STROKE 0x0000004 -#define SPH_FDEF_VACUFORM_ROUND_1 0x0000008 -#define SPH_FDEF_TTFAUTOHINT_1 0x0000010 -#define SPH_FDEF_SPACING_1 0x0000020 -#define SPH_FDEF_SPACING_2 0x0000040 -#define SPH_FDEF_TYPEMAN_STROKES 0x0000080 -#define SPH_FDEF_TYPEMAN_DIAGENDCTRL 0x0000100 - - - /************************************************************************** - * - * Tweak flags that are set for each glyph by the below rules. - * - */ -#define SPH_TWEAK_ALLOW_X_DMOVE 0x0000001UL -#define SPH_TWEAK_ALWAYS_DO_DELTAP 0x0000002UL -#define SPH_TWEAK_ALWAYS_SKIP_DELTAP 0x0000004UL -#define SPH_TWEAK_COURIER_NEW_2_HACK 0x0000008UL -#define SPH_TWEAK_DEEMBOLDEN 0x0000010UL -#define SPH_TWEAK_DO_SHPIX 0x0000020UL -#define SPH_TWEAK_EMBOLDEN 0x0000040UL -#define SPH_TWEAK_MIAP_HACK 0x0000080UL -#define SPH_TWEAK_NORMAL_ROUND 0x0000100UL -#define SPH_TWEAK_NO_ALIGNRP_AFTER_IUP 0x0000200UL -#define SPH_TWEAK_NO_CALL_AFTER_IUP 0x0000400UL -#define SPH_TWEAK_NO_DELTAP_AFTER_IUP 0x0000800UL -#define SPH_TWEAK_PIXEL_HINTING 0x0001000UL -#define SPH_TWEAK_RASTERIZER_35 0x0002000UL -#define SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES 0x0004000UL -#define SPH_TWEAK_SKIP_IUP 0x0008000UL -#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES 0x0010000UL -#define SPH_TWEAK_SKIP_OFFPIXEL_Y_MOVES 0x0020000UL -#define SPH_TWEAK_TIMES_NEW_ROMAN_HACK 0x0040000UL -#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP 0x0080000UL - - - FT_LOCAL( FT_Bool ) - sph_test_tweak( TT_Face face, - const FT_String* family, - FT_UInt ppem, - const FT_String* style, - FT_UInt glyph_index, - const SPH_TweakRule* rule, - FT_UInt num_rules ); - - FT_LOCAL( FT_UInt ) - sph_test_tweak_x_scaling( TT_Face face, - const FT_String* family, - FT_UInt ppem, - const FT_String* style, - FT_UInt glyph_index ); - - FT_LOCAL( void ) - sph_set_tweaks( TT_Loader loader, - FT_UInt glyph_index ); - - - /* These macros are defined absent a method for setting them */ -#define SPH_OPTION_BITMAP_WIDTHS FALSE -#define SPH_OPTION_SET_SUBPIXEL TRUE -#define SPH_OPTION_SET_GRAYSCALE FALSE -#define SPH_OPTION_SET_COMPATIBLE_WIDTHS FALSE -#define SPH_OPTION_SET_RASTERIZER_VERSION 38 - -#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ - - -FT_END_HEADER - -#endif /* TTSUBPIX_H_ */ - - -/* END */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1afm.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1afm.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1afm.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1afm.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1afm.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1afm.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1afm.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1afm.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1driver.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1driver.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1driver.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1driver.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 driver interface (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1driver.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1driver.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1driver.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1driver.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * High-level Type 1 driver interface (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1errors.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1errors.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1errors.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1errors.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 error codes (specification only). * - * Copyright (C) 2001-2024 by + * Copyright (C) 2001-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1gload.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1gload.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1gload.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1gload.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -70,8 +70,13 @@ /* For incremental fonts get the character data using the */ /* callback function. */ if ( inc ) + { + /* So `free_glyph_data` knows whether to free it. */ + char_string->pointer = NULL; + error = inc->funcs->get_glyph_data( inc->object, glyph_index, char_string ); + } else #endif /* FT_CONFIG_OPTION_INCREMENTAL */ @@ -155,6 +160,9 @@ decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v ); } + if ( error && inc ) + inc->funcs->free_glyph_data( inc->object, char_string ); + #endif /* FT_CONFIG_OPTION_INCREMENTAL */ return error; @@ -295,7 +303,7 @@ { advances[nn] = 0; - FT_TRACE5(( " idx %d: advance height 0 font units\n", + FT_TRACE5(( " idx %u: advance height 0 font units\n", first + nn )); } @@ -333,7 +341,7 @@ else advances[nn] = 0; - FT_TRACE5(( " idx %d: advance width %ld font unit%s\n", + FT_TRACE5(( " idx %u: advance width %ld font unit%s\n", first + nn, advances[nn], advances[nn] == 1 ? "" : "s" )); @@ -380,7 +388,7 @@ goto Exit; } - FT_TRACE1(( "T1_Load_Glyph: glyph index %d\n", glyph_index )); + FT_TRACE1(( "T1_Load_Glyph: glyph index %u\n", glyph_index )); FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) ); @@ -398,16 +406,12 @@ glyph->y_scale = 0x10000L; } - t1glyph->outline.n_points = 0; - t1glyph->outline.n_contours = 0; - hinting = FT_BOOL( !( load_flags & FT_LOAD_NO_SCALE ) && !( load_flags & FT_LOAD_NO_HINTING ) ); scaled = FT_BOOL( !( load_flags & FT_LOAD_NO_SCALE ) ); glyph->hint = hinting; glyph->scaled = scaled; - t1glyph->format = FT_GLYPH_FORMAT_OUTLINE; error = decoder_funcs->init( &decoder, t1glyph->face, @@ -452,16 +456,12 @@ must_finish_decoder = FALSE; - /* now, set the metrics -- this is rather simple, as */ - /* the left side bearing is the xMin, and the top side */ - /* bearing the yMax */ if ( !error ) { - t1glyph->outline.flags &= FT_OUTLINE_OWNER; - t1glyph->outline.flags |= FT_OUTLINE_REVERSE_FILL; - - /* for composite glyphs, return only left side bearing and */ - /* advance width */ + /* now, set the metrics -- this is rather simple, as */ + /* the left side bearing is the xMin, and the top side */ + /* bearing the yMax; for composite glyphs, return only */ + /* left side bearing and advance width */ if ( load_flags & FT_LOAD_NO_RECURSE ) { FT_Slot_Internal internal = t1glyph->internal; @@ -482,6 +482,13 @@ FT_Glyph_Metrics* metrics = &t1glyph->metrics; + t1glyph->format = FT_GLYPH_FORMAT_OUTLINE; + + t1glyph->outline.flags &= FT_OUTLINE_OWNER; + t1glyph->outline.flags |= FT_OUTLINE_REVERSE_FILL; + if ( t1size && t1size->metrics.y_ppem < 24 ) + t1glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; + /* copy the _unscaled_ advance width */ metrics->horiAdvance = FIXED_TO_INT( decoder.builder.advance.x ); @@ -504,11 +511,6 @@ FIXED_TO_INT( decoder.builder.advance.y ); } - t1glyph->format = FT_GLYPH_FORMAT_OUTLINE; - - if ( t1size && t1size->metrics.y_ppem < 24 ) - t1glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; - #if 1 /* apply the font matrix, if any */ if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L || diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1gload.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1gload.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1gload.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1gload.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1load.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1load.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1load.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1load.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 font loader (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -471,7 +471,7 @@ nc = num_coords; if ( num_coords > blend->num_axis ) { - FT_TRACE2(( "T1_Get_MM_Blend: only using first %d of %d coordinates\n", + FT_TRACE2(( "T1_Get_MM_Blend: only using first %u of %u coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } @@ -640,7 +640,7 @@ { FT_UNUSED( instance_index ); - return T1_Set_MM_Blend( face, 0, NULL ); + return T1_Set_MM_WeightVector( face, 0, NULL ); } @@ -691,7 +691,7 @@ if ( num_coords > blend->num_axis ) { FT_TRACE2(( "T1_Get_Var_Design:" - " only using first %d of %d coordinates\n", + " only using first %u of %u coordinates\n", blend->num_axis, num_coords )); nc = blend->num_axis; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1load.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1load.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1load.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1load.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 font loader (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1objs.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1objs.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1objs.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1objs.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 objects manager (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1objs.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1objs.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1objs.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1objs.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 objects manager (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1parse.c openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1parse.c --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1parse.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1parse.c 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 parser (body). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1parse.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1parse.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1parse.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1parse.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 parser (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1tokens.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1tokens.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libfreetype/src/type1/t1tokens.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libfreetype/src/type1/t1tokens.h 2026-04-17 19:08:13.000000000 +0000 @@ -4,7 +4,7 @@ * * Type 1 tokenizer (specification). * - * Copyright (C) 1996-2024 by + * Copyright (C) 1996-2025 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -33,7 +33,7 @@ T1_FIELD_DICT_FONTDICT ) /* we use pointers to detect modifications made by synthetic fonts */ - T1_FIELD_NUM ( "ItalicAngle", italic_angle, + T1_FIELD_FIXED ( "ItalicAngle", italic_angle, T1_FIELD_DICT_FONTDICT ) T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch, T1_FIELD_DICT_FONTDICT ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Color/COLR/COLR.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Color/COLR/COLR.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Color/COLR/COLR.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Color/COLR/COLR.hh 2026-04-17 19:08:13.000000000 +0000 @@ -104,7 +104,7 @@ foreground (foreground_), instancer (instancer_) { - if (font->is_synthetic ()) + if (font->is_synthetic) { font = hb_font_create_sub_font (font); hb_font_set_synthetic_bold (font, 0, 0, true); @@ -178,7 +178,10 @@ { glyphs->add (glyph_id); } void add_layer_indices (unsigned first_layer_index, unsigned num_of_layers) - { layer_indices->add_range (first_layer_index, first_layer_index + num_of_layers - 1); } + { + if (num_of_layers == 0) return; + layer_indices->add_range (first_layer_index, first_layer_index + num_of_layers - 1); + } void add_palette_index (unsigned palette_index) { palette_indices->add (palette_index); } @@ -650,10 +653,10 @@ TRACE_SUBSET (this); auto *out = c->serializer->embed (this); if (unlikely (!out)) return_trace (false); - return_trace (c->serializer->check_assign (out->firstLayerIndex, c->plan->colrv1_layers.get (firstLayerIndex), - HB_SERIALIZE_ERROR_INT_OVERFLOW)); - return_trace (true); + uint32_t first_layer_index = numLayers ? c->plan->colrv1_layers.get (firstLayerIndex) : 0; + return_trace (c->serializer->check_assign (out->firstLayerIndex, first_layer_index, + HB_SERIALIZE_ERROR_INT_OVERFLOW)); } bool sanitize (hb_sanitize_context_t *c) const @@ -1075,9 +1078,9 @@ float ddx = dx + c->instancer (varIdxBase, 0); float ddy = dy + c->instancer (varIdxBase, 1); - bool p1 = c->funcs->push_translate (c->data, ddx, ddy); + c->funcs->push_translate (c->data, ddx, ddy); c->recurse (this+src); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 14(noVar) or 15 (Var) */ @@ -1124,9 +1127,9 @@ float sx = scaleX.to_float (c->instancer (varIdxBase, 0)); float sy = scaleY.to_float (c->instancer (varIdxBase, 1)); - bool p1 = c->funcs->push_scale (c->data, sx, sy); + c->funcs->push_scale (c->data, sx, sy); c->recurse (this+src); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 16 (noVar) or 17(Var) */ @@ -1177,13 +1180,9 @@ float tCenterX = centerX + c->instancer (varIdxBase, 2); float tCenterY = centerY + c->instancer (varIdxBase, 3); - bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); - bool p2 = c->funcs->push_scale (c->data, sx, sy); - bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->funcs->push_scale_around_center (c->data, sx, sy, tCenterX, tCenterY); c->recurse (this+src); - if (p3) c->funcs->pop_transform (c->data); - if (p2) c->funcs->pop_transform (c->data); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 18 (noVar) or 19(Var) */ @@ -1228,9 +1227,9 @@ TRACE_PAINT (this); float s = scale.to_float (c->instancer (varIdxBase, 0)); - bool p1 = c->funcs->push_scale (c->data, s, s); + c->funcs->push_scale (c->data, s, s); c->recurse (this+src); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 20 (noVar) or 21(Var) */ @@ -1278,13 +1277,9 @@ float tCenterX = centerX + c->instancer (varIdxBase, 1); float tCenterY = centerY + c->instancer (varIdxBase, 2); - bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); - bool p2 = c->funcs->push_scale (c->data, s, s); - bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->funcs->push_scale_around_center (c->data, s, s, tCenterX, tCenterY); c->recurse (this+src); - if (p3) c->funcs->pop_transform (c->data); - if (p2) c->funcs->pop_transform (c->data); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 22 (noVar) or 23(Var) */ @@ -1328,9 +1323,9 @@ TRACE_PAINT (this); float a = angle.to_float (c->instancer (varIdxBase, 0)); - bool p1 = c->funcs->push_rotate (c->data, a); + c->funcs->push_rotate (c->data, a); c->recurse (this+src); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 24 (noVar) or 25(Var) */ @@ -1378,13 +1373,9 @@ float tCenterX = centerX + c->instancer (varIdxBase, 1); float tCenterY = centerY + c->instancer (varIdxBase, 2); - bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); - bool p2 = c->funcs->push_rotate (c->data, a); - bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->funcs->push_rotate_around_center (c->data, a, tCenterX, tCenterY); c->recurse (this+src); - if (p3) c->funcs->pop_transform (c->data); - if (p2) c->funcs->pop_transform (c->data); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 26 (noVar) or 27(Var) */ @@ -1432,9 +1423,9 @@ float sx = xSkewAngle.to_float(c->instancer (varIdxBase, 0)); float sy = ySkewAngle.to_float(c->instancer (varIdxBase, 1)); - bool p1 = c->funcs->push_skew (c->data, sx, sy); + c->funcs->push_skew (c->data, sx, sy); c->recurse (this+src); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 28(noVar) or 29 (Var) */ @@ -1485,13 +1476,9 @@ float tCenterX = centerX + c->instancer (varIdxBase, 2); float tCenterY = centerY + c->instancer (varIdxBase, 3); - bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); - bool p2 = c->funcs->push_skew (c->data, sx, sy); - bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->funcs->push_skew_around_center (c->data, sx, sy, tCenterX, tCenterY); c->recurse (this+src); - if (p3) c->funcs->pop_transform (c->data); - if (p2) c->funcs->pop_transform (c->data); - if (p1) c->funcs->pop_transform (c->data); + c->funcs->pop_transform (c->data); } HBUINT8 format; /* format = 30(noVar) or 31 (Var) */ @@ -1626,7 +1613,7 @@ const ItemVarStoreInstancer &instancer) const { TRACE_SUBSET (this); - switch (u.format) { + switch (u.format.v) { case 1: return_trace (u.format1.subset (c, instancer, VarIdx::NO_VARIATION)); case 2: return_trace (u.format2.subset (c, instancer)); default:return_trace (c->default_return_value ()); @@ -1635,7 +1622,7 @@ void closurev1 (hb_colrv1_closure_context_t* c) const { - switch (u.format) { + switch (u.format.v) { case 2: u.format2.closurev1 (c); return; default:return; } @@ -1644,9 +1631,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); @@ -1657,7 +1644,7 @@ const ItemVarStoreInstancer &instancer) const { ClipBoxData clip_box; - switch (u.format) { + switch (u.format.v) { case 1: u.format1.get_clip_box (clip_box, instancer); break; @@ -1677,7 +1664,7 @@ protected: union { - HBUINT8 format; /* Format identifier */ + struct { HBUINT8 v; } format; /* Format identifier */ ClipBoxFormat1 format1; ClipBoxFormat2 format2; } u; @@ -1857,9 +1844,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.paintformat1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.paintformat2, std::forward<Ts> (ds)...)); case 3: return_trace (c->dispatch (u.paintformat3, std::forward<Ts> (ds)...)); @@ -1898,7 +1885,7 @@ protected: union { - HBUINT8 format; + struct { HBUINT8 v; } format; PaintColrLayers paintformat1; NoVariable<PaintSolid> paintformat2; Variable<PaintSolid> paintformat3; @@ -2073,7 +2060,7 @@ outer_bit_count = 1; inner_bit_count = 1; - if (unlikely (!output_map.resize (map_count, false))) return false; + if (unlikely (!output_map.resize_dirty (map_count))) return false; for (unsigned idx = 0; idx < map_count; idx++) { @@ -2693,7 +2680,8 @@ { ItemVarStoreInstancer instancer (get_var_store_ptr (), get_delta_set_index_map_ptr (), - hb_array (font->coords, font->num_coords)); + hb_array (font->coords, + font->has_nonzero_coords ? font->num_coords : 0)); hb_paint_context_t c (this, funcs, data, font, palette_index, foreground, instancer); hb_decycler_node_t node (c.glyphs_decycler); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Color/CPAL/CPAL.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Color/CPAL/CPAL.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Color/CPAL/CPAL.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Color/CPAL/CPAL.hh 2026-04-17 19:08:13.000000000 +0000 @@ -307,6 +307,7 @@ if (first_color_to_layer_index.has (first_color_record_idx)) continue; first_color_index_for_layer.push (first_color_record_idx); + if (unlikely (!c->serializer->propagate_error (first_color_index_for_layer))) return_trace (false); first_color_to_layer_index.set (first_color_record_idx, first_color_index_for_layer.length - 1); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/Coverage.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/Coverage.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/Coverage.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/Coverage.hh 2026-04-17 19:08:13.000000000 +0000 @@ -46,7 +46,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ CoverageFormat1_3<SmallTypes> format1; CoverageFormat2_4<SmallTypes> format2; #ifndef HB_NO_BEYOND_64K @@ -55,7 +55,7 @@ #endif } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); #ifndef HB_OPTIMIZE_SIZE HB_ALWAYS_INLINE @@ -63,9 +63,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) + switch (u.format.v) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); @@ -86,7 +86,7 @@ unsigned int get (hb_codepoint_t k) const { return get_coverage (k); } unsigned int get_coverage (hb_codepoint_t glyph_id) const { - switch (u.format) { + switch (u.format.v) { case 1: return u.format1.get_coverage (glyph_id); case 2: return u.format2.get_coverage (glyph_id); #ifndef HB_NO_BEYOND_64K @@ -97,18 +97,38 @@ } } unsigned int get_coverage (hb_codepoint_t glyph_id, - hb_ot_lookup_cache_t *cache) const + hb_ot_layout_mapping_cache_t *cache) const { unsigned coverage; - if (cache && cache->get (glyph_id, &coverage)) return coverage; + if (cache && cache->get (glyph_id, &coverage)) return coverage < cache->MAX_VALUE ? coverage : NOT_COVERED; coverage = get_coverage (glyph_id); - if (cache) cache->set (glyph_id, coverage); + if (cache) { + if (coverage == NOT_COVERED) + cache->set_unchecked (glyph_id, cache->MAX_VALUE); + else if (likely (coverage < cache->MAX_VALUE)) + cache->set_unchecked (glyph_id, coverage); + } + return coverage; + } + + unsigned int get_coverage_binary (hb_codepoint_t glyph_id, + hb_ot_layout_binary_cache_t *cache) const + { + unsigned coverage; + if (cache && cache->get (glyph_id, &coverage)) return coverage < cache->MAX_VALUE ? coverage : NOT_COVERED; + coverage = get_coverage (glyph_id); + if (cache) { + if (coverage == NOT_COVERED) + cache->set_unchecked (glyph_id, cache->MAX_VALUE); + else + cache->set_unchecked (glyph_id, 0); + } return coverage; } unsigned get_population () const { - switch (u.format) { + switch (u.format.v) { case 1: return u.format1.get_population (); case 2: return u.format2.get_population (); #ifndef HB_NO_BEYOND_64K @@ -140,11 +160,11 @@ last = g; if (g > max) max = g; } - u.format = !unsorted && count <= num_ranges * 3 ? 1 : 2; + u.format.v = !unsorted && count <= num_ranges * 3 ? 1 : 2; #ifndef HB_NO_BEYOND_64K if (max > 0xFFFFu) - u.format += 2; + u.format.v += 2; if (unlikely (max > 0xFFFFFFu)) #else if (unlikely (max > 0xFFFFu)) @@ -154,7 +174,7 @@ return_trace (false); } - switch (u.format) + switch (u.format.v) { case 1: return_trace (u.format1.serialize (c, glyphs)); case 2: return_trace (u.format2.serialize (c, glyphs)); @@ -185,7 +205,7 @@ bool intersects (const hb_set_t *glyphs) const { - switch (u.format) + switch (u.format.v) { case 1: return u.format1.intersects (glyphs); case 2: return u.format2.intersects (glyphs); @@ -198,7 +218,7 @@ } bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const { - switch (u.format) + switch (u.format.v) { case 1: return u.format1.intersects_coverage (glyphs, index); case 2: return u.format2.intersects_coverage (glyphs, index); @@ -212,7 +232,7 @@ unsigned cost () const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.cost (); case 2: hb_barrier (); return u.format2.cost (); #ifndef HB_NO_BEYOND_64K @@ -228,7 +248,7 @@ template <typename set_t> bool collect_coverage (set_t *glyphs) const { - switch (u.format) + switch (u.format.v) { case 1: return u.format1.collect_coverage (glyphs); case 2: return u.format2.collect_coverage (glyphs); @@ -244,7 +264,7 @@ hb_requires (hb_is_sink_of (IterableOut, hb_codepoint_t))> void intersect_set (const hb_set_t &glyphs, IterableOut&& intersect_glyphs) const { - switch (u.format) + switch (u.format.v) { case 1: return u.format1.intersect_set (glyphs, intersect_glyphs); case 2: return u.format2.intersect_set (glyphs, intersect_glyphs); @@ -262,7 +282,7 @@ iter_t (const Coverage &c_ = Null (Coverage)) { hb_memset (this, 0, sizeof (*this)); - format = c_.u.format; + format = c_.u.format.v; switch (format) { case 1: u.format1.init (c_.u.format1); return; @@ -332,7 +352,7 @@ } iter_t __end__ () const { - iter_t it = {}; + iter_t it; it.format = format; switch (format) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -41,11 +41,11 @@ { friend struct Coverage; - protected: + public: HBUINT16 coverageFormat; /* Format identifier--format = 1 */ SortedArray16Of<typename Types::HBGlyphID> glyphArray; /* Array of GlyphIDs--in numerical order */ - public: + DEFINE_SIZE_ARRAY (4, glyphArray); private: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat2.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat2.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat2.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/Common/CoverageFormat2.hh 2026-04-17 19:08:13.000000000 +0000 @@ -40,7 +40,7 @@ { friend struct Coverage; - protected: + public: HBUINT16 coverageFormat; /* Format identifier--format = 2 */ SortedArray16Of<RangeRecord<Types>> rangeRecord; /* Array of glyph ranges--ordered by diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GDEF/GDEF.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GDEF/GDEF.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GDEF/GDEF.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GDEF/GDEF.hh 2026-04-17 19:08:13.000000000 +0000 @@ -252,7 +252,7 @@ hb_codepoint_t glyph_id, const ItemVariationStore &var_store) const { - switch (u.format) { + switch (u.format.v) { case 1: return u.format1.get_caret_value (font, direction); case 2: return u.format2.get_caret_value (font, direction, glyph_id); case 3: return u.format3.get_caret_value (font, direction, var_store); @@ -263,9 +263,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); @@ -275,7 +275,7 @@ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const { - switch (u.format) { + switch (u.format.v) { case 1: case 2: return; @@ -289,9 +289,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); case 3: return_trace (u.format3.sanitize (c)); @@ -301,13 +301,13 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ CaretValueFormat1 format1; CaretValueFormat2 format2; CaretValueFormat3 format3; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; struct LigGlyph @@ -519,7 +519,7 @@ { bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const { - switch (u.format) { + switch (u.format.v) { case 1: return u.format1.covers (set_index, glyph_id); default:return false; } @@ -528,7 +528,7 @@ template <typename set_t> void collect_coverage (hb_vector_t<set_t> &sets) const { - switch (u.format) { + switch (u.format.v) { case 1: u.format1.collect_coverage (sets); return; default:return; } @@ -537,7 +537,7 @@ void collect_used_mark_sets (const hb_set_t& glyph_set, hb_set_t& used_mark_sets /* OUT */) const { - switch (u.format) { + switch (u.format.v) { case 1: u.format1.collect_used_mark_sets (glyph_set, used_mark_sets); return; default:return; } @@ -546,7 +546,7 @@ bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - switch (u.format) { + switch (u.format.v) { case 1: return_trace (u.format1.subset (c)); default:return_trace (false); } @@ -555,9 +555,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: return_trace (u.format1.sanitize (c)); default:return_trace (true); } @@ -565,11 +565,11 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ MarkGlyphSetsFormat1 format1; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; @@ -977,7 +977,7 @@ } #ifndef HB_NO_GDEF_CACHE - table->get_mark_glyph_sets ().collect_coverage (mark_glyph_set_digests); + table->get_mark_glyph_sets ().collect_coverage (mark_glyph_sets); #endif } ~accelerator_t () { table.destroy (); } @@ -1002,18 +1002,34 @@ } + HB_ALWAYS_INLINE bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const { return #ifndef HB_NO_GDEF_CACHE - mark_glyph_set_digests[set_index].may_have (glyph_id) && + // We can access arrayZ directly because of sanitize_lookup_props() guarantee. + mark_glyph_sets.arrayZ[set_index].may_have (glyph_id) && #endif - table->mark_set_covers (set_index, glyph_id); + table->mark_set_covers (set_index, glyph_id) + ; + } + + unsigned sanitize_lookup_props (unsigned lookup_props) const + { +#ifndef HB_NO_GDEF_CACHE + if (lookup_props & LookupFlag::UseMarkFilteringSet && + (lookup_props >> 16) >= mark_glyph_sets.length) + { + // Invalid mark filtering set index; unset the flag. + lookup_props &= ~LookupFlag::UseMarkFilteringSet; + } +#endif + return lookup_props; } hb_blob_ptr_t<GDEF> table; #ifndef HB_NO_GDEF_CACHE - hb_vector_t<hb_set_digest_t> mark_glyph_set_digests; + hb_vector_t<hb_set_digest_t> mark_glyph_sets; mutable hb_cache_t<21, 3> glyph_props_cache; static_assert (sizeof (glyph_props_cache) == 512, ""); #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/Anchor.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/Anchor.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/Anchor.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/Anchor.hh 2026-04-17 19:08:13.000000000 +0000 @@ -13,20 +13,20 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ AnchorFormat1 format1; AnchorFormat2 format2; AnchorFormat3 format3; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: return_trace (u.format1.sanitize (c)); case 2: return_trace (u.format2.sanitize (c)); case 3: return_trace (u.format3.sanitize (c)); @@ -38,7 +38,7 @@ float *x, float *y) const { *x = *y = 0; - switch (u.format) { + switch (u.format.v) { case 1: u.format1.get_anchor (c, glyph_id, x, y); return; case 2: u.format2.get_anchor (c, glyph_id, x, y); return; case 3: u.format3.get_anchor (c, glyph_id, x, y); return; @@ -49,7 +49,7 @@ bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - switch (u.format) { + switch (u.format.v) { case 1: return_trace (bool (reinterpret_cast<Anchor *> (u.format1.copy (c->serializer)))); case 2: if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) @@ -66,7 +66,7 @@ void collect_variation_indices (hb_collect_variation_indices_context_t *c) const { - switch (u.format) { + switch (u.format.v) { case 1: case 2: return; case 3: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorFormat3.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorFormat3.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorFormat3.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorFormat3.hh 2026-04-17 19:08:13.000000000 +0000 @@ -37,12 +37,12 @@ *x = font->em_fscale_x (xCoordinate); *y = font->em_fscale_y (yCoordinate); - if ((font->x_ppem || font->num_coords) && xDeviceTable.sanitize (&c->sanitizer, this)) + if ((font->x_ppem || font->has_nonzero_coords) && xDeviceTable.sanitize (&c->sanitizer, this)) { hb_barrier (); *x += (this+xDeviceTable).get_x_delta (font, c->var_store, c->var_store_cache); } - if ((font->y_ppem || font->num_coords) && yDeviceTable.sanitize (&c->sanitizer, this)) + if ((font->y_ppem || font->has_nonzero_coords) && yDeviceTable.sanitize (&c->sanitizer, this)) { hb_barrier (); *y += (this+yDeviceTable).get_y_delta (font, c->var_store, c->var_store_cache); @@ -91,10 +91,13 @@ } } - /* in case that all axes are pinned or no variations after instantiation, - * both var_idxes will be mapped to HB_OT_LAYOUT_NO_VARIATIONS_INDEX */ - if (x_varidx == HB_OT_LAYOUT_NO_VARIATIONS_INDEX && - y_varidx == HB_OT_LAYOUT_NO_VARIATIONS_INDEX) + + bool no_downgrade = (!xDeviceTable.is_null () && !(this+xDeviceTable).is_variation_device ()) || + x_varidx != HB_OT_LAYOUT_NO_VARIATIONS_INDEX || + y_varidx != HB_OT_LAYOUT_NO_VARIATIONS_INDEX || + (!yDeviceTable.is_null () && !(this+yDeviceTable).is_variation_device ()); + + if (!no_downgrade) return_trace (c->serializer->check_assign (out->format, 1, HB_SERIALIZE_ERROR_INT_OVERFLOW)); if (!c->serializer->embed (xDeviceTable)) return_trace (false); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorMatrix.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorMatrix.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorMatrix.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/AnchorMatrix.hh 2026-04-17 19:08:13.000000000 +0000 @@ -77,6 +77,13 @@ return_trace (true); } + + bool offset_is_null (unsigned row, unsigned col, unsigned num_cols) const + { + if (unlikely (row >= rows || col >= num_cols)) return true; + auto &offset = matrixZ[row * num_cols + col]; + return offset.is_null (); + } }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -11,7 +11,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ CursivePosFormat1 format1; } u; @@ -19,9 +19,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePosFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePosFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePosFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/CursivePosFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -50,8 +50,9 @@ DEFINE_SIZE_STATIC (4); }; -static void -reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction, unsigned int new_parent) { +static inline void +reverse_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction, unsigned int new_parent) +{ int chain = pos[i].attach_chain(), type = pos[i].attach_type(); if (likely (!chain || 0 == (type & ATTACH_TYPE_CURSIVE))) return; @@ -130,7 +131,7 @@ unlikely (!this_record.entryAnchor.sanitize (&c->sanitizer, this))) return_trace (false); hb_barrier (); - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_input; skippy_iter.reset_fast (buffer->idx); unsigned unsafe_from; if (unlikely (!skippy_iter.prev (&unsafe_from))) @@ -229,8 +230,13 @@ */ reverse_cursive_minor_offset (pos, child, c->direction, parent); - pos[child].attach_type() = ATTACH_TYPE_CURSIVE; pos[child].attach_chain() = (int) parent - (int) child; + if (pos[child].attach_chain() != (int) parent - (int) child) + { + pos[child].attach_chain() = 0; + goto overflow; + } + pos[child].attach_type() = ATTACH_TYPE_CURSIVE; buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT; if (likely (HB_DIRECTION_IS_HORIZONTAL (c->direction))) pos[child].y_offset = y_offset; @@ -256,6 +262,7 @@ i, j); } + overflow: buffer->idx++; return_trace (true); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/GPOS.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/GPOS.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/GPOS.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/GPOS.hh 2026-04-17 19:08:13.000000000 +0000 @@ -80,9 +80,8 @@ { /* Adjusts offsets of attached glyphs (both cursive and mark) to accumulate * offset of glyph they are attached to. */ - int chain = pos[i].attach_chain(), type = pos[i].attach_type(); - if (likely (!chain)) - return; + int chain = pos[i].attach_chain(); + int type = pos[i].attach_type(); pos[i].attach_chain() = 0; @@ -94,7 +93,8 @@ if (unlikely (!nesting_level)) return; - propagate_attachment_offsets (pos, len, j, direction, nesting_level - 1); + if (pos[j].attach_chain()) + propagate_attachment_offsets (pos, len, j, direction, nesting_level - 1); assert (!!(type & GPOS_impl::ATTACH_TYPE_MARK) ^ !!(type & GPOS_impl::ATTACH_TYPE_CURSIVE)); @@ -110,17 +110,37 @@ pos[i].x_offset += pos[j].x_offset; pos[i].y_offset += pos[j].y_offset; - assert (j < i); - if (HB_DIRECTION_IS_FORWARD (direction)) - for (unsigned int k = j; k < i; k++) { - pos[i].x_offset -= pos[k].x_advance; - pos[i].y_offset -= pos[k].y_advance; - } - else - for (unsigned int k = j + 1; k < i + 1; k++) { - pos[i].x_offset += pos[k].x_advance; - pos[i].y_offset += pos[k].y_advance; - } + // i is the position of the mark; j is the base. + if (j < i) + { + /* This is the common case: mark follows base. + * And currently the only way in OpenType. */ + if (HB_DIRECTION_IS_FORWARD (direction)) + for (unsigned int k = j; k < i; k++) { + pos[i].x_offset -= pos[k].x_advance; + pos[i].y_offset -= pos[k].y_advance; + } + else + for (unsigned int k = j + 1; k < i + 1; k++) { + pos[i].x_offset += pos[k].x_advance; + pos[i].y_offset += pos[k].y_advance; + } + } + else // j > i + { + /* This can happen with `kerx`: a mark attaching + * to a base after it in the logical order. */ + if (HB_DIRECTION_IS_FORWARD (direction)) + for (unsigned int k = i; k < j; k++) { + pos[i].x_offset += pos[k].x_advance; + pos[i].y_offset += pos[k].y_advance; + } + else + for (unsigned int k = i + 1; k < j + 1; k++) { + pos[i].x_offset -= pos[k].x_advance; + pos[i].y_offset -= pos[k].y_advance; + } + } } } @@ -149,8 +169,20 @@ /* Handle attachments */ if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT) - for (unsigned i = 0; i < len; i++) - propagate_attachment_offsets (pos, len, i, direction); + { + auto *pos = buffer->pos; + // https://github.com/harfbuzz/harfbuzz/issues/5514 + if (HB_DIRECTION_IS_FORWARD (direction)) + { + for (unsigned i = 0; i < len; i++) + if (pos[i].attach_chain()) + propagate_attachment_offsets (pos, len, i, direction); + } else { + for (unsigned i = len; i-- > 0; ) + if (pos[i].attach_chain()) + propagate_attachment_offsets (pos, len, i, direction); + } + } if (unlikely (font->slant_xy) && HB_DIRECTION_IS_HORIZONTAL (direction)) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/LigatureArray.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/LigatureArray.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/LigatureArray.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/LigatureArray.hh 2026-04-17 19:08:13.000000000 +0000 @@ -19,22 +19,30 @@ bool subset (hb_subset_context_t *c, Iterator coverage, unsigned class_count, - const hb_map_t *klass_mapping) const + const hb_map_t *klass_mapping, + hb_sorted_vector_t<hb_codepoint_t> &new_coverage /* OUT */) const { TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->glyphset_gsub (); + const hb_map_t &glyph_map = c->plan->glyph_map_gsub; auto *out = c->serializer->start_embed (this); if (unlikely (!c->serializer->extend_min (out))) return_trace (false); bool ret = false; for (const auto _ : + hb_zip (coverage, *this) - | hb_filter (glyphset, hb_first)) + | hb_filter (glyph_map, hb_first)) { + const LigatureAttach& src = (this + _.second); + bool non_empty = + hb_range (src.rows * class_count) + | hb_filter ([=] (unsigned index) { return klass_mapping->has (index % class_count); }) + | hb_map ([&] (const unsigned index) { return !src.offset_is_null (index / class_count, index % class_count, class_count); }) + | hb_any; + + if (!non_empty) continue; + auto *matrix = out->serialize_append (c->serializer); if (unlikely (!matrix)) return_trace (false); - const LigatureAttach& src = (this + _.second); auto indexes = + hb_range (src.rows * class_count) | hb_filter ([=] (unsigned index) { return klass_mapping->has (index % class_count); }) @@ -44,6 +52,9 @@ this, src.rows, indexes); + + hb_codepoint_t new_gid = glyph_map.get (_.first); + new_coverage.push (new_gid); } return_trace (ret); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkArray.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkArray.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkArray.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkArray.hh 2026-04-17 19:08:13.000000000 +0000 @@ -47,10 +47,15 @@ } hb_glyph_position_t &o = buffer->cur_pos(); + o.attach_chain() = (int) glyph_pos - (int) buffer->idx; + if (o.attach_chain() != (int) glyph_pos - (int) buffer->idx) + { + o.attach_chain() = 0; + goto overflow; + } + o.attach_type() = ATTACH_TYPE_MARK; o.x_offset = roundf (base_x - mark_x); o.y_offset = roundf (base_y - mark_y); - o.attach_type() = ATTACH_TYPE_MARK; - o.attach_chain() = (int) glyph_pos - (int) buffer->idx; buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT; if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) @@ -60,6 +65,7 @@ c->buffer->idx, glyph_pos); } + overflow: buffer->idx++; return_trace (true); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -11,7 +11,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ MarkBasePosFormat1_2<SmallTypes> format1; #ifndef HB_NO_BEYOND_64K MarkBasePosFormat1_2<MediumTypes> format2; @@ -22,9 +22,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePosFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePosFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePosFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkBasePosFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -119,7 +119,7 @@ /* Now we search backwards for a non-mark glyph. * We don't use skippy_iter.prev() to avoid O(n^2) behavior. */ - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_input; skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks); if (c->last_base_until > buffer->idx) @@ -209,19 +209,22 @@ ; new_coverage.reset (); - + base_iter - | hb_map (hb_first) - | hb_map (glyph_map) - | hb_sink (new_coverage) - ; - - if (!out->baseCoverage.serialize_serialize (c->serializer, new_coverage.iter ())) - return_trace (false); - hb_sorted_vector_t<unsigned> base_indexes; - for (const unsigned row : + base_iter - | hb_map (hb_second)) + auto &base_array = (this+baseArray); + for (const auto _ : + base_iter) { + unsigned row = _.second; + bool non_empty = + hb_range ((unsigned) classCount) + | hb_filter (klass_mapping) + | hb_map ([&] (const unsigned col) { return !base_array.offset_is_null (row, col, (unsigned) classCount); }) + | hb_any + ; + + if (!non_empty) continue; + + hb_codepoint_t new_g = glyph_map.get ( _.first); + new_coverage.push (new_g); + + hb_range ((unsigned) classCount) | hb_filter (klass_mapping) | hb_map ([&] (const unsigned col) { return row * (unsigned) classCount + col; }) @@ -229,8 +232,12 @@ ; } + if (!new_coverage) return_trace (false); + if (!out->baseCoverage.serialize_serialize (c->serializer, new_coverage.iter ())) + return_trace (false); + return_trace (out->baseArray.serialize_subset (c, baseArray, this, - base_iter.len (), + new_coverage.length, base_indexes.iter ())); } }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -11,7 +11,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ MarkLigPosFormat1_2<SmallTypes> format1; #ifndef HB_NO_BEYOND_64K MarkLigPosFormat1_2<MediumTypes> format2; @@ -22,9 +22,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPosFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPosFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPosFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkLigPosFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -101,7 +101,7 @@ /* Now we search backwards for a non-mark glyph */ - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_input; skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks); if (c->last_base_until > buffer->idx) @@ -200,19 +200,13 @@ &klass_mapping))) return_trace (false); - auto new_ligature_coverage = - + hb_iter (this + ligatureCoverage) - | hb_take ((this + ligatureArray).len) - | hb_map_retains_sorting (glyph_map) - | hb_filter ([] (hb_codepoint_t glyph) { return glyph != HB_MAP_VALUE_INVALID; }) - ; - - if (!out->ligatureCoverage.serialize_serialize (c->serializer, new_ligature_coverage)) + hb_sorted_vector_t<hb_codepoint_t> new_lig_coverage; + if (!out->ligatureArray.serialize_subset (c, ligatureArray, this, + hb_iter (this+ligatureCoverage), + classCount, &klass_mapping, new_lig_coverage)) return_trace (false); - return_trace (out->ligatureArray.serialize_subset (c, ligatureArray, this, - hb_iter (this+ligatureCoverage), - classCount, &klass_mapping)); + return_trace (out->ligatureCoverage.serialize_serialize (c->serializer, new_lig_coverage.iter ())); } }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -11,7 +11,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ MarkMarkPosFormat1_2<SmallTypes> format1; #ifndef HB_NO_BEYOND_64K MarkMarkPosFormat1_2<MediumTypes> format2; @@ -22,9 +22,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPosFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPosFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPosFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/MarkMarkPosFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -100,7 +100,7 @@ if (likely (mark1_index == NOT_COVERED)) return_trace (false); /* now we search backwards for a suitable mark glyph until a non-mark glyph */ - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_input; skippy_iter.reset_fast (buffer->idx); skippy_iter.set_lookup_props (c->lookup_props & ~(uint32_t)LookupFlag::IgnoreFlags); unsigned unsafe_from; @@ -196,19 +196,23 @@ ; new_coverage.reset (); - + mark2_iter - | hb_map (hb_first) - | hb_map (glyph_map) - | hb_sink (new_coverage) - ; - - if (!out->mark2Coverage.serialize_serialize (c->serializer, new_coverage.iter ())) - return_trace (false); - hb_sorted_vector_t<unsigned> mark2_indexes; - for (const unsigned row : + mark2_iter - | hb_map (hb_second)) + auto &mark2_array = (this+mark2Array); + for (const auto _ : + mark2_iter) { + unsigned row = _.second; + + bool non_empty = + hb_range ((unsigned) classCount) + | hb_filter (klass_mapping) + | hb_map ([&] (const unsigned col) { return !mark2_array.offset_is_null (row, col, (unsigned) classCount); }) + | hb_any + ; + + if (!non_empty) continue; + + hb_codepoint_t new_g = glyph_map.get ( _.first); + new_coverage.push (new_g); + + hb_range ((unsigned) classCount) | hb_filter (klass_mapping) | hb_map ([&] (const unsigned col) { return row * (unsigned) classCount + col; }) @@ -216,6 +220,10 @@ ; } + if (!new_coverage) return_trace (false); + if (!out->mark2Coverage.serialize_serialize (c->serializer, new_coverage.iter ())) + return_trace (false); + return_trace (out->mark2Array.serialize_subset (c, mark2Array, this, mark2_iter.len (), mark2_indexes.iter ())); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -12,7 +12,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ PairPosFormat1_3<SmallTypes> format1; PairPosFormat2_4<SmallTypes> format2; #ifndef HB_NO_BEYOND_64K @@ -25,9 +25,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -103,52 +103,35 @@ const Coverage &get_coverage () const { return this+coverage; } - unsigned cache_cost () const + struct external_cache_t { - return (this+coverage).cost (); - } - static void * cache_func (void *p, hb_ot_lookup_cache_op_t op) + hb_ot_layout_mapping_cache_t coverage; + }; + void *external_cache_create () const { - switch (op) + external_cache_t *cache = (external_cache_t *) hb_malloc (sizeof (external_cache_t)); + if (likely (cache)) { - case hb_ot_lookup_cache_op_t::CREATE: - { - hb_ot_lookup_cache_t *cache = (hb_ot_lookup_cache_t *) hb_malloc (sizeof (hb_ot_lookup_cache_t)); - if (likely (cache)) - cache->clear (); - return cache; - } - case hb_ot_lookup_cache_op_t::ENTER: - return (void *) true; - case hb_ot_lookup_cache_op_t::LEAVE: - return nullptr; - case hb_ot_lookup_cache_op_t::DESTROY: - { - hb_ot_lookup_cache_t *cache = (hb_ot_lookup_cache_t *) p; - hb_free (cache); - return nullptr; - } + cache->coverage.clear (); } - return nullptr; + return cache; } - bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); } - bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); } - bool _apply (hb_ot_apply_context_t *c, bool cached) const + bool apply (hb_ot_apply_context_t *c, void *external_cache) const { TRACE_APPLY (this); hb_buffer_t *buffer = c->buffer; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - hb_ot_lookup_cache_t *cache = cached ? (hb_ot_lookup_cache_t *) c->lookup_accel->cache : nullptr; - unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint, cache); + external_cache_t *cache = (external_cache_t *) external_cache; + unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint, cache ? &cache->coverage : nullptr); #else unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint); #endif if (index == NOT_COVERED) return_trace (false); - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_input; skippy_iter.reset_fast (buffer->idx); unsigned unsafe_to; if (unlikely (!skippy_iter.next (&unsafe_to))) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat2.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat2.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat2.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/PairPosFormat2.hh 2026-04-17 19:08:13.000000000 +0000 @@ -123,63 +123,39 @@ const Coverage &get_coverage () const { return this+coverage; } - struct pair_pos_cache_t + struct external_cache_t { - hb_ot_lookup_cache_t coverage; - hb_ot_lookup_cache_t first; - hb_ot_lookup_cache_t second; + hb_ot_layout_mapping_cache_t coverage; + hb_ot_layout_mapping_cache_t first; + hb_ot_layout_mapping_cache_t second; }; - - unsigned cache_cost () const - { - return (this+coverage).cost () + (this+classDef1).cost () + (this+classDef2).cost (); - } - static void * cache_func (void *p, hb_ot_lookup_cache_op_t op) + void *external_cache_create () const { - switch (op) + external_cache_t *cache = (external_cache_t *) hb_malloc (sizeof (external_cache_t)); + if (likely (cache)) { - case hb_ot_lookup_cache_op_t::CREATE: - { - pair_pos_cache_t *cache = (pair_pos_cache_t *) hb_malloc (sizeof (pair_pos_cache_t)); - if (likely (cache)) - { - cache->coverage.clear (); - cache->first.clear (); - cache->second.clear (); - } - return cache; - } - case hb_ot_lookup_cache_op_t::ENTER: - return (void *) true; - case hb_ot_lookup_cache_op_t::LEAVE: - return nullptr; - case hb_ot_lookup_cache_op_t::DESTROY: - { - pair_pos_cache_t *cache = (pair_pos_cache_t *) p; - hb_free (cache); - return nullptr; - } + cache->coverage.clear (); + cache->first.clear (); + cache->second.clear (); } - return nullptr; + return cache; } - bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); } - bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); } - bool _apply (hb_ot_apply_context_t *c, bool cached) const + bool apply (hb_ot_apply_context_t *c, void *external_cache) const { TRACE_APPLY (this); hb_buffer_t *buffer = c->buffer; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - pair_pos_cache_t *cache = cached ? (pair_pos_cache_t *) c->lookup_accel->cache : nullptr; + external_cache_t *cache = (external_cache_t *) external_cache; unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint, cache ? &cache->coverage : nullptr); #else unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint); #endif if (index == NOT_COVERED) return_trace (false); - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_input; skippy_iter.reset_fast (buffer->idx); unsigned unsafe_to; if (unlikely (!skippy_iter.next (&unsafe_to))) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/SinglePos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/SinglePos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/SinglePos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/SinglePos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -12,7 +12,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ SinglePosFormat1 format1; SinglePosFormat2 format2; } u; @@ -41,7 +41,7 @@ const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map, unsigned newFormat) { - if (unlikely (!c->extend_min (u.format))) return; + if (unlikely (!c->extend_min (u.format.v))) return; unsigned format = 2; ValueFormat new_format; new_format = newFormat; @@ -49,8 +49,8 @@ if (glyph_val_iter_pairs) format = get_format (glyph_val_iter_pairs); - u.format = format; - switch (u.format) { + u.format.v = format; + switch (u.format.v) { case 1: u.format1.serialize (c, src, glyph_val_iter_pairs, @@ -70,9 +70,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/ValueFormat.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/ValueFormat.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/ValueFormat.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GPOS/ValueFormat.hh 2026-04-17 19:08:13.000000000 +0000 @@ -56,9 +56,14 @@ * PosTable (may be NULL) */ #endif - IntType& operator = (uint16_t i) { v = i; return *this; } + NumType& operator = (uint16_t i) { v = i; return *this; } - unsigned int get_len () const { return hb_popcount ((unsigned int) *this); } + // Note: spec says skip 2 bytes per bit in the valueformat. But reports + // from Microsoft developers indicate that only the fields that are + // currently defined are counted. We don't expect any new fields to + // be added to ValueFormat. As such, we use the faster hb_popcount8 + // that only processes the lowest 8 bits. + unsigned int get_len () const { return hb_popcount8 ((uint8_t) *this); } unsigned int get_size () const { return get_len () * Value::static_size; } hb_vector_t<unsigned> get_device_table_indices () const { @@ -111,8 +116,8 @@ if (!has_device ()) return ret; - bool use_x_device = font->x_ppem || font->num_coords; - bool use_y_device = font->y_ppem || font->num_coords; + bool use_x_device = font->x_ppem || font->has_nonzero_coords; + bool use_y_device = font->y_ppem || font->has_nonzero_coords; if (!use_x_device && !use_y_device) return ret; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSet.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSet.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSet.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSet.hh 2026-04-17 19:08:13.000000000 +0000 @@ -91,6 +91,19 @@ return alternates.len; } + void + collect_alternates (hb_codepoint_t gid, + hb_map_t *alternate_count /* IN/OUT */, + hb_map_t *alternate_glyphs /* IN/OUT */) const + { + + hb_enumerate (alternates) + | hb_map ([gid] (hb_pair_t<unsigned, hb_codepoint_t> _) { return hb_pair (gid + (_.first << 24), _.second); }) + | hb_apply ([&] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t> &p) -> void + { _hb_collect_glyph_alternates_add (p.first, p.second, + alternate_count, alternate_glyphs); }) + ; + } + template <typename Iterator, hb_requires (hb_is_source_of (Iterator, hb_codepoint_t))> bool serialize (hb_serialize_context_t *c, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubst.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubst.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubst.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubst.hh 2026-04-17 19:08:13.000000000 +0000 @@ -12,7 +12,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ AlternateSubstFormat1_2<SmallTypes> format1; #ifndef HB_NO_BEYOND_64K AlternateSubstFormat1_2<MediumTypes> format2; @@ -23,9 +23,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); @@ -42,10 +42,10 @@ hb_array_t<const HBGlyphID16> alternate_glyphs_list) { TRACE_SERIALIZE (this); - if (unlikely (!c->extend_min (u.format))) return_trace (false); + if (unlikely (!c->extend_min (u.format.v))) return_trace (false); unsigned int format = 1; - u.format = format; - switch (u.format) { + u.format.v = format; + switch (u.format.v) { case 1: return_trace (u.format1.serialize (c, glyphs, alternate_len_list, alternate_glyphs_list)); default:return_trace (false); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubstFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubstFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubstFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/AlternateSubstFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -69,6 +69,19 @@ { return (this+alternateSet[(this+coverage).get_coverage (gid)]) .get_alternates (start_offset, alternate_count, alternate_glyphs); } + void + collect_glyph_alternates (hb_map_t *alternate_count /* IN/OUT */, + hb_map_t *alternate_glyphs /* IN/OUT */) const + { + + hb_iter (alternateSet) + | hb_map (hb_add (this)) + | hb_zip (this+coverage) + | hb_apply ([&] (const hb_pair_t<const AlternateSet<Types> &, hb_codepoint_t> _) { + _.first.collect_alternates (_.second, alternate_count, alternate_glyphs); + }) + ; + } + bool apply (hb_ot_apply_context_t *c) const { TRACE_APPLY (this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Ligature.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Ligature.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Ligature.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Ligature.hh 2026-04-17 19:08:13.000000000 +0000 @@ -44,6 +44,18 @@ c->output->add (ligGlyph); } + template <typename set_t> + void collect_second (set_t &s) const + { + if (unlikely (!component.get_length ())) + { + // A ligature without any components. Anything matches. + s = set_t::full (); + return; + } + s.add (component.arrayZ[0]); + } + bool would_apply (hb_would_apply_context_t *c) const { if (c->len != component.lenP1) @@ -91,15 +103,6 @@ unsigned int total_component_count = 0; if (unlikely (count > HB_MAX_CONTEXT_LENGTH)) return false; - unsigned match_positions_stack[4]; - unsigned *match_positions = match_positions_stack; - if (unlikely (count > ARRAY_LENGTH (match_positions_stack))) - { - match_positions = (unsigned *) hb_malloc (hb_max (count, 1u) * sizeof (unsigned)); - if (unlikely (!match_positions)) - return_trace (false); - } - unsigned int match_end = 0; if (likely (!match_input (c, count, @@ -107,12 +110,9 @@ match_glyph, nullptr, &match_end, - match_positions, &total_component_count))) { c->buffer->unsafe_to_concat (c->buffer->idx, match_end); - if (match_positions != match_positions_stack) - hb_free (match_positions); return_trace (false); } @@ -129,10 +129,10 @@ match_end += delta; for (unsigned i = 0; i < count; i++) { - match_positions[i] += delta; + c->match_positions[i] += delta; if (i) *p++ = ','; - snprintf (p, sizeof(buf) - (p - buf), "%u", match_positions[i]); + snprintf (p, sizeof(buf) - (p - buf), "%u", c->match_positions[i]); p += strlen(p); } @@ -143,7 +143,6 @@ ligate_input (c, count, - match_positions, match_end, ligGlyph, total_component_count); @@ -156,8 +155,6 @@ pos); } - if (match_positions != match_positions_stack) - hb_free (match_positions); return_trace (true); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSet.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSet.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSet.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSet.hh 2026-04-17 19:08:13.000000000 +0000 @@ -11,11 +11,11 @@ template <typename Types> struct LigatureSet { - protected: + public: Array16OfOffset16To<Ligature<Types>> ligature; /* Array LigatureSet tables * ordered by preference */ - public: + DEFINE_SIZE_ARRAY (2, ligature); bool sanitize (hb_sanitize_context_t *c) const @@ -62,6 +62,15 @@ ; } + template <typename set_t> + void collect_seconds (set_t &s) const + { + + hb_iter (ligature) + | hb_map (hb_add (this)) + | hb_apply ([&s] (const Ligature<Types> &_) { _.collect_second (s); }) + ; + } + bool would_apply (hb_would_apply_context_t *c) const { return @@ -72,14 +81,14 @@ ; } - bool apply (hb_ot_apply_context_t *c) const + bool apply (hb_ot_apply_context_t *c, const hb_set_digest_t *seconds = nullptr) const { TRACE_APPLY (this); unsigned int num_ligs = ligature.len; #ifndef HB_NO_OT_RULESETS_FAST_PATH - if (HB_OPTIMIZE_SIZE_VAL || num_ligs <= 4) + if (HB_OPTIMIZE_SIZE_VAL || num_ligs <= 1) #endif { slow: @@ -91,21 +100,21 @@ return_trace (false); } - /* This version is optimized for speed by matching the first component + /* This version is optimized for speed by matching the second component * of the ligature here, instead of calling into the ligation code. * * This is replicated in ChainRuleSet and RuleSet. */ - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_context; skippy_iter.reset (c->buffer->idx); skippy_iter.set_match_func (match_always, nullptr); skippy_iter.set_glyph_data ((HBUINT16 *) nullptr); unsigned unsafe_to; - hb_codepoint_t first = (unsigned) -1; + hb_codepoint_t second = (unsigned) -1; bool matched = skippy_iter.next (&unsafe_to); if (likely (matched)) { - first = c->buffer->info[skippy_iter.idx].codepoint; + second = c->buffer->info[skippy_iter.idx].codepoint; unsafe_to = skippy_iter.idx + 1; if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])) @@ -118,13 +127,14 @@ else goto slow; + if (seconds && !seconds->may_have (second)) + return_trace (false); bool unsafe_to_concat = false; - for (unsigned int i = 0; i < num_ligs; i++) { const auto &lig = this+ligature.arrayZ[i]; if (unlikely (lig.component.lenP1 <= 1) || - lig.component.arrayZ[0] == first) + lig.component.arrayZ[0] == second) { if (lig.apply (c)) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubst.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubst.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubst.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubst.hh 2026-04-17 19:08:13.000000000 +0000 @@ -12,7 +12,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ LigatureSubstFormat1_2<SmallTypes> format1; #ifndef HB_NO_BEYOND_64K LigatureSubstFormat1_2<MediumTypes> format2; @@ -23,9 +23,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); @@ -45,10 +45,10 @@ hb_array_t<const HBGlyphID16> component_list /* Starting from second for each ligature */) { TRACE_SERIALIZE (this); - if (unlikely (!c->extend_min (u.format))) return_trace (false); + if (unlikely (!c->extend_min (u.format.v))) return_trace (false); unsigned int format = 1; - u.format = format; - switch (u.format) { + u.format.v = format; + switch (u.format.v) { case 1: return_trace (u.format1.serialize (c, first_glyphs, ligature_per_first_glyph_count_list, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubstFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubstFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubstFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/LigatureSubstFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -78,52 +78,44 @@ return lig_set.would_apply (c); } - unsigned cache_cost () const + struct external_cache_t { - return (this+coverage).cost (); - } - static void * cache_func (void *p, hb_ot_lookup_cache_op_t op) + hb_ot_layout_mapping_cache_t coverage; + hb_set_digest_t seconds; + }; + void *external_cache_create () const { - switch (op) + external_cache_t *cache = (external_cache_t *) hb_malloc (sizeof (external_cache_t)); + if (likely (cache)) { - case hb_ot_lookup_cache_op_t::CREATE: - { - hb_ot_lookup_cache_t *cache = (hb_ot_lookup_cache_t *) hb_malloc (sizeof (hb_ot_lookup_cache_t)); - if (likely (cache)) - cache->clear (); - return cache; - } - case hb_ot_lookup_cache_op_t::ENTER: - return (void *) true; - case hb_ot_lookup_cache_op_t::LEAVE: - return nullptr; - case hb_ot_lookup_cache_op_t::DESTROY: - { - hb_ot_lookup_cache_t *cache = (hb_ot_lookup_cache_t *) p; - hb_free (cache); - return nullptr; - } + cache->coverage.clear (); + + cache->seconds.init (); + + hb_iter (ligatureSet) + | hb_map (hb_add (this)) + | hb_apply ([cache] (const LigatureSet<Types> &_) { _.collect_seconds (cache->seconds); }) + ; } - return nullptr; + return cache; } - bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); } - bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); } - bool _apply (hb_ot_apply_context_t *c, bool cached) const + bool apply (hb_ot_apply_context_t *c, void *external_cache) const { TRACE_APPLY (this); hb_buffer_t *buffer = c->buffer; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - hb_ot_lookup_cache_t *cache = cached ? (hb_ot_lookup_cache_t *) c->lookup_accel->cache : nullptr; - unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint, cache); + external_cache_t *cache = (external_cache_t *) external_cache; + const hb_set_digest_t *seconds = cache ? &cache->seconds : nullptr; + unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint, cache ? &cache->coverage : nullptr); #else - unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint); + const hb_set_digest_t *seconds = nullptr; + unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint); #endif if (index == NOT_COVERED) return_trace (false); const auto &lig_set = this+ligatureSet[index]; - return_trace (lig_set.apply (c)); + return_trace (lig_set.apply (c, seconds)); } bool serialize (hb_serialize_context_t *c, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/MultipleSubst.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/MultipleSubst.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/MultipleSubst.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/MultipleSubst.hh 2026-04-17 19:08:13.000000000 +0000 @@ -12,7 +12,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ MultipleSubstFormat1_2<SmallTypes> format1; #ifndef HB_NO_BEYOND_64K MultipleSubstFormat1_2<MediumTypes> format2; @@ -24,9 +24,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); @@ -41,10 +41,10 @@ Iterator it) { TRACE_SERIALIZE (this); - if (unlikely (!c->extend_min (u.format))) return_trace (false); + if (unlikely (!c->extend_min (u.format.v))) return_trace (false); unsigned int format = 1; - u.format = format; - switch (u.format) { + u.format.v = format; + switch (u.format.v) { case 1: return_trace (u.format1.serialize (c, it)); default:return_trace (false); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/ReverseChainSingleSubst.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/ReverseChainSingleSubst.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/ReverseChainSingleSubst.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/ReverseChainSingleSubst.hh 2026-04-17 19:08:13.000000000 +0000 @@ -12,7 +12,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ ReverseChainSingleSubstFormat1 format1; } u; @@ -20,9 +20,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Sequence.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Sequence.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Sequence.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/Sequence.hh 2026-04-17 19:08:13.000000000 +0000 @@ -115,7 +115,7 @@ for (unsigned i = c->buffer->idx - count; i < c->buffer->idx; i++) { - if (buf < p) + if (buf < p && sizeof(buf) - 1u > unsigned (p - buf)) *p++ = ','; snprintf (p, sizeof(buf) - (p - buf), "%u", i); p += strlen(p); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubst.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubst.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubst.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubst.hh 2026-04-17 19:08:13.000000000 +0000 @@ -13,7 +13,7 @@ { protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ SingleSubstFormat1_3<SmallTypes> format1; SingleSubstFormat2_4<SmallTypes> format2; #ifndef HB_NO_BEYOND_64K @@ -27,9 +27,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K @@ -47,7 +47,7 @@ Iterator glyphs) { TRACE_SERIALIZE (this); - if (unlikely (!c->extend_min (u.format))) return_trace (false); + if (unlikely (!c->extend_min (u.format.v))) return_trace (false); unsigned format = 2; unsigned delta = 0; if (glyphs) @@ -71,8 +71,8 @@ if (!hb_all (++(+glyphs), delta, get_delta)) format += 1; } - u.format = format; - switch (u.format) { + u.format.v = format; + switch (u.format.v) { case 1: return_trace (u.format1.serialize (c, + glyphs | hb_map_retains_sorting (hb_first), diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat1.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat1.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat1.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat1.hh 2026-04-17 19:08:13.000000000 +0000 @@ -123,6 +123,21 @@ return 1; } + void + collect_glyph_alternates (hb_map_t *alternate_count /* IN/OUT */, + hb_map_t *alternate_glyphs /* IN/OUT */) const + { + hb_codepoint_t d = deltaGlyphID; + hb_codepoint_t mask = get_mask (); + + + hb_iter (this+coverage) + | hb_map ([d, mask] (hb_codepoint_t g) { return hb_pair (g, (g + d) & mask); }) + | hb_apply ([&] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t> &p) -> void + { _hb_collect_glyph_alternates_add (p.first, p.second, + alternate_count, alternate_glyphs); }) + ; + } + bool apply (hb_ot_apply_context_t *c) const { TRACE_APPLY (this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat2.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat2.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat2.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/GSUB/SingleSubstFormat2.hh 2026-04-17 19:08:13.000000000 +0000 @@ -100,6 +100,17 @@ return 1; } + void + collect_glyph_alternates (hb_map_t *alternate_count /* IN/OUT */, + hb_map_t *alternate_glyphs /* IN/OUT */) const + { + + hb_zip (this+coverage, substitute) + | hb_apply ([&] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t> &p) -> void + { _hb_collect_glyph_alternates_add (p.first, p.second, + alternate_count, alternate_glyphs); }) + ; + } + bool apply (hb_ot_apply_context_t *c) const { TRACE_APPLY (this); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/types.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/types.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Layout/types.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Layout/types.hh 2026-04-17 19:08:13.000000000 +0000 @@ -29,8 +29,11 @@ #ifndef OT_LAYOUT_TYPES_HH #define OT_LAYOUT_TYPES_HH -using hb_ot_lookup_cache_t = hb_cache_t<15, 8, 7>; -static_assert (sizeof (hb_ot_lookup_cache_t) == 256, ""); +using hb_ot_layout_mapping_cache_t = hb_cache_t<16, 8, 8>; +static_assert (sizeof (hb_ot_layout_mapping_cache_t) == 512, ""); + +using hb_ot_layout_binary_cache_t = hb_cache_t<14, 1, 8>; +static_assert (sizeof (hb_ot_layout_binary_cache_t) == 256, ""); namespace OT { namespace Layout { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.cc 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.cc 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,421 @@ +#include "VARC.hh" + +#ifndef HB_NO_VAR_COMPOSITES + +#include "../../../hb-draw.hh" +#include "../../../hb-ot-layout-common.hh" +#include "../../../hb-ot-layout-gdef-table.hh" + +namespace OT { + +//namespace Var { + + +#ifndef HB_NO_DRAW + +struct hb_transforming_pen_context_t +{ + hb_transform_t<> transform; + hb_draw_funcs_t *dfuncs; + void *data; + hb_draw_state_t *st; +}; + +static void +hb_transforming_pen_move_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_transforming_pen_context_t *c = (hb_transforming_pen_context_t *) data; + + c->transform.transform_point (to_x, to_y); + + c->dfuncs->move_to (c->data, *c->st, to_x, to_y); +} + +static void +hb_transforming_pen_line_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_transforming_pen_context_t *c = (hb_transforming_pen_context_t *) data; + + c->transform.transform_point (to_x, to_y); + + c->dfuncs->line_to (c->data, *c->st, to_x, to_y); +} + +static void +hb_transforming_pen_quadratic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float control_x, float control_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_transforming_pen_context_t *c = (hb_transforming_pen_context_t *) data; + + c->transform.transform_point (control_x, control_y); + c->transform.transform_point (to_x, to_y); + + c->dfuncs->quadratic_to (c->data, *c->st, control_x, control_y, to_x, to_y); +} + +static void +hb_transforming_pen_cubic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float control1_x, float control1_y, + float control2_x, float control2_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_transforming_pen_context_t *c = (hb_transforming_pen_context_t *) data; + + c->transform.transform_point (control1_x, control1_y); + c->transform.transform_point (control2_x, control2_y); + c->transform.transform_point (to_x, to_y); + + c->dfuncs->cubic_to (c->data, *c->st, control1_x, control1_y, control2_x, control2_y, to_x, to_y); +} + +static void +hb_transforming_pen_close_path (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + void *user_data HB_UNUSED) +{ + hb_transforming_pen_context_t *c = (hb_transforming_pen_context_t *) data; + + c->dfuncs->close_path (c->data, *c->st); +} + +static inline void free_static_transforming_pen_funcs (); + +static struct hb_transforming_pen_funcs_lazy_loader_t : hb_draw_funcs_lazy_loader_t<hb_transforming_pen_funcs_lazy_loader_t> +{ + static hb_draw_funcs_t *create () + { + hb_draw_funcs_t *funcs = hb_draw_funcs_create (); + + hb_draw_funcs_set_move_to_func (funcs, hb_transforming_pen_move_to, nullptr, nullptr); + hb_draw_funcs_set_line_to_func (funcs, hb_transforming_pen_line_to, nullptr, nullptr); + hb_draw_funcs_set_quadratic_to_func (funcs, hb_transforming_pen_quadratic_to, nullptr, nullptr); + hb_draw_funcs_set_cubic_to_func (funcs, hb_transforming_pen_cubic_to, nullptr, nullptr); + hb_draw_funcs_set_close_path_func (funcs, hb_transforming_pen_close_path, nullptr, nullptr); + + hb_draw_funcs_make_immutable (funcs); + + hb_atexit (free_static_transforming_pen_funcs); + + return funcs; + } +} static_transforming_pen_funcs; + +static inline +void free_static_transforming_pen_funcs () +{ + static_transforming_pen_funcs.free_instance (); +} + +static hb_draw_funcs_t * +hb_transforming_pen_get_funcs () +{ + return static_transforming_pen_funcs.get_unconst (); +} + +hb_ubytes_t +VarComponent::get_path_at (const hb_varc_context_t &c, + hb_codepoint_t parent_gid, + hb_array_t<const int> coords, + hb_transform_t<> total_transform, + hb_ubytes_t total_record, + hb_scalar_cache_t *cache) const +{ + const unsigned char *end = total_record.arrayZ + total_record.length; + const unsigned char *record = total_record.arrayZ; + + auto &VARC = *c.font->face->table.VARC->table; + auto &varStore = &VARC+VARC.varStore; + +#define READ_UINT32VAR(name) \ + HB_STMT_START { \ + if (unlikely (unsigned (end - record) < HBUINT32VAR::min_size)) return hb_ubytes_t (); \ + hb_barrier (); \ + auto &varint = * (const HBUINT32VAR *) record; \ + unsigned size = varint.get_size (); \ + if (unlikely (unsigned (end - record) < size)) return hb_ubytes_t (); \ + name = (uint32_t) varint; \ + record += size; \ + } HB_STMT_END + + uint32_t flags; + READ_UINT32VAR (flags); + + // gid + + hb_codepoint_t gid = 0; + if (flags & (unsigned) flags_t::GID_IS_24BIT) + { + if (unlikely (unsigned (end - record) < HBGlyphID24::static_size)) + return hb_ubytes_t (); + hb_barrier (); + gid = * (const HBGlyphID24 *) record; + record += HBGlyphID24::static_size; + } + else + { + if (unlikely (unsigned (end - record) < HBGlyphID16::static_size)) + return hb_ubytes_t (); + hb_barrier (); + gid = * (const HBGlyphID16 *) record; + record += HBGlyphID16::static_size; + } + + // Condition + bool show = true; + if (flags & (unsigned) flags_t::HAVE_CONDITION) + { + unsigned conditionIndex; + READ_UINT32VAR (conditionIndex); + const auto &condition = (&VARC+VARC.conditionList)[conditionIndex]; + auto instancer = MultiItemVarStoreInstancer(&varStore, nullptr, coords, cache); + show = condition.evaluate (coords.arrayZ, coords.length, &instancer); + } + + // Axis values + + auto &axisIndices = c.scratch.axisIndices; + axisIndices.clear (); + auto &axisValues = c.scratch.axisValues; + axisValues.clear (); + if (flags & (unsigned) flags_t::HAVE_AXES) + { + unsigned axisIndicesIndex; + READ_UINT32VAR (axisIndicesIndex); + axisIndices.extend ((&VARC+VARC.axisIndicesList)[axisIndicesIndex]); + axisValues.resize (axisIndices.length); + const HBUINT8 *p = (const HBUINT8 *) record; + TupleValues::decompile (p, axisValues, (const HBUINT8 *) end); + record = (const unsigned char *) p; + } + + // Apply variations if any + if (flags & (unsigned) flags_t::AXIS_VALUES_HAVE_VARIATION) + { + uint32_t axisValuesVarIdx; + READ_UINT32VAR (axisValuesVarIdx); + if (show && coords && !axisValues.in_error ()) + varStore.get_delta (axisValuesVarIdx, coords, axisValues.as_array (), cache); + } + + auto component_coords = coords; + /* Copying coords is expensive; so we have put an arbitrary + * limit on the max number of coords for now. */ + if ((flags & (unsigned) flags_t::RESET_UNSPECIFIED_AXES) || + coords.length > HB_VAR_COMPOSITE_MAX_AXES) + component_coords = hb_array (c.font->coords, c.font->num_coords); + + // Transform + + uint32_t transformVarIdx = VarIdx::NO_VARIATION; + if (flags & (unsigned) flags_t::TRANSFORM_HAS_VARIATION) + READ_UINT32VAR (transformVarIdx); + +#define PROCESS_TRANSFORM_COMPONENTS \ + HB_STMT_START { \ + PROCESS_TRANSFORM_COMPONENT (FWORD, 1.0f, HAVE_TRANSLATE_X, translateX); \ + PROCESS_TRANSFORM_COMPONENT (FWORD, 1.0f, HAVE_TRANSLATE_Y, translateY); \ + PROCESS_TRANSFORM_COMPONENT (F4DOT12, HB_PI, HAVE_ROTATION, rotation); \ + PROCESS_TRANSFORM_COMPONENT (F6DOT10, 1.0f, HAVE_SCALE_X, scaleX); \ + PROCESS_TRANSFORM_COMPONENT (F6DOT10, 1.0f, HAVE_SCALE_Y, scaleY); \ + PROCESS_TRANSFORM_COMPONENT (F4DOT12, HB_PI, HAVE_SKEW_X, skewX); \ + PROCESS_TRANSFORM_COMPONENT (F4DOT12, HB_PI, HAVE_SKEW_Y, skewY); \ + PROCESS_TRANSFORM_COMPONENT (FWORD, 1.0f, HAVE_TCENTER_X, tCenterX); \ + PROCESS_TRANSFORM_COMPONENT (FWORD, 1.0f, HAVE_TCENTER_Y, tCenterY); \ + } HB_STMT_END + + hb_transform_decomposed_t<> transform; + + // Read transform components +#define PROCESS_TRANSFORM_COMPONENT(type, mult, flag, name) \ + if (flags & (unsigned) flags_t::flag) \ + { \ + static_assert (type::static_size == HBINT16::static_size, ""); \ + if (unlikely (unsigned (end - record) < HBINT16::static_size)) \ + return hb_ubytes_t (); \ + hb_barrier (); \ + transform.name = mult * * (const HBINT16 *) record; \ + record += HBINT16::static_size; \ + } + PROCESS_TRANSFORM_COMPONENTS; +#undef PROCESS_TRANSFORM_COMPONENT + + // Read reserved records + unsigned i = flags & (unsigned) flags_t::RESERVED_MASK; + while (i) + { + HB_UNUSED uint32_t discard; + READ_UINT32VAR (discard); + i &= i - 1; + } + + /* Parsing is over now. */ + + if (show) + { + // Only use coord_setter if there's actually any axis overrides. + coord_setter_t coord_setter (axisIndices ? component_coords : hb_array<int> ()); + // Go backwards, to reduce coord_setter vector reallocations. + for (unsigned i = axisIndices.length; i; i--) + coord_setter[axisIndices[i - 1]] = axisValues[i - 1]; + if (axisIndices) + component_coords = coord_setter.get_coords (); + + // Apply transform variations if any + if (transformVarIdx != VarIdx::NO_VARIATION && coords) + { + float transformValues[9]; + unsigned numTransformValues = 0; +#define PROCESS_TRANSFORM_COMPONENT(type, mult, flag, name) \ + if (flags & (unsigned) flags_t::flag) \ + transformValues[numTransformValues++] = transform.name / mult; + PROCESS_TRANSFORM_COMPONENTS; +#undef PROCESS_TRANSFORM_COMPONENT + varStore.get_delta (transformVarIdx, coords, hb_array (transformValues, numTransformValues), cache); + numTransformValues = 0; +#define PROCESS_TRANSFORM_COMPONENT(type, mult, flag, name) \ + if (flags & (unsigned) flags_t::flag) \ + transform.name = transformValues[numTransformValues++] * mult; + PROCESS_TRANSFORM_COMPONENTS; +#undef PROCESS_TRANSFORM_COMPONENT + } + + // Divide them by their divisors +#define PROCESS_TRANSFORM_COMPONENT(type, mult, flag, name) \ + if (flags & (unsigned) flags_t::flag) \ + { \ + HBINT16 int_v; \ + int_v = roundf (transform.name); \ + type typed_v = * (const type *) &int_v; \ + float float_v = (float) typed_v; \ + transform.name = float_v; \ + } + PROCESS_TRANSFORM_COMPONENTS; +#undef PROCESS_TRANSFORM_COMPONENT + + if (!(flags & (unsigned) flags_t::HAVE_SCALE_Y)) + transform.scaleY = transform.scaleX; + + total_transform.transform (transform.to_transform ()); + total_transform.scale (c.font->x_mult ? 1.f / c.font->x_multf : 0.f, + c.font->y_mult ? 1.f / c.font->y_multf : 0.f); + + bool same_coords = component_coords.length == coords.length && + component_coords.arrayZ == coords.arrayZ; + + c.depth_left--; + VARC.get_path_at (c, gid, + component_coords, total_transform, + parent_gid, + same_coords ? cache : nullptr); + c.depth_left++; + } + +#undef PROCESS_TRANSFORM_COMPONENTS +#undef READ_UINT32VAR + + return hb_ubytes_t (record, end - record); +} + +bool +VARC::get_path_at (const hb_varc_context_t &c, + hb_codepoint_t glyph, + hb_array_t<const int> coords, + hb_transform_t<> transform, + hb_codepoint_t parent_glyph, + hb_scalar_cache_t *parent_cache) const +{ + // Don't recurse on the same glyph. + unsigned idx = glyph == parent_glyph ? + NOT_COVERED : + (this+coverage).get_coverage (glyph); + if (idx == NOT_COVERED) + { + if (c.draw_session) + { + // Build a transforming pen to apply the transform. + hb_draw_funcs_t *transformer_funcs = hb_transforming_pen_get_funcs (); + hb_transforming_pen_context_t context {transform, + c.draw_session->funcs, + c.draw_session->draw_data, + &c.draw_session->st}; + hb_draw_session_t transformer_session {transformer_funcs, &context}; + hb_draw_session_t &shape_draw_session = transform.is_identity () ? *c.draw_session : transformer_session; + + if (c.font->face->table.glyf->get_path_at (c.font, glyph, shape_draw_session, coords, c.scratch.glyf_scratch)) return true; +#ifndef HB_NO_CFF + if (c.font->face->table.cff2->get_path_at (c.font, glyph, shape_draw_session, coords)) return true; + if (c.font->face->table.cff1->get_path (c.font, glyph, shape_draw_session)) return true; // Doesn't have variations +#endif + return false; + } + else if (c.extents) + { + hb_glyph_extents_t glyph_extents; + if (!c.font->face->table.glyf->get_extents_at (c.font, glyph, &glyph_extents, coords)) +#ifndef HB_NO_CFF + if (!c.font->face->table.cff2->get_extents_at (c.font, glyph, &glyph_extents, coords)) + if (!c.font->face->table.cff1->get_extents (c.font, glyph, &glyph_extents)) // Doesn't have variations +#endif + return false; + + hb_extents_t<> comp_extents (glyph_extents); + transform.transform_extents (comp_extents); + c.extents->union_ (comp_extents); + } + return true; + } + + if (c.depth_left <= 0) + return true; + + if (c.edges_left <= 0) + return true; + (c.edges_left)--; + + hb_decycler_node_t node (c.decycler); + if (unlikely (!node.visit (glyph))) + return true; + + hb_ubytes_t record = (this+glyphRecords)[idx]; + + hb_scalar_cache_t static_cache; + hb_scalar_cache_t *cache = parent_cache ? + parent_cache : + (this+varStore).create_cache (&static_cache); + + transform.scale (c.font->x_multf, c.font->y_multf); + + VarCompositeGlyph::get_path_at (c, + glyph, + coords, transform, + record, + cache); + + if (cache != parent_cache) + (this+varStore).destroy_cache (cache, &static_cache); + + return true; +} + +#endif + +//} // namespace Var +} // namespace OT + +#endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/Var/VARC/VARC.hh 2026-04-17 19:08:13.000000000 +0000 @@ -32,7 +32,7 @@ { hb_font_t *font; hb_draw_session_t *draw_session; - hb_extents_t *extents; + hb_extents_t<> *extents; mutable hb_decycler_t decycler; mutable signed edges_left; mutable signed depth_left; @@ -65,9 +65,9 @@ get_path_at (const hb_varc_context_t &c, hb_codepoint_t parent_gid, hb_array_t<const int> coords, - hb_transform_t transform, + hb_transform_t<> transform, hb_ubytes_t record, - VarRegionList::cache_t *cache = nullptr) const; + hb_scalar_cache_t *cache = nullptr) const; }; struct VarCompositeGlyph @@ -76,9 +76,9 @@ get_path_at (const hb_varc_context_t &c, hb_codepoint_t gid, hb_array_t<const int> coords, - hb_transform_t transform, + hb_transform_t<> transform, hb_ubytes_t record, - VarRegionList::cache_t *cache) + hb_scalar_cache_t *cache) { while (record) { @@ -104,9 +104,9 @@ get_path_at (const hb_varc_context_t &c, hb_codepoint_t gid, hb_array_t<const int> coords, - hb_transform_t transform = HB_TRANSFORM_IDENTITY, + hb_transform_t<> transform = HB_TRANSFORM_IDENTITY, hb_codepoint_t parent_gid = HB_CODEPOINT_INVALID, - VarRegionList::cache_t *parent_cache = nullptr) const; + hb_scalar_cache_t *parent_cache = nullptr) const; bool get_path (hb_font_t *font, @@ -129,7 +129,7 @@ bool get_extents (hb_font_t *font, hb_codepoint_t gid, - hb_extents_t *extents, + hb_extents_t<> *extents, hb_varc_scratch_t &scratch) const { hb_varc_context_t c {font, @@ -194,9 +194,10 @@ hb_codepoint_t gid, hb_glyph_extents_t *extents) const { +#ifndef HB_NO_DRAW if (!table->has_data ()) return false; - hb_extents_t f_extents; + hb_extents_t<> f_extents; auto *scratch = acquire_scratch (); if (unlikely (!scratch)) return true; @@ -207,6 +208,9 @@ *extents = f_extents.to_glyph_extents (font->x_scale < 0, font->y_scale < 0); return ret; +#else + return false; +#endif } private: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/glyf/Glyph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/glyf/Glyph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/glyf/Glyph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/glyf/Glyph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -102,17 +102,15 @@ if (unlikely (!points.resize (points.length + PHANTOM_COUNT))) return false; hb_array_t<contour_point_t> phantoms = points.as_array ().sub_array (points.length - PHANTOM_COUNT, PHANTOM_COUNT); { + // Duplicated code. int lsb = 0; - int h_delta = face->table.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb) ? - (int) header->xMin - lsb : 0; + face->table.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb); + int h_delta = (int) header->xMin - lsb; HB_UNUSED int tsb = 0; - int v_orig = (int) header->yMax + #ifndef HB_NO_VERTICAL - ((void) face->table.vmtx->get_leading_bearing_without_var_unscaled (gid, &tsb), tsb) -#else - 0 + face->table.vmtx->get_leading_bearing_without_var_unscaled (gid, &tsb); #endif - ; + int v_orig = (int) header->yMax + tsb; unsigned h_adv = face->table.hmtx->get_advance_without_var_unscaled (gid); unsigned v_adv = #ifndef HB_NO_VERTICAL @@ -314,6 +312,7 @@ bool use_my_metrics = true, bool phantom_only = false, hb_array_t<const int> coords = hb_array_t<const int> (), + hb_scalar_cache_t *gvar_cache = nullptr, unsigned int depth = 0, unsigned *edge_count = nullptr) const { @@ -328,7 +327,7 @@ head_maxp_info->maxComponentDepth = hb_max (head_maxp_info->maxComponentDepth, depth); } - if (!coords) + if (!coords && font->has_nonzero_coords) coords = hb_array (font->coords, font->num_coords); contour_point_vector_t &points = type == SIMPLE ? all_points : scratch.comp_points; @@ -357,17 +356,15 @@ if (unlikely (!points.resize (points.length + PHANTOM_COUNT))) return false; hb_array_t<contour_point_t> phantoms = points.as_array ().sub_array (points.length - PHANTOM_COUNT, PHANTOM_COUNT); { + // Duplicated code. int lsb = 0; - int h_delta = glyf_accelerator.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb) ? - (int) header->xMin - lsb : 0; + glyf_accelerator.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb); + int h_delta = (int) header->xMin - lsb; HB_UNUSED int tsb = 0; - int v_orig = (int) header->yMax + #ifndef HB_NO_VERTICAL - ((void) glyf_accelerator.vmtx->get_leading_bearing_without_var_unscaled (gid, &tsb), tsb) -#else - 0 + glyf_accelerator.vmtx->get_leading_bearing_without_var_unscaled (gid, &tsb); #endif - ; + int v_orig = (int) header->yMax + tsb; unsigned h_adv = glyf_accelerator.hmtx->get_advance_without_var_unscaled (gid); unsigned v_adv = #ifndef HB_NO_VERTICAL @@ -383,7 +380,7 @@ } #ifndef HB_NO_VAR - if (coords) + if (hb_any (coords)) { #ifndef HB_NO_BEYOND_64K if (glyf_accelerator.GVAR->has_data ()) @@ -391,6 +388,7 @@ coords, points.as_array ().sub_array (old_length), scratch, + gvar_cache, phantom_only && type == SIMPLE); else #endif @@ -398,6 +396,7 @@ coords, points.as_array ().sub_array (old_length), scratch, + gvar_cache, phantom_only && type == SIMPLE); } #endif @@ -447,6 +446,7 @@ use_my_metrics, phantom_only, coords, + gvar_cache, depth + 1, edge_count))) { @@ -533,7 +533,11 @@ bool get_extents_without_var_scaled (hb_font_t *font, const glyf_accelerator_t &glyf_accelerator, hb_glyph_extents_t *extents) const { - if (type == EMPTY) return true; /* Empty glyph; zero extents. */ + if (type == EMPTY) + { + *extents = {0, 0, 0, 0}; + return true; /* Empty glyph; zero extents. */ + } return header->get_extents_without_var_scaled (font, glyf_accelerator, gid, extents); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/glyf/SimpleGlyph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/glyf/SimpleGlyph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/glyf/SimpleGlyph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/glyf/SimpleGlyph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -189,7 +189,7 @@ unsigned old_length = points.length; points.alloc (points.length + num_points + 4); // Allocate for phantom points, to avoid a possible copy - if (unlikely (!points.resize (points.length + num_points, false))) return false; + if (unlikely (!points.resize_dirty (points.length + num_points))) return false; auto points_ = points.as_array ().sub_array (old_length); if (!phantom_only) hb_memset (points_.arrayZ, 0, sizeof (contour_point_t) * num_points); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/glyf/glyf.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/glyf/glyf.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/OT/glyf/glyf.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/OT/glyf/glyf.hh 2026-04-17 19:08:13.000000000 +0000 @@ -220,7 +220,8 @@ template<typename T> bool get_points (hb_font_t *font, hb_codepoint_t gid, T consumer, hb_array_t<const int> coords, - hb_glyf_scratch_t &scratch) const + hb_glyf_scratch_t &scratch, + hb_scalar_cache_t *gvar_cache = nullptr) const { if (gid >= num_glyphs) return false; @@ -228,7 +229,7 @@ all_points.resize (0); bool phantom_only = !consumer.is_consuming_contour_points (); - if (unlikely (!glyph_for_gid (gid).get_points (font, *this, all_points, scratch, nullptr, nullptr, nullptr, true, true, phantom_only, coords))) + if (unlikely (!glyph_for_gid (gid).get_points (font, *this, all_points, scratch, nullptr, nullptr, nullptr, true, true, phantom_only, coords, gvar_cache))) return false; unsigned count = all_points.length; @@ -371,69 +372,67 @@ contour_point_t *get_phantoms_sink () { return phantoms; } }; +#ifndef HB_NO_VAR unsigned - get_advance_with_var_unscaled (hb_font_t *font, hb_codepoint_t gid, bool is_vertical) const + get_advance_with_var_unscaled (hb_codepoint_t gid, + hb_font_t *font, + bool is_vertical, + hb_glyf_scratch_t &scratch, + hb_scalar_cache_t *gvar_cache = nullptr) const { if (unlikely (gid >= num_glyphs)) return 0; bool success = false; contour_point_t phantoms[glyf_impl::PHANTOM_COUNT]; - if (font->num_coords) + success = get_points (font, gid, points_aggregator_t (font, nullptr, phantoms, false), + hb_array (font->coords, + font->has_nonzero_coords ? font->num_coords : 0), + scratch, gvar_cache); + if (unlikely (!success)) { - hb_glyf_scratch_t scratch; - success = get_points (font, gid, points_aggregator_t (font, nullptr, phantoms, false), - hb_array (font->coords, font->num_coords), - scratch); + unsigned upem = font->face->get_upem (); + return is_vertical ? upem : upem / 2; } - if (unlikely (!success)) - return -#ifndef HB_NO_VERTICAL - is_vertical ? vmtx->get_advance_without_var_unscaled (gid) : -#endif - hmtx->get_advance_without_var_unscaled (gid); - float result = is_vertical ? phantoms[glyf_impl::PHANTOM_TOP].y - phantoms[glyf_impl::PHANTOM_BOTTOM].y : phantoms[glyf_impl::PHANTOM_RIGHT].x - phantoms[glyf_impl::PHANTOM_LEFT].x; return hb_clamp (roundf (result), 0.f, (float) UINT_MAX / 2); } - bool get_leading_bearing_with_var_unscaled (hb_font_t *font, hb_codepoint_t gid, bool is_vertical, int *lsb) const + float + get_v_origin_with_var_unscaled (hb_codepoint_t gid, + hb_font_t *font, + hb_glyf_scratch_t &scratch, + hb_scalar_cache_t *gvar_cache = nullptr) const { - if (unlikely (gid >= num_glyphs)) return false; + if (unlikely (gid >= num_glyphs)) return 0; + + bool success = false; - hb_glyph_extents_t extents; - hb_glyf_scratch_t scratch; contour_point_t phantoms[glyf_impl::PHANTOM_COUNT]; - if (unlikely (!get_points (font, gid, points_aggregator_t (font, &extents, phantoms, false), - hb_array (font->coords, font->num_coords), - scratch))) - return false; + success = get_points (font, gid, points_aggregator_t (font, nullptr, phantoms, false), + hb_array (font->coords, + font->has_nonzero_coords ? font->num_coords : 0), + scratch, gvar_cache); + if (unlikely (!success)) + { + return font->face->get_upem (); + } - *lsb = is_vertical - ? roundf (phantoms[glyf_impl::PHANTOM_TOP].y) - extents.y_bearing - : roundf (phantoms[glyf_impl::PHANTOM_LEFT].x); - return true; + return phantoms[glyf_impl::PHANTOM_TOP].y; } #endif - - bool get_leading_bearing_without_var_unscaled (hb_codepoint_t gid, bool is_vertical, int *lsb) const - { - if (unlikely (gid >= num_glyphs)) return false; - if (is_vertical) return false; // TODO Humm, what to do here? - - *lsb = glyph_for_gid (gid).get_header ()->xMin; - return true; - } +#endif public: bool get_extents (hb_font_t *font, hb_codepoint_t gid, hb_glyph_extents_t *extents) const - { return get_extents_at (font, gid, extents, hb_array (font->coords, font->num_coords)); } + { return get_extents_at (font, gid, extents, hb_array (font->coords, + font->has_nonzero_coords ? font->num_coords : 0)); } bool get_extents_at (hb_font_t *font, hb_codepoint_t gid, @@ -445,12 +444,15 @@ #ifndef HB_NO_VAR if (coords) { - hb_glyf_scratch_t scratch; - return get_points (font, - gid, - points_aggregator_t (font, extents, nullptr, true), - coords, - scratch); + hb_glyf_scratch_t *scratch = acquire_scratch (); + if (unlikely (!scratch)) return false; + bool ret = get_points (font, + gid, + points_aggregator_t (font, extents, nullptr, true), + coords, + *scratch); + release_scratch (scratch); + return ret; } #endif return glyph_for_gid (gid).get_extents_without_var_scaled (font, *this, extents); @@ -485,33 +487,20 @@ } bool - get_path (hb_font_t *font, hb_codepoint_t gid, hb_draw_session_t &draw_session) const + get_path (hb_font_t *font, hb_codepoint_t gid, hb_draw_session_t &draw_session, hb_scalar_cache_t *gvar_cache = nullptr) const { if (!has_data ()) return false; - hb_glyf_scratch_t *scratch; - - // Borrow the cached strach buffer. - { - scratch = cached_scratch.get_acquire (); - if (!scratch || unlikely (!cached_scratch.cmpexch (scratch, nullptr))) - { - scratch = (hb_glyf_scratch_t *) hb_calloc (1, sizeof (hb_glyf_scratch_t)); - if (unlikely (!scratch)) - return true; - } - } + hb_glyf_scratch_t *scratch = acquire_scratch (); + if (unlikely (!scratch)) return true; bool ret = get_points (font, gid, glyf_impl::path_builder_t (font, draw_session), - hb_array (font->coords, font->num_coords), - *scratch); + hb_array (font->coords, + font->has_nonzero_coords ? font->num_coords : 0), + *scratch, + gvar_cache); - // Put it back. - if (!cached_scratch.cmpexch (nullptr, scratch)) - { - scratch->~hb_glyf_scratch_t (); - hb_free (scratch); - } + release_scratch (scratch); return ret; } @@ -519,12 +508,38 @@ bool get_path_at (hb_font_t *font, hb_codepoint_t gid, hb_draw_session_t &draw_session, hb_array_t<const int> coords, - hb_glyf_scratch_t &scratch) const + hb_glyf_scratch_t &scratch, + hb_scalar_cache_t *gvar_cache = nullptr) const { if (!has_data ()) return false; return get_points (font, gid, glyf_impl::path_builder_t (font, draw_session), coords, - scratch); + scratch, + gvar_cache); + } + + + hb_glyf_scratch_t *acquire_scratch () const + { + if (!has_data ()) return nullptr; + hb_glyf_scratch_t *scratch = cached_scratch.get_acquire (); + if (!scratch || unlikely (!cached_scratch.cmpexch (scratch, nullptr))) + { + scratch = (hb_glyf_scratch_t *) hb_calloc (1, sizeof (hb_glyf_scratch_t)); + if (unlikely (!scratch)) + return nullptr; + } + return scratch; + } + void release_scratch (hb_glyf_scratch_t *scratch) const + { + if (!scratch) + return; + if (!cached_scratch.cmpexch (nullptr, scratch)) + { + scratch->~hb_glyf_scratch_t (); + hb_free (scratch); + } } #ifndef HB_NO_VAR diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/classdef-graph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/classdef-graph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/classdef-graph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/classdef-graph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -74,7 +74,7 @@ class_def_link->width = SmallTypes::size; class_def_link->objidx = class_def_prime_id; class_def_link->position = link_position; - class_def_prime_vertex.add_parent (parent_id); + class_def_prime_vertex.add_parent (parent_id, false); return true; } @@ -117,7 +117,7 @@ int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < OT::ClassDef::min_size) return false; hb_barrier (); - switch (u.format) + switch (u.format.v) { case 1: return ((ClassDefFormat1*)this)->sanitize (vertex); case 2: return ((ClassDefFormat2*)this)->sanitize (vertex); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/coverage-graph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/coverage-graph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/coverage-graph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/coverage-graph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -32,29 +32,27 @@ namespace graph { -struct CoverageFormat1 : public OT::Layout::Common::CoverageFormat1_3<SmallTypes> -{ - bool sanitize (graph_t::vertex_t& vertex) const - { - int64_t vertex_len = vertex.obj.tail - vertex.obj.head; - constexpr unsigned min_size = OT::Layout::Common::CoverageFormat1_3<SmallTypes>::min_size; - if (vertex_len < min_size) return false; - hb_barrier (); - return vertex_len >= min_size + glyphArray.get_size () - glyphArray.len.get_size (); - } -}; - -struct CoverageFormat2 : public OT::Layout::Common::CoverageFormat2_4<SmallTypes> -{ - bool sanitize (graph_t::vertex_t& vertex) const - { - int64_t vertex_len = vertex.obj.tail - vertex.obj.head; - constexpr unsigned min_size = OT::Layout::Common::CoverageFormat2_4<SmallTypes>::min_size; - if (vertex_len < min_size) return false; - hb_barrier (); - return vertex_len >= min_size + rangeRecord.get_size () - rangeRecord.len.get_size (); - } -}; +static bool sanitize ( + const OT::Layout::Common::CoverageFormat1_3<OT::Layout::SmallTypes>* thiz, + graph_t::vertex_t& vertex +) { + int64_t vertex_len = vertex.obj.tail - vertex.obj.head; + constexpr unsigned min_size = OT::Layout::Common::CoverageFormat1_3<OT::Layout::SmallTypes>::min_size; + if (vertex_len < min_size) return false; + hb_barrier (); + return vertex_len >= min_size + thiz->glyphArray.get_size () - thiz->glyphArray.len.get_size (); +} + +static bool sanitize ( + const OT::Layout::Common::CoverageFormat2_4<OT::Layout::SmallTypes>* thiz, + graph_t::vertex_t& vertex +) { + int64_t vertex_len = vertex.obj.tail - vertex.obj.head; + constexpr unsigned min_size = OT::Layout::Common::CoverageFormat2_4<OT::Layout::SmallTypes>::min_size; + if (vertex_len < min_size) return false; + hb_barrier (); + return vertex_len >= min_size + thiz->rangeRecord.get_size () - thiz->rangeRecord.len.get_size (); +} struct Coverage : public OT::Layout::Common::Coverage { @@ -98,11 +96,33 @@ coverage_link->width = SmallTypes::size; coverage_link->objidx = coverage_prime_id; coverage_link->position = link_position; - coverage_prime_vertex.add_parent (parent_id); + coverage_prime_vertex.add_parent (parent_id, false); return (Coverage*) coverage_prime_vertex.obj.head; } + // Filter an existing coverage table to glyphs at indices [start, end) and replace it with the filtered version. + static bool filter_coverage (gsubgpos_graph_context_t& c, + unsigned existing_coverage, + unsigned start, unsigned end) { + unsigned coverage_size = c.graph.vertices_[existing_coverage].table_size (); + auto& coverage_v = c.graph.vertices_[existing_coverage]; + Coverage* coverage_table = (Coverage*) coverage_v.obj.head; + if (!coverage_table || !coverage_table->sanitize (coverage_v)) + return false; + + auto new_coverage = + + hb_zip (coverage_table->iter (), hb_range ()) + | hb_filter ([&] (hb_pair_t<unsigned, unsigned> p) { + return p.second >= start && p.second < end; + }) + | hb_map_retains_sorting (hb_first) + ; + + return make_coverage (c, new_coverage, existing_coverage, coverage_size * 2 + 100); + } + + // Replace the coverage table at dest obj with one covering 'glyphs'. template<typename It> static bool make_coverage (gsubgpos_graph_context_t& c, It glyphs, @@ -141,10 +161,10 @@ int64_t vertex_len = vertex.obj.tail - vertex.obj.head; if (vertex_len < OT::Layout::Common::Coverage::min_size) return false; hb_barrier (); - switch (u.format) + switch (u.format.v) { - case 1: return ((CoverageFormat1*)this)->sanitize (vertex); - case 2: return ((CoverageFormat2*)this)->sanitize (vertex); + case 1: return graph::sanitize ((const OT::Layout::Common::CoverageFormat1_3<OT::Layout::SmallTypes>*) this, vertex); + case 2: return graph::sanitize ((const OT::Layout::Common::CoverageFormat2_4<OT::Layout::SmallTypes>*) this, vertex); #ifndef HB_NO_BEYOND_64K // Not currently supported case 3: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/graph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/graph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/graph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/graph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -50,6 +50,7 @@ private: unsigned incoming_edges_ = 0; unsigned single_parent = (unsigned) -1; + bool has_incoming_virtual_edges_ = false; hb_hashmap_t<unsigned, unsigned> parents; public: @@ -66,6 +67,11 @@ return parents.in_error (); } + bool has_incoming_virtual_edges () const + { + return has_incoming_virtual_edges_; + } + bool link_positions_valid (unsigned num_objects, bool removed_nil) { hb_set_t assigned_bytes; @@ -121,7 +127,9 @@ } } - bool equals (const vertex_t& other, + bool equals (unsigned this_index, + unsigned other_index, + const vertex_t& other, const graph_t& graph, const graph_t& other_graph, unsigned depth) const @@ -129,8 +137,10 @@ if (!(as_bytes () == other.as_bytes ())) { DEBUG_MSG (SUBSET_REPACK, nullptr, - "vertex [%lu] bytes != [%lu] bytes, depth = %u", + "vertex %u [%lu bytes] != %u [%lu bytes], depth = %u", + this_index, (unsigned long) table_size (), + other_index, (unsigned long) other.table_size (), depth); @@ -162,6 +172,7 @@ hb_swap (a.single_parent, b.single_parent); hb_swap (a.parents, b.parents); hb_swap (a.incoming_edges_, b.incoming_edges_); + hb_swap (a.has_incoming_virtual_edges_, b.has_incoming_virtual_edges_); hb_swap (a.start, b.start); hb_swap (a.end, b.end); hb_swap (a.priority, b.priority); @@ -207,13 +218,16 @@ void reset_parents () { incoming_edges_ = 0; + has_incoming_virtual_edges_ = false; single_parent = (unsigned) -1; parents.reset (); } - void add_parent (unsigned parent_index) + void add_parent (unsigned parent_index, bool is_virtual) { assert (parent_index != (unsigned) -1); + has_incoming_virtual_edges_ |= is_virtual; + if (incoming_edges_ == 0) { single_parent = parent_index; @@ -408,7 +422,7 @@ link_a.bias != link_b.bias) return false; - if (!graph.vertices_[link_a.objidx].equals ( + if (!graph.vertices_[link_a.objidx].equals (link_a.objidx, link_b.objidx, other_graph.vertices_[link_b.objidx], graph, other_graph, depth + 1)) return false; @@ -456,8 +470,12 @@ num_roots_for_space_.push (1); bool removed_nil = false; vertices_.alloc (objects.length); - vertices_scratch_.alloc (objects.length); + ordering_.resize (objects.length); + ordering_scratch_.alloc (objects.length); + unsigned count = objects.length; + unsigned order = objects.length; + unsigned skip = 0; for (unsigned i = 0; i < count; i++) { // If this graph came from a serialization buffer object 0 is the @@ -465,6 +483,9 @@ if (i == 0 && !objects.arrayZ[i]) { removed_nil = true; + order--; + ordering_.resize(objects.length - 1); + skip++; continue; } @@ -474,6 +495,12 @@ check_success (v->link_positions_valid (count, removed_nil)); + // To start we set the ordering to match the provided objects + // list. Note: objects are provided to us in reverse order (ie. + // the last object is the root). + unsigned obj_idx = i - skip; + ordering_[--order] = obj_idx; + if (!removed_nil) continue; // Fix indices to account for removed nil object. for (auto& l : v->obj.all_links_writer ()) { @@ -490,17 +517,20 @@ bool operator== (const graph_t& other) const { - return root ().equals (other.root (), *this, other, 0); + return root ().equals (root_idx(), other.root_idx(), other.root (), *this, other, 0); } void print () const { - for (int i = vertices_.length - 1; i >= 0; i--) + for (unsigned id : ordering_) { - const auto& v = vertices_[i]; - printf("%d: %u [", i, (unsigned int)v.table_size()); + const auto& v = vertices_[id]; + printf("%u: %u [", id, (unsigned int)v.table_size()); for (const auto &l : v.obj.real_links) { printf("%u, ", l.objidx); } + for (const auto &l : v.obj.virtual_links) { + printf("v%u, ", l.objidx); + } printf("]\n"); } } @@ -516,6 +546,7 @@ { return !successful || vertices_.in_error () || + ordering_.in_error() || num_roots_for_space_.in_error (); } @@ -526,10 +557,10 @@ unsigned root_idx () const { - // Object graphs are in reverse order, the first object is at the end - // of the vector. Since the graph is topologically sorted it's safe to + // First element of ordering_ is the root. + // Since the graph is topologically sorted it's safe to // assume the first object has no incoming edges. - return vertices_.length - 1; + return ordering_[0]; } const hb_serialize_context_t::object_t& object (unsigned i) const @@ -556,7 +587,7 @@ link->width = 2; link->objidx = child_id; link->position = (char*) offset - (char*) v.obj.head; - vertices_[child_id].add_parent (parent_id); + vertices_[child_id].add_parent (parent_id, false); } /* @@ -587,55 +618,51 @@ hb_priority_queue_t<int64_t> queue; queue.alloc (vertices_.length); - hb_vector_t<vertex_t> &sorted_graph = vertices_scratch_; - if (unlikely (!check_success (sorted_graph.resize (vertices_.length)))) return; - hb_vector_t<unsigned> id_map; - if (unlikely (!check_success (id_map.resize (vertices_.length)))) return; + hb_vector_t<unsigned> &new_ordering = ordering_scratch_; + if (unlikely (!check_success (new_ordering.resize (vertices_.length)))) return; hb_vector_t<unsigned> removed_edges; if (unlikely (!check_success (removed_edges.resize (vertices_.length)))) return; update_parents (); queue.insert (root ().modified_distance (0), root_idx ()); - int new_id = root_idx (); unsigned order = 1; + unsigned pos = 0; while (!queue.in_error () && !queue.is_empty ()) { unsigned next_id = queue.pop_minimum().second; - sorted_graph[new_id] = std::move (vertices_[next_id]); - const vertex_t& next = sorted_graph[new_id]; - - if (unlikely (!check_success(new_id >= 0))) { + if (unlikely (!check_success(pos < new_ordering.length))) { // We are out of ids. Which means we've visited a node more than once. // This graph contains a cycle which is not allowed. DEBUG_MSG (SUBSET_REPACK, nullptr, "Invalid graph. Contains cycle."); return; } - - id_map[next_id] = new_id--; + new_ordering[pos++] = next_id; + const vertex_t& next = vertices_[next_id]; for (const auto& link : next.obj.all_links ()) { removed_edges[link.objidx]++; - if (!(vertices_[link.objidx].incoming_edges () - removed_edges[link.objidx])) + const auto& v = vertices_[link.objidx]; + if (!(v.incoming_edges () - removed_edges[link.objidx])) // Add the order that the links were encountered to the priority. // This ensures that ties between priorities objects are broken in a consistent // way. More specifically this is set up so that if a set of objects have the same // distance they'll be added to the topological order in the order that they are // referenced from the parent object. - queue.insert (vertices_[link.objidx].modified_distance (order++), + queue.insert (v.modified_distance (order++), link.objidx); } } check_success (!queue.in_error ()); - check_success (!sorted_graph.in_error ()); + check_success (!new_ordering.in_error ()); - check_success (remap_all_obj_indices (id_map, &sorted_graph)); - vertices_ = std::move (sorted_graph); + hb_swap (ordering_, new_ordering); - if (!check_success (new_id == -1)) + if (!check_success (pos == vertices_.length)) { print_orphaned_nodes (); + } } /* @@ -645,8 +672,8 @@ */ void find_space_roots (hb_set_t& visited, hb_set_t& roots) { - int root_index = (int) root_idx (); - for (int i = root_index; i >= 0; i--) + unsigned root_index = root_idx (); + for (unsigned i : ordering_) { if (visited.has (i)) continue; @@ -829,7 +856,6 @@ if (subgraph.in_error ()) return false; - unsigned original_root_idx = root_idx (); hb_map_t index_map; bool made_changes = false; for (auto entry : subgraph.iter ()) @@ -852,14 +878,6 @@ if (!made_changes) return false; - if (original_root_idx != root_idx () - && parents.has (original_root_idx)) - { - // If the root idx has changed since parents was determined, update root idx in parents - parents.add (root_idx ()); - parents.del (original_root_idx); - } - auto new_subgraph = + subgraph.keys () | hb_map([&] (uint32_t node_idx) { @@ -943,12 +961,14 @@ /* * Moves the child of old_parent_idx pointed to by old_offset to a new * vertex at the new_offset. + * + * Returns the id of the child node that was moved. */ template<typename O> - void move_child (unsigned old_parent_idx, - const O* old_offset, - unsigned new_parent_idx, - const O* new_offset) + unsigned move_child (unsigned old_parent_idx, + const O* old_offset, + unsigned new_parent_idx, + const O* new_offset) { distance_invalid = true; positions_invalid = true; @@ -965,10 +985,56 @@ new_link->position = (const char*) new_offset - (const char*) new_v.obj.head; auto& child = vertices_[child_id]; - child.add_parent (new_parent_idx); + child.add_parent (new_parent_idx, false); old_v.remove_real_link (child_id, old_offset); child.remove_parent (old_parent_idx); + + return child_id; + } + + /* + * Moves all outgoing links in old parent that have + * a link position between [old_post_start, old_pos_end) + * to the new parent. Links are placed serially in the new + * parent starting at new_pos_start. + */ + template<typename O> + void move_children (unsigned old_parent_idx, + unsigned old_pos_start, + unsigned old_pos_end, + unsigned new_parent_idx, + unsigned new_pos_start) + { + distance_invalid = true; + positions_invalid = true; + + auto& old_v = vertices_[old_parent_idx]; + auto& new_v = vertices_[new_parent_idx]; + + hb_vector_t<hb_serialize_context_t::object_t::link_t> old_links; + for (const auto& l : old_v.obj.real_links) + { + if (l.position < old_pos_start || l.position >= old_pos_end) + { + old_links.push(l); + continue; + } + + unsigned array_pos = l.position - old_pos_start; + + unsigned child_id = l.objidx; + auto* new_link = new_v.obj.real_links.push (); + new_link->width = O::static_size; + new_link->objidx = child_id; + new_link->position = new_pos_start + array_pos; + + auto& child = vertices_[child_id]; + child.add_parent (new_parent_idx, false); + child.remove_parent (old_parent_idx); + } + + old_v.obj.real_links = std::move (old_links); } /* @@ -1000,8 +1066,11 @@ distance_invalid = true; auto* clone = vertices_.push (); + unsigned clone_idx = vertices_.length - 1; + ordering_.push(clone_idx); + auto& child = vertices_[node_idx]; - if (vertices_.in_error ()) { + if (vertices_.in_error () || ordering_.in_error()) { return -1; } @@ -1011,30 +1080,20 @@ clone->space = child.space; clone->reset_parents (); - unsigned clone_idx = vertices_.length - 2; for (const auto& l : child.obj.real_links) { clone->obj.real_links.push (l); - vertices_[l.objidx].add_parent (clone_idx); + vertices_[l.objidx].add_parent (clone_idx, false); } for (const auto& l : child.obj.virtual_links) { clone->obj.virtual_links.push (l); - vertices_[l.objidx].add_parent (clone_idx); + vertices_[l.objidx].add_parent (clone_idx, true); } check_success (!clone->obj.real_links.in_error ()); check_success (!clone->obj.virtual_links.in_error ()); - // The last object is the root of the graph, so swap back the root to the end. - // The root's obj idx does change, however since it's root nothing else refers to it. - // all other obj idx's will be unaffected. - hb_swap (vertices_[vertices_.length - 2], *clone); - - // Since the root moved, update the parents arrays of all children on the root. - for (const auto& l : root ().obj.all_links ()) - vertices_[l.objidx].remap_parent (root_idx () - 1, root_idx ()); - return clone_idx; } @@ -1045,24 +1104,6 @@ * * Returns the index of the newly created duplicate. * - * If the child_idx only has incoming edges from parent_idx, this - * will do nothing and return the original child_idx. - */ - unsigned duplicate_if_shared (unsigned parent_idx, unsigned child_idx) - { - unsigned new_idx = duplicate (parent_idx, child_idx); - if (new_idx == (unsigned) -1) return child_idx; - return new_idx; - } - - - /* - * Creates a copy of child and re-assigns the link from - * parent to the clone. The copy is a shallow copy, objects - * linked from child are not duplicated. - * - * Returns the index of the newly created duplicate. - * * If the child_idx only has incoming edges from parent_idx, * duplication isn't possible and this will return -1. */ @@ -1073,10 +1114,15 @@ const auto& child = vertices_[child_idx]; unsigned links_to_child = child.incoming_edges_from_parent(parent_idx); - if (child.incoming_edges () <= links_to_child) + if (child.incoming_edges () <= links_to_child || child.has_incoming_virtual_edges()) { // Can't duplicate this node, doing so would orphan the original one as all remaining links // to child are from parent. + // + // We don't allow duplication of nodes with incoming virtual edges because we don't track + // the number of virtual vs real incoming edges. As a result we can't tell if a node + // with virtual edges may end up orphaned by duplication (ie. where one copy is only pointed + // to by virtual edges). DEBUG_MSG (SUBSET_REPACK, nullptr, " Not duplicating %u => %u", parent_idx, child_idx); return -1; @@ -1091,12 +1137,15 @@ if (parent_idx == clone_idx) parent_idx++; auto& parent = vertices_[parent_idx]; + unsigned count = 0; + unsigned num_real = parent.obj.real_links.length; for (auto& l : parent.obj.all_links_writer ()) { + count++; if (l.objidx != child_idx) continue; - reassign_link (l, parent_idx, clone_idx); + reassign_link (l, parent_idx, clone_idx, count > num_real); } return clone_idx; @@ -1129,10 +1178,15 @@ links_to_child += child.incoming_edges_from_parent(parent_idx); } - if (child.incoming_edges () <= links_to_child) + if (child.incoming_edges () <= links_to_child || child.has_incoming_virtual_edges()) { // Can't duplicate this node, doing so would orphan the original one as all remaining links // to child are from parent. + // + // We don't allow duplication of nodes with incoming virtual edges because we don't track + // the number of virtual vs real incoming edges. As a result we can't tell if a node + // with virtual edges may end up orphaned by duplication (ie. where one copy is only pointed + // to by virtual edges). DEBUG_MSG (SUBSET_REPACK, nullptr, " Not duplicating %u, ..., %u => %u", first_parent, last_parent, child_idx); return -1; } @@ -1146,12 +1200,15 @@ // duplicate shifts the root node idx, so if parent_idx was root update it. if (parent_idx == clone_idx) parent_idx++; auto& parent = vertices_[parent_idx]; + unsigned count = 0; + unsigned num_real = parent.obj.real_links.length; for (auto& l : parent.obj.all_links_writer ()) { + count++; if (l.objidx != child_idx) continue; - reassign_link (l, parent_idx, clone_idx); + reassign_link (l, parent_idx, clone_idx, count > num_real); } } @@ -1168,7 +1225,10 @@ distance_invalid = true; auto* clone = vertices_.push (); - if (vertices_.in_error ()) { + unsigned clone_idx = vertices_.length - 1; + ordering_.push(clone_idx); + + if (vertices_.in_error () || ordering_.in_error()) { return -1; } @@ -1177,18 +1237,35 @@ clone->distance = 0; clone->space = 0; - unsigned clone_idx = vertices_.length - 2; + return clone_idx; + } - // The last object is the root of the graph, so swap back the root to the end. - // The root's obj idx does change, however since it's root nothing else refers to it. - // all other obj idx's will be unaffected. - hb_swap (vertices_[vertices_.length - 2], *clone); - - // Since the root moved, update the parents arrays of all children on the root. - for (const auto& l : root ().obj.all_links ()) - vertices_[l.objidx].remap_parent (root_idx () - 1, root_idx ()); + /* + * Creates a new child node and remap the old child to it. + * + * Returns the index of the newly created child. + * + */ + unsigned remap_child (unsigned parent_idx, unsigned old_child_idx) + { + unsigned new_child_idx = duplicate (old_child_idx); + if (new_child_idx == (unsigned) -1) return -1; - return clone_idx; + auto& parent = vertices_[parent_idx]; + for (auto& l : parent.obj.real_links) + { + if (l.objidx != old_child_idx) + continue; + reassign_link (l, parent_idx, new_child_idx, false); + } + + for (auto& l : parent.obj.virtual_links) + { + if (l.objidx != old_child_idx) + continue; + reassign_link (l, parent_idx, new_child_idx, true); + } + return new_child_idx; } /* @@ -1279,6 +1356,7 @@ if (!DEBUG_ENABLED(SUBSET_REPACK)) return; DEBUG_MSG (SUBSET_REPACK, nullptr, "Graph is not fully connected."); + parents_invalid = true; update_parents(); @@ -1348,7 +1426,8 @@ size_t total_size = 0; unsigned count = vertices_.length; for (unsigned i = 0; i < count; i++) { - size_t size = vertices_.arrayZ[i].obj.tail - vertices_.arrayZ[i].obj.head; + const auto& obj = vertices_.arrayZ[i].obj; + size_t size = obj.tail - obj.head; total_size += size; } return total_size; @@ -1398,8 +1477,11 @@ for (unsigned p = 0; p < count; p++) { - for (auto& l : vertices_.arrayZ[p].obj.all_links ()) - vertices_[l.objidx].add_parent (p); + for (auto& l : vertices_.arrayZ[p].obj.real_links) + vertices_[l.objidx].add_parent (p, false); + + for (auto& l : vertices_.arrayZ[p].obj.virtual_links) + vertices_[l.objidx].add_parent (p, true); } for (unsigned i = 0; i < count; i++) @@ -1418,7 +1500,7 @@ if (!positions_invalid) return; unsigned current_pos = 0; - for (int i = root_idx (); i >= 0; i--) + for (unsigned i : ordering_) { auto& v = vertices_[i]; v.start = current_pos; @@ -1450,11 +1532,11 @@ unsigned count = vertices_.length; for (unsigned i = 0; i < count; i++) vertices_.arrayZ[i].distance = hb_int_max (int64_t); - vertices_.tail ().distance = 0; + vertices_[root_idx ()].distance = 0; hb_priority_queue_t<int64_t> queue; queue.alloc (count); - queue.insert (0, vertices_.length - 1); + queue.insert (0, root_idx ()); hb_vector_t<bool> visited; visited.resize (vertices_.length); @@ -1464,22 +1546,23 @@ unsigned next_idx = queue.pop_minimum ().second; if (visited[next_idx]) continue; const auto& next = vertices_[next_idx]; - int64_t next_distance = vertices_[next_idx].distance; + int64_t next_distance = next.distance; visited[next_idx] = true; for (const auto& link : next.obj.all_links ()) { if (visited[link.objidx]) continue; - const auto& child = vertices_.arrayZ[link.objidx].obj; + auto& child_v = vertices_.arrayZ[link.objidx]; + const auto& child = child_v.obj; unsigned link_width = link.width ? link.width : 4; // treat virtual offsets as 32 bits wide int64_t child_weight = (child.tail - child.head) + - ((int64_t) 1 << (link_width * 8)) * (vertices_.arrayZ[link.objidx].space + 1); + ((int64_t) 1 << (link_width * 8)) * (child_v.space + 1); int64_t child_distance = next_distance + child_weight; - if (child_distance < vertices_.arrayZ[link.objidx].distance) + if (child_distance < child_v.distance) { - vertices_.arrayZ[link.objidx].distance = child_distance; + child_v.distance = child_distance; queue.insert (child_distance, link.objidx); } } @@ -1502,12 +1585,13 @@ */ void reassign_link (hb_serialize_context_t::object_t::link_t& link, unsigned parent_idx, - unsigned new_idx) + unsigned new_idx, + bool is_virtual) { unsigned old_idx = link.objidx; link.objidx = new_idx; vertices_[old_idx].remove_parent (parent_idx); - vertices_[new_idx].add_parent (parent_idx); + vertices_[new_idx].add_parent (parent_idx, is_virtual); } /* @@ -1521,37 +1605,22 @@ if (!id_map) return; for (unsigned i : subgraph) { - for (auto& link : vertices_[i].obj.all_links_writer ()) + auto& obj = vertices_[i].obj; + unsigned num_real = obj.real_links.length; + unsigned count = 0; + for (auto& link : obj.all_links_writer ()) { + count++; const uint32_t *v; if (!id_map.has (link.objidx, &v)) continue; - if (only_wide && !(link.width == 4 && !link.is_signed)) continue; + if (only_wide && (link.is_signed || (link.width != 4 && link.width != 3))) continue; - reassign_link (link, i, *v); + reassign_link (link, i, *v, count > num_real); } } } /* - * Updates all objidx's in all links using the provided mapping. - */ - bool remap_all_obj_indices (const hb_vector_t<unsigned>& id_map, - hb_vector_t<vertex_t>* sorted_graph) const - { - unsigned count = sorted_graph->length; - for (unsigned i = 0; i < count; i++) - { - if (!(*sorted_graph)[i].remap_parents (id_map)) - return false; - for (auto& link : sorted_graph->arrayZ[i].obj.all_links_writer ()) - { - link.objidx = id_map[link.objidx]; - } - } - return true; - } - - /* * Finds all nodes in targets that are reachable from start_idx, nodes in visited will be skipped. * For this search the graph is treated as being undirected. * @@ -1586,7 +1655,16 @@ public: // TODO(garretrieger): make private, will need to move most of offset overflow code into graph. hb_vector_t<vertex_t> vertices_; - hb_vector_t<vertex_t> vertices_scratch_; + + // Specifies the current topological ordering of this graph + // + // ordering_[pos] = obj index + // + // specifies that the 'pos'th spot is filled by the object + // given by obj index. + hb_vector_t<unsigned> ordering_; + hb_vector_t<unsigned> ordering_scratch_; + private: bool parents_invalid; bool distance_invalid; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-context.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-context.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-context.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-context.hh 2026-04-17 19:08:13.000000000 +0000 @@ -41,6 +41,7 @@ unsigned lookup_list_index; hb_hashmap_t<unsigned, graph::Lookup*> lookups; hb_hashmap_t<unsigned, unsigned> subtable_to_extension; + hb_hashmap_t<unsigned, hb_vector_t<unsigned>> split_subtables; HB_INTERNAL gsubgpos_graph_context_t (hb_tag_t table_tag_, graph_t& graph_); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-graph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-graph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-graph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/gsubgpos-graph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -27,9 +27,11 @@ #include "graph.hh" #include "../hb-ot-layout-gsubgpos.hh" #include "../OT/Layout/GSUB/ExtensionSubst.hh" +#include "../OT/Layout/GSUB/SubstLookupSubTable.hh" #include "gsubgpos-context.hh" #include "pairpos-graph.hh" #include "markbasepos-graph.hh" +#include "ligature-graph.hh" #ifndef GRAPH_GSUBGPOS_GRAPH_HH #define GRAPH_GSUBGPOS_GRAPH_HH @@ -85,6 +87,12 @@ return lookupType == extension_type (table_tag); } + bool use_mark_filtering_set () const + { + unsigned flag = lookupFlag; + return flag & 0x0010u; + } + bool make_extension (gsubgpos_graph_context_t& c, unsigned this_index) { @@ -120,22 +128,18 @@ unsigned type = lookupType; bool is_ext = is_extension (c.table_tag); - if (c.table_tag != HB_OT_TAG_GPOS) + if (c.table_tag != HB_OT_TAG_GPOS && c.table_tag != HB_OT_TAG_GSUB) return true; - if (!is_ext && - type != OT::Layout::GPOS_impl::PosLookupSubTable::Type::Pair && - type != OT::Layout::GPOS_impl::PosLookupSubTable::Type::MarkBase) + if (!is_ext && !is_supported_gpos_type(type, c) && !is_supported_gsub_type(type, c)) return true; hb_vector_t<hb_pair_t<unsigned, hb_vector_t<unsigned>>> all_new_subtables; for (unsigned i = 0; i < subTable.len; i++) { unsigned subtable_index = c.graph.index_for_offset (this_index, &subTable[i]); - unsigned parent_index = this_index; if (is_ext) { unsigned ext_subtable_index = subtable_index; - parent_index = ext_subtable_index; ExtensionFormat1<OT::Layout::GSUB_impl::ExtensionSubst>* extension = (ExtensionFormat1<OT::Layout::GSUB_impl::ExtensionSubst>*) c.graph.object (ext_subtable_index).head; @@ -144,26 +148,47 @@ subtable_index = extension->get_subtable_index (c.graph, ext_subtable_index); type = extension->get_lookup_type (); - if (type != OT::Layout::GPOS_impl::PosLookupSubTable::Type::Pair - && type != OT::Layout::GPOS_impl::PosLookupSubTable::Type::MarkBase) + if (!is_supported_gpos_type(type, c) && !is_supported_gsub_type(type, c)) continue; } - hb_vector_t<unsigned> new_sub_tables; - switch (type) + hb_vector_t<unsigned>* split_result; + if (c.split_subtables.has (subtable_index, &split_result)) { - case 2: - new_sub_tables = split_subtable<PairPos> (c, parent_index, subtable_index); break; - case 4: - new_sub_tables = split_subtable<MarkBasePos> (c, parent_index, subtable_index); break; - default: - break; + if (split_result->length == 0) + continue; + all_new_subtables.push (hb_pair(i, *split_result)); + } + else + { + hb_vector_t<unsigned> new_sub_tables; + + if (c.table_tag == HB_OT_TAG_GPOS) { + switch (type) + { + case 2: + new_sub_tables = split_subtable<PairPos> (c, subtable_index); break; + case 4: + new_sub_tables = split_subtable<MarkBasePos> (c, subtable_index); break; + default: + break; + } + } else if (c.table_tag == HB_OT_TAG_GSUB) { + switch (type) + { + case 4: + new_sub_tables = split_subtable<graph::LigatureSubst> (c, subtable_index); break; + default: + break; + } + } + + if (new_sub_tables.in_error ()) return false; + + c.split_subtables.set (subtable_index, new_sub_tables); + if (new_sub_tables) + all_new_subtables.push (hb_pair (i, std::move (new_sub_tables))); } - if (new_sub_tables.in_error ()) return false; - if (!new_sub_tables) continue; - hb_pair_t<unsigned, hb_vector_t<unsigned>>* entry = all_new_subtables.push (); - entry->first = i; - entry->second = std::move (new_sub_tables); } if (all_new_subtables) { @@ -175,30 +200,29 @@ template<typename T> hb_vector_t<unsigned> split_subtable (gsubgpos_graph_context_t& c, - unsigned parent_idx, unsigned objidx) { T* sub_table = (T*) c.graph.object (objidx).head; if (!sub_table || !sub_table->sanitize (c.graph.vertices_[objidx])) return hb_vector_t<unsigned> (); - return sub_table->split_subtables (c, parent_idx, objidx); + return sub_table->split_subtables (c, objidx); } bool add_sub_tables (gsubgpos_graph_context_t& c, unsigned this_index, unsigned type, - hb_vector_t<hb_pair_t<unsigned, hb_vector_t<unsigned>>>& subtable_ids) + const hb_vector_t<hb_pair_t<unsigned, hb_vector_t<unsigned>>>& subtable_ids) { bool is_ext = is_extension (c.table_tag); - auto& v = c.graph.vertices_[this_index]; + auto* v = &c.graph.vertices_[this_index]; fix_existing_subtable_links (c, this_index, subtable_ids); unsigned new_subtable_count = 0; for (const auto& p : subtable_ids) new_subtable_count += p.second.length; - size_t new_size = v.table_size () + size_t new_size = v->table_size () + new_subtable_count * OT::Offset16::static_size; char* buffer = (char*) hb_calloc (1, new_size); if (!buffer) return false; @@ -207,10 +231,13 @@ hb_free (buffer); return false; } - hb_memcpy (buffer, v.obj.head, v.table_size()); + hb_memcpy (buffer, v->obj.head, v->table_size()); - v.obj.head = buffer; - v.obj.tail = buffer + new_size; + if (use_mark_filtering_set ()) + hb_memcpy (buffer + new_size - 2, v->obj.tail - 2, 2); + + v->obj.head = buffer; + v->obj.tail = buffer + new_size; Lookup* new_lookup = (Lookup*) buffer; @@ -226,21 +253,23 @@ if (is_ext) { unsigned ext_id = create_extension_subtable (c, subtable_id, type); - c.graph.vertices_[subtable_id].add_parent (ext_id); + c.graph.vertices_[subtable_id].add_parent (ext_id, false); subtable_id = ext_id; + // the reference to v may have changed on adding a node, so reassign it. + v = &c.graph.vertices_[this_index]; } - auto* link = v.obj.real_links.push (); + auto* link = v->obj.real_links.push (); link->width = 2; link->objidx = subtable_id; link->position = (char*) &new_lookup->subTable[offset_index++] - (char*) new_lookup; - c.graph.vertices_[subtable_id].add_parent (this_index); + c.graph.vertices_[subtable_id].add_parent (this_index, false); } } // Repacker sort order depends on link order, which we've messed up so resort it. - v.obj.real_links.qsort (); + v->obj.real_links.qsort (); // The head location of the lookup has changed, invalidating the lookups map entry // in the context. Update the map. @@ -250,17 +279,15 @@ void fix_existing_subtable_links (gsubgpos_graph_context_t& c, unsigned this_index, - hb_vector_t<hb_pair_t<unsigned, hb_vector_t<unsigned>>>& subtable_ids) + const hb_vector_t<hb_pair_t<unsigned, hb_vector_t<unsigned>>>& subtable_ids) { auto& v = c.graph.vertices_[this_index]; - Lookup* lookup = (Lookup*) v.obj.head; - unsigned shift = 0; for (const auto& p : subtable_ids) { unsigned insert_index = p.first + shift; unsigned pos_offset = p.second.length * OT::Offset16::static_size; - unsigned insert_offset = (char*) &lookup->subTable[insert_index] - (char*) lookup; + unsigned insert_offset = Lookup::min_size + insert_index * OT::Offset16::static_size; shift += p.second.length; for (auto& l : v.obj.all_links_writer ()) @@ -326,7 +353,7 @@ // Make extension point at the subtable. auto& ext_vertex = c.graph.vertices_[ext_index]; - ext_vertex.add_parent (lookup_index); + ext_vertex.add_parent (lookup_index, false); if (!existing_ext_index) subtable_vertex.remap_parent (lookup_index, ext_index); @@ -334,6 +361,19 @@ } private: + bool is_supported_gsub_type(unsigned type, gsubgpos_graph_context_t& c) const { + return (c.table_tag == HB_OT_TAG_GSUB) && ( + type == OT::Layout::GSUB_impl::SubstLookupSubTable::Type::Ligature + ); + } + + bool is_supported_gpos_type(unsigned type, gsubgpos_graph_context_t& c) const { + return (c.table_tag == HB_OT_TAG_GPOS) && ( + type == OT::Layout::GPOS_impl::PosLookupSubTable::Type::Pair || + type == OT::Layout::GPOS_impl::PosLookupSubTable::Type::MarkBase + ); + } + unsigned extension_type (hb_tag_t table_tag) const { switch (table_tag) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/markbasepos-graph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/markbasepos-graph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/markbasepos-graph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/markbasepos-graph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -212,7 +212,6 @@ } hb_vector_t<unsigned> split_subtables (gsubgpos_graph_context_t& c, - unsigned parent_index, unsigned this_index) { hb_set_t visited; @@ -265,7 +264,7 @@ split_context_t split_context { c, this, - c.graph.duplicate_if_shared (parent_index, this_index), + this_index, std::move (class_to_info), c.graph.vertices_[mark_array_id].position_to_index_map (), }; @@ -478,12 +477,11 @@ struct MarkBasePos : public OT::Layout::GPOS_impl::MarkBasePos { hb_vector_t<unsigned> split_subtables (gsubgpos_graph_context_t& c, - unsigned parent_index, unsigned this_index) { - switch (u.format) { + switch (u.format.v) { case 1: - return ((MarkBasePosFormat1*)(&u.format1))->split_subtables (c, parent_index, this_index); + return ((MarkBasePosFormat1*)(&u.format1))->split_subtables (c, this_index); #ifndef HB_NO_BEYOND_64K case 2: HB_FALLTHROUGH; // Don't split 24bit MarkBasePos's. @@ -496,10 +494,10 @@ bool sanitize (graph_t::vertex_t& vertex) const { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; - if (vertex_len < u.format.get_size ()) return false; + if (vertex_len < u.format.v.get_size ()) return false; hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: return ((MarkBasePosFormat1*)(&u.format1))->sanitize (vertex); #ifndef HB_NO_BEYOND_64K diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/pairpos-graph.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/pairpos-graph.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/pairpos-graph.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/pairpos-graph.hh 2026-04-17 19:08:13.000000000 +0000 @@ -49,7 +49,6 @@ } hb_vector_t<unsigned> split_subtables (gsubgpos_graph_context_t& c, - unsigned parent_index, unsigned this_index) { hb_set_t visited; @@ -84,7 +83,7 @@ split_context_t split_context { c, this, - c.graph.duplicate_if_shared (parent_index, this_index), + this_index, }; return actuate_subtable_split<split_context_t> (split_context, split_points); @@ -207,7 +206,6 @@ } hb_vector_t<unsigned> split_subtables (gsubgpos_graph_context_t& c, - unsigned parent_index, unsigned this_index) { const unsigned base_size = OT::Layout::GPOS_impl::PairPosFormat2_4<SmallTypes>::min_size; @@ -291,7 +289,7 @@ split_context_t split_context { c, this, - c.graph.duplicate_if_shared (parent_index, this_index), + this_index, class1_record_size, total_value_len, value_1_len, @@ -423,7 +421,7 @@ class_def_link->width = SmallTypes::size; class_def_link->objidx = class_def_2_id; class_def_link->position = 10; - graph.vertices_[class_def_2_id].add_parent (pair_pos_prime_id); + graph.vertices_[class_def_2_id].add_parent (pair_pos_prime_id, false); graph.duplicate (pair_pos_prime_id, class_def_2_id); return pair_pos_prime_id; @@ -607,14 +605,13 @@ struct PairPos : public OT::Layout::GPOS_impl::PairPos { hb_vector_t<unsigned> split_subtables (gsubgpos_graph_context_t& c, - unsigned parent_index, unsigned this_index) { - switch (u.format) { + switch (u.format.v) { case 1: - return ((PairPosFormat1*)(&u.format1))->split_subtables (c, parent_index, this_index); + return ((PairPosFormat1*)(&u.format1))->split_subtables (c, this_index); case 2: - return ((PairPosFormat2*)(&u.format2))->split_subtables (c, parent_index, this_index); + return ((PairPosFormat2*)(&u.format2))->split_subtables (c, this_index); #ifndef HB_NO_BEYOND_64K case 3: HB_FALLTHROUGH; case 4: HB_FALLTHROUGH; @@ -628,10 +625,10 @@ bool sanitize (graph_t::vertex_t& vertex) const { int64_t vertex_len = vertex.obj.tail - vertex.obj.head; - if (vertex_len < u.format.get_size ()) return false; + if (vertex_len < u.format.v.get_size ()) return false; hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: return ((PairPosFormat1*)(&u.format1))->sanitize (vertex); case 2: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/serialize.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/serialize.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/serialize.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/serialize.hh 2026-04-17 19:08:13.000000000 +0000 @@ -113,7 +113,7 @@ hb_hashmap_t<overflow_record_t*, bool> record_set; const auto& vertices = graph.vertices_; - for (int parent_idx = vertices.length - 1; parent_idx >= 0; parent_idx--) + for (unsigned parent_idx : graph.ordering_) { // Don't need to check virtual links for overflow for (const auto& link : vertices.arrayZ[parent_idx].obj.real_links) @@ -172,14 +172,16 @@ template <typename O> inline void serialize_link_of_type (const hb_serialize_context_t::object_t::link_t& link, char* head, + unsigned size, + const hb_vector_t<unsigned>& id_map, hb_serialize_context_t* c) { + assert(link.position + link.width <= size); + OT::Offset<O>* offset = reinterpret_cast<OT::Offset<O>*> (head + link.position); *offset = 0; c->add_link (*offset, - // serializer has an extra nil object at the start of the - // object array. So all id's are +1 of what our id's are. - link.objidx + 1, + id_map[link.objidx], (hb_serialize_context_t::whence_t) link.whence, link.bias); } @@ -187,6 +189,8 @@ inline void serialize_link (const hb_serialize_context_t::object_t::link_t& link, char* head, + unsigned size, + const hb_vector_t<unsigned>& id_map, hb_serialize_context_t* c) { switch (link.width) @@ -197,21 +201,21 @@ case 4: if (link.is_signed) { - serialize_link_of_type<OT::HBINT32> (link, head, c); + serialize_link_of_type<OT::HBINT32> (link, head, size, id_map, c); } else { - serialize_link_of_type<OT::HBUINT32> (link, head, c); + serialize_link_of_type<OT::HBUINT32> (link, head, size, id_map, c); } return; case 2: if (link.is_signed) { - serialize_link_of_type<OT::HBINT16> (link, head, c); + serialize_link_of_type<OT::HBINT16> (link, head, size, id_map, c); } else { - serialize_link_of_type<OT::HBUINT16> (link, head, c); + serialize_link_of_type<OT::HBUINT16> (link, head, size, id_map, c); } return; case 3: - serialize_link_of_type<OT::HBUINT24> (link, head, c); + serialize_link_of_type<OT::HBUINT24> (link, head, size, id_map, c); return; default: // Unexpected link width. @@ -237,25 +241,36 @@ c.start_serialize<void> (); const auto& vertices = graph.vertices_; - for (unsigned i = 0; i < vertices.length; i++) { + + // Objects are placed in the serializer in reverse order since children need + // to be inserted before their parents. + + // Maps from our obj id's to the id's used during this serialization. + hb_vector_t<unsigned> id_map; + id_map.resize(graph.ordering_.length); + for (int pos = graph.ordering_.length - 1; pos >= 0; pos--) { + unsigned i = graph.ordering_[pos]; c.push (); - size_t size = vertices[i].obj.tail - vertices[i].obj.head; + auto& v = vertices[i]; + + size_t size = v.obj.tail - v.obj.head; + char* start = c.allocate_size <char> (size); if (!start) { DEBUG_MSG (SUBSET_REPACK, nullptr, "Buffer out of space."); return nullptr; } - hb_memcpy (start, vertices[i].obj.head, size); + hb_memcpy (start, v.obj.head, size); // Only real links needs to be serialized. - for (const auto& link : vertices[i].obj.real_links) - serialize_link (link, start, &c); + for (const auto& link : v.obj.real_links) + serialize_link (link, start, size, id_map, &c); // All duplications are already encoded in the graph, so don't // enable sharing during packing. - c.pop_pack (false); + id_map[i] = c.pop_pack (false); } c.end_serialize (); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/split-helpers.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/split-helpers.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/graph/split-helpers.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/graph/split-helpers.hh 2026-04-17 19:08:13.000000000 +0000 @@ -49,7 +49,7 @@ if (id == (unsigned) -1) { new_objects.reset (); - new_objects.allocated = -1; // mark error + new_objects.ensure_error (); return new_objects; } new_objects.push (id); @@ -58,7 +58,7 @@ if (!split_context.shrink (split_points[0])) { new_objects.reset (); - new_objects.allocated = -1; // mark error + new_objects.ensure_error (); } return new_objects; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-common.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-common.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-common.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-common.hh 2026-04-17 19:08:13.000000000 +0000 @@ -47,8 +47,7 @@ struct ankr; -using hb_aat_class_cache_t = hb_cache_t<15, 8, 7>; -static_assert (sizeof (hb_aat_class_cache_t) == 256, ""); +using hb_aat_class_cache_t = hb_ot_layout_mapping_cache_t; struct hb_aat_scratch_t { @@ -79,7 +78,10 @@ { hb_bit_set_t *s = buffer_glyph_set.get_acquire (); if (s && buffer_glyph_set.cmpexch (s, nullptr)) + { + s->clear (); return s; + } s = (hb_bit_set_t *) hb_calloc (1, sizeof (hb_bit_set_t)); if (unlikely (!s)) @@ -124,13 +126,14 @@ const OT::GDEF &gdef; bool has_glyph_classes; const hb_sorted_vector_t<hb_aat_map_t::range_flags_t> *range_flags = nullptr; + hb_mask_t subtable_flags = 0; + bool buffer_is_reversed = false; + // Caches bool using_buffer_glyph_set = false; hb_bit_set_t *buffer_glyph_set = nullptr; - const hb_bit_set_t *left_set = nullptr; - const hb_bit_set_t *right_set = nullptr; - const hb_bit_set_t *machine_glyph_set = nullptr; + const hb_bit_set_t *first_set = nullptr; + const hb_bit_set_t *second_set = nullptr; hb_aat_class_cache_t *machine_class_cache = nullptr; - hb_mask_t subtable_flags = 0; /* Unused. For debug tracing only. */ unsigned int lookup_index; @@ -146,6 +149,12 @@ void set_lookup_index (unsigned int i) { lookup_index = i; } + void reverse_buffer () + { + buffer->reverse (); + buffer_is_reversed = !buffer_is_reversed; + } + void setup_buffer_glyph_set () { using_buffer_glyph_set = buffer->len >= 4 && buffer_glyph_set; @@ -156,11 +165,11 @@ bool buffer_intersects_machine () const { if (likely (using_buffer_glyph_set)) - return buffer_glyph_set->intersects (*machine_glyph_set); + return buffer_glyph_set->intersects (*first_set); // Faster for shorter buffers. for (unsigned i = 0; i < buffer->len; i++) - if (machine_glyph_set->has (buffer->info[i].codepoint)) + if (first_set->has (buffer->info[i].codepoint)) return true; return false; } @@ -639,6 +648,23 @@ glyphs.add_range (firstGlyph, firstGlyph + glyphCount - 1); } + template <typename set_t, typename filter_t> + void collect_glyphs_filtered (set_t &glyphs, const filter_t &filter) const + { + if (unlikely (!glyphCount)) return; + if (firstGlyph == DELETED_GLYPH) return; + const HBUINT8 *p = valueArrayZ.arrayZ; + for (unsigned i = 0; i < glyphCount; i++) + { + unsigned int v = 0; + unsigned int count = valueSize; + for (unsigned int j = 0; j < count; j++) + v = (v << 8) | *p++; + if (filter (v)) + glyphs.add (firstGlyph + i); + } + } + bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); @@ -666,7 +692,7 @@ { const T* get_value (hb_codepoint_t glyph_id, unsigned int num_glyphs) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return u.format0.get_value (glyph_id, num_glyphs); case 2: hb_barrier (); return u.format2.get_value (glyph_id); case 4: hb_barrier (); return u.format4.get_value (glyph_id); @@ -678,7 +704,7 @@ const typename T::type get_value_or_null (hb_codepoint_t glyph_id, unsigned int num_glyphs) const { - switch (u.format) { + switch (u.format.v) { /* Format 10 cannot return a pointer. */ case 10: hb_barrier (); return u.format10.get_value_or_null (glyph_id); default: @@ -690,7 +716,7 @@ template <typename set_t> void collect_glyphs (set_t &glyphs, unsigned int num_glyphs) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); u.format0.collect_glyphs (glyphs, num_glyphs); return; case 2: hb_barrier (); u.format2.collect_glyphs (glyphs); return; case 4: hb_barrier (); u.format4.collect_glyphs (glyphs); return; @@ -703,12 +729,13 @@ template <typename set_t, typename filter_t> void collect_glyphs_filtered (set_t &glyphs, unsigned num_glyphs, const filter_t &filter) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); u.format0.collect_glyphs_filtered (glyphs, num_glyphs, filter); return; case 2: hb_barrier (); u.format2.collect_glyphs_filtered (glyphs, filter); return; case 4: hb_barrier (); u.format4.collect_glyphs_filtered (glyphs, filter); return; case 6: hb_barrier (); u.format6.collect_glyphs_filtered (glyphs, filter); return; case 8: hb_barrier (); u.format8.collect_glyphs_filtered (glyphs, filter); return; + case 10: hb_barrier (); u.format10.collect_glyphs_filtered (glyphs, filter); return; default:return; } } @@ -724,9 +751,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return_trace (u.format0.sanitize (c)); case 2: hb_barrier (); return_trace (u.format2.sanitize (c)); case 4: hb_barrier (); return_trace (u.format4.sanitize (c)); @@ -739,9 +766,9 @@ bool sanitize (hb_sanitize_context_t *c, const void *base) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return_trace (u.format0.sanitize (c, base)); case 2: hb_barrier (); return_trace (u.format2.sanitize (c, base)); case 4: hb_barrier (); return_trace (u.format4.sanitize (c, base)); @@ -754,7 +781,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ LookupFormat0<T> format0; LookupFormat2<T> format2; LookupFormat4<T> format4; @@ -763,7 +790,7 @@ LookupFormat10<T> format10; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; DECLARE_NULL_NAMESPACE_BYTES_TEMPLATE1 (AAT, Lookup, 2); @@ -838,11 +865,6 @@ STATE_START_OF_LINE = 1, }; - template <typename set_t> - void collect_glyphs (set_t &glyphs, unsigned num_glyphs) const - { - (this+classTable).collect_glyphs (glyphs, num_glyphs); - } template <typename set_t, typename table_t> void collect_initial_glyphs (set_t &glyphs, unsigned num_glyphs, const table_t &table) const { @@ -1082,6 +1104,8 @@ for (unsigned i = 0; i < subtable_count; i++) { uint32_t offset = (uint32_t) subtableOffsets[i]; + // A font file called SFNSDisplay.ttf has value 0xFFFFFFFF in the offsets. + // Just ignore it. if (offset == 0 || offset == 0xFFFFFFFF) continue; if (unlikely (!subtableOffsets[i].sanitize (c, this, bytes))) @@ -1192,11 +1216,24 @@ int state = StateTableT::STATE_START_OF_TEXT; // If there's only one range, we already checked the flag. auto *last_range = ac->range_flags && (ac->range_flags->length > 1) ? &(*ac->range_flags)[0] : nullptr; + const bool start_state_safe_to_break_eot = + !c->table->is_actionable (machine.get_entry (StateTableT::STATE_START_OF_TEXT, CLASS_END_OF_TEXT)); for (buffer->idx = 0; buffer->successful;) { - /* This block is copied in NoncontextualSubtable::apply. Keep in sync. */ - if (last_range) + unsigned int klass = likely (buffer->idx < buffer->len) ? + machine.get_class (buffer->cur().codepoint, num_glyphs, ac->machine_class_cache) : + (unsigned) CLASS_END_OF_TEXT; + resume: + DEBUG_MSG (APPLY, nullptr, "c%u at %u", klass, buffer->idx); + const EntryT &entry = machine.get_entry (state, klass); + const int next_state = machine.new_state (entry.newState); + + bool is_not_epsilon_transition = !(entry.flags & Flags::DontAdvance); + bool is_not_actionable = !c->table->is_actionable (entry); + + if (unlikely (last_range)) { + /* This block is copied in NoncontextualSubtable::apply. Keep in sync. */ auto *range = last_range; if (buffer->idx < buffer->len) { @@ -1211,7 +1248,7 @@ } if (!(range->flags & ac->subtable_flags)) { - if (buffer->idx == buffer->len || unlikely (!buffer->successful)) + if (buffer->idx == buffer->len) break; state = StateTableT::STATE_START_OF_TEXT; @@ -1219,13 +1256,42 @@ continue; } } + else + { + // Fast path for when transitioning from start-state to start-state with + // no action and advancing. Do so as long as the class remains the same. + // This is common with runs of non-actionable glyphs. + + bool is_null_transition = state == StateTableT::STATE_START_OF_TEXT && + next_state == StateTableT::STATE_START_OF_TEXT && + start_state_safe_to_break_eot && + is_not_actionable && + is_not_epsilon_transition && + !last_range; - unsigned int klass = likely (buffer->idx < buffer->len) ? - machine.get_class (buffer->cur().codepoint, num_glyphs, ac->machine_class_cache) : - (unsigned) CLASS_END_OF_TEXT; - DEBUG_MSG (APPLY, nullptr, "c%u at %u", klass, buffer->idx); - const EntryT &entry = machine.get_entry (state, klass); - const int next_state = machine.new_state (entry.newState); + if (is_null_transition) + { + unsigned old_klass = klass; + do + { + c->transition (buffer, this, entry); + + if (buffer->idx == buffer->len || !buffer->successful) + break; + + (void) buffer->next_glyph (); + + klass = likely (buffer->idx < buffer->len) ? + machine.get_class (buffer->cur().codepoint, num_glyphs, ac->machine_class_cache) : + (unsigned) CLASS_END_OF_TEXT; + } while (klass == old_klass); + + if (buffer->idx == buffer->len || !buffer->successful) + break; + + goto resume; + } + } /* Conditions under which it's guaranteed safe-to-break before current glyph: * @@ -1292,10 +1358,10 @@ state = next_state; DEBUG_MSG (APPLY, nullptr, "s%d", state); - if (buffer->idx == buffer->len || unlikely (!buffer->successful)) + if (buffer->idx == buffer->len) break; - if (!(entry.flags & Flags::DontAdvance) || buffer->max_ops-- <= 0) + if (is_not_epsilon_transition || buffer->max_ops-- <= 0) (void) buffer->next_glyph (); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-kerx-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-kerx-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-kerx-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-kerx-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -120,12 +120,12 @@ } template <typename set_t> - void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const + void collect_glyphs (set_t &first_set, set_t &second_set, unsigned num_glyphs) const { for (const KernPair& pair : pairs) { - left_set.add (pair.left); - right_set.add (pair.right); + first_set.add (pair.left); + second_set.add (pair.right); } } @@ -140,7 +140,7 @@ int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const { - if (!(*c->left_set)[left] || !(*c->right_set)[right]) return 0; + if (!(*c->first_set)[left] || !(*c->second_set)[right]) return 0; return table.get_kerning (left, right, c); } }; @@ -396,10 +396,10 @@ } template <typename set_t> - void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const + void collect_glyphs (set_t &first_set, set_t &second_set, unsigned num_glyphs) const { - machine.collect_initial_glyphs (left_set, num_glyphs, *this); - //machine.collect_glyphs (right_set, num_glyphs); // right_set is unused for machine kerning + machine.collect_initial_glyphs (first_set, num_glyphs, *this); + //machine.collect_glyphs (second_set, num_glyphs); // second_set is unused for machine kerning } protected: @@ -451,10 +451,10 @@ } template <typename set_t> - void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const + void collect_glyphs (set_t &first_set, set_t &second_set, unsigned num_glyphs) const { - (this+leftClassTable).collect_glyphs (left_set, num_glyphs); - (this+rightClassTable).collect_glyphs (right_set, num_glyphs); + (this+leftClassTable).collect_glyphs (first_set, num_glyphs); + (this+rightClassTable).collect_glyphs (second_set, num_glyphs); } struct accelerator_t @@ -468,7 +468,7 @@ int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const { - if (!(*c->left_set)[left] || !(*c->right_set)[right]) return 0; + if (!(*c->first_set)[left] || !(*c->second_set)[right]) return 0; return table.get_kerning (left, right, c); } }; @@ -629,6 +629,8 @@ } o.attach_type() = OT::Layout::GPOS_impl::ATTACH_TYPE_MARK; o.attach_chain() = (int) mark - (int) buffer->idx; + if (c->buffer_is_reversed) + o.attach_chain() = -o.attach_chain(); buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT; } @@ -671,10 +673,10 @@ } template <typename set_t> - void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const + void collect_glyphs (set_t &first_set, set_t &second_set, unsigned num_glyphs) const { - machine.collect_initial_glyphs (left_set, num_glyphs, *this); - //machine.collect_glyphs (right_set, num_glyphs); // right_set is unused for machine kerning + machine.collect_initial_glyphs (first_set, num_glyphs, *this); + //machine.collect_glyphs (second_set, num_glyphs); // second_set is unused for machine kerning } protected: @@ -762,19 +764,19 @@ } template <typename set_t> - void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const + void collect_glyphs (set_t &first_set, set_t &second_set, unsigned num_glyphs) const { if (is_long ()) { const auto &t = u.l; - (this+t.rowIndexTable).collect_glyphs (left_set, num_glyphs); - (this+t.columnIndexTable).collect_glyphs (right_set, num_glyphs); + (this+t.rowIndexTable).collect_glyphs (first_set, num_glyphs); + (this+t.columnIndexTable).collect_glyphs (second_set, num_glyphs); } else { const auto &t = u.s; - (this+t.rowIndexTable).collect_glyphs (left_set, num_glyphs); - (this+t.columnIndexTable).collect_glyphs (right_set, num_glyphs); + (this+t.rowIndexTable).collect_glyphs (first_set, num_glyphs); + (this+t.columnIndexTable).collect_glyphs (second_set, num_glyphs); } } @@ -789,7 +791,7 @@ int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const { - if (!(*c->left_set)[left] || !(*c->right_set)[right]) return 0; + if (!(*c->first_set)[left] || !(*c->second_set)[right]) return 0; return table.get_kerning (left, right, c); } }; @@ -878,15 +880,15 @@ } template <typename set_t> - void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const + void collect_glyphs (set_t &first_set, set_t &second_set, unsigned num_glyphs) const { unsigned int subtable_type = get_type (); switch (subtable_type) { - case 0: u.format0.collect_glyphs (left_set, right_set, num_glyphs); return; - case 1: u.format1.collect_glyphs (left_set, right_set, num_glyphs); return; - case 2: u.format2.collect_glyphs (left_set, right_set, num_glyphs); return; - case 4: u.format4.collect_glyphs (left_set, right_set, num_glyphs); return; - case 6: u.format6.collect_glyphs (left_set, right_set, num_glyphs); return; + case 0: u.format0.collect_glyphs (first_set, second_set, num_glyphs); return; + case 1: u.format1.collect_glyphs (first_set, second_set, num_glyphs); return; + case 2: u.format2.collect_glyphs (first_set, second_set, num_glyphs); return; + case 4: u.format4.collect_glyphs (first_set, second_set, num_glyphs); return; + case 6: u.format6.collect_glyphs (first_set, second_set, num_glyphs); return; default: return; } } @@ -923,8 +925,8 @@ struct kern_subtable_accelerator_data_t { - hb_bit_set_t left_set; - hb_bit_set_t right_set; + hb_bit_set_t first_set; + hb_bit_set_t second_set; mutable hb_aat_class_cache_t class_cache; }; @@ -1017,9 +1019,8 @@ if (HB_DIRECTION_IS_HORIZONTAL (c->buffer->props.direction) != st->u.header.is_horizontal ()) goto skip; - c->left_set = &subtable_accel.left_set; - c->right_set = &subtable_accel.right_set; - c->machine_glyph_set = &subtable_accel.left_set; + c->first_set = &subtable_accel.first_set; + c->second_set = &subtable_accel.second_set; c->machine_class_cache = &subtable_accel.class_cache; if (!c->buffer_intersects_machine ()) @@ -1051,8 +1052,8 @@ } } - if (reverse) - c->buffer->reverse (); + if (reverse != c->buffer_is_reversed) + c->reverse_buffer (); { /* See comment in sanitize() for conditional here. */ @@ -1060,15 +1061,14 @@ ret |= st->dispatch (c); } - if (reverse) - c->buffer->reverse (); - (void) c->buffer->message (c->font, "end subtable %u", c->lookup_index); skip: st = &StructAfter<SubTable> (*st); c->set_lookup_index (c->lookup_index + 1); } + if (c->buffer_is_reversed) + c->reverse_buffer (); return ret; } @@ -1133,7 +1133,7 @@ if (unlikely (accel_data.subtable_accels.in_error ())) return accel_data; - st->collect_glyphs (subtable_accel.left_set, subtable_accel.right_set, num_glyphs); + st->collect_glyphs (subtable_accel.first_set, subtable_accel.second_set, num_glyphs); subtable_accel.class_cache.clear (); st = &StructAfter<SubTable> (*st); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-morx-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-morx-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-morx-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-aat-layout-morx-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -487,7 +487,7 @@ if (entry.flags & LigatureEntryT::SetComponent) { /* Never mark same index twice, in case DontAdvance was used... */ - if (match_length && match_positions[(match_length - 1u) % ARRAY_LENGTH (match_positions)] == buffer->out_len) + if (unlikely (match_length && match_positions[(match_length - 1u) % ARRAY_LENGTH (match_positions)] == buffer->out_len)) match_length--; match_positions[match_length++ % ARRAY_LENGTH (match_positions)] = buffer->out_len; @@ -640,7 +640,7 @@ for (unsigned int i = 0; i < count; i++) { /* This block copied from StateTableDriver::drive. Keep in sync. */ - if (last_range) + if (unlikely (last_range)) { auto *range = last_range; { @@ -1169,15 +1169,15 @@ hb_map ([subtable_flags] (const hb_aat_map_t::range_flags_t _) -> bool { return subtable_flags & (_.flags); }))) goto skip; - c->subtable_flags = subtable_flags; - c->machine_glyph_set = accel ? &accel->subtables[i].glyph_set : &Null(hb_bit_set_t); - c->machine_class_cache = accel ? &accel->subtables[i].class_cache : nullptr; - if (!(coverage & ChainSubtable<Types>::AllDirections) && HB_DIRECTION_IS_VERTICAL (c->buffer->props.direction) != bool (coverage & ChainSubtable<Types>::Vertical)) goto skip; + c->subtable_flags = subtable_flags; + c->first_set = accel ? &accel->subtables[i].glyph_set : &Null(hb_bit_set_t); + c->machine_class_cache = accel ? &accel->subtables[i].class_cache : nullptr; + if (!c->buffer_intersects_machine ()) { (void) c->buffer->message (c->font, "skipped chainsubtable %u because no glyph matches", c->lookup_index); @@ -1219,22 +1219,21 @@ if (!c->buffer->message (c->font, "start chainsubtable %u", c->lookup_index)) goto skip; - if (reverse) - c->buffer->reverse (); + if (reverse != c->buffer_is_reversed) + c->reverse_buffer (); subtable->apply (c); - if (reverse) - c->buffer->reverse (); - (void) c->buffer->message (c->font, "end chainsubtable %u", c->lookup_index); - if (unlikely (!c->buffer->successful)) return; + if (unlikely (!c->buffer->successful)) break; skip: subtable = &StructAfter<ChainSubtable<Types>> (*subtable); c->set_lookup_index (c->lookup_index + 1); } + if (c->buffer_is_reversed) + c->reverse_buffer (); } unsigned int get_size () const { return length; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-algs.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-algs.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-algs.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-algs.hh 2026-04-17 19:08:13.000000000 +0000 @@ -78,129 +78,246 @@ /* - * Big-endian integers. + * Fixed-endian integers / floats. */ + /* Endian swap, used in Windows related backends */ static inline constexpr uint16_t hb_uint16_swap (uint16_t v) { return (v >> 8) | (v << 8); } static inline constexpr uint32_t hb_uint32_swap (uint32_t v) { return (hb_uint16_swap (v) << 16) | hb_uint16_swap (v >> 16); } -#ifndef HB_FAST_INT_ACCESS +template <typename Type> +struct __attribute__((packed)) hb_packed_t { Type v; }; + +#ifndef HB_FAST_NUM_ACCESS + #if defined(__OPTIMIZE__) && \ defined(__BYTE_ORDER) && \ (__BYTE_ORDER == __BIG_ENDIAN || \ (__BYTE_ORDER == __LITTLE_ENDIAN && \ hb_has_builtin(__builtin_bswap16) && \ - hb_has_builtin(__builtin_bswap32))) -#define HB_FAST_INT_ACCESS 1 + hb_has_builtin(__builtin_bswap32) && \ + hb_has_builtin(__builtin_bswap64))) +#define HB_FAST_NUM_ACCESS 1 #else -#define HB_FAST_INT_ACCESS 0 +#define HB_FAST_NUM_ACCESS 0 #endif + +// https://github.com/harfbuzz/harfbuzz/issues/5456 +#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ <= 12) +#undef HB_FAST_NUM_ACCESS +#define HB_FAST_NUM_ACCESS 0 #endif -template <typename Type, int Bytes = sizeof (Type)> -struct BEInt; -template <typename Type> -struct BEInt<Type, 1> +#endif + +template <bool BE, typename Type, int Bytes = sizeof (Type)> +struct HBInt; +template <bool BE, typename Type> +struct HBInt<BE, Type, 1> { public: - BEInt () = default; - constexpr BEInt (Type V) : v {uint8_t (V)} {} + HBInt () = default; + constexpr HBInt (Type V) : v {uint8_t (V)} {} constexpr operator Type () const { return v; } private: uint8_t v; }; -template <typename Type> -struct BEInt<Type, 2> +template <bool BE, typename Type> +struct HBInt<BE, Type, 2> { - struct __attribute__((packed)) packed_uint16_t { uint16_t v; }; - public: - BEInt () = default; + HBInt () = default; - BEInt (Type V) -#if HB_FAST_INT_ACCESS -#if __BYTE_ORDER == __LITTLE_ENDIAN - { ((packed_uint16_t *) v)->v = __builtin_bswap16 (V); } -#else /* __BYTE_ORDER == __BIG_ENDIAN */ - { ((packed_uint16_t *) v)->v = V; } -#endif + HBInt (Type V) +#if HB_FAST_NUM_ACCESS + { + if (BE == (__BYTE_ORDER == __BIG_ENDIAN)) + ((hb_packed_t<uint16_t> *) v)->v = V; + else + ((hb_packed_t<uint16_t> *) v)->v = __builtin_bswap16 (V); + } #else - : v {uint8_t ((V >> 8) & 0xFF), - uint8_t ((V ) & 0xFF)} {} + : v {BE ? uint8_t ((V >> 8) & 0xFF) : uint8_t ((V ) & 0xFF), + BE ? uint8_t ((V ) & 0xFF) : uint8_t ((V >> 8) & 0xFF)} {} #endif - constexpr operator Type () const { -#if HB_FAST_INT_ACCESS -#if __BYTE_ORDER == __LITTLE_ENDIAN - return __builtin_bswap16 (((packed_uint16_t *) v)->v); -#else /* __BYTE_ORDER == __BIG_ENDIAN */ - return ((packed_uint16_t *) v)->v; -#endif + constexpr operator Type () const + { +#if HB_FAST_NUM_ACCESS + return (BE == (__BYTE_ORDER == __BIG_ENDIAN)) ? + ((const hb_packed_t<uint16_t> *) v)->v + : + __builtin_bswap16 (((const hb_packed_t<uint16_t> *) v)->v) + ; #else - return (v[0] << 8) - + (v[1] ); + return (BE ? (v[0] << 8) : (v[0] )) + + (BE ? (v[1] ) : (v[1] << 8)); #endif } private: uint8_t v[2]; }; -template <typename Type> -struct BEInt<Type, 3> +template <bool BE, typename Type> +struct HBInt<BE, Type, 3> { static_assert (!std::is_signed<Type>::value, ""); public: - BEInt () = default; - constexpr BEInt (Type V) : v {uint8_t ((V >> 16) & 0xFF), - uint8_t ((V >> 8) & 0xFF), - uint8_t ((V ) & 0xFF)} {} - - constexpr operator Type () const { return (v[0] << 16) - + (v[1] << 8) - + (v[2] ); } + HBInt () = default; + constexpr HBInt (Type V) : v {BE ? uint8_t ((V >> 16) & 0xFF) : uint8_t ((V >> 16) & 0xFF), + BE ? uint8_t ((V >> 8) & 0xFF) : uint8_t ((V >> 8) & 0xFF), + BE ? uint8_t ((V ) & 0xFF) : uint8_t ((V ) & 0xFF)} {} + + constexpr operator Type () const { return (BE ? (v[0] << 16) : (v[0] )) + + (BE ? (v[1] << 8) : (v[1] << 8)) + + (BE ? (v[2] ) : (v[2] << 16)); } private: uint8_t v[3]; }; -template <typename Type> -struct BEInt<Type, 4> +template <bool BE, typename Type> +struct HBInt<BE, Type, 4> { - struct __attribute__((packed)) packed_uint32_t { uint32_t v; }; + template <bool, typename, int> + friend struct HBFloat; public: - BEInt () = default; + HBInt () = default; - BEInt (Type V) -#if HB_FAST_INT_ACCESS -#if __BYTE_ORDER == __LITTLE_ENDIAN - { ((packed_uint32_t *) v)->v = __builtin_bswap32 (V); } -#else /* __BYTE_ORDER == __BIG_ENDIAN */ - { ((packed_uint32_t *) v)->v = V; } -#endif + HBInt (Type V) +#if HB_FAST_NUM_ACCESS + { + if (BE == (__BYTE_ORDER == __BIG_ENDIAN)) + ((hb_packed_t<uint32_t> *) v)->v = V; + else + ((hb_packed_t<uint32_t> *) v)->v = __builtin_bswap32 (V); + } #else - : v {uint8_t ((V >> 24) & 0xFF), - uint8_t ((V >> 16) & 0xFF), - uint8_t ((V >> 8) & 0xFF), - uint8_t ((V ) & 0xFF)} {} + : v {BE ? uint8_t ((V >> 24) & 0xFF) : uint8_t ((V ) & 0xFF), + BE ? uint8_t ((V >> 16) & 0xFF) : uint8_t ((V >> 8) & 0xFF), + BE ? uint8_t ((V >> 8) & 0xFF) : uint8_t ((V >> 16) & 0xFF), + BE ? uint8_t ((V ) & 0xFF) : uint8_t ((V >> 24) & 0xFF)} {} #endif constexpr operator Type () const { -#if HB_FAST_INT_ACCESS -#if __BYTE_ORDER == __LITTLE_ENDIAN - return __builtin_bswap32 (((packed_uint32_t *) v)->v); -#else /* __BYTE_ORDER == __BIG_ENDIAN */ - return ((packed_uint32_t *) v)->v; -#endif +#if HB_FAST_NUM_ACCESS + return (BE == (__BYTE_ORDER == __BIG_ENDIAN)) ? + ((const hb_packed_t<uint32_t> *) v)->v + : + __builtin_bswap32 (((const hb_packed_t<uint32_t> *) v)->v) + ; #else - return (v[0] << 24) - + (v[1] << 16) - + (v[2] << 8) - + (v[3] ); + return (BE ? (v[0] << 24) : (v[0] )) + + (BE ? (v[1] << 16) : (v[1] << 8)) + + (BE ? (v[2] << 8) : (v[2] << 16)) + + (BE ? (v[3] ) : (v[3] << 24)); #endif } private: uint8_t v[4]; }; +template <bool BE, typename Type> +struct HBInt<BE, Type, 8> +{ + template <bool, typename, int> + friend struct HBFloat; + + public: + HBInt () = default; + + HBInt (Type V) +#if HB_FAST_NUM_ACCESS + { + if (BE == (__BYTE_ORDER == __BIG_ENDIAN)) + ((hb_packed_t<uint64_t> *) v)->v = V; + else + ((hb_packed_t<uint64_t> *) v)->v = __builtin_bswap64 (V); + } +#else + : v {BE ? uint8_t ((V >> 56) & 0xFF) : uint8_t ((V ) & 0xFF), + BE ? uint8_t ((V >> 48) & 0xFF) : uint8_t ((V >> 8) & 0xFF), + BE ? uint8_t ((V >> 40) & 0xFF) : uint8_t ((V >> 16) & 0xFF), + BE ? uint8_t ((V >> 32) & 0xFF) : uint8_t ((V >> 24) & 0xFF), + BE ? uint8_t ((V >> 24) & 0xFF) : uint8_t ((V >> 32) & 0xFF), + BE ? uint8_t ((V >> 16) & 0xFF) : uint8_t ((V >> 40) & 0xFF), + BE ? uint8_t ((V >> 8) & 0xFF) : uint8_t ((V >> 48) & 0xFF), + BE ? uint8_t ((V ) & 0xFF) : uint8_t ((V >> 56) & 0xFF)} {} +#endif + + constexpr operator Type () const { +#if HB_FAST_NUM_ACCESS + return (BE == (__BYTE_ORDER == __BIG_ENDIAN)) ? + ((const hb_packed_t<uint64_t> *) v)->v + : + __builtin_bswap64 (((const hb_packed_t<uint64_t> *) v)->v) + ; +#else + return (BE ? (uint64_t (v[0]) << 56) : (uint64_t (v[0]) )) + + (BE ? (uint64_t (v[1]) << 48) : (uint64_t (v[1]) << 8)) + + (BE ? (uint64_t (v[2]) << 40) : (uint64_t (v[2]) << 16)) + + (BE ? (uint64_t (v[3]) << 32) : (uint64_t (v[3]) << 24)) + + (BE ? (uint64_t (v[4]) << 24) : (uint64_t (v[4]) << 32)) + + (BE ? (uint64_t (v[5]) << 16) : (uint64_t (v[5]) << 40)) + + (BE ? (uint64_t (v[6]) << 8) : (uint64_t (v[6]) << 48)) + + (BE ? (uint64_t (v[7]) ) : (uint64_t (v[7]) << 56)); +#endif + } + private: uint8_t v[8]; +}; /* Floats. */ +template <bool BE, typename Type, int Bytes> +struct HBFloat +{ + using IntType = typename std::conditional<Bytes == 4, uint32_t, uint64_t>::type; + + public: + HBFloat () = default; + + HBFloat (Type V) + { +#if HB_FAST_NUM_ACCESS + { + if (BE == (__BYTE_ORDER == __BIG_ENDIAN)) + { + ((hb_packed_t<Type> *) v)->v = V; + return; + } + } +#endif + + union { + hb_packed_t<Type> f; + hb_packed_t<IntType> i; + } u = {{V}}; + + const HBInt<BE, IntType> I = u.i.v; + for (unsigned i = 0; i < Bytes; i++) + v[i] = I.v[i]; + } + + /* c++14 constexpr */ operator Type () const + { +#if HB_FAST_NUM_ACCESS + { + if (BE == (__BYTE_ORDER == __BIG_ENDIAN)) + return ((const hb_packed_t<Type> *) v)->v; + } +#endif + + HBInt<BE, IntType> I; + for (unsigned i = 0; i < Bytes; i++) + I.v[i] = v[i]; + + union { + hb_packed_t<IntType> i; + hb_packed_t<Type> f; + } u = {{I}}; + + return u.f.v; + } + private: uint8_t v[Bytes]; +}; + + /* We want our rounding towards +infinity. */ static inline double _hb_roundf (double x) { return floor (x + .5); } @@ -210,6 +327,27 @@ #define roundf(x) _hb_roundf(x) +static inline void +hb_sincos (float rotation, float &s, float &c) +{ +#ifdef HAVE_SINCOSF + sincosf (rotation, &s, &c); +#else + c = cosf (rotation); + s = sinf (rotation); +#endif +} +static inline void +hb_sincos (double rotation, double &s, double &c) +{ +#ifdef HAVE_SINCOS + sincos (rotation, &s, &c); +#else + c = cos (rotation); + s = sin (rotation); +#endif +} + /* Encodes three unsigned integers in one 64-bit number. If the inputs have more than 21 bits, * values will be truncated / overlap, and might not decode exactly. */ @@ -734,6 +872,17 @@ * Bithacks. */ +/* Return the number of 1 bits in a uint8_t; faster than hb_popcount() */ +static inline unsigned +hb_popcount8 (uint8_t v) +{ + static const uint8_t popcount4[16] = { + 0, 1, 1, 2, 1, 2, 2, 3, + 1, 2, 2, 3, 2, 3, 3, 4 + }; + return popcount4[v & 0xF] + popcount4[v >> 4]; +} + /* Return the number of 1 bits in v. */ template <typename T> static inline unsigned int @@ -1070,6 +1219,7 @@ } template <typename V, typename K, typename ...Ts> +HB_HOT static inline bool hb_bsearch_impl (unsigned *pos, /* Out */ const K& key, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-alloc-pool.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-alloc-pool.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-alloc-pool.hh 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-alloc-pool.hh 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Author(s): Behdad Esfahbod + */ + +#ifndef HB_ALLOC_POOL_HH +#define HB_ALLOC_POOL_HH + +#include "hb-vector.hh" + +/* Memory pool for persistent small- to medium-sized allocations. + * + * Some AI musings on this, not necessarily true: + * + * This is a very simple implementation, but it's good enough for our + * purposes. It's not thread-safe. It's not very fast. It's not + * very memory efficient. It's not very cache efficient. It's not + * very anything efficient. But it's simple and it works. And it's + * good enough for our purposes. If you need something more + * sophisticated, use a real allocator. Or use a real language. */ + +struct hb_alloc_pool_t +{ + unsigned ChunkSize = 65536 - 2 * sizeof (void *); + + void *alloc (size_t size, unsigned alignment = 2 * sizeof (void *)) + { + if (unlikely (chunks.in_error ())) return nullptr; + + assert (alignment > 0); + assert (alignment <= 2 * sizeof (void *)); + assert ((alignment & (alignment - 1)) == 0); /* power of two */ + + if (size > (ChunkSize) / 4) + { + /* Big chunk, allocate separately. */ + hb_vector_t<char> chunk; + if (unlikely (!chunk.resize (size))) return nullptr; + void *ret = chunk.arrayZ; + chunks.push (std::move (chunk)); + if (chunks.in_error ()) return nullptr; + if (chunks.length > 1) + { + // Bring back the previous last chunk to the end, so that + // we can continue to allocate from it. + hb_swap (chunks.arrayZ[chunks.length - 1], chunks.arrayZ[chunks.length - 2]); + } + return ret; + } + + unsigned pad = (unsigned) ((alignment - ((uintptr_t) current_chunk.arrayZ & (alignment - 1))) & (alignment - 1)); + + // Small chunk, allocate from the last chunk. + if (current_chunk.length < pad + size) + { + chunks.push (); + if (unlikely (chunks.in_error ())) return nullptr; + hb_vector_t<char> &chunk = chunks.arrayZ[chunks.length - 1]; + if (unlikely (!chunk.resize (ChunkSize))) return nullptr; + current_chunk = chunk; + pad = (unsigned) ((alignment - ((uintptr_t) current_chunk.arrayZ & (alignment - 1))) & (alignment - 1)); + } + + current_chunk += pad; + + assert (current_chunk.length >= size); + void *ret = current_chunk.arrayZ; + current_chunk += size; + return ret; + } + + void discard (void *p_, size_t size) + { + // Reclaim memory if we can. + char *p = (char *) p_; + if (current_chunk.arrayZ == p + size && current_chunk.backwards_length >= size) + current_chunk -= size; + } + + private: + hb_vector_t<hb_vector_t<char>> chunks; + hb_array_t<char> current_chunk; +}; + + +#endif /* HB_ALLOC_POOL_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-array.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-array.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-array.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-array.hh 2026-04-17 19:08:13.000000000 +0000 @@ -291,6 +291,13 @@ && (unsigned int) (arrayZ + length - (const char *) p) >= size; } + template <unsigned P = sizeof (Type), + hb_enable_if (P == 1)> + bool check_end (const void *p) const + { + return (uintptr_t) (((const char *) p) - arrayZ) <= length; + } + /* Only call if you allocated the underlying array using hb_malloc() or similar. */ void fini () { hb_free ((void *) arrayZ); arrayZ = nullptr; length = 0; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-atomic.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-atomic.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-atomic.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-atomic.hh 2026-04-17 19:08:13.000000000 +0000 @@ -40,7 +40,6 @@ * Atomic integers and pointers. */ - /* We need external help for these */ #if defined(hb_atomic_int_impl_add) \ @@ -80,27 +79,11 @@ #include <atomic> +#define HB_STL_ATOMIC_IMPL + #define _hb_memory_r_barrier() std::atomic_thread_fence(std::memory_order_acquire) #define _hb_memory_w_barrier() std::atomic_thread_fence(std::memory_order_release) -#define hb_atomic_int_impl_add(AI, V) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> *> (AI)->fetch_add ((V), std::memory_order_acq_rel)) -#define hb_atomic_int_impl_set_relaxed(AI, V) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> *> (AI)->store ((V), std::memory_order_relaxed)) -#define hb_atomic_int_impl_set(AI, V) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> *> (AI)->store ((V), std::memory_order_release)) -#define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> const *> (AI)->load (std::memory_order_relaxed)) -#define hb_atomic_int_impl_get(AI) (reinterpret_cast<std::atomic<typename std::decay<decltype (*(AI))>::type> const *> (AI)->load (std::memory_order_acquire)) - -#define hb_atomic_ptr_impl_set_relaxed(P, V) (reinterpret_cast<std::atomic<void*> *> (P)->store ((V), std::memory_order_relaxed)) -#define hb_atomic_ptr_impl_get_relaxed(P) (reinterpret_cast<std::atomic<void*> const *> (P)->load (std::memory_order_relaxed)) -#define hb_atomic_ptr_impl_get(P) (reinterpret_cast<std::atomic<void*> *> (P)->load (std::memory_order_acquire)) -static inline bool -_hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) -{ - const void *O = O_; // Need lvalue - return reinterpret_cast<std::atomic<const void*> *> (P)->compare_exchange_weak (O, N, std::memory_order_acq_rel, std::memory_order_relaxed); -} -#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N)) - - #else /* defined(HB_NO_MT) */ #define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) @@ -159,6 +142,76 @@ inline void *hb_atomic_ptr_impl_get (void ** const P) { void *v = *P; _hb_memory_r_barrier (); return v; } #endif +#ifdef HB_STL_ATOMIC_IMPL +template <typename T> +struct hb_atomic_t +{ + hb_atomic_t () = default; + constexpr hb_atomic_t (T v) : v (v) {} + constexpr hb_atomic_t (const hb_atomic_t& o) : v (o.get_relaxed ()) {} + constexpr hb_atomic_t (hb_atomic_t&& o) : v (o.get_relaxed ()) { o.set_relaxed ({}); } + + hb_atomic_t &operator= (const hb_atomic_t& o) { set_relaxed (o.get_relaxed ()); return *this; } + hb_atomic_t &operator= (hb_atomic_t&& o){ set_relaxed (o.get_relaxed ()); o.set_relaxed ({}); return *this; } + hb_atomic_t &operator= (T v_) + { + set_relaxed (v_); + return *this; + } + operator T () const { return get_relaxed (); } + + void set_relaxed (T v_) { v.store (v_, std::memory_order_relaxed); } + void set_release (T v_) { v.store (v_, std::memory_order_release); } + T get_relaxed () const { return v.load (std::memory_order_relaxed); } + T get_acquire () const { return v.load (std::memory_order_acquire); } + T inc () { return v.fetch_add (1, std::memory_order_acq_rel); } + T dec () { return v.fetch_add (-1, std::memory_order_acq_rel); } + + int operator++ (int) { return inc (); } + int operator-- (int) { return dec (); } + + friend void swap (hb_atomic_t &a, hb_atomic_t &b) noexcept + { + T v = a.get_acquire (); + a.set_relaxed (b.get_acquire ()); + b.set_relaxed (v); + } + + std::atomic<T> v = 0; +}; + +template <typename T> +struct hb_atomic_t<T *> +{ + hb_atomic_t () = default; + constexpr hb_atomic_t (T *v) : v (v) {} + hb_atomic_t (const hb_atomic_t &other) = delete; + + void init (T *v_ = nullptr) { set_relaxed (v_); } + void set_relaxed (T *v_) { v.store (v_, std::memory_order_relaxed); } + T *get_relaxed () const { return v.load (std::memory_order_relaxed); } + T *get_acquire () const { return v.load (std::memory_order_acquire); } + bool cmpexch (T *old, T *new_) { return v.compare_exchange_weak (old, new_, std::memory_order_acq_rel, std::memory_order_relaxed); } + + operator bool () const { return get_acquire () != nullptr; } + T *operator->() const { return get_acquire (); } + template <typename C> + operator C * () const + { + return get_acquire (); + } + + friend void swap (hb_atomic_t &a, hb_atomic_t &b) noexcept + { + T *p = a.get_acquire (); + a.set_relaxed (b.get_acquire ()); + b.set_relaxed (p); + } + + std::atomic<T *> v = nullptr; +}; + +#else template <typename T> struct hb_atomic_t @@ -178,7 +231,6 @@ int operator ++ (int) { return inc (); } int operator -- (int) { return dec (); } - long operator |= (long v_) { set_relaxed (get_relaxed () | v_); return *this; } T v = 0; }; @@ -194,7 +246,7 @@ void set_relaxed (T* v_) { hb_atomic_ptr_impl_set_relaxed (&v, v_); } T *get_relaxed () const { return (T *) hb_atomic_ptr_impl_get_relaxed (&v); } T *get_acquire () const { return (T *) hb_atomic_ptr_impl_get ((void **) &v); } - bool cmpexch (const T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } + bool cmpexch (T *old, T *new_) { return hb_atomic_ptr_impl_cmpexch ((void **) &v, (void *) old, (void *) new_); } operator bool () const { return get_acquire () != nullptr; } T * operator -> () const { return get_acquire (); } @@ -203,6 +255,8 @@ T *v = nullptr; }; +#endif + static inline bool hb_barrier () { _hb_compiler_memory_r_barrier (); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bimap.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bimap.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bimap.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bimap.hh 2026-04-17 19:08:13.000000000 +0000 @@ -176,7 +176,7 @@ { hb_codepoint_t count = get_population (); hb_vector_t <hb_codepoint_t> work; - if (unlikely (!work.resize (count, false))) return; + if (unlikely (!work.resize_dirty (count))) return; for (hb_codepoint_t rhs = 0; rhs < count; rhs++) work.arrayZ[rhs] = back_map[rhs]; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bit-page.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bit-page.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bit-page.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bit-page.hh 2026-04-17 19:08:13.000000000 +0000 @@ -142,6 +142,7 @@ bool operator [] (hb_codepoint_t g) const { return get (g); } bool operator () (hb_codepoint_t g) const { return get (g); } + bool has (hb_codepoint_t g) const { return get (g); } void add_range (hb_codepoint_t a, hb_codepoint_t b) { @@ -290,7 +291,7 @@ unsigned int j = m & ELT_MASK; const elt_t vv = v[i] & ~((elt_t (1) << j) - 1); - for (const elt_t *p = &vv; i < len (); p = &v[++i]) + for (const elt_t *p = &vv; i < len (); p = ((const elt_t *) &v[0]) + (++i)) if (*p) { *codepoint = i * ELT_BITS + elt_get_min (*p); @@ -346,6 +347,36 @@ return 0; } + /* + * Iterator implementation. + */ + struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t> + { + static constexpr bool is_sorted_iterator = true; + iter_t (const hb_bit_page_t &s_ = Null (hb_bit_page_t), bool init = true) : s (&s_), v (INVALID) + { + if (init) + v = s->get_min (); + } + + typedef hb_codepoint_t __item_t__; + hb_codepoint_t __item__ () const { return v; } + bool __more__ () const { return v != INVALID; } + void __next__ () { + s->next (&v); + } + void __prev__ () { s->previous (&v); } + iter_t end () const { return iter_t (*s, false); } + bool operator != (const iter_t& o) const + { return v != o.v; } + + protected: + const hb_bit_page_t *s; + hb_codepoint_t v; + }; + iter_t iter () const { return iter_t (*this); } + operator iter_t () const { return iter (); } + static constexpr hb_codepoint_t INVALID = HB_SET_VALUE_INVALID; typedef unsigned long long elt_t; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bit-set-invertible.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bit-set-invertible.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bit-set-invertible.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bit-set-invertible.hh 2026-04-17 19:08:13.000000000 +0000 @@ -368,7 +368,7 @@ unsigned __len__ () const { return l; } iter_t end () const { return iter_t (*s, false); } bool operator != (const iter_t& o) const - { return v != o.v || s != o.s; } + { return v != o.v; } protected: const hb_bit_set_invertible_t *s; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bit-set.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bit-set.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-bit-set.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-bit-set.hh 2026-04-17 19:08:13.000000000 +0000 @@ -91,10 +91,10 @@ if (pages.length < count && (unsigned) pages.allocated < count && count <= 2) exact_size = true; // Most sets are small and local - if (unlikely (!pages.resize (count, clear, exact_size) || - !page_map.resize (count, clear))) + if (unlikely (!pages.resize_full (count, clear, exact_size) || + !page_map.resize_full (count, clear, false))) { - pages.resize (page_map.length, clear, exact_size); + pages.resize_full (page_map.length, clear, exact_size); successful = false; return false; } @@ -108,10 +108,11 @@ page_map.alloc (sz); } - void reset () + hb_bit_set_t& reset () { successful = true; clear (); + return *this; } void clear () @@ -394,7 +395,7 @@ { if (unlikely (!successful)) return; unsigned int count = other.pages.length; - if (unlikely (!resize (count, false, exact_size))) + if (unlikely (!resize (count, false, exact_size))) return; population = other.population; @@ -922,7 +923,7 @@ unsigned __len__ () const { return l; } iter_t end () const { return iter_t (*s, false); } bool operator != (const iter_t& o) const - { return s != o.s || v != o.v; } + { return v != o.v; } protected: const hb_bit_set_t *s; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer-deserialize-text-unicode.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer-deserialize-text-unicode.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer-deserialize-text-unicode.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer-deserialize-text-unicode.hh 2026-04-17 19:08:13.000000000 +0000 @@ -32,7 +32,7 @@ #include "hb.hh" -#line 36 "hb-buffer-deserialize-text-unicode.hh" +#line 33 "hb-buffer-deserialize-text-unicode.hh" static const unsigned char _deserialize_text_unicode_trans_keys[] = { 0u, 0u, 43u, 102u, 48u, 102u, 48u, 124u, 48u, 57u, 62u, 124u, 48u, 124u, 60u, 117u, 85u, 117u, 85u, 117u, 0 @@ -150,12 +150,12 @@ hb_glyph_info_t info = {0}; const hb_glyph_position_t pos = {0}; -#line 154 "hb-buffer-deserialize-text-unicode.hh" +#line 147 "hb-buffer-deserialize-text-unicode.hh" { cs = deserialize_text_unicode_start; } -#line 159 "hb-buffer-deserialize-text-unicode.hh" +#line 150 "hb-buffer-deserialize-text-unicode.hh" { int _slen; int _trans; @@ -215,7 +215,7 @@ hb_memset (&info, 0, sizeof (info)); } break; -#line 219 "hb-buffer-deserialize-text-unicode.hh" +#line 203 "hb-buffer-deserialize-text-unicode.hh" } _again: @@ -238,7 +238,7 @@ *end_ptr = p; } break; -#line 242 "hb-buffer-deserialize-text-unicode.hh" +#line 224 "hb-buffer-deserialize-text-unicode.hh" } } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer-serialize.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer-serialize.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer-serialize.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer-serialize.cc 2026-04-17 19:08:13.000000000 +0000 @@ -427,7 +427,7 @@ * #HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES flag is set. Then, * - If #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set, `=` then #hb_glyph_info_t.cluster. * - If #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set, the #hb_glyph_position_t in the format: - * - If both #hb_glyph_position_t.x_offset and #hb_glyph_position_t.y_offset are not 0, `@x_offset,y_offset`. Then, + * - If #hb_glyph_position_t.x_offset and #hb_glyph_position_t.y_offset are not both 0, `@x_offset,y_offset`. Then, * - `+x_advance`, then `,y_advance` if #hb_glyph_position_t.y_advance is not 0. Then, * - If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the #hb_glyph_extents_t in the format `<x_bearing,y_bearing,width,height>` * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer-verify.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer-verify.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer-verify.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer-verify.cc 2026-04-17 19:08:13.000000000 +0000 @@ -163,7 +163,7 @@ hb_buffer_append (fragment, text_buffer, text_start, text_end); if (!hb_shape_full (font, fragment, features, num_features, shapers) || - fragment->successful || fragment->shaping_failed) + fragment->successful) { hb_buffer_destroy (reconstruction); hb_buffer_destroy (fragment); @@ -313,11 +313,11 @@ * Shape the two fragment streams. */ if (!hb_shape_full (font, fragments[0], features, num_features, shapers) || - !fragments[0]->successful || fragments[0]->shaping_failed) + !fragments[0]->successful) goto out; if (!hb_shape_full (font, fragments[1], features, num_features, shapers) || - !fragments[1]->successful || fragments[1]->shaping_failed) + !fragments[1]->successful) goto out; if (!forward) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer.cc 2026-04-17 19:08:13.000000000 +0000 @@ -158,14 +158,15 @@ bool hb_buffer_t::enlarge (unsigned int size) { - if (unlikely (!successful)) - return false; if (unlikely (size > max_len)) { successful = false; return false; } + if (unlikely (!successful)) + return false; + unsigned int new_allocated = allocated; hb_glyph_position_t *new_pos = nullptr; hb_glyph_info_t *new_info = nullptr; @@ -226,6 +227,13 @@ assert (have_output); if (unlikely (!ensure (len + count))) return false; + max_ops -= len - idx; + if (unlikely (max_ops < 0)) + { + successful = false; + return false; + } + memmove (info + idx + count, info + idx, (len - idx) * sizeof (info[0])); if (idx + count > len) { @@ -297,7 +305,6 @@ props = default_props; successful = true; - shaping_failed = false; have_output = false; have_positions = false; @@ -320,7 +327,6 @@ { deallocate_var_all (); serial = 0; - shaping_failed = false; scratch_flags = HB_BUFFER_SCRATCH_FLAG_DEFAULT; unsigned mul; if (likely (!hb_unsigned_mul_overflows (len, HB_BUFFER_MAX_LEN_FACTOR, &mul))) @@ -339,7 +345,6 @@ max_ops = HB_BUFFER_MAX_OPS_DEFAULT; deallocate_var_all (); serial = 0; - // Intentionally not reseting shaping_failed, such that it can be inspected. } @@ -520,7 +525,19 @@ hb_mask_t not_mask = ~mask; value &= mask; + max_ops -= len; + if (unlikely (max_ops < 0)) + successful = false; + unsigned int count = len; + + if (cluster_start == 0 && cluster_end == (unsigned int) -1) + { + for (unsigned int i = 0; i < count; i++) + info[i].mask = (info[i].mask & not_mask) | value; + return; + } + for (unsigned int i = 0; i < count; i++) if (cluster_start <= info[i].cluster && info[i].cluster < cluster_end) info[i].mask = (info[i].mask & not_mask) | value; @@ -536,6 +553,10 @@ return; } + max_ops -= end - start; + if (unlikely (max_ops < 0)) + successful = false; + unsigned int cluster = info[start].cluster; for (unsigned int i = start + 1; i < end; i++) @@ -569,6 +590,10 @@ if (unlikely (end - start < 2)) return; + max_ops -= end - start; + if (unlikely (max_ops < 0)) + successful = false; + unsigned int cluster = out_info[start].cluster; for (unsigned int i = start + 1; i < end; i++) @@ -726,7 +751,6 @@ HB_SEGMENT_PROPERTIES_DEFAULT, false, /* successful */ - true, /* shaping_failed */ false, /* have_output */ true /* have_positions */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-buffer.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-buffer.hh 2026-04-17 19:08:13.000000000 +0000 @@ -32,6 +32,7 @@ #include "hb.hh" #include "hb-unicode.hh" +#include "hb-set-digest.hh" static_assert ((sizeof (hb_glyph_info_t) == 20), ""); @@ -44,14 +45,14 @@ enum hb_buffer_scratch_flags_t { HB_BUFFER_SCRATCH_FLAG_DEFAULT = 0x00000000u, - HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII = 0x00000001u, + HB_BUFFER_SCRATCH_FLAG_HAS_FRACTION_SLASH = 0x00000001u, HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES = 0x00000002u, HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK = 0x00000004u, HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT = 0x00000008u, HB_BUFFER_SCRATCH_FLAG_HAS_CGJ = 0x00000010u, - HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS = 0x00000020u, - HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE = 0x00000040u, - HB_BUFFER_SCRATCH_FLAG_HAS_VARIATION_SELECTOR_FALLBACK= 0x00000080u, + HB_BUFFER_SCRATCH_FLAG_HAS_BROKEN_SYLLABLE = 0x00000020u, + HB_BUFFER_SCRATCH_FLAG_HAS_VARIATION_SELECTOR_FALLBACK= 0x00000040u, + HB_BUFFER_SCRATCH_FLAG_HAS_CONTINUATIONS = 0x00000080u, /* Reserved for shapers' internal use. */ HB_BUFFER_SCRATCH_FLAG_SHAPER0 = 0x01000000u, @@ -90,7 +91,6 @@ hb_segment_properties_t props; /* Script, language, direction */ bool successful; /* Allocations successful */ - bool shaping_failed; /* Shaping failure */ bool have_output; /* Whether we have an output buffer going on */ bool have_positions; /* Whether we have positions */ @@ -110,6 +110,7 @@ hb_codepoint_t context[2][CONTEXT_LENGTH]; unsigned int context_len[2]; + hb_set_digest_t digest; /* Manually updated sometimes */ /* * Managed by enter / leave @@ -200,6 +201,12 @@ void collect_codepoints (set_t &d) const { d.clear (); d.add_array (&info[0].codepoint, len, sizeof (info[0])); } + void update_digest () + { + digest = hb_set_digest_t (); + collect_codepoints (digest); + } + HB_INTERNAL void similar (const hb_buffer_t &src); HB_INTERNAL void reset (); HB_INTERNAL void clear (); @@ -346,7 +353,7 @@ { if (out_info != info || out_len != idx) { - if (unlikely (!make_room_for (1, 1))) return false; + if (unlikely (!ensure (out_len + 1))) return false; out_info[out_len] = info[idx]; } out_len++; @@ -363,7 +370,7 @@ { if (out_info != info || out_len != idx) { - if (unlikely (!make_room_for (n, n))) return false; + if (unlikely (!ensure (out_len + n))) return false; memmove (out_info + out_len, info + idx, n * sizeof (out_info[0])); } out_len += n; @@ -404,22 +411,12 @@ /* Adds glyph flags in mask to infos with clusters between start and end. * The start index will be from out-buffer if from_out_buffer is true. * If interior is true, then the cluster having the minimum value is skipped. */ - void _set_glyph_flags (hb_mask_t mask, - unsigned start = 0, - unsigned end = (unsigned) -1, - bool interior = false, - bool from_out_buffer = false) + void _set_glyph_flags_impl (hb_mask_t mask, + unsigned start, + unsigned end, + bool interior, + bool from_out_buffer) { - end = hb_min (end, len); - - if (unlikely (end - start > 255)) - return; - - if (interior && !from_out_buffer && end - start < 2) - return; - - scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; - if (!from_out_buffer || !have_output) { if (!interior) @@ -456,6 +453,25 @@ } } + HB_ALWAYS_INLINE + void _set_glyph_flags (hb_mask_t mask, + unsigned start = 0, + unsigned end = (unsigned) -1, + bool interior = false, + bool from_out_buffer = false) + { + if (unlikely (end != (unsigned) -1 && end - start > 255)) + return; + + end = hb_min (end, len); + + if (interior && !from_out_buffer && end - start < 2) + return; + + _set_glyph_flags_impl (mask, start, end, interior, from_out_buffer); + } + + void unsafe_to_break (unsigned int start = 0, unsigned int end = -1) { _set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT, @@ -606,6 +622,10 @@ if (unlikely (start == end)) return; + max_ops -= end - start; + if (unlikely (max_ops < 0)) + successful = false; + unsigned cluster_first = infos[start].cluster; unsigned cluster_last = infos[end - 1].cluster; @@ -614,10 +634,7 @@ { for (unsigned int i = start; i < end; i++) if (cluster != infos[i].cluster) - { - scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; infos[i].mask |= mask; - } return; } @@ -626,18 +643,12 @@ if (cluster == cluster_first) { for (unsigned int i = end; start < i && infos[i - 1].cluster != cluster_first; i--) - { - scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; infos[i - 1].mask |= mask; - } } else /* cluster == cluster_last */ { for (unsigned int i = start; i < end && infos[i].cluster != cluster_last; i++) - { - scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; infos[i].mask |= mask; - } } } unsigned diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-cache.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-cache.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-cache.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-cache.hh 2026-04-17 19:08:13.000000000 +0000 @@ -64,17 +64,23 @@ struct hb_cache_t { using item_t = typename std::conditional<thread_safe, - typename std::conditional<key_bits + value_bits - cache_bits <= 16, - hb_atomic_t<unsigned short>, - hb_atomic_t<unsigned int>>::type, - typename std::conditional<key_bits + value_bits - cache_bits <= 16, - unsigned short, - unsigned int>::type + typename std::conditional<key_bits + value_bits - cache_bits <= 8, + hb_atomic_t<unsigned char>, + typename std::conditional<key_bits + value_bits - cache_bits <= 16, + hb_atomic_t<unsigned short>, + hb_atomic_t<unsigned int>>::type>::type, + typename std::conditional<key_bits + value_bits - cache_bits <= 8, + unsigned char, + typename std::conditional<key_bits + value_bits - cache_bits <= 16, + unsigned short, + unsigned int>::type>::type >::type; static_assert ((key_bits >= cache_bits), ""); static_assert ((key_bits + value_bits <= cache_bits + 8 * sizeof (item_t)), ""); + static constexpr unsigned MAX_VALUE = (1u << value_bits) - 1; + hb_cache_t () { clear (); } void clear () @@ -83,25 +89,32 @@ v = -1; } + HB_HOT bool get (unsigned int key, unsigned int *value) const { unsigned int k = key & ((1u<<cache_bits)-1); unsigned int v = values[k]; - if ((key_bits + value_bits - cache_bits == 8 * sizeof (item_t) && v == (unsigned int) -1) || + if ((key_bits + value_bits - cache_bits == 8 * sizeof (item_t) && (item_t) v == (item_t) -1) || (v >> value_bits) != (key >> cache_bits)) return false; *value = v & ((1u<<value_bits)-1); return true; } - bool set (unsigned int key, unsigned int value) + HB_HOT + void set (unsigned int key, unsigned int value) { if (unlikely ((key >> key_bits) || (value >> value_bits))) - return false; /* Overflows */ + return; /* Overflows */ + set_unchecked (key, value); + } + + HB_HOT + void set_unchecked (unsigned int key, unsigned int value) + { unsigned int k = key & ((1u<<cache_bits)-1); unsigned int v = ((key>>cache_bits)<<value_bits) | value; values[k] = v; - return true; } private: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-cff2-interp-cs.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-cff2-interp-cs.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-cff2-interp-cs.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-cff2-interp-cs.hh 2026-04-17 19:08:13.000000000 +0000 @@ -72,12 +72,12 @@ cff2_cs_interp_env_t (const hb_ubytes_t &str, ACC &acc, unsigned int fd, const int *coords_=nullptr, unsigned int num_coords_=0) : SUPER (str, acc.globalSubrs, acc.privateDicts[fd].localSubrs), - cached_scalars_vector (&acc.cached_scalars_vector) + region_count (0), cached_scalars_vector (&acc.cached_scalars_vector) { coords = coords_; num_coords = num_coords_; varStore = acc.varStore; - do_blend = num_coords && coords && varStore->size; + do_blend = num_coords && varStore->size; set_ivs (acc.privateDicts[fd].ivs); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-common.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-common.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-common.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-common.cc 2026-04-17 19:08:13.000000000 +0000 @@ -40,43 +40,6 @@ **/ -/* hb_options_t */ - -hb_atomic_t<unsigned> _hb_options; - -void -_hb_options_init () -{ - hb_options_union_t u; - u.i = 0; - u.opts.initialized = true; - - const char *c = getenv ("HB_OPTIONS"); - if (c) - { - while (*c) - { - const char *p = strchr (c, ':'); - if (!p) - p = c + strlen (c); - -#define OPTION(name, symbol) \ - if (0 == strncmp (c, name, p - c) && strlen (name) == static_cast<size_t>(p - c)) do { u.opts.symbol = true; } while (0) - - OPTION ("uniscribe-bug-compatible", uniscribe_bug_compatible); - -#undef OPTION - - c = *p ? p + 1 : p; - } - - } - - /* This is idempotent and threadsafe. */ - _hb_options = u.i; -} - - /* hb_tag_t */ /** @@ -545,8 +508,11 @@ * Fetches the #hb_direction_t of a script when it is * set horizontally. All right-to-left scripts will return * #HB_DIRECTION_RTL. All left-to-right scripts will return - * #HB_DIRECTION_LTR. Scripts that can be written either - * horizontally or vertically will return #HB_DIRECTION_INVALID. + * #HB_DIRECTION_LTR. + * + * Scripts that can be written either right-to-left or + * left-to-right will return #HB_DIRECTION_INVALID. + * * Unknown scripts will return #HB_DIRECTION_LTR. * * Return value: The horizontal #hb_direction_t of @script @@ -628,6 +594,9 @@ /* Unicode-16.0 additions */ case HB_SCRIPT_GARAY: + /* Unicode-17.0 additions */ + case HB_SCRIPT_SIDETIC: + return HB_DIRECTION_RTL; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-config.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-config.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-config.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-config.hh 2026-04-17 19:08:13.000000000 +0000 @@ -38,7 +38,6 @@ #ifndef HB_EXPERIMENTAL_API #define HB_NO_BEYOND_64K #define HB_NO_CUBIC_GLYF -#define HB_NO_VAR_COMPOSITES #endif #ifdef HB_TINY @@ -91,7 +90,10 @@ #ifdef HB_MINI #define HB_NO_AAT #define HB_NO_LEGACY -#define HB_NO_BORING_EXPANSION +#define HB_NO_BEYOND_64K +#define HB_NO_CUBIC_GLYF +#define HB_NO_VAR_COMPOSITES +#define HB_NO_VAR_HVF #endif #ifdef __OPTIMIZE_SIZE__ @@ -109,12 +111,6 @@ /* Closure of options. */ -#ifdef HB_NO_BORING_EXPANSION -#define HB_NO_BEYOND_64K -#define HB_NO_CUBIC_GLYF -#define HB_NO_VAR_COMPOSITES -#endif - #ifdef HB_NO_VAR #define HB_NO_VAR_COMPOSITES #endif @@ -149,10 +145,6 @@ #define HB_NO_PAINT #endif -#ifdef HB_NO_GETENV -#define HB_NO_UNISCRIBE_BUG_COMPATIBLE -#endif - #ifdef HB_NO_LEGACY #define HB_NO_CMAP_LEGACY_SUBTABLES #define HB_NO_FALLBACK_SHAPE diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-debug.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-debug.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-debug.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-debug.hh 2026-04-17 19:08:13.000000000 +0000 @@ -38,48 +38,6 @@ /* - * Global runtime options. - */ - -struct hb_options_t -{ - bool unused : 1; /* In-case sign bit is here. */ - bool initialized : 1; - bool uniscribe_bug_compatible : 1; -}; - -union hb_options_union_t { - unsigned i; - hb_options_t opts; -}; -static_assert ((sizeof (hb_atomic_t<unsigned>) >= sizeof (hb_options_union_t)), ""); - -HB_INTERNAL void -_hb_options_init (); - -extern HB_INTERNAL hb_atomic_t<unsigned> _hb_options; - -static inline hb_options_t -hb_options () -{ -#ifdef HB_NO_GETENV - return hb_options_t (); -#endif - /* Make a local copy, so we can access bitfield threadsafely. */ - hb_options_union_t u; - u.i = _hb_options; - - if (unlikely (!u.i)) - { - _hb_options_init (); - u.i = _hb_options; - } - - return u.opts; -} - - -/* * Debug output (needs enabling at compile time.) */ @@ -394,6 +352,10 @@ #define HB_DEBUG_WASM (HB_DEBUG+0) #endif +#ifndef HB_DEBUG_KBTS +#define HB_DEBUG_KBTS (HB_DEBUG+0) +#endif + /* * With tracing. */ @@ -484,7 +446,7 @@ #ifndef HB_BUFFER_MESSAGE_MORE -#define HB_BUFFER_MESSAGE_MORE (HB_DEBUG+1) +#define HB_BUFFER_MESSAGE_MORE (HB_DEBUG+0) #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-deprecated.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-deprecated.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-deprecated.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-deprecated.h 2026-04-17 19:08:13.000000000 +0000 @@ -287,7 +287,7 @@ * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * * Since: 7.0.0 - * XDeprecated: REPLACEME: Use hb_font_draw_glyph_func_or_fail_t instead. + * Deprecated: 11.2.0: Use hb_font_draw_glyph_func_or_fail_t instead. **/ typedef void (*hb_font_draw_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, @@ -308,7 +308,7 @@ * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * * Since: 7.0.0 - * XDeprecated: REPLACEME: Use hb_font_paint_glyph_or_fail_func_t instead. + * Deprecated: 11.2.0: Use hb_font_paint_glyph_or_fail_func_t instead. */ typedef hb_bool_t (*hb_font_paint_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, @@ -346,7 +346,7 @@ * Sets the implementation function for #hb_font_draw_glyph_func_t. * * Since: 7.0.0 - * XDeprecated: REPLACEME: Use hb_font_funcs_set_draw_glyph_or_fail_func instead. + * Deprecated: 11.2.0: Use hb_font_funcs_set_draw_glyph_or_fail_func instead. **/ HB_DEPRECATED_FOR (hb_font_funcs_set_draw_glyph_or_fail_func) HB_EXTERN void @@ -364,7 +364,7 @@ * Sets the implementation function for #hb_font_paint_glyph_func_t. * * Since: 7.0.0 - * XDeprecated: REPLACEME: Use hb_font_funcs_set_paint_glyph_or_fail_func() instead. + * Deprecated: 11.2.0: Use hb_font_funcs_set_paint_glyph_or_fail_func() instead. */ HB_DEPRECATED_FOR (hb_font_funcs_set_paint_glyph_or_fail_func) HB_EXTERN void diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-draw.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-draw.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-draw.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-draw.cc 2026-04-17 19:08:13.000000000 +0000 @@ -63,14 +63,14 @@ float to_x, float to_y, void *user_data HB_UNUSED) { -#define HB_ONE_THIRD 0.33333333f +#define HB_TWO_THIRD 0.66666666666666666666666667f dfuncs->emit_cubic_to (draw_data, *st, - (st->current_x + 2.f * control_x) * HB_ONE_THIRD, - (st->current_y + 2.f * control_y) * HB_ONE_THIRD, - (to_x + 2.f * control_x) * HB_ONE_THIRD, - (to_y + 2.f * control_y) * HB_ONE_THIRD, + st->current_x + (control_x - st->current_x) * HB_TWO_THIRD, + st->current_y + (control_y - st->current_y) * HB_TWO_THIRD, + to_x + (control_x - to_x) * HB_TWO_THIRD, + to_y + (control_y - to_y) * HB_TWO_THIRD, to_x, to_y); -#undef HB_ONE_THIRD +#undef HB_TWO_THIRD } static void @@ -467,7 +467,7 @@ float to_x, float to_y, void *user_data HB_UNUSED) { - hb_extents_t *extents = (hb_extents_t *) data; + hb_extents_t<> *extents = (hb_extents_t<> *) data; extents->add_point (to_x, to_y); } @@ -479,7 +479,7 @@ float to_x, float to_y, void *user_data HB_UNUSED) { - hb_extents_t *extents = (hb_extents_t *) data; + hb_extents_t<> *extents = (hb_extents_t<> *) data; extents->add_point (to_x, to_y); } @@ -492,7 +492,7 @@ float to_x, float to_y, void *user_data HB_UNUSED) { - hb_extents_t *extents = (hb_extents_t *) data; + hb_extents_t<> *extents = (hb_extents_t<> *) data; extents->add_point (control_x, control_y); extents->add_point (to_x, to_y); @@ -507,7 +507,7 @@ float to_x, float to_y, void *user_data HB_UNUSED) { - hb_extents_t *extents = (hb_extents_t *) data; + hb_extents_t<> *extents = (hb_extents_t<> *) data; extents->add_point (control1_x, control1_y); extents->add_point (control2_x, control2_y); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-face-builder.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-face-builder.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-face-builder.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-face-builder.cc 2026-04-17 19:08:13.000000000 +0000 @@ -169,8 +169,7 @@ if (unlikely (start_offset >= population)) { - if (table_count) - *table_count = 0; + *table_count = 0; return population; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-face.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-face.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-face.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-face.cc 2026-04-17 19:08:13.000000000 +0000 @@ -84,8 +84,7 @@ hb_sanitize_context_t c (blob); - const char *start = hb_blob_get_data (blob, nullptr); - auto *ot = reinterpret_cast<OT::OpenTypeFontFile *> (const_cast<char *> (start)); + auto *ot = blob->as<OT::OpenTypeFontFile> (); if (unlikely (!ot->sanitize (&c))) return 0; @@ -329,7 +328,7 @@ return face; } -static struct supported_face_loaders_t { +static const struct supported_face_loaders_t { char name[16]; hb_face_t * (*from_file) (const char *font_file, unsigned face_index); hb_face_t * (*from_blob) (hb_blob_t *blob, unsigned face_index); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-font.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-font.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-font.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-font.cc 2026-04-17 19:08:13.000000000 +0000 @@ -246,7 +246,6 @@ hb_codepoint_t glyph HB_UNUSED, void *user_data HB_UNUSED) { - /* TODO use font_extents.ascender+descender */ return -font->y_scale; } @@ -352,6 +351,10 @@ hb_position_t *y, void *user_data HB_UNUSED) { + if (font->has_glyph_h_origins_func_set ()) + { + return font->get_glyph_h_origins (1, &glyph, 0, x, 0, y, 0, false); + } hb_bool_t ret = font->parent->get_glyph_h_origin (glyph, x, y); if (ret) font->parent_scale_position (x, y); @@ -366,7 +369,6 @@ hb_position_t *y, void *user_data HB_UNUSED) { - *x = *y = 0; return false; } @@ -378,12 +380,100 @@ hb_position_t *y, void *user_data HB_UNUSED) { + if (font->has_glyph_v_origins_func_set ()) + { + return font->get_glyph_v_origins (1, &glyph, 0, x, 0, y, 0, false); + } hb_bool_t ret = font->parent->get_glyph_v_origin (glyph, x, y); if (ret) font->parent_scale_position (x, y); return ret; } +#define hb_font_get_glyph_h_origins_nil hb_font_get_glyph_h_origins_default + +static hb_bool_t +hb_font_get_glyph_h_origins_default (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + unsigned int count, + const hb_codepoint_t *first_glyph HB_UNUSED, + unsigned glyph_stride HB_UNUSED, + hb_position_t *first_x, + unsigned x_stride, + hb_position_t *first_y, + unsigned y_stride, + void *user_data HB_UNUSED) +{ + if (font->has_glyph_h_origin_func_set ()) + { + for (unsigned int i = 0; i < count; i++) + { + font->get_glyph_h_origin (*first_glyph, first_x, first_y, false); + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + return true; + } + + hb_bool_t ret = font->parent->get_glyph_h_origins (count, + first_glyph, glyph_stride, + first_x, x_stride, + first_y, y_stride); + if (ret) + { + for (unsigned i = 0; i < count; i++) + { + font->parent_scale_position (first_x, first_y); + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + } + return ret; +} + +#define hb_font_get_glyph_v_origins_nil hb_font_get_glyph_v_origins_default + +static hb_bool_t +hb_font_get_glyph_v_origins_default (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + unsigned int count, + const hb_codepoint_t *first_glyph HB_UNUSED, + unsigned glyph_stride HB_UNUSED, + hb_position_t *first_x, + unsigned x_stride, + hb_position_t *first_y, + unsigned y_stride, + void *user_data HB_UNUSED) +{ + if (font->has_glyph_v_origin_func_set ()) + { + for (unsigned int i = 0; i < count; i++) + { + font->get_glyph_v_origin (*first_glyph, first_x, first_y, false); + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + return true; + } + + hb_bool_t ret = font->parent->get_glyph_v_origins (count, + first_glyph, glyph_stride, + first_x, x_stride, + first_y, y_stride); + if (ret) + { + for (unsigned i = 0; i < count; i++) + { + font->parent_scale_position (first_x, first_y); + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + } + return ret; +} + static hb_position_t hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, @@ -1257,6 +1347,77 @@ } /** + * hb_font_get_glyph_h_origins: + * @font: #hb_font_t to work upon + * @count: The number of glyph IDs in the sequence queried + * @first_glyph: The first glyph ID to query + * @glyph_stride: The stride between successive glyph IDs + * @first_x: (out): The first X coordinate of the origin retrieved + * @x_stride: The stride between successive X coordinates + * @first_y: (out): The first Y coordinate of the origin retrieved + * @y_stride: The stride between successive Y coordinates + * + * Fetches the (X,Y) coordinates of the origin for requested glyph IDs + * in the specified font, for horizontal text segments. + * + * Return value: `true` if data found, `false` otherwise + * + * Since: 11.3.0 + **/ +hb_bool_t +hb_font_get_glyph_h_origins (hb_font_t *font, + unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned int glyph_stride, + hb_position_t *first_x, + unsigned int x_stride, + hb_position_t *first_y, + unsigned int y_stride) + +{ + return font->get_glyph_h_origins (count, + first_glyph, glyph_stride, + first_x, x_stride, + first_y, y_stride); +} + +/** + * hb_font_get_glyph_v_origins: + * @font: #hb_font_t to work upon + * @count: The number of glyph IDs in the sequence queried + * @first_glyph: The first glyph ID to query + * @glyph_stride: The stride between successive glyph IDs + * @first_x: (out): The first X coordinate of the origin retrieved + * @x_stride: The stride between successive X coordinates + * @first_y: (out): The first Y coordinate of the origin retrieved + * @y_stride: The stride between successive Y coordinates + * + * Fetches the (X,Y) coordinates of the origin for requested glyph IDs + * in the specified font, for vertical text segments. + * + * Return value: `true` if data found, `false` otherwise + * + * Since: 11.3.0 + **/ +hb_bool_t +hb_font_get_glyph_v_origins (hb_font_t *font, + unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned int glyph_stride, + hb_position_t *first_x, + unsigned int x_stride, + hb_position_t *first_y, + unsigned int y_stride) + +{ + return font->get_glyph_v_origins (count, + first_glyph, glyph_stride, + first_x, x_stride, + first_y, y_stride); +} + + +/** * hb_font_get_glyph_h_kerning: * @font: #hb_font_t to work upon * @left_glyph: The glyph ID of the left glyph in the glyph pair @@ -1443,7 +1604,7 @@ * * Return value: `true` if glyph was drawn, `false` otherwise * - * XSince: REPLACEME + * Since: 11.2.0 **/ hb_bool_t hb_font_draw_glyph_or_fail (hb_font_t *font, @@ -1480,7 +1641,7 @@ * * Return value: `true` if glyph was painted, `false` otherwise * - * XSince: REPLACEME + * Since: 11.2.0 */ hb_bool_t hb_font_paint_glyph_or_fail (hb_font_t *font, @@ -1883,6 +2044,7 @@ 1000, /* x_scale */ 1000, /* y_scale */ + false, /* is_synthetic */ 0.f, /* x_embolden */ 0.f, /* y_embolden */ true, /* embolden_in_place */ @@ -1900,6 +2062,7 @@ 0, /* ptem */ HB_FONT_NO_VAR_NAMED_INSTANCE, /* instance_index */ + false, /* has_nonzero_coords */ 0, /* num_coords */ nullptr, /* coords */ nullptr, /* design_coords */ @@ -1960,8 +2123,14 @@ hb_font_set_funcs_using (font, nullptr); #ifndef HB_NO_VAR - if (face && face->index >> 16) - hb_font_set_var_named_instance (font, (face->index >> 16) - 1); + // Initialize variations. + if (likely (face)) + { + if (face->index >> 16) + hb_font_set_var_named_instance (font, (face->index >> 16) - 1); + else + hb_font_set_variations (font, nullptr, 0); + } #endif return font; @@ -1979,6 +2148,7 @@ font->coords = coords; font->design_coords = design_coords; font->num_coords = coords_length; + font->has_nonzero_coords = hb_any (hb_array (coords, coords_length)); font->changed (); font->serial_coords = font->serial; @@ -2393,7 +2563,7 @@ font->changed (); } -static struct supported_font_funcs_t { +static const struct supported_font_funcs_t { char name[16]; void (*func) (hb_font_t *); } supported_font_funcs[] = @@ -2450,6 +2620,9 @@ hb_font_set_funcs_using (hb_font_t *font, const char *name) { + if (unlikely (hb_object_is_immutable (font))) + return false; + bool retry = false; if (!name || !*name) @@ -2704,12 +2877,12 @@ * * Return value: `true` if the font is synthetic, `false` otherwise. * - * XSince: REPLACEME + * Since: 11.2.0 */ hb_bool_t hb_font_is_synthetic (hb_font_t *font) { - return font->is_synthetic (); + return font->is_synthetic; } /** @@ -2858,12 +3031,6 @@ if (hb_object_is_immutable (font)) return; - if (!variations_length && font->instance_index == HB_FONT_NO_VAR_NAMED_INSTANCE) - { - hb_font_set_var_coords_normalized (font, nullptr, 0); - return; - } - const OT::fvar &fvar = *font->face->table.fvar; auto axes = fvar.get_axes (); const unsigned coords_length = axes.length; @@ -2970,7 +3137,6 @@ hb_ot_var_normalize_coords (font->face, coords_length, design_coords, normalized); _hb_font_adopt_var_coords (font, normalized, design_coords, coords_length); - } /** @@ -2991,11 +3157,16 @@ void hb_font_set_var_coords_design (hb_font_t *font, const float *coords, - unsigned int coords_length) + unsigned int input_coords_length) { if (hb_object_is_immutable (font)) return; + const OT::fvar &fvar = *font->face->table.fvar; + auto axes = fvar.get_axes (); + const unsigned coords_length = axes.length; + + input_coords_length = hb_min (input_coords_length, coords_length); int *normalized = coords_length ? (int *) hb_calloc (coords_length, sizeof (int)) : nullptr; float *design_coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (float)) : nullptr; @@ -3006,8 +3177,11 @@ return; } - if (coords_length) - hb_memcpy (design_coords, coords, coords_length * sizeof (font->design_coords[0])); + if (input_coords_length) + hb_memcpy (design_coords, coords, input_coords_length * sizeof (font->design_coords[0])); + // Fill in the rest with default values + for (unsigned int i = input_coords_length; i < coords_length; i++) + design_coords[i] = axes[i].get_default (); hb_ot_var_normalize_coords (font->face, coords_length, coords, normalized); _hb_font_adopt_var_coords (font, normalized, design_coords, coords_length); @@ -3072,34 +3246,31 @@ void hb_font_set_var_coords_normalized (hb_font_t *font, const int *coords, /* 2.14 normalized */ - unsigned int coords_length) + unsigned int input_coords_length) { if (hb_object_is_immutable (font)) return; + const OT::fvar &fvar = *font->face->table.fvar; + auto axes = fvar.get_axes (); + unsigned coords_length = axes.length; + + input_coords_length = hb_min (input_coords_length, coords_length); int *copy = coords_length ? (int *) hb_calloc (coords_length, sizeof (coords[0])) : nullptr; - int *unmapped = coords_length ? (int *) hb_calloc (coords_length, sizeof (coords[0])) : nullptr; float *design_coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (design_coords[0])) : nullptr; - if (unlikely (coords_length && !(copy && unmapped && design_coords))) + if (unlikely (coords_length && !(copy && design_coords))) { hb_free (copy); - hb_free (unmapped); hb_free (design_coords); return; } - if (coords_length) - { - hb_memcpy (copy, coords, coords_length * sizeof (coords[0])); - hb_memcpy (unmapped, coords, coords_length * sizeof (coords[0])); - } + if (input_coords_length) + hb_memcpy (copy, coords, input_coords_length * sizeof (coords[0])); - /* Best effort design coords simulation */ - font->face->table.avar->unmap_coords (unmapped, coords_length); for (unsigned int i = 0; i < coords_length; ++i) - design_coords[i] = font->face->table.fvar->unnormalize_axis_value (i, unmapped[i]); - hb_free (unmapped); + design_coords[i] = NAN; _hb_font_adopt_var_coords (font, copy, design_coords, coords_length); } @@ -3112,8 +3283,8 @@ * Fetches the list of normalized variation coordinates currently * set on a font. * - * Note that this returned array may only contain values for some - * (or none) of the axes; omitted axes effectively have zero values. + * <note>Note that if no variation coordinates are set, this function may + * return %NULL.</note> * * Return value is valid as long as variation coordinates of the font * are not modified. @@ -3140,9 +3311,12 @@ * Fetches the list of variation coordinates (in design-space units) currently * set on a font. * - * Note that this returned array may only contain values for some - * (or none) of the axes; omitted axes effectively have their default - * values. + * <note>Note that if no variation coordinates are set, this function may + * return %NULL.</note> + * + * <note>If variations have been set on the font using normalized coordinates + * (i.e. via hb_font_set_var_coords_normalized()), the design coordinates will + * have NaN (Not a Number) values.</note> * * Return value is valid as long as variation coordinates of the font * are not modified. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-font.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-font.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-font.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-font.h 2026-04-17 19:08:13.000000000 +0000 @@ -97,7 +97,7 @@ * @descender: The depth of typographic descenders. * @line_gap: The suggested line-spacing gap. * - * Font-wide extent values, measured in font units. + * Font-wide extent values, measured in scaled units. * * Note that typically @ascender is positive and @descender * negative, in coordinate systems that grow up. @@ -332,7 +332,7 @@ * * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * - * This method should retrieve the (X,Y) coordinates (in font units) of the + * This method should retrieve the (X,Y) coordinates (in scaled units) of the * origin for a glyph. Each coordinate must be returned in an #hb_position_t * output parameter. * @@ -349,7 +349,7 @@ * * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * - * This method should retrieve the (X,Y) coordinates (in font units) of the + * This method should retrieve the (X,Y) coordinates (in scaled units) of the * origin for a glyph, for horizontal-direction text segments. Each * coordinate must be returned in an #hb_position_t output parameter. * @@ -361,7 +361,7 @@ * * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * - * This method should retrieve the (X,Y) coordinates (in font units) of the + * This method should retrieve the (X,Y) coordinates (in scaled units) of the * origin for a glyph, for vertical-direction text segments. Each coordinate * must be returned in an #hb_position_t output parameter. * @@ -369,6 +369,65 @@ typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; /** + * hb_font_get_glyph_origins_func_t: + * @font: #hb_font_t to work upon + * @font_data: @font user data pointer + * @first_glyph: The first glyph ID to query + * @count: number of glyphs to query + * @glyph_stride: The stride between successive glyph IDs + * @first_x: (out): The first origin X coordinate retrieved + * @x_stride: The stride between successive origin X coordinates + * @first_y: (out): The first origin Y coordinate retrieved + * @y_stride: The stride between successive origin Y coordinates + * @user_data: User data pointer passed by the caller + * + * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. + * + * This method should retrieve the (X,Y) coordinates (in scaled units) of the + * origin for each requested glyph. Each coordinate value must be returned in + * an #hb_position_t in the two output parameters. + * + * Return value: `true` if data found, `false` otherwise + * + * Since: 11.3.0 + **/ +typedef hb_bool_t (*hb_font_get_glyph_origins_func_t) (hb_font_t *font, void *font_data, + unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned glyph_stride, + hb_position_t *first_x, + unsigned x_stride, + hb_position_t *first_y, + unsigned y_stride, + void *user_data); + +/** + * hb_font_get_glyph_h_origins_func_t: + * + * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. + * + * This method should retrieve the (X,Y) coordinates (in scaled units) of the + * origin for requested glyph, for horizontal-direction text segments. Each + * coordinate must be returned in a the x/y #hb_position_t output parameters. + * + * Since: 11.3.0 + **/ +typedef hb_font_get_glyph_origins_func_t hb_font_get_glyph_h_origins_func_t; + +/** + * hb_font_get_glyph_v_origins_func_t: + * + * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. + * + * This method should retrieve the (X,Y) coordinates (in scaled units) of the + * origin for requested glyph, for vertical-direction text segments. Each + * coordinate must be returned in a the x/y #hb_position_t output parameters. + * + * Since: 11.3.0 + **/ +typedef hb_font_get_glyph_origins_func_t hb_font_get_glyph_v_origins_func_t; + +/** * hb_font_get_glyph_kerning_func_t: * @font: #hb_font_t to work upon * @font_data: @font user data pointer @@ -428,7 +487,7 @@ * * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * - * This method should retrieve the (X,Y) coordinates (in font units) for a + * This method should retrieve the (X,Y) coordinates (in scaled units) for a * specified contour point in a glyph. Each coordinate must be returned as * an #hb_position_t output parameter. * @@ -498,7 +557,7 @@ * * Return value: `true` if glyph was drawn, `false` otherwise * - * XSince: REPLACEME + * Since: 11.2.0 **/ typedef hb_bool_t (*hb_font_draw_glyph_or_fail_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, @@ -520,7 +579,7 @@ * * Return value: `true` if glyph was painted, `false` otherwise * - * XSince: REPLACEME + * Since: 11.2.0 */ typedef hb_bool_t (*hb_font_paint_glyph_or_fail_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, @@ -708,6 +767,38 @@ void *user_data, hb_destroy_func_t destroy); /** + * hb_font_funcs_set_glyph_h_origins_func: + * @ffuncs: A font-function structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: (nullable): The function to call when @user_data is not needed anymore + * + * Sets the implementation function for #hb_font_get_glyph_h_origins_func_t. + * + * Since: 11.3.0 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_h_origins_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_origins_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_origins_func: + * @ffuncs: A font-function structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: (nullable): The function to call when @user_data is not needed anymore + * + * Sets the implementation function for #hb_font_get_glyph_v_origins_func_t. + * + * Since: 11.3.0 + **/ +HB_EXTERN void +hb_font_funcs_set_glyph_v_origins_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_origins_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** * hb_font_funcs_set_glyph_h_kerning_func: * @ffuncs: A font-function structure * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @@ -796,7 +887,7 @@ * * Sets the implementation function for #hb_font_draw_glyph_or_fail_func_t. * - * XSince: REPLACEME + * Since: 11.2.0 **/ HB_EXTERN void hb_font_funcs_set_draw_glyph_or_fail_func (hb_font_funcs_t *ffuncs, @@ -812,7 +903,7 @@ * * Sets the implementation function for #hb_font_paint_glyph_or_fail_func_t. * - * XSince: REPLACEME + * Since: 11.2.0 */ HB_EXTERN void hb_font_funcs_set_paint_glyph_or_fail_func (hb_font_funcs_t *ffuncs, @@ -876,6 +967,26 @@ hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y); +HB_EXTERN hb_bool_t +hb_font_get_glyph_h_origins (hb_font_t *font, + unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned glyph_stride, + hb_position_t *first_x, + unsigned x_stride, + hb_position_t *first_y, + unsigned y_stride); + +HB_EXTERN hb_bool_t +hb_font_get_glyph_v_origins (hb_font_t *font, + unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned glyph_stride, + hb_position_t *first_x, + unsigned x_stride, + hb_position_t *first_y, + unsigned y_stride); + HB_EXTERN hb_position_t hb_font_get_glyph_h_kerning (hb_font_t *font, hb_codepoint_t left_glyph, hb_codepoint_t right_glyph); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-font.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-font.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-font.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-font.hh 2026-04-17 19:08:13.000000000 +0000 @@ -55,6 +55,8 @@ HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advances) \ HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_origin) \ HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_origin) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_origins) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_origins) \ HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_kerning) \ HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_kerning)) \ HB_FONT_FUNC_IMPLEMENT (get_,glyph_extents) \ @@ -118,6 +120,8 @@ int32_t x_scale; int32_t y_scale; + bool is_synthetic; + float x_embolden; float y_embolden; bool embolden_in_place; @@ -139,6 +143,7 @@ /* Font variation coordinates. */ unsigned int instance_index; + bool has_nonzero_coords; unsigned int num_coords; int *coords; float *design_coords; @@ -430,21 +435,127 @@ } hb_bool_t get_glyph_h_origin (hb_codepoint_t glyph, - hb_position_t *x, hb_position_t *y) + hb_position_t *x, hb_position_t *y, + bool synthetic = true) { *x = *y = 0; - return klass->get.f.glyph_h_origin (this, user_data, - glyph, x, y, - !klass->user_data ? nullptr : klass->user_data->glyph_h_origin); + bool ret = klass->get.f.glyph_h_origin (this, user_data, + glyph, x, y, + !klass->user_data ? nullptr : klass->user_data->glyph_h_origin); + + if (synthetic && ret) + { + /* Slant is ignored as it does not affect glyph origin */ + + /* Embolden */ + if (!embolden_in_place) + { + *x += x_scale < 0 ? -x_strength : x_strength; + *y += y_scale < 0 ? -y_strength : y_strength; + } + } + + return ret; } hb_bool_t get_glyph_v_origin (hb_codepoint_t glyph, - hb_position_t *x, hb_position_t *y) + hb_position_t *x, hb_position_t *y, + bool synthetic = true) { *x = *y = 0; - return klass->get.f.glyph_v_origin (this, user_data, - glyph, x, y, - !klass->user_data ? nullptr : klass->user_data->glyph_v_origin); + bool ret = klass->get.f.glyph_v_origin (this, user_data, + glyph, x, y, + !klass->user_data ? nullptr : klass->user_data->glyph_v_origin); + + if (synthetic && ret) + { + /* Slant is ignored as it does not affect glyph origin */ + + /* Embolden */ + if (!embolden_in_place) + { + *x += x_scale < 0 ? -x_strength : x_strength; + *y += y_scale < 0 ? -y_strength : y_strength; + } + } + + return ret; + } + + hb_bool_t get_glyph_h_origins (unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned int glyph_stride, + hb_position_t *first_x, + unsigned int x_stride, + hb_position_t *first_y, + unsigned int y_stride, + bool synthetic = true) + + { + bool ret = klass->get.f.glyph_h_origins (this, user_data, + count, + first_glyph, glyph_stride, + first_x, x_stride, first_y, y_stride, + !klass->user_data ? nullptr : klass->user_data->glyph_h_origins); + + if (synthetic && ret) + { + hb_position_t x_shift = x_scale < 0 ? -x_strength : x_strength; + hb_position_t y_shift = y_scale < 0 ? -y_strength : y_strength; + for (unsigned i = 0; i < count; i++) + { + /* Slant is ignored as it does not affect glyph origin */ + + /* Embolden */ + if (!embolden_in_place) + { + *first_x += x_shift; + *first_y += y_shift; + } + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + } + + return ret; + } + + hb_bool_t get_glyph_v_origins (unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned int glyph_stride, + hb_position_t *first_x, + unsigned int x_stride, + hb_position_t *first_y, + unsigned int y_stride, + bool synthetic = true) + + { + bool ret = klass->get.f.glyph_v_origins (this, user_data, + count, + first_glyph, glyph_stride, + first_x, x_stride, first_y, y_stride, + !klass->user_data ? nullptr : klass->user_data->glyph_v_origins); + + if (synthetic && is_synthetic && ret) + { + hb_position_t x_shift = x_scale < 0 ? -x_strength : x_strength; + hb_position_t y_shift = y_scale < 0 ? -y_strength : y_strength; + for (unsigned i = 0; i < count; i++) + { + /* Slant is ignored as it does not affect glyph origin */ + + /* Embolden */ + if (!embolden_in_place) + { + *first_x += x_shift; + *first_y += y_shift; + } + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + } + + return ret; } hb_position_t get_glyph_h_kerning (hb_codepoint_t left_glyph, @@ -486,7 +597,7 @@ extents, !klass->user_data ? nullptr : klass->user_data->glyph_extents); } - if (!is_synthetic () && + if (!is_synthetic && klass->get.f.glyph_extents (this, user_data, glyph, extents, @@ -496,6 +607,7 @@ /* Try getting extents from paint(), then draw(), *then* get_extents() * and apply synthetic settings in the last case. */ +#ifndef HB_NO_PAINT hb_paint_extents_context_t paint_extents; if (paint_glyph_or_fail (glyph, hb_paint_extents_get_funcs (), &paint_extents, @@ -504,14 +616,17 @@ *extents = paint_extents.get_extents ().to_glyph_extents (); return true; } +#endif - hb_extents_t draw_extents; +#ifndef HB_NO_DRAW + hb_extents_t<> draw_extents; if (draw_glyph_or_fail (glyph, hb_draw_extents_get_funcs (), &draw_extents)) { *extents = draw_extents.to_glyph_extents (); return true; } +#endif bool ret = klass->get.f.glyph_extents (this, user_data, glyph, @@ -575,6 +690,7 @@ hb_draw_funcs_t *draw_funcs, void *draw_data, bool synthetic = true) { +#ifndef HB_NO_DRAW #ifndef HB_NO_OUTLINE bool embolden = x_strength || y_strength; bool slanted = slant_xy; @@ -603,7 +719,13 @@ // Slant before embolden; produces nicer results. if (slanted) + { + hb_position_t xo = 0, yo = 0; + get_glyph_h_origin (glyph, &xo, &yo, false); + outline.translate (-xo, -yo); outline.slant (slant_xy); + outline.translate (xo, yo); + } if (embolden) { @@ -618,6 +740,8 @@ return true; #endif +#endif + return false; } bool paint_glyph_or_fail (hb_codepoint_t glyph, @@ -626,6 +750,7 @@ hb_color_t foreground, bool synthetic = true) { +#ifndef HB_NO_PAINT /* Slant */ if (synthetic && slant_xy) hb_paint_push_transform (paint_funcs, paint_data, @@ -643,6 +768,8 @@ hb_paint_pop_transform (paint_funcs, paint_data); return ret; +#endif + return false; } /* A bit higher-level, and with fallback */ @@ -704,6 +831,28 @@ get_glyph_v_advances (count, first_glyph, glyph_stride, first_advance, advance_stride); } + void apply_offset (hb_position_t *x, hb_position_t *y, + hb_position_t dx, hb_position_t dy, + signed mult) + { + assert (mult == -1 || mult == +1); + + *x += dx * mult; + *y += dy * mult; + } + void add_offset (hb_position_t *x, hb_position_t *y, + hb_position_t dx, hb_position_t dy) + { + *x += dx; + *y += dy; + } + void subtract_offset (hb_position_t *x, hb_position_t *y, + hb_position_t dx, hb_position_t dy) + { + *x -= dx; + *y -= dy; + } + void guess_v_origin_minus_h_origin (hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y) { @@ -714,6 +863,141 @@ *y = extents.ascender; } + void apply_glyph_h_origins_with_fallback (hb_buffer_t *buf, int mult) + { + bool has_ascender = false; + hb_position_t ascender = 0; + + struct { hb_position_t x, y; } origins[32]; + + unsigned int offset = 0; + unsigned int count = buf->len; + while (offset < count) + { + unsigned n = hb_min (count - offset, ARRAY_LENGTH (origins)); + if (!get_glyph_h_origins (n, + &buf->info[offset].codepoint, sizeof (hb_glyph_info_t), + &origins[0].x, sizeof (origins[0]), + &origins[0].y, sizeof (origins[0]))) + { + if (get_glyph_v_origins (n, + &buf->info[offset].codepoint, sizeof (hb_glyph_info_t), + &origins[0].x, sizeof (origins[0]), + &origins[0].y, sizeof (origins[0]))) + { + if (!has_ascender) + { + hb_font_extents_t extents; + get_h_extents_with_fallback (&extents); + ascender = extents.ascender; + has_ascender = true; + } + + /* We got the v_origins, adjust them to h_origins. */ + for (unsigned j = 0; j < n; j++) + { + hb_codepoint_t glyph = buf->info[offset + j].codepoint; + origins[j].x -= get_glyph_h_advance (glyph) / 2; + origins[j].y -= ascender; + } + } + else + { + for (unsigned j = 0; j < n; j++) + { + origins[j].x = 0; + origins[j].y = 0; + } + } + } + + assert (mult == -1 || mult == +1); + if (mult == +1) + for (unsigned j = 0; j < n; j++) + { + hb_glyph_position_t *pos = &buf->pos[offset + j]; + add_offset (&pos->x_offset, &pos->y_offset, + origins[j].x, origins[j].y); + } + else /* mult == -1 */ + for (unsigned j = 0; j < n; j++) + { + hb_glyph_position_t *pos = &buf->pos[offset + j]; + subtract_offset (&pos->x_offset, &pos->y_offset, + origins[j].x, origins[j].y); + } + + offset += n; + } + } + void apply_glyph_v_origins_with_fallback (hb_buffer_t *buf, int mult) + { + bool has_ascender = false; + hb_position_t ascender = 0; + + struct { hb_position_t x, y; } origins[32]; + + unsigned int offset = 0; + unsigned int count = buf->len; + while (offset < count) + { + unsigned n = hb_min (count - offset, ARRAY_LENGTH (origins)); + if (!get_glyph_v_origins (n, + &buf->info[offset].codepoint, sizeof (hb_glyph_info_t), + &origins[0].x, sizeof (origins[0]), + &origins[0].y, sizeof (origins[0]))) + { + if (get_glyph_h_origins (n, + &buf->info[offset].codepoint, sizeof (hb_glyph_info_t), + &origins[0].x, sizeof (origins[0]), + &origins[0].y, sizeof (origins[0]))) + { + if (!has_ascender) + { + hb_font_extents_t extents; + get_h_extents_with_fallback (&extents); + ascender = extents.ascender; + has_ascender = true; + } + + /* We got the h_origins, adjust them to v_origins. */ + for (unsigned j = 0; j < n; j++) + { + hb_codepoint_t glyph = buf->info[offset + j].codepoint; + origins[j].x += get_glyph_h_advance (glyph) / 2; + origins[j].y += ascender; + } + } + else + { + for (unsigned j = 0; j < n; j++) + { + origins[j].x = 0; + origins[j].y = 0; + } + } + } + + assert (mult == -1 || mult == +1); + if (mult == +1) + for (unsigned j = 0; j < n; j++) + { + hb_glyph_position_t *pos = &buf->pos[offset + j]; + add_offset (&pos->x_offset, &pos->y_offset, + origins[j].x, origins[j].y); + } + else /* mult == -1 */ + for (unsigned j = 0; j < n; j++) + { + hb_glyph_position_t *pos = &buf->pos[offset + j]; + subtract_offset (&pos->x_offset, &pos->y_offset, + origins[j].x, origins[j].y); + } + + offset += n; + } + } + void get_glyph_h_origin_with_fallback (hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y) { @@ -722,7 +1006,7 @@ { hb_position_t dx, dy; guess_v_origin_minus_h_origin (glyph, &dx, &dy); - *x -= dx; *y -= dy; + subtract_offset (x, y, dx, dy); } } void get_glyph_v_origin_with_fallback (hb_codepoint_t glyph, @@ -733,7 +1017,7 @@ { hb_position_t dx, dy; guess_v_origin_minus_h_origin (glyph, &dx, &dy); - *x += dx; *y += dy; + add_offset (x, y, dx, dy); } } @@ -747,68 +1031,38 @@ get_glyph_v_origin_with_fallback (glyph, x, y); } - void add_glyph_h_origin (hb_codepoint_t glyph, - hb_position_t *x, hb_position_t *y) + void add_glyph_h_origins (hb_buffer_t *buf) { - hb_position_t origin_x, origin_y; - - get_glyph_h_origin_with_fallback (glyph, &origin_x, &origin_y); - - *x += origin_x; - *y += origin_y; + apply_glyph_h_origins_with_fallback (buf, +1); } - void add_glyph_v_origin (hb_codepoint_t glyph, - hb_position_t *x, hb_position_t *y) + void add_glyph_v_origins (hb_buffer_t *buf) { - hb_position_t origin_x, origin_y; - - get_glyph_v_origin_with_fallback (glyph, &origin_x, &origin_y); - - *x += origin_x; - *y += origin_y; + apply_glyph_v_origins_with_fallback (buf, +1); } void add_glyph_origin_for_direction (hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y) { hb_position_t origin_x, origin_y; - get_glyph_origin_for_direction (glyph, direction, &origin_x, &origin_y); - - *x += origin_x; - *y += origin_y; + add_offset (x, y, origin_x, origin_y); } - void subtract_glyph_h_origin (hb_codepoint_t glyph, - hb_position_t *x, hb_position_t *y) + void subtract_glyph_h_origins (hb_buffer_t *buf) { - hb_position_t origin_x, origin_y; - - get_glyph_h_origin_with_fallback (glyph, &origin_x, &origin_y); - - *x -= origin_x; - *y -= origin_y; + apply_glyph_h_origins_with_fallback (buf, -1); } - void subtract_glyph_v_origin (hb_codepoint_t glyph, - hb_position_t *x, hb_position_t *y) + void subtract_glyph_v_origins (hb_buffer_t *buf) { - hb_position_t origin_x, origin_y; - - get_glyph_v_origin_with_fallback (glyph, &origin_x, &origin_y); - - *x -= origin_x; - *y -= origin_y; + apply_glyph_v_origins_with_fallback (buf, -1); } void subtract_glyph_origin_for_direction (hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y) { hb_position_t origin_x, origin_y; - get_glyph_origin_for_direction (glyph, direction, &origin_x, &origin_y); - - *x -= origin_x; - *y -= origin_y; + subtract_offset (x, y, origin_x, origin_y); } void get_glyph_kerning_for_direction (hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, @@ -890,11 +1144,6 @@ return false; } - bool is_synthetic () const - { - return x_embolden || y_embolden || slant; - } - void changed () { float upem = face->get_upem (); @@ -906,6 +1155,8 @@ bool y_neg = y_scale < 0; y_mult = (y_neg ? -((int64_t) -y_scale << 16) : ((int64_t) y_scale << 16)) / upem; + is_synthetic = x_embolden || y_embolden || slant; + x_strength = roundf (abs (x_scale) * x_embolden); y_strength = roundf (abs (y_scale) * y_embolden); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-free-pool.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-free-pool.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-free-pool.hh 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-free-pool.hh 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,107 @@ +/* + * Copyright © 2019 Facebook, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Facebook Author(s): Behdad Esfahbod + */ + +#ifndef HB_FREE_POOL_HH +#define HB_FREE_POOL_HH + +#include "hb.hh" + +/* Memory pool for persistent alloc/free of small objects. + * + * Some AI musings on this, not necessarily true: + * + * This is a very simple implementation, but it's good enough for our + * purposes. It's not thread-safe. It's not very fast. It's not + * very memory efficient. It's not very cache efficient. It's not + * very anything efficient. But it's simple and it works. And it's + * good enough for our purposes. If you need something more + * sophisticated, use a real allocator. Or use a real language. */ + +template <typename T, unsigned ChunkLen = 32> +struct hb_free_pool_t +{ + hb_free_pool_t () : next (nullptr) {} + ~hb_free_pool_t () + { + next = nullptr; + + + hb_iter (chunks) + | hb_apply (hb_free) + ; + } + + T* alloc () + { + if (unlikely (!next)) + { + if (unlikely (!chunks.alloc (chunks.length + 1))) return nullptr; + chunk_t *chunk = (chunk_t *) hb_malloc (sizeof (chunk_t)); + if (unlikely (!chunk)) return nullptr; + chunks.push (chunk); + next = chunk->thread (); + } + + T* obj = next; + next = * ((T**) next); + + hb_memset (obj, 0, sizeof (T)); + + return obj; + } + + void release (T* obj) + { + * (T**) obj = next; + next = obj; + } + + private: + + static_assert (ChunkLen > 1, ""); + static_assert (sizeof (T) >= sizeof (void *), ""); + static_assert (alignof (T) % alignof (void *) == 0, ""); + + struct chunk_t + { + T* thread () + { + for (unsigned i = 0; i < ARRAY_LENGTH (arrayZ) - 1; i++) + * (T**) &arrayZ[i] = &arrayZ[i + 1]; + + * (T**) &arrayZ[ARRAY_LENGTH (arrayZ) - 1] = nullptr; + + return arrayZ; + } + + T arrayZ[ChunkLen]; + }; + + T* next; + hb_vector_t<chunk_t *> chunks; +}; + + +#endif /* HB_FREE_POOL_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ft.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ft.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ft.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ft.cc 2026-04-17 19:08:13.000000000 +0000 @@ -143,6 +143,9 @@ /* hb_font changed, update FT_Face. */ static void _hb_ft_hb_font_changed (hb_font_t *font, FT_Face ft_face) { + if (unlikely (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy)) + return; + hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data; float x_mult = 1.f, y_mult = 1.f; @@ -184,12 +187,14 @@ FT_Set_Transform (ft_face, &matrix, nullptr); ft_font->transform = true; } + else + FT_Set_Transform (ft_face, nullptr, nullptr); #if defined(HAVE_FT_GET_VAR_BLEND_COORDINATES) && !defined(HB_NO_VAR) - unsigned int num_coords; - const float *coords = hb_font_get_var_coords_design (font, &num_coords); - if (num_coords) + if (font->has_nonzero_coords) { + unsigned int num_coords; + const float *coords = hb_font_get_var_coords_design (font, &num_coords); FT_Fixed *ft_coords = (FT_Fixed *) hb_calloc (num_coords, sizeof (FT_Fixed)); if (ft_coords) { @@ -199,6 +204,12 @@ hb_free (ft_coords); } } + else if (font->num_coords) + { + // Some old versions of FreeType crash if we + // call this function on non-variable fonts. + FT_Set_Var_Design_Coordinates (ft_face, 0, nullptr); + } #endif } @@ -1093,6 +1104,10 @@ FT_ULong length = 0; FT_Error error; + /* In new FreeType, a tag value of 1 loads the SFNT table directory. Reject it. */ + if (tag == 1) + return nullptr; + /* Note: FreeType like HarfBuzz uses the NONE tag for fetching the entire blob */ error = FT_Load_Sfnt_Table (ft_face, tag, 0, nullptr, &length); @@ -1366,7 +1381,7 @@ for (unsigned int i = 0; i < mm_var->num_axis; ++i) { - coords[i] = ft_coords[i] >>= 2; + coords[i] = (ft_coords[i] + 2) >> 2; nonzero = nonzero || coords[i]; } @@ -1717,7 +1732,12 @@ ft_face->generic.finalizer = _release_blob; // And the FT_Library to the blob - hb_blob_set_user_data (blob, &ft_library_key, ft_library, destroy_ft_library, true); + if (unlikely (!hb_blob_set_user_data (blob, &ft_library_key, ft_library, destroy_ft_library, true))) + { + DEBUG_MSG (FT, font, "hb_blob_set_user_data() failed"); + FT_Done_Face (ft_face); + return; + } _hb_ft_font_set_funcs (font, ft_face, true); hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-geometry.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-geometry.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-geometry.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-geometry.hh 2026-04-17 19:08:13.000000000 +0000 @@ -26,7 +26,10 @@ #include "hb.hh" +#include "hb-algs.hh" + +template <typename Float = float> struct hb_extents_t { hb_extents_t () {} @@ -35,7 +38,7 @@ ymin (hb_min (extents.y_bearing, extents.y_bearing + extents.height)), xmax (hb_max (extents.x_bearing, extents.x_bearing + extents.width)), ymax (hb_max (extents.y_bearing, extents.y_bearing + extents.height)) {} - hb_extents_t (float xmin, float ymin, float xmax, float ymax) : + hb_extents_t (Float xmin, Float ymin, Float xmax, Float ymax) : xmin (xmin), ymin (ymin), xmax (xmax), ymax (ymax) {} bool is_empty () const { return xmin >= xmax || ymin >= ymax; } @@ -69,7 +72,7 @@ } void - add_point (float x, float y) + add_point (Float x, Float y) { if (unlikely (is_void ())) { @@ -97,62 +100,69 @@ yneg ? y1 - y0 : y0 - y1}; } - float xmin = 0.f; - float ymin = 0.f; - float xmax = -1.f; - float ymax = -1.f; + Float xmin = 0; + Float ymin = 0; + Float xmax = -1; + Float ymax = -1; }; +template <typename Float = float> struct hb_transform_t { hb_transform_t () {} - hb_transform_t (float xx, float yx, - float xy, float yy, - float x0, float y0) : + hb_transform_t (Float xx, Float yx, + Float xy, Float yy, + Float x0, Float y0) : xx (xx), yx (yx), xy (xy), yy (yy), x0 (x0), y0 (y0) {} bool is_identity () const { - return xx == 1.f && yx == 0.f && - xy == 0.f && yy == 1.f && - x0 == 0.f && y0 == 0.f; + return xx == 1 && yx == 0 && + xy == 0 && yy == 1 && + x0 == 0 && y0 == 0; } - - void multiply (const hb_transform_t &o) + bool is_translation () const { - /* Copied from cairo, with "o" being "a" there and "this" being "b" there. */ - hb_transform_t r; - - r.xx = o.xx * xx + o.yx * xy; - r.yx = o.xx * yx + o.yx * yy; - - r.xy = o.xy * xx + o.yy * xy; - r.yy = o.xy * yx + o.yy * yy; - - r.x0 = o.x0 * xx + o.y0 * xy + x0; - r.y0 = o.x0 * yx + o.y0 * yy + y0; + return xx == 1 && yx == 0 && + xy == 0 && yy == 1; + } - *this = r; + void multiply (const hb_transform_t &o, bool before=false) + { + // Copied from cairo-matrix.c + const hb_transform_t &a = before ? o : *this; + const hb_transform_t &b = before ? *this : o; + *this = { + a.xx * b.xx + a.xy * b.yx, + a.yx * b.xx + a.yy * b.yx, + a.xx * b.xy + a.xy * b.yy, + a.yx * b.xy + a.yy * b.yy, + a.xx * b.x0 + a.xy * b.y0 + a.x0, + a.yx * b.x0 + a.yy * b.y0 + a.y0 + }; } - void transform_distance (float &dx, float &dy) const + HB_ALWAYS_INLINE + void transform_distance (Float &dx, Float &dy) const { - float new_x = xx * dx + xy * dy; - float new_y = yx * dx + yy * dy; + Float new_x = xx * dx + xy * dy; + Float new_y = yx * dx + yy * dy; dx = new_x; dy = new_y; } - void transform_point (float &x, float &y) const + HB_ALWAYS_INLINE + void transform_point (Float &x, Float &y) const { - transform_distance (x, y); - x += x0; - y += y0; + Float new_x = x0 + xx * x + xy * y; + Float new_y = y0 + yx * x + yy * y; + x = new_x; + y = new_y; } - void transform_extents (hb_extents_t &extents) const + void transform_extents (hb_extents_t<Float> &extents) const { - float quad_x[4], quad_y[4]; + Float quad_x[4], quad_y[4]; quad_x[0] = extents.xmin; quad_y[0] = extents.ymin; @@ -163,7 +173,7 @@ quad_x[3] = extents.xmax; quad_y[3] = extents.ymax; - extents = hb_extents_t {}; + extents = hb_extents_t<Float> {}; for (unsigned i = 0; i < 4; i++) { transform_point (quad_x[i], quad_y[i]); @@ -171,20 +181,36 @@ } } - void transform (const hb_transform_t &o) { multiply (o); } + void transform (const hb_transform_t &o, bool before=false) { multiply (o, before); } - void translate (float x, float y) + static hb_transform_t translation (Float x, Float y) { - if (x == 0.f && y == 0.f) - return; + return {1, 0, 0, 1, x, y}; + } + void translate (Float x, Float y, bool before=false) + { + if (before) + { + x0 += x; + y0 += y; + } + else + { + if (x == 0 && y == 0) + return; - x0 += xx * x + xy * y; - y0 += yx * x + yy * y; + x0 += xx * x + xy * y; + y0 += yx * x + yy * y; + } } - void scale (float scaleX, float scaleY) + static hb_transform_t scaling (Float scaleX, Float scaleY) + { + return {scaleX, 0, 0, scaleY, 0, 0}; + } + void scale (Float scaleX, Float scaleY) { - if (scaleX == 1.f && scaleY == 1.f) + if (scaleX == 1 && scaleY == 1) return; xx *= scaleX; @@ -192,52 +218,94 @@ xy *= scaleY; yy *= scaleY; } - - void rotate (float rotation) + static hb_transform_t scaling_around_center (Float scaleX, Float scaleY, Float center_x, Float center_y) + { + return {scaleX, 0, 0, scaleY, + center_x ? (1 - scaleX) * center_x : 0, + center_y ? (1 - scaleY) * center_y : 0}; + } + void scale_around_center (Float scaleX, Float scaleY, Float center_x, Float center_y) { - if (rotation == 0.f) + if (scaleX == 1 && scaleY == 1) return; + transform (scaling_around_center (scaleX, scaleY, center_x, center_y)); + } + + static hb_transform_t rotation (Float radians) + { // https://github.com/fonttools/fonttools/blob/f66ee05f71c8b57b5f519ee975e95edcd1466e14/Lib/fontTools/misc/transform.py#L240 - rotation = rotation * HB_PI; - float c; - float s; -#ifdef HAVE_SINCOSF - sincosf (rotation, &s, &c); -#else - c = cosf (rotation); - s = sinf (rotation); -#endif - auto other = hb_transform_t{c, s, -s, c, 0.f, 0.f}; - transform (other); + Float c; + Float s; + hb_sincos (radians, s, c); + return {c, s, -s, c, 0, 0}; + } + void rotate (Float radians, bool before=false) + { + if (radians == 0) + return; + + transform (rotation (radians), before); } - void skew (float skewX, float skewY) + static hb_transform_t rotation_around_center (Float radians, Float center_x, Float center_y) { - if (skewX == 0.f && skewY == 0.f) + Float s, c; + hb_sincos (radians, s, c); + return { + c, s, -s, c, + (1 - c) * center_x + s * center_y, + -s * center_x + (1 - c) * center_y + }; + } + void rotate_around_center (Float radians, Float center_x, Float center_y, bool before=false) + { + if (radians == 0) return; - // https://github.com/fonttools/fonttools/blob/f66ee05f71c8b57b5f519ee975e95edcd1466e14/Lib/fontTools/misc/transform.py#L255 - skewX = skewX * HB_PI; - skewY = skewY * HB_PI; - auto other = hb_transform_t{1.f, - skewY ? tanf (skewY) : 0.f, - skewX ? tanf (skewX) : 0.f, - 1.f, - 0.f, 0.f}; - transform (other); - } - - float xx = 1.f; - float yx = 0.f; - float xy = 0.f; - float yy = 1.f; - float x0 = 0.f; - float y0 = 0.f; + transform (rotation_around_center (radians, center_x, center_y), before); + } + + static hb_transform_t skewing (Float skewX, Float skewY) + { + return {1, skewY ? tanf (skewY) : 0, skewX ? tanf (skewX) : 0, 1, 0, 0}; + } + void skew (Float skewX, Float skewY) + { + if (skewX == 0 && skewY == 0) + return; + + transform (skewing (skewX, skewY)); + } + static hb_transform_t skewing_around_center (Float skewX, Float skewY, Float center_x, Float center_y) + { + skewX = skewX ? tanf (skewX) : 0; + skewY = skewY ? tanf (skewY) : 0; + return { + 1, skewY, skewX, 1, + center_y ? -skewX * center_y : 0, + center_x ? -skewY * center_x : 0 + }; + } + void skew_around_center (Float skewX, Float skewY, Float center_x, Float center_y) + { + if (skewX == 0 && skewY == 0) + return; + + transform (skewing_around_center (skewX, skewY, center_x, center_y)); + } + + Float xx = 1; + Float yx = 0; + Float xy = 0; + Float yy = 1; + Float x0 = 0; + Float y0 = 0; }; -#define HB_TRANSFORM_IDENTITY hb_transform_t{1.f, 0.f, 0.f, 1.f, 0.f, 0.f} +#define HB_TRANSFORM_IDENTITY {1, 0, 0, 1, 0, 0} +template <typename Float = float> struct hb_bounds_t { enum status_t { @@ -247,7 +315,7 @@ }; hb_bounds_t (status_t status = UNBOUNDED) : status (status) {} - hb_bounds_t (const hb_extents_t &extents) : + hb_bounds_t (const hb_extents_t<Float> &extents) : status (extents.is_empty () ? EMPTY : BOUNDED), extents (extents) {} void union_ (const hb_bounds_t &o) @@ -281,20 +349,21 @@ } status_t status; - hb_extents_t extents; + hb_extents_t<Float> extents; }; +template <typename Float = float> struct hb_transform_decomposed_t { - float translateX = 0; - float translateY = 0; - float rotation = 0; // in degrees, counter-clockwise - float scaleX = 1; - float scaleY = 1; - float skewX = 0; // in degrees, counter-clockwise - float skewY = 0; // in degrees, counter-clockwise - float tCenterX = 0; - float tCenterY = 0; + Float translateX = 0; + Float translateY = 0; + Float rotation = 0; // in radians, counter-clockwise + Float scaleX = 1; + Float scaleY = 1; + Float skewX = 0; // in radians, counter-clockwise + Float skewY = 0; // in radians, counter-clockwise + Float tCenterX = 0; + Float tCenterY = 0; operator bool () const { @@ -305,9 +374,9 @@ tCenterX || tCenterY; } - hb_transform_t to_transform () const + hb_transform_t<Float> to_transform () const { - hb_transform_t t; + hb_transform_t<Float> t; t.translate (translateX + tCenterX, translateY + tCenterY); t.rotate (rotation); t.scale (scaleX, scaleY); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-iter.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-iter.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-iter.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-iter.hh 2026-04-17 19:08:13.000000000 +0000 @@ -772,8 +772,9 @@ template <typename S2 = S> auto inc (hb_type_identity<S2> s, hb_priority<1>) - -> hb_void_t<decltype (hb_invoke (std::forward<S2> (s), hb_declval<T&> ()))> - { v = hb_invoke (std::forward<S2> (s), v); } + -> hb_void_t<decltype (hb_invoke (std::forward<hb_type_identity<S2>> (s), + hb_declval<T&> ()))> + { v = hb_invoke (std::forward<hb_type_identity<S2>> (s), v); } void inc (S s, hb_priority<0>) @@ -972,7 +973,7 @@ Proj&& f = hb_identity) const { for (auto it = hb_iter (c); it; ++it) - if (!hb_match (std::forward<Pred> (p), hb_get (std::forward<Proj> (f), *it))) + if (!hb_match (p, hb_get (f, *it))) return false; return true; } @@ -989,7 +990,7 @@ Proj&& f = hb_identity) const { for (auto it = hb_iter (c); it; ++it) - if (hb_match (std::forward<Pred> (p), hb_get (std::forward<Proj> (f), *it))) + if (hb_match (p, hb_get (f, *it))) return true; return false; } @@ -1006,7 +1007,7 @@ Proj&& f = hb_identity) const { for (auto it = hb_iter (c); it; ++it) - if (hb_match (std::forward<Pred> (p), hb_get (std::forward<Proj> (f), *it))) + if (hb_match (p, hb_get (f, *it))) return false; return true; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-kern.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-kern.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-kern.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-kern.hh 2026-04-17 19:08:13.000000000 +0000 @@ -70,7 +70,7 @@ continue; } - skippy_iter.reset (idx); + skippy_iter.reset_fast (idx); unsigned unsafe_to; if (!skippy_iter.next (&unsafe_to)) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-limits.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-limits.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-limits.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-limits.hh 2026-04-17 19:08:13.000000000 +0000 @@ -29,20 +29,20 @@ #ifndef HB_BUFFER_MAX_LEN_FACTOR -#define HB_BUFFER_MAX_LEN_FACTOR 64 +#define HB_BUFFER_MAX_LEN_FACTOR 256 #endif #ifndef HB_BUFFER_MAX_LEN_MIN -#define HB_BUFFER_MAX_LEN_MIN 16384 +#define HB_BUFFER_MAX_LEN_MIN 65536 #endif #ifndef HB_BUFFER_MAX_LEN_DEFAULT #define HB_BUFFER_MAX_LEN_DEFAULT 0x3FFFFFFF /* Shaping more than a billion chars? Let us know! */ #endif #ifndef HB_BUFFER_MAX_OPS_FACTOR -#define HB_BUFFER_MAX_OPS_FACTOR 1024 +#define HB_BUFFER_MAX_OPS_FACTOR 4096 #endif #ifndef HB_BUFFER_MAX_OPS_MIN -#define HB_BUFFER_MAX_OPS_MIN 16384 +#define HB_BUFFER_MAX_OPS_MIN 65536 #endif #ifndef HB_BUFFER_MAX_OPS_DEFAULT #define HB_BUFFER_MAX_OPS_DEFAULT 0x1FFFFFFF /* Shaping more than a billion operations? Let us know! */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-machinery.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-machinery.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-machinery.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-machinery.hh 2026-04-17 19:08:13.000000000 +0000 @@ -66,13 +66,22 @@ } /* StructAfter<T>(X) returns the struct T& that is placed after X. - * Works with X of variable size also. X must implement get_size() */ -template<typename Type, typename TObject> -static inline const Type& StructAfter(const TObject &X) -{ return StructAtOffset<Type>(&X, X.get_size()); } -template<typename Type, typename TObject> -static inline Type& StructAfter(TObject &X) -{ return StructAtOffset<Type>(&X, X.get_size()); } + * Works with X of variable size also. X must implement get_size(). + * Any extra arguments are forwarded to get_size, so for example + * it can work with UnsizedArrayOf<> as well. */ +template <typename Type, typename TObject, typename ...Ts> +static inline auto StructAfter(const TObject &X, Ts... args) HB_AUTO_RETURN(( + StructAtOffset<Type>(&X, X.get_size(std::forward<Ts> (args)...)) +)) +/* The is_const shenanigans is to avoid ambiguous overload with gcc-8. + * It disables this path when TObject is const. + * See: https://github.com/harfbuzz/harfbuzz/issues/5429 */ +template <typename Type, typename TObject, typename ...Ts> +static inline auto StructAfter(TObject &X, Ts... args) HB_AUTO_RETURN(( + sizeof(int[std::is_const<TObject>::value ? -1 : +1]) > 0 ? + StructAtOffset<Type>(&X, X.get_size(std::forward<Ts> (args)...)) + : *reinterpret_cast<Type*> (0) +)) /* @@ -132,7 +141,6 @@ DEFINE_SIZE_ARRAY(size, array) - /* * Lazy loaders. * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-map.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-map.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-map.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-map.hh 2026-04-17 19:08:13.000000000 +0000 @@ -47,11 +47,11 @@ hb_hashmap_t () { init (); } ~hb_hashmap_t () { fini (); } - hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () + void _copy (const hb_hashmap_t& o) { if (unlikely (!o.mask)) return; - if (item_t::is_trivial) + if (hb_is_trivially_copy_assignable (item_t)) { items = (item_t *) hb_malloc (sizeof (item_t) * (o.mask + 1)); if (unlikely (!items)) @@ -70,8 +70,16 @@ alloc (o.population); hb_copy (o, *this); } + + hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () { _copy (o); } + hb_hashmap_t& operator= (const hb_hashmap_t& o) + { + reset (); + if (!items) { _copy (o); return *this; } + alloc (o.population); hb_copy (o, *this); return *this; + } + hb_hashmap_t (hb_hashmap_t&& o) noexcept : hb_hashmap_t () { hb_swap (*this, o); } - hb_hashmap_t& operator= (const hb_hashmap_t& o) { reset (); alloc (o.population); hb_copy (o, *this); return *this; } hb_hashmap_t& operator= (hb_hashmap_t&& o) noexcept { hb_swap (*this, o); return *this; } hb_hashmap_t (std::initializer_list<hb_pair_t<K, V>> lst) : hb_hashmap_t () @@ -130,10 +138,7 @@ uint32_t total_hash () const { return (hash * 31u) + hb_hash (value); } - static constexpr bool is_trivial = hb_is_trivially_constructible(K) && - hb_is_trivially_destructible(K) && - hb_is_trivially_constructible(V) && - hb_is_trivially_destructible(V); + static constexpr bool is_trivially_constructible = (hb_is_trivially_constructible(K) && hb_is_trivially_constructible(V)); }; hb_object_header_t header; @@ -174,19 +179,19 @@ if (likely (items)) { unsigned size = mask + 1; - if (!item_t::is_trivial) - for (unsigned i = 0; i < size; i++) - items[i].~item_t (); + for (unsigned i = 0; i < size; i++) + items[i].~item_t (); hb_free (items); items = nullptr; } population = occupancy = 0; } - void reset () + hb_hashmap_t& reset () { successful = true; clear (); + return *this; } bool in_error () const { return !successful; } @@ -197,7 +202,7 @@ if (new_population != 0 && (new_population + new_population / 2) < mask) return true; - unsigned int power = hb_bit_storage (hb_max ((unsigned) population, new_population) * 2 + 8); + unsigned int power = hb_bit_storage (hb_max (hb_max ((unsigned) population, new_population) * 2, 4u)); unsigned int new_size = 1u << power; item_t *new_items = (item_t *) hb_malloc ((size_t) new_size * sizeof (item_t)); if (unlikely (!new_items)) @@ -205,7 +210,7 @@ successful = false; return false; } - if (!item_t::is_trivial) + if (!item_t::is_trivially_constructible) for (auto &_ : hb_iter (new_items, new_size)) new (&_) item_t (); else @@ -231,9 +236,8 @@ std::move (old_items[i].value)); } } - if (!item_t::is_trivial) - for (unsigned int i = 0; i < old_size; i++) - old_items[i].~item_t (); + for (unsigned int i = 0; i < old_size; i++) + old_items[i].~item_t (); hb_free (old_items); @@ -335,7 +339,13 @@ bool has (const K &key, VV **vp = nullptr) const { if (!items) return false; - auto *item = fetch_item (key, hb_hash (key)); + return has_with_hash (key, hb_hash (key), vp); + } + template <typename VV=V> + bool has_with_hash (const K &key, uint32_t hash, VV **vp = nullptr) const + { + if (!items) return false; + auto *item = fetch_item (key, hash); if (item) { if (vp) *vp = std::addressof (item->value); @@ -481,10 +491,17 @@ /* Sink interface. */ hb_hashmap_t& operator << (const hb_pair_t<K, V>& v) { set (v.first, v.second); return *this; } + template <typename V2 = V, + hb_enable_if (!hb_is_trivially_copyable (V2))> hb_hashmap_t& operator << (const hb_pair_t<K, V&&>& v) { set (v.first, std::move (v.second)); return *this; } + template <typename K2 = K, + hb_enable_if (!hb_is_trivially_copyable (K2))> hb_hashmap_t& operator << (const hb_pair_t<K&&, V>& v) { set (std::move (v.first), v.second); return *this; } + template <typename K2 = K, typename V2 = V, + hb_enable_if (!hb_is_trivially_copyable (K2) && + !hb_is_trivially_copyable (V2))> hb_hashmap_t& operator << (const hb_pair_t<K&&, V&&>& v) { set (std::move (v.first), std::move (v.second)); return *this; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-number-parser.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-number-parser.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-number-parser.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-number-parser.hh 2026-04-17 19:08:13.000000000 +0000 @@ -31,7 +31,7 @@ #include "hb.hh" -#line 35 "hb-number-parser.hh" +#line 32 "hb-number-parser.hh" static const unsigned char _double_parser_trans_keys[] = { 0u, 0u, 43u, 57u, 46u, 57u, 48u, 57u, 43u, 57u, 48u, 57u, 48u, 101u, 48u, 57u, 46u, 101u, 0 @@ -135,12 +135,12 @@ int cs; -#line 139 "hb-number-parser.hh" +#line 132 "hb-number-parser.hh" { cs = double_parser_start; } -#line 144 "hb-number-parser.hh" +#line 135 "hb-number-parser.hh" { int _slen; int _trans; @@ -198,7 +198,7 @@ exp_overflow = true; } break; -#line 202 "hb-number-parser.hh" +#line 187 "hb-number-parser.hh" } _again: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-open-file.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-open-file.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-open-file.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-open-file.hh 2026-04-17 19:08:13.000000000 +0000 @@ -465,11 +465,11 @@ Typ1Tag = HB_TAG ('t','y','p','1') /* Obsolete Apple Type1 font in SFNT container */ }; - hb_tag_t get_tag () const { return u.tag; } + hb_tag_t get_tag () const { return u.tag.v; } unsigned int get_face_count () const { - switch (u.tag) { + switch (u.tag.v) { case CFFTag: /* All the non-collection tags */ case TrueTag: case Typ1Tag: @@ -483,7 +483,7 @@ { if (base_offset) *base_offset = 0; - switch (u.tag) { + switch (u.tag.v) { /* Note: for non-collection SFNT data we ignore index. This is because * Apple dfont container is a container of SFNT's. So each SFNT is a * non-TTC, but the index is more than zero. */ @@ -512,9 +512,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (unlikely (!u.tag.sanitize (c))) return_trace (false); + if (unlikely (!u.tag.v.sanitize (c))) return_trace (false); hb_barrier (); - switch (u.tag) { + switch (u.tag.v) { case CFFTag: /* All the non-collection tags */ case TrueTag: case Typ1Tag: @@ -527,13 +527,13 @@ protected: union { - Tag tag; /* 4-byte identifier. */ + struct { Tag v; } tag; /* 4-byte identifier. */ OpenTypeFontFace fontFace; TTCHeader ttcHeader; ResourceForkHeader rfHeader; } u; public: - DEFINE_SIZE_UNION (4, tag); + DEFINE_SIZE_UNION (4, tag.v); }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-open-type.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-open-type.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-open-type.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-open-type.hh 2026-04-17 19:08:13.000000000 +0000 @@ -54,35 +54,41 @@ */ /* Integer types in big-endian order and no alignment requirement */ -template <typename Type, +template <bool BE, + typename Type, unsigned int Size = sizeof (Type)> -struct IntType +struct NumType { typedef Type type; - - IntType () = default; - explicit constexpr IntType (Type V) : v {V} {} - IntType& operator = (Type i) { v = i; return *this; } /* For reason we define cast out operator for signed/unsigned, instead of Type, see: * https://github.com/harfbuzz/harfbuzz/pull/2875/commits/09836013995cab2b9f07577a179ad7b024130467 */ - operator typename std::conditional<std::is_signed<Type>::value, signed, unsigned>::type () const { return v; } - - bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; } - bool operator != (const IntType &o) const { return !(*this == o); } - - IntType& operator += (unsigned count) { *this = *this + count; return *this; } - IntType& operator -= (unsigned count) { *this = *this - count; return *this; } - IntType& operator ++ () { *this += 1; return *this; } - IntType& operator -- () { *this -= 1; return *this; } - IntType operator ++ (int) { IntType c (*this); ++*this; return c; } - IntType operator -- (int) { IntType c (*this); --*this; return c; } + typedef typename std::conditional<std::is_integral<Type>::value && sizeof (Type) <= sizeof(int), + typename std::conditional<std::is_signed<Type>::value, signed, unsigned>::type, + Type>::type WideType; + + NumType () = default; + explicit constexpr NumType (Type V) : v {V} {} + NumType& operator = (Type V) { v = V; return *this; } + + operator WideType () const { return v; } + + bool operator == (const NumType &o) const { return (Type) v == (Type) o.v; } + bool operator != (const NumType &o) const { return !(*this == o); } + + NumType& operator += (WideType count) { *this = *this + count; return *this; } + NumType& operator -= (WideType count) { *this = *this - count; return *this; } + NumType& operator ++ () { *this += 1; return *this; } + NumType& operator -- () { *this -= 1; return *this; } + NumType operator ++ (int) { NumType c (*this); ++*this; return c; } + NumType operator -- (int) { NumType c (*this); --*this; return c; } - HB_INTERNAL static int cmp (const IntType *a, const IntType *b) + uint32_t hash () const { return hb_array ((const char *) &v, sizeof (v)).hash (); } + HB_INTERNAL static int cmp (const NumType *a, const NumType *b) { return b->cmp (*a); } HB_INTERNAL static int cmp (const void *a, const void *b) { - IntType *pa = (IntType *) a; - IntType *pb = (IntType *) b; + NumType *pa = (NumType *) a; + NumType *pb = (NumType *) b; return pb->cmp (*pa); } @@ -99,20 +105,36 @@ return_trace (c->check_struct (this)); } protected: - BEInt<Type, Size> v; + typename std::conditional<std::is_integral<Type>::value, + HBInt<BE, Type, Size>, + HBFloat<BE, Type, Size>>::type v; public: DEFINE_SIZE_STATIC (Size); }; -typedef IntType<uint8_t> HBUINT8; /* 8-bit unsigned integer. */ -typedef IntType<int8_t> HBINT8; /* 8-bit signed integer. */ -typedef IntType<uint16_t> HBUINT16; /* 16-bit unsigned integer. */ -typedef IntType<int16_t> HBINT16; /* 16-bit signed integer. */ -typedef IntType<uint32_t> HBUINT32; /* 32-bit unsigned integer. */ -typedef IntType<int32_t> HBINT32; /* 32-bit signed integer. */ +typedef NumType<true, uint8_t> HBUINT8; /* 8-bit big-endian unsigned integer. */ +typedef NumType<true, int8_t> HBINT8; /* 8-bit big-endian signed integer. */ +typedef NumType<true, uint16_t> HBUINT16; /* 16-bit big-endian unsigned integer. */ +typedef NumType<true, int16_t> HBINT16; /* 16-bit big-endian signed integer. */ +typedef NumType<true, uint32_t> HBUINT32; /* 32-bit big-endian unsigned integer. */ +typedef NumType<true, int32_t> HBINT32; /* 32-bit big-endian signed integer. */ +typedef NumType<true, uint64_t> HBUINT64; /* 64-bit big-endian unsigned integer. */ +typedef NumType<true, int64_t> HBINT64; /* 64-bit big-endian signed integer. */ /* Note: we cannot defined a signed HBINT24 because there's no corresponding C type. * Works for unsigned, but not signed, since we rely on compiler for sign-extension. */ -typedef IntType<uint32_t, 3> HBUINT24; /* 24-bit unsigned integer. */ +typedef NumType<true, uint32_t, 3> HBUINT24; /* 24-bit big-endian unsigned integer. */ + +typedef NumType<false, uint16_t> HBUINT16LE; /* 16-bit little-endian unsigned integer. */ +typedef NumType<false, int16_t> HBINT16LE; /* 16-bit little-endian signed integer. */ +typedef NumType<false, uint32_t> HBUINT32LE; /* 32-bit little-endian unsigned integer. */ +typedef NumType<false, int32_t> HBINT32LE; /* 32-bit little-endian signed integer. */ +typedef NumType<false, uint64_t> HBUINT64LE; /* 64-bit little-endian unsigned integer. */ +typedef NumType<false, int64_t> HBINT64LE; /* 64-bit little-endian signed integer. */ + +typedef NumType<true, float> HBFLOAT32BE; /* 32-bit little-endian floating point number. */ +typedef NumType<true, double> HBFLOAT64BE; /* 64-bit little-endian floating point number. */ +typedef NumType<false, float> HBFLOAT32LE; /* 32-bit little-endian floating point number. */ +typedef NumType<false, double> HBFLOAT64LE; /* 64-bit little-endian floating point number. */ /* 15-bit unsigned number; top bit used for extension. */ struct HBUINT15 : HBUINT16 @@ -218,7 +240,7 @@ template <typename Type, unsigned fraction_bits> struct HBFixed : Type { - static constexpr float shift = (float) (1 << fraction_bits); + static constexpr float mult = 1.f / (1 << fraction_bits); static_assert (Type::static_size * 8 > fraction_bits, ""); operator signed () const = delete; @@ -226,8 +248,8 @@ explicit operator float () const { return to_float (); } typename Type::type to_int () const { return Type::v; } void set_int (typename Type::type i ) { Type::v = i; } - float to_float (float offset = 0) const { return ((int32_t) Type::v + offset) / shift; } - void set_float (float f) { Type::v = roundf (f * shift); } + float to_float (float offset = 0) const { return ((int32_t) Type::v + offset) * mult; } + void set_float (float f) { Type::v = roundf (f / mult); } public: DEFINE_SIZE_STATIC (Type::static_size); }; @@ -504,16 +526,9 @@ return_trace (sanitize_shallow (c, base) && hb_barrier () && (this->is_null () || - c->dispatch (StructAtOffset<Type> (base, *this), std::forward<Ts> (ds)...) || - neuter (c))); + c->dispatch (StructAtOffset<Type> (base, *this), std::forward<Ts> (ds)...))); } - /* Set the offset to Null */ - bool neuter (hb_sanitize_context_t *c) const - { - if (!has_null) return false; - return c->try_set (this, 0); - } DEFINE_SIZE_STATIC (sizeof (OffsetType)); }; /* Partial specializations. */ @@ -1481,8 +1496,8 @@ VALUE_RUN_COUNT_MASK = 0x3F }; - static unsigned compile (hb_array_t<const int> values, /* IN */ - hb_array_t<unsigned char> encoded_bytes /* OUT */) + static unsigned compile_unsafe (hb_array_t<const int> values, /* IN */ + unsigned char *encoded_bytes /* OUT */) { unsigned num_values = values.length; unsigned encoded_len = 0; @@ -1491,24 +1506,23 @@ { int val = values.arrayZ[i]; if (val == 0) - encoded_len += encode_value_run_as_zeroes (i, encoded_bytes.sub_array (encoded_len), values); - else if (val >= -128 && val <= 127) - encoded_len += encode_value_run_as_bytes (i, encoded_bytes.sub_array (encoded_len), values); - else if (val >= -32768 && val <= 32767) - encoded_len += encode_value_run_as_words (i, encoded_bytes.sub_array (encoded_len), values); + encoded_len += encode_value_run_as_zeroes (i, encoded_bytes + encoded_len, values); + else if ((int8_t) val == val) + encoded_len += encode_value_run_as_bytes (i, encoded_bytes + encoded_len, values); + else if ((int16_t) val == val) + encoded_len += encode_value_run_as_words (i, encoded_bytes + encoded_len, values); else - encoded_len += encode_value_run_as_longs (i, encoded_bytes.sub_array (encoded_len), values); + encoded_len += encode_value_run_as_longs (i, encoded_bytes + encoded_len, values); } return encoded_len; } static unsigned encode_value_run_as_zeroes (unsigned& i, - hb_array_t<unsigned char> encoded_bytes, + unsigned char *it, hb_array_t<const int> values) { unsigned num_values = values.length; unsigned run_length = 0; - auto it = encoded_bytes.iter (); unsigned encoded_len = 0; while (i < num_values && values.arrayZ[i] == 0) { @@ -1532,7 +1546,7 @@ } static unsigned encode_value_run_as_bytes (unsigned &i, - hb_array_t<unsigned char> encoded_bytes, + unsigned char *it, hb_array_t<const int> values) { unsigned start = i; @@ -1540,7 +1554,7 @@ while (i < num_values) { int val = values.arrayZ[i]; - if (val > 127 || val < -128) + if ((int8_t) val != val) break; /* from fonttools: if there're 2 or more zeros in a sequence, @@ -1553,7 +1567,6 @@ unsigned run_length = i - start; unsigned encoded_len = 0; - auto it = encoded_bytes.iter (); while (run_length >= 64) { @@ -1561,10 +1574,9 @@ encoded_len++; for (unsigned j = 0; j < 64; j++) - { - *it++ = static_cast<char> (values.arrayZ[start + j]); - encoded_len++; - } + it[j] = static_cast<char> (values.arrayZ[start + j]); + it += 64; + encoded_len += 64; start += 64; run_length -= 64; @@ -1575,18 +1587,16 @@ *it++ = (VALUES_ARE_BYTES | (run_length - 1)); encoded_len++; - while (start < i) - { - *it++ = static_cast<char> (values.arrayZ[start++]); - encoded_len++; - } + for (unsigned j = 0; j < run_length; j++) + it[j] = static_cast<char> (values.arrayZ[start + j]); + encoded_len += run_length; } return encoded_len; } static unsigned encode_value_run_as_words (unsigned &i, - hb_array_t<unsigned char> encoded_bytes, + unsigned char *it, hb_array_t<const int> values) { unsigned start = i; @@ -1595,22 +1605,24 @@ { int val = values.arrayZ[i]; - /* start a new run for a single zero value*/ + if ((int16_t) val != val) + break; + + /* start a new run for a single zero value. */ if (val == 0) break; - /* from fonttools: continue word-encoded run if there's only one + /* From fonttools: continue word-encoded run if there's only one * single value in the range [-128, 127] because it is more compact. * Only start a new run when there're 2 continuous such values. */ - if (val >= -128 && val <= 127 && + if ((int8_t) val == val && i + 1 < num_values && - values.arrayZ[i+1] >= -128 && values.arrayZ[i+1] <= 127) + (int8_t) values.arrayZ[i+1] == values.arrayZ[i+1]) break; i++; } unsigned run_length = i - start; - auto it = encoded_bytes.iter (); unsigned encoded_len = 0; while (run_length >= 64) { @@ -1647,7 +1659,7 @@ } static unsigned encode_value_run_as_longs (unsigned &i, - hb_array_t<unsigned char> encoded_bytes, + unsigned char *it, hb_array_t<const int> values) { unsigned start = i; @@ -1656,14 +1668,13 @@ { int val = values.arrayZ[i]; - if (val >= -32768 && val <= 32767) + if ((int16_t) val == val) break; i++; } unsigned run_length = i - start; - auto it = encoded_bytes.iter (); unsigned encoded_len = 0; while (run_length >= 64) { @@ -1704,10 +1715,14 @@ } template <typename T> +#ifndef HB_OPTIMIZE_SIZE + HB_ALWAYS_INLINE +#endif static bool decompile (const HBUINT8 *&p /* IN/OUT */, hb_vector_t<T> &values /* IN/OUT */, const HBUINT8 *end, - bool consume_all = false) + bool consume_all = false, + unsigned start = 0) { unsigned i = 0; unsigned count = consume_all ? UINT_MAX : values.length; @@ -1720,19 +1735,24 @@ unsigned run_count = (control & VALUE_RUN_COUNT_MASK) + 1; if (consume_all) { - if (unlikely (!values.resize (values.length + run_count, false))) + if (unlikely (!values.resize_dirty (values.length + run_count))) return false; } unsigned stop = i + run_count; if (unlikely (stop > count)) return false; + + unsigned skip = i < start ? hb_min (start - i, run_count) : 0; + i += skip; + if ((control & VALUES_SIZE_MASK) == VALUES_ARE_ZEROS) { - for (; i < stop; i++) - values.arrayZ[i] = 0; + hb_memset (&values.arrayZ[i], 0, (stop - i) * sizeof (T)); + i = stop; } else if ((control & VALUES_SIZE_MASK) == VALUES_ARE_WORDS) { if (unlikely (p + run_count * HBINT16::static_size > end)) return false; + p += skip * HBINT16::static_size; #ifndef HB_OPTIMIZE_SIZE for (; i + 3 < stop; i += 4) { @@ -1755,6 +1775,7 @@ else if ((control & VALUES_SIZE_MASK) == VALUES_ARE_LONGS) { if (unlikely (p + run_count * HBINT32::static_size > end)) return false; + p += skip * HBINT32::static_size; for (; i < stop; i++) { values.arrayZ[i] = * (const HBINT32 *) p; @@ -1764,6 +1785,7 @@ else if ((control & VALUES_SIZE_MASK) == VALUES_ARE_BYTES) { if (unlikely (p + run_count > end)) return false; + p += skip * HBINT8::static_size; #ifndef HB_OPTIMIZE_SIZE for (; i + 3 < stop; i += 4) { @@ -1784,7 +1806,7 @@ { iter_t (const unsigned char *p_, unsigned len_) : p (p_), endp (p_ + len_) - { if (ensure_run ()) read_value (); } + { if (likely (ensure_run ())) read_value (); } private: const unsigned char *p; @@ -1793,10 +1815,14 @@ signed run_count = 0; unsigned width = 0; + HB_ALWAYS_INLINE bool ensure_run () { if (likely (run_count > 0)) return true; - + return _ensure_run (); + } + bool _ensure_run () + { if (unlikely (p >= endp)) { run_count = 0; @@ -1886,10 +1912,15 @@ signed run_count = 0; unsigned width = 0; + HB_ALWAYS_INLINE bool ensure_run () { - if (run_count > 0) return true; + if (likely (run_count > 0)) return true; + return _ensure_run (); + } + bool _ensure_run () + { if (unlikely (p >= end)) { run_count = 0; @@ -2013,7 +2044,10 @@ } #ifndef HB_OPTIMIZE_SIZE - if (scale == 1.0f) + // The following branch is supposed to speed things up by avoiding + // the multiplication in _add_to<> if scale is 1.0f. + // But in practice it seems to bloat the code and slow things down. + if (false && scale == 1.0f) _add_to<false> (out); else #endif @@ -2038,6 +2072,23 @@ }; +// Alignment + +template <unsigned int alignment> +struct Align +{ + unsigned get_size (const void *base) const + { + unsigned offset = (const char *) this - (const char *) base; + return (alignment - offset) & (alignment - 1); + } + + public: + DEFINE_SIZE_MIN (0); +}; + + + } /* namespace OT */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff-common.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff-common.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff-common.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff-common.hh 2026-04-17 19:08:13.000000000 +0000 @@ -79,7 +79,7 @@ { TRACE_SERIALIZE (this); for (unsigned int i = 0; i < dictval.get_count (); i++) - if (unlikely (!opszr.serialize (c, dictval[i], std::forward<Ts> (ds)...))) + if (unlikely (!opszr.serialize (c, dictval[i], ds...))) return_trace (false); return_trace (true); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-std-str.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-std-str.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-std-str.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-std-str.hh 2026-04-17 19:08:13.000000000 +0000 @@ -30,396 +30,396 @@ #include "hb.hh" #endif -_S(".notdef") -_S("space") -_S("exclam") -_S("quotedbl") -_S("numbersign") -_S("dollar") -_S("percent") -_S("ampersand") -_S("quoteright") -_S("parenleft") -_S("parenright") -_S("asterisk") -_S("plus") -_S("comma") -_S("hyphen") -_S("period") -_S("slash") -_S("zero") -_S("one") -_S("two") -_S("three") -_S("four") -_S("five") -_S("six") -_S("seven") -_S("eight") -_S("nine") -_S("colon") -_S("semicolon") -_S("less") -_S("equal") -_S("greater") -_S("question") -_S("at") -_S("A") -_S("B") -_S("C") -_S("D") -_S("E") -_S("F") -_S("G") -_S("H") -_S("I") -_S("J") -_S("K") -_S("L") -_S("M") -_S("N") -_S("O") -_S("P") -_S("Q") -_S("R") -_S("S") -_S("T") -_S("U") -_S("V") -_S("W") -_S("X") -_S("Y") -_S("Z") -_S("bracketleft") -_S("backslash") -_S("bracketright") -_S("asciicircum") -_S("underscore") -_S("quoteleft") -_S("a") -_S("b") -_S("c") -_S("d") -_S("e") -_S("f") -_S("g") -_S("h") -_S("i") -_S("j") -_S("k") -_S("l") -_S("m") -_S("n") -_S("o") -_S("p") -_S("q") -_S("r") -_S("s") -_S("t") -_S("u") -_S("v") -_S("w") -_S("x") -_S("y") -_S("z") -_S("braceleft") -_S("bar") -_S("braceright") -_S("asciitilde") -_S("exclamdown") -_S("cent") -_S("sterling") -_S("fraction") -_S("yen") -_S("florin") -_S("section") -_S("currency") -_S("quotesingle") -_S("quotedblleft") -_S("guillemotleft") -_S("guilsinglleft") -_S("guilsinglright") -_S("fi") -_S("fl") -_S("endash") -_S("dagger") -_S("daggerdbl") -_S("periodcentered") -_S("paragraph") -_S("bullet") -_S("quotesinglbase") -_S("quotedblbase") -_S("quotedblright") -_S("guillemotright") -_S("ellipsis") -_S("perthousand") -_S("questiondown") -_S("grave") -_S("acute") -_S("circumflex") -_S("tilde") -_S("macron") -_S("breve") -_S("dotaccent") -_S("dieresis") -_S("ring") -_S("cedilla") -_S("hungarumlaut") -_S("ogonek") -_S("caron") -_S("emdash") -_S("AE") -_S("ordfeminine") -_S("Lslash") -_S("Oslash") -_S("OE") -_S("ordmasculine") -_S("ae") -_S("dotlessi") -_S("lslash") -_S("oslash") -_S("oe") -_S("germandbls") -_S("onesuperior") -_S("logicalnot") -_S("mu") -_S("trademark") -_S("Eth") -_S("onehalf") -_S("plusminus") -_S("Thorn") -_S("onequarter") -_S("divide") -_S("brokenbar") -_S("degree") -_S("thorn") -_S("threequarters") -_S("twosuperior") -_S("registered") -_S("minus") -_S("eth") -_S("multiply") -_S("threesuperior") -_S("copyright") -_S("Aacute") -_S("Acircumflex") -_S("Adieresis") -_S("Agrave") -_S("Aring") -_S("Atilde") -_S("Ccedilla") -_S("Eacute") -_S("Ecircumflex") -_S("Edieresis") -_S("Egrave") -_S("Iacute") -_S("Icircumflex") -_S("Idieresis") -_S("Igrave") -_S("Ntilde") -_S("Oacute") -_S("Ocircumflex") -_S("Odieresis") -_S("Ograve") -_S("Otilde") -_S("Scaron") -_S("Uacute") -_S("Ucircumflex") -_S("Udieresis") -_S("Ugrave") -_S("Yacute") -_S("Ydieresis") -_S("Zcaron") -_S("aacute") -_S("acircumflex") -_S("adieresis") -_S("agrave") -_S("aring") -_S("atilde") -_S("ccedilla") -_S("eacute") -_S("ecircumflex") -_S("edieresis") -_S("egrave") -_S("iacute") -_S("icircumflex") -_S("idieresis") -_S("igrave") -_S("ntilde") -_S("oacute") -_S("ocircumflex") -_S("odieresis") -_S("ograve") -_S("otilde") -_S("scaron") -_S("uacute") -_S("ucircumflex") -_S("udieresis") -_S("ugrave") -_S("yacute") -_S("ydieresis") -_S("zcaron") -_S("exclamsmall") -_S("Hungarumlautsmall") -_S("dollaroldstyle") -_S("dollarsuperior") -_S("ampersandsmall") -_S("Acutesmall") -_S("parenleftsuperior") -_S("parenrightsuperior") -_S("twodotenleader") -_S("onedotenleader") -_S("zerooldstyle") -_S("oneoldstyle") -_S("twooldstyle") -_S("threeoldstyle") -_S("fouroldstyle") -_S("fiveoldstyle") -_S("sixoldstyle") -_S("sevenoldstyle") -_S("eightoldstyle") -_S("nineoldstyle") -_S("commasuperior") -_S("threequartersemdash") -_S("periodsuperior") -_S("questionsmall") -_S("asuperior") -_S("bsuperior") -_S("centsuperior") -_S("dsuperior") -_S("esuperior") -_S("isuperior") -_S("lsuperior") -_S("msuperior") -_S("nsuperior") -_S("osuperior") -_S("rsuperior") -_S("ssuperior") -_S("tsuperior") -_S("ff") -_S("ffi") -_S("ffl") -_S("parenleftinferior") -_S("parenrightinferior") -_S("Circumflexsmall") -_S("hyphensuperior") -_S("Gravesmall") -_S("Asmall") -_S("Bsmall") -_S("Csmall") -_S("Dsmall") -_S("Esmall") -_S("Fsmall") -_S("Gsmall") -_S("Hsmall") -_S("Ismall") -_S("Jsmall") -_S("Ksmall") -_S("Lsmall") -_S("Msmall") -_S("Nsmall") -_S("Osmall") -_S("Psmall") -_S("Qsmall") -_S("Rsmall") -_S("Ssmall") -_S("Tsmall") -_S("Usmall") -_S("Vsmall") -_S("Wsmall") -_S("Xsmall") -_S("Ysmall") -_S("Zsmall") -_S("colonmonetary") -_S("onefitted") -_S("rupiah") -_S("Tildesmall") -_S("exclamdownsmall") -_S("centoldstyle") -_S("Lslashsmall") -_S("Scaronsmall") -_S("Zcaronsmall") -_S("Dieresissmall") -_S("Brevesmall") -_S("Caronsmall") -_S("Dotaccentsmall") -_S("Macronsmall") -_S("figuredash") -_S("hypheninferior") -_S("Ogoneksmall") -_S("Ringsmall") -_S("Cedillasmall") -_S("questiondownsmall") -_S("oneeighth") -_S("threeeighths") -_S("fiveeighths") -_S("seveneighths") -_S("onethird") -_S("twothirds") -_S("zerosuperior") -_S("foursuperior") -_S("fivesuperior") -_S("sixsuperior") -_S("sevensuperior") -_S("eightsuperior") -_S("ninesuperior") -_S("zeroinferior") -_S("oneinferior") -_S("twoinferior") -_S("threeinferior") -_S("fourinferior") -_S("fiveinferior") -_S("sixinferior") -_S("seveninferior") -_S("eightinferior") -_S("nineinferior") -_S("centinferior") -_S("dollarinferior") -_S("periodinferior") -_S("commainferior") -_S("Agravesmall") -_S("Aacutesmall") -_S("Acircumflexsmall") -_S("Atildesmall") -_S("Adieresissmall") -_S("Aringsmall") -_S("AEsmall") -_S("Ccedillasmall") -_S("Egravesmall") -_S("Eacutesmall") -_S("Ecircumflexsmall") -_S("Edieresissmall") -_S("Igravesmall") -_S("Iacutesmall") -_S("Icircumflexsmall") -_S("Idieresissmall") -_S("Ethsmall") -_S("Ntildesmall") -_S("Ogravesmall") -_S("Oacutesmall") -_S("Ocircumflexsmall") -_S("Otildesmall") -_S("Odieresissmall") -_S("OEsmall") -_S("Oslashsmall") -_S("Ugravesmall") -_S("Uacutesmall") -_S("Ucircumflexsmall") -_S("Udieresissmall") -_S("Yacutesmall") -_S("Thornsmall") -_S("Ydieresissmall") -_S("001.000") -_S("001.001") -_S("001.002") -_S("001.003") -_S("Black") -_S("Bold") -_S("Book") -_S("Light") -_S("Medium") -_S("Regular") -_S("Roman") -_S("Semibold") +HB_STR(".notdef") +HB_STR("space") +HB_STR("exclam") +HB_STR("quotedbl") +HB_STR("numbersign") +HB_STR("dollar") +HB_STR("percent") +HB_STR("ampersand") +HB_STR("quoteright") +HB_STR("parenleft") +HB_STR("parenright") +HB_STR("asterisk") +HB_STR("plus") +HB_STR("comma") +HB_STR("hyphen") +HB_STR("period") +HB_STR("slash") +HB_STR("zero") +HB_STR("one") +HB_STR("two") +HB_STR("three") +HB_STR("four") +HB_STR("five") +HB_STR("six") +HB_STR("seven") +HB_STR("eight") +HB_STR("nine") +HB_STR("colon") +HB_STR("semicolon") +HB_STR("less") +HB_STR("equal") +HB_STR("greater") +HB_STR("question") +HB_STR("at") +HB_STR("A") +HB_STR("B") +HB_STR("C") +HB_STR("D") +HB_STR("E") +HB_STR("F") +HB_STR("G") +HB_STR("H") +HB_STR("I") +HB_STR("J") +HB_STR("K") +HB_STR("L") +HB_STR("M") +HB_STR("N") +HB_STR("O") +HB_STR("P") +HB_STR("Q") +HB_STR("R") +HB_STR("S") +HB_STR("T") +HB_STR("U") +HB_STR("V") +HB_STR("W") +HB_STR("X") +HB_STR("Y") +HB_STR("Z") +HB_STR("bracketleft") +HB_STR("backslash") +HB_STR("bracketright") +HB_STR("asciicircum") +HB_STR("underscore") +HB_STR("quoteleft") +HB_STR("a") +HB_STR("b") +HB_STR("c") +HB_STR("d") +HB_STR("e") +HB_STR("f") +HB_STR("g") +HB_STR("h") +HB_STR("i") +HB_STR("j") +HB_STR("k") +HB_STR("l") +HB_STR("m") +HB_STR("n") +HB_STR("o") +HB_STR("p") +HB_STR("q") +HB_STR("r") +HB_STR("s") +HB_STR("t") +HB_STR("u") +HB_STR("v") +HB_STR("w") +HB_STR("x") +HB_STR("y") +HB_STR("z") +HB_STR("braceleft") +HB_STR("bar") +HB_STR("braceright") +HB_STR("asciitilde") +HB_STR("exclamdown") +HB_STR("cent") +HB_STR("sterling") +HB_STR("fraction") +HB_STR("yen") +HB_STR("florin") +HB_STR("section") +HB_STR("currency") +HB_STR("quotesingle") +HB_STR("quotedblleft") +HB_STR("guillemotleft") +HB_STR("guilsinglleft") +HB_STR("guilsinglright") +HB_STR("fi") +HB_STR("fl") +HB_STR("endash") +HB_STR("dagger") +HB_STR("daggerdbl") +HB_STR("periodcentered") +HB_STR("paragraph") +HB_STR("bullet") +HB_STR("quotesinglbase") +HB_STR("quotedblbase") +HB_STR("quotedblright") +HB_STR("guillemotright") +HB_STR("ellipsis") +HB_STR("perthousand") +HB_STR("questiondown") +HB_STR("grave") +HB_STR("acute") +HB_STR("circumflex") +HB_STR("tilde") +HB_STR("macron") +HB_STR("breve") +HB_STR("dotaccent") +HB_STR("dieresis") +HB_STR("ring") +HB_STR("cedilla") +HB_STR("hungarumlaut") +HB_STR("ogonek") +HB_STR("caron") +HB_STR("emdash") +HB_STR("AE") +HB_STR("ordfeminine") +HB_STR("Lslash") +HB_STR("Oslash") +HB_STR("OE") +HB_STR("ordmasculine") +HB_STR("ae") +HB_STR("dotlessi") +HB_STR("lslash") +HB_STR("oslash") +HB_STR("oe") +HB_STR("germandbls") +HB_STR("onesuperior") +HB_STR("logicalnot") +HB_STR("mu") +HB_STR("trademark") +HB_STR("Eth") +HB_STR("onehalf") +HB_STR("plusminus") +HB_STR("Thorn") +HB_STR("onequarter") +HB_STR("divide") +HB_STR("brokenbar") +HB_STR("degree") +HB_STR("thorn") +HB_STR("threequarters") +HB_STR("twosuperior") +HB_STR("registered") +HB_STR("minus") +HB_STR("eth") +HB_STR("multiply") +HB_STR("threesuperior") +HB_STR("copyright") +HB_STR("Aacute") +HB_STR("Acircumflex") +HB_STR("Adieresis") +HB_STR("Agrave") +HB_STR("Aring") +HB_STR("Atilde") +HB_STR("Ccedilla") +HB_STR("Eacute") +HB_STR("Ecircumflex") +HB_STR("Edieresis") +HB_STR("Egrave") +HB_STR("Iacute") +HB_STR("Icircumflex") +HB_STR("Idieresis") +HB_STR("Igrave") +HB_STR("Ntilde") +HB_STR("Oacute") +HB_STR("Ocircumflex") +HB_STR("Odieresis") +HB_STR("Ograve") +HB_STR("Otilde") +HB_STR("Scaron") +HB_STR("Uacute") +HB_STR("Ucircumflex") +HB_STR("Udieresis") +HB_STR("Ugrave") +HB_STR("Yacute") +HB_STR("Ydieresis") +HB_STR("Zcaron") +HB_STR("aacute") +HB_STR("acircumflex") +HB_STR("adieresis") +HB_STR("agrave") +HB_STR("aring") +HB_STR("atilde") +HB_STR("ccedilla") +HB_STR("eacute") +HB_STR("ecircumflex") +HB_STR("edieresis") +HB_STR("egrave") +HB_STR("iacute") +HB_STR("icircumflex") +HB_STR("idieresis") +HB_STR("igrave") +HB_STR("ntilde") +HB_STR("oacute") +HB_STR("ocircumflex") +HB_STR("odieresis") +HB_STR("ograve") +HB_STR("otilde") +HB_STR("scaron") +HB_STR("uacute") +HB_STR("ucircumflex") +HB_STR("udieresis") +HB_STR("ugrave") +HB_STR("yacute") +HB_STR("ydieresis") +HB_STR("zcaron") +HB_STR("exclamsmall") +HB_STR("Hungarumlautsmall") +HB_STR("dollaroldstyle") +HB_STR("dollarsuperior") +HB_STR("ampersandsmall") +HB_STR("Acutesmall") +HB_STR("parenleftsuperior") +HB_STR("parenrightsuperior") +HB_STR("twodotenleader") +HB_STR("onedotenleader") +HB_STR("zerooldstyle") +HB_STR("oneoldstyle") +HB_STR("twooldstyle") +HB_STR("threeoldstyle") +HB_STR("fouroldstyle") +HB_STR("fiveoldstyle") +HB_STR("sixoldstyle") +HB_STR("sevenoldstyle") +HB_STR("eightoldstyle") +HB_STR("nineoldstyle") +HB_STR("commasuperior") +HB_STR("threequartersemdash") +HB_STR("periodsuperior") +HB_STR("questionsmall") +HB_STR("asuperior") +HB_STR("bsuperior") +HB_STR("centsuperior") +HB_STR("dsuperior") +HB_STR("esuperior") +HB_STR("isuperior") +HB_STR("lsuperior") +HB_STR("msuperior") +HB_STR("nsuperior") +HB_STR("osuperior") +HB_STR("rsuperior") +HB_STR("ssuperior") +HB_STR("tsuperior") +HB_STR("ff") +HB_STR("ffi") +HB_STR("ffl") +HB_STR("parenleftinferior") +HB_STR("parenrightinferior") +HB_STR("Circumflexsmall") +HB_STR("hyphensuperior") +HB_STR("Gravesmall") +HB_STR("Asmall") +HB_STR("Bsmall") +HB_STR("Csmall") +HB_STR("Dsmall") +HB_STR("Esmall") +HB_STR("Fsmall") +HB_STR("Gsmall") +HB_STR("Hsmall") +HB_STR("Ismall") +HB_STR("Jsmall") +HB_STR("Ksmall") +HB_STR("Lsmall") +HB_STR("Msmall") +HB_STR("Nsmall") +HB_STR("Osmall") +HB_STR("Psmall") +HB_STR("Qsmall") +HB_STR("Rsmall") +HB_STR("Ssmall") +HB_STR("Tsmall") +HB_STR("Usmall") +HB_STR("Vsmall") +HB_STR("Wsmall") +HB_STR("Xsmall") +HB_STR("Ysmall") +HB_STR("Zsmall") +HB_STR("colonmonetary") +HB_STR("onefitted") +HB_STR("rupiah") +HB_STR("Tildesmall") +HB_STR("exclamdownsmall") +HB_STR("centoldstyle") +HB_STR("Lslashsmall") +HB_STR("Scaronsmall") +HB_STR("Zcaronsmall") +HB_STR("Dieresissmall") +HB_STR("Brevesmall") +HB_STR("Caronsmall") +HB_STR("Dotaccentsmall") +HB_STR("Macronsmall") +HB_STR("figuredash") +HB_STR("hypheninferior") +HB_STR("Ogoneksmall") +HB_STR("Ringsmall") +HB_STR("Cedillasmall") +HB_STR("questiondownsmall") +HB_STR("oneeighth") +HB_STR("threeeighths") +HB_STR("fiveeighths") +HB_STR("seveneighths") +HB_STR("onethird") +HB_STR("twothirds") +HB_STR("zerosuperior") +HB_STR("foursuperior") +HB_STR("fivesuperior") +HB_STR("sixsuperior") +HB_STR("sevensuperior") +HB_STR("eightsuperior") +HB_STR("ninesuperior") +HB_STR("zeroinferior") +HB_STR("oneinferior") +HB_STR("twoinferior") +HB_STR("threeinferior") +HB_STR("fourinferior") +HB_STR("fiveinferior") +HB_STR("sixinferior") +HB_STR("seveninferior") +HB_STR("eightinferior") +HB_STR("nineinferior") +HB_STR("centinferior") +HB_STR("dollarinferior") +HB_STR("periodinferior") +HB_STR("commainferior") +HB_STR("Agravesmall") +HB_STR("Aacutesmall") +HB_STR("Acircumflexsmall") +HB_STR("Atildesmall") +HB_STR("Adieresissmall") +HB_STR("Aringsmall") +HB_STR("AEsmall") +HB_STR("Ccedillasmall") +HB_STR("Egravesmall") +HB_STR("Eacutesmall") +HB_STR("Ecircumflexsmall") +HB_STR("Edieresissmall") +HB_STR("Igravesmall") +HB_STR("Iacutesmall") +HB_STR("Icircumflexsmall") +HB_STR("Idieresissmall") +HB_STR("Ethsmall") +HB_STR("Ntildesmall") +HB_STR("Ogravesmall") +HB_STR("Oacutesmall") +HB_STR("Ocircumflexsmall") +HB_STR("Otildesmall") +HB_STR("Odieresissmall") +HB_STR("OEsmall") +HB_STR("Oslashsmall") +HB_STR("Ugravesmall") +HB_STR("Uacutesmall") +HB_STR("Ucircumflexsmall") +HB_STR("Udieresissmall") +HB_STR("Yacutesmall") +HB_STR("Thornsmall") +HB_STR("Ydieresissmall") +HB_STR("001.000") +HB_STR("001.001") +HB_STR("001.002") +HB_STR("001.003") +HB_STR("Black") +HB_STR("Bold") +HB_STR("Book") +HB_STR("Light") +HB_STR("Medium") +HB_STR("Regular") +HB_STR("Roman") +HB_STR("Semibold") #endif /* HB_OT_CFF1_STD_STR_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff1-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -326,7 +326,7 @@ void collect_glyph_to_sid_map (glyph_to_sid_map_t *mapping, unsigned int num_glyphs) const { - mapping->resize (num_glyphs, false); + mapping->resize_dirty (num_glyphs); for (hb_codepoint_t gid = 1; gid < num_glyphs; gid++) mapping->arrayZ[gid] = {sids[gid - 1], gid}; } @@ -426,7 +426,7 @@ void collect_glyph_to_sid_map (glyph_to_sid_map_t *mapping, unsigned int num_glyphs) const { - mapping->resize (num_glyphs, false); + mapping->resize_dirty (num_glyphs); hb_codepoint_t gid = 1; if (gid >= num_glyphs) return; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff2-table.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff2-table.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cff2-table.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cff2-table.cc 2026-04-17 19:08:13.000000000 +0000 @@ -202,7 +202,11 @@ bool OT::cff2::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const { - return get_path_at (font, glyph, draw_session, hb_array (font->coords, font->num_coords)); + return get_path_at (font, + glyph, + draw_session, + hb_array (font->coords, + font->has_nonzero_coords ? font->num_coords : 0)); } bool OT::cff2::accelerator_t::get_path_at (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session, hb_array_t<const int> coords) const diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cmap-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cmap-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-cmap-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-cmap-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -501,10 +501,6 @@ this->length = c->length () - table_initpos; if ((long long) this->length != (long long) c->length () - table_initpos) { - // Length overflowed. Discard the current object before setting the error condition, otherwise - // discard is a noop which prevents the higher level code from reverting the serializer to the - // pre-error state in cmap4 overflow handling code. - c->pop_discard (); c->err (HB_SERIALIZE_ERROR_INT_OVERFLOW); return; } @@ -701,16 +697,7 @@ hb_barrier (); if (unlikely (!c->check_range (this, length))) - { - /* Some broken fonts have too long of a "length" value. - * If that is the case, just change the value to truncate - * the subtable at the end of the blob. */ - uint16_t new_length = (uint16_t) hb_min ((uintptr_t) 65535, - (uintptr_t) (c->end - - (char *) this)); - if (!c->try_set (&length, new_length)) - return_trace (false); - } + return_trace (false); return_trace (16 + 4 * (unsigned int) segCountX2 <= length); } @@ -1500,7 +1487,7 @@ bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return u.format0 .get_glyph (codepoint, glyph); case 4: hb_barrier (); return u.format4 .get_glyph (codepoint, glyph); case 6: hb_barrier (); return u.format6 .get_glyph (codepoint, glyph); @@ -1513,7 +1500,7 @@ } void collect_unicodes (hb_set_t *out, unsigned int num_glyphs = UINT_MAX) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); u.format0 .collect_unicodes (out); return; case 4: hb_barrier (); u.format4 .collect_unicodes (out); return; case 6: hb_barrier (); u.format6 .collect_unicodes (out); return; @@ -1529,7 +1516,7 @@ hb_map_t *mapping, /* OUT */ unsigned num_glyphs = UINT_MAX) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); u.format0 .collect_mapping (unicodes, mapping); return; case 4: hb_barrier (); u.format4 .collect_mapping (unicodes, mapping); return; case 6: hb_barrier (); u.format6 .collect_mapping (unicodes, mapping); return; @@ -1543,7 +1530,7 @@ unsigned get_language () const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return u.format0 .get_language (); case 4: hb_barrier (); return u.format4 .get_language (); case 6: hb_barrier (); return u.format6 .get_language (); @@ -1574,9 +1561,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return_trace (u.format0 .sanitize (c)); case 4: hb_barrier (); return_trace (u.format4 .sanitize (c)); case 6: hb_barrier (); return_trace (u.format6 .sanitize (c)); @@ -1590,7 +1577,7 @@ public: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ CmapSubtableFormat0 format0; CmapSubtableFormat4 format4; CmapSubtableFormat6 format6; @@ -1600,7 +1587,7 @@ CmapSubtableFormat14 format14; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; @@ -1646,7 +1633,7 @@ CmapSubtable *cmapsubtable = c->push<CmapSubtable> (); unsigned origin_length = c->length (); cmapsubtable->serialize (c, it, format, plan, &(base+subtable)); - if (c->length () - origin_length > 0) *objidx = c->pop_pack (); + if (c->length () - origin_length > 0 && !c->in_error()) *objidx = c->pop_pack (); else c->pop_discard (); } @@ -1683,6 +1670,10 @@ { SubtableUnicodesCache* cache = (SubtableUnicodesCache*) hb_malloc (sizeof(SubtableUnicodesCache)); + + if (unlikely (!cache)) + return nullptr; + new (cache) SubtableUnicodesCache (source_table); return cache; } @@ -1776,6 +1767,10 @@ ; SubtableUnicodesCache* cache = SubtableUnicodesCache::create(source_table); + + if (unlikely (!cache)) + return nullptr; + for (const EncodingRecord& _ : it) cache->set_for(&_); // populate the cache for this encoding record. @@ -1810,7 +1805,7 @@ if (c->in_error ()) return false; - unsigned format = (base+_.subtable).u.format; + unsigned format = (base+_.subtable).u.format.v; if (format != 4 && format != 12 && format != 14) continue; const hb_set_t* unicodes_set = unicodes_cache->set_for (&_, local_unicodes_cache); @@ -1912,7 +1907,7 @@ + hb_iter (encodingRecord) | hb_map (&EncodingRecord::subtable) | hb_map (hb_add (this)) - | hb_filter ([&] (const CmapSubtable& _) { return _.u.format == 14; }) + | hb_filter ([&] (const CmapSubtable& _) { return _.u.format.v == 14; }) | hb_apply ([=] (const CmapSubtable& _) { _.u.format14.closure_glyphs (unicodes, glyphset); }) ; } @@ -1937,7 +1932,7 @@ for (const EncodingRecord& _ : encodingrec_iter) { - unsigned format = (this + _.subtable).u.format; + unsigned format = (this + _.subtable).u.format.v; if (format == 12) has_format12 = true; const EncodingRecord *table = std::addressof (_); @@ -2025,7 +2020,7 @@ this->subtable_uvs = &Null (CmapSubtableFormat14); { const CmapSubtable *st = table->find_subtable (0, 5); - if (st && st->u.format == 14) + if (st && st->u.format.v == 14) subtable_uvs = &st->u.format14; } @@ -2069,7 +2064,7 @@ else #endif { - switch (subtable->u.format) { + switch (subtable->u.format.v) { /* Accelerate format 4 and format 12. */ default: this->get_glyph_funcZ = get_glyph_from<CmapSubtable>; @@ -2276,7 +2271,7 @@ (_.platformID == 0 && _.encodingID == 4) || (_.platformID == 3 && _.encodingID == 1) || (_.platformID == 3 && _.encodingID == 10) || - (cmap + _.subtable).u.format == 14; + (cmap + _.subtable).u.format.v == 14; } protected: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-font.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-font.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-font.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-font.cc 2026-04-17 19:08:13.000000000 +0000 @@ -37,6 +37,7 @@ #include "hb-ot-cmap-table.hh" #include "hb-ot-glyf-table.hh" +#include "hb-ot-var-gvar-table.hh" #include "hb-ot-cff2-table.hh" #include "hb-ot-cff1-table.hh" #include "hb-ot-hmtx-table.hh" @@ -64,18 +65,22 @@ using hb_ot_font_advance_cache_t = hb_cache_t<24, 16>; static_assert (sizeof (hb_ot_font_advance_cache_t) == 1024, ""); +using hb_ot_font_origin_cache_t = hb_cache_t<20, 20>; +static_assert (sizeof (hb_ot_font_origin_cache_t) == 1024, ""); + struct hb_ot_font_t { const hb_ot_face_t *ot_face; - /* h_advance caching */ + mutable hb_atomic_t<int> cached_serial; mutable hb_atomic_t<int> cached_coords_serial; - struct advance_cache_t + + struct direction_cache_t { mutable hb_atomic_t<hb_ot_font_advance_cache_t *> advance_cache; - mutable hb_atomic_t<OT::ItemVariationStore::cache_t *> varStore_cache; + mutable hb_atomic_t<OT::hb_scalar_cache_t *> varStore_cache; - ~advance_cache_t () + ~direction_cache_t () { clear (); } @@ -116,7 +121,7 @@ goto retry; } - OT::ItemVariationStore::cache_t *acquire_varStore_cache (const OT::ItemVariationStore &varStore) const + OT::hb_scalar_cache_t *acquire_varStore_cache (const OT::ItemVariationStore &varStore) const { retry: auto *cache = varStore_cache.get_acquire (); @@ -127,7 +132,7 @@ else goto retry; } - void release_varStore_cache (OT::ItemVariationStore::cache_t *cache) const + void release_varStore_cache (OT::hb_scalar_cache_t *cache) const { if (!cache) return; @@ -154,17 +159,157 @@ } h, v; + struct origin_cache_t + { + mutable hb_atomic_t<hb_ot_font_origin_cache_t *> origin_cache; + mutable hb_atomic_t<OT::hb_scalar_cache_t *> varStore_cache; + + ~origin_cache_t () + { + clear (); + } + + hb_ot_font_origin_cache_t *acquire_origin_cache () const + { + retry: + auto *cache = origin_cache.get_acquire (); + if (!cache) + { + cache = (hb_ot_font_origin_cache_t *) hb_malloc (sizeof (hb_ot_font_origin_cache_t)); + if (!cache) + return nullptr; + new (cache) hb_ot_font_origin_cache_t; + return cache; + } + if (origin_cache.cmpexch (cache, nullptr)) + return cache; + else + goto retry; + } + void release_origin_cache (hb_ot_font_origin_cache_t *cache) const + { + if (!cache) + return; + if (!origin_cache.cmpexch (nullptr, cache)) + hb_free (cache); + } + void clear_origin_cache () const + { + retry: + auto *cache = origin_cache.get_acquire (); + if (!cache) + return; + if (origin_cache.cmpexch (cache, nullptr)) + hb_free (cache); + else + goto retry; + } + + OT::hb_scalar_cache_t *acquire_varStore_cache (const OT::ItemVariationStore &varStore) const + { + retry: + auto *cache = varStore_cache.get_acquire (); + if (!cache) + return varStore.create_cache (); + if (varStore_cache.cmpexch (cache, nullptr)) + return cache; + else + goto retry; + } + void release_varStore_cache (OT::hb_scalar_cache_t *cache) const + { + if (!cache) + return; + if (!varStore_cache.cmpexch (nullptr, cache)) + OT::ItemVariationStore::destroy_cache (cache); + } + void clear_varStore_cache () const + { + retry: + auto *cache = varStore_cache.get_acquire (); + if (!cache) + return; + if (varStore_cache.cmpexch (cache, nullptr)) + OT::ItemVariationStore::destroy_cache (cache); + else + goto retry; + } + + void clear () const + { + clear_origin_cache (); + clear_varStore_cache (); + } + } v_origin; + + struct draw_cache_t + { + mutable hb_atomic_t<OT::hb_scalar_cache_t *> gvar_cache; + + ~draw_cache_t () + { + clear (); + } + + OT::hb_scalar_cache_t *acquire_gvar_cache (const OT::gvar_accelerator_t &gvar) const + { + retry: + auto *cache = gvar_cache.get_acquire (); + if (!cache) + return gvar.create_cache (); + if (gvar_cache.cmpexch (cache, nullptr)) + return cache; + else + goto retry; + } + void release_gvar_cache (OT::hb_scalar_cache_t *cache) const + { + if (!cache) + return; + if (!gvar_cache.cmpexch (nullptr, cache)) + OT::gvar_accelerator_t::destroy_cache (cache); + } + void clear_gvar_cache () const + { + retry: + auto *cache = gvar_cache.get_acquire (); + if (!cache) + return; + if (gvar_cache.cmpexch (cache, nullptr)) + OT::gvar_accelerator_t::destroy_cache (cache); + else + goto retry; + } + + void clear () const + { + clear_gvar_cache (); + } + } draw; + void check_serial (hb_font_t *font) const { int font_serial = font->serial_coords.get_acquire (); + if (cached_serial.get_acquire () != font_serial) + { + /* These caches are dependent on scale and synthetic settings. + * Any change to the font invalidates them. */ + v_origin.clear (); - if (cached_coords_serial.get_acquire () == font_serial) - return; + cached_serial.set_release (font_serial); + } - h.clear (); - v.clear (); + int font_serial_coords = font->serial_coords.get_acquire (); + if (cached_coords_serial.get_acquire () != font_serial_coords) + { + /* These caches are independent of scale or synthetic settings. + * Just variation changes will invalidate them. */ + h.clear (); + v.clear (); + draw.clear (); - cached_coords_serial.set_release (font_serial); + cached_coords_serial.set_release (font_serial_coords); + } } }; @@ -242,37 +387,92 @@ unsigned advance_stride, void *user_data HB_UNUSED) { + // Duplicated in v_advances. Ugly. Keep in sync'ish. const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; const hb_ot_face_t *ot_face = ot_font->ot_face; const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx; - ot_font->check_serial (font); - const OT::HVAR &HVAR = *hmtx.var_table; - const OT::ItemVariationStore &varStore = &HVAR + HVAR.varStore; - OT::ItemVariationStore::cache_t *varStore_cache = ot_font->h.acquire_varStore_cache (varStore); + if (unlikely (!hmtx.has_data ())) + { + hb_position_t advance = font->face->get_upem () / 2; + advance = font->em_scale_x (advance); + for (unsigned int i = 0; i < count; i++) + { + *first_advance = advance; + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + return; + } + +#ifndef HB_NO_VAR + if (!font->has_nonzero_coords) + { + fallback: +#else + { +#endif + // Just plain htmx data. No need to cache. + for (unsigned int i = 0; i < count; i++) + { + *first_advance = font->em_scale_x (hmtx.get_advance_without_var_unscaled (*first_glyph)); + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + return; + } - hb_ot_font_advance_cache_t *advance_cache = nullptr; +#ifndef HB_NO_VAR + /* has_nonzero_coords. */ - bool use_cache = font->num_coords; - if (use_cache) + ot_font->check_serial (font); + hb_ot_font_advance_cache_t *advance_cache = ot_font->h.acquire_advance_cache (); + if (!advance_cache) { - advance_cache = ot_font->h.acquire_advance_cache (); - if (!advance_cache) - use_cache = false; + // malloc failure. Just use the fallback non-variable path. + goto fallback; } - if (!use_cache) + /* If HVAR is present, use it.*/ + const OT::HVAR &HVAR = *hmtx.var_table; + if (HVAR.has_data ()) { + const OT::ItemVariationStore &varStore = &HVAR + HVAR.varStore; + OT::hb_scalar_cache_t *varStore_cache = ot_font->h.acquire_varStore_cache (varStore); + for (unsigned int i = 0; i < count; i++) { - *first_advance = font->em_scale_x (hmtx.get_advance_with_var_unscaled (*first_glyph, font, varStore_cache)); + hb_position_t v; + unsigned cv; + if (advance_cache->get (*first_glyph, &cv)) + v = cv; + else + { + v = hmtx.get_advance_with_var_unscaled (*first_glyph, font, varStore_cache); + advance_cache->set (*first_glyph, v); + } + *first_advance = font->em_scale_x (v); first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); } + + ot_font->h.release_varStore_cache (varStore_cache); + ot_font->h.release_advance_cache (advance_cache); + return; } - else - { /* Use cache. */ + + const auto &gvar = *ot_face->gvar; + if (gvar.has_data ()) + { + const auto &glyf = *ot_face->glyf; + auto *scratch = glyf.acquire_scratch (); + if (unlikely (!scratch)) + { + ot_font->h.release_advance_cache (advance_cache); + goto fallback; + } + OT::hb_scalar_cache_t *gvar_cache = ot_font->draw.acquire_gvar_cache (gvar); + for (unsigned int i = 0; i < count; i++) { hb_position_t v; @@ -281,7 +481,7 @@ v = cv; else { - v = hmtx.get_advance_with_var_unscaled (*first_glyph, font, varStore_cache); + v = glyf.get_advance_with_var_unscaled (*first_glyph, font, false, *scratch, gvar_cache); advance_cache->set (*first_glyph, v); } *first_advance = font->em_scale_x (v); @@ -289,10 +489,16 @@ first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); } + ot_font->draw.release_gvar_cache (gvar_cache); + glyf.release_scratch (scratch); ot_font->h.release_advance_cache (advance_cache); + return; } - ot_font->h.release_varStore_cache (varStore_cache); + ot_font->h.release_advance_cache (advance_cache); + // No HVAR or GVAR. Just use the fallback non-variable path. + goto fallback; +#endif } #ifndef HB_NO_VERTICAL @@ -305,99 +511,290 @@ unsigned advance_stride, void *user_data HB_UNUSED) { + // Duplicated from h_advances. Ugly. Keep in sync'ish. + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; const hb_ot_face_t *ot_face = ot_font->ot_face; const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx; - if (vmtx.has_data ()) + if (unlikely (!vmtx.has_data ())) + { + hb_font_extents_t font_extents; + font->get_h_extents_with_fallback (&font_extents); + hb_position_t advance = font_extents.descender - font_extents.ascender; + for (unsigned int i = 0; i < count; i++) + { + *first_advance = advance; + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + return; + } + +#ifndef HB_NO_VAR + if (!font->has_nonzero_coords) + { + fallback: +#else + { +#endif + // Just plain vtmx data. No need to cache. + for (unsigned int i = 0; i < count; i++) + { + *first_advance = font->em_scale_y (- (int) vmtx.get_advance_without_var_unscaled (*first_glyph)); + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + return; + } + +#ifndef HB_NO_VAR + /* has_nonzero_coords. */ + + ot_font->check_serial (font); + hb_ot_font_advance_cache_t *advance_cache = ot_font->v.acquire_advance_cache (); + if (!advance_cache) + { + // malloc failure. Just use the fallback non-variable path. + goto fallback; + } + + /* If VVAR is present, use it.*/ + const OT::VVAR &VVAR = *vmtx.var_table; + if (VVAR.has_data ()) { - ot_font->check_serial (font); - const OT::VVAR &VVAR = *vmtx.var_table; const OT::ItemVariationStore &varStore = &VVAR + VVAR.varStore; - OT::ItemVariationStore::cache_t *varStore_cache = ot_font->v.acquire_varStore_cache (varStore); - // TODO Use advance_cache. + OT::hb_scalar_cache_t *varStore_cache = ot_font->v.acquire_varStore_cache (varStore); for (unsigned int i = 0; i < count; i++) { - *first_advance = font->em_scale_y (-(int) vmtx.get_advance_with_var_unscaled (*first_glyph, font, varStore_cache)); + hb_position_t v; + unsigned cv; + if (advance_cache->get (*first_glyph, &cv)) + v = cv; + else + { + v = vmtx.get_advance_with_var_unscaled (*first_glyph, font, varStore_cache); + advance_cache->set (*first_glyph, v); + } + *first_advance = font->em_scale_y (- (int) v); first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); } ot_font->v.release_varStore_cache (varStore_cache); + ot_font->v.release_advance_cache (advance_cache); + return; } - else + + const auto &gvar = *ot_face->gvar; + if (gvar.has_data ()) { - hb_font_extents_t font_extents; - font->get_h_extents_with_fallback (&font_extents); - hb_position_t advance = -(font_extents.ascender - font_extents.descender); + const auto &glyf = *ot_face->glyf; + auto *scratch = glyf.acquire_scratch (); + if (unlikely (!scratch)) + { + ot_font->v.release_advance_cache (advance_cache); + goto fallback; + } + OT::hb_scalar_cache_t *gvar_cache = ot_font->draw.acquire_gvar_cache (gvar); for (unsigned int i = 0; i < count; i++) { - *first_advance = advance; + hb_position_t v; + unsigned cv; + if (advance_cache->get (*first_glyph, &cv)) + v = cv; + else + { + v = glyf.get_advance_with_var_unscaled (*first_glyph, font, true, *scratch, gvar_cache); + advance_cache->set (*first_glyph, v); + } + *first_advance = font->em_scale_y (- (int) v); first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); } + + ot_font->draw.release_gvar_cache (gvar_cache); + glyf.release_scratch (scratch); + ot_font->v.release_advance_cache (advance_cache); + return; } + + ot_font->v.release_advance_cache (advance_cache); + // No VVAR or GVAR. Just use the fallback non-variable path. + goto fallback; +#endif } #endif #ifndef HB_NO_VERTICAL +HB_HOT static hb_bool_t -hb_ot_get_glyph_v_origin (hb_font_t *font, - void *font_data, - hb_codepoint_t glyph, - hb_position_t *x, - hb_position_t *y, - void *user_data HB_UNUSED) +hb_ot_get_glyph_v_origins (hb_font_t *font, + void *font_data, + unsigned int count, + const hb_codepoint_t *first_glyph, + unsigned glyph_stride, + hb_position_t *first_x, + unsigned x_stride, + hb_position_t *first_y, + unsigned y_stride, + void *user_data HB_UNUSED) { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; const hb_ot_face_t *ot_face = ot_font->ot_face; - *x = font->get_glyph_h_advance (glyph) / 2; + /* First, set all the x values to half the advance width. */ + font->get_glyph_h_advances (count, + first_glyph, glyph_stride, + first_x, x_stride); + for (unsigned i = 0; i < count; i++) + { + *first_x /= 2; + first_x = &StructAtOffsetUnaligned<hb_position_t> (first_x, x_stride); + } + + /* The vertical origin business is messy... + * + * We allocate the cache, then have various code paths that use the cache. + * Each one is responsible to free it before returning. + */ + hb_ot_font_origin_cache_t *origin_cache = ot_font->v_origin.acquire_origin_cache (); + /* If there is VORG, always use it. It uses VVAR for variations if necessary. */ const OT::VORG &VORG = *ot_face->VORG; - if (VORG.has_data ()) + if (origin_cache && VORG.has_data ()) { - float delta = 0; - #ifndef HB_NO_VAR - const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx; - const OT::VVAR &VVAR = *vmtx.var_table; - if (font->num_coords) - VVAR.get_vorg_delta_unscaled (glyph, - font->coords, font->num_coords, - &delta); + if (!font->has_nonzero_coords) #endif + { + for (unsigned i = 0; i < count; i++) + { + hb_position_t origin; + unsigned cv; + if (origin_cache->get (*first_glyph, &cv)) + origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv); + else + { + origin = font->em_scalef_y (VORG.get_y_origin (*first_glyph)); + origin_cache->set (*first_glyph, font->y_scale < 0 ? -origin : origin); + } + + *first_y = origin; + + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + } +#ifndef HB_NO_VAR + else + { + const OT::VVAR &VVAR = *ot_face->vmtx->var_table; + const auto &varStore = &VVAR + VVAR.varStore; + auto *varStore_cache = ot_font->v_origin.acquire_varStore_cache (varStore); + for (unsigned i = 0; i < count; i++) + { + hb_position_t origin; + unsigned cv; + if (origin_cache->get (*first_glyph, &cv)) + origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv); + else + { + origin = font->em_scalef_y (VORG.get_y_origin (*first_glyph) + + VVAR.get_vorg_delta_unscaled (*first_glyph, + font->coords, font->num_coords, + varStore_cache)); + origin_cache->set (*first_glyph, font->y_scale < 0 ? -origin : origin); + } - *y = font->em_scalef_y (VORG.get_y_origin (glyph) + delta); + *first_y = origin; + + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + ot_font->v_origin.release_varStore_cache (varStore_cache); + } +#endif + ot_font->v_origin.release_origin_cache (origin_cache); return true; } - hb_glyph_extents_t extents = {0}; - - if (hb_font_get_glyph_extents (font, glyph, &extents)) + /* If and only if `vmtx` is present and it's a `glyf` font, + * we use the top phantom point, deduced from vmtx,glyf[,gvar]. */ + const auto &vmtx = *ot_face->vmtx; + const auto &glyf = *ot_face->glyf; + if (origin_cache && vmtx.has_data() && glyf.has_data ()) { - const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx; - int tsb = 0; - if (vmtx.get_leading_bearing_with_var_unscaled (font, glyph, &tsb)) + auto *scratch = glyf.acquire_scratch (); + if (unlikely (!scratch)) { - *y = extents.y_bearing + font->em_scale_y (tsb); - return true; + ot_font->v_origin.release_origin_cache (origin_cache); + return false; } + OT::hb_scalar_cache_t *gvar_cache = font->has_nonzero_coords ? + ot_font->draw.acquire_gvar_cache (*ot_face->gvar) : + nullptr; - hb_font_extents_t font_extents; - font->get_h_extents_with_fallback (&font_extents); - hb_position_t advance = font_extents.ascender - font_extents.descender; - hb_position_t diff = advance - -extents.height; - *y = extents.y_bearing + (diff >> 1); + for (unsigned i = 0; i < count; i++) + { + hb_position_t origin; + unsigned cv; + if (origin_cache->get (*first_glyph, &cv)) + origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv); + else + { + origin = font->em_scalef_y (glyf.get_v_origin_with_var_unscaled (*first_glyph, font, *scratch, gvar_cache)); + origin_cache->set (*first_glyph, font->y_scale < 0 ? -origin : origin); + } + + *first_y = origin; + + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + + if (gvar_cache) + ot_font->draw.release_gvar_cache (gvar_cache); + glyf.release_scratch (scratch); + ot_font->v_origin.release_origin_cache (origin_cache); return true; } - hb_font_extents_t font_extents; - font->get_h_extents_with_fallback (&font_extents); - *y = font_extents.ascender; + /* Otherwise, use glyph extents to center the glyph vertically. + * If getting glyph extents failed, just use the font ascender. */ + if (origin_cache && font->has_glyph_extents_func ()) + { + hb_font_extents_t font_extents; + font->get_h_extents_with_fallback (&font_extents); + hb_position_t font_advance = font_extents.ascender - font_extents.descender; + + for (unsigned i = 0; i < count; i++) + { + hb_position_t origin; + unsigned cv; + + if (origin_cache->get (*first_glyph, &cv)) + origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv); + else + { + hb_glyph_extents_t extents = {0}; + if (likely (font->get_glyph_extents (*first_glyph, &extents))) + origin = extents.y_bearing + ((font_advance - -extents.height) >> 1); + else + origin = font_extents.ascender; + + origin_cache->set (*first_glyph, font->y_scale < 0 ? -origin : origin); + } + + *first_y = origin; + + first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); + first_y = &StructAtOffsetUnaligned<hb_position_t> (first_y, y_stride); + } + } + ot_font->v_origin.release_origin_cache (origin_cache); return true; } #endif @@ -498,17 +895,33 @@ hb_draw_funcs_t *draw_funcs, void *draw_data, void *user_data) { + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; hb_draw_session_t draw_session {draw_funcs, draw_data}; + bool ret = false; + + OT::hb_scalar_cache_t *gvar_cache = nullptr; + if (font->num_coords) + { + ot_font->check_serial (font); + gvar_cache = ot_font->draw.acquire_gvar_cache (*ot_font->ot_face->gvar); + } + #ifndef HB_NO_VAR_COMPOSITES - if (font->face->table.VARC->get_path (font, glyph, draw_session)) return true; + if (font->face->table.VARC->get_path (font, glyph, draw_session)) { ret = true; goto done; } #endif // Keep the following in synch with VARC::get_path_at() - if (font->face->table.glyf->get_path (font, glyph, draw_session)) return true; + if (font->face->table.glyf->get_path (font, glyph, draw_session, gvar_cache)) { ret = true; goto done; } + #ifndef HB_NO_CFF - if (font->face->table.cff2->get_path (font, glyph, draw_session)) return true; - if (font->face->table.cff1->get_path (font, glyph, draw_session)) return true; + if (font->face->table.cff2->get_path (font, glyph, draw_session)) { ret = true; goto done; } + if (font->face->table.cff1->get_path (font, glyph, draw_session)) { ret = true; goto done; } #endif - return false; + +done: + + ot_font->draw.release_gvar_cache (gvar_cache); + + return ret; } #endif @@ -548,12 +961,11 @@ hb_font_funcs_set_font_h_extents_func (funcs, hb_ot_get_font_h_extents, nullptr, nullptr); hb_font_funcs_set_glyph_h_advances_func (funcs, hb_ot_get_glyph_h_advances, nullptr, nullptr); - //hb_font_funcs_set_glyph_h_origin_func (funcs, hb_ot_get_glyph_h_origin, nullptr, nullptr); #ifndef HB_NO_VERTICAL hb_font_funcs_set_font_v_extents_func (funcs, hb_ot_get_font_v_extents, nullptr, nullptr); hb_font_funcs_set_glyph_v_advances_func (funcs, hb_ot_get_glyph_v_advances, nullptr, nullptr); - hb_font_funcs_set_glyph_v_origin_func (funcs, hb_ot_get_glyph_v_origin, nullptr, nullptr); + hb_font_funcs_set_glyph_v_origins_func (funcs, hb_ot_get_glyph_v_origins, nullptr, nullptr); #endif #ifndef HB_NO_DRAW diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-hmtx-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-hmtx-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-hmtx-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-hmtx-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -45,16 +45,6 @@ #define HB_OT_TAG_vmtx HB_TAG('v','m','t','x') -HB_INTERNAL bool -_glyf_get_leading_bearing_with_var_unscaled (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical, int *lsb); - -HB_INTERNAL unsigned -_glyf_get_advance_with_var_unscaled (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical); - -HB_INTERNAL bool -_glyf_get_leading_bearing_without_var_unscaled (hb_face_t *face, hb_codepoint_t gid, bool is_vertical, int *lsb); - - namespace OT { @@ -237,7 +227,7 @@ auto it = + hb_iter (c->plan->new_to_old_gid_list) - | hb_map ([c, &_mtx, mtx_map] (hb_codepoint_pair_t _) + | hb_map ([&_mtx, mtx_map] (hb_codepoint_pair_t _) { hb_codepoint_t new_gid = _.first; hb_codepoint_t old_gid = _.second; @@ -246,8 +236,7 @@ if (!mtx_map->has (new_gid, &v)) { int lsb = 0; - if (!_mtx.get_leading_bearing_without_var_unscaled (old_gid, &lsb)) - (void) _glyf_get_leading_bearing_without_var_unscaled (c->plan->source, old_gid, !T::is_horizontal, &lsb); + _mtx.get_leading_bearing_without_var_unscaled (old_gid, &lsb); return hb_pair (_mtx.get_advance_without_var_unscaled (old_gid), +lsb); } return *v; @@ -326,49 +315,23 @@ bool has_data () const { return (bool) num_bearings; } - bool get_leading_bearing_without_var_unscaled (hb_codepoint_t glyph, + void get_leading_bearing_without_var_unscaled (hb_codepoint_t glyph, int *lsb) const { if (glyph < num_long_metrics) { *lsb = table->longMetricZ[glyph].sb; - return true; + return; } if (unlikely (glyph >= num_bearings)) - return false; - - const FWORD *bearings = (const FWORD *) &table->longMetricZ[num_long_metrics]; - *lsb = bearings[glyph - num_long_metrics]; - return true; - } - - bool get_leading_bearing_with_var_unscaled (hb_font_t *font, - hb_codepoint_t glyph, - int *lsb) const - { - if (!font->num_coords) - return get_leading_bearing_without_var_unscaled (glyph, lsb); - -#ifndef HB_NO_VAR - float delta; - if (var_table->get_lsb_delta_unscaled (glyph, font->coords, font->num_coords, &delta) && - get_leading_bearing_without_var_unscaled (glyph, lsb)) { - *lsb += roundf (delta); - return true; + *lsb = 0; + return; } - // If there's no vmtx data, the phantom points from glyf table are not accurate, - // so we cannot take the next path. - bool is_vertical = T::tableTag == HB_OT_TAG_vmtx; - if (is_vertical && !has_data ()) - return false; - - return _glyf_get_leading_bearing_with_var_unscaled (font, glyph, is_vertical, lsb); -#else - return false; -#endif + const FWORD *bearings = (const FWORD *) &table->longMetricZ[num_long_metrics]; + *lsb = bearings[glyph - num_long_metrics]; } unsigned int get_advance_without_var_unscaled (hb_codepoint_t glyph) const @@ -402,27 +365,17 @@ return advances[hb_min (glyph - num_bearings, num_advances - num_bearings - 1)]; } - unsigned get_advance_with_var_unscaled (hb_codepoint_t glyph, - hb_font_t *font, - ItemVariationStore::cache_t *store_cache = nullptr) const +#ifndef HB_NO_VAR + unsigned get_advance_with_var_unscaled (hb_codepoint_t glyph, + hb_font_t *font, + hb_scalar_cache_t *store_cache = nullptr) const { unsigned int advance = get_advance_without_var_unscaled (glyph); - -#ifndef HB_NO_VAR - if (unlikely (glyph >= num_bearings) || !font->num_coords) - return advance; - - if (var_table.get_length ()) - return advance + roundf (var_table->get_advance_delta_unscaled (glyph, - font->coords, font->num_coords, - store_cache)); - - unsigned glyf_advance = _glyf_get_advance_with_var_unscaled (font, glyph, T::tableTag == HB_OT_TAG_vmtx); - return glyf_advance ? glyf_advance : advance; -#else - return advance; -#endif + return hb_max(0.0f, advance + roundf (var_table->get_advance_delta_unscaled (glyph, + font->coords, font->num_coords, + store_cache))); } +#endif protected: // 0 <= num_long_metrics <= num_bearings <= num_advances <= num_glyphs diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-kern-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-kern-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-kern-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-kern-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -90,11 +90,11 @@ template <typename set_t> void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const { - set_t set; if (likely (glyphCount)) - set.add_range (0, glyphCount - 1); - left_set.union_ (set); - right_set.union_ (set); + { + left_set.add_range (0, num_glyphs - 1); + right_set.add_range (0, num_glyphs - 1); + } } protected: @@ -306,8 +306,8 @@ { static constexpr hb_tag_t tableTag = HB_OT_TAG_kern; - bool has_data () const { return u.version32; } - unsigned get_type () const { return u.major; } + bool has_data () const { return u.version32.v; } + unsigned get_type () const { return u.major.v; } bool has_state_machine () const { @@ -363,7 +363,7 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.version32.sanitize (c)) return_trace (false); + if (!u.version32.v.sanitize (c)) return_trace (false); hb_barrier (); return_trace (dispatch (c)); } @@ -406,15 +406,15 @@ protected: union { - HBUINT32 version32; - HBUINT16 major; + struct { HBUINT32 v; } version32; + struct { HBUINT16 v; } major; KernOT ot; #ifndef HB_NO_AAT_SHAPE KernAAT aat; #endif } u; public: - DEFINE_SIZE_UNION (4, version32); + DEFINE_SIZE_UNION (4, version32.v); }; struct kern_accelerator_t : kern::accelerator_t { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-base-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-base-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-base-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-base-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -165,13 +165,13 @@ struct BaseCoord { - bool has_data () const { return u.format; } + bool has_data () const { return u.format.v; } hb_position_t get_coord (hb_font_t *font, const ItemVariationStore &var_store, hb_direction_t direction) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_coord (font, direction); case 2: hb_barrier (); return u.format2.get_coord (font, direction); case 3: hb_barrier (); return u.format3.get_coord (font, var_store, direction); @@ -181,7 +181,7 @@ void collect_variation_indices (hb_set_t& varidx_set /* OUT */) const { - switch (u.format) { + switch (u.format.v) { case 3: hb_barrier (); u.format3.collect_variation_indices (varidx_set); return; default:return; } @@ -190,9 +190,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: hb_barrier (); return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: hb_barrier (); return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); case 3: hb_barrier (); return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); @@ -203,9 +203,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (unlikely (!u.format.sanitize (c))) return_trace (false); + if (unlikely (!u.format.v.sanitize (c))) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.sanitize (c)); case 2: hb_barrier (); return_trace (u.format2.sanitize (c)); case 3: hb_barrier (); return_trace (u.format3.sanitize (c)); @@ -215,13 +215,13 @@ protected: union { - HBUINT16 format; + struct { HBUINT16 v; } format; BaseCoordFormat1 format1; BaseCoordFormat2 format2; BaseCoordFormat3 format3; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; struct FeatMinMaxRecord diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-common.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-common.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-common.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-common.hh 2026-04-17 19:08:13.000000000 +0000 @@ -141,6 +141,7 @@ const hb_map_t *lookup_index_map; const hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *script_langsys_map; const hb_map_t *feature_index_map; + const hb_map_t *feature_map_w_duplicates; const hb_hashmap_t<unsigned, const Feature*> *feature_substitutes_map; hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *feature_record_cond_idx_map; const hb_set_t *catch_all_record_feature_idxes; @@ -165,6 +166,7 @@ lookup_index_map = &c_->plan->gsub_lookups; script_langsys_map = &c_->plan->gsub_langsys; feature_index_map = &c_->plan->gsub_features; + feature_map_w_duplicates = &c_->plan->gsub_features_w_duplicates; feature_substitutes_map = &c_->plan->gsub_feature_substitutes_map; feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gsub_feature_record_cond_idx_map; catch_all_record_feature_idxes = &c_->plan->gsub_old_features; @@ -175,6 +177,7 @@ lookup_index_map = &c_->plan->gpos_lookups; script_langsys_map = &c_->plan->gpos_langsys; feature_index_map = &c_->plan->gpos_features; + feature_map_w_duplicates = &c_->plan->gpos_features_w_duplicates; feature_substitutes_map = &c_->plan->gpos_feature_substitutes_map; feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gpos_feature_record_cond_idx_map; catch_all_record_feature_idxes = &c_->plan->gpos_old_features; @@ -825,46 +828,9 @@ const Record_sanitize_closure_t *closure = nullptr) const { TRACE_SANITIZE (this); - if (unlikely (!(c->check_struct (this) && lookupIndex.sanitize (c)))) - return_trace (false); - hb_barrier (); - - /* Some earlier versions of Adobe tools calculated the offset of the - * FeatureParams subtable from the beginning of the FeatureList table! - * - * If sanitizing "failed" for the FeatureParams subtable, try it with the - * alternative location. We would know sanitize "failed" if old value - * of the offset was non-zero, but it's zeroed now. - * - * Only do this for the 'size' feature, since at the time of the faulty - * Adobe tools, only the 'size' feature had FeatureParams defined. - */ - - if (likely (featureParams.is_null ())) - return_trace (true); - - unsigned int orig_offset = featureParams; - if (unlikely (!featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE))) - return_trace (false); - hb_barrier (); - - if (featureParams == 0 && closure && - closure->tag == HB_TAG ('s','i','z','e') && - closure->list_base && closure->list_base < this) - { - unsigned int new_offset_int = orig_offset - - (((char *) this) - ((char *) closure->list_base)); - - Offset16To<FeatureParams> new_offset; - /* Check that it would not overflow. */ - new_offset = new_offset_int; - if (new_offset == new_offset_int && - c->try_set (&featureParams, new_offset_int) && - !featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE)) - return_trace (false); - } - - return_trace (true); + return_trace (c->check_struct (this) && + featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE) && + lookupIndex.sanitize (c)); } Offset16To<FeatureParams> @@ -1082,15 +1048,15 @@ if (unlikely (!c->serializer->extend_min (out))) return_trace (false); const uint32_t *v; - out->reqFeatureIndex = l->feature_index_map->has (reqFeatureIndex, &v) ? *v : 0xFFFFu; + out->reqFeatureIndex = l->feature_map_w_duplicates->has (reqFeatureIndex, &v) ? *v : 0xFFFFu; if (!l->visitFeatureIndex (featureIndex.len)) return_trace (false); auto it = + hb_iter (featureIndex) - | hb_filter (l->feature_index_map) - | hb_map (l->feature_index_map) + | hb_filter (l->feature_map_w_duplicates) + | hb_map (l->feature_map_w_duplicates) ; bool ret = bool (it); @@ -1337,7 +1303,7 @@ TRACE_DISPATCH (this, lookup_type); unsigned int count = get_subtable_count (); for (unsigned int i = 0; i < count; i++) { - typename context_t::return_t r = get_subtable<TSubTable> (i).dispatch (c, lookup_type, std::forward<Ts> (ds)...); + typename context_t::return_t r = get_subtable<TSubTable> (i).dispatch (c, lookup_type, ds...); if (c->stop_sublookup_iteration (r)) return_trace (r); } @@ -1387,6 +1353,11 @@ { unsigned new_flag = lookupFlag; new_flag &= ~LookupFlag::UseMarkFilteringSet; + // https://github.com/harfbuzz/harfbuzz/issues/5499 + // If we remove UseMarkFilteringSet flag because the set is now empty, + // we need to add IgnoreMarks flag, otherwise the lookup will not + // ignore any marks, which changes the behavior. + new_flag |= LookupFlag::IgnoreMarks; out->lookupFlag = new_flag; } else @@ -1425,7 +1396,7 @@ if (unlikely (!get_subtables<TSubTable> ().sanitize (c, this, get_type ()))) return_trace (false); - if (unlikely (get_type () == TSubTable::Extension && !c->get_edit_count ())) + if (unlikely (get_type () == TSubTable::Extension)) { hb_barrier (); @@ -1433,11 +1404,6 @@ * have the same type, which shall not be the Extension type * itself (but we already checked for that). * This is specially important if one has a reverse type! - * - * We only do this if sanitizer edit_count is zero. Otherwise, - * some of the subtables might have become insane after they - * were sanity-checked by the edits of subsequent subtables. - * https://bugs.chromium.org/p/chromium/issues/detail?id=960331 */ unsigned int type = get_subtable<TSubTable> (0).u.extension.get_type (); for (unsigned int i = 1; i < subtables; i++) @@ -2067,7 +2033,7 @@ unsigned int get (hb_codepoint_t k) const { return get_class (k); } unsigned int get_class (hb_codepoint_t glyph_id) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_class (glyph_id); case 2: hb_barrier (); return u.format2.get_class (glyph_id); #ifndef HB_NO_BEYOND_64K @@ -2078,7 +2044,7 @@ } } unsigned int get_class (hb_codepoint_t glyph_id, - hb_ot_lookup_cache_t *cache) const + hb_ot_layout_mapping_cache_t *cache) const { unsigned klass; if (cache && cache->get (glyph_id, &klass)) return klass; @@ -2089,7 +2055,7 @@ unsigned get_population () const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_population (); case 2: hb_barrier (); return u.format2.get_population (); #ifndef HB_NO_BEYOND_64K @@ -2142,7 +2108,7 @@ #ifndef HB_NO_BEYOND_64K if (glyph_max > 0xFFFFu) - u.format += 2; + u.format.v += 2; if (unlikely (glyph_max > 0xFFFFFFu)) #else if (unlikely (glyph_max > 0xFFFFu)) @@ -2152,9 +2118,9 @@ return_trace (false); } - u.format = format; + u.format.v = format; - switch (u.format) + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.serialize (c, it)); case 2: hb_barrier (); return_trace (u.format2.serialize (c, it)); @@ -2173,7 +2139,7 @@ const Coverage* glyph_filter = nullptr) const { TRACE_SUBSET (this); - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter)); case 2: hb_barrier (); return_trace (u.format2.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter)); #ifndef HB_NO_BEYOND_64K @@ -2187,9 +2153,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.sanitize (c)); case 2: hb_barrier (); return_trace (u.format2.sanitize (c)); #ifndef HB_NO_BEYOND_64K @@ -2202,7 +2168,7 @@ unsigned cost () const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.cost (); case 2: hb_barrier (); return u.format2.cost (); #ifndef HB_NO_BEYOND_64K @@ -2218,7 +2184,7 @@ template <typename set_t> bool collect_coverage (set_t *glyphs) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.collect_coverage (glyphs); case 2: hb_barrier (); return u.format2.collect_coverage (glyphs); #ifndef HB_NO_BEYOND_64K @@ -2234,7 +2200,7 @@ template <typename set_t> bool collect_class (set_t *glyphs, unsigned int klass) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.collect_class (glyphs, klass); case 2: hb_barrier (); return u.format2.collect_class (glyphs, klass); #ifndef HB_NO_BEYOND_64K @@ -2247,7 +2213,7 @@ bool intersects (const hb_set_t *glyphs) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.intersects (glyphs); case 2: hb_barrier (); return u.format2.intersects (glyphs); #ifndef HB_NO_BEYOND_64K @@ -2259,7 +2225,7 @@ } bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.intersects_class (glyphs, klass); case 2: hb_barrier (); return u.format2.intersects_class (glyphs, klass); #ifndef HB_NO_BEYOND_64K @@ -2272,7 +2238,7 @@ void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.intersected_class_glyphs (glyphs, klass, intersect_glyphs); case 2: hb_barrier (); return u.format2.intersected_class_glyphs (glyphs, klass, intersect_glyphs); #ifndef HB_NO_BEYOND_64K @@ -2285,7 +2251,7 @@ void intersected_classes (const hb_set_t *glyphs, hb_set_t *intersect_classes) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.intersected_classes (glyphs, intersect_classes); case 2: hb_barrier (); return u.format2.intersected_classes (glyphs, intersect_classes); #ifndef HB_NO_BEYOND_64K @@ -2299,7 +2265,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ ClassDefFormat1_3<SmallTypes> format1; ClassDefFormat2_4<SmallTypes> format2; #ifndef HB_NO_BEYOND_64K @@ -2308,7 +2274,7 @@ #endif } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; template<typename Iterator> @@ -2326,139 +2292,168 @@ { /* each byte represents a region, value is one of 0/1/2/4, which means bytes * needed for this region */ - hb_vector_t<uint8_t> chars; + struct chars_t : hb_vector_t<uint8_t> + { + int cmp (const chars_t& other) const + { + return as_array ().cmp (other.as_array ()); + } + + hb_pair_t<unsigned, unsigned> get_width () + { + unsigned width = 0; + unsigned columns = 0; + for (unsigned i = 0; i < length; i++) + { + unsigned v = arrayZ[i]; + width += v; + columns += (v != 0); + } + return hb_pair (width, columns); + } + + HB_HOT + hb_pair_t<unsigned, unsigned> combine_width (const chars_t& other) const + { + unsigned combined_width = 0; + unsigned combined_columns = 0; + for (unsigned i = 0; i < length; i++) + { + unsigned v = hb_max (arrayZ[i], other.arrayZ[i]); + combined_width += v; + combined_columns += (v != 0); + } + return hb_pair (combined_width, combined_columns); + } + }; + + hb_pair_t<unsigned, unsigned> combine_width (const delta_row_encoding_t& other_encoding) const { return chars.combine_width (other_encoding.chars); } + + // Actual data + + chars_t chars; unsigned width = 0; - hb_vector_t<uint8_t> columns; unsigned overhead = 0; hb_vector_t<const hb_vector_t<int>*> items; delta_row_encoding_t () = default; - delta_row_encoding_t (hb_vector_t<uint8_t>&& chars_, - const hb_vector_t<int>* row = nullptr) : - delta_row_encoding_t () + delta_row_encoding_t (hb_vector_t<const hb_vector_t<int>*> &&rows, unsigned num_cols) + { + assert (rows); + + items = std::move (rows); + if (unlikely (!chars.resize (num_cols))) + return; + + calculate_chars (); + } + + void merge (const delta_row_encoding_t& other) { - chars = std::move (chars_); - width = get_width (); - columns = get_columns (); - overhead = get_chars_overhead (columns); - if (row) items.push (row); + items.alloc (items.length + other.items.length); + for (auto &row : other.items) + add_row (row); + + // Merge chars + assert (chars.length == other.chars.length); + for (unsigned i = 0; i < chars.length; i++) + chars.arrayZ[i] = hb_max (chars.arrayZ[i], other.chars.arrayZ[i]); + chars_changed (); } - bool is_empty () const - { return !items; } + void chars_changed () + { + auto _ = chars.get_width (); + width = _.first; + overhead = get_chars_overhead (_.second); + } - static hb_vector_t<uint8_t> get_row_chars (const hb_vector_t<int>& row) + void calculate_chars () { - hb_vector_t<uint8_t> ret; - if (!ret.alloc (row.length)) return ret; + assert (items); bool long_words = false; - /* 0/1/2 byte encoding */ - for (int i = row.length - 1; i >= 0; i--) + for (auto &row : items) { - int v = row.arrayZ[i]; - if (v == 0) - ret.push (0); - else if (v > 32767 || v < -32768) + assert (row->length == chars.length); + + /* 0/1/2 byte encoding */ + for (unsigned i = 0; i < row->length; i++) { - long_words = true; - break; + int v = row->arrayZ[i]; + if (v == 0) + continue; + else if (v > 32767 || v < -32768) + { + long_words = true; + chars.arrayZ[i] = hb_max (chars.arrayZ[i], 4); + } + else if (v > 127 || v < -128) + chars.arrayZ[i] = hb_max (chars.arrayZ[i], 2); + else + chars.arrayZ[i] = hb_max (chars.arrayZ[i], 1); } - else if (v > 127 || v < -128) - ret.push (2); - else - ret.push (1); } - if (!long_words) - return ret; - - /* redo, 0/2/4 bytes encoding */ - ret.reset (); - for (int i = row.length - 1; i >= 0; i--) + if (long_words) { - int v = row.arrayZ[i]; - if (v == 0) - ret.push (0); - else if (v > 32767 || v < -32768) - ret.push (4); - else - ret.push (2); + // Convert 1s to 2s + for (auto &v : chars) + if (v == 1) + v = 2; } - return ret; - } - inline unsigned get_width () - { - unsigned ret = + hb_iter (chars) - | hb_reduce (hb_add, 0u) - ; - return ret; + chars_changed (); } - hb_vector_t<uint8_t> get_columns () - { - hb_vector_t<uint8_t> cols; - cols.alloc (chars.length); - for (auto v : chars) - { - uint8_t flag = v ? 1 : 0; - cols.push (flag); - } - return cols; - } + bool is_empty () const + { return !items; } - static inline unsigned get_chars_overhead (const hb_vector_t<uint8_t>& cols) + static inline unsigned get_chars_overhead (unsigned num_columns) { unsigned c = 4 + 6; // 4 bytes for LOffset, 6 bytes for VarData header - unsigned cols_bit_count = 0; - for (auto v : cols) - if (v) cols_bit_count++; - return c + cols_bit_count * 2; + return c + num_columns * 2; } - unsigned get_gain () const + unsigned get_gain (unsigned additional_bytes_per_rows = 1) const { int count = items.length; - return hb_max (0, (int) overhead - count); + return hb_max (0, (int) overhead - count * (int) additional_bytes_per_rows); } int gain_from_merging (const delta_row_encoding_t& other_encoding) const { - int combined_width = 0; - for (unsigned i = 0; i < chars.length; i++) - combined_width += hb_max (chars.arrayZ[i], other_encoding.chars.arrayZ[i]); + // Back of the envelope calculations to reject early. + signed additional_bytes_per_rows = other_encoding.width - width; + if (additional_bytes_per_rows > 0) + { + if (get_gain (additional_bytes_per_rows) == 0) + return 0; + } + else + { + if (other_encoding.get_gain (-additional_bytes_per_rows) == 0) + return 0; + } - hb_vector_t<uint8_t> combined_columns; - combined_columns.alloc (columns.length); - for (unsigned i = 0; i < columns.length; i++) - combined_columns.push (columns.arrayZ[i] | other_encoding.columns.arrayZ[i]); - - int combined_overhead = get_chars_overhead (combined_columns); - int combined_gain = (int) overhead + (int) other_encoding.overhead - combined_overhead - - (combined_width - (int) width) * items.length - - (combined_width - (int) other_encoding.width) * other_encoding.items.length; + auto pair = combine_width (other_encoding); + unsigned combined_width = pair.first; + unsigned combined_columns = pair.second; + + int combined_gain = (int) overhead + (int) other_encoding.overhead; + combined_gain -= (combined_width - (int) width) * items.length; + combined_gain -= (combined_width - (int) other_encoding.width) * other_encoding.items.length; + combined_gain -= get_chars_overhead (combined_columns); return combined_gain; } - static int cmp (const void *pa, const void *pb) - { - const delta_row_encoding_t *a = (const delta_row_encoding_t *)pa; - const delta_row_encoding_t *b = (const delta_row_encoding_t *)pb; - - int gain_a = a->get_gain (); - int gain_b = b->get_gain (); - - if (gain_a != gain_b) - return gain_a - gain_b; - - return (b->chars).as_array ().cmp ((a->chars).as_array ()); - } + bool add_row (const hb_vector_t<int>* row) + { return items.push (row); } - static int cmp_width (const void *pa, const void *pb) + static int cmp (const void *pa, const void *pb) { const delta_row_encoding_t *a = (const delta_row_encoding_t *)pa; const delta_row_encoding_t *b = (const delta_row_encoding_t *)pb; @@ -2466,11 +2461,8 @@ if (a->width != b->width) return (int) a->width - (int) b->width; - return (b->chars).as_array ().cmp ((a->chars).as_array ()); + return b->chars.cmp (a->chars); } - - bool add_row (const hb_vector_t<int>* row) - { return items.push (row); } }; struct VarRegionAxis @@ -2548,32 +2540,112 @@ DEFINE_SIZE_STATIC (8); }; -#define REGION_CACHE_ITEM_CACHE_INVALID INT_MIN -#define REGION_CACHE_ITEM_MULTIPLIER (float (1 << ((sizeof (int) * 8) - 2))) -#define REGION_CACHE_ITEM_DIVISOR (1.f / float (1 << ((sizeof (int) * 8) - 2))) - -struct VarRegionList +struct hb_scalar_cache_t { - using cache_t = hb_atomic_t<int>; + private: + static constexpr unsigned STATIC_LENGTH = 16; + static constexpr int INVALID = INT_MIN; + static constexpr float MULTIPLIER = 1 << ((sizeof (int) * 8) - 2); + static constexpr float DIVISOR = 1.f / MULTIPLIER; - float evaluate (unsigned int region_index, - const int *coords, unsigned int coord_len, - cache_t *cache = nullptr) const + public: + hb_scalar_cache_t () : length (STATIC_LENGTH) { clear (); } + + hb_scalar_cache_t (const hb_scalar_cache_t&) = delete; + hb_scalar_cache_t (hb_scalar_cache_t&&) = delete; + hb_scalar_cache_t& operator= (const hb_scalar_cache_t&) = delete; + hb_scalar_cache_t& operator= (hb_scalar_cache_t&&) = delete; + + static hb_scalar_cache_t *create (unsigned int count, + hb_scalar_cache_t *scratch_cache = nullptr) { - if (unlikely (region_index >= regionCount)) - return 0.; + if (!count) return (hb_scalar_cache_t *) &Null(hb_scalar_cache_t); - cache_t *cached_value = nullptr; - if (cache) + if (scratch_cache && count <= scratch_cache->length) { - cached_value = &(cache[region_index]); - if (*cached_value != REGION_CACHE_ITEM_CACHE_INVALID) - return *cached_value * REGION_CACHE_ITEM_DIVISOR; + scratch_cache->clear (); + return scratch_cache; } + auto *cache = (hb_scalar_cache_t *) hb_malloc (sizeof (hb_scalar_cache_t) - sizeof (static_values) + sizeof (static_values[0]) * count); + if (unlikely (!cache)) return (hb_scalar_cache_t *) &Null(hb_scalar_cache_t); + + cache->length = count; + cache->clear (); + + return cache; + } + + static void destroy (hb_scalar_cache_t *cache, + hb_scalar_cache_t *scratch_cache = nullptr) + { + if (cache != &Null(hb_scalar_cache_t) && cache != scratch_cache) + hb_free (cache); + } + + void clear () + { + auto *values = &static_values[0]; + unsigned i = 0; +#ifndef HB_OPTIMIZE_SIZE + for (; i + 3 < length; i += 4) + { + values[i + 0] = INVALID; + values[i + 1] = INVALID; + values[i + 2] = INVALID; + values[i + 3] = INVALID; + } +#endif + for (; i < length; i++) + values[i] = INVALID; + } + + HB_ALWAYS_INLINE + bool get (unsigned i, float *value) const + { + if (unlikely (i >= length)) + { + *value = 0.f; + return true; + } + auto *values = &static_values[0]; + auto *cached_value = &values[i]; + // Super hot. Most common path is that we have a cached value of 0. + int v = *cached_value; + if (likely (!v)) + { + *value = 0.f; + return true; + } + if (v == INVALID) + return false; + *value = v * DIVISOR; + return true; + } + + HB_ALWAYS_INLINE + void set (unsigned i, float value) + { + if (unlikely (i >= length)) return; + auto *values = &static_values[0]; + auto *cached_value = &values[i]; + *cached_value = roundf(value * MULTIPLIER); + } + + private: + unsigned length; + mutable hb_atomic_t<int> static_values[STATIC_LENGTH]; +}; + +struct VarRegionList +{ + private: + float evaluate_impl (unsigned int region_index, + const int *coords, unsigned int coord_len) const + { const VarRegionAxis *axes = axesZ.arrayZ + (region_index * axisCount); + float v = 1.f; - float v = 1.; unsigned int count = axisCount; for (unsigned int i = 0; i < count; i++) { @@ -2581,15 +2653,32 @@ float factor = axes[i].evaluate (coord); if (factor == 0.f) { - if (cache) - *cached_value = 0.; - return 0.; + v = 0.f; + break; } v *= factor; } + return v; + } + + public: + HB_ALWAYS_INLINE + float evaluate (unsigned int region_index, + const int *coords, unsigned int coord_len, + hb_scalar_cache_t *cache = nullptr) const + { + if (unlikely (region_index >= regionCount)) + return 0.; + + float v; + if (cache && cache->get (region_index, &v)) + return v; + + v = evaluate_impl (region_index, coords, coord_len); + if (cache) - *cached_value = v * REGION_CACHE_ITEM_MULTIPLIER; + cache->set (region_index, v); return v; } @@ -2732,29 +2821,24 @@ struct SparseVarRegionList { - using cache_t = hb_atomic_t<int>; - + HB_ALWAYS_INLINE float evaluate (unsigned int region_index, const int *coords, unsigned int coord_len, - cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { if (unlikely (region_index >= regions.len)) return 0.; - cache_t *cached_value = nullptr; - if (cache) - { - cached_value = &(cache[region_index]); - if (*cached_value != REGION_CACHE_ITEM_CACHE_INVALID) - return *cached_value * REGION_CACHE_ITEM_DIVISOR; - } + float v; + if (cache && cache->get (region_index, &v)) + return v; const SparseVariationRegion ®ion = this+regions[region_index]; - float v = region.evaluate (coords, coord_len); - + v = region.evaluate (coords, coord_len); if (cache) - *cached_value = v * REGION_CACHE_ITEM_MULTIPLIER; + cache->set (region_index, v); + return v; } @@ -2792,46 +2876,62 @@ + itemCount * get_row_size (); } - float get_delta (unsigned int inner, - const int *coords, unsigned int coord_count, - const VarRegionList ®ions, - VarRegionList::cache_t *cache = nullptr) const + float _get_delta (unsigned int inner, + const int *coords, unsigned int coord_count, + const VarRegionList ®ions, + hb_scalar_cache_t *cache = nullptr) const { if (unlikely (inner >= itemCount)) return 0.; + bool is_long = longWords (); + unsigned int count = regionIndices.len; + unsigned word_count = wordCount (); + unsigned int scount = is_long ? count : word_count; + unsigned int lcount = is_long ? word_count : 0; - unsigned int count = regionIndices.len; - bool is_long = longWords (); - unsigned word_count = wordCount (); - unsigned int scount = is_long ? count : word_count; - unsigned int lcount = is_long ? word_count : 0; + const HBUINT8 *bytes = get_delta_bytes (); + const HBUINT8 *row = bytes + inner * get_row_size (); - const HBUINT8 *bytes = get_delta_bytes (); - const HBUINT8 *row = bytes + inner * get_row_size (); + float delta = 0.; + unsigned int i = 0; - float delta = 0.; - unsigned int i = 0; + const HBINT32 *lcursor = reinterpret_cast<const HBINT32 *> (row); + for (; i < lcount; i++) + { + float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); + if (scalar) + delta += scalar * *lcursor; + lcursor++; + } + const HBINT16 *scursor = reinterpret_cast<const HBINT16 *> (lcursor); + for (; i < scount; i++) + { + float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); + if (scalar) + delta += scalar * *scursor; + scursor++; + } + const HBINT8 *bcursor = reinterpret_cast<const HBINT8 *> (scursor); + for (; i < count; i++) + { + float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); + if (scalar) + delta += scalar * *bcursor; + bcursor++; + } - const HBINT32 *lcursor = reinterpret_cast<const HBINT32 *> (row); - for (; i < lcount; i++) - { - float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); - delta += scalar * *lcursor++; - } - const HBINT16 *scursor = reinterpret_cast<const HBINT16 *> (lcursor); - for (; i < scount; i++) - { - float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); - delta += scalar * *scursor++; - } - const HBINT8 *bcursor = reinterpret_cast<const HBINT8 *> (scursor); - for (; i < count; i++) - { - float scalar = regions.evaluate (regionIndices.arrayZ[i], coords, coord_count, cache); - delta += scalar * *bcursor++; - } + return delta; + } - return delta; + HB_ALWAYS_INLINE + float get_delta (unsigned int inner, + const int *coords, unsigned int coord_count, + const VarRegionList ®ions, + hb_scalar_cache_t *cache = nullptr) const + { + unsigned int count = regionIndices.len; + if (!count) return 0.f; // This is quite common, so optimize it. + return _get_delta (inner, coords, coord_count, regions, cache); } void get_region_scalars (const int *coords, unsigned int coord_count, @@ -3150,7 +3250,7 @@ const int *coords, unsigned int coord_count, const SparseVarRegionList ®ions, hb_array_t<float> out, - SparseVarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { auto &deltaSets = StructAfter<decltype (deltaSetsX)> (regionIndices); @@ -3187,31 +3287,24 @@ struct ItemVariationStore { friend struct item_variations_t; - using cache_t = VarRegionList::cache_t; - cache_t *create_cache () const + hb_scalar_cache_t *create_cache () const { #ifdef HB_NO_VAR - return nullptr; + return hb_scalar_cache_t::create (0); #endif - unsigned count = (this+regions).regionCount; - if (!count) return nullptr; - - cache_t *cache = (cache_t *) hb_malloc (sizeof (float) * count); - if (unlikely (!cache)) return nullptr; - - for (unsigned i = 0; i < count; i++) - cache[i] = REGION_CACHE_ITEM_CACHE_INVALID; - - return cache; + return hb_scalar_cache_t::create ((this+regions).regionCount); } - static void destroy_cache (cache_t *cache) { hb_free (cache); } + static void destroy_cache (hb_scalar_cache_t *cache) + { + hb_scalar_cache_t::destroy (cache); + } private: float get_delta (unsigned int outer, unsigned int inner, const int *coords, unsigned int coord_count, - VarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { #ifdef HB_NO_VAR return 0.f; @@ -3229,7 +3322,7 @@ public: float get_delta (unsigned int index, const int *coords, unsigned int coord_count, - VarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { unsigned int outer = index >> 16; unsigned int inner = index & 0xFFFF; @@ -3237,7 +3330,7 @@ } float get_delta (unsigned int index, hb_array_t<const int> coords, - VarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { return get_delta (index, coords.arrayZ, coords.length, @@ -3356,7 +3449,7 @@ for (unsigned i = 0; i < count; i++) { hb_inc_bimap_t *map = inner_maps.push (); - if (!c->propagate_error(inner_maps)) + if (unlikely (!c->propagate_error(inner_maps))) return_trace(nullptr); auto &data = this+dataSets[i]; @@ -3445,43 +3538,28 @@ struct MultiItemVariationStore { - using cache_t = SparseVarRegionList::cache_t; - - cache_t *create_cache (hb_array_t<cache_t> static_cache = hb_array_t<cache_t> ()) const + hb_scalar_cache_t *create_cache (hb_scalar_cache_t *static_cache = nullptr) const { #ifdef HB_NO_VAR - return nullptr; + return hb_scalar_cache_t::create (0); #endif auto &r = this+regions; unsigned count = r.regions.len; - cache_t *cache; - if (count <= static_cache.length) - cache = static_cache.arrayZ; - else - { - cache = (cache_t *) hb_malloc (sizeof (float) * count); - if (unlikely (!cache)) return nullptr; - } - - for (unsigned i = 0; i < count; i++) - cache[i] = REGION_CACHE_ITEM_CACHE_INVALID; - - return cache; + return hb_scalar_cache_t::create (count, static_cache); } - static void destroy_cache (cache_t *cache, - hb_array_t<cache_t> static_cache = hb_array_t<cache_t> ()) + static void destroy_cache (hb_scalar_cache_t *cache, + hb_scalar_cache_t *static_cache = nullptr) { - if (cache != static_cache.arrayZ) - hb_free (cache); + hb_scalar_cache_t::destroy (cache, static_cache); } private: void get_delta (unsigned int outer, unsigned int inner, const int *coords, unsigned int coord_count, hb_array_t<float> out, - VarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { #ifdef HB_NO_VAR return; @@ -3501,7 +3579,7 @@ void get_delta (unsigned int index, const int *coords, unsigned int coord_count, hb_array_t<float> out, - VarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { unsigned int outer = index >> 16; unsigned int inner = index & 0xFFFF; @@ -3510,7 +3588,7 @@ void get_delta (unsigned int index, hb_array_t<const int> coords, hb_array_t<float> out, - VarRegionList::cache_t *cache = nullptr) const + hb_scalar_cache_t *cache = nullptr) const { return get_delta (index, coords.arrayZ, coords.length, @@ -3540,8 +3618,6 @@ DEFINE_SIZE_ARRAY_SIZED (8, dataSets); }; -#undef REGION_CACHE_ITEM_CACHE_INVALID - template <typename MapCountT> struct DeltaSetIndexMapFormat01 { @@ -3592,13 +3668,19 @@ return_trace (true); } + HB_ALWAYS_INLINE uint32_t map (unsigned int v) const /* Returns 16.16 outer.inner. */ { /* If count is zero, pass value unchanged. This takes * care of direct mapping for advance map. */ if (!mapCount) return v; + return _map (v); + } + HB_HOT + uint32_t _map (unsigned int v) const /* Returns 16.16 outer.inner. */ + { if (v >= mapCount) v = mapCount - 1; @@ -3654,8 +3736,8 @@ { TRACE_SERIALIZE (this); unsigned length = plan.get_output_map ().length; - u.format = length <= 0xFFFF ? 0 : 1; - switch (u.format) { + u.format.v = length <= 0xFFFF ? 0 : 1; + switch (u.format.v) { case 0: hb_barrier (); return_trace (u.format0.serialize (c, plan)); case 1: hb_barrier (); return_trace (u.format1.serialize (c, plan)); default:return_trace (false); @@ -3664,7 +3746,7 @@ uint32_t map (unsigned v) const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return (u.format0.map (v)); case 1: hb_barrier (); return (u.format1.map (v)); default:return v; @@ -3673,7 +3755,7 @@ unsigned get_map_count () const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return u.format0.get_map_count (); case 1: hb_barrier (); return u.format1.get_map_count (); default:return 0; @@ -3682,7 +3764,7 @@ unsigned get_width () const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return u.format0.get_width (); case 1: hb_barrier (); return u.format1.get_width (); default:return 0; @@ -3691,7 +3773,7 @@ unsigned get_inner_bit_count () const { - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return u.format0.get_inner_bit_count (); case 1: hb_barrier (); return u.format1.get_inner_bit_count (); default:return 0; @@ -3701,9 +3783,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return_trace (u.format0.sanitize (c)); case 1: hb_barrier (); return_trace (u.format1.sanitize (c)); default:return_trace (true); @@ -3713,7 +3795,7 @@ DeltaSetIndexMap* copy (hb_serialize_context_t *c) const { TRACE_SERIALIZE (this); - switch (u.format) { + switch (u.format.v) { case 0: hb_barrier (); return_trace (reinterpret_cast<DeltaSetIndexMap *> (u.format0.copy (c))); case 1: hb_barrier (); return_trace (reinterpret_cast<DeltaSetIndexMap *> (u.format1.copy (c))); default:return_trace (nullptr); @@ -3722,12 +3804,12 @@ protected: union { - HBUINT8 format; /* Format identifier */ + struct { HBUINT8 v; } format; /* Format identifier */ DeltaSetIndexMapFormat01<HBUINT16> format0; DeltaSetIndexMapFormat01<HBUINT32> format1; } u; public: - DEFINE_SIZE_UNION (1, format); + DEFINE_SIZE_UNION (1, format.v); }; @@ -3736,7 +3818,7 @@ ItemVarStoreInstancer (const ItemVariationStore *varStore_, const DeltaSetIndexMap *varIdxMap, hb_array_t<const int> coords, - VarRegionList::cache_t *cache = nullptr) : + hb_scalar_cache_t *cache = nullptr) : varStore (varStore_), varIdxMap (varIdxMap), coords (coords), cache (cache) { if (!varStore) @@ -3762,7 +3844,7 @@ const ItemVariationStore *varStore; const DeltaSetIndexMap *varIdxMap; hb_array_t<const int> coords; - VarRegionList::cache_t *cache; + hb_scalar_cache_t *cache; }; struct MultiItemVarStoreInstancer @@ -3770,7 +3852,7 @@ MultiItemVarStoreInstancer (const MultiItemVariationStore *varStore, const DeltaSetIndexMap *varIdxMap, hb_array_t<const int> coords, - SparseVarRegionList::cache_t *cache = nullptr) : + hb_scalar_cache_t *cache = nullptr) : varStore (varStore), varIdxMap (varIdxMap), coords (coords), cache (cache) { if (!varStore) @@ -3803,7 +3885,7 @@ const MultiItemVariationStore *varStore; const DeltaSetIndexMap *varIdxMap; hb_array_t<const int> coords; - SparseVarRegionList::cache_t *cache; + hb_scalar_cache_t *cache; }; @@ -4130,7 +4212,7 @@ bool evaluate (const int *coords, unsigned int coord_len, Instancer *instancer) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.evaluate (coords, coord_len, instancer); case 2: hb_barrier (); return u.format2.evaluate (coords, coord_len, instancer); case 3: hb_barrier (); return u.format3.evaluate (coords, coord_len, instancer); @@ -4143,7 +4225,7 @@ Cond_with_Var_flag_t keep_with_variations (hb_collect_feature_substitutes_with_var_context_t *c, hb_map_t *condition_map /* OUT */) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.keep_with_variations (c, condition_map); // TODO(subset) default: c->apply = false; return KEEP_COND_WITH_VAR; @@ -4153,9 +4235,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: hb_barrier (); return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: hb_barrier (); return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); case 3: hb_barrier (); return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); @@ -4168,9 +4250,9 @@ bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); + if (!u.format.v.sanitize (c)) return_trace (false); hb_barrier (); - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.sanitize (c)); case 2: hb_barrier (); return_trace (u.format2.sanitize (c)); case 3: hb_barrier (); return_trace (u.format3.sanitize (c)); @@ -4182,7 +4264,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ ConditionAxisRange format1; ConditionValue format2; ConditionAnd format3; @@ -4190,7 +4272,7 @@ ConditionNegate format5; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; template <typename Instancer> @@ -4353,7 +4435,7 @@ if (unlikely (!s->extend_min (this))) return_trace (false); uint32_t *new_feature_idx; - if (!c->feature_index_map->has (feature_index, &new_feature_idx)) + if (!c->feature_map_w_duplicates->has (feature_index, &new_feature_idx)) return_trace (false); if (!s->check_assign (featureIndex, *new_feature_idx, HB_SERIALIZE_ERROR_INT_OVERFLOW)) @@ -4371,7 +4453,7 @@ { TRACE_SUBSET (this); uint32_t *new_feature_index; - if (!c->feature_index_map->has (featureIndex, &new_feature_index)) + if (!c->feature_map_w_duplicates->has (featureIndex, &new_feature_index)) return_trace (false); auto *out = c->subset_context->serializer->embed (this); @@ -4645,7 +4727,7 @@ int keep_up_to = -1; for (int i = varRecords.len - 1; i >= 0; i--) { - if (varRecords[i].intersects_features (this, l->feature_index_map)) { + if (varRecords[i].intersects_features (this, l->feature_map_w_duplicates)) { keep_up_to = i; break; } @@ -4783,13 +4865,13 @@ hb_position_t get_x_delta (hb_font_t *font, const ItemVariationStore &store, - ItemVariationStore::cache_t *store_cache = nullptr) const - { return !font->num_coords ? 0 : font->em_scalef_x (get_delta (font, store, store_cache)); } + hb_scalar_cache_t *store_cache = nullptr) const + { return !font->has_nonzero_coords ? 0 : font->em_scalef_x (get_delta (font, store, store_cache)); } hb_position_t get_y_delta (hb_font_t *font, const ItemVariationStore &store, - ItemVariationStore::cache_t *store_cache = nullptr) const - { return !font->num_coords ? 0 : font->em_scalef_y (get_delta (font, store, store_cache)); } + hb_scalar_cache_t *store_cache = nullptr) const + { return !font->has_nonzero_coords ? 0 : font->em_scalef_y (get_delta (font, store, store_cache)); } VariationDevice* copy (hb_serialize_context_t *c, const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map) const @@ -4823,9 +4905,9 @@ float get_delta (hb_font_t *font, const ItemVariationStore &store, - ItemVariationStore::cache_t *store_cache = nullptr) const + hb_scalar_cache_t *store_cache = nullptr) const { - return store.get_delta (varIdx, font->coords, font->num_coords, (ItemVariationStore::cache_t *) store_cache); + return store.get_delta (varIdx, font->coords, font->num_coords, store_cache); } protected: @@ -4850,7 +4932,7 @@ { hb_position_t get_x_delta (hb_font_t *font, const ItemVariationStore &store=Null (ItemVariationStore), - ItemVariationStore::cache_t *store_cache = nullptr) const + hb_scalar_cache_t *store_cache = nullptr) const { switch (u.b.format) { @@ -4868,7 +4950,7 @@ } hb_position_t get_y_delta (hb_font_t *font, const ItemVariationStore &store=Null (ItemVariationStore), - ItemVariationStore::cache_t *store_cache = nullptr) const + hb_scalar_cache_t *store_cache = nullptr) const { switch (u.b.format) { @@ -4954,6 +5036,18 @@ } } + bool is_variation_device () const + { + switch (u.b.format) { +#ifndef HB_NO_VAR + case 0x8000: + return true; +#endif + default: + return false; + } + } + protected: union { DeviceHeader b; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gpos-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -63,12 +63,20 @@ c->set_lookup_index (lookup_index); c->set_lookup_props (l.get_props ()); + uint32_t stack_match_positions[8]; + hb_vector_t<uint32_t> saved_match_positions; + saved_match_positions.set_storage (stack_match_positions); + hb_swap (c->match_positions, saved_match_positions); + bool ret = false; auto *accel = gpos->get_accel (lookup_index); - ret = accel && accel->apply (c, l.get_subtable_count (), false); + ret = accel && accel->apply (c, false); c->set_lookup_index (saved_lookup_index); c->set_lookup_props (saved_lookup_props); + + hb_swap (c->match_positions, saved_match_positions); + return ret; } #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsub-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsub-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsub-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsub-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -76,12 +76,20 @@ c->set_lookup_index (lookup_index); c->set_lookup_props (l.get_props ()); + uint32_t stack_match_positions[8]; + hb_vector_t<uint32_t> saved_match_positions; + saved_match_positions.set_storage (stack_match_positions); + hb_swap (c->match_positions, saved_match_positions); + bool ret = false; auto *accel = gsub->get_accel (lookup_index); - ret = accel && accel->apply (c, l.get_subtable_count (), false); + ret = accel && accel->apply (c, false); c->set_lookup_index (saved_lookup_index); c->set_lookup_props (saved_lookup_props); + + hb_swap (c->match_positions, saved_match_positions); + return ret; } #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsubgpos.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsubgpos.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsubgpos.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout-gsubgpos.hh 2026-04-17 19:08:13.000000000 +0000 @@ -397,303 +397,311 @@ set_t *set; }; -struct hb_ot_apply_context_t : - hb_dispatch_context_t<hb_ot_apply_context_t, bool, HB_DEBUG_APPLY> +struct matcher_t { - struct matcher_t - { - typedef bool (*match_func_t) (hb_glyph_info_t &info, unsigned value, const void *data); + typedef bool (*match_func_t) (hb_glyph_info_t &info, unsigned value, const void *data); - void set_ignore_zwnj (bool ignore_zwnj_) { ignore_zwnj = ignore_zwnj_; } - void set_ignore_zwj (bool ignore_zwj_) { ignore_zwj = ignore_zwj_; } - void set_ignore_hidden (bool ignore_hidden_) { ignore_hidden = ignore_hidden_; } - void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; } - void set_mask (hb_mask_t mask_) { mask = mask_; } - void set_per_syllable (bool per_syllable_) { per_syllable = per_syllable_; } - void set_syllable (uint8_t syllable_) { syllable = per_syllable ? syllable_ : 0; } - void set_match_func (match_func_t match_func_, - const void *match_data_) - { match_func = match_func_; match_data = match_data_; } - - enum may_match_t { - MATCH_NO, - MATCH_YES, - MATCH_MAYBE - }; + template <typename context_t> + void init (const context_t *c, bool context_match = false) + { + set_match_func (nullptr, nullptr); + lookup_props = c->lookup_props; + /* Ignore ZWNJ if we are matching GPOS, or matching GSUB context and asked to. */ + ignore_zwnj = c->table_index == 1 || (context_match && c->auto_zwnj); + /* Ignore ZWJ if we are matching context, or asked to. */ + ignore_zwj = context_match || c->auto_zwj; + /* Ignore hidden glyphs (like CGJ) during GPOS. */ + ignore_hidden = c->table_index == 1; + mask = context_match ? -1 : c->lookup_mask; + /* Per syllable matching is only for GSUB. */ + per_syllable = c->table_index == 0 && c->per_syllable; + syllable = 0; + } + + void set_match_func (match_func_t match_func_, + const void *match_data_) + { match_func = match_func_; match_data = match_data_; } + + enum may_match_t { + MATCH_NO, + MATCH_YES, + MATCH_MAYBE + }; #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - may_match_t may_match (hb_glyph_info_t &info, - hb_codepoint_t glyph_data) const - { - if (!(info.mask & mask) || - (syllable && syllable != info.syllable ())) - return MATCH_NO; + may_match_t may_match (hb_glyph_info_t &info, + hb_codepoint_t glyph_data) const + { + if (!(info.mask & mask) || + (per_syllable && syllable && syllable != info.syllable ())) + return MATCH_NO; - if (match_func) - return match_func (info, glyph_data, match_data) ? MATCH_YES : MATCH_NO; + if (match_func) + return match_func (info, glyph_data, match_data) ? MATCH_YES : MATCH_NO; - return MATCH_MAYBE; - } + return MATCH_MAYBE; + } - enum may_skip_t { - SKIP_NO, - SKIP_YES, - SKIP_MAYBE - }; + enum may_skip_t { + SKIP_NO, + SKIP_YES, + SKIP_MAYBE + }; + template <typename context_t> #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - may_skip_t may_skip (const hb_ot_apply_context_t *c, - const hb_glyph_info_t &info) const - { - if (!c->check_glyph_property (&info, lookup_props)) - return SKIP_YES; + may_skip_t may_skip (const context_t *c, + const hb_glyph_info_t &info) const + { + if (!c->check_glyph_property (&info, lookup_props)) + return SKIP_YES; - if (unlikely (_hb_glyph_info_is_default_ignorable (&info) && - (ignore_zwnj || !_hb_glyph_info_is_zwnj (&info)) && - (ignore_zwj || !_hb_glyph_info_is_zwj (&info)) && - (ignore_hidden || !_hb_glyph_info_is_hidden (&info)))) - return SKIP_MAYBE; - - return SKIP_NO; - } - - protected: - unsigned int lookup_props = 0; - hb_mask_t mask = -1; - bool ignore_zwnj = false; - bool ignore_zwj = false; - bool ignore_hidden = false; - bool per_syllable = false; - uint8_t syllable = 0; - match_func_t match_func = nullptr; - const void *match_data = nullptr; - }; + if (unlikely (_hb_glyph_info_is_default_ignorable (&info) && + (ignore_zwnj || !_hb_glyph_info_is_zwnj (&info)) && + (ignore_zwj || !_hb_glyph_info_is_zwj (&info)) && + (ignore_hidden || !_hb_glyph_info_is_hidden (&info)))) + return SKIP_MAYBE; + + return SKIP_NO; + } - struct skipping_iterator_t + public: + unsigned int lookup_props = 0; + hb_mask_t mask = -1; + bool ignore_zwnj = false; + bool ignore_zwj = false; + bool ignore_hidden = false; + bool per_syllable = false; + uint8_t syllable = 0; + match_func_t match_func = nullptr; + const void *match_data = nullptr; +}; + +template <typename context_t> +struct skipping_iterator_t +{ + void init (context_t *c_, bool context_match = false) { - void init (hb_ot_apply_context_t *c_, bool context_match = false) - { - c = c_; - end = c->buffer->len; - match_glyph_data16 = nullptr; + c = c_; + end = c->buffer->len; + match_glyph_data16 = nullptr; #ifndef HB_NO_BEYOND_64K - match_glyph_data24 = nullptr; + match_glyph_data24 = nullptr; #endif - matcher.set_match_func (nullptr, nullptr); - matcher.set_lookup_props (c->lookup_props); - /* Ignore ZWNJ if we are matching GPOS, or matching GSUB context and asked to. */ - matcher.set_ignore_zwnj (c->table_index == 1 || (context_match && c->auto_zwnj)); - /* Ignore ZWJ if we are matching context, or asked to. */ - matcher.set_ignore_zwj (context_match || c->auto_zwj); - /* Ignore hidden glyphs (like CGJ) during GPOS. */ - matcher.set_ignore_hidden (c->table_index == 1); - matcher.set_mask (context_match ? -1 : c->lookup_mask); - /* Per syllable matching is only for GSUB. */ - matcher.set_per_syllable (c->table_index == 0 && c->per_syllable); - matcher.set_syllable (0); - } - void set_lookup_props (unsigned int lookup_props) - { - matcher.set_lookup_props (lookup_props); - } - void set_match_func (matcher_t::match_func_t match_func_, - const void *match_data_) - { - matcher.set_match_func (match_func_, match_data_); - } - void set_glyph_data (const HBUINT16 glyph_data[]) - { - match_glyph_data16 = glyph_data; + matcher.init (c, context_match); + } + void set_lookup_props (unsigned int lookup_props) + { + matcher.lookup_props = lookup_props; + } + void set_match_func (matcher_t::match_func_t match_func_, + const void *match_data_) + { + matcher.set_match_func (match_func_, match_data_); + } + void set_glyph_data (const HBUINT16 glyph_data[]) + { + match_glyph_data16 = glyph_data; #ifndef HB_NO_BEYOND_64K - match_glyph_data24 = nullptr; + match_glyph_data24 = nullptr; #endif - } + } #ifndef HB_NO_BEYOND_64K - void set_glyph_data (const HBUINT24 glyph_data[]) - { - match_glyph_data16 = nullptr; - match_glyph_data24 = glyph_data; - } + void set_glyph_data (const HBUINT24 glyph_data[]) + { + match_glyph_data16 = nullptr; + match_glyph_data24 = glyph_data; + } #endif #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - void reset (unsigned int start_index_) - { - idx = start_index_; - end = c->buffer->len; - matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0); - } + void reset (unsigned int start_index_) + { + // For GSUB forward iterator + idx = start_index_; + end = c->buffer->len; + matcher.syllable = c->buffer->cur().syllable(); + } + void reset_back (unsigned int start_index_, bool from_out_buffer = false) + { + // For GSUB backward iterator + idx = start_index_; + matcher.syllable = c->buffer->cur().syllable(); + } #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - void reset_fast (unsigned int start_index_) - { - // Doesn't set end or syllable. Used by GPOS which doesn't care / change. - idx = start_index_; - } - - void reject () - { - backup_glyph_data (); - } + void reset_fast (unsigned int start_index_) + { + // Doesn't set end or syllable. Used by GPOS which doesn't care / change. + idx = start_index_; + } - matcher_t::may_skip_t #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - may_skip (const hb_glyph_info_t &info) const - { return matcher.may_skip (c, info); } + matcher_t::may_skip_t may_skip (const hb_glyph_info_t &info) const + { return matcher.may_skip (c, info); } - enum match_t { - MATCH, - NOT_MATCH, - SKIP - }; + enum match_t { + MATCH, + NOT_MATCH, + SKIP + }; #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - match_t match (hb_glyph_info_t &info) - { - matcher_t::may_skip_t skip = matcher.may_skip (c, info); - if (unlikely (skip == matcher_t::SKIP_YES)) - return SKIP; - - matcher_t::may_match_t match = matcher.may_match (info, get_glyph_data ()); - if (match == matcher_t::MATCH_YES || - (match == matcher_t::MATCH_MAYBE && - skip == matcher_t::SKIP_NO)) - return MATCH; + match_t match (hb_glyph_info_t &info) + { + matcher_t::may_skip_t skip = matcher.may_skip (c, info); + if (unlikely (skip == matcher_t::SKIP_YES)) + return SKIP; - if (skip == matcher_t::SKIP_NO) - return NOT_MATCH; + matcher_t::may_match_t match = matcher.may_match (info, get_glyph_data ()); + if (match == matcher_t::MATCH_YES || + (match == matcher_t::MATCH_MAYBE && + skip == matcher_t::SKIP_NO)) + return MATCH; - return SKIP; + if (skip == matcher_t::SKIP_NO) + return NOT_MATCH; + + return SKIP; } #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - bool next (unsigned *unsafe_to = nullptr) + bool next (unsigned *unsafe_to = nullptr) + { + auto *info = c->buffer->info; + const signed stop = (signed) end - 1; + while ((signed) idx < stop) { - const signed stop = (signed) end - 1; - while ((signed) idx < stop) + idx++; + switch (match (info[idx])) { - idx++; - switch (match (c->buffer->info[idx])) + case MATCH: { - case MATCH: - { - advance_glyph_data (); - return true; - } - case NOT_MATCH: - { - if (unsafe_to) - *unsafe_to = idx + 1; - return false; - } - case SKIP: - continue; + advance_glyph_data (); + return true; + } + case NOT_MATCH: + { + if (unsafe_to) + *unsafe_to = idx + 1; + return false; } + case SKIP: + continue; } - if (unsafe_to) - *unsafe_to = end; - return false; } + if (unsafe_to) + *unsafe_to = end; + return false; + } #ifndef HB_OPTIMIZE_SIZE - HB_ALWAYS_INLINE + HB_ALWAYS_INLINE #endif - bool prev (unsigned *unsafe_from = nullptr) + bool prev (unsigned *unsafe_from = nullptr) + { + auto *out_info = c->buffer->out_info; + const unsigned stop = 0; + while (idx > stop) { - const unsigned stop = 0; - while (idx > stop) + idx--; + switch (match (out_info[idx])) { - idx--; - switch (match (c->buffer->out_info[idx])) + case MATCH: { - case MATCH: - { - advance_glyph_data (); - return true; - } - case NOT_MATCH: - { - if (unsafe_from) - *unsafe_from = hb_max (1u, idx) - 1u; - return false; - } - case SKIP: - continue; + advance_glyph_data (); + return true; + } + case NOT_MATCH: + { + if (unsafe_from) + *unsafe_from = hb_max (1u, idx) - 1u; + return false; } + case SKIP: + continue; } - if (unsafe_from) - *unsafe_from = 0; - return false; } + if (unsafe_from) + *unsafe_from = 0; + return false; + } - HB_ALWAYS_INLINE - hb_codepoint_t - get_glyph_data () - { - if (match_glyph_data16) return *match_glyph_data16; -#ifndef HB_NO_BEYOND_64K - else - if (match_glyph_data24) return *match_glyph_data24; -#endif - return 0; - } - HB_ALWAYS_INLINE - void - advance_glyph_data () - { - if (match_glyph_data16) match_glyph_data16++; + HB_ALWAYS_INLINE + hb_codepoint_t + get_glyph_data () + { + if (match_glyph_data16) return *match_glyph_data16; #ifndef HB_NO_BEYOND_64K - else - if (match_glyph_data24) match_glyph_data24++; + else + if (match_glyph_data24) return *match_glyph_data24; #endif - } - void - backup_glyph_data () - { - if (match_glyph_data16) match_glyph_data16--; + return 0; + } + HB_ALWAYS_INLINE + void + advance_glyph_data () + { + if (match_glyph_data16) match_glyph_data16++; #ifndef HB_NO_BEYOND_64K - else - if (match_glyph_data24) match_glyph_data24--; + else + if (match_glyph_data24) match_glyph_data24++; #endif - } + } - unsigned int idx; - protected: - hb_ot_apply_context_t *c; - matcher_t matcher; - const HBUINT16 *match_glyph_data16; + unsigned int idx; + protected: + context_t *c; + matcher_t matcher; + const HBUINT16 *match_glyph_data16; #ifndef HB_NO_BEYOND_64K - const HBUINT24 *match_glyph_data24; + const HBUINT24 *match_glyph_data24; #endif - unsigned int end; - }; - + unsigned int end; +}; +struct hb_ot_apply_context_t : + hb_dispatch_context_t<hb_ot_apply_context_t, bool, HB_DEBUG_APPLY> +{ const char *get_name () { return "APPLY"; } typedef return_t (*recurse_func_t) (hb_ot_apply_context_t *c, unsigned int lookup_index); + + template <typename T> + static inline auto apply_ (const T &obj, hb_ot_apply_context_t *c, hb_priority<1>) HB_RETURN (return_t, obj.apply (c, nullptr) ) + template <typename T> + static inline auto apply_ (const T &obj, hb_ot_apply_context_t *c, hb_priority<0>) HB_RETURN (return_t, obj.apply (c) ) template <typename T> - return_t dispatch (const T &obj) { return obj.apply (this); } + return_t dispatch (const T &obj) { return apply_(obj, this, hb_prioritize); } + static return_t default_return_value () { return false; } bool stop_sublookup_iteration (return_t r) const { return r; } return_t recurse (unsigned int sub_lookup_index) { - if (unlikely (nesting_level_left == 0 || !recurse_func || buffer->max_ops-- <= 0)) + assert (recurse_func); + if (unlikely (nesting_level_left == 0)) + { + buffer->successful = false; + return default_return_value (); + } + + buffer->max_ops--; + if (unlikely (buffer->max_ops < 0)) { - buffer->shaping_failed = true; + buffer->successful = false; return default_return_value (); } @@ -703,7 +711,7 @@ return ret; } - skipping_iterator_t iter_input, iter_context; + skipping_iterator_t<hb_ot_apply_context_t> iter_input, iter_context; unsigned int table_index; /* GSUB/GPOS */ hb_font_t *font; @@ -715,8 +723,7 @@ const GDEF::accelerator_t &gdef_accel; const hb_ot_layout_lookup_accelerator_t *lookup_accel = nullptr; const ItemVariationStore &var_store; - ItemVariationStore::cache_t *var_store_cache; - hb_set_digest_t digest; + hb_scalar_cache_t *var_store_cache; hb_direction_t direction; hb_mask_t lookup_mask = 1; @@ -734,11 +741,14 @@ signed last_base = -1; // GPOS uses unsigned last_base_until = 0; // GPOS uses + hb_vector_t<uint32_t> match_positions; + uint32_t stack_match_positions[8]; + hb_ot_apply_context_t (unsigned int table_index_, hb_font_t *font_, hb_buffer_t *buffer_, hb_blob_t *table_blob_, - ItemVariationStore::cache_t *var_store_cache_ = nullptr) : + hb_scalar_cache_t *var_store_cache_ = nullptr) : table_index (table_index_), font (font_), face (font->face), buffer (buffer_), sanitizer (table_blob_), @@ -762,7 +772,7 @@ has_glyph_classes (gdef.has_glyph_classes ()) { init_iters (); - buffer->collect_codepoints (digest); + match_positions.set_storage (stack_match_positions); } void init_iters () @@ -778,7 +788,11 @@ void set_random (bool random_) { random = random_; } void set_recurse_func (recurse_func_t func) { recurse_func = func; } void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; } - void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; init_iters (); } + void set_lookup_props (unsigned int lookup_props_) + { + lookup_props = gdef_accel.sanitize_lookup_props (lookup_props_); + init_iters (); + } uint32_t random_number () { @@ -787,7 +801,9 @@ return buffer->random_state; } - bool match_properties_mark (hb_codepoint_t glyph, + HB_ALWAYS_INLINE + HB_HOT + bool match_properties_mark (const hb_glyph_info_t *info, unsigned int glyph_props, unsigned int match_props) const { @@ -795,7 +811,7 @@ * match_props has the set index. */ if (match_props & LookupFlag::UseMarkFilteringSet) - return gdef_accel.mark_set_covers (match_props >> 16, glyph); + return gdef_accel.mark_set_covers (match_props >> 16, info->codepoint); /* The second byte of match_props has the meaning * "ignore marks of attachment type different than @@ -811,7 +827,7 @@ HB_ALWAYS_INLINE #endif bool check_glyph_property (const hb_glyph_info_t *info, - unsigned int match_props) const + unsigned match_props) const { unsigned int glyph_props = _hb_glyph_info_get_glyph_props (info); @@ -821,8 +837,8 @@ if (glyph_props & match_props & LookupFlag::IgnoreFlags) return false; - if (unlikely (glyph_props & HB_OT_LAYOUT_GLYPH_PROPS_MARK)) - return match_properties_mark (info->codepoint, glyph_props, match_props); + if (glyph_props & HB_OT_LAYOUT_GLYPH_PROPS_MARK) + return match_properties_mark (info, glyph_props, match_props); return true; } @@ -832,7 +848,7 @@ bool ligature = false, bool component = false) { - digest.add (glyph_index); + buffer->digest.add (glyph_index); if (new_syllables != (unsigned) -1) buffer->cur().syllable() = new_syllables; @@ -890,54 +906,58 @@ } }; -enum class hb_ot_lookup_cache_op_t +enum class hb_ot_subtable_cache_op_t { - CREATE, ENTER, LEAVE, - DESTROY, }; struct hb_accelerate_subtables_context_t : hb_dispatch_context_t<hb_accelerate_subtables_context_t> { - template <typename Type> - static inline bool apply_to (const void *obj, hb_ot_apply_context_t *c) + template <typename T> + static inline auto apply_ (const T *obj, hb_ot_apply_context_t *c, void *external_cache, hb_priority<1>) HB_RETURN (bool, obj->apply (c, external_cache) ) + template <typename T> + static inline auto apply_ (const T *obj, hb_ot_apply_context_t *c, void *external_cache, hb_priority<0>) HB_RETURN (bool, obj->apply (c) ) + template <typename T> + static inline bool apply_to (const void *obj, hb_ot_apply_context_t *c, void *external_cache) { - const Type *typed_obj = (const Type *) obj; - return typed_obj->apply (c); + const T *typed_obj = (const T *) obj; + return apply_ (typed_obj, c, external_cache, hb_prioritize); } #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE template <typename T> - static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, hb_priority<1>) HB_RETURN (bool, obj->apply_cached (c) ) + static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, void *external_cache, hb_priority<2>) HB_RETURN (bool, obj->apply_cached (c, external_cache) ) template <typename T> - static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, hb_priority<0>) HB_RETURN (bool, obj->apply (c) ) - template <typename Type> - static inline bool apply_cached_to (const void *obj, hb_ot_apply_context_t *c) + static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, void *external_cache, hb_priority<1>) HB_RETURN (bool, obj->apply (c, external_cache) ) + template <typename T> + static inline auto apply_cached_ (const T *obj, hb_ot_apply_context_t *c, void *external_cache, hb_priority<0>) HB_RETURN (bool, obj->apply (c) ) + template <typename T> + static inline bool apply_cached_to (const void *obj, hb_ot_apply_context_t *c, void *external_cache) { - const Type *typed_obj = (const Type *) obj; - return apply_cached_ (typed_obj, c, hb_prioritize); + const T *typed_obj = (const T *) obj; + return apply_cached_ (typed_obj, c, external_cache, hb_prioritize); } template <typename T> - static inline auto cache_func_ (void *p, - hb_ot_lookup_cache_op_t op, - hb_priority<1>) HB_RETURN (void *, T::cache_func (p, op) ) + static inline auto cache_func_ (hb_ot_apply_context_t *c, + hb_ot_subtable_cache_op_t op, + hb_priority<1>) HB_RETURN (bool, T::cache_func (c, op) ) template <typename T=void> - static inline void * cache_func_ (void *p, - hb_ot_lookup_cache_op_t op HB_UNUSED, - hb_priority<0>) { return (void *) false; } + static inline bool cache_func_ (hb_ot_apply_context_t *c, + hb_ot_subtable_cache_op_t op HB_UNUSED, + hb_priority<0>) { return false; } template <typename Type> - static inline void * cache_func_to (void *p, - hb_ot_lookup_cache_op_t op) + static inline bool cache_func_to (hb_ot_apply_context_t *c, + hb_ot_subtable_cache_op_t op) { - return cache_func_<Type> (p, op, hb_prioritize); + return cache_func_<Type> (c, op, hb_prioritize); } #endif - typedef bool (*hb_apply_func_t) (const void *obj, hb_ot_apply_context_t *c); - typedef void * (*hb_cache_func_t) (void *p, hb_ot_lookup_cache_op_t op); + typedef bool (*hb_apply_func_t) (const void *obj, hb_ot_apply_context_t *c, void *external_cache); + typedef bool (*hb_cache_func_t) (hb_ot_apply_context_t *c, hb_ot_subtable_cache_op_t op); struct hb_applicable_t { @@ -950,6 +970,7 @@ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE , hb_apply_func_t apply_cached_func_ , hb_cache_func_t cache_func_ + , void *external_cache_ #endif ) { @@ -958,27 +979,34 @@ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE apply_cached_func = apply_cached_func_; cache_func = cache_func_; + external_cache = external_cache_; #endif digest.init (); obj_.get_coverage ().collect_coverage (&digest); } +#ifdef HB_NO_OT_LAYOUT_LOOKUP_CACHE bool apply (hb_ot_apply_context_t *c) const { - return digest.may_have (c->buffer->cur().codepoint) && apply_func (obj, c); + return digest.may_have (c->buffer->cur().codepoint) && apply_func (obj, c, nullptr); + } +#else + bool apply (hb_ot_apply_context_t *c) const + { + return digest.may_have (c->buffer->cur().codepoint) && apply_func (obj, c, external_cache); } -#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE bool apply_cached (hb_ot_apply_context_t *c) const { - return digest.may_have (c->buffer->cur().codepoint) && apply_cached_func (obj, c); + return digest.may_have (c->buffer->cur().codepoint) && apply_cached_func (obj, c, external_cache); } + bool cache_enter (hb_ot_apply_context_t *c) const { - return (bool) cache_func (c, hb_ot_lookup_cache_op_t::ENTER); + return cache_func (c, hb_ot_subtable_cache_op_t::ENTER); } void cache_leave (hb_ot_apply_context_t *c) const { - cache_func (c, hb_ot_lookup_cache_op_t::LEAVE); + cache_func (c, hb_ot_subtable_cache_op_t::LEAVE); } #endif @@ -988,6 +1016,7 @@ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE hb_apply_func_t apply_cached_func; hb_cache_func_t cache_func; + void *external_cache; #endif hb_set_digest_t digest; }; @@ -997,12 +1026,23 @@ auto cache_cost (const T &obj, hb_priority<1>) HB_AUTO_RETURN ( obj.cache_cost () ) template <typename T> auto cache_cost (const T &obj, hb_priority<0>) HB_AUTO_RETURN ( 0u ) + + template <typename T> + auto external_cache_create (const T &obj, hb_priority<1>) HB_AUTO_RETURN ( obj.external_cache_create () ) + template <typename T> + auto external_cache_create (const T &obj, hb_priority<0>) HB_AUTO_RETURN ( nullptr ) #endif /* Dispatch interface. */ template <typename T> return_t dispatch (const T &obj) { +#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE + void *external_cache = nullptr; + if (i < 8) + external_cache = external_cache_create (obj, hb_prioritize); +#endif + hb_applicable_t *entry = &array[i++]; entry->init (obj, @@ -1010,6 +1050,7 @@ #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE , apply_cached_to<T> , cache_func_to<T> + , external_cache #endif ); @@ -1023,10 +1064,10 @@ * and we allocate the cache opportunity to the costliest subtable. */ unsigned cost = cache_cost (obj, hb_prioritize); - if (cost > cache_user_cost) + if (cost > subtable_cache_user_cost) { - cache_user_idx = i - 1; - cache_user_cost = cost; + subtable_cache_user_idx = i - 1; + subtable_cache_user_cost = cost; } #endif @@ -1041,8 +1082,8 @@ unsigned i = 0; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - unsigned cache_user_idx = (unsigned) -1; - unsigned cache_user_cost = 0; + unsigned subtable_cache_user_idx = (unsigned) -1; + unsigned subtable_cache_user_cost = 0; #endif }; @@ -1191,38 +1232,50 @@ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); return class_def.get_class (info.codepoint) == value; } -static inline bool match_class_cached (hb_glyph_info_t &info, unsigned value, const void *data) +static inline unsigned get_class_cached (const ClassDef &class_def, hb_glyph_info_t &info) { unsigned klass = info.syllable(); if (klass < 255) - return klass == value; - const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return klass; klass = class_def.get_class (info.codepoint); if (likely (klass < 255)) info.syllable() = klass; - return klass == value; + return klass; } -static inline bool match_class_cached1 (hb_glyph_info_t &info, unsigned value, const void *data) +static inline bool match_class_cached (hb_glyph_info_t &info, unsigned value, const void *data) +{ + const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return get_class_cached (class_def, info) == value; +} +static inline unsigned get_class_cached1 (const ClassDef &class_def, hb_glyph_info_t &info) { unsigned klass = info.syllable() & 0x0F; if (klass < 15) - return klass == value; - const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return klass; klass = class_def.get_class (info.codepoint); if (likely (klass < 15)) info.syllable() = (info.syllable() & 0xF0) | klass; - return klass == value; + return klass; } -static inline bool match_class_cached2 (hb_glyph_info_t &info, unsigned value, const void *data) +static inline bool match_class_cached1 (hb_glyph_info_t &info, unsigned value, const void *data) +{ + const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return get_class_cached1 (class_def, info) == value; +} +static inline unsigned get_class_cached2 (const ClassDef &class_def, hb_glyph_info_t &info) { unsigned klass = (info.syllable() & 0xF0) >> 4; if (klass < 15) - return klass == value; - const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return klass; klass = class_def.get_class (info.codepoint); if (likely (klass < 15)) info.syllable() = (info.syllable() & 0x0F) | (klass << 4); - return klass == value; + return klass; +} +static inline bool match_class_cached2 (hb_glyph_info_t &info, unsigned value, const void *data) +{ + const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return get_class_cached2 (class_def, info) == value; } static inline bool match_coverage (hb_glyph_info_t &info, unsigned value, const void *data) { @@ -1261,16 +1314,24 @@ match_func_t match_func, const void *match_data, unsigned int *end_position, - unsigned int *match_positions, unsigned int *p_total_component_count = nullptr) { TRACE_APPLY (nullptr); - if (unlikely (count > HB_MAX_CONTEXT_LENGTH)) return_trace (false); - hb_buffer_t *buffer = c->buffer; - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + if (count == 1) + { + *end_position = buffer->idx + 1; + c->match_positions[0] = buffer->idx; + if (p_total_component_count) + *p_total_component_count = _hb_glyph_info_get_lig_num_comps (&buffer->cur()); + return_trace (true); + } + + if (unlikely (count > HB_MAX_CONTEXT_LENGTH)) return_trace (false); + + auto &skippy_iter = c->iter_input; skippy_iter.reset (buffer->idx); skippy_iter.set_match_func (match_func, match_data); skippy_iter.set_glyph_data (input); @@ -1319,7 +1380,10 @@ return_trace (false); } - match_positions[i] = skippy_iter.idx; + if (unlikely (i + 1 > c->match_positions.length && + !c->match_positions.resize_dirty (i + 1))) + return_trace (false); + c->match_positions.arrayZ[i] = skippy_iter.idx; unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx]); unsigned int this_lig_comp = _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]); @@ -1349,7 +1413,7 @@ j--; } - if (found && skippy_iter.may_skip (out[j]) == hb_ot_apply_context_t::matcher_t::SKIP_YES) + if (found && skippy_iter.may_skip (out[j]) == matcher_t::SKIP_YES) ligbase = LIGBASE_MAY_SKIP; else ligbase = LIGBASE_MAY_NOT_SKIP; @@ -1379,13 +1443,12 @@ *p_total_component_count = total_component_count; } - match_positions[0] = buffer->idx; + c->match_positions.arrayZ[0] = buffer->idx; return_trace (true); } static inline bool ligate_input (hb_ot_apply_context_t *c, unsigned int count, /* Including the first glyph */ - const unsigned int *match_positions, /* Including the first glyph */ unsigned int match_end, hb_codepoint_t lig_glyph, unsigned int total_component_count) @@ -1428,10 +1491,10 @@ * https://bugzilla.gnome.org/show_bug.cgi?id=437633 */ - bool is_base_ligature = _hb_glyph_info_is_base_glyph (&buffer->info[match_positions[0]]); - bool is_mark_ligature = _hb_glyph_info_is_mark (&buffer->info[match_positions[0]]); + bool is_base_ligature = _hb_glyph_info_is_base_glyph (&buffer->info[c->match_positions.arrayZ[0]]); + bool is_mark_ligature = _hb_glyph_info_is_mark (&buffer->info[c->match_positions.arrayZ[0]]); for (unsigned int i = 1; i < count; i++) - if (!_hb_glyph_info_is_mark (&buffer->info[match_positions[i]])) + if (!_hb_glyph_info_is_mark (&buffer->info[c->match_positions.arrayZ[i]])) { is_base_ligature = false; is_mark_ligature = false; @@ -1457,7 +1520,7 @@ for (unsigned int i = 1; i < count; i++) { - while (buffer->idx < match_positions[i] && buffer->successful) + while (buffer->idx < c->match_positions.arrayZ[i] && buffer->successful) { if (is_ligature) { @@ -1512,8 +1575,14 @@ { TRACE_APPLY (nullptr); - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context; - skippy_iter.reset (c->buffer->backtrack_len ()); + if (!count) + { + *match_start = c->buffer->backtrack_len (); + return_trace (true); + } + + auto &skippy_iter = c->iter_context; + skippy_iter.reset_back (c->buffer->backtrack_len ()); skippy_iter.set_match_func (match_func, match_data); skippy_iter.set_glyph_data (backtrack); @@ -1545,7 +1614,13 @@ { TRACE_APPLY (nullptr); - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context; + if (!count) + { + *end_index = start_index; + return_trace (true); + } + + auto &skippy_iter = c->iter_context; assert (start_index >= 1); skippy_iter.reset (start_index - 1); skippy_iter.set_match_func (match_func, match_data); @@ -1696,7 +1771,6 @@ static inline void apply_lookup (hb_ot_apply_context_t *c, unsigned int count, /* Including the first glyph */ - unsigned int *match_positions, /* Including the first glyph */ unsigned int lookupCount, const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */ unsigned int match_end) @@ -1704,9 +1778,6 @@ hb_buffer_t *buffer = c->buffer; int end; - unsigned int *match_positions_input = match_positions; - unsigned int match_positions_count = count; - /* All positions are distance from beginning of *output* buffer. * Adjust. */ { @@ -1716,7 +1787,7 @@ int delta = bl - buffer->idx; /* Convert positions to new indexing. */ for (unsigned int j = 0; j < count; j++) - match_positions[j] += delta; + c->match_positions.arrayZ[j] += delta; } for (unsigned int i = 0; i < lookupCount && buffer->successful; i++) @@ -1728,10 +1799,10 @@ unsigned int orig_len = buffer->backtrack_len () + buffer->lookahead_len (); /* This can happen if earlier recursed lookups deleted many entries. */ - if (unlikely (match_positions[idx] >= orig_len)) + if (unlikely (c->match_positions.arrayZ[idx] >= orig_len)) continue; - if (unlikely (!buffer->move_to (match_positions[idx]))) + if (unlikely (!buffer->move_to (c->match_positions.arrayZ[idx]))) break; if (unlikely (buffer->max_ops <= 0)) @@ -1790,9 +1861,9 @@ */ end += delta; - if (end < int (match_positions[idx])) + if (end < int (c->match_positions.arrayZ[idx])) { - /* End might end up being smaller than match_positions[idx] if the recursed + /* End might end up being smaller than match_positions.arrayZ[idx] if the recursed * lookup ended up removing many items. * Just never rewind end beyond start of current position, since that is * not possible in the recursed lookup. Also adjust delta as such. @@ -1800,8 +1871,8 @@ * https://bugs.chromium.org/p/chromium/issues/detail?id=659496 * https://github.com/harfbuzz/harfbuzz/issues/1611 */ - delta += match_positions[idx] - end; - end = match_positions[idx]; + delta += c->match_positions.arrayZ[idx] - end; + end = c->match_positions.arrayZ[idx]; } unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */ @@ -1810,27 +1881,9 @@ { if (unlikely (delta + count > HB_MAX_CONTEXT_LENGTH)) break; - if (unlikely (delta + count > match_positions_count)) - { - unsigned new_match_positions_count = hb_max (delta + count, hb_max(match_positions_count, 4u) * 1.5); - if (match_positions == match_positions_input) - { - match_positions = (unsigned int *) hb_malloc (new_match_positions_count * sizeof (match_positions[0])); - if (unlikely (!match_positions)) - break; - memcpy (match_positions, match_positions_input, count * sizeof (match_positions[0])); - match_positions_count = new_match_positions_count; - } - else - { - unsigned int *new_match_positions = (unsigned int *) hb_realloc (match_positions, new_match_positions_count * sizeof (match_positions[0])); - if (unlikely (!new_match_positions)) - break; - match_positions = new_match_positions; - match_positions_count = new_match_positions_count; - } - } - + if (unlikely (count + delta > c->match_positions.length && + !c->match_positions.resize_dirty (count + delta))) + return; } else { @@ -1840,23 +1893,20 @@ } /* Shift! */ - memmove (match_positions + next + delta, match_positions + next, - (count - next) * sizeof (match_positions[0])); + memmove (c->match_positions + next + delta, c->match_positions + next, + (count - next) * sizeof (c->match_positions.arrayZ[0])); next += delta; count += delta; /* Fill in new entries. */ for (unsigned int j = idx + 1; j < next; j++) - match_positions[j] = match_positions[j - 1] + 1; + c->match_positions.arrayZ[j] = c->match_positions.arrayZ[j - 1] + 1; /* And fixup the rest. */ for (; next < count; next++) - match_positions[next] += delta; + c->match_positions.arrayZ[next] += delta; } - if (match_positions != match_positions_input) - hb_free (match_positions); - assert (end >= 0); (void) buffer->move_to (end); } @@ -1950,34 +2000,25 @@ } template <typename HBUINT> -HB_ALWAYS_INLINE -static bool context_apply_lookup (hb_ot_apply_context_t *c, - unsigned int inputCount, /* Including the first glyph (not matched) */ - const HBUINT input[], /* Array of input values--start with second glyph */ - unsigned int lookupCount, - const LookupRecord lookupRecord[], - const ContextApplyLookupContext &lookup_context) +static inline bool context_apply_lookup (hb_ot_apply_context_t *c, + unsigned int inputCount, /* Including the first glyph (not matched) */ + const HBUINT input[], /* Array of input values--start with second glyph */ + unsigned int lookupCount, + const LookupRecord lookupRecord[], + const ContextApplyLookupContext &lookup_context) { if (unlikely (inputCount > HB_MAX_CONTEXT_LENGTH)) return false; - unsigned match_positions_stack[4]; - unsigned *match_positions = match_positions_stack; - if (unlikely (inputCount > ARRAY_LENGTH (match_positions_stack))) - { - match_positions = (unsigned *) hb_malloc (hb_max (inputCount, 1u) * sizeof (match_positions[0])); - if (unlikely (!match_positions)) - return false; - } unsigned match_end = 0; bool ret = false; if (match_input (c, inputCount, input, lookup_context.funcs.match, lookup_context.match_data, - &match_end, match_positions)) + &match_end)) { c->buffer->unsafe_to_break (c->buffer->idx, match_end); apply_lookup (c, - inputCount, match_positions, + inputCount, lookupCount, lookupRecord, match_end); ret = true; @@ -1988,12 +2029,34 @@ ret = false; } - if (unlikely (match_positions != match_positions_stack)) - hb_free (match_positions); - return ret; } +static inline bool context_cache_func (hb_ot_apply_context_t *c, hb_ot_subtable_cache_op_t op) +{ + switch (op) + { + case hb_ot_subtable_cache_op_t::ENTER: + { + if (!HB_BUFFER_TRY_ALLOCATE_VAR (c->buffer, syllable)) + return false; + auto &info = c->buffer->info; + unsigned count = c->buffer->len; + for (unsigned i = 0; i < count; i++) + info[i].syllable() = 255; + c->new_syllables = 255; + return true; + } + case hb_ot_subtable_cache_op_t::LEAVE: + { + c->new_syllables = (unsigned) -1; + HB_BUFFER_DEALLOCATE_VAR (c->buffer, syllable); + break; + } + } + return false; +} + template <typename Types> struct Rule { @@ -2209,24 +2272,29 @@ * * Replicated from LigatureSet::apply(). */ - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + /* We use the iter_context instead of iter_input, to avoid skipping + * default-ignorables and such. + * + * Related: https://github.com/harfbuzz/harfbuzz/issues/4813 + */ + auto &skippy_iter = c->iter_context; skippy_iter.reset (c->buffer->idx); skippy_iter.set_match_func (match_always, nullptr); skippy_iter.set_glyph_data ((HBUINT16 *) nullptr); - unsigned unsafe_to = (unsigned) -1, unsafe_to1 = 0, unsafe_to2 = 0; + unsigned unsafe_to = (unsigned) -1, unsafe_to1, unsafe_to2 = 0; hb_glyph_info_t *first = nullptr, *second = nullptr; bool matched = skippy_iter.next (); if (likely (matched)) { - first = &c->buffer->info[skippy_iter.idx]; - unsafe_to = skippy_iter.idx + 1; - if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])) { /* Can't use the fast path if eg. the next char is a default-ignorable * or other skippable. */ goto slow; } + + first = &c->buffer->info[skippy_iter.idx]; + unsafe_to1 = skippy_iter.idx + 1; } else { @@ -2242,8 +2310,15 @@ ; } matched = skippy_iter.next (); - if (likely (matched && !skippy_iter.may_skip (c->buffer->info[skippy_iter.idx]))) + if (likely (matched)) { + if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])) + { + /* Can't use the fast path if eg. the next char is a default-ignorable + * or other skippable. */ + goto slow; + } + second = &c->buffer->info[skippy_iter.idx]; unsafe_to2 = skippy_iter.idx + 1; } @@ -2280,6 +2355,15 @@ { if (unsafe_to == (unsigned) -1) unsafe_to = unsafe_to1; + + // Skip ahead to next possible first glyph match. + for (; i + 1 < num_rules; i++) + { + const auto &r2 = this+rule.arrayZ[i + 1]; + const auto &input2 = r2.inputZ; + if (r2.inputCount <= 1 || input2.arrayZ[0] != input.arrayZ[0]) + break; + } } } if (likely (unsafe_to != (unsigned) -1)) @@ -2622,46 +2706,37 @@ unsigned cache_cost () const { - unsigned c = (this+classDef).cost () * ruleSet.len; - return c >= 4 ? c : 0; + return (this+classDef).cost (); + } + static bool cache_func (hb_ot_apply_context_t *c, hb_ot_subtable_cache_op_t op) + { + return context_cache_func (c, op); } - static void * cache_func (void *p, hb_ot_lookup_cache_op_t op) + + struct external_cache_t + { + hb_ot_layout_binary_cache_t coverage; + }; + void *external_cache_create () const { - switch (op) + external_cache_t *cache = (external_cache_t *) hb_malloc (sizeof (external_cache_t)); + if (likely (cache)) { - case hb_ot_lookup_cache_op_t::CREATE: - return (void *) true; - case hb_ot_lookup_cache_op_t::ENTER: - { - hb_ot_apply_context_t *c = (hb_ot_apply_context_t *) p; - if (!HB_BUFFER_TRY_ALLOCATE_VAR (c->buffer, syllable)) - return (void *) false; - auto &info = c->buffer->info; - unsigned count = c->buffer->len; - for (unsigned i = 0; i < count; i++) - info[i].syllable() = 255; - c->new_syllables = 255; - return (void *) true; - } - case hb_ot_lookup_cache_op_t::LEAVE: - { - hb_ot_apply_context_t *c = (hb_ot_apply_context_t *) p; - c->new_syllables = (unsigned) -1; - HB_BUFFER_DEALLOCATE_VAR (c->buffer, syllable); - return nullptr; - } - case hb_ot_lookup_cache_op_t::DESTROY: - return nullptr; + cache->coverage.clear (); } - return nullptr; + return cache; } - - bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); } - bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); } - bool _apply (hb_ot_apply_context_t *c, bool cached) const + bool apply_cached (hb_ot_apply_context_t *c, void *external_cache) const { return _apply (c, true, external_cache); } + bool apply (hb_ot_apply_context_t *c, void *external_cache) const { return _apply (c, false, external_cache); } + bool _apply (hb_ot_apply_context_t *c, bool cached, void *external_cache) const { TRACE_APPLY (this); +#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE + external_cache_t *cache = (external_cache_t *) external_cache; + unsigned int index = (this+coverage).get_coverage_binary (c->buffer->cur().codepoint, cache ? &cache->coverage : nullptr); +#else unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint); +#endif if (index == NOT_COVERED) return_trace (false); const ClassDef &class_def = this+classDef; @@ -2671,10 +2746,7 @@ &class_def }; - if (cached && c->buffer->cur().syllable() < 255) - index = c->buffer->cur().syllable (); - else - index = class_def.get_class (c->buffer->cur().codepoint); + index = cached ? get_class_cached (class_def, c->buffer->cur()) : class_def.get_class (c->buffer->cur().codepoint); const RuleSet &rule_set = this+ruleSet[index]; return_trace (rule_set.apply (c, lookup_context)); } @@ -2919,9 +2991,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: hb_barrier (); return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: hb_barrier (); return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); case 3: hb_barrier (); return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); @@ -2935,7 +3007,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ ContextFormat1_4<SmallTypes> format1; ContextFormat2_5<SmallTypes> format2; ContextFormat3 format3; @@ -3069,27 +3141,18 @@ } template <typename HBUINT> -HB_ALWAYS_INLINE -static bool chain_context_apply_lookup (hb_ot_apply_context_t *c, - unsigned int backtrackCount, - const HBUINT backtrack[], - unsigned int inputCount, /* Including the first glyph (not matched) */ - const HBUINT input[], /* Array of input values--start with second glyph */ - unsigned int lookaheadCount, - const HBUINT lookahead[], - unsigned int lookupCount, - const LookupRecord lookupRecord[], - const ChainContextApplyLookupContext &lookup_context) +static inline bool chain_context_apply_lookup (hb_ot_apply_context_t *c, + unsigned int backtrackCount, + const HBUINT backtrack[], + unsigned int inputCount, /* Including the first glyph (not matched) */ + const HBUINT input[], /* Array of input values--start with second glyph */ + unsigned int lookaheadCount, + const HBUINT lookahead[], + unsigned int lookupCount, + const LookupRecord lookupRecord[], + const ChainContextApplyLookupContext &lookup_context) { if (unlikely (inputCount > HB_MAX_CONTEXT_LENGTH)) return false; - unsigned match_positions_stack[4]; - unsigned *match_positions = match_positions_stack; - if (unlikely (inputCount > ARRAY_LENGTH (match_positions_stack))) - { - match_positions = (unsigned *) hb_malloc (hb_max (inputCount, 1u) * sizeof (match_positions[0])); - if (unlikely (!match_positions)) - return false; - } unsigned start_index = c->buffer->out_len; unsigned end_index = c->buffer->idx; @@ -3098,15 +3161,14 @@ if (!(match_input (c, inputCount, input, lookup_context.funcs.match[1], lookup_context.match_data[1], - &match_end, match_positions) && (end_index = match_end) + &match_end) && (end_index = match_end) && match_lookahead (c, lookaheadCount, lookahead, lookup_context.funcs.match[2], lookup_context.match_data[2], match_end, &end_index))) { c->buffer->unsafe_to_concat (c->buffer->idx, end_index); - ret = false; - goto done; + return false; } if (!match_backtrack (c, @@ -3115,19 +3177,14 @@ &start_index)) { c->buffer->unsafe_to_concat_from_outbuffer (start_index, end_index); - ret = false; - goto done; + return false; } c->buffer->unsafe_to_break_from_outbuffer (start_index, end_index); apply_lookup (c, - inputCount, match_positions, + inputCount, lookupCount, lookupRecord, match_end); - done: - - if (unlikely (match_positions != match_positions_stack)) - hb_free (match_positions); return ret; } @@ -3411,33 +3468,29 @@ * * Replicated from LigatureSet::apply(). */ - /* If the input skippy has non-auto joiners behavior (as in Indic shapers), - * skip this fast path, as we don't distinguish between input & lookahead - * matching in the fast path. + /* We use the iter_context instead of iter_input, to avoid skipping + * default-ignorables and such. * - * https://github.com/harfbuzz/harfbuzz/issues/4813 + * Related: https://github.com/harfbuzz/harfbuzz/issues/4813 */ - if (!c->auto_zwnj || !c->auto_zwj) - goto slow; - - hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; + auto &skippy_iter = c->iter_context; skippy_iter.reset (c->buffer->idx); skippy_iter.set_match_func (match_always, nullptr); skippy_iter.set_glyph_data ((HBUINT16 *) nullptr); - unsigned unsafe_to = (unsigned) -1, unsafe_to1 = 0, unsafe_to2 = 0; + unsigned unsafe_to = (unsigned) -1, unsafe_to1, unsafe_to2 = 0; hb_glyph_info_t *first = nullptr, *second = nullptr; bool matched = skippy_iter.next (); if (likely (matched)) { - first = &c->buffer->info[skippy_iter.idx]; - unsafe_to1 = skippy_iter.idx + 1; - if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])) { /* Can't use the fast path if eg. the next char is a default-ignorable * or other skippable. */ goto slow; } + + first = &c->buffer->info[skippy_iter.idx]; + unsafe_to1 = skippy_iter.idx + 1; } else { @@ -3458,8 +3511,15 @@ ; } matched = skippy_iter.next (); - if (likely (matched && !skippy_iter.may_skip (c->buffer->info[skippy_iter.idx]))) + if (likely (matched)) { + if (skippy_iter.may_skip (c->buffer->info[skippy_iter.idx])) + { + /* Can't use the fast path if eg. the next char is a default-ignorable + * or other skippable. */ + goto slow; + } + second = &c->buffer->info[skippy_iter.idx]; unsafe_to2 = skippy_iter.idx + 1; } @@ -3475,7 +3535,7 @@ const auto &input = StructAfter<decltype (r.inputX)> (r.backtrack); const auto &lookahead = StructAfter<decltype (r.lookaheadX)> (input); - unsigned lenP1 = hb_max ((unsigned) input.lenP1, 1u); + unsigned lenP1 = input.lenP1; if (lenP1 > 1 ? (!match_input || match_input (*first, input.arrayZ[0], input_data)) @@ -3483,6 +3543,7 @@ (!lookahead.len || !match_lookahead || match_lookahead (*first, lookahead.arrayZ[0], lookahead_data))) { + lenP1 = hb_max (lenP1, 1u); if (!second || (lenP1 > 2 ? (!match_input || @@ -3505,6 +3566,18 @@ { if (unsafe_to == (unsigned) -1) unsafe_to = unsafe_to1; + + if (lenP1 > 1) + { + // Skip ahead to next possible first glyph match. + for (; i + 1 < num_rules; i++) + { + const auto &r2 = this+rule.arrayZ[i + 1]; + const auto &input2 = StructAfter<decltype (r2.inputX)> (r2.backtrack); + if (input2.lenP1 <= 1 || input2.arrayZ[0] != input.arrayZ[0]) + break; + } + } } } if (likely (unsafe_to != (unsigned) -1)) @@ -3873,45 +3946,37 @@ unsigned cache_cost () const { - return (this+lookaheadClassDef).cost () * ruleSet.len; + return (this+inputClassDef).cost () + (this+lookaheadClassDef).cost (); } - static void * cache_func (void *p, hb_ot_lookup_cache_op_t op) + static bool cache_func (hb_ot_apply_context_t *c, hb_ot_subtable_cache_op_t op) { - switch (op) + return context_cache_func (c, op); + } + + struct external_cache_t + { + hb_ot_layout_binary_cache_t coverage; + }; + void *external_cache_create () const + { + external_cache_t *cache = (external_cache_t *) hb_malloc (sizeof (external_cache_t)); + if (likely (cache)) { - case hb_ot_lookup_cache_op_t::CREATE: - return (void *) true; - case hb_ot_lookup_cache_op_t::ENTER: - { - hb_ot_apply_context_t *c = (hb_ot_apply_context_t *) p; - if (!HB_BUFFER_TRY_ALLOCATE_VAR (c->buffer, syllable)) - return (void *) false; - auto &info = c->buffer->info; - unsigned count = c->buffer->len; - for (unsigned i = 0; i < count; i++) - info[i].syllable() = 255; - c->new_syllables = 255; - return (void *) true; - } - case hb_ot_lookup_cache_op_t::LEAVE: - { - hb_ot_apply_context_t *c = (hb_ot_apply_context_t *) p; - c->new_syllables = (unsigned) -1; - HB_BUFFER_DEALLOCATE_VAR (c->buffer, syllable); - return nullptr; - } - case hb_ot_lookup_cache_op_t::DESTROY: - return nullptr; + cache->coverage.clear (); } - return nullptr; + return cache; } - - bool apply_cached (hb_ot_apply_context_t *c) const { return _apply (c, true); } - bool apply (hb_ot_apply_context_t *c) const { return _apply (c, false); } - bool _apply (hb_ot_apply_context_t *c, bool cached) const + bool apply_cached (hb_ot_apply_context_t *c, void *external_cache) const { return _apply (c, true, external_cache); } + bool apply (hb_ot_apply_context_t *c, void *external_cache) const { return _apply (c, false, external_cache); } + bool _apply (hb_ot_apply_context_t *c, bool cached, void *external_cache) const { TRACE_APPLY (this); +#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE + external_cache_t *cache = (external_cache_t *) external_cache; + unsigned int index = (this+coverage).get_coverage_binary (c->buffer->cur().codepoint, cache ? &cache->coverage : nullptr); +#else unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint); +#endif if (index == NOT_COVERED) return_trace (false); const ClassDef &backtrack_class_def = this+backtrackClassDef; @@ -3929,11 +3994,9 @@ &lookahead_class_def} }; - // Note: Corresponds to match_class_cached2 - if (cached && ((c->buffer->cur().syllable() & 0xF0) >> 4) < 15) - index = (c->buffer->cur().syllable () & 0xF0) >> 4; - else - index = input_class_def.get_class (c->buffer->cur().codepoint); + index = cached + ? get_class_cached2 (input_class_def, c->buffer->cur()) + : input_class_def.get_class (c->buffer->cur().codepoint); const ChainRuleSet &rule_set = this+ruleSet[index]; return_trace (rule_set.apply (c, lookup_context)); } @@ -4261,9 +4324,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: hb_barrier (); return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: hb_barrier (); return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); case 3: hb_barrier (); return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); @@ -4277,7 +4340,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ ChainContextFormat1_4<SmallTypes> format1; ChainContextFormat2_5<SmallTypes> format2; ChainContextFormat3 format3; @@ -4352,7 +4415,7 @@ { unsigned int get_type () const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_type (); default:return 0; } @@ -4360,7 +4423,7 @@ template <typename X> const X& get_subtable () const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.template get_subtable<typename T::SubTable> (); default:return Null (typename T::SubTable); } @@ -4372,7 +4435,7 @@ template <typename ...Ts> typename hb_subset_context_t::return_t dispatch (hb_subset_context_t *c, Ts&&... ds) const { - switch (u.format) { + switch (u.format.v) { case 1: hb_barrier (); return u.format1.subset (c); default: return c->default_return_value (); } @@ -4381,9 +4444,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.dispatch (c, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); } @@ -4391,7 +4454,7 @@ protected: union { - HBUINT16 format; /* Format identifier */ + struct { HBUINT16 v; } format; /* Format identifier */ ExtensionFormat1<T> format1; } u; }; @@ -4428,22 +4491,14 @@ for (auto& subtable : hb_iter (thiz->subtables, count)) thiz->digest.union_ (subtable.digest); -#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - if (c_accelerate_subtables.cache_user_cost < 4) - c_accelerate_subtables.cache_user_idx = (unsigned) -1; - - thiz->cache_user_idx = c_accelerate_subtables.cache_user_idx; + thiz->count = count; - if (thiz->cache_user_idx != (unsigned) -1) - { - thiz->cache = thiz->subtables[thiz->cache_user_idx].cache_func (nullptr, hb_ot_lookup_cache_op_t::CREATE); - if (!thiz->cache) - thiz->cache_user_idx = (unsigned) -1; - } +#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE + thiz->subtable_cache_user_idx = c_accelerate_subtables.subtable_cache_user_idx; for (unsigned i = 0; i < count; i++) - if (i != thiz->cache_user_idx) - thiz->subtables[i].apply_cached_func = thiz->subtables[i].apply_func; + if (i != thiz->subtable_cache_user_idx) + thiz->subtables[i].apply_cached_func = thiz->subtables[i].apply_func; #endif return thiz; @@ -4452,11 +4507,8 @@ void fini () { #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - if (cache) - { - assert (cache_user_idx != (unsigned) -1); - subtables[cache_user_idx].cache_func (cache, hb_ot_lookup_cache_op_t::DESTROY); - } + for (unsigned i = 0; i < count; i++) + hb_free (subtables[i].external_cache); #endif } @@ -4466,14 +4518,14 @@ #ifndef HB_OPTIMIZE_SIZE HB_ALWAYS_INLINE #endif - bool apply (hb_ot_apply_context_t *c, unsigned subtables_count, bool use_cache) const + bool apply (hb_ot_apply_context_t *c, bool use_cache) const { c->lookup_accel = this; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE if (use_cache) { return - + hb_iter (hb_iter (subtables, subtables_count)) + + hb_iter (hb_iter (subtables, count)) | hb_map ([&c] (const hb_accelerate_subtables_context_t::hb_applicable_t &_) { return _.apply_cached (c); }) | hb_any ; @@ -4482,7 +4534,7 @@ #endif { return - + hb_iter (hb_iter (subtables, subtables_count)) + + hb_iter (hb_iter (subtables, count)) | hb_map ([&c] (const hb_accelerate_subtables_context_t::hb_applicable_t &_) { return _.apply (c); }) | hb_any ; @@ -4493,8 +4545,8 @@ bool cache_enter (hb_ot_apply_context_t *c) const { #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - return cache_user_idx != (unsigned) -1 && - subtables[cache_user_idx].cache_enter (c); + return subtable_cache_user_idx != (unsigned) -1 && + subtables[subtable_cache_user_idx].cache_enter (c); #else return false; #endif @@ -4502,19 +4554,17 @@ void cache_leave (hb_ot_apply_context_t *c) const { #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - subtables[cache_user_idx].cache_leave (c); + subtables[subtable_cache_user_idx].cache_leave (c); #endif } hb_set_digest_t digest; -#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - public: - void *cache = nullptr; private: - unsigned cache_user_idx = (unsigned) -1; + unsigned count = 0; /* Number of subtables in the array. */ +#ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE + unsigned subtable_cache_user_idx = (unsigned) -1; #endif - private: hb_accelerate_subtables_context_t::hb_applicable_t subtables[HB_VAR_ARRAY]; }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.cc 2026-04-17 19:08:13.000000000 +0000 @@ -343,7 +343,7 @@ * @face: The #hb_face_t to work on * @glyph: The #hb_codepoint_t code point to query * @start_offset: offset of the first attachment point to retrieve - * @point_count: (inout) (optional): Input = the maximum number of attachment points to return; + * @point_count: (inout) (nullable): Input = the maximum number of attachment points to return; * Output = the actual number of attachment points returned (may be zero) * @point_array: (out) (array length=point_count): The array of attachment points found for the query * @@ -373,7 +373,7 @@ * @direction: The #hb_direction_t text direction to use * @glyph: The #hb_codepoint_t code point to query * @start_offset: offset of the first caret position to retrieve - * @caret_count: (inout) (optional): Input = the maximum number of caret positions to return; + * @caret_count: (inout) (nullable): Input = the maximum number of caret positions to return; * Output = the actual number of caret positions returned (may be zero) * @caret_array: (out) (array length=caret_count): The array of caret positions found for the query * @@ -444,7 +444,7 @@ * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @start_offset: offset of the first script tag to retrieve - * @script_count: (inout) (optional): Input = the maximum number of script tags to return; + * @script_count: (inout) (nullable): Input = the maximum number of script tags to return; * Output = the actual number of script tags returned (may be zero) * @script_tags: (out) (array length=script_count): The array of #hb_tag_t script tags found for the query * @@ -541,8 +541,8 @@ * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @script_count: Number of script tags in the array * @script_tags: Array of #hb_tag_t script tags - * @script_index: (out) (optional): The index of the requested script - * @chosen_script: (out) (optional): #hb_tag_t of the requested script + * @script_index: (out) (nullable): The index of the requested script + * @chosen_script: (out) (nullable): #hb_tag_t of the requested script * * Selects an OpenType script for @table_tag from the @script_tags array. * @@ -613,7 +613,7 @@ * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @start_offset: offset of the first feature tag to retrieve - * @feature_count: (inout) (optional): Input = the maximum number of feature tags to return; + * @feature_count: (inout) (nullable): Input = the maximum number of feature tags to return; * Output = the actual number of feature tags returned (may be zero) * @feature_tags: (out) (array length=feature_count): Array of feature tags found in the table * @@ -683,7 +683,7 @@ * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @script_index: The index of the requested script tag * @start_offset: offset of the first language tag to retrieve - * @language_count: (inout) (optional): Input = the maximum number of language tags to return; + * @language_count: (inout) (nullable): Input = the maximum number of language tags to return; * Output = the actual number of language tags returned (may be zero) * @language_tags: (out) (array length=language_count): Array of language tags found in the table * @@ -911,7 +911,7 @@ * @script_index: The index of the requested script tag * @language_index: The index of the requested language tag * @start_offset: offset of the first feature tag to retrieve - * @feature_count: (inout) (optional): Input = the maximum number of feature tags to return; + * @feature_count: (inout) (nullable): Input = the maximum number of feature tags to return; * Output: the actual number of feature tags returned (may be zero) * @feature_indexes: (out) (array length=feature_count): The array of feature indexes found for the query * @@ -947,7 +947,7 @@ * @script_index: The index of the requested script tag * @language_index: The index of the requested language tag * @start_offset: offset of the first feature tag to retrieve - * @feature_count: (inout) (optional): Input = the maximum number of feature tags to return; + * @feature_count: (inout) (nullable): Input = the maximum number of feature tags to return; * Output = the actual number of feature tags returned (may be zero) * @feature_tags: (out) (array length=feature_count): The array of #hb_tag_t feature tags found for the query * @@ -1035,7 +1035,7 @@ * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @feature_index: The index of the requested feature * @start_offset: offset of the first lookup to retrieve - * @lookup_count: (inout) (optional): Input = the maximum number of lookups to return; + * @lookup_count: (inout) (nullable): Input = the maximum number of lookups to return; * Output = the actual number of lookups returned (may be zero) * @lookup_indexes: (out) (array length=lookup_count): The array of lookup indexes found for the query * @@ -1386,10 +1386,10 @@ * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @lookup_index: The index of the feature lookup to query - * @glyphs_before: (out): Array of glyphs preceding the substitution range - * @glyphs_input: (out): Array of input glyphs that would be substituted by the lookup - * @glyphs_after: (out): Array of glyphs following the substitution range - * @glyphs_output: (out): Array of glyphs that would be the substituted output of the lookup + * @glyphs_before: (out) (nullable): Array of glyphs preceding the substitution range + * @glyphs_input: (out) (nullable): Array of input glyphs that would be substituted by the lookup + * @glyphs_after: (out) (nullable): Array of glyphs following the substitution range + * @glyphs_output: (out) (nullable): Array of glyphs that would be the substituted output of the lookup * * Fetches a list of all glyphs affected by the specified lookup in the * specified face's GSUB table or GPOS table. @@ -1473,7 +1473,7 @@ * @feature_index: The index of the feature to query * @variations_index: The index of the feature variation to query * @start_offset: offset of the first lookup to retrieve - * @lookup_count: (inout) (optional): Input = the maximum number of lookups to return; + * @lookup_count: (inout) (nullable): Input = the maximum number of lookups to return; * Output = the actual number of lookups returned (may be zero) * @lookup_indexes: (out) (array length=lookup_count): The array of lookups found for the query * @@ -1777,15 +1777,15 @@ * @face: #hb_face_t to work upon * @table_tag: table tag to query, "GSUB" or "GPOS". * @feature_index: index of feature to query. - * @label_id: (out) (optional): The ‘name’ table name ID that specifies a string - * for a user-interface label for this feature. (May be NULL.) - * @tooltip_id: (out) (optional): The ‘name’ table name ID that specifies a string + * @label_id: (out) (nullable): The ‘name’ table name ID that specifies a string + * for a user-interface label for this feature. + * @tooltip_id: (out) (nullable): The ‘name’ table name ID that specifies a string * that an application can use for tooltip text for this - * feature. (May be NULL.) - * @sample_id: (out) (optional): The ‘name’ table name ID that specifies sample text - * that illustrates the effect of this feature. (May be NULL.) - * @num_named_parameters: (out) (optional): Number of named parameters. (May be zero.) - * @first_param_id: (out) (optional): The first ‘name’ table name ID used to specify + * feature. + * @sample_id: (out) (nullable): The ‘name’ table name ID that specifies sample text + * that illustrates the effect of this feature. + * @num_named_parameters: (out) (nullable): Number of named parameters. + * @first_param_id: (out) (nullable): The first ‘name’ table name ID used to specify * strings for user-interface labels for the feature * parameters. (Must be zero if numParameters is zero.) * @@ -1852,7 +1852,7 @@ * @table_tag: table tag to query, "GSUB" or "GPOS". * @feature_index: index of feature to query. * @start_offset: offset of the first character to retrieve - * @char_count: (inout) (optional): Input = the maximum number of characters to return; + * @char_count: (inout) (nullable): Input = the maximum number of characters to return; * Output = the actual number of characters returned (may be zero) * @characters: (out caller-allocates) (array length=char_count): A buffer pointer. * The Unicode codepoints of the characters for which this feature provides @@ -1915,31 +1915,33 @@ static inline bool apply_forward (OT::hb_ot_apply_context_t *c, - const OT::hb_ot_layout_lookup_accelerator_t &accel, - unsigned subtable_count) + const OT::hb_ot_layout_lookup_accelerator_t &accel) { - bool use_cache = accel.cache_enter (c); + bool use_hot_subtable_cache = accel.cache_enter (c); bool ret = false; hb_buffer_t *buffer = c->buffer; - while (buffer->idx < buffer->len && buffer->successful) + while (buffer->successful) { - bool applied = false; - auto &cur = buffer->cur(); - if (accel.digest.may_have (cur.codepoint) && - (cur.mask & c->lookup_mask) && - c->check_glyph_property (&cur, c->lookup_props)) - { - applied = accel.apply (c, subtable_count, use_cache); - } + hb_glyph_info_t *info = buffer->info; + unsigned j = buffer->idx; + while (j < buffer->len && + !(accel.digest.may_have (info[j].codepoint) && + (info[j].mask & c->lookup_mask) && + c->check_glyph_property (&info[j], c->lookup_props))) + j++; + if (unlikely (j > buffer->idx && !buffer->next_glyphs (j - buffer->idx))) + break; + if (buffer->idx >= buffer->len) + break; - if (applied) + if (accel.apply (c, use_hot_subtable_cache)) ret = true; else (void) buffer->next_glyph (); } - if (use_cache) + if (use_hot_subtable_cache) accel.cache_leave (c); return ret; @@ -1947,8 +1949,7 @@ static inline bool apply_backward (OT::hb_ot_apply_context_t *c, - const OT::hb_ot_layout_lookup_accelerator_t &accel, - unsigned subtable_count) + const OT::hb_ot_layout_lookup_accelerator_t &accel) { bool ret = false; hb_buffer_t *buffer = c->buffer; @@ -1958,11 +1959,10 @@ if (accel.digest.may_have (cur.codepoint) && (cur.mask & c->lookup_mask) && c->check_glyph_property (&cur, c->lookup_props)) - ret |= accel.apply (c, subtable_count, false); + ret |= accel.apply (c, false); /* The reverse lookup doesn't "advance" cursor (for good reason). */ buffer->idx--; - } while ((int) buffer->idx >= 0); return ret; @@ -1975,7 +1975,6 @@ const OT::hb_ot_layout_lookup_accelerator_t &accel) { hb_buffer_t *buffer = c->buffer; - unsigned subtable_count = lookup.get_subtable_count (); if (unlikely (!buffer->len || !c->lookup_mask)) return false; @@ -1991,7 +1990,7 @@ buffer->clear_output (); buffer->idx = 0; - ret = apply_forward (c, accel, subtable_count); + ret = apply_forward (c, accel); if (!Proxy::always_inplace) buffer->sync (); @@ -2001,7 +2000,7 @@ /* in-place backward substitution/positioning */ assert (!buffer->have_output); buffer->idx = buffer->len - 1; - ret = apply_backward (c, accel, subtable_count); + ret = apply_backward (c, accel); } return ret; @@ -2017,7 +2016,7 @@ unsigned int i = 0; auto *font_data = font->data.ot.get (); - auto *var_store_cache = font_data == HB_SHAPER_DATA_SUCCEEDED ? nullptr : (OT::ItemVariationStore::cache_t *) font_data; + auto *var_store_cache = (OT::hb_scalar_cache_t *) font_data; OT::hb_ot_apply_context_t c (table_index, font, buffer, proxy.accel.get_blob (), var_store_cache); c.set_recurse_func (Proxy::Lookup::template dispatch_recurse_func<OT::hb_ot_apply_context_t>); @@ -2037,11 +2036,8 @@ if (buffer->messaging () && !buffer->message (font, "start lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag))) continue; - /* c.digest is a digest of all the current glyphs in the buffer - * (plus some past glyphs). - * - * Only try applying the lookup if there is any overlap. */ - if (accel->digest.may_intersect (c.digest)) + /* Only try applying the lookup if there is any overlap. */ + if (accel->digest.may_intersect (buffer->digest)) { c.set_lookup_index (lookup_index); c.set_lookup_mask (lookup.mask, false); @@ -2067,7 +2063,7 @@ if (stage->pause_func (plan, font, buffer)) { /* Refresh working buffer digest since buffer changed. */ - buffer->collect_codepoints (c.digest); + buffer->update_digest (); } } } @@ -2601,6 +2597,7 @@ #endif +#ifndef HB_NO_LAYOUT_RARELY_USED struct hb_get_glyph_alternates_dispatch_t : hb_dispatch_context_t<hb_get_glyph_alternates_dispatch_t, unsigned> { @@ -2620,14 +2617,13 @@ ( _dispatch (obj, hb_prioritize, std::forward<Ts> (ds)...) ) }; -#ifndef HB_NO_LAYOUT_RARELY_USED /** * hb_ot_layout_lookup_get_glyph_alternates: * @face: a face. * @lookup_index: index of the feature lookup to query. * @glyph: a glyph id. * @start_offset: starting offset. - * @alternate_count: (inout) (optional): Input = the maximum number of alternate glyphs to return; + * @alternate_count: (inout) (nullable): Input = the maximum number of alternate glyphs to return; * Output = the actual number of alternate glyphs returned (may be zero). * @alternate_glyphs: (out caller-allocates) (array length=alternate_count): A glyphs buffer. * Alternate glyphs associated with the glyph id. @@ -2654,6 +2650,64 @@ return ret; } +struct hb_collect_glyph_alternates_dispatch_t : + hb_dispatch_context_t<hb_collect_glyph_alternates_dispatch_t, bool> +{ + static return_t default_return_value () { return false; } + bool stop_sublookup_iteration (return_t r) const { return false; } + + private: + template <typename T, typename ...Ts> auto + _dispatch (const T &obj, hb_priority<1>, Ts&&... ds) HB_AUTO_RETURN + ( (obj.collect_glyph_alternates (std::forward<Ts> (ds)...), true) ) + template <typename T, typename ...Ts> auto + _dispatch (const T &obj, hb_priority<0>, Ts&&... ds) HB_AUTO_RETURN + ( default_return_value () ) + public: + template <typename T, typename ...Ts> auto + dispatch (const T &obj, Ts&&... ds) HB_AUTO_RETURN + ( _dispatch (obj, hb_prioritize, std::forward<Ts> (ds)...) ) +}; + +/** + * hb_ot_layout_lookup_collect_glyph_alternates: + * @face: a face. + * @lookup_index: index of the feature lookup to query. + * @alternate_count: (inout): mapping from glyph index to number of alternates for that glyph. + * @alternate_glyphs: (inout): mapping from encoded glyph index and alternate index, to alternate glyph ids. + * + * Collects alternates of glyphs from a given GSUB lookup index. + * + * For one-to-one GSUB glyph substitutions, this function collects the + * substituted glyph. + * + * For lookups that assign multiple alternates to a glyph, all alternate glyphs are collected. + * + * For other lookup types, nothing is performed and `false` is returned. + * + * The `alternate_count` mapping will contain the number of alternates for each glyph id. + * Upon entry, this mapping should contain the glyph ids as keys, and the number of alternates + * currently known for each glyph id as values. + * + * The `alternate_glyphs` mapping will contain the alternate glyph ids for each glyph id. + * The mapping is encoded in the following way, upon entry and after processing: + * If G is the glyph id, and A0, A1, ..., A(n-1) are the alternate glyph ids, + * the mapping will contain the following entries: (G + (i << 24)) -> A(i) + * for i = 0, 1, ..., n-1 where n is the number of alternates for G as per `alternate_count`. + * + * Return value: `true` if alternates were collected, `false` otherwise. + * Since: 12.1.0 + */ +HB_EXTERN hb_bool_t +hb_ot_layout_lookup_collect_glyph_alternates (hb_face_t *face, + unsigned lookup_index, + hb_map_t *alternate_count /* IN/OUT */, + hb_map_t *alternate_glyphs /* IN/OUT */) +{ + hb_collect_glyph_alternates_dispatch_t c; + const OT::SubstLookup &lookup = face->table.GSUB->table->get_lookup (lookup_index); + return lookup.dispatch (&c, alternate_count, alternate_glyphs); +} struct hb_position_single_dispatch_t : hb_dispatch_context_t<hb_position_single_dispatch_t, bool> diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.h 2026-04-17 19:08:13.000000000 +0000 @@ -384,6 +384,12 @@ hb_codepoint_t *alternate_glyphs /* OUT */); HB_EXTERN hb_bool_t +hb_ot_layout_lookup_collect_glyph_alternates (hb_face_t *face, + unsigned lookup_index, + hb_map_t *alternate_count /* IN/OUT */, + hb_map_t *alternate_glyphs /* IN/OUT */); + +HB_EXTERN hb_bool_t hb_ot_layout_lookup_would_substitute (hb_face_t *face, unsigned int lookup_index, const hb_codepoint_t *glyphs, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-layout.hh 2026-04-17 19:08:13.000000000 +0000 @@ -217,8 +217,6 @@ if (u >= 0x80u) { - buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII; - if (unlikely (unicode->is_default_ignorable (u))) { buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_DEFAULT_IGNORABLES; @@ -247,6 +245,7 @@ if (unlikely (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (gen_cat))) { + buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_CONTINUATIONS; props |= UPROPS_MASK_CONTINUATION; props |= unicode->modified_combining_class (u)<<8; } @@ -361,8 +360,9 @@ } static inline void -_hb_glyph_info_set_continuation (hb_glyph_info_t *info) +_hb_glyph_info_set_continuation (hb_glyph_info_t *info, hb_buffer_t *buffer) { + buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_CONTINUATIONS; info->unicode_props() |= UPROPS_MASK_CONTINUATION; } static inline void @@ -410,18 +410,6 @@ return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & UPROPS_MASK_Cf_ZWJ); } static inline bool -_hb_glyph_info_is_joiner (const hb_glyph_info_t *info) -{ - return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & (UPROPS_MASK_Cf_ZWNJ|UPROPS_MASK_Cf_ZWJ)); -} -static inline void -_hb_glyph_info_flip_joiners (hb_glyph_info_t *info) -{ - if (!_hb_glyph_info_is_unicode_format (info)) - return; - info->unicode_props() ^= UPROPS_MASK_Cf_ZWNJ | UPROPS_MASK_Cf_ZWJ; -} -static inline bool _hb_glyph_info_is_aat_deleted (const hb_glyph_info_t *info) { return _hb_glyph_info_is_unicode_format (info) && (info->unicode_props() & UPROPS_MASK_Cf_AAT_DELETED); @@ -657,4 +645,18 @@ #undef lig_props #undef glyph_props +static inline void +_hb_collect_glyph_alternates_add (hb_codepoint_t from, + hb_codepoint_t to, + hb_map_t *alternate_count, + hb_map_t *alternate_glyphs) +{ + hb_codepoint_t zero = 0; + hb_codepoint_t *i = &zero; + alternate_count->has (from, &i); + alternate_glyphs->set (from | (*i << 24), to); + alternate_count->set (from, *i + 1); +} + + #endif /* HB_OT_LAYOUT_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-math-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-math-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-math-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-math-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -69,6 +69,8 @@ struct MathConstants { + friend struct MATH; + MathConstants* copy (hb_serialize_context_t *c) const { TRACE_SERIALIZE (this); @@ -1109,8 +1111,8 @@ { #ifndef HB_NO_MATH switch HB_CODEPOINT_ENCODE3 (font->face->table.MATH.get_blob ()->length, - get_constant (HB_OT_MATH_CONSTANT_DISPLAY_OPERATOR_MIN_HEIGHT, font), - get_constant (HB_OT_MATH_CONSTANT_DELIMITED_SUB_FORMULA_MIN_HEIGHT, font)) + (this+mathConstants).minHeight[1], // displayOperatorMinHeight + (this+mathConstants).minHeight[0]) // delimitedSubFormulaMinHeight { /* sha1sum:ab4a4fe054d23061f3c039493d6f665cfda2ecf5 cambria.ttc * sha1sum:086855301bff644f9d8827b88491fcf73a6d4cb9 cambria.ttc diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-post-macroman.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-post-macroman.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-post-macroman.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-post-macroman.hh 2026-04-17 19:08:13.000000000 +0000 @@ -31,264 +31,264 @@ #endif -_S(".notdef") -_S(".null") -_S("nonmarkingreturn") -_S("space") -_S("exclam") -_S("quotedbl") -_S("numbersign") -_S("dollar") -_S("percent") -_S("ampersand") -_S("quotesingle") -_S("parenleft") -_S("parenright") -_S("asterisk") -_S("plus") -_S("comma") -_S("hyphen") -_S("period") -_S("slash") -_S("zero") -_S("one") -_S("two") -_S("three") -_S("four") -_S("five") -_S("six") -_S("seven") -_S("eight") -_S("nine") -_S("colon") -_S("semicolon") -_S("less") -_S("equal") -_S("greater") -_S("question") -_S("at") -_S("A") -_S("B") -_S("C") -_S("D") -_S("E") -_S("F") -_S("G") -_S("H") -_S("I") -_S("J") -_S("K") -_S("L") -_S("M") -_S("N") -_S("O") -_S("P") -_S("Q") -_S("R") -_S("S") -_S("T") -_S("U") -_S("V") -_S("W") -_S("X") -_S("Y") -_S("Z") -_S("bracketleft") -_S("backslash") -_S("bracketright") -_S("asciicircum") -_S("underscore") -_S("grave") -_S("a") -_S("b") -_S("c") -_S("d") -_S("e") -_S("f") -_S("g") -_S("h") -_S("i") -_S("j") -_S("k") -_S("l") -_S("m") -_S("n") -_S("o") -_S("p") -_S("q") -_S("r") -_S("s") -_S("t") -_S("u") -_S("v") -_S("w") -_S("x") -_S("y") -_S("z") -_S("braceleft") -_S("bar") -_S("braceright") -_S("asciitilde") -_S("Adieresis") -_S("Aring") -_S("Ccedilla") -_S("Eacute") -_S("Ntilde") -_S("Odieresis") -_S("Udieresis") -_S("aacute") -_S("agrave") -_S("acircumflex") -_S("adieresis") -_S("atilde") -_S("aring") -_S("ccedilla") -_S("eacute") -_S("egrave") -_S("ecircumflex") -_S("edieresis") -_S("iacute") -_S("igrave") -_S("icircumflex") -_S("idieresis") -_S("ntilde") -_S("oacute") -_S("ograve") -_S("ocircumflex") -_S("odieresis") -_S("otilde") -_S("uacute") -_S("ugrave") -_S("ucircumflex") -_S("udieresis") -_S("dagger") -_S("degree") -_S("cent") -_S("sterling") -_S("section") -_S("bullet") -_S("paragraph") -_S("germandbls") -_S("registered") -_S("copyright") -_S("trademark") -_S("acute") -_S("dieresis") -_S("notequal") -_S("AE") -_S("Oslash") -_S("infinity") -_S("plusminus") -_S("lessequal") -_S("greaterequal") -_S("yen") -_S("mu") -_S("partialdiff") -_S("summation") -_S("product") -_S("pi") -_S("integral") -_S("ordfeminine") -_S("ordmasculine") -_S("Omega") -_S("ae") -_S("oslash") -_S("questiondown") -_S("exclamdown") -_S("logicalnot") -_S("radical") -_S("florin") -_S("approxequal") -_S("Delta") -_S("guillemotleft") -_S("guillemotright") -_S("ellipsis") -_S("nonbreakingspace") -_S("Agrave") -_S("Atilde") -_S("Otilde") -_S("OE") -_S("oe") -_S("endash") -_S("emdash") -_S("quotedblleft") -_S("quotedblright") -_S("quoteleft") -_S("quoteright") -_S("divide") -_S("lozenge") -_S("ydieresis") -_S("Ydieresis") -_S("fraction") -_S("currency") -_S("guilsinglleft") -_S("guilsinglright") -_S("fi") -_S("fl") -_S("daggerdbl") -_S("periodcentered") -_S("quotesinglbase") -_S("quotedblbase") -_S("perthousand") -_S("Acircumflex") -_S("Ecircumflex") -_S("Aacute") -_S("Edieresis") -_S("Egrave") -_S("Iacute") -_S("Icircumflex") -_S("Idieresis") -_S("Igrave") -_S("Oacute") -_S("Ocircumflex") -_S("apple") -_S("Ograve") -_S("Uacute") -_S("Ucircumflex") -_S("Ugrave") -_S("dotlessi") -_S("circumflex") -_S("tilde") -_S("macron") -_S("breve") -_S("dotaccent") -_S("ring") -_S("cedilla") -_S("hungarumlaut") -_S("ogonek") -_S("caron") -_S("Lslash") -_S("lslash") -_S("Scaron") -_S("scaron") -_S("Zcaron") -_S("zcaron") -_S("brokenbar") -_S("Eth") -_S("eth") -_S("Yacute") -_S("yacute") -_S("Thorn") -_S("thorn") -_S("minus") -_S("multiply") -_S("onesuperior") -_S("twosuperior") -_S("threesuperior") -_S("onehalf") -_S("onequarter") -_S("threequarters") -_S("franc") -_S("Gbreve") -_S("gbreve") -_S("Idotaccent") -_S("Scedilla") -_S("scedilla") -_S("Cacute") -_S("cacute") -_S("Ccaron") -_S("ccaron") -_S("dcroat") +HB_STR(".notdef") +HB_STR(".null") +HB_STR("nonmarkingreturn") +HB_STR("space") +HB_STR("exclam") +HB_STR("quotedbl") +HB_STR("numbersign") +HB_STR("dollar") +HB_STR("percent") +HB_STR("ampersand") +HB_STR("quotesingle") +HB_STR("parenleft") +HB_STR("parenright") +HB_STR("asterisk") +HB_STR("plus") +HB_STR("comma") +HB_STR("hyphen") +HB_STR("period") +HB_STR("slash") +HB_STR("zero") +HB_STR("one") +HB_STR("two") +HB_STR("three") +HB_STR("four") +HB_STR("five") +HB_STR("six") +HB_STR("seven") +HB_STR("eight") +HB_STR("nine") +HB_STR("colon") +HB_STR("semicolon") +HB_STR("less") +HB_STR("equal") +HB_STR("greater") +HB_STR("question") +HB_STR("at") +HB_STR("A") +HB_STR("B") +HB_STR("C") +HB_STR("D") +HB_STR("E") +HB_STR("F") +HB_STR("G") +HB_STR("H") +HB_STR("I") +HB_STR("J") +HB_STR("K") +HB_STR("L") +HB_STR("M") +HB_STR("N") +HB_STR("O") +HB_STR("P") +HB_STR("Q") +HB_STR("R") +HB_STR("S") +HB_STR("T") +HB_STR("U") +HB_STR("V") +HB_STR("W") +HB_STR("X") +HB_STR("Y") +HB_STR("Z") +HB_STR("bracketleft") +HB_STR("backslash") +HB_STR("bracketright") +HB_STR("asciicircum") +HB_STR("underscore") +HB_STR("grave") +HB_STR("a") +HB_STR("b") +HB_STR("c") +HB_STR("d") +HB_STR("e") +HB_STR("f") +HB_STR("g") +HB_STR("h") +HB_STR("i") +HB_STR("j") +HB_STR("k") +HB_STR("l") +HB_STR("m") +HB_STR("n") +HB_STR("o") +HB_STR("p") +HB_STR("q") +HB_STR("r") +HB_STR("s") +HB_STR("t") +HB_STR("u") +HB_STR("v") +HB_STR("w") +HB_STR("x") +HB_STR("y") +HB_STR("z") +HB_STR("braceleft") +HB_STR("bar") +HB_STR("braceright") +HB_STR("asciitilde") +HB_STR("Adieresis") +HB_STR("Aring") +HB_STR("Ccedilla") +HB_STR("Eacute") +HB_STR("Ntilde") +HB_STR("Odieresis") +HB_STR("Udieresis") +HB_STR("aacute") +HB_STR("agrave") +HB_STR("acircumflex") +HB_STR("adieresis") +HB_STR("atilde") +HB_STR("aring") +HB_STR("ccedilla") +HB_STR("eacute") +HB_STR("egrave") +HB_STR("ecircumflex") +HB_STR("edieresis") +HB_STR("iacute") +HB_STR("igrave") +HB_STR("icircumflex") +HB_STR("idieresis") +HB_STR("ntilde") +HB_STR("oacute") +HB_STR("ograve") +HB_STR("ocircumflex") +HB_STR("odieresis") +HB_STR("otilde") +HB_STR("uacute") +HB_STR("ugrave") +HB_STR("ucircumflex") +HB_STR("udieresis") +HB_STR("dagger") +HB_STR("degree") +HB_STR("cent") +HB_STR("sterling") +HB_STR("section") +HB_STR("bullet") +HB_STR("paragraph") +HB_STR("germandbls") +HB_STR("registered") +HB_STR("copyright") +HB_STR("trademark") +HB_STR("acute") +HB_STR("dieresis") +HB_STR("notequal") +HB_STR("AE") +HB_STR("Oslash") +HB_STR("infinity") +HB_STR("plusminus") +HB_STR("lessequal") +HB_STR("greaterequal") +HB_STR("yen") +HB_STR("mu") +HB_STR("partialdiff") +HB_STR("summation") +HB_STR("product") +HB_STR("pi") +HB_STR("integral") +HB_STR("ordfeminine") +HB_STR("ordmasculine") +HB_STR("Omega") +HB_STR("ae") +HB_STR("oslash") +HB_STR("questiondown") +HB_STR("exclamdown") +HB_STR("logicalnot") +HB_STR("radical") +HB_STR("florin") +HB_STR("approxequal") +HB_STR("Delta") +HB_STR("guillemotleft") +HB_STR("guillemotright") +HB_STR("ellipsis") +HB_STR("nonbreakingspace") +HB_STR("Agrave") +HB_STR("Atilde") +HB_STR("Otilde") +HB_STR("OE") +HB_STR("oe") +HB_STR("endash") +HB_STR("emdash") +HB_STR("quotedblleft") +HB_STR("quotedblright") +HB_STR("quoteleft") +HB_STR("quoteright") +HB_STR("divide") +HB_STR("lozenge") +HB_STR("ydieresis") +HB_STR("Ydieresis") +HB_STR("fraction") +HB_STR("currency") +HB_STR("guilsinglleft") +HB_STR("guilsinglright") +HB_STR("fi") +HB_STR("fl") +HB_STR("daggerdbl") +HB_STR("periodcentered") +HB_STR("quotesinglbase") +HB_STR("quotedblbase") +HB_STR("perthousand") +HB_STR("Acircumflex") +HB_STR("Ecircumflex") +HB_STR("Aacute") +HB_STR("Edieresis") +HB_STR("Egrave") +HB_STR("Iacute") +HB_STR("Icircumflex") +HB_STR("Idieresis") +HB_STR("Igrave") +HB_STR("Oacute") +HB_STR("Ocircumflex") +HB_STR("apple") +HB_STR("Ograve") +HB_STR("Uacute") +HB_STR("Ucircumflex") +HB_STR("Ugrave") +HB_STR("dotlessi") +HB_STR("circumflex") +HB_STR("tilde") +HB_STR("macron") +HB_STR("breve") +HB_STR("dotaccent") +HB_STR("ring") +HB_STR("cedilla") +HB_STR("hungarumlaut") +HB_STR("ogonek") +HB_STR("caron") +HB_STR("Lslash") +HB_STR("lslash") +HB_STR("Scaron") +HB_STR("scaron") +HB_STR("Zcaron") +HB_STR("zcaron") +HB_STR("brokenbar") +HB_STR("Eth") +HB_STR("eth") +HB_STR("Yacute") +HB_STR("yacute") +HB_STR("Thorn") +HB_STR("thorn") +HB_STR("minus") +HB_STR("multiply") +HB_STR("onesuperior") +HB_STR("twosuperior") +HB_STR("threesuperior") +HB_STR("onehalf") +HB_STR("onequarter") +HB_STR("threequarters") +HB_STR("franc") +HB_STR("Gbreve") +HB_STR("gbreve") +HB_STR("Idotaccent") +HB_STR("Scedilla") +HB_STR("scedilla") +HB_STR("Cacute") +HB_STR("cacute") +HB_STR("Ccaron") +HB_STR("ccaron") +HB_STR("dcroat") #endif /* HB_OT_POST_MACROMAN_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-fallback.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-fallback.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-fallback.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-fallback.cc 2026-04-17 19:08:13.000000000 +0000 @@ -409,16 +409,13 @@ } static inline void -position_cluster (const hb_ot_shape_plan_t *plan, - hb_font_t *font, - hb_buffer_t *buffer, - unsigned int start, - unsigned int end, - bool adjust_offsets_when_zeroing) +position_cluster_impl (const hb_ot_shape_plan_t *plan, + hb_font_t *font, + hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + bool adjust_offsets_when_zeroing) { - if (end - start < 2) - return; - /* Find the base glyph */ hb_glyph_info_t *info = buffer->info; for (unsigned int i = start; i < end; i++) @@ -441,6 +438,20 @@ } } +static HB_ALWAYS_INLINE void +position_cluster (const hb_ot_shape_plan_t *plan, + hb_font_t *font, + hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + bool adjust_offsets_when_zeroing) +{ + if (end - start < 2) + return; + + position_cluster_impl (plan, font, buffer, start, end, adjust_offsets_when_zeroing); +} + void _hb_ot_shape_fallback_mark_position (const hb_ot_shape_plan_t *plan, hb_font_t *font, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.cc 2026-04-17 19:08:13.000000000 +0000 @@ -78,14 +78,14 @@ static inline void set_glyph (hb_glyph_info_t &info, hb_font_t *font) { - (void) font->get_nominal_glyph (info.codepoint, &info.glyph_index()); + (void) font->get_nominal_glyph (info.codepoint, &info.normalizer_glyph_index()); } static inline void output_char (hb_buffer_t *buffer, hb_codepoint_t unichar, hb_codepoint_t glyph) { /* This is very confusing indeed. */ - buffer->cur().glyph_index() = glyph; + buffer->cur().normalizer_glyph_index() = glyph; (void) buffer->output_glyph (unichar); _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer); } @@ -93,7 +93,7 @@ static inline void next_char (hb_buffer_t *buffer, hb_codepoint_t glyph) { - buffer->cur().glyph_index() = glyph; + buffer->cur().normalizer_glyph_index() = glyph; (void) buffer->next_glyph (); } @@ -210,7 +210,7 @@ hb_font_t * const font = c->font; for (; buffer->idx < end - 1 && buffer->successful;) { if (unlikely (buffer->unicode->is_variation_selector (buffer->cur(+1).codepoint))) { - if (font->get_variation_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().glyph_index())) + if (font->get_variation_glyph (buffer->cur().codepoint, buffer->cur(+1).codepoint, &buffer->cur().normalizer_glyph_index())) { hb_codepoint_t unicode = buffer->cur().codepoint; (void) buffer->replace_glyphs (2, 1, &unicode); @@ -342,7 +342,7 @@ unsigned int done = font->get_nominal_glyphs (end - buffer->idx, &buffer->cur().codepoint, sizeof (buffer->info[0]), - &buffer->cur().glyph_index(), + &buffer->cur().normalizer_glyph_index(), sizeof (buffer->info[0])); if (unlikely (!buffer->next_glyphs (done))) break; } @@ -456,7 +456,7 @@ buffer->out_len--; /* Remove the second composable. */ /* Modify starter and carry on. */ buffer->out_info[starter].codepoint = composed; - buffer->out_info[starter].glyph_index() = glyph; + buffer->out_info[starter].normalizer_glyph_index() = glyph; _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer); continue; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape-normalize.hh 2026-04-17 19:08:13.000000000 +0000 @@ -32,7 +32,7 @@ /* buffer var allocations, used during the normalization process */ -#define glyph_index() var1.u32 +#define normalizer_glyph_index() var1.u32 struct hb_ot_shape_plan_t; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.cc 2026-04-17 19:08:13.000000000 +0000 @@ -44,6 +44,7 @@ #include "hb-ot-face.hh" #include "hb-set.hh" +#include "hb-unicode.hh" #include "hb-aat-layout.hh" #include "hb-ot-layout-gdef-table.hh" @@ -92,7 +93,7 @@ shaper = hb_ot_shaper_categorize (props.script, props.direction, map.chosen_script[0]); script_zero_marks = shaper->zero_width_marks != HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE; - script_fallback_mark_positioning = shaper->fallback_position; + script_fallback_position = shaper->fallback_position; #ifndef HB_NO_AAT_SHAPE /* https://github.com/harfbuzz/harfbuzz/issues/1528 */ @@ -178,12 +179,12 @@ #endif #ifndef HB_NO_OT_KERN else if (hb_ot_layout_has_kerning (face)) - plan.apply_kern = true; + plan.apply_kern = script_fallback_position; // Not all shapers apply legacy `kern` #endif else {} } - plan.apply_fallback_kern = !(plan.apply_gpos || plan.apply_kerx || plan.apply_kern); + plan.apply_fallback_kern = script_fallback_position && !(plan.apply_gpos || plan.apply_kerx || plan.apply_kern); plan.zero_marks = script_zero_marks && !plan.apply_kerx && @@ -203,7 +204,7 @@ ); plan.fallback_mark_positioning = plan.adjust_mark_positioning_when_zeroing && - script_fallback_mark_positioning; + script_fallback_position; #ifndef HB_NO_AAT_SHAPE /* If we're using morx shaping, we cancel mark position adjustment because @@ -425,25 +426,20 @@ */ struct hb_ot_font_data_t { - OT::ItemVariationStore::cache_t unused; // Just for alignment + OT::hb_scalar_cache_t unused; // Just for alignment }; hb_ot_font_data_t * _hb_ot_shaper_font_data_create (hb_font_t *font) { - if (!font->num_coords) - return (hb_ot_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; - const OT::ItemVariationStore &var_store = font->face->table.GDEF->table->get_var_store (); - auto *cache = (hb_ot_font_data_t *) var_store.create_cache (); - return cache ? cache : (hb_ot_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_ot_font_data_t *) var_store.create_cache (); } void _hb_ot_shaper_font_data_destroy (hb_ot_font_data_t *data) { - if (data == HB_SHAPER_DATA_SUCCEEDED) return; - OT::ItemVariationStore::destroy_cache ((OT::ItemVariationStore::cache_t *) data); + OT::ItemVariationStore::destroy_cache ((OT::hb_scalar_cache_t *) data); } @@ -488,6 +484,9 @@ { _hb_glyph_info_set_unicode_props (&info[i], buffer); + if (info[i].codepoint < 0x80) + continue; + unsigned gen_cat = _hb_glyph_info_get_general_category (&info[i]); if (FLAG_UNSAFE (gen_cat) & (FLAG (HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER) | @@ -502,7 +501,7 @@ if (unlikely (gen_cat == HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL && hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x1F3FBu, 0x1F3FFu))) { - _hb_glyph_info_set_continuation (&info[i]); + _hb_glyph_info_set_continuation (&info[i], buffer); } /* Regional_Indicators are hairy as hell... * https://github.com/harfbuzz/harfbuzz/issues/2265 */ @@ -510,18 +509,18 @@ { if (_hb_codepoint_is_regional_indicator (info[i - 1].codepoint) && !_hb_glyph_info_is_continuation (&info[i - 1])) - _hb_glyph_info_set_continuation (&info[i]); + _hb_glyph_info_set_continuation (&info[i], buffer); } #ifndef HB_NO_EMOJI_SEQUENCES else if (unlikely (_hb_glyph_info_is_zwj (&info[i]))) { - _hb_glyph_info_set_continuation (&info[i]); + _hb_glyph_info_set_continuation (&info[i], buffer); if (i + 1 < count && _hb_unicode_is_emoji_Extended_Pictographic (info[i + 1].codepoint)) { i++; _hb_glyph_info_set_unicode_props (&info[i], buffer); - _hb_glyph_info_set_continuation (&info[i]); + _hb_glyph_info_set_continuation (&info[i], buffer); } } #endif @@ -540,7 +539,9 @@ * https://github.com/harfbuzz/harfbuzz/issues/3844 */ else if (unlikely (hb_in_ranges<hb_codepoint_t> (info[i].codepoint, 0xFF9Eu, 0xFF9Fu, 0xE0020u, 0xE007Fu))) - _hb_glyph_info_set_continuation (&info[i]); + _hb_glyph_info_set_continuation (&info[i], buffer); + else if (unlikely (info[i].codepoint == 0x2044u /* FRACTION SLASH */)) + buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_FRACTION_SLASH; } } @@ -576,7 +577,7 @@ static void hb_form_clusters (hb_buffer_t *buffer) { - if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII)) + if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_CONTINUATIONS)) return; if (HB_BUFFER_CLUSTER_LEVEL_IS_GRAPHEMES (buffer->cluster_level)) @@ -618,14 +619,14 @@ for (unsigned i = 0; i < count; i++) { auto gc = _hb_glyph_info_get_general_category (&info[i]); - if (gc == HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER) - found_number = true; - else if (HB_UNICODE_GENERAL_CATEGORY_IS_LETTER (gc)) + if (HB_UNICODE_GENERAL_CATEGORY_IS_LETTER (gc)) { found_letter = true; break; } - else if (_hb_codepoint_is_regional_indicator (info[i].codepoint)) + else if (gc == HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER) + found_number = true; + else if (unlikely (_hb_codepoint_is_regional_indicator (info[i].codepoint))) found_ri = true; } if ((found_number || found_ri) && !found_letter) @@ -651,59 +652,6 @@ * Substitute */ -#ifndef HB_NO_VERTICAL -static hb_codepoint_t -hb_vert_char_for (hb_codepoint_t u) -{ - switch (u >> 8) - { - case 0x20: switch (u) { - case 0x2013u: return 0xfe32u; // EN DASH - case 0x2014u: return 0xfe31u; // EM DASH - case 0x2025u: return 0xfe30u; // TWO DOT LEADER - case 0x2026u: return 0xfe19u; // HORIZONTAL ELLIPSIS - } break; - case 0x30: switch (u) { - case 0x3001u: return 0xfe11u; // IDEOGRAPHIC COMMA - case 0x3002u: return 0xfe12u; // IDEOGRAPHIC FULL STOP - case 0x3008u: return 0xfe3fu; // LEFT ANGLE BRACKET - case 0x3009u: return 0xfe40u; // RIGHT ANGLE BRACKET - case 0x300au: return 0xfe3du; // LEFT DOUBLE ANGLE BRACKET - case 0x300bu: return 0xfe3eu; // RIGHT DOUBLE ANGLE BRACKET - case 0x300cu: return 0xfe41u; // LEFT CORNER BRACKET - case 0x300du: return 0xfe42u; // RIGHT CORNER BRACKET - case 0x300eu: return 0xfe43u; // LEFT WHITE CORNER BRACKET - case 0x300fu: return 0xfe44u; // RIGHT WHITE CORNER BRACKET - case 0x3010u: return 0xfe3bu; // LEFT BLACK LENTICULAR BRACKET - case 0x3011u: return 0xfe3cu; // RIGHT BLACK LENTICULAR BRACKET - case 0x3014u: return 0xfe39u; // LEFT TORTOISE SHELL BRACKET - case 0x3015u: return 0xfe3au; // RIGHT TORTOISE SHELL BRACKET - case 0x3016u: return 0xfe17u; // LEFT WHITE LENTICULAR BRACKET - case 0x3017u: return 0xfe18u; // RIGHT WHITE LENTICULAR BRACKET - } break; - case 0xfe: switch (u) { - case 0xfe4fu: return 0xfe34u; // WAVY LOW LINE - } break; - case 0xff: switch (u) { - case 0xff01u: return 0xfe15u; // FULLWIDTH EXCLAMATION MARK - case 0xff08u: return 0xfe35u; // FULLWIDTH LEFT PARENTHESIS - case 0xff09u: return 0xfe36u; // FULLWIDTH RIGHT PARENTHESIS - case 0xff0cu: return 0xfe10u; // FULLWIDTH COMMA - case 0xff1au: return 0xfe13u; // FULLWIDTH COLON - case 0xff1bu: return 0xfe14u; // FULLWIDTH SEMICOLON - case 0xff1fu: return 0xfe16u; // FULLWIDTH QUESTION MARK - case 0xff3bu: return 0xfe47u; // FULLWIDTH LEFT SQUARE BRACKET - case 0xff3du: return 0xfe48u; // FULLWIDTH RIGHT SQUARE BRACKET - case 0xff3fu: return 0xfe33u; // FULLWIDTH LOW LINE - case 0xff5bu: return 0xfe37u; // FULLWIDTH LEFT CURLY BRACKET - case 0xff5du: return 0xfe38u; // FULLWIDTH RIGHT CURLY BRACKET - } break; - } - - return u; -} -#endif - static inline void hb_ot_rotate_chars (const hb_ot_shape_context_t *c) { @@ -729,7 +677,7 @@ if (HB_DIRECTION_IS_VERTICAL (c->target_direction) && !c->plan->has_vert) { for (unsigned int i = 0; i < count; i++) { - hb_codepoint_t codepoint = hb_vert_char_for (info[i].codepoint); + hb_codepoint_t codepoint = hb_unicode_funcs_t::vertical_char_for (info[i].codepoint); if (unlikely (codepoint != info[i].codepoint && c->font->has_glyph (codepoint))) info[i].codepoint = codepoint; } @@ -744,7 +692,7 @@ return; #endif - if (!(c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII) || + if (!(c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_FRACTION_SLASH) || !c->plan->has_frac) return; @@ -845,7 +793,13 @@ unsigned int i = 0; for (i = 0; i < count; i++) if (unlikely (_hb_glyph_info_is_default_ignorable (&info[i]))) - pos[i].x_advance = pos[i].y_advance = pos[i].x_offset = pos[i].y_offset = 0; + { + pos[i].x_advance = pos[i].y_advance = 0; + if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction)) + pos[i].x_offset = 0; + else + pos[i].y_offset = 0; + } } static void @@ -900,11 +854,11 @@ static inline void hb_ot_map_glyphs_fast (hb_buffer_t *buffer) { - /* Normalization process sets up glyph_index(), we just copy it. */ + /* Normalization process sets up normalizer_glyph_index(), we just copy it. */ unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) - info[i].codepoint = info[i].glyph_index(); + info[i].codepoint = info[i].normalizer_glyph_index(); buffer->content_type = HB_BUFFER_CONTENT_TYPE_GLYPHS; } @@ -942,7 +896,7 @@ hb_ot_rotate_chars (c); - HB_BUFFER_ALLOCATE_VAR (buffer, glyph_index); + HB_BUFFER_ALLOCATE_VAR (buffer, normalizer_glyph_index); _hb_ot_shape_normalize (c->plan, buffer, c->font); @@ -954,7 +908,7 @@ hb_ot_map_glyphs_fast (buffer); - HB_BUFFER_DEALLOCATE_VAR (buffer, glyph_index); + HB_BUFFER_DEALLOCATE_VAR (buffer, normalizer_glyph_index); } static inline void @@ -969,11 +923,17 @@ #ifndef HB_NO_AAT_SHAPE if (unlikely (c->plan->apply_morx)) + { hb_aat_layout_substitute (c->plan, c->font, c->buffer, c->user_features, c->num_user_features); + c->buffer->update_digest (); + } else #endif + { + c->buffer->update_digest (); c->plan->substitute (c->font, buffer); + } } static inline void @@ -1054,23 +1014,16 @@ { c->font->get_glyph_h_advances (count, &info[0].codepoint, sizeof(info[0]), &pos[0].x_advance, sizeof(pos[0])); - /* The nil glyph_h_origin() func returns 0, so no need to apply it. */ - if (c->font->has_glyph_h_origin_func ()) - for (unsigned int i = 0; i < count; i++) - c->font->subtract_glyph_h_origin (info[i].codepoint, - &pos[i].x_offset, - &pos[i].y_offset); + // h_origin defaults to zero; only apply it if the font has it. + if (c->font->has_glyph_h_origin_func () || c->font->has_glyph_h_origins_func ()) + c->font->subtract_glyph_h_origins (c->buffer); } else { c->font->get_glyph_v_advances (count, &info[0].codepoint, sizeof(info[0]), &pos[0].y_advance, sizeof(pos[0])); - for (unsigned int i = 0; i < count; i++) - { - c->font->subtract_glyph_v_origin (info[i].codepoint, - &pos[i].x_offset, - &pos[i].y_offset); - } + // v_origin defaults to non-zero; apply even if only fallback is there. + c->font->subtract_glyph_v_origins (c->buffer); } if (c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK) _hb_ot_shape_fallback_spaces (c->plan, c->font, c->buffer); @@ -1079,10 +1032,6 @@ static inline void hb_ot_position_plan (const hb_ot_shape_context_t *c) { - unsigned int count = c->buffer->len; - hb_glyph_info_t *info = c->buffer->info; - hb_glyph_position_t *pos = c->buffer->pos; - /* If the font has no GPOS and direction is forward, then when * zeroing mark widths, we shift the mark with it, such that the * mark is positioned hanging over the previous glyph. When @@ -1097,12 +1046,9 @@ /* We change glyph origin to what GPOS expects (horizontal), apply GPOS, change it back. */ - /* The nil glyph_h_origin() func returns 0, so no need to apply it. */ - if (c->font->has_glyph_h_origin_func ()) - for (unsigned int i = 0; i < count; i++) - c->font->add_glyph_h_origin (info[i].codepoint, - &pos[i].x_offset, - &pos[i].y_offset); + // h_origin defaults to zero; only apply it if the font has it. + if (c->font->has_glyph_h_origin_func () || c->font->has_glyph_h_origins_func ()) + c->font->add_glyph_h_origins (c->buffer); hb_ot_layout_position_start (c->font, c->buffer); @@ -1139,12 +1085,9 @@ hb_ot_zero_width_default_ignorables (c->buffer); hb_ot_layout_position_finish_offsets (c->font, c->buffer); - /* The nil glyph_h_origin() func returns 0, so no need to apply it. */ - if (c->font->has_glyph_h_origin_func ()) - for (unsigned int i = 0; i < count; i++) - c->font->subtract_glyph_h_origin (info[i].codepoint, - &pos[i].x_offset, - &pos[i].y_offset); + // h_origin defaults to zero; only apply it if the font has it. + if (c->font->has_glyph_h_origin_func () || c->font->has_glyph_h_origins_func ()) + c->font->subtract_glyph_h_origins (c->buffer); if (c->plan->fallback_mark_positioning) _hb_ot_shape_fallback_mark_position (c->plan, c->font, c->buffer, @@ -1172,8 +1115,33 @@ /* Propagate cluster-level glyph flags to be the same on all cluster glyphs. * Simplifies using them. */ - if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS)) + hb_mask_t and_mask = HB_GLYPH_FLAG_DEFINED; + if ((buffer->flags & HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT) == 0) + and_mask &= ~HB_GLYPH_FLAG_UNSAFE_TO_CONCAT; + + hb_glyph_info_t *info = buffer->info; + + if ((buffer->flags & HB_BUFFER_FLAG_PRODUCE_SAFE_TO_INSERT_TATWEEL) == 0) + { + foreach_cluster (buffer, start, end) + { + if (end - start == 1) + { + info[start].mask &= and_mask; + continue; + } + + unsigned int mask = 0; + for (unsigned int i = start; i < end; i++) + mask |= info[i].mask; + + mask &= and_mask; + + for (unsigned int i = start; i < end; i++) + info[i].mask = mask; + } return; + } /* If we are producing SAFE_TO_INSERT_TATWEEL, then do two things: * @@ -1181,30 +1149,20 @@ * are UNSAFE_TO_BREAK, then clear the SAFE_TO_INSERT_TATWEEL, * - Any place that is SAFE_TO_INSERT_TATWEEL, is also now UNSAFE_TO_BREAK. * - * We couldn't make this interaction earlier. It has to be done here. + * We couldn't make this interaction earlier. It has to be done this way. */ - bool flip_tatweel = buffer->flags & HB_BUFFER_FLAG_PRODUCE_SAFE_TO_INSERT_TATWEEL; - - bool clear_concat = (buffer->flags & HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT) == 0; - - hb_glyph_info_t *info = buffer->info; - foreach_cluster (buffer, start, end) { unsigned int mask = 0; for (unsigned int i = start; i < end; i++) - mask |= info[i].mask & HB_GLYPH_FLAG_DEFINED; + mask |= info[i].mask; - if (flip_tatweel) - { - if (mask & HB_GLYPH_FLAG_UNSAFE_TO_BREAK) - mask &= ~HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL; - if (mask & HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL) - mask |= HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT; - } + if (mask & HB_GLYPH_FLAG_UNSAFE_TO_BREAK) + mask &= ~HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL; + if (mask & HB_GLYPH_FLAG_SAFE_TO_INSERT_TATWEEL) + mask |= HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT; - if (clear_concat) - mask &= ~HB_GLYPH_FLAG_UNSAFE_TO_CONCAT; + mask &= and_mask; for (unsigned int i = start; i < end; i++) info[i].mask = mask; @@ -1245,8 +1203,6 @@ _hb_buffer_deallocate_unicode_vars (c->buffer); c->buffer->props.direction = c->target_direction; - - c->buffer->leave (); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shape.hh 2026-04-17 19:08:13.000000000 +0000 @@ -150,7 +150,7 @@ static constexpr bool apply_morx = false; #endif bool script_zero_marks : 1; - bool script_fallback_mark_positioning : 1; + bool script_fallback_position : 1; const struct hb_ot_shaper_t *shaper; HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-joining-list.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-joining-list.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-joining-list.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-joining-list.hh 2026-04-17 19:08:13.000000000 +0000 @@ -6,10 +6,10 @@ * * on files with these headers: * - * # ArabicShaping-16.0.0.txt - * # Date: 2024-07-30 - * # Scripts-16.0.0.txt - * # Date: 2024-04-30, 21:48:40 GMT + * # ArabicShaping-17.0.0.txt + * # Date: 2025-08-14 + * # Scripts-17.0.0.txt + * # Date: 2025-07-24, 13:28:55 GMT */ #ifndef HB_OT_SHAPER_ARABIC_JOINING_LIST_HH diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -6,10 +6,10 @@ * * on files with these headers: * - * # ArabicShaping-16.0.0.txt - * # Date: 2024-07-30 - * # Blocks-16.0.0.txt - * # Date: 2024-02-02 + * # ArabicShaping-17.0.0.txt + * # Date: 2025-08-14 + * # Blocks-17.0.0.txt + * # Date: 2025-08-01 * UnicodeData.txt does not have a header. */ @@ -80,7 +80,7 @@ /* Arabic Extended-B */ /* 0860 */ R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R, - /* 0880 */ R,R,R,C,C,C,D,U,U,D,D,D,D,D,R,X,U,U,X,X,X,X,X,X,X,X,X,X,X,X,X,X, + /* 0880 */ R,R,R,C,C,C,D,U,U,D,D,D,D,D,R,D,U,U,X,X,X,X,X,X,X,X,X,X,X,X,X,X, /* Arabic Extended-A */ @@ -140,9 +140,9 @@ /* Arabic Extended-C */ - /* 10EC0 */ R,D,D, + /* 10EC0 */ R,D,D,X,D,D, -#define joining_offset_0x10f30u 1185 +#define joining_offset_0x10f30u 1188 /* Sogdian */ @@ -161,14 +161,14 @@ /* 10FA0 */ D,U,D,D,R,R,R,U,D,R,R,D,D,R,D,D, /* 10FC0 */ U,D,R,R,D,U,U,U,U,R,D,L, -#define joining_offset_0x110bdu 1341 +#define joining_offset_0x110bdu 1344 /* Kaithi */ /* 110A0 */ U,X,X, /* 110C0 */ X,X,X,X,X,X,X,X,X,X,X,X,X,U, -#define joining_offset_0x1e900u 1358 +#define joining_offset_0x1e900u 1361 /* Adlam */ @@ -176,7 +176,7 @@ /* 1E920 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D, /* 1E940 */ D,D,D,D,X,X,X,X,X,X,X,T, -}; /* Table items: 1434; occupancy: 57% */ +}; /* Table items: 1437; occupancy: 58% */ static unsigned int @@ -204,7 +204,7 @@ if (hb_in_range<hb_codepoint_t> (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u]; if (hb_in_range<hb_codepoint_t> (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u]; if (hb_in_range<hb_codepoint_t> (u, 0x10D00u, 0x10D23u)) return joining_table[u - 0x10D00u + joining_offset_0x10d00u]; - if (hb_in_range<hb_codepoint_t> (u, 0x10EC2u, 0x10EC4u)) return joining_table[u - 0x10EC2u + joining_offset_0x10ec2u]; + if (hb_in_range<hb_codepoint_t> (u, 0x10EC2u, 0x10EC7u)) return joining_table[u - 0x10EC2u + joining_offset_0x10ec2u]; if (hb_in_range<hb_codepoint_t> (u, 0x10F30u, 0x10FCBu)) return joining_table[u - 0x10F30u + joining_offset_0x10f30u]; break; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-arabic.cc 2026-04-17 19:08:13.000000000 +0000 @@ -654,7 +654,7 @@ /* https://www.unicode.org/reports/tr53/ */ -static hb_codepoint_t +static const hb_codepoint_t modifier_combining_marks[] = { 0x0654u, /* ARABIC HAMZA ABOVE */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-hangul.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-hangul.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-hangul.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-hangul.cc 2026-04-17 19:08:13.000000000 +0000 @@ -427,7 +427,7 @@ HB_TAG_NONE, /* gpos_tag */ HB_OT_SHAPE_NORMALIZATION_MODE_NONE, HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE, - false, /* fallback_position */ + true, /* fallback_position */ }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-machine.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-machine.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-machine.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-machine.hh 2026-04-17 19:08:13.000000000 +0000 @@ -53,7 +53,7 @@ }; -#line 57 "hb-ot-shaper-indic-machine.hh" +#line 54 "hb-ot-shaper-indic-machine.hh" #define indic_syllable_machine_ex_A 9u #define indic_syllable_machine_ex_C 1u #define indic_syllable_machine_ex_CM 16u @@ -77,7 +77,7 @@ #define indic_syllable_machine_ex_ZWNJ 5u -#line 81 "hb-ot-shaper-indic-machine.hh" +#line 76 "hb-ot-shaper-indic-machine.hh" static const unsigned char _indic_syllable_machine_trans_keys[] = { 8u, 57u, 4u, 57u, 5u, 57u, 5u, 57u, 13u, 13u, 4u, 57u, 4u, 57u, 4u, 57u, 8u, 57u, 5u, 57u, 5u, 57u, 13u, 13u, 4u, 57u, 4u, 57u, 4u, 57u, 4u, 57u, @@ -1126,7 +1126,7 @@ int cs; hb_glyph_info_t *info = buffer->info; -#line 1130 "hb-ot-shaper-indic-machine.hh" +#line 1119 "hb-ot-shaper-indic-machine.hh" { cs = indic_syllable_machine_start; ts = 0; @@ -1142,7 +1142,7 @@ unsigned int syllable_serial = 1; -#line 1146 "hb-ot-shaper-indic-machine.hh" +#line 1131 "hb-ot-shaper-indic-machine.hh" { int _slen; int _trans; @@ -1156,7 +1156,7 @@ #line 1 "NONE" {ts = p;} break; -#line 1160 "hb-ot-shaper-indic-machine.hh" +#line 1143 "hb-ot-shaper-indic-machine.hh" } _keys = _indic_syllable_machine_trans_keys + (cs<<1); @@ -1268,7 +1268,7 @@ #line 117 "hb-ot-shaper-indic-machine.rl" {act = 7;} break; -#line 1272 "hb-ot-shaper-indic-machine.hh" +#line 1232 "hb-ot-shaper-indic-machine.hh" } _again: @@ -1277,7 +1277,7 @@ #line 1 "NONE" {ts = 0;} break; -#line 1281 "hb-ot-shaper-indic-machine.hh" +#line 1239 "hb-ot-shaper-indic-machine.hh" } if ( ++p != pe ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-table.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-table.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-table.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic-table.cc 2026-04-17 19:08:13.000000000 +0000 @@ -6,12 +6,12 @@ * * on files with these headers: * - * # IndicSyllabicCategory-16.0.0.txt - * # Date: 2024-04-30, 21:48:21 GMT - * # IndicPositionalCategory-16.0.0.txt - * # Date: 2024-04-30, 21:48:21 GMT - * # Blocks-16.0.0.txt - * # Date: 2024-02-02 + * # IndicSyllabicCategory-17.0.0.txt + * # Date: 2025-08-01, 04:02:23 GMT + * # IndicPositionalCategory-17.0.0.txt + * # Date: 2025-07-29, 13:35:52 GMT + * # Blocks-17.0.0.txt + * # Date: 2025-08-01 */ #include "hb.hh" diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-indic.cc 2026-04-17 19:08:13.000000000 +0000 @@ -296,11 +296,6 @@ const indic_config_t *config; bool is_old_spec; -#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE - bool uniscribe_bug_compatible; -#else - static constexpr bool uniscribe_bug_compatible = false; -#endif mutable hb_atomic_t<hb_codepoint_t> virama_glyph; hb_indic_would_substitute_feature_t rphf; @@ -327,9 +322,6 @@ } indic_plan->is_old_spec = indic_plan->config->has_old_spec && ((plan->map.chosen_script[0] & 0x000000FFu) != '2'); -#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE - indic_plan->uniscribe_bug_compatible = hb_options ().uniscribe_bug_compatible; -#endif indic_plan->virama_glyph = -1; /* Use zero-context would_substitute() matching for new-spec of the main @@ -943,17 +935,7 @@ unsigned int start, unsigned int end) { /* We treat placeholder/dotted-circle as if they are consonants, so we - * should just chain. Only if not in compatibility mode that is... */ - - const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data; - if (indic_plan->uniscribe_bug_compatible) - { - /* For dotted-circle, this is what Uniscribe does: - * If dotted-circle is the last glyph, it just does nothing. - * Ie. It doesn't form Reph. */ - if (buffer->info[end - 1].indic_category() == I_Cat(DOTTEDCIRCLE)) - return; - } + * should just chain... */ initial_reordering_consonant_syllable (plan, face, buffer, start, end); } @@ -1347,8 +1329,7 @@ * Uniscribe doesn't do this. * TEST: U+0930,U+094D,U+0915,U+094B,U+094D */ - if (!indic_plan->uniscribe_bug_compatible && - unlikely (is_halant (info[new_reph_pos]))) + if (unlikely (is_halant (info[new_reph_pos]))) { for (unsigned int i = base + 1; i < new_reph_pos; i++) if (FLAG_UNSAFE (info[i].indic_category()) & (FLAG (I_Cat(M)) | FLAG (I_Cat(MPst)))) @@ -1451,27 +1432,6 @@ else buffer->unsafe_to_break (start - 1, start + 1); } - - - /* - * Finish off the clusters and go home! - */ - if (indic_plan->uniscribe_bug_compatible) - { - switch ((hb_tag_t) plan->props.script) - { - case HB_SCRIPT_TAMIL: - break; - - default: - /* Uniscribe merges the entire syllable into a single cluster... Except for Tamil. - * This means, half forms are submerged into the main consonant's cluster. - * This is unnecessary, and makes cursor positioning harder, but that's what - * Uniscribe does. */ - buffer->merge_clusters (start, end); - break; - } - } } @@ -1501,9 +1461,7 @@ hb_buffer_t *buffer, hb_font_t *font) { - const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data; - if (!indic_plan->uniscribe_bug_compatible) - _hb_preprocess_text_vowel_constraints (plan, buffer, font); + _hb_preprocess_text_vowel_constraints (plan, buffer, font); } static bool diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer-machine.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer-machine.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer-machine.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer-machine.hh 2026-04-17 19:08:13.000000000 +0000 @@ -48,7 +48,7 @@ }; -#line 52 "hb-ot-shaper-khmer-machine.hh" +#line 49 "hb-ot-shaper-khmer-machine.hh" #define khmer_syllable_machine_ex_C 1u #define khmer_syllable_machine_ex_DOTTEDCIRCLE 11u #define khmer_syllable_machine_ex_H 4u @@ -66,7 +66,7 @@ #define khmer_syllable_machine_ex_ZWNJ 5u -#line 70 "hb-ot-shaper-khmer-machine.hh" +#line 65 "hb-ot-shaper-khmer-machine.hh" static const unsigned char _khmer_syllable_machine_trans_keys[] = { 5u, 26u, 5u, 26u, 1u, 15u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 5u, 26u, 1u, 15u, 5u, 26u, 5u, 26u, @@ -294,7 +294,7 @@ int cs; hb_glyph_info_t *info = buffer->info; -#line 298 "hb-ot-shaper-khmer-machine.hh" +#line 287 "hb-ot-shaper-khmer-machine.hh" { cs = khmer_syllable_machine_start; ts = 0; @@ -310,7 +310,7 @@ unsigned int syllable_serial = 1; -#line 314 "hb-ot-shaper-khmer-machine.hh" +#line 299 "hb-ot-shaper-khmer-machine.hh" { int _slen; int _trans; @@ -324,7 +324,7 @@ #line 1 "NONE" {ts = p;} break; -#line 328 "hb-ot-shaper-khmer-machine.hh" +#line 311 "hb-ot-shaper-khmer-machine.hh" } _keys = _khmer_syllable_machine_trans_keys + (cs<<1); @@ -394,7 +394,7 @@ #line 98 "hb-ot-shaper-khmer-machine.rl" {act = 3;} break; -#line 398 "hb-ot-shaper-khmer-machine.hh" +#line 368 "hb-ot-shaper-khmer-machine.hh" } _again: @@ -403,7 +403,7 @@ #line 1 "NONE" {ts = 0;} break; -#line 407 "hb-ot-shaper-khmer-machine.hh" +#line 375 "hb-ot-shaper-khmer-machine.hh" } if ( ++p != pe ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-khmer.cc 2026-04-17 19:08:13.000000000 +0000 @@ -141,12 +141,6 @@ * typographical correctness.", hence in overrides... */ map->enable_feature (HB_TAG('c','l','i','g')); - /* Uniscribe does not apply 'kern' in Khmer. */ - if (hb_options ().uniscribe_bug_compatible) - { - map->disable_feature (HB_TAG('k','e','r','n')); - } - map->disable_feature (HB_TAG('l','i','g','a')); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-myanmar-machine.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-myanmar-machine.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-myanmar-machine.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-myanmar-machine.hh 2026-04-17 19:08:13.000000000 +0000 @@ -50,7 +50,7 @@ }; -#line 54 "hb-ot-shaper-myanmar-machine.hh" +#line 51 "hb-ot-shaper-myanmar-machine.hh" #define myanmar_syllable_machine_ex_A 9u #define myanmar_syllable_machine_ex_As 32u #define myanmar_syllable_machine_ex_C 1u @@ -78,7 +78,7 @@ #define myanmar_syllable_machine_ex_ZWNJ 5u -#line 82 "hb-ot-shaper-myanmar-machine.hh" +#line 77 "hb-ot-shaper-myanmar-machine.hh" static const unsigned char _myanmar_syllable_machine_trans_keys[] = { 1u, 57u, 3u, 57u, 5u, 57u, 5u, 57u, 3u, 57u, 5u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 3u, 57u, 5u, 57u, 1u, 15u, 3u, 57u, 3u, 57u, 3u, 57u, @@ -549,7 +549,7 @@ int cs; hb_glyph_info_t *info = buffer->info; -#line 553 "hb-ot-shaper-myanmar-machine.hh" +#line 542 "hb-ot-shaper-myanmar-machine.hh" { cs = myanmar_syllable_machine_start; ts = 0; @@ -565,7 +565,7 @@ unsigned int syllable_serial = 1; -#line 569 "hb-ot-shaper-myanmar-machine.hh" +#line 554 "hb-ot-shaper-myanmar-machine.hh" { int _slen; int _trans; @@ -579,7 +579,7 @@ #line 1 "NONE" {ts = p;} break; -#line 583 "hb-ot-shaper-myanmar-machine.hh" +#line 566 "hb-ot-shaper-myanmar-machine.hh" } _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); @@ -649,7 +649,7 @@ #line 113 "hb-ot-shaper-myanmar-machine.rl" {act = 3;} break; -#line 653 "hb-ot-shaper-myanmar-machine.hh" +#line 623 "hb-ot-shaper-myanmar-machine.hh" } _again: @@ -658,7 +658,7 @@ #line 1 "NONE" {ts = 0;} break; -#line 662 "hb-ot-shaper-myanmar-machine.hh" +#line 630 "hb-ot-shaper-myanmar-machine.hh" } if ( ++p != pe ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-thai.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-thai.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-thai.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-thai.cc 2026-04-17 19:08:13.000000000 +0000 @@ -163,7 +163,7 @@ } -static enum thai_above_state_t +static const enum thai_above_state_t { /* Cluster above looks like: */ T0, /* ⣤ */ T1, /* ⣼ */ @@ -191,7 +191,7 @@ }; -static enum thai_below_state_t +static const enum thai_below_state_t { B0, /* No descender */ B1, /* Removable descender */ @@ -334,7 +334,7 @@ /* Is SARA AM. Decompose and reorder. */ (void) buffer->output_glyph (NIKHAHIT_FROM_SARA_AM (u)); - _hb_glyph_info_set_continuation (&buffer->prev()); + _hb_glyph_info_set_continuation (&buffer->prev(), buffer); if (unlikely (!buffer->replace_glyph (SARA_AA_FROM_SARA_AM (u)))) break; /* Make Nikhahit be recognized as a ccc=0 mark when zeroing widths. */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-machine.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-machine.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-machine.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-machine.hh 2026-04-17 19:08:13.000000000 +0000 @@ -53,7 +53,7 @@ }; -#line 57 "hb-ot-shaper-use-machine.hh" +#line 54 "hb-ot-shaper-use-machine.hh" #define use_syllable_machine_ex_B 1u #define use_syllable_machine_ex_CGJ 6u #define use_syllable_machine_ex_CMAbv 31u @@ -100,7 +100,7 @@ #define use_syllable_machine_ex_ZWNJ 14u -#line 104 "hb-ot-shaper-use-machine.hh" +#line 99 "hb-ot-shaper-use-machine.hh" static const unsigned char _use_syllable_machine_trans_keys[] = { 49u, 51u, 0u, 56u, 11u, 56u, 11u, 56u, 1u, 53u, 14u, 48u, 14u, 47u, 14u, 47u, 14u, 47u, 14u, 46u, 14u, 46u, 14u, 14u, 14u, 48u, 14u, 48u, 14u, 48u, 1u, 14u, @@ -929,7 +929,7 @@ unsigned int act HB_UNUSED; int cs; -#line 933 "hb-ot-shaper-use-machine.hh" +#line 922 "hb-ot-shaper-use-machine.hh" { cs = use_syllable_machine_start; ts = 0; @@ -942,7 +942,7 @@ unsigned int syllable_serial = 1; -#line 946 "hb-ot-shaper-use-machine.hh" +#line 931 "hb-ot-shaper-use-machine.hh" { int _slen; int _trans; @@ -956,7 +956,7 @@ #line 1 "NONE" {ts = p;} break; -#line 960 "hb-ot-shaper-use-machine.hh" +#line 943 "hb-ot-shaper-use-machine.hh" } _keys = _use_syllable_machine_trans_keys + (cs<<1); @@ -1078,7 +1078,7 @@ #line 181 "hb-ot-shaper-use-machine.rl" {act = 9;} break; -#line 1082 "hb-ot-shaper-use-machine.hh" +#line 1039 "hb-ot-shaper-use-machine.hh" } _again: @@ -1087,7 +1087,7 @@ #line 1 "NONE" {ts = 0;} break; -#line 1091 "hb-ot-shaper-use-machine.hh" +#line 1046 "hb-ot-shaper-use-machine.hh" } if ( ++p != pe ) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-use-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -6,18 +6,18 @@ * * on files with these headers: * - * # IndicSyllabicCategory-16.0.0.txt - * # Date: 2024-04-30, 21:48:21 GMT - * # IndicPositionalCategory-16.0.0.txt - * # Date: 2024-04-30, 21:48:21 GMT - * # ArabicShaping-16.0.0.txt - * # Date: 2024-07-30 - * # DerivedCoreProperties-16.0.0.txt - * # Date: 2024-05-31, 18:09:32 GMT - * # Blocks-16.0.0.txt - * # Date: 2024-02-02 - * # Scripts-16.0.0.txt - * # Date: 2024-04-30, 21:48:40 GMT + * # IndicSyllabicCategory-17.0.0.txt + * # Date: 2025-08-01, 04:02:23 GMT + * # IndicPositionalCategory-17.0.0.txt + * # Date: 2025-07-29, 13:35:52 GMT + * # ArabicShaping-17.0.0.txt + * # Date: 2025-08-14 + * # DerivedCoreProperties-17.0.0.txt + * # Date: 2025-07-30, 23:55:08 GMT + * # Blocks-17.0.0.txt + * # Date: 2025-08-01 + * # Scripts-17.0.0.txt + * # Date: 2025-07-24, 13:28:55 GMT * # Override values For Indic_Syllabic_Category * # Not derivable * # Initial version based on Unicode 7.0 by Andrew Glass 2014-03-17 @@ -101,8 +101,9 @@ #ifndef HB_OPTIMIZE_SIZE -static const uint8_t -hb_use_u8[3345] = +#include <stdint.h> + +static const uint8_t hb_use_u8[3343]= { 16, 50, 51, 51, 51, 52, 51, 83, 118, 131, 57, 58, 59, 195, 211, 62, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, @@ -126,24 +127,24 @@ 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 51, 2, 2, 2, 2, 2, 2, 2, 2, 52, 53, 2, 54, 2, 2, 55, 56, 2, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 2, 70, 71, 72, 73, - 2, 74, 2, 75, 76, 77, 78, 2, 2, 79, 80, 81, 82, 2, 83, 84, - 2, 85, 85, 85, 85, 85, 85, 85, 85, 86, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 85, 85, 85, 85, 85, 85, 85, 87, 2, 2, 2, 2, 2, 2, 2, + 2, 74, 2, 75, 76, 77, 78, 79, 2, 80, 81, 82, 83, 2, 84, 85, + 2, 86, 86, 86, 86, 86, 86, 86, 86, 87, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 88, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 88, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 89, 90, 2, 2, 2, 91, 2, 2, 2, 92, - 93, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 94, 94, 94, 95, 2, 2, 2, 2, 2, + 2, 2, 2, 89, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 90, 91, 2, 2, 2, 92, 2, 2, 2, 93, + 94, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 95, 95, 95, 96, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 96, 97, 2, 2, 2, 2, 2, - 2, 2, 2, 98, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 97, 98, 2, 2, 2, 2, 2, + 2, 2, 2, 99, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 99, 2, 2, 100, 2, 2, 2, 101, 2, 102, 2, 2, 2, - 2, 2, 2, 103, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 104, 104, 105, 106, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 2, 2, 2, 100, 2, 2, 101, 2, 2, 2, 102, 2, 103, 2, 2, 2, + 2, 2, 2, 104, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 105, 105, 106, 107, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 5, 0, 0, 0, 0, 0, 6, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -192,99 +193,99 @@ 48, 48, 48, 48, 15, 82, 83, 84, 85, 86, 87, 0, 0, 0, 0, 88, 0, 9, 0, 0, 30, 0, 89, 81, 90, 2, 2, 2, 2, 9, 0, 0, 0, 42, 42, 91, 92, 2, 2, 2, 2, 2, 2, 2, 2, 13, 9, 0, - 0, 93, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 9, 22, 80, 45, 22, 94, 61, 0, 0, 95, 96, 95, 95, 97, 98, 0, - 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 9, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 29, 0, 0, - 0, 2, 2, 2, 2, 2, 9, 0, 0, 2, 2, 2, 52, 99, 45, 0, - 0, 2, 2, 100, 101, 102, 103, 61, 63, 104, 16, 45, 22, 59, 21, 80, - 48, 48, 76, 11, 11, 11, 105, 46, 40, 11, 106, 74, 2, 2, 2, 2, - 2, 2, 2, 107, 22, 20, 20, 22, 48, 48, 22, 108, 2, 2, 2, 9, - 0, 0, 0, 0, 0, 0, 109, 110, 110, 110, 110, 0, 0, 0, 0, 0, - 0, 106, 74, 2, 2, 2, 2, 2, 2, 60, 61, 59, 25, 22, 111, 61, - 2, 2, 2, 2, 107, 22, 23, 45, 45, 102, 112, 0, 0, 0, 0, 0, - 0, 2, 2, 61, 18, 48, 23, 113, 102, 102, 102, 114, 115, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 0, 30, 2, 11, 46, 116, 116, 116, 11, 116, - 116, 15, 116, 116, 116, 26, 0, 40, 0, 0, 0, 117, 51, 11, 5, 0, - 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 6, 119, - 120, 42, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 120, - 121, 120, 120, 120, 120, 120, 120, 120, 120, 0, 0, 122, 0, 0, 0, 0, - 0, 0, 7, 122, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 123, 123, 0, 0, - 0, 2, 2, 2, 2, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, - 124, 0, 123, 123, 0, 0, 0, 0, 0, 2, 53, 2, 108, 2, 10, 2, - 2, 2, 65, 19, 16, 0, 0, 31, 0, 2, 2, 0, 0, 0, 0, 0, - 0, 29, 2, 2, 2, 2, 2, 2, 2, 2, 2, 125, 23, 23, 23, 23, - 23, 23, 23, 126, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 2, 0, 0, 0, 0, 0, 52, 2, 2, 2, 22, 22, 127, 116, - 0, 2, 2, 2, 128, 20, 59, 20, 113, 102, 129, 0, 0, 0, 0, 0, - 0, 11, 130, 2, 2, 2, 2, 2, 2, 2, 131, 23, 22, 20, 48, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 2, 2, 52, 30, 2, 2, 2, - 2, 2, 2, 2, 2, 10, 22, 59, 99, 76, 135, 136, 137, 0, 0, 0, - 0, 2, 138, 2, 2, 2, 2, 139, 0, 30, 2, 42, 5, 0, 79, 15, - 2, 53, 22, 140, 52, 53, 2, 2, 105, 10, 9, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 141, 21, 25, 0, 0, 142, 143, 0, 0, 0, - 0, 2, 65, 45, 23, 80, 47, 144, 0, 81, 81, 81, 81, 81, 81, 81, - 81, 0, 0, 0, 0, 0, 0, 0, 6, 120, 120, 120, 120, 121, 0, 0, - 0, 2, 2, 2, 2, 2, 9, 2, 2, 2, 9, 2, 30, 2, 2, 2, - 2, 2, 30, 2, 2, 2, 30, 9, 0, 128, 20, 27, 31, 0, 0, 145, - 146, 2, 2, 30, 2, 30, 2, 2, 2, 2, 2, 2, 0, 14, 37, 0, - 147, 2, 2, 13, 37, 0, 30, 2, 2, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 2, 2, 9, 2, 2, 11, 41, 0, 0, 0, - 0, 2, 2, 2, 0, 27, 22, 22, 30, 2, 2, 2, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 27, 38, 0, 2, 2, 2, 116, 116, 116, 116, - 116, 148, 2, 9, 0, 0, 0, 0, 0, 2, 14, 14, 0, 0, 0, 0, - 0, 9, 2, 2, 9, 2, 2, 2, 2, 30, 2, 9, 0, 30, 2, 0, - 0, 149, 150, 151, 2, 2, 2, 2, 2, 2, 2, 2, 2, 22, 22, 20, - 20, 20, 22, 22, 134, 0, 0, 0, 0, 0, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 2, 2, 2, 2, 2, 53, 52, 53, 0, 0, 0, 0, - 153, 11, 74, 2, 2, 2, 2, 2, 2, 18, 19, 21, 16, 24, 37, 0, - 0, 0, 31, 0, 0, 0, 0, 0, 0, 11, 49, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 128, 20, 22, 154, 22, 21, 155, 156, 2, 2, 2, 2, - 2, 0, 0, 65, 157, 0, 0, 0, 0, 2, 13, 0, 0, 0, 0, 0, - 0, 2, 65, 25, 20, 20, 20, 22, 22, 108, 158, 0, 0, 56, 159, 31, - 160, 30, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, - 19, 22, 22, 161, 44, 0, 0, 0, 49, 128, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 9, 9, 2, 2, 30, 2, 2, 2, 2, 2, 2, 2, - 30, 2, 2, 2, 2, 2, 2, 2, 10, 18, 19, 21, 22, 162, 31, 0, - 0, 11, 11, 30, 2, 2, 2, 9, 30, 9, 2, 30, 2, 2, 58, 17, - 23, 16, 23, 47, 32, 33, 32, 34, 0, 0, 0, 0, 35, 0, 0, 0, - 2, 2, 23, 0, 11, 11, 11, 46, 0, 11, 11, 46, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 30, 0, 9, 2, 2, 2, 30, 45, 59, 20, - 20, 31, 33, 32, 32, 25, 163, 29, 164, 165, 37, 0, 0, 0, 0, 0, - 0, 12, 26, 0, 0, 0, 0, 0, 0, 2, 2, 65, 25, 20, 20, 20, - 22, 23, 126, 15, 17, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, - 166, 167, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 20, 66, 99, 25, - 160, 11, 168, 9, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, - 65, 25, 20, 20, 0, 48, 48, 11, 169, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 2, 20, 0, 23, 19, 20, 20, 21, 16, 82, - 169, 38, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 10, 170, - 25, 20, 22, 22, 168, 9, 0, 0, 0, 2, 2, 2, 2, 2, 9, 43, - 136, 23, 22, 20, 76, 21, 22, 0, 0, 2, 2, 2, 9, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 18, 19, 20, 21, 22, 105, 169, 37, 0, - 0, 2, 2, 2, 9, 30, 0, 2, 2, 2, 2, 30, 9, 2, 2, 2, - 2, 23, 23, 18, 32, 33, 12, 171, 165, 172, 173, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 0, 2, 2, 2, 65, 25, 20, 20, 0, 22, 23, - 29, 108, 0, 33, 0, 0, 0, 0, 0, 52, 20, 22, 22, 22, 140, 2, - 2, 2, 174, 175, 11, 15, 176, 61, 177, 0, 0, 1, 147, 0, 0, 0, - 0, 52, 20, 22, 16, 19, 20, 2, 2, 2, 2, 158, 158, 158, 178, 178, - 178, 178, 178, 178, 15, 179, 0, 30, 0, 22, 20, 20, 31, 22, 22, 11, + 0, 2, 2, 2, 2, 2, 2, 2, 9, 22, 80, 45, 22, 93, 61, 0, + 0, 94, 95, 94, 94, 96, 97, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 9, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, + 0, 2, 2, 2, 2, 29, 0, 0, 0, 2, 2, 2, 2, 2, 9, 0, + 0, 2, 2, 2, 52, 98, 45, 0, 0, 2, 2, 99, 100, 101, 102, 61, + 63, 103, 16, 45, 22, 59, 21, 80, 48, 48, 76, 11, 11, 11, 104, 46, + 40, 11, 105, 74, 2, 2, 2, 2, 2, 2, 2, 106, 22, 20, 20, 22, + 48, 48, 22, 107, 2, 2, 2, 9, 0, 0, 0, 0, 0, 0, 108, 109, + 109, 109, 109, 0, 0, 0, 0, 0, 0, 105, 74, 2, 2, 2, 2, 2, + 2, 60, 61, 59, 25, 22, 110, 61, 2, 2, 2, 2, 106, 22, 23, 45, + 45, 101, 111, 0, 0, 0, 0, 0, 0, 2, 2, 61, 18, 48, 23, 112, + 101, 101, 101, 113, 114, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 30, + 2, 11, 46, 115, 115, 115, 11, 115, 115, 15, 115, 115, 115, 26, 0, 40, + 0, 0, 0, 116, 51, 11, 5, 0, 0, 0, 0, 0, 0, 0, 117, 0, + 0, 0, 0, 0, 0, 0, 6, 118, 119, 42, 42, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 119, 119, 120, 119, 119, 119, 119, 119, 119, 119, + 119, 0, 0, 121, 0, 0, 0, 0, 0, 0, 7, 121, 0, 0, 0, 0, + 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 0, 122, 122, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, + 30, 0, 0, 0, 0, 0, 0, 0, 123, 0, 122, 122, 0, 0, 0, 0, + 0, 2, 53, 2, 107, 2, 10, 2, 2, 2, 65, 19, 16, 0, 0, 31, + 0, 2, 2, 0, 0, 0, 0, 0, 0, 29, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 124, 23, 23, 23, 23, 23, 23, 23, 125, 0, 0, 0, 0, + 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, 0, 0, 0, 0, 0, + 52, 2, 2, 2, 22, 22, 126, 115, 0, 2, 2, 2, 127, 20, 59, 20, + 112, 101, 128, 0, 0, 0, 0, 0, 0, 11, 129, 2, 2, 2, 2, 2, + 2, 2, 130, 23, 22, 20, 48, 131, 132, 133, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 52, 30, 2, 2, 2, 2, 2, 2, 2, 2, 10, 22, 59, + 98, 76, 134, 135, 136, 0, 0, 0, 0, 2, 137, 2, 2, 2, 2, 138, + 0, 30, 2, 42, 5, 0, 79, 15, 2, 139, 20, 53, 127, 139, 2, 2, + 140, 10, 9, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 141, 21, + 25, 0, 0, 142, 143, 0, 0, 0, 0, 2, 65, 45, 23, 80, 47, 144, + 0, 81, 81, 81, 81, 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, + 6, 119, 119, 119, 119, 120, 0, 0, 0, 2, 2, 2, 2, 2, 9, 2, + 2, 2, 9, 2, 30, 2, 2, 2, 2, 2, 30, 2, 2, 2, 30, 9, + 0, 127, 20, 27, 31, 0, 0, 145, 146, 2, 2, 30, 2, 30, 2, 2, + 2, 2, 2, 2, 0, 14, 37, 0, 147, 2, 2, 13, 37, 0, 30, 2, + 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 2, 2, + 9, 2, 2, 11, 41, 0, 0, 0, 0, 2, 2, 2, 0, 27, 22, 22, + 30, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 27, 38, + 0, 2, 2, 2, 115, 115, 115, 115, 115, 148, 2, 9, 0, 0, 0, 0, + 0, 2, 14, 14, 0, 0, 0, 0, 0, 9, 2, 2, 9, 2, 2, 2, + 2, 30, 2, 9, 0, 30, 2, 0, 0, 149, 150, 151, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 22, 22, 20, 20, 20, 22, 22, 133, 0, 0, 0, + 0, 0, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 2, 2, 2, 2, + 2, 53, 52, 53, 0, 0, 0, 0, 153, 11, 74, 2, 2, 2, 2, 2, + 2, 18, 19, 21, 16, 24, 37, 0, 0, 0, 31, 0, 0, 0, 0, 0, + 0, 11, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 127, 20, 22, 154, + 22, 21, 155, 156, 2, 2, 2, 2, 2, 0, 0, 65, 157, 0, 0, 0, + 0, 2, 13, 0, 0, 0, 0, 0, 0, 2, 65, 25, 20, 20, 20, 22, + 22, 107, 158, 0, 0, 56, 159, 31, 160, 30, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 23, 19, 22, 22, 161, 44, 0, 0, 0, + 49, 127, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 9, 9, 2, 2, + 30, 2, 2, 2, 2, 2, 2, 2, 30, 2, 2, 2, 2, 2, 2, 2, + 10, 18, 19, 21, 22, 162, 31, 0, 0, 11, 11, 30, 2, 2, 2, 9, + 30, 9, 2, 30, 2, 2, 58, 17, 23, 16, 23, 47, 32, 33, 32, 34, + 0, 0, 0, 0, 35, 0, 0, 0, 2, 2, 23, 0, 11, 11, 11, 46, + 0, 11, 11, 46, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 30, 0, + 9, 2, 2, 2, 30, 45, 59, 20, 20, 31, 33, 32, 32, 25, 163, 29, + 164, 165, 37, 0, 0, 0, 0, 0, 0, 12, 26, 0, 0, 0, 0, 0, + 0, 2, 2, 65, 25, 20, 20, 20, 22, 23, 125, 15, 17, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 0, 0, 166, 167, 0, 0, 0, 0, 0, 0, + 0, 18, 19, 20, 20, 66, 98, 25, 160, 11, 168, 9, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 65, 25, 20, 20, 0, 48, 48, 11, + 169, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 20, + 0, 23, 19, 20, 20, 21, 16, 82, 169, 38, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 10, 170, 25, 20, 22, 22, 168, 9, 0, 0, + 0, 2, 2, 2, 2, 2, 9, 43, 135, 23, 22, 20, 76, 21, 22, 0, + 0, 2, 2, 2, 9, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 18, + 19, 20, 21, 22, 104, 169, 37, 0, 0, 2, 2, 2, 9, 30, 0, 2, + 2, 2, 2, 30, 9, 2, 2, 2, 2, 23, 23, 18, 32, 33, 12, 171, + 165, 172, 173, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 2, + 2, 65, 25, 20, 20, 0, 22, 23, 29, 107, 0, 33, 0, 0, 0, 0, + 0, 52, 20, 22, 22, 22, 139, 2, 2, 2, 174, 140, 11, 15, 175, 61, + 176, 0, 0, 1, 147, 0, 0, 0, 0, 52, 20, 22, 16, 19, 20, 2, + 2, 2, 2, 158, 158, 158, 177, 177, 177, 177, 177, 177, 15, 178, 0, 30, + 0, 16, 20, 16, 16, 0, 0, 0, 0, 22, 20, 20, 31, 22, 22, 11, 169, 0, 61, 61, 61, 61, 61, 61, 61, 66, 21, 82, 46, 0, 0, 0, 0, 2, 2, 2, 9, 2, 30, 2, 2, 52, 22, 22, 31, 0, 38, 22, - 27, 11, 159, 180, 181, 0, 0, 0, 0, 2, 2, 2, 30, 9, 2, 2, + 27, 11, 159, 179, 180, 0, 0, 0, 0, 2, 2, 2, 30, 9, 2, 2, 2, 2, 2, 2, 2, 2, 23, 23, 47, 22, 35, 82, 68, 0, 0, 0, - 0, 2, 182, 66, 47, 0, 0, 0, 0, 11, 183, 2, 2, 2, 2, 2, + 0, 2, 181, 66, 47, 0, 0, 0, 0, 11, 182, 2, 2, 2, 2, 2, 2, 2, 2, 23, 22, 20, 31, 0, 48, 16, 143, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 156, 0, 0, 184, 184, 184, 184, 184, 184, 184, - 184, 185, 185, 185, 186, 187, 185, 184, 184, 188, 184, 184, 189, 190, 190, 190, - 190, 190, 190, 190, 0, 0, 0, 0, 0, 184, 184, 184, 184, 184, 191, 0, - 0, 2, 2, 2, 2, 2, 2, 2, 22, 22, 22, 22, 22, 22, 192, 193, - 194, 11, 11, 11, 46, 0, 0, 0, 0, 29, 74, 2, 2, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 156, 0, 0, 183, 183, 183, 183, 183, 183, 183, + 183, 184, 184, 184, 185, 186, 184, 183, 183, 187, 183, 183, 188, 189, 189, 189, + 189, 189, 189, 189, 0, 0, 0, 0, 0, 183, 183, 183, 183, 183, 190, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 22, 22, 22, 22, 22, 22, 191, 192, + 193, 11, 11, 11, 46, 0, 0, 0, 0, 29, 74, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 65, 47, 0, 2, 2, 2, 2, 2, 9, 0, - 58, 195, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 0, 0, 0, 40, 116, 26, 0, 0, 0, 0, 0, + 58, 194, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 0, 0, 0, 40, 115, 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 2, 2, 2, 2, 2, 0, 58, 37, 0, 6, 120, 120, 120, 121, 0, + 30, 2, 2, 2, 2, 2, 0, 58, 37, 0, 6, 119, 119, 119, 120, 0, 0, 11, 11, 11, 49, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 46, 2, 2, 2, 2, 2, 2, 11, 11, 2, 2, 2, 2, 2, 2, 22, 22, 2, 2, 2, 2, 2, 2, 2, @@ -300,23 +301,21 @@ VMBlw,VMPst, IS, VAbv, MPst, MPre, MBlw, MBlw, B, MBlw, MBlw, VPst,VMPst,VMPst, B, MBlw, VPst, VPre, VAbv, VAbv,VMPst,VMPst,VMBlw, B,VMPst, VBlw, VPst, CGJ, CGJ, VPst,VMAbv,VMAbv, FMAbv, FAbv,CMAbv,FMAbv,VMAbv,FMAbv, VAbv, IS,FMAbv, B,FMAbv, B, CGJ, WJ, CGJ, GB, - CMAbv,CMAbv, B, GB, B, VAbv, SUB, FPst, FPst,VMBlw, FPst, FPst, FBlw,VMAbv,FMBlw, VAbv, - VPre, B, MPre, MBlw, SUB, FAbv, FAbv, MAbv, SUB, Sk, VPst, VAbv,VMAbv,VMAbv, FAbv,CMAbv, - VPst, H, B, O,SMAbv,SMAbv,SMAbv, VPst, IS, RK, RK, VBlw, FAbv,VMPre,VMPre,FMAbv, - CMBlw,VMBlw,VMBlw,VMAbv, CS, O,FMAbv, ZWNJ, CGJ, WJ, WJ, WJ, O,FMPst, O, SB, - SE, O, H, MPst, VPst, H,VMAbv, VAbv,VMBlw, B, VBlw, FPst, VPst, FAbv,VMPst, B, - CMAbv, VAbv, MBlw, MPst, MBlw, H, O, VBlw, MPst, MPre, MAbv, MBlw, O, B, FAbv, FAbv, - FPst, VBlw, B, B, VPre, O,VMPst, IS, O,VMPst, VBlw, VPst,VMBlw,VMBlw,VMAbv, O, + CMAbv,CMAbv, B, VAbv, SUB, FPst, FPst,VMBlw, FPst, FPst, FBlw,VMAbv,FMBlw, VAbv, VPre, B, + MPre, MBlw, SUB, FAbv, FAbv, MAbv, SUB, Sk, VPst, VAbv,VMAbv,VMAbv, FAbv,CMAbv, VPst, H, + B, O,SMAbv,SMAbv,SMAbv, VPst, IS, RK, RK, VBlw, FAbv,VMPre,VMPre,FMAbv,CMBlw,VMBlw, + VMBlw,VMAbv, CS, O,FMAbv, ZWNJ, CGJ, WJ, WJ, WJ, O,FMPst, O, SB, SE, O, + H, MPst, VPst, H,VMAbv, VAbv,VMBlw, B, VBlw, FPst, VPst, FAbv,VMPst, B,CMAbv, VAbv, + MBlw, MPst, MBlw, H, O, VBlw, MPst, MPre, MAbv, MBlw, O, B, FAbv, FAbv, FPst, VBlw, + B, VBlw,VMAbv, B, VPre, O,VMPst, IS, O,VMPst, VBlw, VPst,VMBlw,VMBlw,VMAbv, O, IS,VMBlw, B,VMPst,VMAbv,VMPst, CS, CS, B, N, N, O, HN, VPre, VBlw, VAbv, IS,CMAbv, O, VPst, B, R, R,CMBlw, VAbv, VPre,VMAbv,VMAbv, H, VAbv,CMBlw,VMPst, O,VMAbv,CMBlw, IS, R,FMAbv, B, CS, CS, H,CMBlw,VMPst, H,VMPst, VAbv,VMAbv, - VPst, MPst, R, MPst,CMBlw, B,FMBlw, VBlw,VMAbv, CS, SUB, SUB, GB, FBlw, FBlw,CMAbv, - IS, VBlw, IS, R, MBlw, GB, VAbv, R,VMPst, G, G, J, J, J, SB, SE, - J, HR, G, G, HM, HM, HM, G, O, MPre, MPre, MPst,VMAbv, MBlw, VBlw, O, - VBlw, + VPst, MPst, R, MPst,CMBlw, B,FMBlw, CS, SUB, SUB, GB, FBlw, FBlw,CMAbv, IS, VBlw, + IS, R, MBlw, GB, VAbv, R,VMPst, G, G, J, J, J, SB, SE, J, HR, + G, G, HM, HM, HM, G, O, MPre, MPre, MPst,VMAbv, MBlw, VBlw, O, VBlw, }; -static const uint16_t -hb_use_u16[856] = +static const uint16_t hb_use_u16[864]= { 0, 0, 1, 2, 0, 3, 0, 3, 0, 0, 4, 5, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, @@ -330,66 +329,65 @@ 73, 74, 75, 76, 77, 0, 0, 0, 10, 10, 78, 79, 80, 81, 82, 83, 84, 85, 0, 0, 0, 0, 0, 0, 10, 86, 10, 87, 10, 88, 89, 90, 10, 10, 10, 91, 92, 93, 2, 0, 94, 0, 10, 10, 10, 10, 10, 95, - 96, 10, 97, 0, 0, 0, 0, 0, 98, 99,100,101, 31, 10,102,103, - 10, 10,104, 10,105,106, 0, 0, 10,107, 10, 10, 10,108,109,110, - 2, 2, 0, 0, 0, 0, 0, 0,111, 10, 10,112,113, 2,114,115, - 116, 10,117, 10, 10, 10,118,119, 10, 10,120,121,122, 0, 0, 0, - 0, 0, 0, 0, 0,123,124,125, 0, 0, 0, 0, 0, 0, 0,126, - 127,128,129, 0, 0, 0,130,131,132, 0, 0, 0, 0, 0, 0,133, - 0, 0, 0, 0,134, 0, 0, 0, 0, 0, 0, 0, 0, 0,135, 0, - 0, 0, 0, 10, 10, 10,136,137, 0, 0,138, 0, 0, 0, 0, 0, - 139, 10,140, 0, 10, 10, 10,141,142, 10, 10,143,144, 2,145,146, - 10, 10,147, 10,148,149, 0, 0,150, 10, 10,151,152, 2,153, 99, - 10, 10,154,155,156, 2, 10,157, 10, 10, 10,158,159, 0,160,161, - 0, 0, 0, 0, 10, 10,162, 2,163, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,164, 0, 0, 0, 0, 0, 0, 0,165, - 0, 0, 0, 0, 0, 0, 0,166,166,167, 34,168, 0, 0, 0, 0, - 169,170, 10,171, 95, 0, 0, 0, 0, 0, 0, 0, 70, 10,172, 0, - 10,173,174, 0, 0, 0, 0, 0, 10, 10,175, 2, 9, 10,176, 10, - 177, 0, 0, 0, 0, 0, 0, 0, 10, 10,178,173, 0, 0, 0, 0, - 0, 0, 0, 10,179,180, 0, 10,181, 0, 0,182,183, 0, 0, 0, - 184, 10, 10,185,186,187,188,189,190, 10, 10,191,192, 0, 0, 0, - 193, 10,194,195,196, 10, 10,197,190, 10, 10,198,199,106,200,103, - 10, 34,201,202,203, 0, 0, 0,204,205, 95, 10, 10,206,207, 2, - 208, 21, 22,209,210,211,212,213,214, 10, 10,215,216,217,218, 0, - 10, 10, 10,219,220,221,222, 0,200, 10, 10,223,224, 2, 0, 0, - 10, 10,225,226,227,228, 0, 0, 10, 10, 10,229,230, 2, 0, 0, - 10, 10,231,232, 2, 10,141, 0, 10,233,234,104,235, 0, 0, 0, - 10, 10,236,237, 0, 0, 0, 0,238,239, 10,240,241, 2, 0, 0, - 0, 0,242, 10, 10,243,244, 0,245, 10, 10,246,247,248, 10, 10, - 249,250, 0, 0, 0, 0, 0, 0, 22, 10,225,251, 8, 10, 71, 19, - 10,252, 74,253, 0, 0, 0, 0,254, 10, 10,255,256, 2,257, 10, - 258,259, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,260, - 261, 49, 10,262,263,264, 0, 0,265,265,265,265,265,265,265,265, - 265,265,265,266,267,268,265,265,265,265,265,265,265,265,265,269, - 10,270,271, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 10, 10, 10,272, 0, 0, 0, 0, 0, 0, 0, 0,273, 10,274, 2, - 10, 10, 10, 10,275,276,277,277,278,279, 0, 0, 0, 0,280, 0, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,177, 0,281, - 10, 10, 10, 10, 10, 10,106, 71, 95,282, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,283, 10, 10, 71,284,285, 0, 0, 0, - 0, 10,286, 0, 10, 10,287, 2, 0, 0, 0, 0, 0, 10,288, 2, - 0, 0, 0, 0, 0, 10,289,106, 10, 10, 10, 10,290, 2, 0, 0, - 130,130,130,130,130,130,130,130,163,163,163,163,163,163,163,163, - 163,163,163,163,163,163,163,130, + 96, 10, 97, 0, 0, 0, 0, 0, 10, 98, 99,100, 31, 10,101,102, + 10, 10,103, 10,104,105, 0, 0, 10,106, 10, 10, 10,107,108,109, + 2, 2, 0, 0, 0, 0, 0, 0,110, 10, 10,111,112, 2,113,114, + 115, 10,116, 10, 10, 10,117,118, 10, 10,119,120,121, 0, 0, 0, + 0, 0, 0, 0, 0,122,123,124, 0, 0, 0, 0, 0, 0, 0,125, + 126,127,128, 0, 0, 0,129,130,131, 0, 0, 0, 0, 0, 0,132, + 0, 0, 0, 0,133, 0, 0, 0, 0, 0, 0, 0, 0, 0,134, 0, + 0, 0, 0, 10, 10, 10,135,136, 0, 0,137, 0, 0, 0, 0, 0, + 138, 10,139, 0, 10, 10, 10,140,141, 10, 10,142,143, 2,144,145, + 10, 10,146, 10,147,148, 0, 0,149, 10, 10,150,151, 2,152, 98, + 10, 10,153,154,155, 2, 10,156, 10, 10, 10,157,158, 0,159,160, + 0, 0, 0, 0, 10, 10,161, 2,162, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,163, 0, 0, 0, 0, 0, 0, 0,164, + 0, 0, 0, 0, 0, 0, 0,165,165,166, 34,167, 0, 0, 0, 0, + 168,169, 10,170, 95, 0, 0, 0, 0, 0, 0, 0, 70, 10,171, 0, + 10,172,173, 0, 0, 0, 0, 0, 10, 10,174, 2, 9, 10,175, 10, + 176, 0, 0, 0, 0, 0, 0, 0, 10, 10,177,172, 0, 0, 0, 0, + 0, 0, 0, 10,178,179, 0, 10,180, 0, 0,181,182, 0, 0, 0, + 183, 10, 10,184,185,186,187,188,189, 10, 10,190,191, 0, 0, 0, + 192, 10,193,194,195, 10, 10,196,189, 10, 10,197,198,105,199,102, + 10, 34,200,201,202, 0, 0, 0,203,204, 95, 10, 10,205,206, 2, + 207, 21, 22,208,209,210,211,212,213, 10, 10,214,215,216,217, 0, + 10, 10, 10,218,219,220,221, 0,199, 10, 10,222,223, 2, 0, 0, + 10, 10,224,225,226,227, 0, 0, 10, 10, 10,228,229, 2, 0, 0, + 10, 10,230,231, 2, 10,140, 0, 10,232,233,103,234, 0, 0, 0, + 10, 10,235,236, 0, 0, 0, 0,237,238, 10,239,240, 2, 0, 0, + 0, 0,241, 10, 10,242,243, 0,244, 10, 10,245,246,247, 10, 10, + 248,249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0, + 22, 10,224,251, 8, 10, 71, 19, 10,252, 74,253, 0, 0, 0, 0, + 254, 10, 10,255,256, 2,257, 10,258,259, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 10,260,261, 49, 10,262,263,264, 0, 0, + 265,265,265,265,265,265,265,265,265,265,265,266,267,268,265,265, + 265,265,265,265,265,265,265,269, 10,270,271, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 10, 10, 10,272, 0, 0, 0, 0, + 0, 0, 0, 0,273, 10,274, 2, 10, 10, 10, 10,275,276,277,277, + 278,279, 0, 0, 0, 0,280, 0, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10,176, 0,281, 10, 10, 10, 10, 10, 10,105, 71, + 95,282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,283, + 10, 10, 71,284,285, 0, 0, 0, 0, 10,286, 0, 10, 10,287, 2, + 0, 0, 0, 0, 0, 10,288, 2, 0, 0, 0, 0, 0, 10,289,105, + 10, 10, 10, 10,290, 2, 0, 0,129,129,129,129,129,129,129,129, + 162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,129, }; -static inline unsigned -hb_use_b4 (const uint8_t* a, unsigned i) +static inline uint8_t hb_use_b4 (const uint8_t* a, unsigned i) { - return (a[i>>1]>>((i&1u)<<2))&15u; + return (a[i>>1]>>((i&1)<<2))&15; } -static inline uint_fast8_t -hb_use_get_category (unsigned u) +static inline uint8_t hb_use_get_category (unsigned u) { - return u<921600u?hb_use_u8[2953+(((hb_use_u8[625+(((hb_use_u16[((hb_use_u8[113+(((hb_use_b4(hb_use_u8,u>>1>>3>>3>>5))<<5)+((u>>1>>3>>3)&31u))])<<3)+((u>>1>>3)&7u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:O; + return u<921600 ? hb_use_u8[2953u+((hb_use_u8[625u+((hb_use_u16[((hb_use_u8[113u+((hb_use_b4(hb_use_u8,((((((((u)>>1))>>3))>>3))>>5)))<<5)+((((((((u)>>1))>>3))>>3))&31)])<<3)+((((((u)>>1))>>3))&7)])<<3)+((((u)>>1))&7)])<<1)+((u)&1)] : O; } #else -static const uint8_t -hb_use_u8[3657] = +#include <stdint.h> + +static const uint8_t hb_use_u8[3663]= { 16, 50, 51, 51, 51, 52, 51, 83, 118, 131, 57, 58, 59, 195, 211, 62, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, @@ -405,16 +403,16 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 26, 27, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29, 30, 1, 1, 1, 1, 1, 31, 1, 1, 1, 1, 32, 33, 1, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 1, 48, 49, 50, - 51, 52, 52, 52, 52, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 54, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 55, 1, 1, 1, 1, 1, 1, 1, 1, 56, 57, 1, 58, 1, - 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 60, 61, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 62, 1, 1, - 1, 1, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 64, 65, 1, 66, 67, 1, 1, 1, 68, 1, 1, 1, 1, 1, - 1, 69, 70, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 0, 1, 2, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 53, 53, 53, 54, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 56, 1, 1, 1, 1, 1, 1, 1, 1, 57, 58, 1, 59, 1, + 60, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 63, 1, 1, + 1, 1, 64, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 65, 66, 1, 67, 68, 1, 1, 1, 69, 1, 1, 1, 1, 1, + 1, 70, 71, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 0, 1, 2, 2, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 9, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, @@ -438,120 +436,120 @@ 0, 0, 0, 0, 0, 56, 179, 180, 0, 56, 181, 182, 0, 56, 183, 184, 185, 186, 187, 188, 0, 0, 0, 0, 0, 56, 189, 0, 0, 0, 0, 0, 0, 190, 191, 192, 0, 0, 193, 194, 195, 196, 197, 198, 56, 199, 0, 0, - 0, 200, 201, 202, 203, 204, 205, 0, 0, 206, 207, 208, 209, 210, 67, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 211, 212, 213, 214, 0, 0, 0, 0, - 0, 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, 217, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 218, 219, 220, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 67, 0, 56, 221, 0, 0, 0, 0, 0, - 0, 0, 0, 222, 223, 0, 0, 0, 0, 56, 56, 224, 225, 226, 0, 0, - 227, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 228, - 229, 56, 56, 56, 230, 231, 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, - 0, 56, 233, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 235, 56, - 236, 0, 0, 0, 0, 0, 0, 101, 237, 0, 0, 0, 0, 0, 0, 101, - 238, 56, 56, 239, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, - 240, 241, 241, 241, 241, 241, 241, 241, 242, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 4, 0, 5, 0, 0, 0, 0, 0, 6, - 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 10, 11, 11, 11, 11, 0, 0, 0, 9, 12, - 0, 2, 2, 2, 2, 13, 14, 0, 0, 11, 15, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 16, 17, 18, 19, 20, 21, 22, 16, 23, 24, - 25, 12, 26, 27, 20, 2, 2, 2, 2, 2, 20, 0, 2, 2, 2, 2, - 2, 0, 2, 2, 2, 2, 2, 2, 2, 28, 29, 30, 2, 2, 2, 9, - 30, 9, 30, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 2, 2, - 2, 9, 9, 0, 2, 2, 0, 17, 18, 19, 20, 31, 32, 33, 32, 34, - 0, 0, 0, 0, 35, 0, 0, 2, 30, 2, 0, 0, 0, 0, 0, 9, - 36, 12, 15, 30, 2, 2, 9, 0, 30, 9, 2, 30, 9, 2, 0, 37, - 18, 19, 31, 0, 27, 38, 27, 39, 0, 40, 0, 0, 0, 30, 2, 9, - 9, 0, 0, 0, 2, 2, 2, 2, 2, 41, 42, 43, 0, 0, 0, 0, - 0, 12, 15, 30, 2, 2, 2, 2, 30, 2, 30, 2, 2, 2, 2, 2, - 2, 9, 2, 30, 2, 2, 0, 17, 18, 19, 20, 21, 27, 22, 35, 24, - 0, 0, 0, 0, 0, 30, 41, 41, 44, 12, 29, 30, 2, 2, 2, 9, - 30, 9, 2, 30, 2, 2, 0, 17, 45, 0, 0, 27, 22, 0, 0, 2, - 30, 30, 0, 0, 0, 0, 0, 0, 0, 0, 46, 30, 2, 2, 9, 0, - 2, 9, 2, 2, 0, 30, 9, 9, 2, 0, 30, 9, 0, 2, 9, 0, - 2, 2, 2, 2, 2, 2, 0, 0, 23, 16, 47, 0, 48, 33, 48, 34, - 0, 0, 0, 0, 35, 0, 0, 0, 0, 15, 29, 49, 2, 2, 2, 9, - 2, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 17, - 22, 16, 23, 47, 22, 38, 22, 39, 0, 0, 0, 27, 31, 2, 9, 0, - 0, 10, 29, 30, 2, 2, 2, 9, 2, 2, 2, 30, 2, 2, 0, 17, - 45, 0, 0, 35, 47, 0, 0, 0, 9, 50, 51, 0, 0, 0, 0, 0, - 0, 11, 29, 2, 2, 2, 2, 9, 2, 2, 2, 2, 2, 2, 52, 53, - 23, 19, 20, 31, 48, 33, 48, 34, 54, 0, 0, 0, 35, 0, 0, 0, - 30, 12, 29, 30, 2, 2, 2, 2, 2, 2, 2, 2, 9, 0, 2, 2, - 2, 2, 30, 2, 2, 2, 2, 30, 0, 2, 2, 2, 9, 0, 55, 0, - 35, 23, 22, 31, 31, 18, 48, 48, 25, 0, 23, 0, 0, 0, 0, 0, - 0, 2, 0, 2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, - 0, 2, 2, 56, 56, 57, 0, 0, 18, 2, 2, 2, 2, 30, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 9, 0, 58, 21, 59, 22, 22, 20, 20, - 46, 21, 11, 31, 11, 2, 2, 60, 61, 61, 61, 61, 61, 62, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 63, - 0, 0, 0, 0, 64, 0, 0, 0, 0, 2, 2, 2, 2, 2, 65, 45, - 59, 66, 22, 22, 67, 68, 69, 70, 71, 2, 2, 2, 2, 2, 1, 0, - 5, 2, 2, 2, 23, 20, 2, 2, 72, 71, 73, 74, 65, 73, 29, 29, - 2, 52, 22, 53, 2, 2, 2, 2, 2, 2, 75, 76, 77, 29, 29, 78, - 79, 2, 2, 2, 2, 2, 29, 45, 0, 2, 59, 80, 0, 0, 0, 0, - 30, 2, 59, 47, 0, 0, 0, 0, 0, 2, 59, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 2, 2, 2, 9, 2, 9, 59, 0, 0, 0, 0, 0, - 0, 2, 2, 81, 45, 22, 59, 20, 48, 48, 48, 48, 15, 82, 83, 84, - 85, 86, 87, 0, 0, 0, 0, 88, 0, 9, 0, 0, 30, 0, 89, 81, - 90, 2, 2, 2, 2, 9, 0, 0, 0, 42, 42, 91, 92, 2, 2, 2, - 2, 2, 2, 2, 2, 13, 9, 0, 0, 93, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 9, 22, 80, 45, 22, 94, 61, 0, - 0, 95, 96, 95, 95, 97, 98, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 200, 0, 0, 0, 0, 201, 202, 203, 204, 205, 206, 0, + 0, 207, 208, 209, 210, 211, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 212, 213, 214, 215, 0, 0, 0, 0, 0, 216, 216, 216, 216, 216, 216, 216, + 216, 216, 217, 218, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, + 219, 220, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, + 0, 56, 222, 0, 0, 0, 0, 0, 0, 0, 0, 223, 224, 0, 0, 0, + 0, 56, 56, 225, 226, 227, 0, 0, 228, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 229, 230, 56, 56, 56, 231, 232, 0, 0, + 0, 0, 0, 0, 233, 0, 0, 0, 0, 56, 234, 235, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 101, 236, 56, 237, 0, 0, 0, 0, 0, 0, 101, + 238, 0, 0, 0, 0, 0, 0, 101, 239, 56, 56, 240, 0, 0, 0, 0, + 0, 241, 241, 241, 241, 241, 241, 241, 241, 242, 242, 242, 242, 242, 242, 242, + 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, + 0, 5, 0, 0, 0, 0, 0, 6, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 11, + 11, 11, 11, 0, 0, 0, 9, 12, 0, 2, 2, 2, 2, 13, 14, 0, + 0, 11, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 17, + 18, 19, 20, 21, 22, 16, 23, 24, 25, 12, 26, 27, 20, 2, 2, 2, + 2, 2, 20, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, + 2, 28, 29, 30, 2, 2, 2, 9, 30, 9, 30, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 9, 2, 2, 2, 9, 9, 0, 2, 2, 0, 17, + 18, 19, 20, 31, 32, 33, 32, 34, 0, 0, 0, 0, 35, 0, 0, 2, + 30, 2, 0, 0, 0, 0, 0, 9, 36, 12, 15, 30, 2, 2, 9, 0, + 30, 9, 2, 30, 9, 2, 0, 37, 18, 19, 31, 0, 27, 38, 27, 39, + 0, 40, 0, 0, 0, 30, 2, 9, 9, 0, 0, 0, 2, 2, 2, 2, + 2, 41, 42, 43, 0, 0, 0, 0, 0, 12, 15, 30, 2, 2, 2, 2, + 30, 2, 30, 2, 2, 2, 2, 2, 2, 9, 2, 30, 2, 2, 0, 17, + 18, 19, 20, 21, 27, 22, 35, 24, 0, 0, 0, 0, 0, 30, 41, 41, + 44, 12, 29, 30, 2, 2, 2, 9, 30, 9, 2, 30, 2, 2, 0, 17, + 45, 0, 0, 27, 22, 0, 0, 2, 30, 30, 0, 0, 0, 0, 0, 0, + 0, 0, 46, 30, 2, 2, 9, 0, 2, 9, 2, 2, 0, 30, 9, 9, + 2, 0, 30, 9, 0, 2, 9, 0, 2, 2, 2, 2, 2, 2, 0, 0, + 23, 16, 47, 0, 48, 33, 48, 34, 0, 0, 0, 0, 35, 0, 0, 0, + 0, 15, 29, 49, 2, 2, 2, 9, 2, 9, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 17, 22, 16, 23, 47, 22, 38, 22, 39, + 0, 0, 0, 27, 31, 2, 9, 0, 0, 10, 29, 30, 2, 2, 2, 9, + 2, 2, 2, 30, 2, 2, 0, 17, 45, 0, 0, 35, 47, 0, 0, 0, + 9, 50, 51, 0, 0, 0, 0, 0, 0, 11, 29, 2, 2, 2, 2, 9, + 2, 2, 2, 2, 2, 2, 52, 53, 23, 19, 20, 31, 48, 33, 48, 34, + 54, 0, 0, 0, 35, 0, 0, 0, 30, 12, 29, 30, 2, 2, 2, 2, + 2, 2, 2, 2, 9, 0, 2, 2, 2, 2, 30, 2, 2, 2, 2, 30, + 0, 2, 2, 2, 9, 0, 55, 0, 35, 23, 22, 31, 31, 18, 48, 48, + 25, 0, 23, 0, 0, 0, 0, 0, 0, 2, 0, 2, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 2, 56, 56, 57, 0, 0, + 18, 2, 2, 2, 2, 30, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, + 0, 58, 21, 59, 22, 22, 20, 20, 46, 21, 11, 31, 11, 2, 2, 60, + 61, 61, 61, 61, 61, 62, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 63, 0, 0, 0, 0, 64, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 65, 45, 59, 66, 22, 22, 67, 68, 69, 70, + 71, 2, 2, 2, 2, 2, 1, 0, 5, 2, 2, 2, 23, 20, 2, 2, + 72, 71, 73, 74, 65, 73, 29, 29, 2, 52, 22, 53, 2, 2, 2, 2, + 2, 2, 75, 76, 77, 29, 29, 78, 79, 2, 2, 2, 2, 2, 29, 45, + 0, 2, 59, 80, 0, 0, 0, 0, 30, 2, 59, 47, 0, 0, 0, 0, + 0, 2, 59, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 9, + 2, 9, 59, 0, 0, 0, 0, 0, 0, 2, 2, 81, 45, 22, 59, 20, + 48, 48, 48, 48, 15, 82, 83, 84, 85, 86, 87, 0, 0, 0, 0, 88, + 0, 9, 0, 0, 30, 0, 89, 81, 90, 2, 2, 2, 2, 9, 0, 0, + 0, 42, 42, 91, 92, 2, 2, 2, 2, 2, 2, 2, 2, 13, 9, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 9, 22, 80, 45, 22, 93, 61, 0, + 0, 94, 95, 94, 94, 96, 97, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 9, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 29, 0, 0, 0, 2, 2, 2, 2, 2, 9, 0, - 0, 2, 2, 2, 52, 99, 45, 0, 0, 2, 2, 100, 101, 102, 103, 61, - 63, 104, 16, 45, 22, 59, 21, 80, 48, 48, 76, 11, 11, 11, 105, 46, - 40, 11, 106, 74, 2, 2, 2, 2, 2, 2, 2, 107, 22, 20, 20, 22, - 48, 48, 22, 108, 2, 2, 2, 9, 0, 0, 0, 0, 0, 0, 109, 110, - 110, 110, 110, 0, 0, 0, 0, 0, 0, 106, 74, 2, 2, 2, 2, 2, - 2, 60, 61, 59, 25, 22, 111, 61, 2, 2, 2, 2, 107, 22, 23, 45, - 45, 102, 112, 0, 0, 0, 0, 0, 0, 2, 2, 61, 18, 48, 23, 113, - 102, 102, 102, 114, 115, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 30, - 2, 11, 46, 116, 116, 116, 11, 116, 116, 15, 116, 116, 116, 26, 0, 40, - 0, 0, 0, 117, 51, 11, 5, 0, 0, 0, 0, 0, 0, 0, 118, 0, - 0, 0, 0, 0, 0, 0, 6, 119, 120, 42, 42, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 120, 120, 121, 120, 120, 120, 120, 120, 120, 120, - 120, 0, 0, 122, 0, 0, 0, 0, 0, 0, 7, 122, 0, 0, 0, 0, + 0, 2, 2, 2, 52, 98, 45, 0, 0, 2, 2, 99, 100, 101, 102, 61, + 63, 103, 16, 45, 22, 59, 21, 80, 48, 48, 76, 11, 11, 11, 104, 46, + 40, 11, 105, 74, 2, 2, 2, 2, 2, 2, 2, 106, 22, 20, 20, 22, + 48, 48, 22, 107, 2, 2, 2, 9, 0, 0, 0, 0, 0, 0, 108, 109, + 109, 109, 109, 0, 0, 0, 0, 0, 0, 105, 74, 2, 2, 2, 2, 2, + 2, 60, 61, 59, 25, 22, 110, 61, 2, 2, 2, 2, 106, 22, 23, 45, + 45, 101, 111, 0, 0, 0, 0, 0, 0, 2, 2, 61, 18, 48, 23, 112, + 101, 101, 101, 113, 114, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 30, + 2, 11, 46, 115, 115, 115, 11, 115, 115, 15, 115, 115, 115, 26, 0, 40, + 0, 0, 0, 116, 51, 11, 5, 0, 0, 0, 0, 0, 0, 0, 117, 0, + 0, 0, 0, 0, 0, 0, 6, 118, 119, 42, 42, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 119, 119, 120, 119, 119, 119, 119, 119, 119, 119, + 119, 0, 0, 121, 0, 0, 0, 0, 0, 0, 7, 121, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, - 0, 0, 0, 0, 123, 123, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 0, 124, 0, 123, 123, 0, 0, 0, 0, - 0, 2, 53, 2, 108, 2, 10, 2, 2, 2, 65, 19, 16, 0, 0, 31, + 0, 0, 0, 0, 122, 122, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, + 30, 0, 0, 0, 0, 0, 0, 0, 123, 0, 122, 122, 0, 0, 0, 0, + 0, 2, 53, 2, 107, 2, 10, 2, 2, 2, 65, 19, 16, 0, 0, 31, 0, 2, 2, 0, 0, 0, 0, 0, 0, 29, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 125, 23, 23, 23, 23, 23, 23, 23, 126, 0, 0, 0, 0, + 2, 2, 2, 124, 23, 23, 23, 23, 23, 23, 23, 125, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, 0, 0, 0, 0, 0, - 52, 2, 2, 2, 22, 22, 127, 116, 0, 2, 2, 2, 128, 20, 59, 20, - 113, 102, 129, 0, 0, 0, 0, 0, 0, 11, 130, 2, 2, 2, 2, 2, - 2, 2, 131, 23, 22, 20, 48, 132, 133, 134, 0, 0, 0, 0, 0, 0, + 52, 2, 2, 2, 22, 22, 126, 115, 0, 2, 2, 2, 127, 20, 59, 20, + 112, 101, 128, 0, 0, 0, 0, 0, 0, 11, 129, 2, 2, 2, 2, 2, + 2, 2, 130, 23, 22, 20, 48, 131, 132, 133, 0, 0, 0, 0, 0, 0, 0, 2, 2, 52, 30, 2, 2, 2, 2, 2, 2, 2, 2, 10, 22, 59, - 99, 76, 135, 136, 137, 0, 0, 0, 0, 2, 138, 2, 2, 2, 2, 139, - 0, 30, 2, 42, 5, 0, 79, 15, 2, 53, 22, 140, 52, 53, 2, 2, - 105, 10, 9, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 141, 21, + 98, 76, 134, 135, 136, 0, 0, 0, 0, 2, 137, 2, 2, 2, 2, 138, + 0, 30, 2, 42, 5, 0, 79, 15, 2, 139, 20, 53, 127, 139, 2, 2, + 140, 10, 9, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 141, 21, 25, 0, 0, 142, 143, 0, 0, 0, 0, 2, 65, 45, 23, 80, 47, 144, 0, 81, 81, 81, 81, 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, - 6, 120, 120, 120, 120, 121, 0, 0, 0, 2, 2, 2, 2, 2, 9, 2, + 6, 119, 119, 119, 119, 120, 0, 0, 0, 2, 2, 2, 2, 2, 9, 2, 2, 2, 9, 2, 30, 2, 2, 2, 2, 2, 30, 2, 2, 2, 30, 9, - 0, 128, 20, 27, 31, 0, 0, 145, 146, 2, 2, 30, 2, 30, 2, 2, + 0, 127, 20, 27, 31, 0, 0, 145, 146, 2, 2, 30, 2, 30, 2, 2, 2, 2, 2, 2, 0, 14, 37, 0, 147, 2, 2, 13, 37, 0, 30, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 2, 2, 9, 2, 2, 11, 41, 0, 0, 0, 0, 2, 2, 2, 0, 27, 22, 22, 30, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 27, 38, - 0, 2, 2, 2, 116, 116, 116, 116, 116, 148, 2, 9, 0, 0, 0, 0, + 0, 2, 2, 2, 115, 115, 115, 115, 115, 148, 2, 9, 0, 0, 0, 0, 0, 2, 14, 14, 0, 0, 0, 0, 0, 9, 2, 2, 9, 2, 2, 2, 2, 30, 2, 9, 0, 30, 2, 0, 0, 149, 150, 151, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 22, 22, 20, 20, 20, 22, 22, 134, 0, 0, 0, + 2, 2, 2, 2, 2, 22, 22, 20, 20, 20, 22, 22, 133, 0, 0, 0, 0, 0, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 2, 2, 2, 2, 2, 53, 52, 53, 0, 0, 0, 0, 153, 11, 74, 2, 2, 2, 2, 2, 2, 18, 19, 21, 16, 24, 37, 0, 0, 0, 31, 0, 0, 0, 0, 0, - 0, 11, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 128, 20, 22, 154, + 0, 11, 49, 2, 2, 2, 2, 2, 2, 2, 2, 2, 127, 20, 22, 154, 22, 21, 155, 156, 2, 2, 2, 2, 2, 0, 0, 65, 157, 0, 0, 0, 0, 2, 13, 0, 0, 0, 0, 0, 0, 2, 65, 25, 20, 20, 20, 22, - 22, 108, 158, 0, 0, 56, 159, 31, 160, 30, 2, 2, 2, 2, 2, 2, + 22, 107, 158, 0, 0, 56, 159, 31, 160, 30, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 19, 22, 22, 161, 44, 0, 0, 0, - 49, 128, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 9, 9, 2, 2, + 49, 127, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 9, 9, 2, 2, 30, 2, 2, 2, 2, 2, 2, 2, 30, 2, 2, 2, 2, 2, 2, 2, 10, 18, 19, 21, 22, 162, 31, 0, 0, 11, 11, 30, 2, 2, 2, 9, 30, 9, 2, 30, 2, 2, 58, 17, 23, 16, 23, 47, 32, 33, 32, 34, @@ -559,70 +557,69 @@ 0, 11, 11, 46, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 30, 0, 9, 2, 2, 2, 30, 45, 59, 20, 20, 31, 33, 32, 32, 25, 163, 29, 164, 165, 37, 0, 0, 0, 0, 0, 0, 12, 26, 0, 0, 0, 0, 0, - 0, 2, 2, 65, 25, 20, 20, 20, 22, 23, 126, 15, 17, 0, 0, 0, + 0, 2, 2, 65, 25, 20, 20, 20, 22, 23, 125, 15, 17, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 166, 167, 0, 0, 0, 0, 0, 0, - 0, 18, 19, 20, 20, 66, 99, 25, 160, 11, 168, 9, 0, 0, 0, 0, + 0, 18, 19, 20, 20, 66, 98, 25, 160, 11, 168, 9, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 65, 25, 20, 20, 0, 48, 48, 11, 169, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 20, 0, 23, 19, 20, 20, 21, 16, 82, 169, 38, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 10, 170, 25, 20, 22, 22, 168, 9, 0, 0, - 0, 2, 2, 2, 2, 2, 9, 43, 136, 23, 22, 20, 76, 21, 22, 0, + 0, 2, 2, 2, 2, 2, 9, 43, 135, 23, 22, 20, 76, 21, 22, 0, 0, 2, 2, 2, 9, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 18, - 19, 20, 21, 22, 105, 169, 37, 0, 0, 2, 2, 2, 9, 30, 0, 2, + 19, 20, 21, 22, 104, 169, 37, 0, 0, 2, 2, 2, 9, 30, 0, 2, 2, 2, 2, 30, 9, 2, 2, 2, 2, 23, 23, 18, 32, 33, 12, 171, 165, 172, 173, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 2, - 2, 65, 25, 20, 20, 0, 22, 23, 29, 108, 0, 33, 0, 0, 0, 0, - 0, 52, 20, 22, 22, 22, 140, 2, 2, 2, 174, 175, 11, 15, 176, 61, - 177, 0, 0, 1, 147, 0, 0, 0, 0, 52, 20, 22, 16, 19, 20, 2, - 2, 2, 2, 158, 158, 158, 178, 178, 178, 178, 178, 178, 15, 179, 0, 30, - 0, 22, 20, 20, 31, 22, 22, 11, 169, 0, 61, 61, 61, 61, 61, 61, - 61, 66, 21, 82, 46, 0, 0, 0, 0, 2, 2, 2, 9, 2, 30, 2, - 2, 52, 22, 22, 31, 0, 38, 22, 27, 11, 159, 180, 181, 0, 0, 0, - 0, 2, 2, 2, 30, 9, 2, 2, 2, 2, 2, 2, 2, 2, 23, 23, - 47, 22, 35, 82, 68, 0, 0, 0, 0, 2, 182, 66, 47, 0, 0, 0, - 0, 11, 183, 2, 2, 2, 2, 2, 2, 2, 2, 23, 22, 20, 31, 0, - 48, 16, 143, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 156, 0, - 0, 184, 184, 184, 184, 184, 184, 184, 184, 185, 185, 185, 186, 187, 185, 184, - 184, 188, 184, 184, 189, 190, 190, 190, 190, 190, 190, 190, 0, 0, 0, 0, - 0, 184, 184, 184, 184, 184, 191, 0, 0, 2, 2, 2, 2, 2, 2, 2, - 22, 22, 22, 22, 22, 22, 192, 193, 194, 11, 11, 11, 46, 0, 0, 0, - 0, 29, 74, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 65, 47, - 0, 2, 2, 2, 2, 2, 9, 0, 58, 195, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, - 40, 116, 26, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 30, 2, 2, 2, 2, 2, 0, 58, - 37, 0, 6, 120, 120, 120, 121, 0, 0, 11, 11, 11, 49, 2, 2, 2, - 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, - 46, 2, 2, 2, 2, 2, 2, 11, 11, 2, 2, 2, 2, 2, 2, 22, - 22, 2, 2, 2, 2, 2, 2, 2, 20, 2, 2, 44, 44, 44, 92, 0, - 0, O, O, O, GB, B, B, O, SB, O, SE, GB, O, O, WJ,FMPst, - FMPst, O, CGJ, B, O, B,VMAbv,VMAbv,VMAbv, O,VMAbv, B,CMBlw,CMBlw,CMBlw,VMAbv, - VMPst, VAbv, VPst,CMBlw, B, VPst, VPre, VPst, VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VAbv, VPst, - VPst, VPst, H, VPre, VPst,VMBlw, O, O, VAbv, GB,VMAbv,VMPst,VMPst, O, B, VBlw, - O, O, VPre, VPre, O, VPre, H, O, VPst,FMAbv, O,CMBlw, O, VAbv, O, VAbv, - H, O,VMBlw,VMAbv,CMAbv, GB, GB, O, MBlw,CMAbv,CMAbv, VPst, VAbv,VMAbv, O, VPst, - O, VPre, VPre,VMAbv, B, O, CS, CS,VMPst, B, VAbv, VAbv, B, R, O, HVM, - O, O,FMBlw, O,CMAbv, O,CMBlw, VAbv, VBlw, B, SUB, SUB, SUB, O, SUB, SUB, - O,FMBlw, O, B, VPst, VBlw, VPre,VMAbv,VMBlw,VMPst, IS, VAbv, MPst, MPre, MBlw, MBlw, - B, MBlw, MBlw, VPst,VMPst,VMPst, B, MBlw, VPst, VPre, VAbv, VAbv,VMPst,VMPst,VMBlw, B, - VMPst, VBlw, VPst, CGJ, CGJ, VPst,VMAbv,VMAbv,FMAbv, FAbv,CMAbv,FMAbv,VMAbv,FMAbv, VAbv, IS, - FMAbv, B,FMAbv, B, CGJ, WJ, CGJ, GB,CMAbv,CMAbv, B, GB, B, VAbv, SUB, FPst, - FPst,VMBlw, FPst, FPst, FBlw,VMAbv,FMBlw, VAbv, VPre, B, MPre, MBlw, SUB, FAbv, FAbv, MAbv, - SUB, Sk, VPst, VAbv,VMAbv,VMAbv, FAbv,CMAbv, VPst, H, B, O,SMAbv,SMAbv,SMAbv, VPst, - IS, RK, RK, VBlw, FAbv,VMPre,VMPre,FMAbv,CMBlw,VMBlw,VMBlw,VMAbv, CS, O,FMAbv, ZWNJ, - CGJ, WJ, WJ, WJ, O,FMPst, O, SB, SE, O, H, MPst, VPst, H,VMAbv, VAbv, - VMBlw, B, VBlw, FPst, VPst, FAbv,VMPst, B,CMAbv, VAbv, MBlw, MPst, MBlw, H, O, VBlw, - MPst, MPre, MAbv, MBlw, O, B, FAbv, FAbv, FPst, VBlw, B, B, VPre, O,VMPst, IS, - O,VMPst, VBlw, VPst,VMBlw,VMBlw,VMAbv, O, IS,VMBlw, B,VMPst,VMAbv,VMPst, CS, CS, - B, N, N, O, HN, VPre, VBlw, VAbv, IS,CMAbv, O, VPst, B, R, R,CMBlw, - VAbv, VPre,VMAbv,VMAbv, H, VAbv,CMBlw,VMPst, O,VMAbv,CMBlw, IS, R,FMAbv, B, CS, - CS, H,CMBlw,VMPst, H,VMPst, VAbv,VMAbv, VPst, MPst, R, MPst,CMBlw, B,FMBlw, VBlw, - VMAbv, CS, SUB, SUB, GB, FBlw, FBlw,CMAbv, IS, VBlw, IS, R, MBlw, GB, VAbv, R, - VMPst, G, G, J, J, J, SB, SE, J, HR, G, G, HM, HM, HM, G, - O, MPre, MPre, MPst,VMAbv, MBlw, VBlw, O, VBlw, + 2, 65, 25, 20, 20, 0, 22, 23, 29, 107, 0, 33, 0, 0, 0, 0, + 0, 52, 20, 22, 22, 22, 139, 2, 2, 2, 174, 140, 11, 15, 175, 61, + 176, 0, 0, 1, 147, 0, 0, 0, 0, 52, 20, 22, 16, 19, 20, 2, + 2, 2, 2, 158, 158, 158, 177, 177, 177, 177, 177, 177, 15, 178, 0, 30, + 0, 16, 20, 16, 16, 0, 0, 0, 0, 22, 20, 20, 31, 22, 22, 11, + 169, 0, 61, 61, 61, 61, 61, 61, 61, 66, 21, 82, 46, 0, 0, 0, + 0, 2, 2, 2, 9, 2, 30, 2, 2, 52, 22, 22, 31, 0, 38, 22, + 27, 11, 159, 179, 180, 0, 0, 0, 0, 2, 2, 2, 30, 9, 2, 2, + 2, 2, 2, 2, 2, 2, 23, 23, 47, 22, 35, 82, 68, 0, 0, 0, + 0, 2, 181, 66, 47, 0, 0, 0, 0, 11, 182, 2, 2, 2, 2, 2, + 2, 2, 2, 23, 22, 20, 31, 0, 48, 16, 143, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 156, 0, 0, 183, 183, 183, 183, 183, 183, 183, + 183, 184, 184, 184, 185, 186, 184, 183, 183, 187, 183, 183, 188, 189, 189, 189, + 189, 189, 189, 189, 0, 0, 0, 0, 0, 183, 183, 183, 183, 183, 190, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 22, 22, 22, 22, 22, 22, 191, 192, + 193, 11, 11, 11, 46, 0, 0, 0, 0, 29, 74, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 65, 47, 0, 2, 2, 2, 2, 2, 9, 0, + 58, 194, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 0, 0, 0, 40, 115, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 30, 2, 2, 2, 2, 2, 0, 58, 37, 0, 6, 119, 119, 119, 120, 0, + 0, 11, 11, 11, 49, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, 46, 2, 2, 2, 2, 2, 2, 11, + 11, 2, 2, 2, 2, 2, 2, 22, 22, 2, 2, 2, 2, 2, 2, 2, + 20, 2, 2, 44, 44, 44, 92, 0, 0, O, O, O, GB, B, B, O, + SB, O, SE, GB, O, O, WJ,FMPst,FMPst, O, CGJ, B, O, B,VMAbv,VMAbv, + VMAbv, O,VMAbv, B,CMBlw,CMBlw,CMBlw,VMAbv,VMPst, VAbv, VPst,CMBlw, B, VPst, VPre, VPst, + VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VAbv, VPst, VPst, VPst, H, VPre, VPst,VMBlw, O, O, + VAbv, GB,VMAbv,VMPst,VMPst, O, B, VBlw, O, O, VPre, VPre, O, VPre, H, O, + VPst,FMAbv, O,CMBlw, O, VAbv, O, VAbv, H, O,VMBlw,VMAbv,CMAbv, GB, GB, O, + MBlw,CMAbv,CMAbv, VPst, VAbv,VMAbv, O, VPst, O, VPre, VPre,VMAbv, B, O, CS, CS, + VMPst, B, VAbv, VAbv, B, R, O, HVM, O, O,FMBlw, O,CMAbv, O,CMBlw, VAbv, + VBlw, B, SUB, SUB, SUB, O, SUB, SUB, O,FMBlw, O, B, VPst, VBlw, VPre,VMAbv, + VMBlw,VMPst, IS, VAbv, MPst, MPre, MBlw, MBlw, B, MBlw, MBlw, VPst,VMPst,VMPst, B, MBlw, + VPst, VPre, VAbv, VAbv,VMPst,VMPst,VMBlw, B,VMPst, VBlw, VPst, CGJ, CGJ, VPst,VMAbv,VMAbv, + FMAbv, FAbv,CMAbv,FMAbv,VMAbv,FMAbv, VAbv, IS,FMAbv, B,FMAbv, B, CGJ, WJ, CGJ, GB, + CMAbv,CMAbv, B, VAbv, SUB, FPst, FPst,VMBlw, FPst, FPst, FBlw,VMAbv,FMBlw, VAbv, VPre, B, + MPre, MBlw, SUB, FAbv, FAbv, MAbv, SUB, Sk, VPst, VAbv,VMAbv,VMAbv, FAbv,CMAbv, VPst, H, + B, O,SMAbv,SMAbv,SMAbv, VPst, IS, RK, RK, VBlw, FAbv,VMPre,VMPre,FMAbv,CMBlw,VMBlw, + VMBlw,VMAbv, CS, O,FMAbv, ZWNJ, CGJ, WJ, WJ, WJ, O,FMPst, O, SB, SE, O, + H, MPst, VPst, H,VMAbv, VAbv,VMBlw, B, VBlw, FPst, VPst, FAbv,VMPst, B,CMAbv, VAbv, + MBlw, MPst, MBlw, H, O, VBlw, MPst, MPre, MAbv, MBlw, O, B, FAbv, FAbv, FPst, VBlw, + B, VBlw,VMAbv, B, VPre, O,VMPst, IS, O,VMPst, VBlw, VPst,VMBlw,VMBlw,VMAbv, O, + IS,VMBlw, B,VMPst,VMAbv,VMPst, CS, CS, B, N, N, O, HN, VPre, VBlw, VAbv, + IS,CMAbv, O, VPst, B, R, R,CMBlw, VAbv, VPre,VMAbv,VMAbv, H, VAbv,CMBlw,VMPst, + O,VMAbv,CMBlw, IS, R,FMAbv, B, CS, CS, H,CMBlw,VMPst, H,VMPst, VAbv,VMAbv, + VPst, MPst, R, MPst,CMBlw, B,FMBlw, CS, SUB, SUB, GB, FBlw, FBlw,CMAbv, IS, VBlw, + IS, R, MBlw, GB, VAbv, R,VMPst, G, G, J, J, J, SB, SE, J, HR, + G, G, HM, HM, HM, G, O, MPre, MPre, MPst,VMAbv, MBlw, VBlw, O, VBlw, }; -static const uint16_t -hb_use_u16[486] = +static const uint16_t hb_use_u16[488]= { 0, 0, 1, 2, 0, 3, 4, 5, 0, 6, 7, 0, 8, 0, 9, 10, 11, 12, 10, 13, 14, 10, 10, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -633,43 +630,43 @@ 31, 66, 67, 68, 10, 69, 70, 10, 71, 72, 73, 74, 75, 76, 77, 0, 10, 10, 78, 79, 80, 81, 82, 83, 84, 85, 10, 86, 10, 87, 10, 88, 89, 90, 10, 91, 92, 93, 2, 0, 94, 0, 10, 95, 96, 10, 97, 0, - 98, 99,100,101, 31, 10,102,103,104, 10,105,106, 10,107, 10,108, - 109,110, 2, 2,111, 10, 10,112,113, 2,114,115,116, 10,117, 10, - 118,119,120,121,122, 0, 0,123,124,125, 0,126,127,128,129, 0, - 130,131,132, 0, 0,133,134, 0,135, 0, 0, 10,136,137,138, 0, - 139, 10,140, 0, 10,141,142, 10, 10,143,144, 2,145,146,147, 10, - 148,149,150, 10, 10,151,152, 2,153, 99,154,155,156, 2, 10,157, - 10,158,159, 0,160,161,162, 2,163, 0, 0,164, 0,165, 0,166, - 166,167, 34,168,169,170, 10,171, 95, 0,172, 0, 10,173,174, 0, - 175, 2,176, 10,177, 0,178,173,179,180,181, 0, 0,182,183, 0, - 184, 10, 10,185,186,187,188,189,190, 10, 10,191,192, 0,193, 10, - 194,195,196, 10, 10,197, 10,198,199,106,200,103, 10, 34,201,202, - 203, 0,204,205, 95, 10, 10,206,207, 2,208, 21, 22,209,210,211, - 212,213,214, 10, 10,215,216,217,218, 0, 10,219,220,221,222, 0, - 200, 10, 10,223,224, 2,225,226,227,228, 10,229,230, 2,231,232, - 2, 10,141, 0, 10,233,234,104,235, 0,236,237,238,239, 10,240, - 241, 2,242, 10, 10,243,244, 0,245, 10, 10,246,247,248,249,250, - 22, 10,225,251, 8, 10, 71, 19, 10,252, 74,253,254, 10, 10,255, - 256, 2,257, 10,258,259, 10,260,261, 49, 10,262,263,264,265,265, - 265,266,267,268,265,269, 10,270,271, 2, 10,272,273, 10,274, 2, - 275,276,277,277,278,279,280, 0, 10,177, 0,281,106, 71, 95,282, - 0,283, 71,284,285, 0,286, 0,287, 2,288, 2,289,106,290, 2, - 130,130,163,163,163,130, + 10, 98, 99,100, 31, 10,101,102,103, 10,104,105, 10,106, 10,107, + 108,109, 2, 2,110, 10, 10,111,112, 2,113,114,115, 10,116, 10, + 117,118,119,120,121, 0, 0,122,123,124, 0,125,126,127,128, 0, + 129,130,131, 0, 0,132,133, 0,134, 0, 0, 10,135,136,137, 0, + 138, 10,139, 0, 10,140,141, 10, 10,142,143, 2,144,145,146, 10, + 147,148,149, 10, 10,150,151, 2,152, 98,153,154,155, 2, 10,156, + 10,157,158, 0,159,160,161, 2,162, 0, 0,163, 0,164, 0,165, + 165,166, 34,167,168,169, 10,170, 95, 0,171, 0, 10,172,173, 0, + 174, 2,175, 10,176, 0,177,172,178,179,180, 0, 0,181,182, 0, + 183, 10, 10,184,185,186,187,188,189, 10, 10,190,191, 0,192, 10, + 193,194,195, 10, 10,196, 10,197,198,105,199,102, 10, 34,200,201, + 202, 0,203,204, 95, 10, 10,205,206, 2,207, 21, 22,208,209,210, + 211,212,213, 10, 10,214,215,216,217, 0, 10,218,219,220,221, 0, + 199, 10, 10,222,223, 2,224,225,226,227, 10,228,229, 2,230,231, + 2, 10,140, 0, 10,232,233,103,234, 0,235,236,237,238, 10,239, + 240, 2,241, 10, 10,242,243, 0,244, 10, 10,245,246,247,248,249, + 250, 0, 22, 10,224,251, 8, 10, 71, 19, 10,252, 74,253,254, 10, + 10,255,256, 2,257, 10,258,259, 10,260,261, 49, 10,262,263,264, + 265,265,265,266,267,268,265,269, 10,270,271, 2, 10,272,273, 10, + 274, 2,275,276,277,277,278,279,280, 0, 10,176, 0,281,105, 71, + 95,282, 0,283, 71,284,285, 0,286, 0,287, 2,288, 2,289,105, + 290, 2,129,129,162,162,162,129, }; -static inline unsigned -hb_use_b4 (const uint8_t* a, unsigned i) +static inline uint8_t hb_use_b4 (const uint8_t* a, unsigned i) { - return (a[i>>1]>>((i&1u)<<2))&15u; + return (a[i>>1]>>((i&1)<<2))&15; } -static inline uint_fast8_t -hb_use_get_category (unsigned u) +static inline uint8_t hb_use_get_category (unsigned u) { - return u<921600u?hb_use_u8[3265+(((hb_use_u8[937+(((hb_use_u16[((hb_use_u8[369+(((hb_use_u8[113+(((hb_use_b4(hb_use_u8,u>>1>>3>>1>>3>>4))<<4)+((u>>1>>3>>1>>3)&15u))])<<3)+((u>>1>>3>>1)&7u))])<<1)+((u>>1>>3)&1u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:O; + return u<921600 ? hb_use_u8[3273u+((hb_use_u8[945u+((hb_use_u16[((hb_use_u8[369u+((hb_use_u8[113u+((hb_use_b4(hb_use_u8,((((((((((u)>>1))>>3))>>1))>>3))>>4)))<<4)+((((((((((u)>>1))>>3))>>1))>>3))&15)])<<3)+((((((((u)>>1))>>3))>>1))&7)])<<1)+((((((u)>>1))>>3))&1)])<<3)+((((u)>>1))&7)])<<1)+((u)&1)] : O; } + #endif + #undef B #undef CGJ #undef CS diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-vowel-constraints.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-vowel-constraints.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-vowel-constraints.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper-vowel-constraints.cc 2026-04-17 19:08:13.000000000 +0000 @@ -10,8 +10,8 @@ * # Date: 2015-03-12, 21:17:00 GMT [AG] * # Date: 2019-11-08, 23:22:00 GMT [AG] * - * # Scripts-16.0.0.txt - * # Date: 2024-04-30, 21:48:40 GMT + * # Scripts-17.0.0.txt + * # Date: 2025-07-24, 13:28:55 GMT */ #include "hb.hh" diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-shaper.hh 2026-04-17 19:08:13.000000000 +0000 @@ -396,6 +396,12 @@ case HB_SCRIPT_TODHRI: case HB_SCRIPT_TULU_TIGALARI: + /* Unicode-17.0 additions */ + case HB_SCRIPT_BERIA_ERFE: + case HB_SCRIPT_SIDETIC: + case HB_SCRIPT_TAI_YO: + case HB_SCRIPT_TOLONG_SIKI: + /* If the designer designed the font for the 'DFLT' script, * (or we ended up arbitrarily pick 'latn'), use the default shaper. * Otherwise, use the specific shaper. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-stat-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-stat-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-stat-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-stat-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -352,7 +352,7 @@ { float get_value (unsigned int axis_index) const { - switch (u.format) + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_value (); case 2: hb_barrier (); return u.format2.get_value (); @@ -364,7 +364,7 @@ unsigned int get_axis_index () const { - switch (u.format) + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_axis_index (); case 2: hb_barrier (); return u.format2.get_axis_index (); @@ -376,7 +376,7 @@ hb_ot_name_id_t get_value_name_id () const { - switch (u.format) + switch (u.format.v) { case 1: hb_barrier (); return u.format1.get_value_name_id (); case 2: hb_barrier (); return u.format2.get_value_name_id (); @@ -389,9 +389,9 @@ template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { - if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); - TRACE_DISPATCH (this, u.format); - switch (u.format) { + if (unlikely (!c->may_dispatch (this, &u.format.v))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format.v); + switch (u.format.v) { case 1: hb_barrier (); return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: hb_barrier (); return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); case 3: hb_barrier (); return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); @@ -403,7 +403,7 @@ bool keep_axis_value (const hb_array_t<const StatAxisRecord> axis_records, hb_hashmap_t<hb_tag_t, Triple> *user_axes_location) const { - switch (u.format) + switch (u.format.v) { case 1: hb_barrier (); return u.format1.keep_axis_value (axis_records, user_axes_location); case 2: hb_barrier (); return u.format2.keep_axis_value (axis_records, user_axes_location); @@ -420,7 +420,7 @@ return_trace (false); hb_barrier (); - switch (u.format) + switch (u.format.v) { case 1: hb_barrier (); return_trace (u.format1.sanitize (c)); case 2: hb_barrier (); return_trace (u.format2.sanitize (c)); @@ -433,14 +433,14 @@ protected: union { - HBUINT16 format; + struct { HBUINT16 v; } format; AxisValueFormat1 format1; AxisValueFormat2 format2; AxisValueFormat3 format3; AxisValueFormat4 format4; } u; public: - DEFINE_SIZE_UNION (2, format); + DEFINE_SIZE_UNION (2, format.v); }; struct AxisValueOffsetArray: UnsizedArrayOf<Offset16To<AxisValue>> diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-tag-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-tag-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-tag-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-tag-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -6,8 +6,8 @@ * * on files with these headers: * - * <meta name="updated_at" content="2024-12-06 06:35 AM" /> - * File-Date: 2025-01-21 + * <meta name="updated_at" content="2024-12-06T06:35:00Z" /> + * File-Date: 2025-08-25 */ #ifndef HB_OT_TAG_TABLE_HH @@ -704,7 +704,7 @@ /*{HB_TAG('g','u','z',' '), HB_TAG('G','U','Z',' ')},*/ /* Gusii */ {HB_TAG('g','w','i',' '), HB_TAG('A','T','H',' ')}, /* Gwichʼin -> Athapaskan */ {HB_TAG('g','y','n',' '), HB_TAG('C','P','P',' ')}, /* Guyanese Creole English -> Creoles */ - {HB_TAG('h','a','a',' '), HB_TAG('A','T','H',' ')}, /* Han -> Athapaskan */ + {HB_TAG('h','a','a',' '), HB_TAG('A','T','H',' ')}, /* Hän -> Athapaskan */ {HB_TAG('h','a','e',' '), HB_TAG('O','R','O',' ')}, /* Eastern Oromo -> Oromo */ {HB_TAG('h','a','i',' '), HB_TAG('H','A','I','0')}, /* Haida [macrolanguage] */ {HB_TAG('h','a','k',' '), HB_TAG('Z','H','S',' ')}, /* Hakka Chinese -> Chinese, Simplified */ @@ -921,7 +921,7 @@ {HB_TAG('k','v','t',' '), HB_TAG('K','R','N',' ')}, /* Lahta Karen -> Karen */ {HB_TAG('k','v','u',' '), HB_TAG('K','R','N',' ')}, /* Yinbaw Karen -> Karen */ {HB_TAG('k','v','y',' '), HB_TAG('K','R','N',' ')}, /* Yintale Karen -> Karen */ -/*{HB_TAG('k','w','k',' '), HB_TAG('K','W','K',' ')},*/ /* Kwakiutl -> Kwakʼwala */ +/*{HB_TAG('k','w','k',' '), HB_TAG('K','W','K',' ')},*/ /* Kwakʼwala */ {HB_TAG('k','w','w',' '), HB_TAG('C','P','P',' ')}, /* Kwinti -> Creoles */ {HB_TAG('k','w','y',' '), HB_TAG('K','O','N','0')}, /* San Salvador Kongo -> Kongo */ {HB_TAG('k','x','c',' '), HB_TAG('K','M','S',' ')}, /* Konso -> Komso */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-avar-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-avar-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-avar-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-avar-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -143,10 +143,13 @@ struct SegmentMaps : Array16Of<AxisValueMap> { - int map (int value, unsigned int from_offset = 0, unsigned int to_offset = 1) const + float map_float (float value, unsigned int from_offset = 0, unsigned int to_offset = 1) const { -#define fromCoord coords[from_offset].to_int () -#define toCoord coords[to_offset].to_int () +#define fromCoord coords[from_offset].to_float () +#define toCoord coords[to_offset].to_float () + + const auto *map = arrayZ; + /* The following special-cases are not part of OpenType, which requires * that at least -1, 0, and +1 must be mapped. But we include these as * part of a better error recovery scheme. */ @@ -155,47 +158,98 @@ if (!len) return value; else /* len == 1*/ - return value - arrayZ[0].fromCoord + arrayZ[0].toCoord; + return value - map[0].fromCoord + map[0].toCoord; + } + + // At least two mappings now. + + /* CoreText is wild... + * PingFangUI avar needs all this special-casing... + * So we implement an extended version of the spec here, + * which is more robust and more likely to be compatible with + * the wild. */ + + unsigned start = 0; + unsigned end = len; + if (map[start].fromCoord == -1 && map[start].toCoord == -1 && map[start+1].fromCoord == -1) + start++; + if (map[end-1].fromCoord == +1 && map[end-1].toCoord == +1 && map[end-2].fromCoord == +1) + end--; + + /* Look for exact match first, and do lots of special-casing. */ + unsigned i; + for (i = start; i < end; i++) + if (value == map[i].fromCoord) + break; + if (i < end) + { + // There's at least one exact match. See if there are more. + unsigned j = i; + for (; j + 1 < end; j++) + if (value != map[j + 1].fromCoord) + break; + + // [i,j] inclusive are all exact matches: + + // If there's only one, return it. This is the only spec-compliant case. + if (i == j) + return map[i].toCoord; + // If there's exactly three, return the middle one. + if (i + 2 == j) + return map[i + 1].toCoord; + + // Ignore the middle ones. Return the one mapping closer to 0. + if (value < 0) return map[j].toCoord; + if (value > 0) return map[i].toCoord; + + // Mapping 0? CoreText seems confused. It seems to prefer 0 here... + // So we'll just return the smallest one. lol + return fabsf (map[i].toCoord) < fabsf (map[j].toCoord) ? map[i].toCoord : map[j].toCoord; + + // Mapping 0? Return one not mapping to 0. + if (map[i].toCoord == 0) + return map[j].toCoord; + else + return map[i].toCoord; } - if (value <= arrayZ[0].fromCoord) - return value - arrayZ[0].fromCoord + arrayZ[0].toCoord; + /* There's at least two and we're not an exact match. Prepare to lerp. */ - unsigned int i; - unsigned int count = len - 1; - for (i = 1; i < count && value > arrayZ[i].fromCoord; i++) - ; + // Find the segment we're in. + for (i = start; i < end; i++) + if (value < map[i].fromCoord) + break; - if (value >= arrayZ[i].fromCoord) - return value - arrayZ[i].fromCoord + arrayZ[i].toCoord; + if (i == 0) + { + // Value before all segments; Shift. + return value - map[0].fromCoord + map[0].toCoord; + } + if (i == end) + { + // Value after all segments; Shift. + return value - map[end - 1].fromCoord + map[end - 1].toCoord; + } - if (unlikely (arrayZ[i-1].fromCoord == arrayZ[i].fromCoord)) - return arrayZ[i-1].toCoord; + // Actually interpolate. + auto &before = map[i-1]; + auto &after = map[i]; + float denom = after.fromCoord - before.fromCoord; // Can't be zero by now. + return before.toCoord + ((after.toCoord - before.toCoord) * (value - before.fromCoord)) / denom; - int denom = arrayZ[i].fromCoord - arrayZ[i-1].fromCoord; - return roundf (arrayZ[i-1].toCoord + ((float) (arrayZ[i].toCoord - arrayZ[i-1].toCoord) * - (value - arrayZ[i-1].fromCoord)) / denom); #undef toCoord #undef fromCoord } - int unmap (int value) const { return map (value, 1, 0); } + float unmap_float (float value) const { return map_float (value, 1, 0); } + + // TODO Kill this. Triple unmap_axis_range (const Triple& axis_range) const { - F2DOT14 val, unmapped_val; - - val.set_float (axis_range.minimum); - unmapped_val.set_int (unmap (val.to_int ())); - float unmapped_min = unmapped_val.to_float (); - - val.set_float (axis_range.middle); - unmapped_val.set_int (unmap (val.to_int ())); - float unmapped_middle = unmapped_val.to_float (); - - val.set_float (axis_range.maximum); - unmapped_val.set_int (unmap (val.to_int ())); - float unmapped_max = unmapped_val.to_float (); + float unmapped_min = unmap_float (axis_range.minimum); + float unmapped_middle = unmap_float (axis_range.middle); + float unmapped_max = unmap_float (axis_range.maximum); return Triple{(double) unmapped_min, (double) unmapped_middle, (double) unmapped_max}; } @@ -203,6 +257,11 @@ bool subset (hb_subset_context_t *c, hb_tag_t axis_tag) const { TRACE_SUBSET (this); + + /* This function cannot work on avar2 table (and currently doesn't). + * We should instead keep the design coords in the shape plan and use + * those. unmap_axis_range needs to be killed. */ + /* avar mapped normalized axis range*/ Triple *axis_range; if (!c->plan->axes_location.has (axis_tag, &axis_range)) @@ -304,14 +363,14 @@ return_trace (true); } - void map_coords (int *coords, unsigned int coords_length) const + void map_coords_16_16 (int *coords, unsigned int coords_length) const { unsigned int count = hb_min (coords_length, axisCount); const SegmentMaps *map = &firstAxisSegmentMaps; for (unsigned int i = 0; i < count; i++) { - coords[i] = map->map (coords[i]); + coords[i] = roundf (map->map_float (coords[i] / 65536.f) * 65536.f); map = &StructAfter<SegmentMaps> (*map); } @@ -329,15 +388,20 @@ const auto &var_store = this+v2.varStore; auto *var_store_cache = var_store.create_cache (); + hb_vector_t<int> coords_2_14; + coords_2_14.resize (coords_length); + for (unsigned i = 0; i < coords_length; i++) + coords_2_14[i] = roundf (coords[i] / 4.f); // 16.16 -> 2.14 + hb_vector_t<int> out; out.alloc (coords_length); for (unsigned i = 0; i < coords_length; i++) { int v = coords[i]; uint32_t varidx = varidx_map.map (i); - float delta = var_store.get_delta (varidx, coords, coords_length, var_store_cache); - v += roundf (delta); - v = hb_clamp (v, -(1<<14), +(1<<14)); + float delta = var_store.get_delta (varidx, coords_2_14.arrayZ, coords_2_14.length, var_store_cache); + v += roundf (delta * 4); // 2.14 -> 16.16 + v = hb_clamp (v, -(1<<16), +(1<<16)); out.push (v); } for (unsigned i = 0; i < coords_length; i++) @@ -347,16 +411,54 @@ #endif } - void unmap_coords (int *coords, unsigned int coords_length) const + bool has_v2_data () const { return version.major > 1; } + + // axis normalization is done in 2.14 here + // TODO: deprecate this API once fonttools is updated to use 16.16 normalization + bool map_coords_2_14 (float *coords, unsigned int coords_length) const { + hb_vector_t<int> coords_2_14; + if (!coords_2_14.resize (coords_length)) return false; unsigned int count = hb_min (coords_length, axisCount); const SegmentMaps *map = &firstAxisSegmentMaps; for (unsigned int i = 0; i < count; i++) { - coords[i] = map->unmap (coords[i]); + int v = roundf (map->map_float (coords[i]) * 16384.f); + coords_2_14[i] = v; + coords[i] = v / 16384.f; + map = &StructAfter<SegmentMaps> (*map); + } + +#ifndef HB_NO_AVAR2 + if (version.major < 2) + return true; + hb_barrier (); + + for (; count < axisCount; count++) map = &StructAfter<SegmentMaps> (*map); + + const auto &v2 = * (const avarV2Tail *) map; + + const auto &varidx_map = this+v2.varIdxMap; + const auto &var_store = this+v2.varStore; + auto *var_store_cache = var_store.create_cache (); + + for (unsigned i = 0; i < coords_length; i++) + { + int v = coords_2_14[i]; + uint32_t varidx = varidx_map.map (i); + float delta = var_store.get_delta (varidx, coords_2_14.arrayZ, coords_2_14.length, var_store_cache); + v += roundf (delta); + v = hb_clamp (v, -(1<<16), +(1<<16)); + coords[i] = v / 16384.f; } + + OT::ItemVariationStore::destroy_cache (var_store_cache); + return true; +#else + return version.major < 2; +#endif } bool subset (hb_subset_context_t *c) const diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-common.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-common.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-common.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-common.hh 2026-04-17 19:08:13.000000000 +0000 @@ -27,24 +27,35 @@ #define HB_OT_VAR_COMMON_HH #include "hb-ot-layout-common.hh" +#include "hb-alloc-pool.hh" #include "hb-priority-queue.hh" #include "hb-subset-instancer-iup.hh" namespace OT { +using rebase_tent_result_scratch_t = hb_pair_t<rebase_tent_result_t, rebase_tent_result_t>; /* https://docs.microsoft.com/en-us/typography/opentype/spec/otvarcommonformats#tuplevariationheader */ struct TupleVariationHeader { friend struct tuple_delta_t; - unsigned get_size (unsigned axis_count) const - { return min_size + get_all_tuples (axis_count).get_size (); } + unsigned get_size (unsigned axis_count_times_2) const + { + // This function is super hot in mega-var-fonts with hundreds of masters. + unsigned ti = tupleIndex; + if (unlikely ((ti & (TupleIndex::EmbeddedPeakTuple | TupleIndex::IntermediateRegion)))) + { + unsigned count = ((ti & TupleIndex::EmbeddedPeakTuple) != 0) + ((ti & TupleIndex::IntermediateRegion) != 0) * 2; + return min_size + count * axis_count_times_2; + } + return min_size; + } unsigned get_data_size () const { return varDataSize; } - const TupleVariationHeader &get_next (unsigned axis_count) const - { return StructAtOffset<TupleVariationHeader> (this, get_size (axis_count)); } + const TupleVariationHeader &get_next (unsigned axis_count_times_2) const + { return StructAtOffset<TupleVariationHeader> (this, get_size (axis_count_times_2)); } bool unpack_axis_tuples (unsigned axis_count, const hb_array_t<const F2DOT14> shared_tuples, @@ -53,7 +64,7 @@ { const F2DOT14 *peak_tuple = nullptr; if (has_peak ()) - peak_tuple = get_peak_tuple (axis_count).arrayZ; + peak_tuple = get_peak_tuple (axis_count); else { unsigned int index = get_index (); @@ -68,8 +79,8 @@ if (has_interm) { - start_tuple = get_start_tuple (axis_count).arrayZ; - end_tuple = get_end_tuple (axis_count).arrayZ; + start_tuple = get_start_tuple (axis_count); + end_tuple = get_end_tuple (axis_count); } for (unsigned i = 0; i < axis_count; i++) @@ -98,88 +109,109 @@ return true; } + HB_ALWAYS_INLINE double calculate_scalar (hb_array_t<const int> coords, unsigned int coord_count, const hb_array_t<const F2DOT14> shared_tuples, - const hb_vector_t<hb_pair_t<int,int>> *shared_tuple_active_idx = nullptr) const + hb_scalar_cache_t *shared_tuple_scalar_cache = nullptr) const { + unsigned tuple_index = tupleIndex; + const F2DOT14 *peak_tuple; - unsigned start_idx = 0; - unsigned end_idx = coord_count; - unsigned step = 1; + bool has_interm = tuple_index & TupleIndex::IntermediateRegion; // Inlined for performance - if (has_peak ()) - peak_tuple = get_peak_tuple (coord_count).arrayZ; + if (unlikely (tuple_index & TupleIndex::EmbeddedPeakTuple)) // Inlined for performance + { + peak_tuple = get_peak_tuple (coord_count); + shared_tuple_scalar_cache = nullptr; + } else { - unsigned int index = get_index (); - if (unlikely ((index + 1) * coord_count > shared_tuples.length)) - return 0.0; - peak_tuple = shared_tuples.sub_array (coord_count * index, coord_count).arrayZ; + unsigned int index = tuple_index & TupleIndex::TupleIndexMask; // Inlined for performance - if (shared_tuple_active_idx) + float scalar; + if (shared_tuple_scalar_cache && + shared_tuple_scalar_cache->get (index, &scalar)) { - if (unlikely (index >= shared_tuple_active_idx->length)) - return 0.0; - auto _ = (*shared_tuple_active_idx).arrayZ[index]; - if (_.second != -1) - { - start_idx = _.first; - end_idx = _.second + 1; - step = _.second - _.first; - } - else if (_.first != -1) - { - start_idx = _.first; - end_idx = start_idx + 1; - } + if (has_interm && (scalar != 0 && scalar != 1.f)) + shared_tuple_scalar_cache = nullptr; + else + return (double) scalar; } + + if (unlikely ((index + 1) * coord_count > shared_tuples.length)) + return 0.0; + peak_tuple = shared_tuples.arrayZ + (coord_count * index); + } const F2DOT14 *start_tuple = nullptr; const F2DOT14 *end_tuple = nullptr; - bool has_interm = has_intermediate (); + if (has_interm) { - start_tuple = get_start_tuple (coord_count).arrayZ; - end_tuple = get_end_tuple (coord_count).arrayZ; + start_tuple = get_start_tuple (coord_count); + end_tuple = get_end_tuple (coord_count); } double scalar = 1.0; - for (unsigned int i = start_idx; i < end_idx; i += step) - { +#ifndef HB_OPTIMIZE_SIZE +#if HB_FAST_NUM_ACCESS + bool skip = coord_count >= 16; +#endif +#endif + for (unsigned int i = 0; i < coord_count; i++) + { +#ifndef HB_OPTIMIZE_SIZE +#if HB_FAST_NUM_ACCESS + if (skip) + { + while (i + 4 <= coord_count && * (HBUINT64LE *) &peak_tuple[i] == 0) + i += 4; + while (i < coord_count && peak_tuple[i].to_int () == 0) + i += 1; + if (i >= coord_count) + break; + } +#endif +#endif + int peak = peak_tuple[i].to_int (); if (!peak) continue; int v = coords[i]; + if (!v) { scalar = 0.0; break; } if (v == peak) continue; if (has_interm) { + shared_tuple_scalar_cache = nullptr; int start = start_tuple[i].to_int (); int end = end_tuple[i].to_int (); if (unlikely (start > peak || peak > end || (start < 0 && end > 0 && peak))) continue; - if (v < start || v > end) return 0.0; + if (v < start || v > end) { scalar = 0.0; break; } if (v < peak) { if (peak != start) scalar *= (double) (v - start) / (peak - start); } else { if (peak != end) scalar *= (double) (end - v) / (end - peak); } } - else if (!v || v < hb_min (0, peak) || v > hb_max (0, peak)) return 0.0; + else if (v < hb_min (0, peak) || v > hb_max (0, peak)) { scalar = 0.0; break; } else scalar *= (double) v / peak; } + if (shared_tuple_scalar_cache) + shared_tuple_scalar_cache->set (get_index (), scalar); return scalar; } - bool has_peak () const { return tupleIndex & TuppleIndex::EmbeddedPeakTuple; } - bool has_intermediate () const { return tupleIndex & TuppleIndex::IntermediateRegion; } - bool has_private_points () const { return tupleIndex & TuppleIndex::PrivatePointNumbers; } - unsigned get_index () const { return tupleIndex & TuppleIndex::TupleIndexMask; } + bool has_peak () const { return tupleIndex & TupleIndex::EmbeddedPeakTuple; } + bool has_intermediate () const { return tupleIndex & TupleIndex::IntermediateRegion; } + bool has_private_points () const { return tupleIndex & TupleIndex::PrivatePointNumbers; } + unsigned get_index () const { return tupleIndex & TupleIndex::TupleIndexMask; } protected: - struct TuppleIndex : HBUINT16 + struct TupleIndex : HBUINT16 { enum Flags { EmbeddedPeakTuple = 0x8000u, @@ -188,22 +220,24 @@ TupleIndexMask = 0x0FFFu }; - TuppleIndex& operator = (uint16_t i) { HBUINT16::operator= (i); return *this; } + TupleIndex& operator = (uint16_t i) { HBUINT16::operator= (i); return *this; } DEFINE_SIZE_STATIC (2); }; hb_array_t<const F2DOT14> get_all_tuples (unsigned axis_count) const { return StructAfter<UnsizedArrayOf<F2DOT14>> (tupleIndex).as_array ((has_peak () + has_intermediate () * 2) * axis_count); } - hb_array_t<const F2DOT14> get_peak_tuple (unsigned axis_count) const - { return get_all_tuples (axis_count).sub_array (0, axis_count); } - hb_array_t<const F2DOT14> get_start_tuple (unsigned axis_count) const - { return get_all_tuples (axis_count).sub_array (has_peak () * axis_count, axis_count); } - hb_array_t<const F2DOT14> get_end_tuple (unsigned axis_count) const - { return get_all_tuples (axis_count).sub_array (has_peak () * axis_count + axis_count, axis_count); } + const F2DOT14* get_all_tuples_base (unsigned axis_count) const + { return StructAfter<UnsizedArrayOf<F2DOT14>> (tupleIndex).arrayZ; } + const F2DOT14* get_peak_tuple (unsigned axis_count) const + { return get_all_tuples_base (axis_count); } + const F2DOT14* get_start_tuple (unsigned axis_count) const + { return get_all_tuples_base (axis_count) + has_peak () * axis_count; } + const F2DOT14* get_end_tuple (unsigned axis_count) const + { return get_all_tuples_base (axis_count) + has_peak () * axis_count + axis_count; } HBUINT16 varDataSize; /* The size in bytes of the serialized * data for this tuple variation table. */ - TuppleIndex tupleIndex; /* A packed field. The high 4 bits are flags (see below). + TupleIndex tupleIndex; /* A packed field. The high 4 bits are flags (see below). The low 12 bits are an index into a shared tuple records array. */ /* UnsizedArrayOf<F2DOT14> peakTuple - optional */ @@ -221,6 +255,21 @@ DEFINE_SIZE_MIN (4); }; +struct optimize_scratch_t +{ + iup_scratch_t iup; + hb_vector_t<bool> opt_indices; + hb_vector_t<int> rounded_x_deltas; + hb_vector_t<int> rounded_y_deltas; + hb_vector_t<float> opt_deltas_x; + hb_vector_t<float> opt_deltas_y; + hb_vector_t<unsigned char> opt_point_data; + hb_vector_t<unsigned char> opt_deltas_data; + hb_vector_t<unsigned char> point_data; + hb_vector_t<unsigned char> deltas_data; + hb_vector_t<int> rounded_deltas; +}; + struct tuple_delta_t { static constexpr bool realloc_move = true; // Watch out when adding new members! @@ -241,11 +290,12 @@ hb_vector_t<unsigned char> compiled_tuple_header; hb_vector_t<unsigned char> compiled_deltas; - /* compiled peak coords, empty for non-gvar tuples */ - hb_vector_t<char> compiled_peak_coords; + hb_vector_t<F2DOT14> compiled_peak_coords; + hb_vector_t<F2DOT14> compiled_interm_coords; - tuple_delta_t () = default; + tuple_delta_t (hb_alloc_pool_t *pool = nullptr) {} tuple_delta_t (const tuple_delta_t& o) = default; + tuple_delta_t& operator = (const tuple_delta_t& o) = default; friend void swap (tuple_delta_t& a, tuple_delta_t& b) noexcept { @@ -267,6 +317,18 @@ return *this; } + void copy_from (const tuple_delta_t& o, hb_alloc_pool_t *pool = nullptr) + { + axis_tuples = o.axis_tuples; + indices.duplicate_vector_from_pool (pool, o.indices); + deltas_x.duplicate_vector_from_pool (pool, o.deltas_x); + deltas_y.duplicate_vector_from_pool (pool, o.deltas_y); + compiled_tuple_header.duplicate_vector_from_pool (pool, o.compiled_tuple_header); + compiled_deltas.duplicate_vector_from_pool (pool, o.compiled_deltas); + compiled_peak_coords.duplicate_vector_from_pool (pool, o.compiled_peak_coords); + compiled_interm_coords.duplicate_vector_from_pool (pool, o.compiled_interm_coords); + } + void remove_axis (hb_tag_t axis_tag) { axis_tuples.del (axis_tag); } @@ -321,31 +383,44 @@ return *this; } - hb_vector_t<tuple_delta_t> change_tuple_var_axis_limit (hb_tag_t axis_tag, Triple axis_limit, - TripleDistances axis_triple_distances) const + void change_tuple_var_axis_limit (hb_tag_t axis_tag, Triple axis_limit, + TripleDistances axis_triple_distances, + hb_vector_t<tuple_delta_t>& out, + rebase_tent_result_scratch_t &scratch, + hb_alloc_pool_t *pool = nullptr) { - hb_vector_t<tuple_delta_t> out; + // May move *this out. + + out.reset (); Triple *tent; if (!axis_tuples.has (axis_tag, &tent)) { - out.push (*this); - return out; + out.push (std::move (*this)); + return; } if ((tent->minimum < 0.0 && tent->maximum > 0.0) || !(tent->minimum <= tent->middle && tent->middle <= tent->maximum)) - return out; + return; if (tent->middle == 0.0) { - out.push (*this); - return out; + out.push (std::move (*this)); + return; } - rebase_tent_result_t solutions = rebase_tent (*tent, axis_limit, axis_triple_distances); - for (auto &t : solutions) + rebase_tent_result_t &solutions = scratch.first; + rebase_tent (*tent, axis_limit, axis_triple_distances, solutions, scratch.second); + for (unsigned i = 0; i < solutions.length; i++) { - tuple_delta_t new_var = *this; + auto &t = solutions.arrayZ[i]; + + tuple_delta_t new_var; + if (i < solutions.length - 1) + new_var.copy_from (*this, pool); + else + new_var = std::move (*this); + if (t.second == Triple ()) new_var.remove_axis (axis_tag); else @@ -354,38 +429,76 @@ new_var *= t.first; out.push (std::move (new_var)); } - - return out; } - bool compile_peak_coords (const hb_map_t& axes_index_map, - const hb_map_t& axes_old_index_tag_map) + bool compile_coords (const hb_map_t& axes_index_map, + const hb_map_t& axes_old_index_tag_map, + hb_alloc_pool_t *pool= nullptr) { - unsigned axis_count = axes_index_map.get_population (); - if (unlikely (!compiled_peak_coords.alloc (axis_count * F2DOT14::static_size))) + unsigned cur_axis_count = axes_index_map.get_population (); + if (pool) + { + if (unlikely (!compiled_peak_coords.allocate_from_pool (pool, cur_axis_count))) + return false; + } + else if (unlikely (!compiled_peak_coords.resize (cur_axis_count))) return false; + hb_array_t<F2DOT14> start_coords, end_coords; + unsigned orig_axis_count = axes_old_index_tag_map.get_population (); + unsigned j = 0; for (unsigned i = 0; i < orig_axis_count; i++) { if (!axes_index_map.has (i)) continue; hb_tag_t axis_tag = axes_old_index_tag_map.get (i); - Triple *coords; - F2DOT14 peak_coord; + Triple *coords = nullptr; if (axis_tuples.has (axis_tag, &coords)) - peak_coord.set_float (coords->middle); - else - peak_coord.set_int (0); + { + float min_val = coords->minimum; + float val = coords->middle; + float max_val = coords->maximum; + + compiled_peak_coords.arrayZ[j].set_float (val); + + if (min_val != hb_min (val, 0.f) || max_val != hb_max (val, 0.f)) + { + if (!compiled_interm_coords) + { + if (pool) + { + if (unlikely (!compiled_interm_coords.allocate_from_pool (pool, 2 * cur_axis_count))) + return false; + } + else if (unlikely (!compiled_interm_coords.resize (2 * cur_axis_count))) + return false; + start_coords = compiled_interm_coords.as_array ().sub_array (0, cur_axis_count); + end_coords = compiled_interm_coords.as_array ().sub_array (cur_axis_count); + + for (unsigned k = 0; k < j; k++) + { + signed peak = compiled_peak_coords.arrayZ[k].to_int (); + if (!peak) continue; + start_coords.arrayZ[k].set_int (hb_min (peak, 0)); + end_coords.arrayZ[k].set_int (hb_max (peak, 0)); + } + } + + } + + if (compiled_interm_coords) + { + start_coords.arrayZ[j].set_float (min_val); + end_coords.arrayZ[j].set_float (max_val); + } + } - /* push F2DOT14 value into char vector */ - int16_t val = peak_coord.to_int (); - compiled_peak_coords.push (static_cast<char> (val >> 8)); - compiled_peak_coords.push (static_cast<char> (val & 0xFF)); + j++; } - return !compiled_peak_coords.in_error (); + return !compiled_peak_coords.in_error () && !compiled_interm_coords.in_error (); } /* deltas should be compiled already before we compile tuple @@ -394,7 +507,8 @@ bool compile_tuple_var_header (const hb_map_t& axes_index_map, unsigned points_data_length, const hb_map_t& axes_old_index_tag_map, - const hb_hashmap_t<const hb_vector_t<char>*, unsigned>* shared_tuples_idx_map) + const hb_hashmap_t<const hb_vector_t<F2DOT14>*, unsigned>* shared_tuples_idx_map, + hb_alloc_pool_t *pool = nullptr) { /* compiled_deltas could be empty after iup delta optimization, we can skip * compiling this tuple and return true */ @@ -403,7 +517,7 @@ unsigned cur_axis_count = axes_index_map.get_population (); /* allocate enough memory: 1 peak + 2 intermediate coords + fixed header size */ unsigned alloc_len = 3 * cur_axis_count * (F2DOT14::static_size) + 4; - if (unlikely (!compiled_tuple_header.resize (alloc_len))) return false; + if (unlikely (!compiled_tuple_header.allocate_from_pool (pool, alloc_len, false))) return false; unsigned flag = 0; /* skip the first 4 header bytes: variationDataSize+tupleIndex */ @@ -411,6 +525,9 @@ F2DOT14* end = reinterpret_cast<F2DOT14 *> (compiled_tuple_header.end ()); hb_array_t<F2DOT14> coords (p, end - p); + if (!shared_tuples_idx_map) + compile_coords (axes_index_map, axes_old_index_tag_map); // non-gvar tuples do not have compiled coords yet + /* encode peak coords */ unsigned peak_count = 0; unsigned *shared_tuple_idx; @@ -421,16 +538,16 @@ } else { - peak_count = encode_peak_coords(coords, flag, axes_index_map, axes_old_index_tag_map); + peak_count = encode_peak_coords(coords, flag); if (!peak_count) return false; } /* encode interim coords, it's optional so returned num could be 0 */ - unsigned interim_count = encode_interm_coords (coords.sub_array (peak_count), flag, axes_index_map, axes_old_index_tag_map); + unsigned interim_count = encode_interm_coords (coords.sub_array (peak_count), flag); /* pointdata length = 0 implies "use shared points" */ if (points_data_length) - flag |= TupleVariationHeader::TuppleIndex::PrivatePointNumbers; + flag |= TupleVariationHeader::TupleIndex::PrivatePointNumbers; unsigned serialized_data_size = points_data_length + compiled_deltas.length; TupleVariationHeader *o = reinterpret_cast<TupleVariationHeader *> (compiled_tuple_header.begin ()); @@ -438,105 +555,63 @@ o->tupleIndex = flag; unsigned total_header_len = 4 + (peak_count + interim_count) * (F2DOT14::static_size); - return compiled_tuple_header.resize (total_header_len); + compiled_tuple_header.shrink_back_to_pool (pool, total_header_len); + return true; } unsigned encode_peak_coords (hb_array_t<F2DOT14> peak_coords, - unsigned& flag, - const hb_map_t& axes_index_map, - const hb_map_t& axes_old_index_tag_map) const + unsigned& flag) const { - unsigned orig_axis_count = axes_old_index_tag_map.get_population (); - auto it = peak_coords.iter (); - unsigned count = 0; - for (unsigned i = 0; i < orig_axis_count; i++) - { - if (!axes_index_map.has (i)) /* axis pinned */ - continue; - hb_tag_t axis_tag = axes_old_index_tag_map.get (i); - Triple *coords; - if (!axis_tuples.has (axis_tag, &coords)) - (*it).set_int (0); - else - (*it).set_float (coords->middle); - it++; - count++; - } - flag |= TupleVariationHeader::TuppleIndex::EmbeddedPeakTuple; - return count; + hb_memcpy (&peak_coords[0], &compiled_peak_coords[0], compiled_peak_coords.length * sizeof (compiled_peak_coords[0])); + flag |= TupleVariationHeader::TupleIndex::EmbeddedPeakTuple; + return compiled_peak_coords.length; } /* if no need to encode intermediate coords, then just return p */ unsigned encode_interm_coords (hb_array_t<F2DOT14> coords, - unsigned& flag, - const hb_map_t& axes_index_map, - const hb_map_t& axes_old_index_tag_map) const + unsigned& flag) const { - unsigned orig_axis_count = axes_old_index_tag_map.get_population (); - unsigned cur_axis_count = axes_index_map.get_population (); - - auto start_coords_iter = coords.sub_array (0, cur_axis_count).iter (); - auto end_coords_iter = coords.sub_array (cur_axis_count).iter (); - bool encode_needed = false; - unsigned count = 0; - for (unsigned i = 0; i < orig_axis_count; i++) + if (compiled_interm_coords) { - if (!axes_index_map.has (i)) /* axis pinned */ - continue; - hb_tag_t axis_tag = axes_old_index_tag_map.get (i); - Triple *coords; - float min_val = 0.f, val = 0.f, max_val = 0.f; - if (axis_tuples.has (axis_tag, &coords)) - { - min_val = coords->minimum; - val = coords->middle; - max_val = coords->maximum; - } - - (*start_coords_iter).set_float (min_val); - (*end_coords_iter).set_float (max_val); - - start_coords_iter++; - end_coords_iter++; - count += 2; - if (min_val != hb_min (val, 0.f) || max_val != hb_max (val, 0.f)) - encode_needed = true; - } - - if (encode_needed) - { - flag |= TupleVariationHeader::TuppleIndex::IntermediateRegion; - return count; + hb_memcpy (&coords[0], &compiled_interm_coords[0], compiled_interm_coords.length * sizeof (compiled_interm_coords[0])); + flag |= TupleVariationHeader::TupleIndex::IntermediateRegion; } - return 0; + return compiled_interm_coords.length; } - bool compile_deltas () - { return compile_deltas (indices, deltas_x, deltas_y, compiled_deltas); } + bool compile_deltas (hb_vector_t<int> &rounded_deltas_scratch, + hb_alloc_pool_t *pool = nullptr) + { return compile_deltas (indices, deltas_x, deltas_y, compiled_deltas, rounded_deltas_scratch, pool); } static bool compile_deltas (hb_array_t<const bool> point_indices, hb_array_t<const float> x_deltas, hb_array_t<const float> y_deltas, - hb_vector_t<unsigned char> &compiled_deltas /* OUT */) + hb_vector_t<unsigned char> &compiled_deltas, /* OUT */ + hb_vector_t<int> &rounded_deltas, /* scratch */ + hb_alloc_pool_t *pool = nullptr) { - hb_vector_t<int> rounded_deltas; - if (unlikely (!rounded_deltas.alloc (point_indices.length))) + if (unlikely (!rounded_deltas.resize_dirty (point_indices.length))) return false; + unsigned j = 0; for (unsigned i = 0; i < point_indices.length; i++) { if (!point_indices[i]) continue; - int rounded_delta = (int) roundf (x_deltas.arrayZ[i]); - rounded_deltas.push (rounded_delta); + rounded_deltas.arrayZ[j++] = (int) roundf (x_deltas.arrayZ[i]); } + rounded_deltas.resize (j); if (!rounded_deltas) return true; - /* allocate enough memories 5 * num_deltas */ - unsigned alloc_len = 5 * rounded_deltas.length; + /* Allocate enough memory: this is the correct bound: + * Worst case scenario is that each delta has to be encoded in 4 bytes, and there + * are runs of 64 items each. Any delta encoded in less than 4 bytes (2, 1, or 0) + * is still smaller than the 4-byte encoding even with their control byte. + * The initial 2 is to handle length==0, for both x and y deltas. */ + unsigned alloc_len = 2 + 4 * rounded_deltas.length + (rounded_deltas.length + 63) / 64; if (y_deltas) alloc_len *= 2; - if (unlikely (!compiled_deltas.resize (alloc_len))) return false; + if (unlikely (!compiled_deltas.allocate_from_pool (pool, alloc_len, false))) return false; unsigned encoded_len = compile_deltas (compiled_deltas, rounded_deltas); @@ -557,28 +632,30 @@ if (j != rounded_deltas.length) return false; encoded_len += compile_deltas (compiled_deltas.as_array ().sub_array (encoded_len), rounded_deltas); } - return compiled_deltas.resize (encoded_len); + compiled_deltas.shrink_back_to_pool (pool, encoded_len); + return true; } static unsigned compile_deltas (hb_array_t<unsigned char> encoded_bytes, hb_array_t<const int> deltas) { - return TupleValues::compile (deltas, encoded_bytes); + return TupleValues::compile_unsafe (deltas, encoded_bytes); } - bool calc_inferred_deltas (const contour_point_vector_t& orig_points) + bool calc_inferred_deltas (const contour_point_vector_t& orig_points, + hb_vector_t<unsigned> &scratch) { unsigned point_count = orig_points.length; if (point_count != indices.length) return false; unsigned ref_count = 0; - hb_vector_t<unsigned> end_points; + + hb_vector_t<unsigned> &end_points = scratch.reset (); for (unsigned i = 0; i < point_count; i++) { - if (indices.arrayZ[i]) - ref_count++; + ref_count += indices.arrayZ[i]; if (orig_points.arrayZ[i].is_end_point) end_points.push (i); } @@ -587,7 +664,7 @@ return true; if (unlikely (end_points.in_error ())) return false; - hb_set_t inferred_idxes; + hb_bit_set_t inferred_idxes; unsigned start_point = 0; for (unsigned end_point : end_points) { @@ -661,6 +738,7 @@ bool optimize (const contour_point_vector_t& contour_points, bool is_composite, + optimize_scratch_t &scratch, double tolerance = 0.5 + 1e-10) { unsigned count = contour_points.length; @@ -668,22 +746,21 @@ deltas_y.length != count) return false; - hb_vector_t<bool> opt_indices; - hb_vector_t<int> rounded_x_deltas, rounded_y_deltas; + hb_vector_t<bool> &opt_indices = scratch.opt_indices.reset (); + hb_vector_t<int> &rounded_x_deltas = scratch.rounded_x_deltas; + hb_vector_t<int> &rounded_y_deltas = scratch.rounded_y_deltas; - if (unlikely (!rounded_x_deltas.alloc (count) || - !rounded_y_deltas.alloc (count))) + if (unlikely (!rounded_x_deltas.resize_dirty (count) || + !rounded_y_deltas.resize_dirty (count))) return false; for (unsigned i = 0; i < count; i++) { - int rounded_x_delta = (int) roundf (deltas_x.arrayZ[i]); - int rounded_y_delta = (int) roundf (deltas_y.arrayZ[i]); - rounded_x_deltas.push (rounded_x_delta); - rounded_y_deltas.push (rounded_y_delta); + rounded_x_deltas.arrayZ[i] = (int) roundf (deltas_x.arrayZ[i]); + rounded_y_deltas.arrayZ[i] = (int) roundf (deltas_y.arrayZ[i]); } - if (!iup_delta_optimize (contour_points, rounded_x_deltas, rounded_y_deltas, opt_indices, tolerance)) + if (!iup_delta_optimize (contour_points, rounded_x_deltas, rounded_y_deltas, opt_indices, scratch.iup, tolerance)) return false; unsigned ref_count = 0; @@ -692,7 +769,8 @@ if (ref_count == count) return true; - hb_vector_t<float> opt_deltas_x, opt_deltas_y; + hb_vector_t<float> &opt_deltas_x = scratch.opt_deltas_x.reset (); + hb_vector_t<float> &opt_deltas_y = scratch.opt_deltas_y.reset (); bool is_comp_glyph_wo_deltas = (is_composite && ref_count == 0); if (is_comp_glyph_wo_deltas) { @@ -705,34 +783,31 @@ opt_indices.arrayZ[i] = false; } - hb_vector_t<unsigned char> opt_point_data; + hb_vector_t<unsigned char> &opt_point_data = scratch.opt_point_data.reset (); if (!compile_point_set (opt_indices, opt_point_data)) return false; - hb_vector_t<unsigned char> opt_deltas_data; + hb_vector_t<unsigned char> &opt_deltas_data = scratch.opt_deltas_data.reset (); if (!compile_deltas (opt_indices, is_comp_glyph_wo_deltas ? opt_deltas_x : deltas_x, is_comp_glyph_wo_deltas ? opt_deltas_y : deltas_y, - opt_deltas_data)) + opt_deltas_data, + scratch.rounded_deltas)) return false; - hb_vector_t<unsigned char> point_data; + hb_vector_t<unsigned char> &point_data = scratch.point_data.reset (); if (!compile_point_set (indices, point_data)) return false; - hb_vector_t<unsigned char> deltas_data; - if (!compile_deltas (indices, deltas_x, deltas_y, deltas_data)) + hb_vector_t<unsigned char> &deltas_data = scratch.deltas_data.reset (); + if (!compile_deltas (indices, deltas_x, deltas_y, deltas_data, scratch.rounded_deltas)) return false; if (opt_point_data.length + opt_deltas_data.length < point_data.length + deltas_data.length) { - indices.fini (); indices = std::move (opt_indices); if (is_comp_glyph_wo_deltas) { - deltas_x.fini (); deltas_x = std::move (opt_deltas_x); - - deltas_y.fini (); deltas_y = std::move (opt_deltas_y); } } @@ -757,7 +832,7 @@ /* allocate enough memories: 2 bytes for count + 3 bytes for each point */ unsigned num_bytes = 2 + 3 *num_points; - if (unlikely (!compiled_points.resize (num_bytes, false))) + if (unlikely (!compiled_points.resize_dirty (num_bytes))) return false; unsigned pos = 0; @@ -821,7 +896,7 @@ else compiled_points.arrayZ[header_pos] = (run_length - 1) | 0x80; } - return compiled_points.resize (pos, false); + return compiled_points.resize_dirty (pos); } static double infer_delta (double target_val, double prev_val, double next_val, double prev_delta, double next_delta) @@ -852,15 +927,15 @@ return_trace (c->check_struct (this)); } - unsigned get_size (unsigned axis_count) const + unsigned get_size (unsigned axis_count_times_2) const { unsigned total_size = min_size; unsigned count = tupleVarCount.get_count (); const TupleVariationHeader *tuple_var_header = &(get_tuple_var_header()); for (unsigned i = 0; i < count; i++) { - total_size += tuple_var_header->get_size (axis_count) + tuple_var_header->get_data_size (); - tuple_var_header = &tuple_var_header->get_next (axis_count); + total_size += tuple_var_header->get_size (axis_count_times_2) + tuple_var_header->get_data_size (); + tuple_var_header = &tuple_var_header->get_next (axis_count_times_2); } return total_size; @@ -925,8 +1000,12 @@ const hb_map_t *axes_old_index_tag_map, const hb_vector_t<unsigned> &shared_indices, const hb_array_t<const F2DOT14> shared_tuples, - bool is_composite_glyph) + hb_alloc_pool_t *pool = nullptr, + bool is_composite_glyph = false) { + hb_vector_t<unsigned> private_indices; + hb_vector_t<int> deltas_x; + hb_vector_t<int> deltas_y; do { const HBUINT8 *p = iterator.get_serialized_data (); @@ -939,7 +1018,7 @@ || axis_tuples.is_empty ()) return false; - hb_vector_t<unsigned> private_indices; + private_indices.reset (); bool has_private_points = iterator.current_tuple->has_private_points (); const HBUINT8 *end = p + length; if (has_private_points && @@ -950,27 +1029,24 @@ bool apply_to_all = (indices.length == 0); unsigned num_deltas = apply_to_all ? point_count : indices.length; - hb_vector_t<int> deltas_x; - - if (unlikely (!deltas_x.resize (num_deltas, false) || + if (unlikely (!deltas_x.resize_dirty (num_deltas) || !TupleVariationData::decompile_deltas (p, deltas_x, end))) return false; - hb_vector_t<int> deltas_y; if (is_gvar) { - if (unlikely (!deltas_y.resize (num_deltas, false) || + if (unlikely (!deltas_y.resize_dirty (num_deltas) || !TupleVariationData::decompile_deltas (p, deltas_y, end))) return false; } tuple_delta_t var; var.axis_tuples = std::move (axis_tuples); - if (unlikely (!var.indices.resize (point_count) || - !var.deltas_x.resize (point_count, false))) + if (unlikely (!var.indices.allocate_from_pool (pool, point_count) || + !var.deltas_x.allocate_from_pool (pool, point_count, false))) return false; - if (is_gvar && unlikely (!var.deltas_y.resize (point_count, false))) + if (is_gvar && unlikely (!var.deltas_y.allocate_from_pool (pool, point_count, false))) return false; for (unsigned i = 0; i < num_deltas; i++) @@ -1012,8 +1088,8 @@ /* In VarData, deltas are organized in rows, convert them into * column(region) based tuples, resize deltas_x first */ tuple_delta_t tuple; - if (!tuple.deltas_x.resize (item_count, false) || - !tuple.indices.resize (item_count, false)) + if (!tuple.deltas_x.resize_dirty (item_count) || + !tuple.indices.resize_dirty (item_count)) return false; for (unsigned i = 0; i < item_count; i++) @@ -1041,7 +1117,8 @@ } bool change_tuple_variations_axis_limits (const hb_hashmap_t<hb_tag_t, Triple>& normalized_axes_location, - const hb_hashmap_t<hb_tag_t, TripleDistances>& axes_triple_distances) + const hb_hashmap_t<hb_tag_t, TripleDistances>& axes_triple_distances, + hb_alloc_pool_t *pool = nullptr) { /* sort axis_tag/axis_limits, make result deterministic */ hb_vector_t<hb_tag_t> axis_tags; @@ -1050,6 +1127,10 @@ for (auto t : normalized_axes_location.keys ()) axis_tags.push (t); + // Reused vectors for reduced malloc pressure. + rebase_tent_result_scratch_t scratch; + hb_vector_t<tuple_delta_t> out; + axis_tags.qsort (_cmp_axis_tag); for (auto axis_tag : axis_tags) { @@ -1061,9 +1142,10 @@ axis_triple_distances = axes_triple_distances.get (axis_tag); hb_vector_t<tuple_delta_t> new_vars; - for (const tuple_delta_t& var : tuple_vars) + for (tuple_delta_t& var : tuple_vars) { - hb_vector_t<tuple_delta_t> out = var.change_tuple_var_axis_limit (axis_tag, *axis_limit, axis_triple_distances); + // This may move var out. + var.change_tuple_var_axis_limit (axis_tag, *axis_limit, axis_triple_distances, out, scratch, pool); if (!out) continue; unsigned new_len = new_vars.length + out.length; @@ -1074,7 +1156,6 @@ for (unsigned i = 0; i < out.length; i++) new_vars.push (std::move (out[i])); } - tuple_vars.fini (); tuple_vars = std::move (new_vars); } return true; @@ -1085,9 +1166,12 @@ bool merge_tuple_variations (contour_point_vector_t* contour_points = nullptr) { hb_vector_t<tuple_delta_t> new_vars; + // The pre-allocation is essential for address stability of pointers + // we store in the hashmap. + if (unlikely (!new_vars.alloc (tuple_vars.length))) + return false; hb_hashmap_t<const hb_hashmap_t<hb_tag_t, Triple>*, unsigned> m; - unsigned i = 0; - for (const tuple_delta_t& var : tuple_vars) + for (tuple_delta_t& var : tuple_vars) { /* if all axes are pinned, drop the tuple variation */ if (var.axis_tuples.is_empty ()) @@ -1107,13 +1191,17 @@ } else { - new_vars.push (var); - if (!m.set (&(var.axis_tuples), i)) + auto *new_var = new_vars.push (); + if (unlikely (new_vars.in_error ())) + return false; + hb_swap (*new_var, var); + if (unlikely (!m.set (&(new_var->axis_tuples), new_vars.length - 1))) return false; - i++; } } - tuple_vars.fini (); + m.fini (); // Just in case, since it points into new_vars data. + // Shouldn't be necessary though, since we only move new_vars, not its + // contents. tuple_vars = std::move (new_vars); return true; } @@ -1173,20 +1261,22 @@ } } - bool calc_inferred_deltas (const contour_point_vector_t& contour_points) + bool calc_inferred_deltas (const contour_point_vector_t& contour_points, + hb_vector_t<unsigned> &scratch) { for (tuple_delta_t& var : tuple_vars) - if (!var.calc_inferred_deltas (contour_points)) + if (!var.calc_inferred_deltas (contour_points, scratch)) return false; return true; } - bool iup_optimize (const contour_point_vector_t& contour_points) + bool iup_optimize (const contour_point_vector_t& contour_points, + optimize_scratch_t &scratch) { for (tuple_delta_t& var : tuple_vars) { - if (!var.optimize (contour_points, is_composite)) + if (!var.optimize (contour_points, is_composite, scratch)) return false; } return true; @@ -1195,16 +1285,21 @@ public: bool instantiate (const hb_hashmap_t<hb_tag_t, Triple>& normalized_axes_location, const hb_hashmap_t<hb_tag_t, TripleDistances>& axes_triple_distances, + optimize_scratch_t &scratch, + hb_alloc_pool_t *pool = nullptr, contour_point_vector_t* contour_points = nullptr, bool optimize = false) { if (!tuple_vars) return true; - if (!change_tuple_variations_axis_limits (normalized_axes_location, axes_triple_distances)) + if (!change_tuple_variations_axis_limits (normalized_axes_location, axes_triple_distances, pool)) return false; /* compute inferred deltas only for gvar */ if (contour_points) - if (!calc_inferred_deltas (*contour_points)) + { + hb_vector_t<unsigned> scratch; + if (!calc_inferred_deltas (*contour_points, scratch)) return false; + } /* if iup delta opt is on, contour_points can't be null */ if (optimize && !contour_points) @@ -1213,7 +1308,7 @@ if (!merge_tuple_variations (optimize ? contour_points : nullptr)) return false; - if (optimize && !iup_optimize (*contour_points)) return false; + if (optimize && !iup_optimize (*contour_points, scratch)) return false; return !tuple_vars.in_error (); } @@ -1221,7 +1316,8 @@ const hb_map_t& axes_old_index_tag_map, bool use_shared_points, bool is_gvar = false, - const hb_hashmap_t<const hb_vector_t<char>*, unsigned>* shared_tuples_idx_map = nullptr) + const hb_hashmap_t<const hb_vector_t<F2DOT14>*, unsigned>* shared_tuples_idx_map = nullptr, + hb_alloc_pool_t *pool = nullptr) { // return true for empty glyph if (!tuple_vars) @@ -1241,6 +1337,7 @@ if (shared_points_bytes) compiled_byte_size += shared_points_bytes->length; } + hb_vector_t<int> rounded_deltas_scratch; // compile delta and tuple var header for each tuple variation for (auto& tuple: tuple_vars) { @@ -1254,12 +1351,13 @@ * this tuple */ if (!points_data->length) continue; - if (!tuple.compile_deltas ()) + if (!tuple.compile_deltas (rounded_deltas_scratch, pool)) return false; unsigned points_data_length = (points_data != shared_points_bytes) ? points_data->length : 0; if (!tuple.compile_tuple_var_header (axes_index_map, points_data_length, axes_old_index_tag_map, - shared_tuples_idx_map)) + shared_tuples_idx_map, + pool)) return false; compiled_byte_size += tuple.compiled_tuple_header.length + points_data_length + tuple.compiled_deltas.length; } @@ -1330,8 +1428,9 @@ { var_data_bytes = var_data_bytes_; var_data = var_data_bytes_.as<TupleVariationData> (); - index = 0; + tuples_left = var_data->tupleVarCount.get_count (); axis_count = axis_count_; + axis_count_times_2 = axis_count_ * 2; current_tuple = &var_data->get_tuple_var_header (); data_offset = 0; table_base = table_base_; @@ -1349,30 +1448,42 @@ return true; } - bool is_valid () const + bool is_valid () { - return (index < var_data->tupleVarCount.get_count ()) && - var_data_bytes.check_range (current_tuple, TupleVariationHeader::min_size) && - var_data_bytes.check_range (current_tuple, hb_max (current_tuple->get_data_size (), - current_tuple->get_size (axis_count))); + if (unlikely (tuples_left <= 0)) + return false; + + current_tuple_size = TupleVariationHeader::min_size; + if (unlikely (!var_data_bytes.check_end ((const char *) current_tuple + current_tuple_size))) + return false; + + current_tuple_size = current_tuple->get_size (axis_count_times_2); + if (unlikely (!var_data_bytes.check_end ((const char *) current_tuple + current_tuple_size))) + return false; + + return true; } + HB_ALWAYS_INLINE bool move_to_next () { data_offset += current_tuple->get_data_size (); - current_tuple = ¤t_tuple->get_next (axis_count); - index++; + current_tuple = &StructAtOffset<TupleVariationHeader> (current_tuple, current_tuple_size); + tuples_left--; return is_valid (); } + // TODO: Make it return (sanitized) hb_bytes_t const HBUINT8 *get_serialized_data () const { return &(table_base+var_data->data) + data_offset; } private: + signed tuples_left; const TupleVariationData *var_data; - unsigned int index; unsigned int axis_count; + unsigned int axis_count_times_2; unsigned int data_offset; + unsigned int current_tuple_size; const void *table_base; public: @@ -1411,7 +1522,7 @@ if (unlikely (p + 1 > end)) return false; count = ((count & POINT_RUN_COUNT_MASK) << 8) | *p++; } - if (unlikely (!points.resize (count, false))) return false; + if (unlikely (!points.resize_dirty (count))) return false; unsigned n = 0; unsigned i = 0; @@ -1446,12 +1557,14 @@ } template <typename T> + HB_ALWAYS_INLINE static bool decompile_deltas (const HBUINT8 *&p /* IN/OUT */, hb_vector_t<T> &deltas /* IN/OUT */, const HBUINT8 *end, - bool consume_all = false) + bool consume_all = false, + unsigned start = 0) { - return TupleValues::decompile (p, deltas, end, consume_all); + return TupleValues::decompile (p, deltas, end, consume_all, start); } bool has_data () const { return tupleVarCount; } @@ -1463,6 +1576,7 @@ const hb_vector_t<unsigned> &shared_indices, const hb_array_t<const F2DOT14> shared_tuples, tuple_variations_t& tuple_variations, /* OUT */ + hb_alloc_pool_t *pool = nullptr, bool is_composite_glyph = false) const { return tuple_variations.create_from_tuple_var_data (iterator, tupleVarCount, @@ -1470,6 +1584,7 @@ axes_old_index_tag_map, shared_indices, shared_tuples, + pool, is_composite_glyph); } @@ -1634,8 +1749,9 @@ bool instantiate_tuple_vars (const hb_hashmap_t<hb_tag_t, Triple>& normalized_axes_location, const hb_hashmap_t<hb_tag_t, TripleDistances>& axes_triple_distances) { + optimize_scratch_t scratch; for (tuple_variations_t& tuple_vars : vars) - if (!tuple_vars.instantiate (normalized_axes_location, axes_triple_distances)) + if (!tuple_vars.instantiate (normalized_axes_location, axes_triple_distances, scratch)) return false; if (!build_region_list ()) return false; @@ -1720,30 +1836,28 @@ struct combined_gain_idx_tuple_t { - int gain; - unsigned idx_1; - unsigned idx_2; + uint64_t encoded; combined_gain_idx_tuple_t () = default; - combined_gain_idx_tuple_t (int gain_, unsigned i, unsigned j) - :gain (gain_), idx_1 (i), idx_2 (j) {} + combined_gain_idx_tuple_t (unsigned gain, unsigned i, unsigned j) + : encoded ((uint64_t (0xFFFFFF - gain) << 40) | (uint64_t (i) << 20) | uint64_t (j)) + { + assert (gain < 0xFFFFFF); + assert (i < 0xFFFFFFF && j < 0xFFFFFFF); + } bool operator < (const combined_gain_idx_tuple_t& o) { - if (gain != o.gain) - return gain < o.gain; - - if (idx_1 != o.idx_1) - return idx_1 < o.idx_1; - - return idx_2 < o.idx_2; + return encoded < o.encoded; } bool operator <= (const combined_gain_idx_tuple_t& o) { - if (*this < o) return true; - return gain == o.gain && idx_1 == o.idx_1 && idx_2 == o.idx_2; + return encoded <= o.encoded; } + + unsigned idx_1 () const { return (encoded >> 20) & 0xFFFFF; }; + unsigned idx_2 () const { return encoded & 0xFFFFF; }; }; bool as_item_varstore (bool optimize=true, bool use_no_variation_idx=true) @@ -1765,9 +1879,9 @@ hb_hashmap_t<unsigned, const hb_vector_t<int>*> front_mapping; unsigned start_row = 0; hb_vector_t<delta_row_encoding_t> encoding_objs; - hb_hashmap_t<hb_vector_t<uint8_t>, unsigned> chars_idx_map; /* delta_rows map, used for filtering out duplicate rows */ + hb_vector_t<const hb_vector_t<int> *> major_rows; hb_hashmap_t<const hb_vector_t<int>*, unsigned> delta_rows_map; for (unsigned major = 0; major < vars.length; major++) { @@ -1775,6 +1889,9 @@ * (row based) delta */ const tuple_variations_t& tuples = vars[major]; unsigned num_rows = var_data_num_rows[major]; + + if (!num_rows) continue; + for (const tuple_delta_t& tuple: tuples.tuple_vars) { if (tuple.deltas_x.length != num_rows) @@ -1789,24 +1906,11 @@ { int rounded_delta = roundf (tuple.deltas_x[i]); delta_rows[start_row + i][*col_idx] += rounded_delta; - if ((!has_long) && (rounded_delta < -65536 || rounded_delta > 65535)) - has_long = true; + has_long |= rounded_delta < -65536 || rounded_delta > 65535; } } - if (!optimize) - { - /* assemble a delta_row_encoding_t for this subtable, skip optimization so - * chars is not initialized, we only need delta rows for serialization */ - delta_row_encoding_t obj; - for (unsigned r = start_row; r < start_row + num_rows; r++) - obj.add_row (&(delta_rows.arrayZ[r])); - - encodings.push (std::move (obj)); - start_row += num_rows; - continue; - } - + major_rows.reset (); for (unsigned minor = 0; minor < num_rows; minor++) { const hb_vector_t<int>& row = delta_rows[start_row + minor]; @@ -1828,42 +1932,40 @@ if (!front_mapping.set ((major<<16) + minor, &row)) return false; - hb_vector_t<uint8_t> chars = delta_row_encoding_t::get_row_chars (row); - if (!chars) return false; - if (delta_rows_map.has (&row)) continue; delta_rows_map.set (&row, 1); - unsigned *obj_idx; - if (chars_idx_map.has (chars, &obj_idx)) - { - delta_row_encoding_t& obj = encoding_objs[*obj_idx]; - if (!obj.add_row (&row)) - return false; - } - else - { - if (!chars_idx_map.set (chars, encoding_objs.length)) - return false; - delta_row_encoding_t obj (std::move (chars), &row); - encoding_objs.push (std::move (obj)); - } + + major_rows.push (&row); } + if (major_rows) + encoding_objs.push (delta_row_encoding_t (std::move (major_rows), num_cols)); + start_row += num_rows; } /* return directly if no optimization, maintain original VariationIndex so * varidx_map would be empty */ - if (!optimize) return !encodings.in_error (); + if (!optimize) + { + encodings = std::move (encoding_objs); + return !encodings.in_error (); + } + + /* NOTE: Fonttools instancer always optimizes VarStore from scratch. This + * is too costly for large fonts. So, instead, we retain the encodings of + * the original VarStore, and just try to combine them if possible. This + * is a compromise between optimization and performance and practically + * works very well. */ - /* sort encoding_objs */ + // This produces slightly smaller results in some cases. encoding_objs.qsort (); - /* main algorithm: repeatedly pick 2 best encodings to combine, and combine - * them */ - hb_priority_queue_t<combined_gain_idx_tuple_t> queue; + /* main algorithm: repeatedly pick 2 best encodings to combine, and combine them */ + using item_t = hb_priority_queue_t<combined_gain_idx_tuple_t>::item_t; + hb_vector_t<item_t> queue_items; unsigned num_todos = encoding_objs.length; for (unsigned i = 0; i < num_todos; i++) { @@ -1871,16 +1973,18 @@ { int combining_gain = encoding_objs.arrayZ[i].gain_from_merging (encoding_objs.arrayZ[j]); if (combining_gain > 0) - queue.insert (combined_gain_idx_tuple_t (-combining_gain, i, j), 0); + queue_items.push (item_t (combined_gain_idx_tuple_t (combining_gain, i, j), 0)); } } - hb_set_t removed_todo_idxes; + hb_priority_queue_t<combined_gain_idx_tuple_t> queue (std::move (queue_items)); + + hb_bit_set_t removed_todo_idxes; while (queue) { auto t = queue.pop_minimum ().first; - unsigned i = t.idx_1; - unsigned j = t.idx_2; + unsigned i = t.idx_1 (); + unsigned j = t.idx_2 (); if (removed_todo_idxes.has (i) || removed_todo_idxes.has (j)) continue; @@ -1891,40 +1995,36 @@ removed_todo_idxes.add (i); removed_todo_idxes.add (j); - hb_vector_t<uint8_t> combined_chars; - if (!combined_chars.alloc (encoding.chars.length)) - return false; - - for (unsigned idx = 0; idx < encoding.chars.length; idx++) - { - uint8_t v = hb_max (encoding.chars.arrayZ[idx], other_encoding.chars.arrayZ[idx]); - combined_chars.push (v); - } - - delta_row_encoding_t combined_encoding_obj (std::move (combined_chars)); - for (const auto& row : hb_concat (encoding.items, other_encoding.items)) - combined_encoding_obj.add_row (row); + encoding.merge (other_encoding); for (unsigned idx = 0; idx < encoding_objs.length; idx++) { if (removed_todo_idxes.has (idx)) continue; const delta_row_encoding_t& obj = encoding_objs.arrayZ[idx]; - if (obj.chars == combined_chars) + // In the unlikely event that the same encoding exists already, combine it. + if (obj.width == encoding.width && obj.chars == encoding.chars) { + // This is straight port from fonttools algorithm. I added this branch there + // because I thought it can happen. But looks like we never get in here in + // practice. I'm not confident enough to remove it though; in theory it can + // happen. I think it's just that our tests are not extensive enough to hit + // this path. + for (const auto& row : obj.items) - combined_encoding_obj.add_row (row); + encoding.add_row (row); removed_todo_idxes.add (idx); continue; } - int combined_gain = combined_encoding_obj.gain_from_merging (obj); + int combined_gain = encoding.gain_from_merging (obj); if (combined_gain > 0) - queue.insert (combined_gain_idx_tuple_t (-combined_gain, idx, encoding_objs.length), 0); + queue.insert (combined_gain_idx_tuple_t (combined_gain, idx, encoding_objs.length), 0); } - encoding_objs.push (std::move (combined_encoding_obj)); + auto moved_encoding = std::move (encoding); + encoding_objs.push (moved_encoding); } int num_final_encodings = (int) encoding_objs.length - (int) removed_todo_idxes.get_population (); @@ -1937,9 +2037,6 @@ encodings.push (std::move (encoding_objs.arrayZ[i])); } - /* sort again based on width, make result deterministic */ - encodings.qsort (delta_row_encoding_t::cmp_width); - return compile_varidx_map (front_mapping); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-cvar-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-cvar-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-cvar-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-cvar-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -84,7 +84,7 @@ if (!coords) return true; hb_vector_t<unsigned> shared_indices; TupleVariationData<>::tuple_iterator_t iterator; - unsigned var_data_length = tuple_var_data->get_size (axis_count); + unsigned var_data_length = tuple_var_data->get_size (axis_count * 2); hb_bytes_t var_data_bytes = hb_bytes_t (reinterpret_cast<const char*> (tuple_var_data), var_data_length); if (!TupleVariationData<>::get_tuple_iterator (var_data_bytes, axis_count, base, shared_indices, &iterator)) @@ -113,7 +113,7 @@ bool apply_to_all = (indices.length == 0); unsigned num_deltas = apply_to_all ? num_cvt_item : indices.length; - if (unlikely (!unpacked_deltas.resize (num_deltas, false))) return false; + if (unlikely (!unpacked_deltas.resize_dirty (num_deltas))) return false; if (unlikely (!TupleVariationData<>::decompile_deltas (p, unpacked_deltas, end))) return false; for (unsigned int i = 0; i < num_deltas; i++) @@ -158,7 +158,8 @@ tuple_variations)) return_trace (false); - if (!tuple_variations.instantiate (c->plan->axes_location, c->plan->axes_triple_distances)) + optimize_scratch_t scratch; + if (!tuple_variations.instantiate (c->plan->axes_location, c->plan->axes_triple_distances, scratch)) return_trace (false); if (!tuple_variations.compile_bytes (c->plan->axes_index_map, c->plan->axes_old_index_tag_map, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-fvar-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-fvar-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-fvar-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-fvar-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -179,7 +179,7 @@ hb_tag_t get_axis_tag () const { return axisTag; } - int normalize_axis_value (float v) const + float normalize_axis_value (float v) const { float min_value, default_value, max_value; get_coordinates (min_value, default_value, max_value); @@ -189,23 +189,9 @@ if (v == default_value) return 0; else if (v < default_value) - v = (v - default_value) / (default_value - min_value); + return (v - default_value) / (default_value - min_value); else - v = (v - default_value) / (max_value - default_value); - return roundf (v * 16384.f); - } - - float unnormalize_axis_value (int v) const - { - float min_value, default_value, max_value; - get_coordinates (min_value, default_value, max_value); - - if (v == 0) - return default_value; - else if (v < 0) - return v * (default_value - min_value) / 16384.f + default_value; - else - return v * (max_value - default_value) / 16384.f + default_value; + return (v - default_value) / (max_value - default_value); } hb_ot_name_id_t get_name_id () const { return axisNameID; } @@ -341,12 +327,9 @@ return axes.lfind (tag, &i) && ((void) axes[i].get_axis_info (i, info), true); } - int normalize_axis_value (unsigned int axis_index, float v) const + float normalize_axis_value (unsigned int axis_index, float v) const { return get_axes ()[axis_index].normalize_axis_value (v); } - float unnormalize_axis_value (unsigned int axis_index, int v) const - { return get_axes ()[axis_index].unnormalize_axis_value (v); } - unsigned int get_instance_count () const { return instanceCount; } hb_ot_name_id_t get_instance_subfamily_name_id (unsigned int instance_index) const diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-gvar-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-gvar-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-gvar-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-gvar-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -66,12 +66,14 @@ hb_vector_t<tuple_variations_t> glyph_variations; - hb_vector_t<char> compiled_shared_tuples; + hb_vector_t<F2DOT14> compiled_shared_tuples; private: unsigned shared_tuples_count = 0; /* shared coords-> index map after instantiation */ - hb_hashmap_t<const hb_vector_t<char>*, unsigned> shared_tuples_idx_map; + hb_hashmap_t<const hb_vector_t<F2DOT14>*, unsigned> shared_tuples_idx_map; + + hb_alloc_pool_t pool; public: unsigned compiled_shared_tuples_count () const @@ -128,6 +130,7 @@ iterator, &(plan->axes_old_index_tag_map), shared_indices, shared_tuples, tuple_vars, /* OUT */ + &pool, is_composite_glyph)) return false; glyph_variations.push (std::move (tuple_vars)); @@ -139,6 +142,7 @@ { unsigned count = plan->new_to_old_gid_list.length; bool iup_optimize = false; + optimize_scratch_t scratch; iup_optimize = plan->flags & HB_SUBSET_FLAGS_OPTIMIZE_IUP_DELTAS; for (unsigned i = 0; i < count; i++) { @@ -146,7 +150,7 @@ contour_point_vector_t *all_points; if (!plan->new_gid_contour_points_map.has (new_gid, &all_points)) return false; - if (!glyph_variations[i].instantiate (plan->axes_location, plan->axes_triple_distances, all_points, iup_optimize)) + if (!glyph_variations[i].instantiate (plan->axes_location, plan->axes_triple_distances, scratch, &pool, all_points, iup_optimize)) return false; } return true; @@ -161,7 +165,8 @@ if (!vars.compile_bytes (axes_index_map, axes_old_index_tag_map, true, /* use shared points*/ true, - &shared_tuples_idx_map)) + &shared_tuples_idx_map, + &pool)) return false; return true; @@ -172,20 +177,21 @@ { /* key is pointer to compiled_peak_coords inside each tuple, hashing * function will always deref pointers first */ - hb_hashmap_t<const hb_vector_t<char>*, unsigned> coords_count_map; + hb_hashmap_t<const hb_vector_t<F2DOT14>*, unsigned> coords_count_map; /* count the num of shared coords */ for (tuple_variations_t& vars: glyph_variations) { for (tuple_delta_t& var : vars.tuple_vars) { - if (!var.compile_peak_coords (axes_index_map, axes_old_index_tag_map)) + if (!var.compile_coords (axes_index_map, axes_old_index_tag_map, &pool)) return false; - unsigned* count; - if (coords_count_map.has (&(var.compiled_peak_coords), &count)) - coords_count_map.set (&(var.compiled_peak_coords), *count + 1); + unsigned *count; + unsigned hash = hb_hash (&var.compiled_peak_coords); + if (coords_count_map.has_with_hash (&(var.compiled_peak_coords), hash, &count)) + (*count)++; else - coords_count_map.set (&(var.compiled_peak_coords), 1); + coords_count_map.set_with_hash (&(var.compiled_peak_coords), hash, 1); } } @@ -193,66 +199,45 @@ return false; /* add only those coords that are used more than once into the vector and sort */ - hb_vector_t<const hb_vector_t<char>*> shared_coords; - if (unlikely (!shared_coords.alloc (coords_count_map.get_population ()))) - return false; - - for (const auto _ : coords_count_map.iter ()) - { - if (_.second == 1) continue; - shared_coords.push (_.first); - } + hb_vector_t<hb_pair_t<const hb_vector_t<F2DOT14>*, unsigned>> shared_coords { + + hb_iter (coords_count_map) + | hb_filter ([] (const hb_pair_t<const hb_vector_t<F2DOT14>*, unsigned>& p) { return p.second > 1; }) + }; + if (unlikely (shared_coords.in_error ())) return false; /* no shared tuples: no coords are used more than once */ if (!shared_coords) return true; /* sorting based on the coords frequency first (high to low), then compare * the coords bytes */ - hb_qsort (shared_coords.arrayZ, shared_coords.length, sizeof (hb_vector_t<char>*), _cmp_coords, (void *) (&coords_count_map)); + shared_coords.qsort (_cmp_coords); /* build shared_coords->idx map and shared tuples byte array */ shared_tuples_count = hb_min (0xFFFu + 1, shared_coords.length); - unsigned len = shared_tuples_count * (shared_coords[0]->length); + unsigned len = shared_tuples_count * (shared_coords[0].first->length); if (unlikely (!compiled_shared_tuples.alloc (len))) return false; for (unsigned i = 0; i < shared_tuples_count; i++) { - shared_tuples_idx_map.set (shared_coords[i], i); + shared_tuples_idx_map.set (shared_coords[i].first, i); /* add a concat() in hb_vector_t? */ - for (char c : shared_coords[i]->iter ()) + for (auto c : shared_coords[i].first->iter ()) compiled_shared_tuples.push (c); } return true; } - static int _cmp_coords (const void *pa, const void *pb, void *arg) + static int _cmp_coords (const void *pa, const void *pb) { - const hb_hashmap_t<const hb_vector_t<char>*, unsigned>* coords_count_map = - reinterpret_cast<const hb_hashmap_t<const hb_vector_t<char>*, unsigned>*> (arg); - - /* shared_coords is hb_vector_t<const hb_vector_t<char>*> so casting pa/pb - * to be a pointer to a pointer */ - const hb_vector_t<char>** a = reinterpret_cast<const hb_vector_t<char>**> (const_cast<void*>(pa)); - const hb_vector_t<char>** b = reinterpret_cast<const hb_vector_t<char>**> (const_cast<void*>(pb)); - - bool has_a = coords_count_map->has (*a); - bool has_b = coords_count_map->has (*b); - - if (has_a && has_b) - { - unsigned a_num = coords_count_map->get (*a); - unsigned b_num = coords_count_map->get (*b); + const hb_pair_t<hb_vector_t<F2DOT14> *, unsigned> *a = (const hb_pair_t<hb_vector_t<F2DOT14> *, unsigned> *) pa; + const hb_pair_t<hb_vector_t<F2DOT14> *, unsigned> *b = (const hb_pair_t<hb_vector_t<F2DOT14> *, unsigned> *) pb; - if (a_num != b_num) - return b_num - a_num; + if (a->second != b->second) + return b->second - a->second; // high to low - return (*b)->as_array().cmp ((*a)->as_array ()); - } - else if (has_a) return -1; - else if (has_b) return 1; - else return 0; + return b->first->as_array().cmp (a->first->as_array ()); } template<typename Iterator, @@ -402,9 +387,9 @@ out->sharedTuples = 0; else { - hb_array_t<const char> shared_tuples = glyph_vars.compiled_shared_tuples.as_array ().copy (c); + hb_array_t<const F2DOT14> shared_tuples = glyph_vars.compiled_shared_tuples.as_array ().copy (c); if (!shared_tuples.arrayZ) return_trace (false); - out->sharedTuples = shared_tuples.arrayZ - (char *) out; + out->sharedTuples = (const char *) shared_tuples.arrayZ - (char *) out; } char *glyph_var_data = c->start_embed<char> (); @@ -463,10 +448,18 @@ if (it->first == 0 && !(c->plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE)) it++; unsigned int subset_data_size = 0; + unsigned padding_size = 0; for (auto &_ : it) { hb_codepoint_t old_gid = _.second; - subset_data_size += get_glyph_var_data_bytes (c->source_blob, glyph_count, old_gid).length; + unsigned glyph_data_size = get_glyph_var_data_bytes (c->source_blob, glyph_count, old_gid).length; + if (glyph_data_size % 2) + { + glyph_data_size++; + padding_size++; + } + + subset_data_size += glyph_data_size; } /* According to the spec: If the short format (Offset16) is used for offsets, @@ -495,6 +488,8 @@ /* This ordering relative to the shared tuples array, which puts the glyphVariationData last in the table, is required when HB_SUBSET_FLAGS_IFTB_REQUIREMENTS is set */ + if (long_offset) + subset_data_size -= padding_size; char *subset_data = c->serializer->allocate_size<char> (subset_data_size, false); if (!subset_data) return_trace (false); out->dataZ = subset_data - (char *) out; @@ -533,8 +528,16 @@ old_gid); hb_memcpy (subset_data, var_data_bytes.arrayZ, var_data_bytes.length); - subset_data += var_data_bytes.length; - glyph_offset += var_data_bytes.length; + unsigned glyph_data_size = var_data_bytes.length; + subset_data += glyph_data_size; + glyph_offset += glyph_data_size; + + if (!long_offset && (glyph_data_size % 2)) + { + *subset_data = 0; + subset_data++; + glyph_offset++; + } if (long_offset) ((HBUINT32 *) subset_offsets)[gid] = glyph_offset; @@ -582,6 +585,17 @@ public: struct accelerator_t { + + hb_scalar_cache_t *create_cache () const + { + return hb_scalar_cache_t::create (table->sharedTupleCount); + } + + static void destroy_cache (hb_scalar_cache_t *cache) + { + hb_scalar_cache_t::destroy (cache); + } + bool has_data () const { return table->has_data (); } accelerator_t (hb_face_t *face) @@ -589,36 +603,6 @@ table = hb_sanitize_context_t ().reference_table<gvar_GVAR> (face); /* If sanitize failed, set glyphCount to 0. */ glyphCount = table->version.to_int () ? face->get_num_glyphs () : 0; - - /* For shared tuples that only have one or two axes active, shared the index - * of that axis as a cache. This will speed up caclulate_scalar() a lot - * for fonts with lots of axes and many "monovar" or "duovar" tuples. */ - hb_array_t<const F2DOT14> shared_tuples = (table+table->sharedTuples).as_array (table->sharedTupleCount * table->axisCount); - unsigned count = table->sharedTupleCount; - if (unlikely (!shared_tuple_active_idx.resize (count, false))) return; - unsigned axis_count = table->axisCount; - for (unsigned i = 0; i < count; i++) - { - hb_array_t<const F2DOT14> tuple = shared_tuples.sub_array (axis_count * i, axis_count); - int idx1 = -1, idx2 = -1; - for (unsigned j = 0; j < axis_count; j++) - { - const F2DOT14 &peak = tuple.arrayZ[j]; - if (peak.to_int () != 0) - { - if (idx1 == -1) - idx1 = j; - else if (idx2 == -1) - idx2 = j; - else - { - idx1 = idx2 = -1; - break; - } - } - } - shared_tuple_active_idx.arrayZ[i] = {idx1, idx2}; - } } ~accelerator_t () { table.destroy (); } @@ -655,6 +639,7 @@ hb_array_t<const int> coords, const hb_array_t<contour_point_t> points, hb_glyf_scratch_t &scratch, + hb_scalar_cache_t *gvar_cache = nullptr, bool phantom_only = false) const { if (unlikely (glyph >= glyphCount)) return true; @@ -690,10 +675,12 @@ unsigned count = points.length; bool flush = false; + do { float scalar = iterator.current_tuple->calculate_scalar (coords, num_coords, shared_tuples, - &shared_tuple_active_idx); + gvar_cache); + if (scalar == 0.f) continue; const HBUINT8 *p = iterator.get_serialized_data (); unsigned int length = iterator.current_tuple->get_data_size (); @@ -702,7 +689,7 @@ if (!deltas) { - if (unlikely (!deltas_vec.resize (count, false))) return false; + if (unlikely (!deltas_vec.resize_dirty (count))) return false; deltas = deltas_vec.as_array (); hb_memset (deltas.arrayZ + (phantom_only ? count - 4 : 0), 0, (phantom_only ? 4 : count) * sizeof (deltas[0])); @@ -717,11 +704,12 @@ const hb_array_t<unsigned int> &indices = has_private_points ? private_indices : shared_indices; bool apply_to_all = (indices.length == 0); - unsigned int num_deltas = apply_to_all ? points.length : indices.length; - if (unlikely (!x_deltas.resize (num_deltas, false))) return false; - if (unlikely (!GlyphVariationData::decompile_deltas (p, x_deltas, end))) return false; - if (unlikely (!y_deltas.resize (num_deltas, false))) return false; - if (unlikely (!GlyphVariationData::decompile_deltas (p, y_deltas, end))) return false; + unsigned num_deltas = apply_to_all ? points.length : indices.length; + unsigned start_deltas = (apply_to_all && phantom_only && num_deltas >= 4 ? num_deltas - 4 : 0); + if (unlikely (!x_deltas.resize_dirty (num_deltas))) return false; + if (unlikely (!GlyphVariationData::decompile_deltas (p, x_deltas, end, false, start_deltas))) return false; + if (unlikely (!y_deltas.resize_dirty (num_deltas))) return false; + if (unlikely (!GlyphVariationData::decompile_deltas (p, y_deltas, end, false, start_deltas))) return false; if (!apply_to_all) { @@ -884,7 +872,6 @@ private: hb_blob_ptr_t<gvar_GVAR> table; unsigned glyphCount; - hb_vector_t<hb_pair_t<int, int>> shared_tuple_active_idx; }; protected: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-hvar-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-hvar-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var-hvar-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var-hvar-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -42,57 +42,62 @@ VORG_INDEX }; - void init (const DeltaSetIndexMap &index_map, + void init (const DeltaSetIndexMap *index_map, hb_inc_bimap_t &outer_map, hb_vector_t<hb_set_t *> &inner_sets, const hb_subset_plan_t *plan, bool bypass_empty = true) { map_count = 0; - outer_bit_count = 0; - inner_bit_count = 1; max_inners.init (); output_map.init (); - if (bypass_empty && !index_map.get_map_count ()) return; + if (bypass_empty && (!index_map || !index_map->get_map_count ())) return; unsigned int last_val = (unsigned int)-1; hb_codepoint_t last_gid = HB_CODEPOINT_INVALID; - outer_bit_count = (index_map.get_width () * 8) - index_map.get_inner_bit_count (); max_inners.resize (inner_sets.length); for (unsigned i = 0; i < inner_sets.length; i++) max_inners[i] = 0; /* Search backwards for a map value different from the last map value */ auto &new_to_old_gid_list = plan->new_to_old_gid_list; unsigned count = new_to_old_gid_list.length; - for (unsigned j = count; j; j--) + if (!index_map) { - hb_codepoint_t gid = new_to_old_gid_list.arrayZ[j - 1].first; - hb_codepoint_t old_gid = new_to_old_gid_list.arrayZ[j - 1].second; - - unsigned int v = index_map.map (old_gid); - if (last_gid == HB_CODEPOINT_INVALID) + map_count = new_to_old_gid_list.tail ().first + 1; + } + else + { + for (unsigned j = count; j; j--) { + hb_codepoint_t gid = new_to_old_gid_list.arrayZ[j - 1].first; + hb_codepoint_t old_gid = new_to_old_gid_list.arrayZ[j - 1].second; + + unsigned int v = index_map->map (old_gid); + if (last_gid == HB_CODEPOINT_INVALID) + { last_val = v; last_gid = gid; continue; - } - if (v != last_val) + } + if (v != last_val) break; - last_gid = gid; + last_gid = gid; + } + + if (unlikely (last_gid == (hb_codepoint_t)-1)) return; + map_count = last_gid + 1; } - if (unlikely (last_gid == (hb_codepoint_t)-1)) return; - map_count = last_gid + 1; for (auto _ : plan->new_to_old_gid_list) { hb_codepoint_t gid = _.first; if (gid >= map_count) break; hb_codepoint_t old_gid = _.second; - unsigned int v = index_map.map (old_gid); + unsigned int v = index_map ? index_map->map (old_gid): old_gid; unsigned int outer = v >> 16; unsigned int inner = v & 0xFFFF; outer_map.add (outer); @@ -113,6 +118,9 @@ const hb_vector_t<hb_inc_bimap_t> &inner_maps, const hb_subset_plan_t *plan) { + outer_bit_count = 1; + inner_bit_count = 1; + for (unsigned int i = 0; i < max_inners.length; i++) { if (inner_maps[i].get_population () == 0) continue; @@ -128,9 +136,13 @@ if (unlikely (new_gid >= map_count)) break; - uint32_t v = input_map->map (old_gid); - unsigned int outer = v >> 16; - output_map.arrayZ[new_gid] = (outer_map[outer] << 16) | (inner_maps[outer][v & 0xFFFF]); + uint32_t v = input_map? input_map->map (old_gid) : old_gid; + unsigned outer = v >> 16; + unsigned new_outer = outer_map[outer]; + unsigned bit_count = (new_outer == 0) ? 1 : hb_bit_storage (new_outer); + outer_bit_count = hb_max (bit_count, outer_bit_count); + + output_map.arrayZ[new_gid] = (new_outer << 16) | (inner_maps[outer][v & 0xFFFF]); } } @@ -204,8 +216,8 @@ if (unlikely (!index_map_plans.length || !inner_sets.length || !inner_maps.length)) return; bool retain_adv_map = false; - index_map_plans[0].init (*index_maps[0], outer_map, inner_sets, plan, false); - if (index_maps[0] == &Null (DeltaSetIndexMap)) + index_map_plans[0].init (index_maps[0], outer_map, inner_sets, plan, false); + if (!index_maps[0]) { retain_adv_map = plan->flags & HB_SUBSET_FLAGS_RETAIN_GIDS; outer_map.add (0); @@ -215,7 +227,7 @@ } for (unsigned int i = 1; i < index_maps.length; i++) - index_map_plans[i].init (*index_maps[i], outer_map, inner_sets, plan); + index_map_plans[i].init (index_maps[i], outer_map, inner_sets, plan); outer_map.sort (); @@ -284,6 +296,8 @@ static constexpr hb_tag_t HVARTag = HB_OT_TAG_HVAR; static constexpr hb_tag_t VVARTag = HB_OT_TAG_VVAR; + bool has_data () const { return version.major != 0; } + bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); @@ -301,9 +315,14 @@ void listup_index_maps (hb_vector_t<const DeltaSetIndexMap *> &index_maps) const { - index_maps.push (&(this+advMap)); - index_maps.push (&(this+lsbMap)); - index_maps.push (&(this+rsbMap)); + if (advMap) index_maps.push (&(this+advMap)); + else index_maps.push (nullptr); + + if (lsbMap) index_maps.push (&(this+lsbMap)); + else index_maps.push (nullptr); + + if (rsbMap) index_maps.push (&(this+rsbMap)); + else index_maps.push (nullptr); } bool serialize_index_maps (hb_serialize_context_t *c, @@ -382,9 +401,10 @@ hvar_plan.index_map_plans.as_array ())); } + HB_ALWAYS_INLINE float get_advance_delta_unscaled (hb_codepoint_t glyph, const int *coords, unsigned int coord_count, - ItemVariationStore::cache_t *store_cache = nullptr) const + hb_scalar_cache_t *store_cache = nullptr) const { uint32_t varidx = (this+advMap).map (glyph); return (this+varStore).get_delta (varidx, @@ -392,16 +412,6 @@ store_cache); } - bool get_lsb_delta_unscaled (hb_codepoint_t glyph, - const int *coords, unsigned int coord_count, - float *lsb) const - { - if (!lsbMap) return false; - uint32_t varidx = (this+lsbMap).map (glyph); - *lsb = (this+varStore).get_delta (varidx, coords, coord_count); - return true; - } - public: FixedVersion<>version; /* Version of the metrics variation table * initially set to 0x00010000u */ @@ -435,7 +445,8 @@ void listup_index_maps (hb_vector_t<const DeltaSetIndexMap *> &index_maps) const { HVARVVAR::listup_index_maps (index_maps); - index_maps.push (&(this+vorgMap)); + if (vorgMap) index_maps.push (&(this+vorgMap)); + else index_maps.push (nullptr); } bool serialize_index_maps (hb_serialize_context_t *c, @@ -454,14 +465,16 @@ bool subset (hb_subset_context_t *c) const { return HVARVVAR::_subset<VVAR> (c); } - bool get_vorg_delta_unscaled (hb_codepoint_t glyph, - const int *coords, unsigned int coord_count, - float *delta) const + HB_ALWAYS_INLINE + float get_vorg_delta_unscaled (hb_codepoint_t glyph, + const int *coords, unsigned int coord_count, + hb_scalar_cache_t *store_cache = nullptr) const { - if (!vorgMap) return false; + if (!vorgMap) return 0.f; uint32_t varidx = (this+vorgMap).map (glyph); - *delta = (this+varStore).get_delta (varidx, coords, coord_count); - return true; + return (this+varStore).get_delta (varidx, + coords, coord_count, + store_cache); } protected: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-var.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-var.cc 2026-04-17 19:08:13.000000000 +0000 @@ -286,10 +286,14 @@ hb_ot_var_axis_info_t info; if (hb_ot_var_find_axis_info (face, variations[i].tag, &info) && info.axis_index < coords_length) - coords[info.axis_index] = fvar.normalize_axis_value (info.axis_index, variations[i].value); + coords[info.axis_index] = roundf (fvar.normalize_axis_value (info.axis_index, variations[i].value) * 65536.0f); } - face->table.avar->map_coords (coords, coords_length); + face->table.avar->map_coords_16_16 (coords, coords_length); + + // Round to 2.14 + for (unsigned i = 0; i < coords_length; i++) + coords[i] = (coords[i] + 2) >> 2; } /** @@ -309,6 +313,10 @@ * Any additional scaling defined in the face's `avar` table is also * applied, as described at https://docs.microsoft.com/en-us/typography/opentype/spec/avar * + * Note: @coords_length must be the same as the number of axes in the face, as + * for example returned by hb_ot_var_get_axis_count(). + * Otherwise, the behavior is undefined. + * * Since: 1.4.2 **/ void @@ -319,9 +327,13 @@ { const OT::fvar &fvar = *face->table.fvar; for (unsigned int i = 0; i < coords_length; i++) - normalized_coords[i] = fvar.normalize_axis_value (i, design_coords[i]); + normalized_coords[i] = roundf (fvar.normalize_axis_value (i, design_coords[i]) * 65536.0f); + + face->table.avar->map_coords_16_16 (normalized_coords, coords_length); - face->table.avar->map_coords (normalized_coords, coords_length); + // Round to 2.14 + for (unsigned i = 0; i < coords_length; i++) + normalized_coords[i] = (normalized_coords[i] + 2) >> 2; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-vorg-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-vorg-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ot-vorg-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ot-vorg-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -61,6 +61,7 @@ bool has_data () const { return version.to_int (); } + HB_ALWAYS_INLINE int get_y_origin (hb_codepoint_t glyph) const { unsigned int i; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-outline.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-outline.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-outline.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-outline.cc 2026-04-17 19:08:13.000000000 +0000 @@ -84,6 +84,15 @@ } } +void hb_outline_t::translate (float dx, float dy) +{ + for (auto &p : points) + { + p.x += dx; + p.y += dy; + } +} + void hb_outline_t::slant (float slant_xy) { for (auto &p : points) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-outline.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-outline.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-outline.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-outline.hh 2026-04-17 19:08:13.000000000 +0000 @@ -69,6 +69,7 @@ HB_INTERNAL void replay (hb_draw_funcs_t *pen, void *pen_data) const; HB_INTERNAL float control_area () const; + HB_INTERNAL void translate (float dx, float dy); HB_INTERNAL void slant (float slant_xy); HB_INTERNAL void embolden (float x_strength, float y_strength, float x_shift, float y_shift); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.cc 2026-04-17 19:08:13.000000000 +0000 @@ -49,7 +49,7 @@ { hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; - c->push_transform (hb_transform_t {xx, yx, xy, yy, dx, dy}); + c->push_transform (hb_transform_t<> {xx, yx, xy, yy, dx, dy}); } static void @@ -71,7 +71,7 @@ { hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; - hb_extents_t extents; + hb_extents_t<> extents; hb_draw_funcs_t *draw_extent_funcs = hb_draw_extents_get_funcs (); hb_font_draw_glyph (font, glyph, draw_extent_funcs, &extents); c->push_clip (extents); @@ -85,7 +85,7 @@ { hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; - hb_extents_t extents = {xmin, ymin, xmax, ymax}; + hb_extents_t<> extents = {xmin, ymin, xmax, ymax}; c->push_clip (extents); } @@ -136,10 +136,10 @@ if (!glyph_extents) return false; // Happens with SVG images. - hb_extents_t extents = {(float) glyph_extents->x_bearing, - (float) glyph_extents->y_bearing + glyph_extents->height, - (float) glyph_extents->x_bearing + glyph_extents->width, - (float) glyph_extents->y_bearing}; + hb_extents_t<> extents = {(float) glyph_extents->x_bearing, + (float) glyph_extents->y_bearing + glyph_extents->height, + (float) glyph_extents->x_bearing + glyph_extents->width, + (float) glyph_extents->y_bearing}; c->push_clip (extents); c->paint (); c->pop_clip (); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-paint-extents.hh 2026-04-17 19:08:13.000000000 +0000 @@ -41,9 +41,9 @@ clips.clear (); groups.clear (); - transforms.push (hb_transform_t{}); - clips.push (hb_bounds_t{hb_bounds_t::UNBOUNDED}); - groups.push (hb_bounds_t{hb_bounds_t::EMPTY}); + transforms.push (hb_transform_t<>{}); + clips.push (hb_bounds_t<>{hb_bounds_t<>::UNBOUNDED}); + groups.push (hb_bounds_t<>{hb_bounds_t<>::EMPTY}); } hb_paint_extents_context_t () @@ -51,19 +51,19 @@ clear (); } - hb_extents_t get_extents () + hb_extents_t<> get_extents () { return groups.tail().extents; } bool is_bounded () { - return groups.tail().status != hb_bounds_t::UNBOUNDED; + return groups.tail().status != hb_bounds_t<>::UNBOUNDED; } - void push_transform (const hb_transform_t &trans) + void push_transform (const hb_transform_t<> &trans) { - hb_transform_t t = transforms.tail (); + hb_transform_t<> t = transforms.tail (); t.multiply (trans); transforms.push (t); } @@ -73,13 +73,13 @@ transforms.pop (); } - void push_clip (hb_extents_t extents) + void push_clip (hb_extents_t<> extents) { /* Transform extents and push a new clip. */ - const hb_transform_t &t = transforms.tail (); + const hb_transform_t<> &t = transforms.tail (); t.transform_extents (extents); - auto bounds = hb_bounds_t {extents}; + auto bounds = hb_bounds_t<> {extents}; bounds.intersect (clips.tail ()); clips.push (bounds); @@ -92,19 +92,19 @@ void push_group () { - groups.push (hb_bounds_t {hb_bounds_t::EMPTY}); + groups.push (hb_bounds_t<> {hb_bounds_t<>::EMPTY}); } void pop_group (hb_paint_composite_mode_t mode) { - const hb_bounds_t src_bounds = groups.pop (); - hb_bounds_t &backdrop_bounds = groups.tail (); + const hb_bounds_t<> src_bounds = groups.pop (); + hb_bounds_t<> &backdrop_bounds = groups.tail (); // https://learn.microsoft.com/en-us/typography/opentype/spec/colr#format-32-paintcomposite switch ((int) mode) { case HB_PAINT_COMPOSITE_MODE_CLEAR: - backdrop_bounds.status = hb_bounds_t::EMPTY; + backdrop_bounds.status = hb_bounds_t<>::EMPTY; break; case HB_PAINT_COMPOSITE_MODE_SRC: case HB_PAINT_COMPOSITE_MODE_SRC_OUT: @@ -125,16 +125,16 @@ void paint () { - const hb_bounds_t &clip = clips.tail (); - hb_bounds_t &group = groups.tail (); + const hb_bounds_t<> &clip = clips.tail (); + hb_bounds_t<> &group = groups.tail (); group.union_ (clip); } protected: - hb_vector_t<hb_transform_t> transforms; - hb_vector_t<hb_bounds_t> clips; - hb_vector_t<hb_bounds_t> groups; + hb_vector_t<hb_transform_t<>> transforms; + hb_vector_t<hb_bounds_t<>> clips; + hb_vector_t<hb_bounds_t<>> groups; }; HB_INTERNAL hb_paint_funcs_t * diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-paint.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-paint.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-paint.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-paint.hh 2026-04-17 19:08:13.000000000 +0000 @@ -28,6 +28,7 @@ #include "hb.hh" #include "hb-face.hh" #include "hb-font.hh" +#include "hb-geometry.hh" #define HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS \ HB_PAINT_FUNC_IMPLEMENT (push_transform) \ @@ -72,7 +73,11 @@ float xx, float yx, float xy, float yy, float dx, float dy) - { func.push_transform (this, paint_data, + { + // Handle -0.f to avoid -0.f == 0.f in the transform matrix. + if (dx == -0.f) dx = 0.f; + if (dy == -0.f) dy = 0.f; + func.push_transform (this, paint_data, xx, yx, xy, yy, dx, dy, !user_data ? nullptr : user_data->push_transform); } void pop_transform (void *paint_data) @@ -182,54 +187,59 @@ 0, 0); } - HB_NODISCARD - bool push_translate (void *paint_data, - float dx, float dy) + void push_transform (void *paint_data, hb_transform_t<float> t) { - if (!dx && !dy) - return false; + push_transform (paint_data, t.xx, t.yx, t.xy, t.yy, t.x0, t.y0); + } + void push_translate (void *paint_data, + float dx, float dy) + { push_transform (paint_data, - 1.f, 0.f, 0.f, 1.f, dx, dy); - return true; + hb_transform_t<float>::translation (dx, dy)); } - HB_NODISCARD - bool push_scale (void *paint_data, + void push_scale (void *paint_data, float sx, float sy) { - if (sx == 1.f && sy == 1.f) - return false; - push_transform (paint_data, - sx, 0.f, 0.f, sy, 0.f, 0.f); - return true; + hb_transform_t<float>::scaling (sx, sy)); + } + void push_scale_around_center (void *paint_data, + float sx, float sy, + float cx, float cy) + { + push_transform (paint_data, + hb_transform_t<float>::scaling_around_center (sx, sy, cx, cy)); } - HB_NODISCARD - bool push_rotate (void *paint_data, + void push_rotate (void *paint_data, float a) { - if (!a) - return false; + push_transform (paint_data, + hb_transform_t<float>::rotation (a * HB_PI)); + } - float cc = cosf (a * HB_PI); - float ss = sinf (a * HB_PI); - push_transform (paint_data, cc, ss, -ss, cc, 0.f, 0.f); - return true; + void push_rotate_around_center (void *paint_data, + float a, + float cx, float cy) + { + push_transform (paint_data, + hb_transform_t<float>::rotation_around_center (a * HB_PI, cx, cy)); } - HB_NODISCARD - bool push_skew (void *paint_data, + void push_skew (void *paint_data, float sx, float sy) { - if (!sx && !sy) - return false; - - float x = tanf (-sx * HB_PI); - float y = tanf (+sy * HB_PI); - push_transform (paint_data, 1.f, y, x, 1.f, 0.f, 0.f); - return true; + push_transform (paint_data, + hb_transform_t<float>::skewing (-sx * HB_PI, sy * HB_PI)); + } + void push_skew_around_center (void *paint_data, + float sx, float sy, + float cx, float cy) + { + push_transform (paint_data, + hb_transform_t<float>::skewing_around_center (-sx * HB_PI, sy * HB_PI, cx, cy)); } }; DECLARE_NULL_INSTANCE (hb_paint_funcs_t); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-pool.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-pool.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-pool.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-pool.hh 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -/* - * Copyright © 2019 Facebook, Inc. - * - * This is part of HarfBuzz, a text shaping library. - * - * 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. - * - * Facebook Author(s): Behdad Esfahbod - */ - -#ifndef HB_POOL_HH -#define HB_POOL_HH - -#include "hb.hh" - -/* Memory pool for persistent allocation of small objects. - * - * Some AI musings on this, not necessarily true: - * - * This is a very simple implementation, but it's good enough for our - * purposes. It's not thread-safe. It's not very fast. It's not - * very memory efficient. It's not very cache efficient. It's not - * very anything efficient. But it's simple and it works. And it's - * good enough for our purposes. If you need something more - * sophisticated, use a real allocator. Or use a real language. */ - -template <typename T, unsigned ChunkLen = 32> -struct hb_pool_t -{ - hb_pool_t () : next (nullptr) {} - ~hb_pool_t () - { - next = nullptr; - - + hb_iter (chunks) - | hb_apply (hb_free) - ; - } - - T* alloc () - { - if (unlikely (!next)) - { - if (unlikely (!chunks.alloc (chunks.length + 1))) return nullptr; - chunk_t *chunk = (chunk_t *) hb_malloc (sizeof (chunk_t)); - if (unlikely (!chunk)) return nullptr; - chunks.push (chunk); - next = chunk->thread (); - } - - T* obj = next; - next = * ((T**) next); - - hb_memset (obj, 0, sizeof (T)); - - return obj; - } - - void release (T* obj) - { - * (T**) obj = next; - next = obj; - } - - private: - - static_assert (ChunkLen > 1, ""); - static_assert (sizeof (T) >= sizeof (void *), ""); - static_assert (alignof (T) % alignof (void *) == 0, ""); - - struct chunk_t - { - T* thread () - { - for (unsigned i = 0; i < ARRAY_LENGTH (arrayZ) - 1; i++) - * (T**) &arrayZ[i] = &arrayZ[i + 1]; - - * (T**) &arrayZ[ARRAY_LENGTH (arrayZ) - 1] = nullptr; - - return arrayZ; - } - - T arrayZ[ChunkLen]; - }; - - T* next; - hb_vector_t<chunk_t *> chunks; -}; - - -#endif /* HB_POOL_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-priority-queue.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-priority-queue.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-priority-queue.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-priority-queue.hh 2026-04-17 19:08:13.000000000 +0000 @@ -45,12 +45,22 @@ template <typename K> struct hb_priority_queue_t { - private: + public: typedef hb_pair_t<K, unsigned> item_t; + + private: hb_vector_t<item_t> heap; public: + hb_priority_queue_t () = default; + hb_priority_queue_t (hb_vector_t<item_t>&& other) : heap (std::move (other)) + { + // Heapify the vector. + for (int i = (heap.length / 2) - 1; i >= 0; i--) + bubble_down (i); + } + void reset () { heap.resize (0); } bool in_error () const { return heap.in_error (); } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-repacker.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-repacker.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-repacker.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-repacker.hh 2026-04-17 19:08:13.000000000 +0000 @@ -217,11 +217,17 @@ unsigned maximum_to_move = hb_max ((sorted_graph.num_roots_for_space (space) / 2u), 1u); if (roots_to_isolate.get_population () > maximum_to_move) { // Only move at most half of the roots in a space at a time. - unsigned extra = roots_to_isolate.get_population () - maximum_to_move; - while (extra--) { - uint32_t root = HB_SET_VALUE_INVALID; - roots_to_isolate.previous (&root); - roots_to_isolate.del (root); + // + // Note: this was ported from non-stable ids to stable ids. So to retain the same behaviour + // with regards to which roots are removed from the set we need to remove them in the topological + // order, not the object id order. + int extra = roots_to_isolate.get_population () - maximum_to_move; + for (unsigned id : sorted_graph.ordering_) { + if (!extra) break; + if (roots_to_isolate.has(id)) { + roots_to_isolate.del(id); + extra--; + } } } @@ -266,7 +272,7 @@ result = sorted_graph.duplicate(&parents, r.child); } - if (result == (unsigned) -1) return result; + if (result == (unsigned) -1) return false; if (parents.get_population() > 1) { // If the duplicated node has more than one parent pre-emptively raise it's priority to the maximum. @@ -283,7 +289,7 @@ sorted_graph.vertices_[result].give_max_priority(); } - return result; + return true; } static inline @@ -302,8 +308,11 @@ { // The child object is shared, we may be able to eliminate the overflow // by duplicating it. - if (!_resolve_shared_overflow(overflows, i, sorted_graph)) continue; - return true; + if (_resolve_shared_overflow(overflows, i, sorted_graph)) + return true; + + // Sometimes we can't duplicate a node which looks shared because it's not actually shared + // (eg. all links from the same parent) in this case continue on to other resolution options. } if (child.is_leaf () && !priority_bumped_parents.has (r.parent)) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-sanitize.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-sanitize.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-sanitize.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-sanitize.hh 2026-04-17 19:08:13.000000000 +0000 @@ -64,9 +64,6 @@ * * - Cast blob content to T*, call sanitize() method of it, * - If sanitize succeeded, return blob. - * - Otherwise, if blob is not writable, try making it writable, - * or copy if cannot be made writable in-place, - * - Call sanitize() again. Return blob if sanitize succeeded. * - Return empty blob otherwise. * * @@ -98,6 +95,12 @@ * structure is so complicated that by checking all offsets at sanitize() time, * we make the code much simpler in other methods, as offsets and referenced * objects do not need to be validated at each use site. + * + * Note: + * Sanitize was named so because it used to try to recover from errors by + * modifying the data to make it valid. This is no longer the case, as it + * could make HarfBuzz hallucinate new rules if there was aliasing in the + * data. However, the name stuck. See: https://behdad.github.io/harfbust/ */ /* This limits sanitizing time on really broken fonts. */ @@ -120,12 +123,12 @@ struct hb_sanitize_context_t : hb_dispatch_context_t<hb_sanitize_context_t, bool, HB_DEBUG_SANITIZE> { - hb_sanitize_context_t () : - start (nullptr), end (nullptr), + hb_sanitize_context_t (const char *start_ = nullptr, const char *end_ = nullptr) : + start (start_), end (end_), length (0), max_ops (0), max_subtables (0), recursion_depth (0), - writable (false), edit_count (0), + writable (false), blob (nullptr), num_glyphs (65536), num_glyphs_set (false), @@ -212,14 +215,22 @@ void reset_object () { - this->start = this->blob->data; - this->end = this->start + this->blob->length; + if (this->blob) + { + this->start = this->blob->data; + this->end = this->start + this->blob->length; + } this->length = this->end - this->start; assert (this->start <= this->end); /* Must not overflow. */ } - void start_processing () + void start_processing (const char *start_ = nullptr, const char *end_ = nullptr) { + if (start_) + { + this->start = start_; + this->end = end_; + } reset_object (); unsigned m; if (unlikely (hb_unsigned_mul_overflows (this->end - this->start, HB_SANITIZE_MAX_OPS_FACTOR, &m))) @@ -228,7 +239,6 @@ this->max_ops = hb_clamp (m, (unsigned) HB_SANITIZE_MAX_OPS_MIN, (unsigned) HB_SANITIZE_MAX_OPS_MAX); - this->edit_count = 0; this->debug_depth = 0; this->recursion_depth = 0; @@ -241,8 +251,8 @@ void end_processing () { DEBUG_MSG_LEVEL (SANITIZE, this->start, 0, -1, - "end [%p..%p] %u edit requests", - this->start, this->end, this->edit_count); + "end [%p..%p]", + this->start, this->end); hb_blob_destroy (this->blob); this->blob = nullptr; @@ -250,9 +260,6 @@ this->length = 0; } - unsigned get_edit_count () { return edit_count; } - - bool check_ops(unsigned count) { /* Avoid underflow */ @@ -396,35 +403,6 @@ return likely (this->check_point ((const char *) obj + obj->min_size)); } - bool may_edit (const void *base, unsigned int len) - { - if (this->edit_count >= HB_SANITIZE_MAX_EDITS) - return false; - - const char *p = (const char *) base; - this->edit_count++; - - DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, - "may_edit(%u) [%p..%p] (%u bytes) in [%p..%p] -> %s", - this->edit_count, - p, p + len, len, - this->start, this->end, - this->writable ? "GRANTED" : "DENIED"); - - return this->writable; - } - - template <typename Type, typename ValueType> - bool try_set (const Type *obj, const ValueType &v) - { - if (this->may_edit (obj, hb_static_size (Type))) - { - * const_cast<Type *> (obj) = v; - return true; - } - return false; - } - template <typename Type> hb_blob_t *sanitize_blob (hb_blob_t *blob) { @@ -432,7 +410,6 @@ init (blob); - retry: DEBUG_MSG_FUNC (SANITIZE, start, "start"); start_processing (); @@ -446,36 +423,6 @@ Type *t = reinterpret_cast<Type *> (const_cast<char *> (start)); sane = t->sanitize (this); - if (sane) - { - if (edit_count) - { - DEBUG_MSG_FUNC (SANITIZE, start, "passed first round with %u edits; going for second round", edit_count); - - /* sanitize again to ensure no toe-stepping */ - edit_count = 0; - sane = t->sanitize (this); - if (edit_count) { - DEBUG_MSG_FUNC (SANITIZE, start, "requested %u edits in second round; FAILING", edit_count); - sane = false; - } - } - } - else - { - if (edit_count && !writable) { - start = hb_blob_get_data_writable (blob, nullptr); - end = start + blob->length; - - if (start) - { - writable = true; - /* ok, we made it writable by relocating. try again */ - DEBUG_MSG_FUNC (SANITIZE, start, "retry"); - goto retry; - } - } - } end_processing (); @@ -506,7 +453,6 @@ private: int recursion_depth; bool writable; - unsigned int edit_count; hb_blob_t *blob; unsigned int num_glyphs; bool num_glyphs_set; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-script-list.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-script-list.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-script-list.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-script-list.h 2026-04-17 19:08:13.000000000 +0000 @@ -223,6 +223,10 @@ * @HB_SCRIPT_SUNUWAR: `Sunu`, Since: 10.0.0 * @HB_SCRIPT_TODHRI: `Todr`, Since: 10.0.0 * @HB_SCRIPT_TULU_TIGALARI: `Tutg`, Since: 10.0.0 + * @HB_SCRIPT_BERIA_ERFE: `Berf`, Since: 11.5.0 + * @HB_SCRIPT_SIDETIC: `Sidt`, Since: 11.5.0 + * @HB_SCRIPT_TAI_YO: `Tayo`, Since: 11.5.0 + * @HB_SCRIPT_TOLONG_SIKI: `Tols`, Since: 11.5.0 * @HB_SCRIPT_INVALID: No script set * * Data type for scripts. Each #hb_script_t's value is an #hb_tag_t corresponding @@ -461,6 +465,14 @@ HB_SCRIPT_TODHRI = HB_TAG ('T','o','d','r'), /*16.0*/ HB_SCRIPT_TULU_TIGALARI = HB_TAG ('T','u','t','g'), /*16.0*/ + /* + * Since 11.5.0 + */ + HB_SCRIPT_BERIA_ERFE = HB_TAG ('B','e','r','f'), /*17.0*/ + HB_SCRIPT_SIDETIC = HB_TAG ('S','i','d','t'), /*17.0*/ + HB_SCRIPT_TAI_YO = HB_TAG ('T','a','y','o'), /*17.0*/ + HB_SCRIPT_TOLONG_SIKI = HB_TAG ('T','o','l','s'), /*17.0*/ + /* No script set. */ HB_SCRIPT_INVALID = HB_TAG_NONE, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-serialize.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-serialize.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-serialize.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-serialize.hh 2026-04-17 19:08:13.000000000 +0000 @@ -34,7 +34,7 @@ #include "hb.hh" #include "hb-blob.hh" #include "hb-map.hh" -#include "hb-pool.hh" +#include "hb-free-pool.hh" #include "hb-subset-serialize.h" @@ -724,7 +724,7 @@ hb_requires (hb_is_iterator (Iterator)), typename ...Ts> void copy_all (Iterator it, Ts&&... ds) - { for (decltype (*it) _ : it) copy (_, std::forward<Ts> (ds)...); } + { for (decltype (*it) _ : it) copy (_, ds...); } template <typename Type> hb_serialize_context_t& operator << (const Type &obj) & { embed (obj); return *this; } @@ -794,7 +794,8 @@ template <typename T, unsigned Size = sizeof (T)> void assign_offset (const object_t* parent, const object_t::link_t &link, unsigned offset) { - auto &off = * ((BEInt<T, Size> *) (parent->head + link.position)); + // XXX We should stop assuming big-endian! + auto &off = * ((HBInt<true, T, Size> *) (parent->head + link.position)); assert (0 == off); check_assign (off, offset, HB_SERIALIZE_ERROR_OFFSET_OVERFLOW); } @@ -814,7 +815,7 @@ } /* Object memory pool. */ - hb_pool_t<object_t> object_pool; + hb_free_pool_t<object_t> object_pool; /* Stack of currently under construction objects. */ object_t *current; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-set-digest.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-set-digest.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-set-digest.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-set-digest.hh 2026-04-17 19:08:13.000000000 +0000 @@ -55,11 +55,11 @@ * - For each glyph, if it doesn't match the subtable digest, * skip it. * - * The main filter we use is a combination of four bits-pattern + * The filter we use is a combination of three bits-pattern * filters. A bits-pattern filter checks a number of bits (5 or 6) - * of the input number (glyph-id in this case) and checks whether + * of the input number (glyph-id in most cases) and checks whether * its pattern is amongst the patterns of any of the accepted values. - * The accepted patterns are represented as a "long" integer. The + * The accepted patterns are represented as a "long" integer. Each * check is done using four bitwise operations only. */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-shape.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-shape.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-shape.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-shape.cc 2026-04-17 19:08:13.000000000 +0000 @@ -149,14 +149,11 @@ hb_bool_t res = hb_shape_plan_execute (shape_plan, font, buffer, features, num_features); - if (buffer->max_ops <= 0) - buffer->shaping_failed = true; - hb_shape_plan_destroy (shape_plan); if (text_buffer) { - if (res && buffer->successful && !buffer->shaping_failed + if (res && buffer->successful && text_buffer->successful && !buffer->verify (text_buffer, font, @@ -199,6 +196,7 @@ #ifdef HB_EXPERIMENTAL_API +#ifndef HB_NO_VAR static float buffer_advance (hb_buffer_t *buffer) @@ -440,7 +438,7 @@ return true; } - +#endif #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-shaper-list.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-shaper-list.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-shaper-list.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-shaper-list.hh 2026-04-17 19:08:13.000000000 +0000 @@ -57,6 +57,14 @@ HB_SHAPER_IMPLEMENT (coretext) #endif +#ifdef HAVE_HARFRUST +HB_SHAPER_IMPLEMENT (harfrust) +#endif + +#ifdef HAVE_KBTS +HB_SHAPER_IMPLEMENT (kbts) +#endif + #ifndef HB_NO_FALLBACK_SHAPE HB_SHAPER_IMPLEMENT (fallback) /* <--- This should be last. */ #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-static.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-static.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-static.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-static.cc 2026-04-17 19:08:13.000000000 +0000 @@ -113,27 +113,4 @@ return ret; } - -#ifndef HB_NO_VAR -bool -_glyf_get_leading_bearing_with_var_unscaled (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical, - int *lsb) -{ - return font->face->table.glyf->get_leading_bearing_with_var_unscaled (font, glyph, is_vertical, lsb); -} - -unsigned -_glyf_get_advance_with_var_unscaled (hb_font_t *font, hb_codepoint_t glyph, bool is_vertical) -{ - return font->face->table.glyf->get_advance_with_var_unscaled (font, glyph, is_vertical); -} -#endif - -bool -_glyf_get_leading_bearing_without_var_unscaled (hb_face_t *face, hb_codepoint_t gid, bool is_vertical, int *lsb) -{ - return face->table.glyf->get_leading_bearing_without_var_unscaled (gid, is_vertical, lsb); -} - - #endif diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-string-array.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-string-array.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-string-array.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-string-array.hh 2026-04-17 19:08:13.000000000 +0000 @@ -45,25 +45,25 @@ * but C++ does not allow that. * https://stackoverflow.com/q/28433862 */ -#define _S(s) char HB_PASTE (str, __LINE__)[sizeof (s)]; +#define HB_STR(s) char HB_PASTE (str, __LINE__)[sizeof (s)]; #include HB_STRING_ARRAY_LIST -#undef _S +#undef HB_STR } st; char str[HB_VAR_ARRAY]; } HB_STRING_ARRAY_POOL_NAME = { { -#define _S(s) s, +#define HB_STR(s) s, #include HB_STRING_ARRAY_LIST -#undef _S +#undef HB_STR } }; static const unsigned int HB_STRING_ARRAY_OFFS_NAME[] = { -#define _S(s) offsetof (union HB_STRING_ARRAY_TYPE_NAME, st.HB_PASTE(str, __LINE__)), +#define HB_STR(s) offsetof (union HB_STRING_ARRAY_TYPE_NAME, st.HB_PASTE(str, __LINE__)), #include HB_STRING_ARRAY_LIST -#undef _S +#undef HB_STR sizeof (HB_STRING_ARRAY_TYPE_NAME) }; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-cff-common.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-cff-common.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-cff-common.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-cff-common.hh 2026-04-17 19:08:13.000000000 +0000 @@ -861,8 +861,7 @@ { // Hack to point vector to static string. auto &b = buffArray.arrayZ[last]; - b.length = 1; - b.arrayZ = const_cast<unsigned char *>(endchar_str); + b.set_storage (const_cast<unsigned char *>(endchar_str), 1); } last++; // Skip over gid @@ -877,8 +876,7 @@ { // Hack to point vector to static string. auto &b = buffArray.arrayZ[last]; - b.length = 1; - b.arrayZ = const_cast<unsigned char *>(endchar_str); + b.set_storage (const_cast<unsigned char *>(endchar_str), 1); } return true; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-iup.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-iup.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-iup.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-iup.hh 2026-04-17 19:08:13.000000000 +0000 @@ -26,12 +26,27 @@ #define HB_SUBSET_INSTANCER_IUP_HH #include "hb-subset-plan.hh" + +struct iup_scratch_t +{ + hb_vector_t<unsigned> end_points; + hb_vector_t<double> interp_x_deltas; + hb_vector_t<double> interp_y_deltas; + hb_vector_t<unsigned> costs; + hb_vector_t<int> chain; + hb_vector_t<bool> rot_indices; + hb_vector_t<int> rot_x_deltas; + hb_vector_t<int> rot_y_deltas; + contour_point_vector_t rot_points; +}; + /* given contour points and deltas, optimize a set of referenced points within error * tolerance. Returns optimized referenced point indices */ HB_INTERNAL bool iup_delta_optimize (const contour_point_vector_t& contour_points, const hb_vector_t<int>& x_deltas, const hb_vector_t<int>& y_deltas, hb_vector_t<bool>& opt_indices, /* OUT */ + iup_scratch_t &scratch, double tolerance = 0.0); #endif /* HB_SUBSET_INSTANCER_IUP_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.cc 2026-04-17 19:08:13.000000000 +0000 @@ -62,9 +62,10 @@ return (end - coord) / (end - peak); } -static inline rebase_tent_result_t -_solve (Triple tent, Triple axisLimit, bool negative = false) +static inline void +_solve (Triple tent, Triple axisLimit, rebase_tent_result_t &out, bool negative = false) { + out.reset(); double axisMin = axisLimit.minimum; double axisDef = axisLimit.middle; double axisMax = axisLimit.maximum; @@ -75,14 +76,12 @@ // Mirror the problem such that axisDef <= peak if (axisDef > peak) { - rebase_tent_result_t vec = _solve (_reverse_negate (tent), - _reverse_negate (axisLimit), - !negative); + _solve (_reverse_negate (tent), _reverse_negate (axisLimit), out, !negative); - for (auto &p : vec) + for (auto &p : out) p = hb_pair (p.first, _reverse_negate (p.second)); - return vec; + return; } // axisDef <= peak @@ -98,7 +97,7 @@ * axisMin axisDef axisMax lower upper */ if (axisMax <= lower && axisMax < peak) - return rebase_tent_result_t{}; // No overlap + return; // No overlap /* case 2: Only the peak and outermost bound fall outside the new limit; * we keep the deltaset, update peak and outermost bound and scale deltas @@ -133,18 +132,18 @@ double mult = supportScalar (axisMax, tent); tent = Triple{lower, axisMax, axisMax}; - rebase_tent_result_t vec = _solve (tent, axisLimit); + _solve (tent, axisLimit, out); - for (auto &p : vec) + for (auto &p : out) p = hb_pair (p.first * mult, p.second); - return vec; + return; } // lower <= axisDef <= peak <= axisMax double gain = supportScalar (axisDef, tent); - rebase_tent_result_t out {hb_pair (gain, Triple{})}; + out.push(hb_pair (gain, Triple{})); // First, the positive side @@ -362,8 +361,6 @@ out.push (hb_pair (scalar1 - gain, loc1)); out.push (hb_pair (scalar2 - gain, loc2)); } - - return out; } static inline TripleDistances _reverse_triple_distances (const TripleDistances &v) @@ -405,18 +402,21 @@ return (-v_distance) /total_distance; } -rebase_tent_result_t -rebase_tent (Triple tent, Triple axisLimit, TripleDistances axis_triple_distances) +void +rebase_tent (Triple tent, Triple axisLimit, TripleDistances axis_triple_distances, + rebase_tent_result_t &out, + rebase_tent_result_t &scratch) { assert (-1.0 <= axisLimit.minimum && axisLimit.minimum <= axisLimit.middle && axisLimit.middle <= axisLimit.maximum && axisLimit.maximum <= +1.0); assert (-2.0 <= tent.minimum && tent.minimum <= tent.middle && tent.middle <= tent.maximum && tent.maximum <= +2.0); assert (tent.middle != 0.0); - rebase_tent_result_t sols = _solve (tent, axisLimit); + rebase_tent_result_t &sols = scratch; + _solve (tent, axisLimit, sols); auto n = [&axisLimit, &axis_triple_distances] (double v) { return renormalizeValue (v, axisLimit, axis_triple_distances); }; - rebase_tent_result_t out; + out.reset(); for (auto &p : sols) { if (!p.first) continue; @@ -429,6 +429,4 @@ out.push (hb_pair (p.first, Triple{n (t.minimum), n (t.middle), n (t.maximum)})); } - - return out; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-instancer-solver.hh 2026-04-17 19:08:13.000000000 +0000 @@ -42,10 +42,9 @@ double positive; }; -struct Triple { - - Triple () : - minimum (0.0), middle (0.0), maximum (0.0) {} +struct Triple +{ + Triple () = default; Triple (double minimum_, double middle_, double maximum_) : minimum (minimum_), middle (middle_), maximum (maximum_) {} @@ -81,10 +80,9 @@ return current; } - - double minimum; - double middle; - double maximum; + double minimum = 0; + double middle = 0; + double maximum = 0; }; using rebase_tent_result_item_t = hb_pair_t<double, Triple>; @@ -107,8 +105,10 @@ * If tent value is Triple{}, that is a special deltaset that should * be always-enabled (called "gain"). */ -HB_INTERNAL rebase_tent_result_t rebase_tent (Triple tent, - Triple axisLimit, - TripleDistances axis_triple_distances); +HB_INTERNAL void rebase_tent (Triple tent, + Triple axisLimit, + TripleDistances axis_triple_distances, + rebase_tent_result_t &out, + rebase_tent_result_t &scratch); #endif /* HB_SUBSET_INSTANCER_SOLVER_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-plan-member-list.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-plan-member-list.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-plan-member-list.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-plan-member-list.hh 2026-04-17 19:08:13.000000000 +0000 @@ -81,6 +81,10 @@ HB_SUBSET_PLAN_MEMBER (hb_map_t, gsub_features) HB_SUBSET_PLAN_MEMBER (hb_map_t, gpos_features) +//active features(with duplicates) old index -> new index mapping +HB_SUBSET_PLAN_MEMBER (hb_map_t, gsub_features_w_duplicates) +HB_SUBSET_PLAN_MEMBER (hb_map_t, gpos_features_w_duplicates) + //active feature variation records/condition index with variations HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(<unsigned, hb::shared_ptr<hb_set_t>>), gsub_feature_record_cond_idx_map) HB_SUBSET_PLAN_MEMBER (hb_hashmap_t E(<unsigned, hb::shared_ptr<hb_set_t>>), gpos_feature_record_cond_idx_map) diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.cc 2026-04-17 19:08:13.000000000 +0000 @@ -418,7 +418,8 @@ hb_set_t* drop_tables) { #ifndef HB_NO_STYLE - plan->source->table.STAT->collect_name_ids (&plan->user_axes_location, &plan->name_ids); + if (!drop_tables->has (HB_OT_TAG_STAT)) + plan->source->table.STAT->collect_name_ids (&plan->user_axes_location, &plan->name_ids); #endif #ifndef HB_NO_VAR if (!plan->all_axes_pinned) @@ -676,7 +677,8 @@ return; #ifndef HB_NO_VAR - normalize_axes_location (face, this); + if (!check_success (normalize_axes_location (face, this))) + return; #endif _populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, this); @@ -697,6 +699,15 @@ return; } +#ifdef HB_EXPERIMENTAL_API + if ((input->flags & HB_SUBSET_FLAGS_RETAIN_GIDS) && + (input->flags & HB_SUBSET_FLAGS_RETAIN_NUM_GLYPHS)) { + // We've been requested to maintain the num glyphs count from the + // input face. + _num_output_glyphs = source->get_num_glyphs (); + } +#endif + _create_glyph_map_gsub ( &_glyphset_gsub, glyph_map, @@ -710,10 +721,10 @@ glyph_map->get(unicode_to_new_gid_list.arrayZ[i].second); } - bounds_width_vec.resize (_num_output_glyphs, false); + bounds_width_vec.resize_dirty (_num_output_glyphs); for (auto &v : bounds_width_vec) v = 0xFFFFFFFF; - bounds_height_vec.resize (_num_output_glyphs, false); + bounds_height_vec.resize_dirty (_num_output_glyphs); for (auto &v : bounds_height_vec) v = 0xFFFFFFFF; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset-plan.hh 2026-04-17 19:08:13.000000000 +0000 @@ -300,6 +300,7 @@ // compile times more reasonable: // - hb-subset-plan.cc // - hb-subset-plan-layout.cc +// - hb-subset-plan-var.cc // // The functions below are those needed to connect the split files // above together. @@ -332,7 +333,7 @@ unsigned subtable_count, hb_vector_t<hb_inc_bimap_t> &inner_maps /* OUT */); -HB_INTERNAL void +HB_INTERNAL bool normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan); HB_INTERNAL void diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset.cc openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset.cc --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset.cc 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset.cc 2026-04-17 19:08:13.000000000 +0000 @@ -25,65 +25,19 @@ */ #include "hb.hh" + #include "hb-open-type.hh" +#include "hb-open-file.hh" #include "hb-subset.hh" +#include "hb-subset-table.hh" +#include "hb-subset-accelerator.hh" -#include "hb-open-file.hh" #include "hb-ot-cmap-table.hh" -#include "hb-ot-glyf-table.hh" -#include "hb-ot-hdmx-table.hh" -#include "hb-ot-head-table.hh" -#include "hb-ot-hhea-table.hh" -#include "hb-ot-hmtx-table.hh" -#include "hb-ot-maxp-table.hh" -#include "OT/Color/CBDT/CBDT.hh" -#include "OT/Color/COLR/COLR.hh" -#include "OT/Color/CPAL/CPAL.hh" -#include "OT/Color/sbix/sbix.hh" -#include "hb-ot-os2-table.hh" -#include "hb-ot-post-table.hh" -#include "hb-ot-post-table-v2subset.hh" -#include "hb-ot-cff1-table.hh" -#include "hb-ot-cff2-table.hh" -#include "hb-ot-vorg-table.hh" -#include "hb-ot-name-table.hh" -#include "hb-ot-layout-base-table.hh" -#include "hb-ot-layout-gsub-table.hh" -#include "hb-ot-layout-gpos-table.hh" -#include "hb-ot-var-avar-table.hh" #include "hb-ot-var-cvar-table.hh" -#include "hb-ot-var-fvar-table.hh" -#include "hb-ot-var-gvar-table.hh" -#include "hb-ot-var-hvar-table.hh" -#include "hb-ot-var-mvar-table.hh" -#include "hb-ot-math-table.hh" +#include "hb-ot-head-table.hh" #include "hb-ot-stat-table.hh" -#include "hb-repacker.hh" -#include "hb-subset-accelerator.hh" - -using OT::Layout::GSUB; -using OT::Layout::GPOS; - - -#ifndef HB_NO_SUBSET_CFF -template<> -struct hb_subset_plan_t::source_table_loader<const OT::cff1> -{ - auto operator () (hb_subset_plan_t *plan) - HB_AUTO_RETURN (plan->accelerator ? plan->accelerator->cff1_accel : - plan->inprogress_accelerator ? plan->inprogress_accelerator->cff1_accel : - plan->cff1_accel) -}; -template<> -struct hb_subset_plan_t::source_table_loader<const OT::cff2> -{ - auto operator () (hb_subset_plan_t *plan) - HB_AUTO_RETURN (plan->accelerator ? plan->accelerator->cff2_accel : - plan->inprogress_accelerator ? plan->inprogress_accelerator->cff2_accel : - plan->cff2_accel) -}; -#endif +#include "hb-ot-post-table-v2subset.hh" /** @@ -116,56 +70,56 @@ * if we are unable to list the tables in a face. */ static hb_tag_t known_tables[] { - HB_TAG ('a', 'v', 'a', 'r'), - HB_OT_TAG_BASE, - HB_OT_TAG_CBDT, - HB_OT_TAG_CBLC, - HB_OT_TAG_CFF1, - HB_OT_TAG_CFF2, - HB_OT_TAG_cmap, - HB_OT_TAG_COLR, - HB_OT_TAG_CPAL, - HB_TAG ('c', 'v', 'a', 'r'), - HB_TAG ('c', 'v', 't', ' '), - HB_TAG ('D', 'S', 'I', 'G'), - HB_TAG ('E', 'B', 'D', 'T'), - HB_TAG ('E', 'B', 'L', 'C'), - HB_TAG ('E', 'B', 'S', 'C'), - HB_TAG ('f', 'p', 'g', 'm'), - HB_TAG ('f', 'v', 'a', 'r'), - HB_TAG ('g', 'a', 's', 'p'), - HB_OT_TAG_GDEF, - HB_OT_TAG_glyf, - HB_OT_TAG_GPOS, - HB_OT_TAG_GSUB, - HB_OT_TAG_gvar, - HB_OT_TAG_hdmx, - HB_OT_TAG_head, - HB_OT_TAG_hhea, - HB_OT_TAG_hmtx, - HB_OT_TAG_HVAR, - HB_OT_TAG_JSTF, - HB_TAG ('k', 'e', 'r', 'n'), - HB_OT_TAG_loca, - HB_TAG ('L', 'T', 'S', 'H'), - HB_OT_TAG_MATH, - HB_OT_TAG_maxp, - HB_TAG ('M', 'E', 'R', 'G'), - HB_TAG ('m', 'e', 't', 'a'), - HB_TAG ('M', 'V', 'A', 'R'), - HB_TAG ('P', 'C', 'L', 'T'), - HB_OT_TAG_post, - HB_TAG ('p', 'r', 'e', 'p'), - HB_OT_TAG_sbix, - HB_TAG ('S', 'T', 'A', 'T'), - HB_TAG ('S', 'V', 'G', ' '), - HB_TAG ('V', 'D', 'M', 'X'), - HB_OT_TAG_vhea, - HB_OT_TAG_vmtx, - HB_OT_TAG_VORG, - HB_OT_TAG_VVAR, - HB_OT_TAG_name, - HB_OT_TAG_OS2 + HB_TAG('a','v','a','r'), + HB_TAG('B','A','S','E'), + HB_TAG('C','B','D','T'), + HB_TAG('C','B','L','C'), + HB_TAG('C','F','F',' '), + HB_TAG('C','F','F','2'), + HB_TAG('c','m','a','p'), + HB_TAG('C','O','L','R'), + HB_TAG('C','P','A','L'), + HB_TAG('c','v','a','r'), + HB_TAG('c','v','t',' '), + HB_TAG('D','S','I','G'), + HB_TAG('E','B','D','T'), + HB_TAG('E','B','L','C'), + HB_TAG('E','B','S','C'), + HB_TAG('f','p','g','m'), + HB_TAG('f','v','a','r'), + HB_TAG('g','a','s','p'), + HB_TAG('G','D','E','F'), + HB_TAG('g','l','y','f'), + HB_TAG('G','P','O','S'), + HB_TAG('G','S','U','B'), + HB_TAG('g','v','a','r'), + HB_TAG('h','d','m','x'), + HB_TAG('h','e','a','d'), + HB_TAG('h','h','e','a'), + HB_TAG('h','m','t','x'), + HB_TAG('H','V','A','R'), + HB_TAG('J','S','T','F'), + HB_TAG('k','e','r','n'), + HB_TAG('l','o','c','a'), + HB_TAG('L','T','S','H'), + HB_TAG('M','A','T','H'), + HB_TAG('m','a','x','p'), + HB_TAG('M','E','R','G'), + HB_TAG('m','e','t','a'), + HB_TAG('M','V','A','R'), + HB_TAG('P','C','L','T'), + HB_TAG('p','o','s','t'), + HB_TAG('p','r','e','p'), + HB_TAG('s','b','i','x'), + HB_TAG('S','T','A','T'), + HB_TAG('S','V','G',' '), + HB_TAG('V','D','M','X'), + HB_TAG('v','h','e','a'), + HB_TAG('v','m','t','x'), + HB_TAG('V','O','R','G'), + HB_TAG('V','V','A','R'), + HB_TAG('n','a','m','e'), + HB_TAG('O','S','/','2') }; static bool _table_is_empty (const hb_face_t *face, hb_tag_t tag) @@ -213,169 +167,6 @@ } -static unsigned -_plan_estimate_subset_table_size (hb_subset_plan_t *plan, - unsigned table_len, - hb_tag_t table_tag) -{ - unsigned src_glyphs = plan->source->get_num_glyphs (); - unsigned dst_glyphs = plan->glyphset ()->get_population (); - - unsigned bulk = 8192; - /* Tables that we want to allocate same space as the source table. For GSUB/GPOS it's - * because those are expensive to subset, so giving them more room is fine. */ - bool same_size = table_tag == HB_OT_TAG_GSUB || - table_tag == HB_OT_TAG_GPOS || - table_tag == HB_OT_TAG_name; - - if (plan->flags & HB_SUBSET_FLAGS_RETAIN_GIDS) - { - if (table_tag == HB_OT_TAG_CFF1) - { - /* Add some extra room for the CFF charset. */ - bulk += src_glyphs * 16; - } - else if (table_tag == HB_OT_TAG_CFF2) - { - /* Just extra CharString offsets. */ - bulk += src_glyphs * 4; - } - } - - if (unlikely (!src_glyphs) || same_size) - return bulk + table_len; - - return bulk + (unsigned) (table_len * sqrt ((double) dst_glyphs / src_glyphs)); -} - -/* - * Repack the serialization buffer if any offset overflows exist. - */ -static hb_blob_t* -_repack (hb_tag_t tag, const hb_serialize_context_t& c) -{ - if (!c.offset_overflow ()) - return c.copy_blob (); - - hb_blob_t* result = hb_resolve_overflows (c.object_graph (), tag); - - if (unlikely (!result)) - { - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c offset overflow resolution failed.", - HB_UNTAG (tag)); - return nullptr; - } - - return result; -} - -template<typename TableType> -static -bool -_try_subset (const TableType *table, - hb_vector_t<char>* buf, - hb_subset_context_t* c /* OUT */) -{ - c->serializer->start_serialize (); - if (c->serializer->in_error ()) return false; - - bool needed = table->subset (c); - if (!c->serializer->ran_out_of_room ()) - { - c->serializer->end_serialize (); - return needed; - } - - unsigned buf_size = buf->allocated; - buf_size = buf_size * 2 + 16; - - - - - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.", - HB_UNTAG (c->table_tag), buf_size); - - if (unlikely (buf_size > c->source_blob->length * 256 || - !buf->alloc_exact (buf_size))) - { - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", - HB_UNTAG (c->table_tag), buf_size); - return needed; - } - - c->serializer->reset (buf->arrayZ, buf->allocated); - return _try_subset (table, buf, c); -} - -template <typename T> -static auto _do_destroy (T &t, hb_priority<1>) HB_RETURN (void, t.destroy ()) - -template <typename T> -static void _do_destroy (T &t, hb_priority<0>) {} - -template<typename TableType> -static bool -_subset (hb_subset_plan_t *plan, hb_vector_t<char> &buf) -{ - auto &&source_blob = plan->source_table<TableType> (); - auto *table = source_blob.get (); - - hb_tag_t tag = TableType::tableTag; - hb_blob_t *blob = source_blob.get_blob(); - if (unlikely (!blob || !blob->data)) - { - DEBUG_MSG (SUBSET, nullptr, - "OT::%c%c%c%c::subset sanitize failed on source table.", HB_UNTAG (tag)); - _do_destroy (source_blob, hb_prioritize); - return false; - } - - unsigned buf_size = _plan_estimate_subset_table_size (plan, blob->length, TableType::tableTag); - DEBUG_MSG (SUBSET, nullptr, - "OT::%c%c%c%c initial estimated table size: %u bytes.", HB_UNTAG (tag), buf_size); - if (unlikely (!buf.alloc (buf_size))) - { - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to allocate %u bytes.", HB_UNTAG (tag), buf_size); - _do_destroy (source_blob, hb_prioritize); - return false; - } - - bool needed = false; - hb_serialize_context_t serializer (buf.arrayZ, buf.allocated); - { - hb_subset_context_t c (blob, plan, &serializer, tag); - needed = _try_subset (table, &buf, &c); - } - _do_destroy (source_blob, hb_prioritize); - - if (serializer.in_error () && !serializer.only_offset_overflow ()) - { - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset FAILED!", HB_UNTAG (tag)); - return false; - } - - if (!needed) - { - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset table subsetted to empty.", HB_UNTAG (tag)); - return true; - } - - bool result = false; - hb_blob_t *dest_blob = _repack (tag, serializer); - if (dest_blob) - { - DEBUG_MSG (SUBSET, nullptr, - "OT::%c%c%c%c final subset table size: %u bytes.", - HB_UNTAG (tag), dest_blob->length); - result = plan->add_table (tag, dest_blob); - hb_blob_destroy (dest_blob); - } - - DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset %s", - HB_UNTAG (tag), result ? "success" : "FAILED!"); - return result; -} - static bool _is_table_present (hb_face_t *source, hb_tag_t tag) { @@ -407,34 +198,34 @@ switch (tag) { - case HB_TAG ('c','v','a','r'): /* hint table, fallthrough */ + case HB_TAG('c','v','a','r'): /* hint table, fallthrough */ return plan->all_axes_pinned || (plan->flags & HB_SUBSET_FLAGS_NO_HINTING); - case HB_TAG ('c','v','t',' '): /* hint table, fallthrough */ - case HB_TAG ('f','p','g','m'): /* hint table, fallthrough */ - case HB_TAG ('p','r','e','p'): /* hint table, fallthrough */ - case HB_TAG ('h','d','m','x'): /* hint table, fallthrough */ - case HB_TAG ('V','D','M','X'): /* hint table, fallthrough */ + case HB_TAG('c','v','t',' '): /* hint table, fallthrough */ + case HB_TAG('f','p','g','m'): /* hint table, fallthrough */ + case HB_TAG('p','r','e','p'): /* hint table, fallthrough */ + case HB_TAG('h','d','m','x'): /* hint table, fallthrough */ + case HB_TAG('V','D','M','X'): /* hint table, fallthrough */ return plan->flags & HB_SUBSET_FLAGS_NO_HINTING; #ifdef HB_NO_SUBSET_LAYOUT // Drop Layout Tables if requested. - case HB_OT_TAG_GDEF: - case HB_OT_TAG_GPOS: - case HB_OT_TAG_GSUB: - case HB_TAG ('m','o','r','x'): - case HB_TAG ('m','o','r','t'): - case HB_TAG ('k','e','r','x'): - case HB_TAG ('k','e','r','n'): + case HB_TAG('G','D','E','F'): + case HB_TAG('G','P','O','S'): + case HB_TAG('G','S','U','B'): + case HB_TAG('m','o','r','x'): + case HB_TAG('m','o','r','t'): + case HB_TAG('k','e','r','x'): + case HB_TAG('k','e','r','n'): return true; #endif - case HB_TAG ('a','v','a','r'): - case HB_TAG ('f','v','a','r'): - case HB_TAG ('g','v','a','r'): - case HB_OT_TAG_HVAR: - case HB_OT_TAG_VVAR: - case HB_TAG ('M','V','A','R'): + case HB_TAG('a','v','a','r'): + case HB_TAG('f','v','a','r'): + case HB_TAG('g','v','a','r'): + case HB_TAG('H','V','A','R'): + case HB_TAG('V','V','A','R'): + case HB_TAG('M','V','A','R'): return plan->all_axes_pinned; default: @@ -443,28 +234,19 @@ } static bool -_passthrough (hb_subset_plan_t *plan, hb_tag_t tag) -{ - hb_blob_t *source_table = hb_face_reference_table (plan->source, tag); - bool result = plan->add_table (tag, source_table); - hb_blob_destroy (source_table); - return result; -} - -static bool _dependencies_satisfied (hb_subset_plan_t *plan, hb_tag_t tag, const hb_set_t &subsetted_tags, const hb_set_t &pending_subset_tags) { switch (tag) { - case HB_OT_TAG_hmtx: - case HB_OT_TAG_vmtx: - case HB_OT_TAG_maxp: - case HB_OT_TAG_OS2: - return !plan->normalized_coords || !pending_subset_tags.has (HB_OT_TAG_glyf); - case HB_OT_TAG_GPOS: - return plan->all_axes_pinned || !pending_subset_tags.has (HB_OT_TAG_GDEF); + case HB_TAG('h','m','t','x'): + case HB_TAG('v','m','t','x'): + case HB_TAG('m','a','x','p'): + case HB_TAG('O','S','/','2'): + return !plan->normalized_coords || !pending_subset_tags.has (HB_TAG('g','l','y','f')); + case HB_TAG('G','P','O','S'): + return plan->all_axes_pinned || !pending_subset_tags.has (HB_TAG('G','D','E','F')); default: return true; } @@ -476,88 +258,48 @@ hb_tag_t tag) { if (plan->no_subset_tables.has (tag)) { - return _passthrough (plan, tag); + return _hb_subset_table_passthrough (plan, tag); } DEBUG_MSG (SUBSET, nullptr, "subset %c%c%c%c", HB_UNTAG (tag)); + + bool success; + if (_hb_subset_table_layout (plan, buf, tag, &success) || + _hb_subset_table_var (plan, buf, tag, &success) || + _hb_subset_table_cff (plan, buf, tag, &success) || + _hb_subset_table_color (plan, buf, tag, &success) || + _hb_subset_table_other (plan, buf, tag, &success)) + return success; + + switch (tag) { - case HB_OT_TAG_glyf: return _subset<const OT::glyf> (plan, buf); - case HB_OT_TAG_hdmx: return _subset<const OT::hdmx> (plan, buf); - case HB_OT_TAG_name: return _subset<const OT::name> (plan, buf); - case HB_OT_TAG_head: - if (_is_table_present (plan->source, HB_OT_TAG_glyf) && !_should_drop_table (plan, HB_OT_TAG_glyf)) + case HB_TAG('h','e','a','d'): + if (_is_table_present (plan->source, HB_TAG('g','l','y','f')) && !_should_drop_table (plan, HB_TAG('g','l','y','f'))) return true; /* skip head, handled by glyf */ - return _subset<const OT::head> (plan, buf); - case HB_OT_TAG_hhea: return true; /* skip hhea, handled by hmtx */ - case HB_OT_TAG_hmtx: return _subset<const OT::hmtx> (plan, buf); - case HB_OT_TAG_vhea: return true; /* skip vhea, handled by vmtx */ - case HB_OT_TAG_vmtx: return _subset<const OT::vmtx> (plan, buf); - case HB_OT_TAG_maxp: return _subset<const OT::maxp> (plan, buf); - case HB_OT_TAG_sbix: return _subset<const OT::sbix> (plan, buf); - case HB_OT_TAG_loca: return true; /* skip loca, handled by glyf */ - case HB_OT_TAG_cmap: return _subset<const OT::cmap> (plan, buf); - case HB_OT_TAG_OS2 : return _subset<const OT::OS2 > (plan, buf); - case HB_OT_TAG_post: return _subset<const OT::post> (plan, buf); - case HB_OT_TAG_COLR: return _subset<const OT::COLR> (plan, buf); - case HB_OT_TAG_CPAL: return _subset<const OT::CPAL> (plan, buf); - case HB_OT_TAG_CBLC: return _subset<const OT::CBLC> (plan, buf); - case HB_OT_TAG_CBDT: return true; /* skip CBDT, handled by CBLC */ - case HB_OT_TAG_MATH: return _subset<const OT::MATH> (plan, buf); - case HB_OT_TAG_BASE: return _subset<const OT::BASE> (plan, buf); - -#ifndef HB_NO_SUBSET_CFF - case HB_OT_TAG_CFF1: return _subset<const OT::cff1> (plan, buf); - case HB_OT_TAG_CFF2: return _subset<const OT::cff2> (plan, buf); - case HB_OT_TAG_VORG: return _subset<const OT::VORG> (plan, buf); -#endif - -#ifndef HB_NO_SUBSET_LAYOUT - case HB_OT_TAG_GDEF: return _subset<const OT::GDEF> (plan, buf); - case HB_OT_TAG_GSUB: return _subset<const GSUB> (plan, buf); - case HB_OT_TAG_GPOS: return _subset<const GPOS> (plan, buf); - case HB_OT_TAG_gvar: return _subset<const OT::gvar> (plan, buf); - case HB_OT_TAG_HVAR: return _subset<const OT::HVAR> (plan, buf); - case HB_OT_TAG_VVAR: return _subset<const OT::VVAR> (plan, buf); -#endif - -#ifndef HB_NO_VAR - case HB_OT_TAG_fvar: - if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag); - return _subset<const OT::fvar> (plan, buf); - case HB_OT_TAG_avar: - if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag); - return _subset<const OT::avar> (plan, buf); - case HB_OT_TAG_cvar: - if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag); - return _subset<const OT::cvar> (plan, buf); - case HB_OT_TAG_MVAR: - if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag); - return _subset<const OT::MVAR> (plan, buf); -#endif + return _hb_subset_table<const OT::head> (plan, buf); - case HB_OT_TAG_STAT: - if (!plan->user_axes_location.is_empty ()) return _subset<const OT::STAT> (plan, buf); - else return _passthrough (plan, tag); + case HB_TAG('S','T','A','T'): + if (!plan->user_axes_location.is_empty ()) return _hb_subset_table<const OT::STAT> (plan, buf); + else return _hb_subset_table_passthrough (plan, tag); - case HB_TAG ('c', 'v', 't', ' '): + case HB_TAG('c','v','t',' '): #ifndef HB_NO_VAR - if (_is_table_present (plan->source, HB_OT_TAG_cvar) && + if (_is_table_present (plan->source, HB_TAG('c','v','a','r')) && plan->normalized_coords && !plan->pinned_at_default) { auto &cvar = *plan->source->table.cvar; return OT::cvar::add_cvt_and_apply_deltas (plan, cvar.get_tuple_var_data (), &cvar); } #endif - return _passthrough (plan, tag); + return _hb_subset_table_passthrough (plan, tag); + } - default: - if (plan->flags & HB_SUBSET_FLAGS_PASSTHROUGH_UNRECOGNIZED) - return _passthrough (plan, tag); + if (plan->flags & HB_SUBSET_FLAGS_PASSTHROUGH_UNRECOGNIZED) + return _hb_subset_table_passthrough (plan, tag); - // Drop table - return true; - } + // Drop table + return true; } static void _attach_accelerator_data (hb_subset_plan_t* plan, @@ -707,108 +449,4 @@ end: return success ? hb_face_reference (plan->dest) : nullptr; -} - - -#ifdef HB_EXPERIMENTAL_API - -#include "hb-ot-cff1-table.hh" - -template<typename accel_t> -static hb_blob_t* get_charstrings_data(accel_t& accel, hb_codepoint_t glyph_index) { - if (!accel.is_valid()) { - return hb_blob_get_empty (); - } - - hb_ubytes_t bytes = (*accel.charStrings)[glyph_index]; - if (!bytes) { - return hb_blob_get_empty (); - } - - hb_blob_t* cff_blob = accel.get_blob(); - uint32_t length; - const char* cff_data = hb_blob_get_data(cff_blob, &length) ; - - long int offset = (const char*) bytes.arrayZ - cff_data; - if (offset < 0 || offset > INT32_MAX) { - return hb_blob_get_empty (); - } - - return hb_blob_create_sub_blob(cff_blob, (uint32_t) offset, bytes.length); -} - -template<typename accel_t> -static hb_blob_t* get_charstrings_index(accel_t& accel) { - if (!accel.is_valid()) { - return hb_blob_get_empty (); - } - - const char* charstrings_start = (const char*) accel.charStrings; - unsigned charstrings_length = accel.charStrings->get_size(); - - hb_blob_t* cff_blob = accel.get_blob(); - uint32_t length; - const char* cff_data = hb_blob_get_data(cff_blob, &length) ; - - long int offset = charstrings_start - cff_data; - if (offset < 0 || offset > INT32_MAX) { - return hb_blob_get_empty (); - } - - return hb_blob_create_sub_blob(cff_blob, (uint32_t) offset, charstrings_length); -} - -/** - * hb_subset_cff_get_charstring_data: - * @face: A face object - * @glyph_index: Glyph index to get data for. - * - * Returns the raw outline data from the CFF/CFF2 table associated with the given glyph index. - * - * XSince: EXPERIMENTAL - **/ -HB_EXTERN hb_blob_t* -hb_subset_cff_get_charstring_data(hb_face_t* face, hb_codepoint_t glyph_index) { - return get_charstrings_data(*face->table.cff1, glyph_index); -} - -/** - * hb_subset_cff_get_charstrings_index: - * @face: A face object - * - * Returns the raw CFF CharStrings INDEX from the CFF table. - * - * XSince: EXPERIMENTAL - **/ -HB_EXTERN hb_blob_t* -hb_subset_cff_get_charstrings_index (hb_face_t* face) { - return get_charstrings_index (*face->table.cff1); -} - -/** - * hb_subset_cff2_get_charstring_data: - * @face: A face object - * @glyph_index: Glyph index to get data for. - * - * Returns the raw outline data from the CFF/CFF2 table associated with the given glyph index. - * - * XSince: EXPERIMENTAL - **/ -HB_EXTERN hb_blob_t* -hb_subset_cff2_get_charstring_data(hb_face_t* face, hb_codepoint_t glyph_index) { - return get_charstrings_data(*face->table.cff2, glyph_index); -} - -/** - * hb_subset_cff2_get_charstrings_index: - * @face: A face object - * - * Returns the raw CFF2 CharStrings INDEX from the CFF2 table. - * - * XSince: EXPERIMENTAL - **/ -HB_EXTERN hb_blob_t* -hb_subset_cff2_get_charstrings_index (hb_face_t* face) { - return get_charstrings_index (*face->table.cff2); -} -#endif \ No newline at end of file +} \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset.h 2026-04-17 19:08:13.000000000 +0000 @@ -80,6 +80,10 @@ * @HB_SUBSET_FLAGS_IFTB_REQUIREMENTS: If set enforce requirements on the output subset * to allow it to be used with incremental font transfer IFTB patches. Primarily, * this forces all outline data to use long (32 bit) offsets. Since: EXPERIMENTAL + * @HB_SUBSET_FLAGS_RETAIN_NUM_GLYPHS: If this flag is set along side + * HB_SUBSET_FLAGS_RETAIN_GIDS then the number of glyphs in the font won't + * be reduced as a result of subsetting. If necessary empty glyphs will be + * included at the end of the font to keep the number of glyphs unchanged. * * List of boolean properties that can be configured on the subset input. * @@ -101,6 +105,7 @@ HB_SUBSET_FLAGS_NO_BIDI_CLOSURE = 0x00000800u, #ifdef HB_EXPERIMENTAL_API HB_SUBSET_FLAGS_IFTB_REQUIREMENTS = 0x00001000u, + HB_SUBSET_FLAGS_RETAIN_NUM_GLYPHS = 0x00002000u, #endif } hb_subset_flags_t; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-subset.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-subset.hh 2026-04-17 19:08:13.000000000 +0000 @@ -70,5 +70,4 @@ table_tag (table_tag_) {} }; - #endif /* HB_SUBSET_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ucd-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ucd-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-ucd-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-ucd-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -2,9 +2,9 @@ /* * The following table is generated by running: * - * ./gen-ucd-table.py ucd.nounihan.grouped.xml + * ./gen-ucd-table.py ucd.nounihan.grouped.xml hb-script-list.h * - * on file with this description: Unicode 16.0.0 + * on file with this description: Unicode 17.0.0 */ #ifndef HB_UCD_TABLE_HH @@ -12,8 +12,9 @@ #include "hb.hh" -static const hb_script_t -_hb_ucd_sc_map[172] = +#include <stdint.h> + +static const hb_script_t _hb_ucd_sc_map[176]= { HB_SCRIPT_COMMON, HB_SCRIPT_INHERITED, HB_SCRIPT_UNKNOWN, HB_SCRIPT_ARABIC, @@ -101,1040 +102,805 @@ HB_SCRIPT_GURUNG_KHEMA, HB_SCRIPT_KIRAT_RAI, HB_SCRIPT_OL_ONAL, HB_SCRIPT_SUNUWAR, HB_SCRIPT_TODHRI, HB_SCRIPT_TULU_TIGALARI, + HB_SCRIPT_BERIA_ERFE, HB_SCRIPT_SIDETIC, + HB_SCRIPT_TAI_YO, HB_SCRIPT_TOLONG_SIKI, }; -static const uint16_t -_hb_ucd_dm1_p0_map[825] = +static const uint16_t _hb_ucd_dm1_p0_map[825]= { - 0x003Bu, 0x004Bu, 0x0060u, 0x00B4u, 0x00B7u, 0x00C5u, 0x02B9u, 0x0300u, - 0x0301u, 0x0313u, 0x0385u, 0x0386u, 0x0388u, 0x0389u, 0x038Au, 0x038Cu, - 0x038Eu, 0x038Fu, 0x0390u, 0x03A9u, 0x03ACu, 0x03ADu, 0x03AEu, 0x03AFu, - 0x03B0u, 0x03B9u, 0x03CCu, 0x03CDu, 0x03CEu, 0x2002u, 0x2003u, 0x3008u, - 0x3009u, 0x349Eu, 0x34B9u, 0x34BBu, 0x34DFu, 0x3515u, 0x36EEu, 0x36FCu, - 0x3781u, 0x382Fu, 0x3862u, 0x387Cu, 0x38C7u, 0x38E3u, 0x391Cu, 0x393Au, - 0x3A2Eu, 0x3A6Cu, 0x3AE4u, 0x3B08u, 0x3B19u, 0x3B49u, 0x3B9Du, 0x3C18u, - 0x3C4Eu, 0x3D33u, 0x3D96u, 0x3EACu, 0x3EB8u, 0x3F1Bu, 0x3FFCu, 0x4008u, - 0x4018u, 0x4039u, 0x4046u, 0x4096u, 0x40E3u, 0x412Fu, 0x4202u, 0x4227u, - 0x42A0u, 0x4301u, 0x4334u, 0x4359u, 0x43D5u, 0x43D9u, 0x440Bu, 0x446Bu, - 0x452Bu, 0x455Du, 0x4561u, 0x456Bu, 0x45D7u, 0x45F9u, 0x4635u, 0x46BEu, - 0x46C7u, 0x4995u, 0x49E6u, 0x4A6Eu, 0x4A76u, 0x4AB2u, 0x4B33u, 0x4BCEu, - 0x4CCEu, 0x4CEDu, 0x4CF8u, 0x4D56u, 0x4E0Du, 0x4E26u, 0x4E32u, 0x4E38u, - 0x4E39u, 0x4E3Du, 0x4E41u, 0x4E82u, 0x4E86u, 0x4EAEu, 0x4EC0u, 0x4ECCu, - 0x4EE4u, 0x4F60u, 0x4F80u, 0x4F86u, 0x4F8Bu, 0x4FAEu, 0x4FBBu, 0x4FBFu, - 0x5002u, 0x502Bu, 0x507Au, 0x5099u, 0x50CFu, 0x50DAu, 0x50E7u, 0x5140u, - 0x5145u, 0x514Du, 0x5154u, 0x5164u, 0x5167u, 0x5168u, 0x5169u, 0x516Du, - 0x5177u, 0x5180u, 0x518Du, 0x5192u, 0x5195u, 0x5197u, 0x51A4u, 0x51ACu, - 0x51B5u, 0x51B7u, 0x51C9u, 0x51CCu, 0x51DCu, 0x51DEu, 0x51F5u, 0x5203u, - 0x5207u, 0x5217u, 0x5229u, 0x523Au, 0x523Bu, 0x5246u, 0x5272u, 0x5277u, - 0x5289u, 0x529Bu, 0x52A3u, 0x52B3u, 0x52C7u, 0x52C9u, 0x52D2u, 0x52DEu, - 0x52E4u, 0x52F5u, 0x52FAu, 0x5305u, 0x5306u, 0x5317u, 0x533Fu, 0x5349u, - 0x5351u, 0x535Au, 0x5373u, 0x5375u, 0x537Du, 0x537Fu, 0x53C3u, 0x53CAu, - 0x53DFu, 0x53E5u, 0x53EBu, 0x53F1u, 0x5406u, 0x540Fu, 0x541Du, 0x5438u, - 0x5442u, 0x5448u, 0x5468u, 0x549Eu, 0x54A2u, 0x54BDu, 0x54F6u, 0x5510u, - 0x5553u, 0x5555u, 0x5563u, 0x5584u, 0x5587u, 0x5599u, 0x559Du, 0x55ABu, - 0x55B3u, 0x55C0u, 0x55C2u, 0x55E2u, 0x5606u, 0x5651u, 0x5668u, 0x5674u, - 0x56F9u, 0x5716u, 0x5717u, 0x578Bu, 0x57CEu, 0x57F4u, 0x580Du, 0x5831u, - 0x5832u, 0x5840u, 0x585Au, 0x585Eu, 0x58A8u, 0x58ACu, 0x58B3u, 0x58D8u, - 0x58DFu, 0x58EEu, 0x58F2u, 0x58F7u, 0x5906u, 0x591Au, 0x5922u, 0x5944u, - 0x5948u, 0x5951u, 0x5954u, 0x5962u, 0x5973u, 0x59D8u, 0x59ECu, 0x5A1Bu, - 0x5A27u, 0x5A62u, 0x5A66u, 0x5AB5u, 0x5B08u, 0x5B28u, 0x5B3Eu, 0x5B85u, - 0x5BC3u, 0x5BD8u, 0x5BE7u, 0x5BEEu, 0x5BF3u, 0x5BFFu, 0x5C06u, 0x5C22u, - 0x5C3Fu, 0x5C60u, 0x5C62u, 0x5C64u, 0x5C65u, 0x5C6Eu, 0x5C8Du, 0x5CC0u, - 0x5D19u, 0x5D43u, 0x5D50u, 0x5D6Bu, 0x5D6Eu, 0x5D7Cu, 0x5DB2u, 0x5DBAu, - 0x5DE1u, 0x5DE2u, 0x5DFDu, 0x5E28u, 0x5E3Du, 0x5E69u, 0x5E74u, 0x5EA6u, - 0x5EB0u, 0x5EB3u, 0x5EB6u, 0x5EC9u, 0x5ECAu, 0x5ED2u, 0x5ED3u, 0x5ED9u, - 0x5EECu, 0x5EFEu, 0x5F04u, 0x5F22u, 0x5F53u, 0x5F62u, 0x5F69u, 0x5F6Bu, - 0x5F8Bu, 0x5F9Au, 0x5FA9u, 0x5FADu, 0x5FCDu, 0x5FD7u, 0x5FF5u, 0x5FF9u, - 0x6012u, 0x601Cu, 0x6075u, 0x6081u, 0x6094u, 0x60C7u, 0x60D8u, 0x60E1u, - 0x6108u, 0x6144u, 0x6148u, 0x614Cu, 0x614Eu, 0x6160u, 0x6168u, 0x617Au, - 0x618Eu, 0x6190u, 0x61A4u, 0x61AFu, 0x61B2u, 0x61DEu, 0x61F2u, 0x61F6u, - 0x6200u, 0x6210u, 0x621Bu, 0x622Eu, 0x6234u, 0x625Du, 0x62B1u, 0x62C9u, - 0x62CFu, 0x62D3u, 0x62D4u, 0x62FCu, 0x62FEu, 0x633Du, 0x6350u, 0x6368u, - 0x637Bu, 0x6383u, 0x63A0u, 0x63A9u, 0x63C4u, 0x63C5u, 0x63E4u, 0x641Cu, - 0x6422u, 0x6452u, 0x6469u, 0x6477u, 0x647Eu, 0x649Au, 0x649Du, 0x64C4u, - 0x654Fu, 0x6556u, 0x656Cu, 0x6578u, 0x6599u, 0x65C5u, 0x65E2u, 0x65E3u, - 0x6613u, 0x6649u, 0x6674u, 0x6688u, 0x6691u, 0x669Cu, 0x66B4u, 0x66C6u, - 0x66F4u, 0x66F8u, 0x6700u, 0x6717u, 0x671Bu, 0x6721u, 0x674Eu, 0x6753u, - 0x6756u, 0x675Eu, 0x677Bu, 0x6785u, 0x6797u, 0x67F3u, 0x67FAu, 0x6817u, - 0x681Fu, 0x6852u, 0x6881u, 0x6885u, 0x688Eu, 0x68A8u, 0x6914u, 0x6942u, - 0x69A3u, 0x69EAu, 0x6A02u, 0x6A13u, 0x6AA8u, 0x6AD3u, 0x6ADBu, 0x6B04u, - 0x6B21u, 0x6B54u, 0x6B72u, 0x6B77u, 0x6B79u, 0x6B9Fu, 0x6BAEu, 0x6BBAu, - 0x6BBBu, 0x6C4Eu, 0x6C67u, 0x6C88u, 0x6CBFu, 0x6CCCu, 0x6CCDu, 0x6CE5u, - 0x6D16u, 0x6D1Bu, 0x6D1Eu, 0x6D34u, 0x6D3Eu, 0x6D41u, 0x6D69u, 0x6D6Au, - 0x6D77u, 0x6D78u, 0x6D85u, 0x6DCBu, 0x6DDAu, 0x6DEAu, 0x6DF9u, 0x6E1Au, - 0x6E2Fu, 0x6E6Eu, 0x6E9Cu, 0x6EBAu, 0x6EC7u, 0x6ECBu, 0x6ED1u, 0x6EDBu, - 0x6F0Fu, 0x6F22u, 0x6F23u, 0x6F6Eu, 0x6FC6u, 0x6FEBu, 0x6FFEu, 0x701Bu, - 0x701Eu, 0x7039u, 0x704Au, 0x7070u, 0x7077u, 0x707Du, 0x7099u, 0x70ADu, - 0x70C8u, 0x70D9u, 0x7145u, 0x7149u, 0x716Eu, 0x719Cu, 0x71CEu, 0x71D0u, - 0x7210u, 0x721Bu, 0x7228u, 0x722Bu, 0x7235u, 0x7250u, 0x7262u, 0x7280u, - 0x7295u, 0x72AFu, 0x72C0u, 0x72FCu, 0x732Au, 0x7375u, 0x737Au, 0x7387u, - 0x738Bu, 0x73A5u, 0x73B2u, 0x73DEu, 0x7406u, 0x7409u, 0x7422u, 0x7447u, - 0x745Cu, 0x7469u, 0x7471u, 0x7485u, 0x7489u, 0x7498u, 0x74CAu, 0x7506u, - 0x7524u, 0x753Bu, 0x753Eu, 0x7559u, 0x7565u, 0x7570u, 0x75E2u, 0x7610u, - 0x761Du, 0x761Fu, 0x7642u, 0x7669u, 0x76CAu, 0x76DBu, 0x76E7u, 0x76F4u, - 0x7701u, 0x771Eu, 0x771Fu, 0x7740u, 0x774Au, 0x778Bu, 0x77A7u, 0x784Eu, - 0x786Bu, 0x788Cu, 0x7891u, 0x78CAu, 0x78CCu, 0x78FBu, 0x792Au, 0x793Cu, - 0x793Eu, 0x7948u, 0x7949u, 0x7950u, 0x7956u, 0x795Du, 0x795Eu, 0x7965u, - 0x797Fu, 0x798Du, 0x798Eu, 0x798Fu, 0x79AEu, 0x79CAu, 0x79EBu, 0x7A1Cu, - 0x7A40u, 0x7A4Au, 0x7A4Fu, 0x7A81u, 0x7AB1u, 0x7ACBu, 0x7AEEu, 0x7B20u, - 0x7BC0u, 0x7BC6u, 0x7BC9u, 0x7C3Eu, 0x7C60u, 0x7C7Bu, 0x7C92u, 0x7CBEu, - 0x7CD2u, 0x7CD6u, 0x7CE3u, 0x7CE7u, 0x7CE8u, 0x7D00u, 0x7D10u, 0x7D22u, - 0x7D2Fu, 0x7D5Bu, 0x7D63u, 0x7DA0u, 0x7DBEu, 0x7DC7u, 0x7DF4u, 0x7E02u, - 0x7E09u, 0x7E37u, 0x7E41u, 0x7E45u, 0x7F3Eu, 0x7F72u, 0x7F79u, 0x7F7Au, - 0x7F85u, 0x7F95u, 0x7F9Au, 0x7FBDu, 0x7FFAu, 0x8001u, 0x8005u, 0x8046u, - 0x8060u, 0x806Fu, 0x8070u, 0x807Eu, 0x808Bu, 0x80ADu, 0x80B2u, 0x8103u, - 0x813Eu, 0x81D8u, 0x81E8u, 0x81EDu, 0x8201u, 0x8204u, 0x8218u, 0x826Fu, - 0x8279u, 0x828Bu, 0x8291u, 0x829Du, 0x82B1u, 0x82B3u, 0x82BDu, 0x82E5u, - 0x82E6u, 0x831Du, 0x8323u, 0x8336u, 0x8352u, 0x8353u, 0x8363u, 0x83ADu, - 0x83BDu, 0x83C9u, 0x83CAu, 0x83CCu, 0x83DCu, 0x83E7u, 0x83EFu, 0x83F1u, - 0x843Du, 0x8449u, 0x8457u, 0x84EEu, 0x84F1u, 0x84F3u, 0x84FCu, 0x8516u, - 0x8564u, 0x85CDu, 0x85FAu, 0x8606u, 0x8612u, 0x862Du, 0x863Fu, 0x8650u, - 0x865Cu, 0x8667u, 0x8669u, 0x8688u, 0x86A9u, 0x86E2u, 0x870Eu, 0x8728u, - 0x876Bu, 0x8779u, 0x8786u, 0x87BAu, 0x87E1u, 0x8801u, 0x881Fu, 0x884Cu, - 0x8860u, 0x8863u, 0x88C2u, 0x88CFu, 0x88D7u, 0x88DEu, 0x88E1u, 0x88F8u, - 0x88FAu, 0x8910u, 0x8941u, 0x8964u, 0x8986u, 0x898Bu, 0x8996u, 0x8AA0u, - 0x8AAAu, 0x8ABFu, 0x8ACBu, 0x8AD2u, 0x8AD6u, 0x8AEDu, 0x8AF8u, 0x8AFEu, - 0x8B01u, 0x8B39u, 0x8B58u, 0x8B80u, 0x8B8Au, 0x8C48u, 0x8C55u, 0x8CABu, - 0x8CC1u, 0x8CC2u, 0x8CC8u, 0x8CD3u, 0x8D08u, 0x8D1Bu, 0x8D77u, 0x8DBCu, - 0x8DCBu, 0x8DEFu, 0x8DF0u, 0x8ECAu, 0x8ED4u, 0x8F26u, 0x8F2Au, 0x8F38u, - 0x8F3Bu, 0x8F62u, 0x8F9Eu, 0x8FB0u, 0x8FB6u, 0x9023u, 0x9038u, 0x9072u, - 0x907Cu, 0x908Fu, 0x9094u, 0x90CEu, 0x90DEu, 0x90F1u, 0x90FDu, 0x9111u, - 0x911Bu, 0x916Au, 0x9199u, 0x91B4u, 0x91CCu, 0x91CFu, 0x91D1u, 0x9234u, - 0x9238u, 0x9276u, 0x927Cu, 0x92D7u, 0x92D8u, 0x9304u, 0x934Au, 0x93F9u, - 0x9415u, 0x958Bu, 0x95ADu, 0x95B7u, 0x962Eu, 0x964Bu, 0x964Du, 0x9675u, - 0x9678u, 0x967Cu, 0x9686u, 0x96A3u, 0x96B7u, 0x96B8u, 0x96C3u, 0x96E2u, - 0x96E3u, 0x96F6u, 0x96F7u, 0x9723u, 0x9732u, 0x9748u, 0x9756u, 0x97DBu, - 0x97E0u, 0x97FFu, 0x980Bu, 0x9818u, 0x9829u, 0x983Bu, 0x985Eu, 0x98E2u, - 0x98EFu, 0x98FCu, 0x9928u, 0x9929u, 0x99A7u, 0x99C2u, 0x99F1u, 0x99FEu, - 0x9A6Au, 0x9B12u, 0x9B6Fu, 0x9C40u, 0x9C57u, 0x9CFDu, 0x9D67u, 0x9DB4u, - 0x9DFAu, 0x9E1Eu, 0x9E7Fu, 0x9E97u, 0x9E9Fu, 0x9EBBu, 0x9ECEu, 0x9EF9u, - 0x9EFEu, 0x9F05u, 0x9F0Fu, 0x9F16u, 0x9F3Bu, 0x9F43u, 0x9F8Du, 0x9F8Eu, - 0x9F9Cu, + 0x003B, 0x004B, 0x0060, 0x00B4, 0x00B7, 0x00C5, 0x02B9, 0x0300, + 0x0301, 0x0313, 0x0385, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, + 0x038E, 0x038F, 0x0390, 0x03A9, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B9, 0x03CC, 0x03CD, 0x03CE, 0x2002, 0x2003, 0x3008, + 0x3009, 0x349E, 0x34B9, 0x34BB, 0x34DF, 0x3515, 0x36EE, 0x36FC, + 0x3781, 0x382F, 0x3862, 0x387C, 0x38C7, 0x38E3, 0x391C, 0x393A, + 0x3A2E, 0x3A6C, 0x3AE4, 0x3B08, 0x3B19, 0x3B49, 0x3B9D, 0x3C18, + 0x3C4E, 0x3D33, 0x3D96, 0x3EAC, 0x3EB8, 0x3F1B, 0x3FFC, 0x4008, + 0x4018, 0x4039, 0x4046, 0x4096, 0x40E3, 0x412F, 0x4202, 0x4227, + 0x42A0, 0x4301, 0x4334, 0x4359, 0x43D5, 0x43D9, 0x440B, 0x446B, + 0x452B, 0x455D, 0x4561, 0x456B, 0x45D7, 0x45F9, 0x4635, 0x46BE, + 0x46C7, 0x4995, 0x49E6, 0x4A6E, 0x4A76, 0x4AB2, 0x4B33, 0x4BCE, + 0x4CCE, 0x4CED, 0x4CF8, 0x4D56, 0x4E0D, 0x4E26, 0x4E32, 0x4E38, + 0x4E39, 0x4E3D, 0x4E41, 0x4E82, 0x4E86, 0x4EAE, 0x4EC0, 0x4ECC, + 0x4EE4, 0x4F60, 0x4F80, 0x4F86, 0x4F8B, 0x4FAE, 0x4FBB, 0x4FBF, + 0x5002, 0x502B, 0x507A, 0x5099, 0x50CF, 0x50DA, 0x50E7, 0x5140, + 0x5145, 0x514D, 0x5154, 0x5164, 0x5167, 0x5168, 0x5169, 0x516D, + 0x5177, 0x5180, 0x518D, 0x5192, 0x5195, 0x5197, 0x51A4, 0x51AC, + 0x51B5, 0x51B7, 0x51C9, 0x51CC, 0x51DC, 0x51DE, 0x51F5, 0x5203, + 0x5207, 0x5217, 0x5229, 0x523A, 0x523B, 0x5246, 0x5272, 0x5277, + 0x5289, 0x529B, 0x52A3, 0x52B3, 0x52C7, 0x52C9, 0x52D2, 0x52DE, + 0x52E4, 0x52F5, 0x52FA, 0x5305, 0x5306, 0x5317, 0x533F, 0x5349, + 0x5351, 0x535A, 0x5373, 0x5375, 0x537D, 0x537F, 0x53C3, 0x53CA, + 0x53DF, 0x53E5, 0x53EB, 0x53F1, 0x5406, 0x540F, 0x541D, 0x5438, + 0x5442, 0x5448, 0x5468, 0x549E, 0x54A2, 0x54BD, 0x54F6, 0x5510, + 0x5553, 0x5555, 0x5563, 0x5584, 0x5587, 0x5599, 0x559D, 0x55AB, + 0x55B3, 0x55C0, 0x55C2, 0x55E2, 0x5606, 0x5651, 0x5668, 0x5674, + 0x56F9, 0x5716, 0x5717, 0x578B, 0x57CE, 0x57F4, 0x580D, 0x5831, + 0x5832, 0x5840, 0x585A, 0x585E, 0x58A8, 0x58AC, 0x58B3, 0x58D8, + 0x58DF, 0x58EE, 0x58F2, 0x58F7, 0x5906, 0x591A, 0x5922, 0x5944, + 0x5948, 0x5951, 0x5954, 0x5962, 0x5973, 0x59D8, 0x59EC, 0x5A1B, + 0x5A27, 0x5A62, 0x5A66, 0x5AB5, 0x5B08, 0x5B28, 0x5B3E, 0x5B85, + 0x5BC3, 0x5BD8, 0x5BE7, 0x5BEE, 0x5BF3, 0x5BFF, 0x5C06, 0x5C22, + 0x5C3F, 0x5C60, 0x5C62, 0x5C64, 0x5C65, 0x5C6E, 0x5C8D, 0x5CC0, + 0x5D19, 0x5D43, 0x5D50, 0x5D6B, 0x5D6E, 0x5D7C, 0x5DB2, 0x5DBA, + 0x5DE1, 0x5DE2, 0x5DFD, 0x5E28, 0x5E3D, 0x5E69, 0x5E74, 0x5EA6, + 0x5EB0, 0x5EB3, 0x5EB6, 0x5EC9, 0x5ECA, 0x5ED2, 0x5ED3, 0x5ED9, + 0x5EEC, 0x5EFE, 0x5F04, 0x5F22, 0x5F53, 0x5F62, 0x5F69, 0x5F6B, + 0x5F8B, 0x5F9A, 0x5FA9, 0x5FAD, 0x5FCD, 0x5FD7, 0x5FF5, 0x5FF9, + 0x6012, 0x601C, 0x6075, 0x6081, 0x6094, 0x60C7, 0x60D8, 0x60E1, + 0x6108, 0x6144, 0x6148, 0x614C, 0x614E, 0x6160, 0x6168, 0x617A, + 0x618E, 0x6190, 0x61A4, 0x61AF, 0x61B2, 0x61DE, 0x61F2, 0x61F6, + 0x6200, 0x6210, 0x621B, 0x622E, 0x6234, 0x625D, 0x62B1, 0x62C9, + 0x62CF, 0x62D3, 0x62D4, 0x62FC, 0x62FE, 0x633D, 0x6350, 0x6368, + 0x637B, 0x6383, 0x63A0, 0x63A9, 0x63C4, 0x63C5, 0x63E4, 0x641C, + 0x6422, 0x6452, 0x6469, 0x6477, 0x647E, 0x649A, 0x649D, 0x64C4, + 0x654F, 0x6556, 0x656C, 0x6578, 0x6599, 0x65C5, 0x65E2, 0x65E3, + 0x6613, 0x6649, 0x6674, 0x6688, 0x6691, 0x669C, 0x66B4, 0x66C6, + 0x66F4, 0x66F8, 0x6700, 0x6717, 0x671B, 0x6721, 0x674E, 0x6753, + 0x6756, 0x675E, 0x677B, 0x6785, 0x6797, 0x67F3, 0x67FA, 0x6817, + 0x681F, 0x6852, 0x6881, 0x6885, 0x688E, 0x68A8, 0x6914, 0x6942, + 0x69A3, 0x69EA, 0x6A02, 0x6A13, 0x6AA8, 0x6AD3, 0x6ADB, 0x6B04, + 0x6B21, 0x6B54, 0x6B72, 0x6B77, 0x6B79, 0x6B9F, 0x6BAE, 0x6BBA, + 0x6BBB, 0x6C4E, 0x6C67, 0x6C88, 0x6CBF, 0x6CCC, 0x6CCD, 0x6CE5, + 0x6D16, 0x6D1B, 0x6D1E, 0x6D34, 0x6D3E, 0x6D41, 0x6D69, 0x6D6A, + 0x6D77, 0x6D78, 0x6D85, 0x6DCB, 0x6DDA, 0x6DEA, 0x6DF9, 0x6E1A, + 0x6E2F, 0x6E6E, 0x6E9C, 0x6EBA, 0x6EC7, 0x6ECB, 0x6ED1, 0x6EDB, + 0x6F0F, 0x6F22, 0x6F23, 0x6F6E, 0x6FC6, 0x6FEB, 0x6FFE, 0x701B, + 0x701E, 0x7039, 0x704A, 0x7070, 0x7077, 0x707D, 0x7099, 0x70AD, + 0x70C8, 0x70D9, 0x7145, 0x7149, 0x716E, 0x719C, 0x71CE, 0x71D0, + 0x7210, 0x721B, 0x7228, 0x722B, 0x7235, 0x7250, 0x7262, 0x7280, + 0x7295, 0x72AF, 0x72C0, 0x72FC, 0x732A, 0x7375, 0x737A, 0x7387, + 0x738B, 0x73A5, 0x73B2, 0x73DE, 0x7406, 0x7409, 0x7422, 0x7447, + 0x745C, 0x7469, 0x7471, 0x7485, 0x7489, 0x7498, 0x74CA, 0x7506, + 0x7524, 0x753B, 0x753E, 0x7559, 0x7565, 0x7570, 0x75E2, 0x7610, + 0x761D, 0x761F, 0x7642, 0x7669, 0x76CA, 0x76DB, 0x76E7, 0x76F4, + 0x7701, 0x771E, 0x771F, 0x7740, 0x774A, 0x778B, 0x77A7, 0x784E, + 0x786B, 0x788C, 0x7891, 0x78CA, 0x78CC, 0x78FB, 0x792A, 0x793C, + 0x793E, 0x7948, 0x7949, 0x7950, 0x7956, 0x795D, 0x795E, 0x7965, + 0x797F, 0x798D, 0x798E, 0x798F, 0x79AE, 0x79CA, 0x79EB, 0x7A1C, + 0x7A40, 0x7A4A, 0x7A4F, 0x7A81, 0x7AB1, 0x7ACB, 0x7AEE, 0x7B20, + 0x7BC0, 0x7BC6, 0x7BC9, 0x7C3E, 0x7C60, 0x7C7B, 0x7C92, 0x7CBE, + 0x7CD2, 0x7CD6, 0x7CE3, 0x7CE7, 0x7CE8, 0x7D00, 0x7D10, 0x7D22, + 0x7D2F, 0x7D5B, 0x7D63, 0x7DA0, 0x7DBE, 0x7DC7, 0x7DF4, 0x7E02, + 0x7E09, 0x7E37, 0x7E41, 0x7E45, 0x7F3E, 0x7F72, 0x7F79, 0x7F7A, + 0x7F85, 0x7F95, 0x7F9A, 0x7FBD, 0x7FFA, 0x8001, 0x8005, 0x8046, + 0x8060, 0x806F, 0x8070, 0x807E, 0x808B, 0x80AD, 0x80B2, 0x8103, + 0x813E, 0x81D8, 0x81E8, 0x81ED, 0x8201, 0x8204, 0x8218, 0x826F, + 0x8279, 0x828B, 0x8291, 0x829D, 0x82B1, 0x82B3, 0x82BD, 0x82E5, + 0x82E6, 0x831D, 0x8323, 0x8336, 0x8352, 0x8353, 0x8363, 0x83AD, + 0x83BD, 0x83C9, 0x83CA, 0x83CC, 0x83DC, 0x83E7, 0x83EF, 0x83F1, + 0x843D, 0x8449, 0x8457, 0x84EE, 0x84F1, 0x84F3, 0x84FC, 0x8516, + 0x8564, 0x85CD, 0x85FA, 0x8606, 0x8612, 0x862D, 0x863F, 0x8650, + 0x865C, 0x8667, 0x8669, 0x8688, 0x86A9, 0x86E2, 0x870E, 0x8728, + 0x876B, 0x8779, 0x8786, 0x87BA, 0x87E1, 0x8801, 0x881F, 0x884C, + 0x8860, 0x8863, 0x88C2, 0x88CF, 0x88D7, 0x88DE, 0x88E1, 0x88F8, + 0x88FA, 0x8910, 0x8941, 0x8964, 0x8986, 0x898B, 0x8996, 0x8AA0, + 0x8AAA, 0x8ABF, 0x8ACB, 0x8AD2, 0x8AD6, 0x8AED, 0x8AF8, 0x8AFE, + 0x8B01, 0x8B39, 0x8B58, 0x8B80, 0x8B8A, 0x8C48, 0x8C55, 0x8CAB, + 0x8CC1, 0x8CC2, 0x8CC8, 0x8CD3, 0x8D08, 0x8D1B, 0x8D77, 0x8DBC, + 0x8DCB, 0x8DEF, 0x8DF0, 0x8ECA, 0x8ED4, 0x8F26, 0x8F2A, 0x8F38, + 0x8F3B, 0x8F62, 0x8F9E, 0x8FB0, 0x8FB6, 0x9023, 0x9038, 0x9072, + 0x907C, 0x908F, 0x9094, 0x90CE, 0x90DE, 0x90F1, 0x90FD, 0x9111, + 0x911B, 0x916A, 0x9199, 0x91B4, 0x91CC, 0x91CF, 0x91D1, 0x9234, + 0x9238, 0x9276, 0x927C, 0x92D7, 0x92D8, 0x9304, 0x934A, 0x93F9, + 0x9415, 0x958B, 0x95AD, 0x95B7, 0x962E, 0x964B, 0x964D, 0x9675, + 0x9678, 0x967C, 0x9686, 0x96A3, 0x96B7, 0x96B8, 0x96C3, 0x96E2, + 0x96E3, 0x96F6, 0x96F7, 0x9723, 0x9732, 0x9748, 0x9756, 0x97DB, + 0x97E0, 0x97FF, 0x980B, 0x9818, 0x9829, 0x983B, 0x985E, 0x98E2, + 0x98EF, 0x98FC, 0x9928, 0x9929, 0x99A7, 0x99C2, 0x99F1, 0x99FE, + 0x9A6A, 0x9B12, 0x9B6F, 0x9C40, 0x9C57, 0x9CFD, 0x9D67, 0x9DB4, + 0x9DFA, 0x9E1E, 0x9E7F, 0x9E97, 0x9E9F, 0x9EBB, 0x9ECE, 0x9EF9, + 0x9EFE, 0x9F05, 0x9F0F, 0x9F16, 0x9F3B, 0x9F43, 0x9F8D, 0x9F8E, + 0x9F9C, }; -static const uint16_t -_hb_ucd_dm1_p2_map[110] = +static const uint16_t _hb_ucd_dm1_p2_map[110]= { - 0x0122u, 0x051Cu, 0x0525u, 0x054Bu, 0x063Au, 0x0804u, 0x08DEu, 0x0A2Cu, - 0x0B63u, 0x14E4u, 0x16A8u, 0x16EAu, 0x19C8u, 0x1B18u, 0x1D0Bu, 0x1DE4u, - 0x1DE6u, 0x2183u, 0x219Fu, 0x2331u, 0x26D4u, 0x2844u, 0x284Au, 0x2B0Cu, - 0x2BF1u, 0x300Au, 0x32B8u, 0x335Fu, 0x3393u, 0x339Cu, 0x33C3u, 0x33D5u, - 0x346Du, 0x36A3u, 0x38A7u, 0x3A8Du, 0x3AFAu, 0x3CBCu, 0x3D1Eu, 0x3ED1u, - 0x3F5Eu, 0x3F8Eu, 0x4263u, 0x42EEu, 0x43ABu, 0x4608u, 0x4735u, 0x4814u, - 0x4C36u, 0x4C92u, 0x4FA1u, 0x4FB8u, 0x5044u, 0x50F2u, 0x50F3u, 0x5119u, - 0x5133u, 0x5249u, 0x541Du, 0x5626u, 0x569Au, 0x56C5u, 0x597Cu, 0x5AA7u, - 0x5BABu, 0x5C80u, 0x5CD0u, 0x5F86u, 0x61DAu, 0x6228u, 0x6247u, 0x62D9u, - 0x633Eu, 0x64DAu, 0x6523u, 0x65A8u, 0x67A7u, 0x67B5u, 0x6B3Cu, 0x6C36u, - 0x6CD5u, 0x6D6Bu, 0x6F2Cu, 0x6FB1u, 0x70D2u, 0x73CAu, 0x7667u, 0x78AEu, - 0x7966u, 0x7CA8u, 0x7ED3u, 0x7F2Fu, 0x85D2u, 0x85EDu, 0x872Eu, 0x8BFAu, - 0x8D77u, 0x9145u, 0x91DFu, 0x921Au, 0x940Au, 0x9496u, 0x95B6u, 0x9B30u, - 0xA0CEu, 0xA105u, 0xA20Eu, 0xA291u, 0xA392u, 0xA600u, + 0x0122, 0x051C, 0x0525, 0x054B, 0x063A, 0x0804, 0x08DE, 0x0A2C, + 0x0B63, 0x14E4, 0x16A8, 0x16EA, 0x19C8, 0x1B18, 0x1D0B, 0x1DE4, + 0x1DE6, 0x2183, 0x219F, 0x2331, 0x26D4, 0x2844, 0x284A, 0x2B0C, + 0x2BF1, 0x300A, 0x32B8, 0x335F, 0x3393, 0x339C, 0x33C3, 0x33D5, + 0x346D, 0x36A3, 0x38A7, 0x3A8D, 0x3AFA, 0x3CBC, 0x3D1E, 0x3ED1, + 0x3F5E, 0x3F8E, 0x4263, 0x42EE, 0x43AB, 0x4608, 0x4735, 0x4814, + 0x4C36, 0x4C92, 0x4FA1, 0x4FB8, 0x5044, 0x50F2, 0x50F3, 0x5119, + 0x5133, 0x5249, 0x541D, 0x5626, 0x569A, 0x56C5, 0x597C, 0x5AA7, + 0x5BAB, 0x5C80, 0x5CD0, 0x5F86, 0x61DA, 0x6228, 0x6247, 0x62D9, + 0x633E, 0x64DA, 0x6523, 0x65A8, 0x67A7, 0x67B5, 0x6B3C, 0x6C36, + 0x6CD5, 0x6D6B, 0x6F2C, 0x6FB1, 0x70D2, 0x73CA, 0x7667, 0x78AE, + 0x7966, 0x7CA8, 0x7ED3, 0x7F2F, 0x85D2, 0x85ED, 0x872E, 0x8BFA, + 0x8D77, 0x9145, 0x91DF, 0x921A, 0x940A, 0x9496, 0x95B6, 0x9B30, + 0xA0CE, 0xA105, 0xA20E, 0xA291, 0xA392, 0xA600, }; -static const uint32_t -_hb_ucd_dm2_u32_map[638] = +static const uint32_t _hb_ucd_dm2_u32_map[638]= { - HB_CODEPOINT_ENCODE3_11_7_14 (0x003Cu, 0x0338u, 0x226Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x003Du, 0x0338u, 0x2260u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x003Eu, 0x0338u, 0x226Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0300u, 0x00C0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0301u, 0x00C1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0302u, 0x00C2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0303u, 0x00C3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0304u, 0x0100u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0306u, 0x0102u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0307u, 0x0226u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0308u, 0x00C4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0309u, 0x1EA2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x030Au, 0x00C5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x030Cu, 0x01CDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x030Fu, 0x0200u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0311u, 0x0202u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0323u, 0x1EA0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0325u, 0x1E00u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0041u, 0x0328u, 0x0104u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0042u, 0x0307u, 0x1E02u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0042u, 0x0323u, 0x1E04u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0042u, 0x0331u, 0x1E06u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0043u, 0x0301u, 0x0106u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0043u, 0x0302u, 0x0108u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0043u, 0x0307u, 0x010Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0043u, 0x030Cu, 0x010Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0043u, 0x0327u, 0x00C7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0044u, 0x0307u, 0x1E0Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0044u, 0x030Cu, 0x010Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0044u, 0x0323u, 0x1E0Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0044u, 0x0327u, 0x1E10u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0044u, 0x032Du, 0x1E12u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0044u, 0x0331u, 0x1E0Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0300u, 0x00C8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0301u, 0x00C9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0302u, 0x00CAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0303u, 0x1EBCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0304u, 0x0112u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0306u, 0x0114u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0307u, 0x0116u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0308u, 0x00CBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0309u, 0x1EBAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x030Cu, 0x011Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x030Fu, 0x0204u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0311u, 0x0206u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0323u, 0x1EB8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0327u, 0x0228u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0328u, 0x0118u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x032Du, 0x1E18u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0045u, 0x0330u, 0x1E1Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0046u, 0x0307u, 0x1E1Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x0301u, 0x01F4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x0302u, 0x011Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x0304u, 0x1E20u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x0306u, 0x011Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x0307u, 0x0120u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x030Cu, 0x01E6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0047u, 0x0327u, 0x0122u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x0302u, 0x0124u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x0307u, 0x1E22u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x0308u, 0x1E26u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x030Cu, 0x021Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x0323u, 0x1E24u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x0327u, 0x1E28u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0048u, 0x032Eu, 0x1E2Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0300u, 0x00CCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0301u, 0x00CDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0302u, 0x00CEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0303u, 0x0128u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0304u, 0x012Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0306u, 0x012Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0307u, 0x0130u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0308u, 0x00CFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0309u, 0x1EC8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x030Cu, 0x01CFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x030Fu, 0x0208u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0311u, 0x020Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0323u, 0x1ECAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0328u, 0x012Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0049u, 0x0330u, 0x1E2Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Au, 0x0302u, 0x0134u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Bu, 0x0301u, 0x1E30u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Bu, 0x030Cu, 0x01E8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Bu, 0x0323u, 0x1E32u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Bu, 0x0327u, 0x0136u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Bu, 0x0331u, 0x1E34u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Cu, 0x0301u, 0x0139u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Cu, 0x030Cu, 0x013Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Cu, 0x0323u, 0x1E36u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Cu, 0x0327u, 0x013Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Cu, 0x032Du, 0x1E3Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Cu, 0x0331u, 0x1E3Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Du, 0x0301u, 0x1E3Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Du, 0x0307u, 0x1E40u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Du, 0x0323u, 0x1E42u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0300u, 0x01F8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0301u, 0x0143u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0303u, 0x00D1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0307u, 0x1E44u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x030Cu, 0x0147u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0323u, 0x1E46u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0327u, 0x0145u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x032Du, 0x1E4Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Eu, 0x0331u, 0x1E48u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0300u, 0x00D2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0301u, 0x00D3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0302u, 0x00D4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0303u, 0x00D5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0304u, 0x014Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0306u, 0x014Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0307u, 0x022Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0308u, 0x00D6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0309u, 0x1ECEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x030Bu, 0x0150u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x030Cu, 0x01D1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x030Fu, 0x020Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0311u, 0x020Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x031Bu, 0x01A0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0323u, 0x1ECCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x004Fu, 0x0328u, 0x01EAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0050u, 0x0301u, 0x1E54u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0050u, 0x0307u, 0x1E56u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x0301u, 0x0154u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x0307u, 0x1E58u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x030Cu, 0x0158u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x030Fu, 0x0210u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x0311u, 0x0212u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x0323u, 0x1E5Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x0327u, 0x0156u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0052u, 0x0331u, 0x1E5Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x0301u, 0x015Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x0302u, 0x015Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x0307u, 0x1E60u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x030Cu, 0x0160u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x0323u, 0x1E62u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x0326u, 0x0218u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0053u, 0x0327u, 0x015Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x0307u, 0x1E6Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x030Cu, 0x0164u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x0323u, 0x1E6Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x0326u, 0x021Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x0327u, 0x0162u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x032Du, 0x1E70u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0054u, 0x0331u, 0x1E6Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0300u, 0x00D9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0301u, 0x00DAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0302u, 0x00DBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0303u, 0x0168u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0304u, 0x016Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0306u, 0x016Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0308u, 0x00DCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0309u, 0x1EE6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x030Au, 0x016Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x030Bu, 0x0170u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x030Cu, 0x01D3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x030Fu, 0x0214u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0311u, 0x0216u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x031Bu, 0x01AFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0323u, 0x1EE4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0324u, 0x1E72u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0328u, 0x0172u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x032Du, 0x1E76u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0055u, 0x0330u, 0x1E74u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0056u, 0x0303u, 0x1E7Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0056u, 0x0323u, 0x1E7Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0057u, 0x0300u, 0x1E80u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0057u, 0x0301u, 0x1E82u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0057u, 0x0302u, 0x0174u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0057u, 0x0307u, 0x1E86u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0057u, 0x0308u, 0x1E84u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0057u, 0x0323u, 0x1E88u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0058u, 0x0307u, 0x1E8Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0058u, 0x0308u, 0x1E8Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0300u, 0x1EF2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0301u, 0x00DDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0302u, 0x0176u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0303u, 0x1EF8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0304u, 0x0232u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0307u, 0x1E8Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0308u, 0x0178u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0309u, 0x1EF6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0059u, 0x0323u, 0x1EF4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x005Au, 0x0301u, 0x0179u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x005Au, 0x0302u, 0x1E90u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x005Au, 0x0307u, 0x017Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x005Au, 0x030Cu, 0x017Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x005Au, 0x0323u, 0x1E92u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x005Au, 0x0331u, 0x1E94u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0300u, 0x00E0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0301u, 0x00E1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0302u, 0x00E2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0303u, 0x00E3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0304u, 0x0101u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0306u, 0x0103u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0307u, 0x0227u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0308u, 0x00E4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0309u, 0x1EA3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x030Au, 0x00E5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x030Cu, 0x01CEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x030Fu, 0x0201u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0311u, 0x0203u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0323u, 0x1EA1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0325u, 0x1E01u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0061u, 0x0328u, 0x0105u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0062u, 0x0307u, 0x1E03u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0062u, 0x0323u, 0x1E05u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0062u, 0x0331u, 0x1E07u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0063u, 0x0301u, 0x0107u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0063u, 0x0302u, 0x0109u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0063u, 0x0307u, 0x010Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0063u, 0x030Cu, 0x010Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0063u, 0x0327u, 0x00E7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0064u, 0x0307u, 0x1E0Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0064u, 0x030Cu, 0x010Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0064u, 0x0323u, 0x1E0Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0064u, 0x0327u, 0x1E11u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0064u, 0x032Du, 0x1E13u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0064u, 0x0331u, 0x1E0Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0300u, 0x00E8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0301u, 0x00E9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0302u, 0x00EAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0303u, 0x1EBDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0304u, 0x0113u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0306u, 0x0115u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0307u, 0x0117u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0308u, 0x00EBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0309u, 0x1EBBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x030Cu, 0x011Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x030Fu, 0x0205u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0311u, 0x0207u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0323u, 0x1EB9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0327u, 0x0229u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0328u, 0x0119u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x032Du, 0x1E19u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0065u, 0x0330u, 0x1E1Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0066u, 0x0307u, 0x1E1Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x0301u, 0x01F5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x0302u, 0x011Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x0304u, 0x1E21u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x0306u, 0x011Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x0307u, 0x0121u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x030Cu, 0x01E7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0067u, 0x0327u, 0x0123u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x0302u, 0x0125u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x0307u, 0x1E23u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x0308u, 0x1E27u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x030Cu, 0x021Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x0323u, 0x1E25u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x0327u, 0x1E29u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x032Eu, 0x1E2Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0068u, 0x0331u, 0x1E96u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0300u, 0x00ECu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0301u, 0x00EDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0302u, 0x00EEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0303u, 0x0129u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0304u, 0x012Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0306u, 0x012Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0308u, 0x00EFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0309u, 0x1EC9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x030Cu, 0x01D0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x030Fu, 0x0209u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0311u, 0x020Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0323u, 0x1ECBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0328u, 0x012Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0069u, 0x0330u, 0x1E2Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Au, 0x0302u, 0x0135u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Au, 0x030Cu, 0x01F0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Bu, 0x0301u, 0x1E31u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Bu, 0x030Cu, 0x01E9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Bu, 0x0323u, 0x1E33u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Bu, 0x0327u, 0x0137u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Bu, 0x0331u, 0x1E35u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Cu, 0x0301u, 0x013Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Cu, 0x030Cu, 0x013Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Cu, 0x0323u, 0x1E37u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Cu, 0x0327u, 0x013Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Cu, 0x032Du, 0x1E3Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Cu, 0x0331u, 0x1E3Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Du, 0x0301u, 0x1E3Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Du, 0x0307u, 0x1E41u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Du, 0x0323u, 0x1E43u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0300u, 0x01F9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0301u, 0x0144u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0303u, 0x00F1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0307u, 0x1E45u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x030Cu, 0x0148u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0323u, 0x1E47u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0327u, 0x0146u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x032Du, 0x1E4Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Eu, 0x0331u, 0x1E49u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0300u, 0x00F2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0301u, 0x00F3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0302u, 0x00F4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0303u, 0x00F5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0304u, 0x014Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0306u, 0x014Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0307u, 0x022Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0308u, 0x00F6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0309u, 0x1ECFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x030Bu, 0x0151u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x030Cu, 0x01D2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x030Fu, 0x020Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0311u, 0x020Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x031Bu, 0x01A1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0323u, 0x1ECDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x006Fu, 0x0328u, 0x01EBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0070u, 0x0301u, 0x1E55u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0070u, 0x0307u, 0x1E57u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x0301u, 0x0155u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x0307u, 0x1E59u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x030Cu, 0x0159u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x030Fu, 0x0211u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x0311u, 0x0213u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x0323u, 0x1E5Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x0327u, 0x0157u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0072u, 0x0331u, 0x1E5Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x0301u, 0x015Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x0302u, 0x015Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x0307u, 0x1E61u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x030Cu, 0x0161u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x0323u, 0x1E63u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x0326u, 0x0219u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0073u, 0x0327u, 0x015Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x0307u, 0x1E6Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x0308u, 0x1E97u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x030Cu, 0x0165u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x0323u, 0x1E6Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x0326u, 0x021Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x0327u, 0x0163u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x032Du, 0x1E71u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0074u, 0x0331u, 0x1E6Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0300u, 0x00F9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0301u, 0x00FAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0302u, 0x00FBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0303u, 0x0169u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0304u, 0x016Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0306u, 0x016Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0308u, 0x00FCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0309u, 0x1EE7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x030Au, 0x016Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x030Bu, 0x0171u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x030Cu, 0x01D4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x030Fu, 0x0215u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0311u, 0x0217u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x031Bu, 0x01B0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0323u, 0x1EE5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0324u, 0x1E73u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0328u, 0x0173u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x032Du, 0x1E77u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0075u, 0x0330u, 0x1E75u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0076u, 0x0303u, 0x1E7Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0076u, 0x0323u, 0x1E7Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x0300u, 0x1E81u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x0301u, 0x1E83u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x0302u, 0x0175u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x0307u, 0x1E87u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x0308u, 0x1E85u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x030Au, 0x1E98u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0077u, 0x0323u, 0x1E89u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0078u, 0x0307u, 0x1E8Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0078u, 0x0308u, 0x1E8Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0300u, 0x1EF3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0301u, 0x00FDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0302u, 0x0177u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0303u, 0x1EF9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0304u, 0x0233u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0307u, 0x1E8Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0308u, 0x00FFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0309u, 0x1EF7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x030Au, 0x1E99u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0079u, 0x0323u, 0x1EF5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x007Au, 0x0301u, 0x017Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x007Au, 0x0302u, 0x1E91u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x007Au, 0x0307u, 0x017Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x007Au, 0x030Cu, 0x017Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x007Au, 0x0323u, 0x1E93u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x007Au, 0x0331u, 0x1E95u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00A8u, 0x0300u, 0x1FEDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00A8u, 0x0301u, 0x0385u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00A8u, 0x0342u, 0x1FC1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2u, 0x0300u, 0x1EA6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2u, 0x0301u, 0x1EA4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2u, 0x0303u, 0x1EAAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2u, 0x0309u, 0x1EA8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C4u, 0x0304u, 0x01DEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C5u, 0x0301u, 0x01FAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C6u, 0x0301u, 0x01FCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C6u, 0x0304u, 0x01E2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00C7u, 0x0301u, 0x1E08u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00CAu, 0x0300u, 0x1EC0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00CAu, 0x0301u, 0x1EBEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00CAu, 0x0303u, 0x1EC4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00CAu, 0x0309u, 0x1EC2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00CFu, 0x0301u, 0x1E2Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4u, 0x0300u, 0x1ED2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4u, 0x0301u, 0x1ED0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4u, 0x0303u, 0x1ED6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4u, 0x0309u, 0x1ED4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D5u, 0x0301u, 0x1E4Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D5u, 0x0304u, 0x022Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D5u, 0x0308u, 0x1E4Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D6u, 0x0304u, 0x022Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00D8u, 0x0301u, 0x01FEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00DCu, 0x0300u, 0x01DBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00DCu, 0x0301u, 0x01D7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00DCu, 0x0304u, 0x01D5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00DCu, 0x030Cu, 0x01D9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2u, 0x0300u, 0x1EA7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2u, 0x0301u, 0x1EA5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2u, 0x0303u, 0x1EABu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2u, 0x0309u, 0x1EA9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E4u, 0x0304u, 0x01DFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E5u, 0x0301u, 0x01FBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E6u, 0x0301u, 0x01FDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E6u, 0x0304u, 0x01E3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00E7u, 0x0301u, 0x1E09u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00EAu, 0x0300u, 0x1EC1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00EAu, 0x0301u, 0x1EBFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00EAu, 0x0303u, 0x1EC5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00EAu, 0x0309u, 0x1EC3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00EFu, 0x0301u, 0x1E2Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4u, 0x0300u, 0x1ED3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4u, 0x0301u, 0x1ED1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4u, 0x0303u, 0x1ED7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4u, 0x0309u, 0x1ED5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F5u, 0x0301u, 0x1E4Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F5u, 0x0304u, 0x022Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F5u, 0x0308u, 0x1E4Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F6u, 0x0304u, 0x022Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00F8u, 0x0301u, 0x01FFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00FCu, 0x0300u, 0x01DCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00FCu, 0x0301u, 0x01D8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00FCu, 0x0304u, 0x01D6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x00FCu, 0x030Cu, 0x01DAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0102u, 0x0300u, 0x1EB0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0102u, 0x0301u, 0x1EAEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0102u, 0x0303u, 0x1EB4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0102u, 0x0309u, 0x1EB2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0103u, 0x0300u, 0x1EB1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0103u, 0x0301u, 0x1EAFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0103u, 0x0303u, 0x1EB5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0103u, 0x0309u, 0x1EB3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0112u, 0x0300u, 0x1E14u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0112u, 0x0301u, 0x1E16u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0113u, 0x0300u, 0x1E15u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0113u, 0x0301u, 0x1E17u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x014Cu, 0x0300u, 0x1E50u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x014Cu, 0x0301u, 0x1E52u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x014Du, 0x0300u, 0x1E51u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x014Du, 0x0301u, 0x1E53u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x015Au, 0x0307u, 0x1E64u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x015Bu, 0x0307u, 0x1E65u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0160u, 0x0307u, 0x1E66u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0161u, 0x0307u, 0x1E67u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0168u, 0x0301u, 0x1E78u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0169u, 0x0301u, 0x1E79u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x016Au, 0x0308u, 0x1E7Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x016Bu, 0x0308u, 0x1E7Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x017Fu, 0x0307u, 0x1E9Bu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0u, 0x0300u, 0x1EDCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0u, 0x0301u, 0x1EDAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0u, 0x0303u, 0x1EE0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0u, 0x0309u, 0x1EDEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0u, 0x0323u, 0x1EE2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1u, 0x0300u, 0x1EDDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1u, 0x0301u, 0x1EDBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1u, 0x0303u, 0x1EE1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1u, 0x0309u, 0x1EDFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1u, 0x0323u, 0x1EE3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01AFu, 0x0300u, 0x1EEAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01AFu, 0x0301u, 0x1EE8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01AFu, 0x0303u, 0x1EEEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01AFu, 0x0309u, 0x1EECu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01AFu, 0x0323u, 0x1EF0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0u, 0x0300u, 0x1EEBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0u, 0x0301u, 0x1EE9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0u, 0x0303u, 0x1EEFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0u, 0x0309u, 0x1EEDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0u, 0x0323u, 0x1EF1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01B7u, 0x030Cu, 0x01EEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01EAu, 0x0304u, 0x01ECu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x01EBu, 0x0304u, 0x01EDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0226u, 0x0304u, 0x01E0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0227u, 0x0304u, 0x01E1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0228u, 0x0306u, 0x1E1Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0229u, 0x0306u, 0x1E1Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x022Eu, 0x0304u, 0x0230u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x022Fu, 0x0304u, 0x0231u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0292u, 0x030Cu, 0x01EFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0308u, 0x0301u, 0x0000u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0300u, 0x1FBAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0301u, 0x0386u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0304u, 0x1FB9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0306u, 0x1FB8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0313u, 0x1F08u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0314u, 0x1F09u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0391u, 0x0345u, 0x1FBCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0395u, 0x0300u, 0x1FC8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0395u, 0x0301u, 0x0388u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0395u, 0x0313u, 0x1F18u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0395u, 0x0314u, 0x1F19u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0397u, 0x0300u, 0x1FCAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0397u, 0x0301u, 0x0389u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0397u, 0x0313u, 0x1F28u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0397u, 0x0314u, 0x1F29u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0397u, 0x0345u, 0x1FCCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0300u, 0x1FDAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0301u, 0x038Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0304u, 0x1FD9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0306u, 0x1FD8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0308u, 0x03AAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0313u, 0x1F38u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0399u, 0x0314u, 0x1F39u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x039Fu, 0x0300u, 0x1FF8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x039Fu, 0x0301u, 0x038Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x039Fu, 0x0313u, 0x1F48u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x039Fu, 0x0314u, 0x1F49u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A1u, 0x0314u, 0x1FECu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5u, 0x0300u, 0x1FEAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5u, 0x0301u, 0x038Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5u, 0x0304u, 0x1FE9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5u, 0x0306u, 0x1FE8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5u, 0x0308u, 0x03ABu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5u, 0x0314u, 0x1F59u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9u, 0x0300u, 0x1FFAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9u, 0x0301u, 0x038Fu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9u, 0x0313u, 0x1F68u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9u, 0x0314u, 0x1F69u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9u, 0x0345u, 0x1FFCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03ACu, 0x0345u, 0x1FB4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03AEu, 0x0345u, 0x1FC4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0300u, 0x1F70u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0301u, 0x03ACu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0304u, 0x1FB1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0306u, 0x1FB0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0313u, 0x1F00u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0314u, 0x1F01u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0342u, 0x1FB6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1u, 0x0345u, 0x1FB3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5u, 0x0300u, 0x1F72u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5u, 0x0301u, 0x03ADu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5u, 0x0313u, 0x1F10u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5u, 0x0314u, 0x1F11u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7u, 0x0300u, 0x1F74u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7u, 0x0301u, 0x03AEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7u, 0x0313u, 0x1F20u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7u, 0x0314u, 0x1F21u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7u, 0x0342u, 0x1FC6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7u, 0x0345u, 0x1FC3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0300u, 0x1F76u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0301u, 0x03AFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0304u, 0x1FD1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0306u, 0x1FD0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0308u, 0x03CAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0313u, 0x1F30u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0314u, 0x1F31u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9u, 0x0342u, 0x1FD6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03BFu, 0x0300u, 0x1F78u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03BFu, 0x0301u, 0x03CCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03BFu, 0x0313u, 0x1F40u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03BFu, 0x0314u, 0x1F41u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C1u, 0x0313u, 0x1FE4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C1u, 0x0314u, 0x1FE5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0300u, 0x1F7Au), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0301u, 0x03CDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0304u, 0x1FE1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0306u, 0x1FE0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0308u, 0x03CBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0313u, 0x1F50u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0314u, 0x1F51u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5u, 0x0342u, 0x1FE6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9u, 0x0300u, 0x1F7Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9u, 0x0301u, 0x03CEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9u, 0x0313u, 0x1F60u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9u, 0x0314u, 0x1F61u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9u, 0x0342u, 0x1FF6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9u, 0x0345u, 0x1FF3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CAu, 0x0300u, 0x1FD2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CAu, 0x0301u, 0x0390u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CAu, 0x0342u, 0x1FD7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CBu, 0x0300u, 0x1FE2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CBu, 0x0301u, 0x03B0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CBu, 0x0342u, 0x1FE7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03CEu, 0x0345u, 0x1FF4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03D2u, 0x0301u, 0x03D3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x03D2u, 0x0308u, 0x03D4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0406u, 0x0308u, 0x0407u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0410u, 0x0306u, 0x04D0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0410u, 0x0308u, 0x04D2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0413u, 0x0301u, 0x0403u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0415u, 0x0300u, 0x0400u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0415u, 0x0306u, 0x04D6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0415u, 0x0308u, 0x0401u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0416u, 0x0306u, 0x04C1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0416u, 0x0308u, 0x04DCu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0417u, 0x0308u, 0x04DEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0418u, 0x0300u, 0x040Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0418u, 0x0304u, 0x04E2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0418u, 0x0306u, 0x0419u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0418u, 0x0308u, 0x04E4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x041Au, 0x0301u, 0x040Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x041Eu, 0x0308u, 0x04E6u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0423u, 0x0304u, 0x04EEu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0423u, 0x0306u, 0x040Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0423u, 0x0308u, 0x04F0u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0423u, 0x030Bu, 0x04F2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0427u, 0x0308u, 0x04F4u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x042Bu, 0x0308u, 0x04F8u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x042Du, 0x0308u, 0x04ECu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0430u, 0x0306u, 0x04D1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0430u, 0x0308u, 0x04D3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0433u, 0x0301u, 0x0453u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0435u, 0x0300u, 0x0450u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0435u, 0x0306u, 0x04D7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0435u, 0x0308u, 0x0451u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0436u, 0x0306u, 0x04C2u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0436u, 0x0308u, 0x04DDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0437u, 0x0308u, 0x04DFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0438u, 0x0300u, 0x045Du), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0438u, 0x0304u, 0x04E3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0438u, 0x0306u, 0x0439u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0438u, 0x0308u, 0x04E5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x043Au, 0x0301u, 0x045Cu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x043Eu, 0x0308u, 0x04E7u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0443u, 0x0304u, 0x04EFu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0443u, 0x0306u, 0x045Eu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0443u, 0x0308u, 0x04F1u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0443u, 0x030Bu, 0x04F3u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0447u, 0x0308u, 0x04F5u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x044Bu, 0x0308u, 0x04F9u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x044Du, 0x0308u, 0x04EDu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0456u, 0x0308u, 0x0457u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0474u, 0x030Fu, 0x0476u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x0475u, 0x030Fu, 0x0477u), - HB_CODEPOINT_ENCODE3_11_7_14 (0x04D8u, 0x0308u, 0x04DAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x04D9u, 0x0308u, 0x04DBu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x04E8u, 0x0308u, 0x04EAu), - HB_CODEPOINT_ENCODE3_11_7_14 (0x04E9u, 0x0308u, 0x04EBu), + HB_CODEPOINT_ENCODE3_11_7_14 (0x003C, 0x0338, 0x226E),HB_CODEPOINT_ENCODE3_11_7_14 (0x003D, 0x0338, 0x2260), + HB_CODEPOINT_ENCODE3_11_7_14 (0x003E, 0x0338, 0x226F),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0300, 0x00C0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0301, 0x00C1),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0302, 0x00C2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0303, 0x00C3),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0304, 0x0100), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0306, 0x0102),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0307, 0x0226), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0308, 0x00C4),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0309, 0x1EA2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x030A, 0x00C5),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x030C, 0x01CD), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x030F, 0x0200),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0311, 0x0202), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0323, 0x1EA0),HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0325, 0x1E00), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0041, 0x0328, 0x0104),HB_CODEPOINT_ENCODE3_11_7_14 (0x0042, 0x0307, 0x1E02), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0042, 0x0323, 0x1E04),HB_CODEPOINT_ENCODE3_11_7_14 (0x0042, 0x0331, 0x1E06), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0043, 0x0301, 0x0106),HB_CODEPOINT_ENCODE3_11_7_14 (0x0043, 0x0302, 0x0108), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0043, 0x0307, 0x010A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0043, 0x030C, 0x010C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0043, 0x0327, 0x00C7),HB_CODEPOINT_ENCODE3_11_7_14 (0x0044, 0x0307, 0x1E0A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0044, 0x030C, 0x010E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0044, 0x0323, 0x1E0C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0044, 0x0327, 0x1E10),HB_CODEPOINT_ENCODE3_11_7_14 (0x0044, 0x032D, 0x1E12), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0044, 0x0331, 0x1E0E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0300, 0x00C8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0301, 0x00C9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0302, 0x00CA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0303, 0x1EBC),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0304, 0x0112), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0306, 0x0114),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0307, 0x0116), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0308, 0x00CB),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0309, 0x1EBA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x030C, 0x011A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x030F, 0x0204), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0311, 0x0206),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0323, 0x1EB8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0327, 0x0228),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0328, 0x0118), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x032D, 0x1E18),HB_CODEPOINT_ENCODE3_11_7_14 (0x0045, 0x0330, 0x1E1A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0046, 0x0307, 0x1E1E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x0301, 0x01F4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x0302, 0x011C),HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x0304, 0x1E20), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x0306, 0x011E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x0307, 0x0120), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x030C, 0x01E6),HB_CODEPOINT_ENCODE3_11_7_14 (0x0047, 0x0327, 0x0122), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x0302, 0x0124),HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x0307, 0x1E22), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x0308, 0x1E26),HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x030C, 0x021E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x0323, 0x1E24),HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x0327, 0x1E28), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0048, 0x032E, 0x1E2A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0300, 0x00CC), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0301, 0x00CD),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0302, 0x00CE), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0303, 0x0128),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0304, 0x012A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0306, 0x012C),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0307, 0x0130), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0308, 0x00CF),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0309, 0x1EC8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x030C, 0x01CF),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x030F, 0x0208), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0311, 0x020A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0323, 0x1ECA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0328, 0x012E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0049, 0x0330, 0x1E2C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004A, 0x0302, 0x0134),HB_CODEPOINT_ENCODE3_11_7_14 (0x004B, 0x0301, 0x1E30), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004B, 0x030C, 0x01E8),HB_CODEPOINT_ENCODE3_11_7_14 (0x004B, 0x0323, 0x1E32), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004B, 0x0327, 0x0136),HB_CODEPOINT_ENCODE3_11_7_14 (0x004B, 0x0331, 0x1E34), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004C, 0x0301, 0x0139),HB_CODEPOINT_ENCODE3_11_7_14 (0x004C, 0x030C, 0x013D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004C, 0x0323, 0x1E36),HB_CODEPOINT_ENCODE3_11_7_14 (0x004C, 0x0327, 0x013B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004C, 0x032D, 0x1E3C),HB_CODEPOINT_ENCODE3_11_7_14 (0x004C, 0x0331, 0x1E3A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004D, 0x0301, 0x1E3E),HB_CODEPOINT_ENCODE3_11_7_14 (0x004D, 0x0307, 0x1E40), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004D, 0x0323, 0x1E42),HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0300, 0x01F8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0301, 0x0143),HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0303, 0x00D1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0307, 0x1E44),HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x030C, 0x0147), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0323, 0x1E46),HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0327, 0x0145), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x032D, 0x1E4A),HB_CODEPOINT_ENCODE3_11_7_14 (0x004E, 0x0331, 0x1E48), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0300, 0x00D2),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0301, 0x00D3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0302, 0x00D4),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0303, 0x00D5), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0304, 0x014C),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0306, 0x014E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0307, 0x022E),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0308, 0x00D6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0309, 0x1ECE),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x030B, 0x0150), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x030C, 0x01D1),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x030F, 0x020C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0311, 0x020E),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x031B, 0x01A0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0323, 0x1ECC),HB_CODEPOINT_ENCODE3_11_7_14 (0x004F, 0x0328, 0x01EA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0050, 0x0301, 0x1E54),HB_CODEPOINT_ENCODE3_11_7_14 (0x0050, 0x0307, 0x1E56), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x0301, 0x0154),HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x0307, 0x1E58), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x030C, 0x0158),HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x030F, 0x0210), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x0311, 0x0212),HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x0323, 0x1E5A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x0327, 0x0156),HB_CODEPOINT_ENCODE3_11_7_14 (0x0052, 0x0331, 0x1E5E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x0301, 0x015A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x0302, 0x015C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x0307, 0x1E60),HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x030C, 0x0160), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x0323, 0x1E62),HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x0326, 0x0218), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0053, 0x0327, 0x015E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x0307, 0x1E6A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x030C, 0x0164),HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x0323, 0x1E6C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x0326, 0x021A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x0327, 0x0162), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x032D, 0x1E70),HB_CODEPOINT_ENCODE3_11_7_14 (0x0054, 0x0331, 0x1E6E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0300, 0x00D9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0301, 0x00DA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0302, 0x00DB),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0303, 0x0168), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0304, 0x016A),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0306, 0x016C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0308, 0x00DC),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0309, 0x1EE6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x030A, 0x016E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x030B, 0x0170), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x030C, 0x01D3),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x030F, 0x0214), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0311, 0x0216),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x031B, 0x01AF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0323, 0x1EE4),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0324, 0x1E72), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0328, 0x0172),HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x032D, 0x1E76), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0055, 0x0330, 0x1E74),HB_CODEPOINT_ENCODE3_11_7_14 (0x0056, 0x0303, 0x1E7C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0056, 0x0323, 0x1E7E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0057, 0x0300, 0x1E80), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0057, 0x0301, 0x1E82),HB_CODEPOINT_ENCODE3_11_7_14 (0x0057, 0x0302, 0x0174), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0057, 0x0307, 0x1E86),HB_CODEPOINT_ENCODE3_11_7_14 (0x0057, 0x0308, 0x1E84), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0057, 0x0323, 0x1E88),HB_CODEPOINT_ENCODE3_11_7_14 (0x0058, 0x0307, 0x1E8A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0058, 0x0308, 0x1E8C),HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0300, 0x1EF2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0301, 0x00DD),HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0302, 0x0176), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0303, 0x1EF8),HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0304, 0x0232), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0307, 0x1E8E),HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0308, 0x0178), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0309, 0x1EF6),HB_CODEPOINT_ENCODE3_11_7_14 (0x0059, 0x0323, 0x1EF4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x005A, 0x0301, 0x0179),HB_CODEPOINT_ENCODE3_11_7_14 (0x005A, 0x0302, 0x1E90), + HB_CODEPOINT_ENCODE3_11_7_14 (0x005A, 0x0307, 0x017B),HB_CODEPOINT_ENCODE3_11_7_14 (0x005A, 0x030C, 0x017D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x005A, 0x0323, 0x1E92),HB_CODEPOINT_ENCODE3_11_7_14 (0x005A, 0x0331, 0x1E94), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0300, 0x00E0),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0301, 0x00E1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0302, 0x00E2),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0303, 0x00E3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0304, 0x0101),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0306, 0x0103), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0307, 0x0227),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0308, 0x00E4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0309, 0x1EA3),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x030A, 0x00E5), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x030C, 0x01CE),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x030F, 0x0201), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0311, 0x0203),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0323, 0x1EA1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0325, 0x1E01),HB_CODEPOINT_ENCODE3_11_7_14 (0x0061, 0x0328, 0x0105), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0062, 0x0307, 0x1E03),HB_CODEPOINT_ENCODE3_11_7_14 (0x0062, 0x0323, 0x1E05), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0062, 0x0331, 0x1E07),HB_CODEPOINT_ENCODE3_11_7_14 (0x0063, 0x0301, 0x0107), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0063, 0x0302, 0x0109),HB_CODEPOINT_ENCODE3_11_7_14 (0x0063, 0x0307, 0x010B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0063, 0x030C, 0x010D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0063, 0x0327, 0x00E7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0064, 0x0307, 0x1E0B),HB_CODEPOINT_ENCODE3_11_7_14 (0x0064, 0x030C, 0x010F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0064, 0x0323, 0x1E0D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0064, 0x0327, 0x1E11), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0064, 0x032D, 0x1E13),HB_CODEPOINT_ENCODE3_11_7_14 (0x0064, 0x0331, 0x1E0F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0300, 0x00E8),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0301, 0x00E9), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0302, 0x00EA),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0303, 0x1EBD), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0304, 0x0113),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0306, 0x0115), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0307, 0x0117),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0308, 0x00EB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0309, 0x1EBB),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x030C, 0x011B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x030F, 0x0205),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0311, 0x0207), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0323, 0x1EB9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0327, 0x0229), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0328, 0x0119),HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x032D, 0x1E19), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0065, 0x0330, 0x1E1B),HB_CODEPOINT_ENCODE3_11_7_14 (0x0066, 0x0307, 0x1E1F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x0301, 0x01F5),HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x0302, 0x011D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x0304, 0x1E21),HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x0306, 0x011F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x0307, 0x0121),HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x030C, 0x01E7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0067, 0x0327, 0x0123),HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x0302, 0x0125), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x0307, 0x1E23),HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x0308, 0x1E27), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x030C, 0x021F),HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x0323, 0x1E25), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x0327, 0x1E29),HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x032E, 0x1E2B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0068, 0x0331, 0x1E96),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0300, 0x00EC), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0301, 0x00ED),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0302, 0x00EE), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0303, 0x0129),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0304, 0x012B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0306, 0x012D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0308, 0x00EF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0309, 0x1EC9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x030C, 0x01D0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x030F, 0x0209),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0311, 0x020B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0323, 0x1ECB),HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0328, 0x012F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0069, 0x0330, 0x1E2D),HB_CODEPOINT_ENCODE3_11_7_14 (0x006A, 0x0302, 0x0135), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006A, 0x030C, 0x01F0),HB_CODEPOINT_ENCODE3_11_7_14 (0x006B, 0x0301, 0x1E31), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006B, 0x030C, 0x01E9),HB_CODEPOINT_ENCODE3_11_7_14 (0x006B, 0x0323, 0x1E33), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006B, 0x0327, 0x0137),HB_CODEPOINT_ENCODE3_11_7_14 (0x006B, 0x0331, 0x1E35), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006C, 0x0301, 0x013A),HB_CODEPOINT_ENCODE3_11_7_14 (0x006C, 0x030C, 0x013E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006C, 0x0323, 0x1E37),HB_CODEPOINT_ENCODE3_11_7_14 (0x006C, 0x0327, 0x013C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006C, 0x032D, 0x1E3D),HB_CODEPOINT_ENCODE3_11_7_14 (0x006C, 0x0331, 0x1E3B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006D, 0x0301, 0x1E3F),HB_CODEPOINT_ENCODE3_11_7_14 (0x006D, 0x0307, 0x1E41), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006D, 0x0323, 0x1E43),HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0300, 0x01F9), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0301, 0x0144),HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0303, 0x00F1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0307, 0x1E45),HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x030C, 0x0148), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0323, 0x1E47),HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0327, 0x0146), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x032D, 0x1E4B),HB_CODEPOINT_ENCODE3_11_7_14 (0x006E, 0x0331, 0x1E49), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0300, 0x00F2),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0301, 0x00F3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0302, 0x00F4),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0303, 0x00F5), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0304, 0x014D),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0306, 0x014F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0307, 0x022F),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0308, 0x00F6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0309, 0x1ECF),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x030B, 0x0151), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x030C, 0x01D2),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x030F, 0x020D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0311, 0x020F),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x031B, 0x01A1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0323, 0x1ECD),HB_CODEPOINT_ENCODE3_11_7_14 (0x006F, 0x0328, 0x01EB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0070, 0x0301, 0x1E55),HB_CODEPOINT_ENCODE3_11_7_14 (0x0070, 0x0307, 0x1E57), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x0301, 0x0155),HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x0307, 0x1E59), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x030C, 0x0159),HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x030F, 0x0211), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x0311, 0x0213),HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x0323, 0x1E5B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x0327, 0x0157),HB_CODEPOINT_ENCODE3_11_7_14 (0x0072, 0x0331, 0x1E5F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x0301, 0x015B),HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x0302, 0x015D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x0307, 0x1E61),HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x030C, 0x0161), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x0323, 0x1E63),HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x0326, 0x0219), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0073, 0x0327, 0x015F),HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x0307, 0x1E6B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x0308, 0x1E97),HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x030C, 0x0165), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x0323, 0x1E6D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x0326, 0x021B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x0327, 0x0163),HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x032D, 0x1E71), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0074, 0x0331, 0x1E6F),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0300, 0x00F9), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0301, 0x00FA),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0302, 0x00FB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0303, 0x0169),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0304, 0x016B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0306, 0x016D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0308, 0x00FC), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0309, 0x1EE7),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x030A, 0x016F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x030B, 0x0171),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x030C, 0x01D4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x030F, 0x0215),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0311, 0x0217), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x031B, 0x01B0),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0323, 0x1EE5), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0324, 0x1E73),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0328, 0x0173), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x032D, 0x1E77),HB_CODEPOINT_ENCODE3_11_7_14 (0x0075, 0x0330, 0x1E75), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0076, 0x0303, 0x1E7D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0076, 0x0323, 0x1E7F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x0300, 0x1E81),HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x0301, 0x1E83), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x0302, 0x0175),HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x0307, 0x1E87), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x0308, 0x1E85),HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x030A, 0x1E98), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0077, 0x0323, 0x1E89),HB_CODEPOINT_ENCODE3_11_7_14 (0x0078, 0x0307, 0x1E8B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0078, 0x0308, 0x1E8D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0300, 0x1EF3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0301, 0x00FD),HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0302, 0x0177), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0303, 0x1EF9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0304, 0x0233), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0307, 0x1E8F),HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0308, 0x00FF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0309, 0x1EF7),HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x030A, 0x1E99), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0079, 0x0323, 0x1EF5),HB_CODEPOINT_ENCODE3_11_7_14 (0x007A, 0x0301, 0x017A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x007A, 0x0302, 0x1E91),HB_CODEPOINT_ENCODE3_11_7_14 (0x007A, 0x0307, 0x017C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x007A, 0x030C, 0x017E),HB_CODEPOINT_ENCODE3_11_7_14 (0x007A, 0x0323, 0x1E93), + HB_CODEPOINT_ENCODE3_11_7_14 (0x007A, 0x0331, 0x1E95),HB_CODEPOINT_ENCODE3_11_7_14 (0x00A8, 0x0300, 0x1FED), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00A8, 0x0301, 0x0385),HB_CODEPOINT_ENCODE3_11_7_14 (0x00A8, 0x0342, 0x1FC1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2, 0x0300, 0x1EA6),HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2, 0x0301, 0x1EA4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2, 0x0303, 0x1EAA),HB_CODEPOINT_ENCODE3_11_7_14 (0x00C2, 0x0309, 0x1EA8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00C4, 0x0304, 0x01DE),HB_CODEPOINT_ENCODE3_11_7_14 (0x00C5, 0x0301, 0x01FA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00C6, 0x0301, 0x01FC),HB_CODEPOINT_ENCODE3_11_7_14 (0x00C6, 0x0304, 0x01E2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00C7, 0x0301, 0x1E08),HB_CODEPOINT_ENCODE3_11_7_14 (0x00CA, 0x0300, 0x1EC0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00CA, 0x0301, 0x1EBE),HB_CODEPOINT_ENCODE3_11_7_14 (0x00CA, 0x0303, 0x1EC4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00CA, 0x0309, 0x1EC2),HB_CODEPOINT_ENCODE3_11_7_14 (0x00CF, 0x0301, 0x1E2E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4, 0x0300, 0x1ED2),HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4, 0x0301, 0x1ED0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4, 0x0303, 0x1ED6),HB_CODEPOINT_ENCODE3_11_7_14 (0x00D4, 0x0309, 0x1ED4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00D5, 0x0301, 0x1E4C),HB_CODEPOINT_ENCODE3_11_7_14 (0x00D5, 0x0304, 0x022C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00D5, 0x0308, 0x1E4E),HB_CODEPOINT_ENCODE3_11_7_14 (0x00D6, 0x0304, 0x022A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00D8, 0x0301, 0x01FE),HB_CODEPOINT_ENCODE3_11_7_14 (0x00DC, 0x0300, 0x01DB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00DC, 0x0301, 0x01D7),HB_CODEPOINT_ENCODE3_11_7_14 (0x00DC, 0x0304, 0x01D5), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00DC, 0x030C, 0x01D9),HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2, 0x0300, 0x1EA7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2, 0x0301, 0x1EA5),HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2, 0x0303, 0x1EAB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00E2, 0x0309, 0x1EA9),HB_CODEPOINT_ENCODE3_11_7_14 (0x00E4, 0x0304, 0x01DF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00E5, 0x0301, 0x01FB),HB_CODEPOINT_ENCODE3_11_7_14 (0x00E6, 0x0301, 0x01FD), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00E6, 0x0304, 0x01E3),HB_CODEPOINT_ENCODE3_11_7_14 (0x00E7, 0x0301, 0x1E09), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00EA, 0x0300, 0x1EC1),HB_CODEPOINT_ENCODE3_11_7_14 (0x00EA, 0x0301, 0x1EBF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00EA, 0x0303, 0x1EC5),HB_CODEPOINT_ENCODE3_11_7_14 (0x00EA, 0x0309, 0x1EC3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00EF, 0x0301, 0x1E2F),HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4, 0x0300, 0x1ED3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4, 0x0301, 0x1ED1),HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4, 0x0303, 0x1ED7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00F4, 0x0309, 0x1ED5),HB_CODEPOINT_ENCODE3_11_7_14 (0x00F5, 0x0301, 0x1E4D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00F5, 0x0304, 0x022D),HB_CODEPOINT_ENCODE3_11_7_14 (0x00F5, 0x0308, 0x1E4F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00F6, 0x0304, 0x022B),HB_CODEPOINT_ENCODE3_11_7_14 (0x00F8, 0x0301, 0x01FF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00FC, 0x0300, 0x01DC),HB_CODEPOINT_ENCODE3_11_7_14 (0x00FC, 0x0301, 0x01D8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x00FC, 0x0304, 0x01D6),HB_CODEPOINT_ENCODE3_11_7_14 (0x00FC, 0x030C, 0x01DA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0102, 0x0300, 0x1EB0),HB_CODEPOINT_ENCODE3_11_7_14 (0x0102, 0x0301, 0x1EAE), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0102, 0x0303, 0x1EB4),HB_CODEPOINT_ENCODE3_11_7_14 (0x0102, 0x0309, 0x1EB2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0103, 0x0300, 0x1EB1),HB_CODEPOINT_ENCODE3_11_7_14 (0x0103, 0x0301, 0x1EAF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0103, 0x0303, 0x1EB5),HB_CODEPOINT_ENCODE3_11_7_14 (0x0103, 0x0309, 0x1EB3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0112, 0x0300, 0x1E14),HB_CODEPOINT_ENCODE3_11_7_14 (0x0112, 0x0301, 0x1E16), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0113, 0x0300, 0x1E15),HB_CODEPOINT_ENCODE3_11_7_14 (0x0113, 0x0301, 0x1E17), + HB_CODEPOINT_ENCODE3_11_7_14 (0x014C, 0x0300, 0x1E50),HB_CODEPOINT_ENCODE3_11_7_14 (0x014C, 0x0301, 0x1E52), + HB_CODEPOINT_ENCODE3_11_7_14 (0x014D, 0x0300, 0x1E51),HB_CODEPOINT_ENCODE3_11_7_14 (0x014D, 0x0301, 0x1E53), + HB_CODEPOINT_ENCODE3_11_7_14 (0x015A, 0x0307, 0x1E64),HB_CODEPOINT_ENCODE3_11_7_14 (0x015B, 0x0307, 0x1E65), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0160, 0x0307, 0x1E66),HB_CODEPOINT_ENCODE3_11_7_14 (0x0161, 0x0307, 0x1E67), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0168, 0x0301, 0x1E78),HB_CODEPOINT_ENCODE3_11_7_14 (0x0169, 0x0301, 0x1E79), + HB_CODEPOINT_ENCODE3_11_7_14 (0x016A, 0x0308, 0x1E7A),HB_CODEPOINT_ENCODE3_11_7_14 (0x016B, 0x0308, 0x1E7B), + HB_CODEPOINT_ENCODE3_11_7_14 (0x017F, 0x0307, 0x1E9B),HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0, 0x0300, 0x1EDC), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0, 0x0301, 0x1EDA),HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0, 0x0303, 0x1EE0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0, 0x0309, 0x1EDE),HB_CODEPOINT_ENCODE3_11_7_14 (0x01A0, 0x0323, 0x1EE2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1, 0x0300, 0x1EDD),HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1, 0x0301, 0x1EDB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1, 0x0303, 0x1EE1),HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1, 0x0309, 0x1EDF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01A1, 0x0323, 0x1EE3),HB_CODEPOINT_ENCODE3_11_7_14 (0x01AF, 0x0300, 0x1EEA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01AF, 0x0301, 0x1EE8),HB_CODEPOINT_ENCODE3_11_7_14 (0x01AF, 0x0303, 0x1EEE), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01AF, 0x0309, 0x1EEC),HB_CODEPOINT_ENCODE3_11_7_14 (0x01AF, 0x0323, 0x1EF0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0, 0x0300, 0x1EEB),HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0, 0x0301, 0x1EE9), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0, 0x0303, 0x1EEF),HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0, 0x0309, 0x1EED), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01B0, 0x0323, 0x1EF1),HB_CODEPOINT_ENCODE3_11_7_14 (0x01B7, 0x030C, 0x01EE), + HB_CODEPOINT_ENCODE3_11_7_14 (0x01EA, 0x0304, 0x01EC),HB_CODEPOINT_ENCODE3_11_7_14 (0x01EB, 0x0304, 0x01ED), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0226, 0x0304, 0x01E0),HB_CODEPOINT_ENCODE3_11_7_14 (0x0227, 0x0304, 0x01E1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0228, 0x0306, 0x1E1C),HB_CODEPOINT_ENCODE3_11_7_14 (0x0229, 0x0306, 0x1E1D), + HB_CODEPOINT_ENCODE3_11_7_14 (0x022E, 0x0304, 0x0230),HB_CODEPOINT_ENCODE3_11_7_14 (0x022F, 0x0304, 0x0231), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0292, 0x030C, 0x01EF),HB_CODEPOINT_ENCODE3_11_7_14 (0x0308, 0x0301, 0x0000), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0300, 0x1FBA),HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0301, 0x0386), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0304, 0x1FB9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0306, 0x1FB8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0313, 0x1F08),HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0314, 0x1F09), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0391, 0x0345, 0x1FBC),HB_CODEPOINT_ENCODE3_11_7_14 (0x0395, 0x0300, 0x1FC8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0395, 0x0301, 0x0388),HB_CODEPOINT_ENCODE3_11_7_14 (0x0395, 0x0313, 0x1F18), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0395, 0x0314, 0x1F19),HB_CODEPOINT_ENCODE3_11_7_14 (0x0397, 0x0300, 0x1FCA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0397, 0x0301, 0x0389),HB_CODEPOINT_ENCODE3_11_7_14 (0x0397, 0x0313, 0x1F28), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0397, 0x0314, 0x1F29),HB_CODEPOINT_ENCODE3_11_7_14 (0x0397, 0x0345, 0x1FCC), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0300, 0x1FDA),HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0301, 0x038A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0304, 0x1FD9),HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0306, 0x1FD8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0308, 0x03AA),HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0313, 0x1F38), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0399, 0x0314, 0x1F39),HB_CODEPOINT_ENCODE3_11_7_14 (0x039F, 0x0300, 0x1FF8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x039F, 0x0301, 0x038C),HB_CODEPOINT_ENCODE3_11_7_14 (0x039F, 0x0313, 0x1F48), + HB_CODEPOINT_ENCODE3_11_7_14 (0x039F, 0x0314, 0x1F49),HB_CODEPOINT_ENCODE3_11_7_14 (0x03A1, 0x0314, 0x1FEC), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5, 0x0300, 0x1FEA),HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5, 0x0301, 0x038E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5, 0x0304, 0x1FE9),HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5, 0x0306, 0x1FE8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5, 0x0308, 0x03AB),HB_CODEPOINT_ENCODE3_11_7_14 (0x03A5, 0x0314, 0x1F59), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9, 0x0300, 0x1FFA),HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9, 0x0301, 0x038F), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9, 0x0313, 0x1F68),HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9, 0x0314, 0x1F69), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03A9, 0x0345, 0x1FFC),HB_CODEPOINT_ENCODE3_11_7_14 (0x03AC, 0x0345, 0x1FB4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03AE, 0x0345, 0x1FC4),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0300, 0x1F70), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0301, 0x03AC),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0304, 0x1FB1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0306, 0x1FB0),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0313, 0x1F00), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0314, 0x1F01),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0342, 0x1FB6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B1, 0x0345, 0x1FB3),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5, 0x0300, 0x1F72), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5, 0x0301, 0x03AD),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5, 0x0313, 0x1F10), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B5, 0x0314, 0x1F11),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7, 0x0300, 0x1F74), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7, 0x0301, 0x03AE),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7, 0x0313, 0x1F20), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7, 0x0314, 0x1F21),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7, 0x0342, 0x1FC6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B7, 0x0345, 0x1FC3),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0300, 0x1F76), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0301, 0x03AF),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0304, 0x1FD1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0306, 0x1FD0),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0308, 0x03CA), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0313, 0x1F30),HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0314, 0x1F31), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03B9, 0x0342, 0x1FD6),HB_CODEPOINT_ENCODE3_11_7_14 (0x03BF, 0x0300, 0x1F78), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03BF, 0x0301, 0x03CC),HB_CODEPOINT_ENCODE3_11_7_14 (0x03BF, 0x0313, 0x1F40), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03BF, 0x0314, 0x1F41),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C1, 0x0313, 0x1FE4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C1, 0x0314, 0x1FE5),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0300, 0x1F7A), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0301, 0x03CD),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0304, 0x1FE1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0306, 0x1FE0),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0308, 0x03CB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0313, 0x1F50),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0314, 0x1F51), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C5, 0x0342, 0x1FE6),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9, 0x0300, 0x1F7C), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9, 0x0301, 0x03CE),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9, 0x0313, 0x1F60), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9, 0x0314, 0x1F61),HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9, 0x0342, 0x1FF6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03C9, 0x0345, 0x1FF3),HB_CODEPOINT_ENCODE3_11_7_14 (0x03CA, 0x0300, 0x1FD2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03CA, 0x0301, 0x0390),HB_CODEPOINT_ENCODE3_11_7_14 (0x03CA, 0x0342, 0x1FD7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03CB, 0x0300, 0x1FE2),HB_CODEPOINT_ENCODE3_11_7_14 (0x03CB, 0x0301, 0x03B0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03CB, 0x0342, 0x1FE7),HB_CODEPOINT_ENCODE3_11_7_14 (0x03CE, 0x0345, 0x1FF4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x03D2, 0x0301, 0x03D3),HB_CODEPOINT_ENCODE3_11_7_14 (0x03D2, 0x0308, 0x03D4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0406, 0x0308, 0x0407),HB_CODEPOINT_ENCODE3_11_7_14 (0x0410, 0x0306, 0x04D0), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0410, 0x0308, 0x04D2),HB_CODEPOINT_ENCODE3_11_7_14 (0x0413, 0x0301, 0x0403), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0415, 0x0300, 0x0400),HB_CODEPOINT_ENCODE3_11_7_14 (0x0415, 0x0306, 0x04D6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0415, 0x0308, 0x0401),HB_CODEPOINT_ENCODE3_11_7_14 (0x0416, 0x0306, 0x04C1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0416, 0x0308, 0x04DC),HB_CODEPOINT_ENCODE3_11_7_14 (0x0417, 0x0308, 0x04DE), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0418, 0x0300, 0x040D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0418, 0x0304, 0x04E2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0418, 0x0306, 0x0419),HB_CODEPOINT_ENCODE3_11_7_14 (0x0418, 0x0308, 0x04E4), + HB_CODEPOINT_ENCODE3_11_7_14 (0x041A, 0x0301, 0x040C),HB_CODEPOINT_ENCODE3_11_7_14 (0x041E, 0x0308, 0x04E6), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0423, 0x0304, 0x04EE),HB_CODEPOINT_ENCODE3_11_7_14 (0x0423, 0x0306, 0x040E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0423, 0x0308, 0x04F0),HB_CODEPOINT_ENCODE3_11_7_14 (0x0423, 0x030B, 0x04F2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0427, 0x0308, 0x04F4),HB_CODEPOINT_ENCODE3_11_7_14 (0x042B, 0x0308, 0x04F8), + HB_CODEPOINT_ENCODE3_11_7_14 (0x042D, 0x0308, 0x04EC),HB_CODEPOINT_ENCODE3_11_7_14 (0x0430, 0x0306, 0x04D1), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0430, 0x0308, 0x04D3),HB_CODEPOINT_ENCODE3_11_7_14 (0x0433, 0x0301, 0x0453), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0435, 0x0300, 0x0450),HB_CODEPOINT_ENCODE3_11_7_14 (0x0435, 0x0306, 0x04D7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0435, 0x0308, 0x0451),HB_CODEPOINT_ENCODE3_11_7_14 (0x0436, 0x0306, 0x04C2), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0436, 0x0308, 0x04DD),HB_CODEPOINT_ENCODE3_11_7_14 (0x0437, 0x0308, 0x04DF), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0438, 0x0300, 0x045D),HB_CODEPOINT_ENCODE3_11_7_14 (0x0438, 0x0304, 0x04E3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0438, 0x0306, 0x0439),HB_CODEPOINT_ENCODE3_11_7_14 (0x0438, 0x0308, 0x04E5), + HB_CODEPOINT_ENCODE3_11_7_14 (0x043A, 0x0301, 0x045C),HB_CODEPOINT_ENCODE3_11_7_14 (0x043E, 0x0308, 0x04E7), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0443, 0x0304, 0x04EF),HB_CODEPOINT_ENCODE3_11_7_14 (0x0443, 0x0306, 0x045E), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0443, 0x0308, 0x04F1),HB_CODEPOINT_ENCODE3_11_7_14 (0x0443, 0x030B, 0x04F3), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0447, 0x0308, 0x04F5),HB_CODEPOINT_ENCODE3_11_7_14 (0x044B, 0x0308, 0x04F9), + HB_CODEPOINT_ENCODE3_11_7_14 (0x044D, 0x0308, 0x04ED),HB_CODEPOINT_ENCODE3_11_7_14 (0x0456, 0x0308, 0x0457), + HB_CODEPOINT_ENCODE3_11_7_14 (0x0474, 0x030F, 0x0476),HB_CODEPOINT_ENCODE3_11_7_14 (0x0475, 0x030F, 0x0477), + HB_CODEPOINT_ENCODE3_11_7_14 (0x04D8, 0x0308, 0x04DA),HB_CODEPOINT_ENCODE3_11_7_14 (0x04D9, 0x0308, 0x04DB), + HB_CODEPOINT_ENCODE3_11_7_14 (0x04E8, 0x0308, 0x04EA),HB_CODEPOINT_ENCODE3_11_7_14 (0x04E9, 0x0308, 0x04EB), }; -static const uint64_t -_hb_ucd_dm2_u64_map[408] = +static const uint64_t _hb_ucd_dm2_u64_map[408]= { - HB_CODEPOINT_ENCODE3 (0x05D0u, 0x05B7u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D0u, 0x05B8u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05D0u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D1u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05D1u, 0x05BFu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D2u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05D3u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D4u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05D5u, 0x05B9u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D5u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05D6u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D8u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05D9u, 0x05B4u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05D9u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05DAu, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05DBu, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05DBu, 0x05BFu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05DCu, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05DEu, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05E0u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05E1u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05E3u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05E4u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05E4u, 0x05BFu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05E6u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05E7u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05E8u, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05E9u, 0x05BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05E9u, 0x05C1u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05E9u, 0x05C2u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x05EAu, 0x05BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x05F2u, 0x05B7u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0627u, 0x0653u, 0x0622u), HB_CODEPOINT_ENCODE3 (0x0627u, 0x0654u, 0x0623u), - HB_CODEPOINT_ENCODE3 (0x0627u, 0x0655u, 0x0625u), HB_CODEPOINT_ENCODE3 (0x0648u, 0x0654u, 0x0624u), - HB_CODEPOINT_ENCODE3 (0x064Au, 0x0654u, 0x0626u), HB_CODEPOINT_ENCODE3 (0x06C1u, 0x0654u, 0x06C2u), - HB_CODEPOINT_ENCODE3 (0x06D2u, 0x0654u, 0x06D3u), HB_CODEPOINT_ENCODE3 (0x06D5u, 0x0654u, 0x06C0u), - HB_CODEPOINT_ENCODE3 (0x0915u, 0x093Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0916u, 0x093Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0917u, 0x093Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x091Cu, 0x093Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0921u, 0x093Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0922u, 0x093Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0928u, 0x093Cu, 0x0929u), HB_CODEPOINT_ENCODE3 (0x092Bu, 0x093Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x092Fu, 0x093Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0930u, 0x093Cu, 0x0931u), - HB_CODEPOINT_ENCODE3 (0x0933u, 0x093Cu, 0x0934u), HB_CODEPOINT_ENCODE3 (0x09A1u, 0x09BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x09A2u, 0x09BCu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x09AFu, 0x09BCu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x09C7u, 0x09BEu, 0x09CBu), HB_CODEPOINT_ENCODE3 (0x09C7u, 0x09D7u, 0x09CCu), - HB_CODEPOINT_ENCODE3 (0x0A16u, 0x0A3Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0A17u, 0x0A3Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0A1Cu, 0x0A3Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0A2Bu, 0x0A3Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0A32u, 0x0A3Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0A38u, 0x0A3Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0B21u, 0x0B3Cu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0B22u, 0x0B3Cu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0B47u, 0x0B3Eu, 0x0B4Bu), HB_CODEPOINT_ENCODE3 (0x0B47u, 0x0B56u, 0x0B48u), - HB_CODEPOINT_ENCODE3 (0x0B47u, 0x0B57u, 0x0B4Cu), HB_CODEPOINT_ENCODE3 (0x0B92u, 0x0BD7u, 0x0B94u), - HB_CODEPOINT_ENCODE3 (0x0BC6u, 0x0BBEu, 0x0BCAu), HB_CODEPOINT_ENCODE3 (0x0BC6u, 0x0BD7u, 0x0BCCu), - HB_CODEPOINT_ENCODE3 (0x0BC7u, 0x0BBEu, 0x0BCBu), HB_CODEPOINT_ENCODE3 (0x0C46u, 0x0C56u, 0x0C48u), - HB_CODEPOINT_ENCODE3 (0x0CBFu, 0x0CD5u, 0x0CC0u), HB_CODEPOINT_ENCODE3 (0x0CC6u, 0x0CC2u, 0x0CCAu), - HB_CODEPOINT_ENCODE3 (0x0CC6u, 0x0CD5u, 0x0CC7u), HB_CODEPOINT_ENCODE3 (0x0CC6u, 0x0CD6u, 0x0CC8u), - HB_CODEPOINT_ENCODE3 (0x0CCAu, 0x0CD5u, 0x0CCBu), HB_CODEPOINT_ENCODE3 (0x0D46u, 0x0D3Eu, 0x0D4Au), - HB_CODEPOINT_ENCODE3 (0x0D46u, 0x0D57u, 0x0D4Cu), HB_CODEPOINT_ENCODE3 (0x0D47u, 0x0D3Eu, 0x0D4Bu), - HB_CODEPOINT_ENCODE3 (0x0DD9u, 0x0DCAu, 0x0DDAu), HB_CODEPOINT_ENCODE3 (0x0DD9u, 0x0DCFu, 0x0DDCu), - HB_CODEPOINT_ENCODE3 (0x0DD9u, 0x0DDFu, 0x0DDEu), HB_CODEPOINT_ENCODE3 (0x0DDCu, 0x0DCAu, 0x0DDDu), - HB_CODEPOINT_ENCODE3 (0x0F40u, 0x0FB5u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0F42u, 0x0FB7u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0F4Cu, 0x0FB7u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0F51u, 0x0FB7u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0F56u, 0x0FB7u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0F5Bu, 0x0FB7u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0F71u, 0x0F72u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0F71u, 0x0F74u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0F71u, 0x0F80u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0F90u, 0x0FB5u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0F92u, 0x0FB7u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0F9Cu, 0x0FB7u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0FA1u, 0x0FB7u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0FA6u, 0x0FB7u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0FABu, 0x0FB7u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x0FB2u, 0x0F80u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x0FB3u, 0x0F80u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1025u, 0x102Eu, 0x1026u), - HB_CODEPOINT_ENCODE3 (0x1B05u, 0x1B35u, 0x1B06u), HB_CODEPOINT_ENCODE3 (0x1B07u, 0x1B35u, 0x1B08u), - HB_CODEPOINT_ENCODE3 (0x1B09u, 0x1B35u, 0x1B0Au), HB_CODEPOINT_ENCODE3 (0x1B0Bu, 0x1B35u, 0x1B0Cu), - HB_CODEPOINT_ENCODE3 (0x1B0Du, 0x1B35u, 0x1B0Eu), HB_CODEPOINT_ENCODE3 (0x1B11u, 0x1B35u, 0x1B12u), - HB_CODEPOINT_ENCODE3 (0x1B3Au, 0x1B35u, 0x1B3Bu), HB_CODEPOINT_ENCODE3 (0x1B3Cu, 0x1B35u, 0x1B3Du), - HB_CODEPOINT_ENCODE3 (0x1B3Eu, 0x1B35u, 0x1B40u), HB_CODEPOINT_ENCODE3 (0x1B3Fu, 0x1B35u, 0x1B41u), - HB_CODEPOINT_ENCODE3 (0x1B42u, 0x1B35u, 0x1B43u), HB_CODEPOINT_ENCODE3 (0x1E36u, 0x0304u, 0x1E38u), - HB_CODEPOINT_ENCODE3 (0x1E37u, 0x0304u, 0x1E39u), HB_CODEPOINT_ENCODE3 (0x1E5Au, 0x0304u, 0x1E5Cu), - HB_CODEPOINT_ENCODE3 (0x1E5Bu, 0x0304u, 0x1E5Du), HB_CODEPOINT_ENCODE3 (0x1E62u, 0x0307u, 0x1E68u), - HB_CODEPOINT_ENCODE3 (0x1E63u, 0x0307u, 0x1E69u), HB_CODEPOINT_ENCODE3 (0x1EA0u, 0x0302u, 0x1EACu), - HB_CODEPOINT_ENCODE3 (0x1EA0u, 0x0306u, 0x1EB6u), HB_CODEPOINT_ENCODE3 (0x1EA1u, 0x0302u, 0x1EADu), - HB_CODEPOINT_ENCODE3 (0x1EA1u, 0x0306u, 0x1EB7u), HB_CODEPOINT_ENCODE3 (0x1EB8u, 0x0302u, 0x1EC6u), - HB_CODEPOINT_ENCODE3 (0x1EB9u, 0x0302u, 0x1EC7u), HB_CODEPOINT_ENCODE3 (0x1ECCu, 0x0302u, 0x1ED8u), - HB_CODEPOINT_ENCODE3 (0x1ECDu, 0x0302u, 0x1ED9u), HB_CODEPOINT_ENCODE3 (0x1F00u, 0x0300u, 0x1F02u), - HB_CODEPOINT_ENCODE3 (0x1F00u, 0x0301u, 0x1F04u), HB_CODEPOINT_ENCODE3 (0x1F00u, 0x0342u, 0x1F06u), - HB_CODEPOINT_ENCODE3 (0x1F00u, 0x0345u, 0x1F80u), HB_CODEPOINT_ENCODE3 (0x1F01u, 0x0300u, 0x1F03u), - HB_CODEPOINT_ENCODE3 (0x1F01u, 0x0301u, 0x1F05u), HB_CODEPOINT_ENCODE3 (0x1F01u, 0x0342u, 0x1F07u), - HB_CODEPOINT_ENCODE3 (0x1F01u, 0x0345u, 0x1F81u), HB_CODEPOINT_ENCODE3 (0x1F02u, 0x0345u, 0x1F82u), - HB_CODEPOINT_ENCODE3 (0x1F03u, 0x0345u, 0x1F83u), HB_CODEPOINT_ENCODE3 (0x1F04u, 0x0345u, 0x1F84u), - HB_CODEPOINT_ENCODE3 (0x1F05u, 0x0345u, 0x1F85u), HB_CODEPOINT_ENCODE3 (0x1F06u, 0x0345u, 0x1F86u), - HB_CODEPOINT_ENCODE3 (0x1F07u, 0x0345u, 0x1F87u), HB_CODEPOINT_ENCODE3 (0x1F08u, 0x0300u, 0x1F0Au), - HB_CODEPOINT_ENCODE3 (0x1F08u, 0x0301u, 0x1F0Cu), HB_CODEPOINT_ENCODE3 (0x1F08u, 0x0342u, 0x1F0Eu), - HB_CODEPOINT_ENCODE3 (0x1F08u, 0x0345u, 0x1F88u), HB_CODEPOINT_ENCODE3 (0x1F09u, 0x0300u, 0x1F0Bu), - HB_CODEPOINT_ENCODE3 (0x1F09u, 0x0301u, 0x1F0Du), HB_CODEPOINT_ENCODE3 (0x1F09u, 0x0342u, 0x1F0Fu), - HB_CODEPOINT_ENCODE3 (0x1F09u, 0x0345u, 0x1F89u), HB_CODEPOINT_ENCODE3 (0x1F0Au, 0x0345u, 0x1F8Au), - HB_CODEPOINT_ENCODE3 (0x1F0Bu, 0x0345u, 0x1F8Bu), HB_CODEPOINT_ENCODE3 (0x1F0Cu, 0x0345u, 0x1F8Cu), - HB_CODEPOINT_ENCODE3 (0x1F0Du, 0x0345u, 0x1F8Du), HB_CODEPOINT_ENCODE3 (0x1F0Eu, 0x0345u, 0x1F8Eu), - HB_CODEPOINT_ENCODE3 (0x1F0Fu, 0x0345u, 0x1F8Fu), HB_CODEPOINT_ENCODE3 (0x1F10u, 0x0300u, 0x1F12u), - HB_CODEPOINT_ENCODE3 (0x1F10u, 0x0301u, 0x1F14u), HB_CODEPOINT_ENCODE3 (0x1F11u, 0x0300u, 0x1F13u), - HB_CODEPOINT_ENCODE3 (0x1F11u, 0x0301u, 0x1F15u), HB_CODEPOINT_ENCODE3 (0x1F18u, 0x0300u, 0x1F1Au), - HB_CODEPOINT_ENCODE3 (0x1F18u, 0x0301u, 0x1F1Cu), HB_CODEPOINT_ENCODE3 (0x1F19u, 0x0300u, 0x1F1Bu), - HB_CODEPOINT_ENCODE3 (0x1F19u, 0x0301u, 0x1F1Du), HB_CODEPOINT_ENCODE3 (0x1F20u, 0x0300u, 0x1F22u), - HB_CODEPOINT_ENCODE3 (0x1F20u, 0x0301u, 0x1F24u), HB_CODEPOINT_ENCODE3 (0x1F20u, 0x0342u, 0x1F26u), - HB_CODEPOINT_ENCODE3 (0x1F20u, 0x0345u, 0x1F90u), HB_CODEPOINT_ENCODE3 (0x1F21u, 0x0300u, 0x1F23u), - HB_CODEPOINT_ENCODE3 (0x1F21u, 0x0301u, 0x1F25u), HB_CODEPOINT_ENCODE3 (0x1F21u, 0x0342u, 0x1F27u), - HB_CODEPOINT_ENCODE3 (0x1F21u, 0x0345u, 0x1F91u), HB_CODEPOINT_ENCODE3 (0x1F22u, 0x0345u, 0x1F92u), - HB_CODEPOINT_ENCODE3 (0x1F23u, 0x0345u, 0x1F93u), HB_CODEPOINT_ENCODE3 (0x1F24u, 0x0345u, 0x1F94u), - HB_CODEPOINT_ENCODE3 (0x1F25u, 0x0345u, 0x1F95u), HB_CODEPOINT_ENCODE3 (0x1F26u, 0x0345u, 0x1F96u), - HB_CODEPOINT_ENCODE3 (0x1F27u, 0x0345u, 0x1F97u), HB_CODEPOINT_ENCODE3 (0x1F28u, 0x0300u, 0x1F2Au), - HB_CODEPOINT_ENCODE3 (0x1F28u, 0x0301u, 0x1F2Cu), HB_CODEPOINT_ENCODE3 (0x1F28u, 0x0342u, 0x1F2Eu), - HB_CODEPOINT_ENCODE3 (0x1F28u, 0x0345u, 0x1F98u), HB_CODEPOINT_ENCODE3 (0x1F29u, 0x0300u, 0x1F2Bu), - HB_CODEPOINT_ENCODE3 (0x1F29u, 0x0301u, 0x1F2Du), HB_CODEPOINT_ENCODE3 (0x1F29u, 0x0342u, 0x1F2Fu), - HB_CODEPOINT_ENCODE3 (0x1F29u, 0x0345u, 0x1F99u), HB_CODEPOINT_ENCODE3 (0x1F2Au, 0x0345u, 0x1F9Au), - HB_CODEPOINT_ENCODE3 (0x1F2Bu, 0x0345u, 0x1F9Bu), HB_CODEPOINT_ENCODE3 (0x1F2Cu, 0x0345u, 0x1F9Cu), - HB_CODEPOINT_ENCODE3 (0x1F2Du, 0x0345u, 0x1F9Du), HB_CODEPOINT_ENCODE3 (0x1F2Eu, 0x0345u, 0x1F9Eu), - HB_CODEPOINT_ENCODE3 (0x1F2Fu, 0x0345u, 0x1F9Fu), HB_CODEPOINT_ENCODE3 (0x1F30u, 0x0300u, 0x1F32u), - HB_CODEPOINT_ENCODE3 (0x1F30u, 0x0301u, 0x1F34u), HB_CODEPOINT_ENCODE3 (0x1F30u, 0x0342u, 0x1F36u), - HB_CODEPOINT_ENCODE3 (0x1F31u, 0x0300u, 0x1F33u), HB_CODEPOINT_ENCODE3 (0x1F31u, 0x0301u, 0x1F35u), - HB_CODEPOINT_ENCODE3 (0x1F31u, 0x0342u, 0x1F37u), HB_CODEPOINT_ENCODE3 (0x1F38u, 0x0300u, 0x1F3Au), - HB_CODEPOINT_ENCODE3 (0x1F38u, 0x0301u, 0x1F3Cu), HB_CODEPOINT_ENCODE3 (0x1F38u, 0x0342u, 0x1F3Eu), - HB_CODEPOINT_ENCODE3 (0x1F39u, 0x0300u, 0x1F3Bu), HB_CODEPOINT_ENCODE3 (0x1F39u, 0x0301u, 0x1F3Du), - HB_CODEPOINT_ENCODE3 (0x1F39u, 0x0342u, 0x1F3Fu), HB_CODEPOINT_ENCODE3 (0x1F40u, 0x0300u, 0x1F42u), - HB_CODEPOINT_ENCODE3 (0x1F40u, 0x0301u, 0x1F44u), HB_CODEPOINT_ENCODE3 (0x1F41u, 0x0300u, 0x1F43u), - HB_CODEPOINT_ENCODE3 (0x1F41u, 0x0301u, 0x1F45u), HB_CODEPOINT_ENCODE3 (0x1F48u, 0x0300u, 0x1F4Au), - HB_CODEPOINT_ENCODE3 (0x1F48u, 0x0301u, 0x1F4Cu), HB_CODEPOINT_ENCODE3 (0x1F49u, 0x0300u, 0x1F4Bu), - HB_CODEPOINT_ENCODE3 (0x1F49u, 0x0301u, 0x1F4Du), HB_CODEPOINT_ENCODE3 (0x1F50u, 0x0300u, 0x1F52u), - HB_CODEPOINT_ENCODE3 (0x1F50u, 0x0301u, 0x1F54u), HB_CODEPOINT_ENCODE3 (0x1F50u, 0x0342u, 0x1F56u), - HB_CODEPOINT_ENCODE3 (0x1F51u, 0x0300u, 0x1F53u), HB_CODEPOINT_ENCODE3 (0x1F51u, 0x0301u, 0x1F55u), - HB_CODEPOINT_ENCODE3 (0x1F51u, 0x0342u, 0x1F57u), HB_CODEPOINT_ENCODE3 (0x1F59u, 0x0300u, 0x1F5Bu), - HB_CODEPOINT_ENCODE3 (0x1F59u, 0x0301u, 0x1F5Du), HB_CODEPOINT_ENCODE3 (0x1F59u, 0x0342u, 0x1F5Fu), - HB_CODEPOINT_ENCODE3 (0x1F60u, 0x0300u, 0x1F62u), HB_CODEPOINT_ENCODE3 (0x1F60u, 0x0301u, 0x1F64u), - HB_CODEPOINT_ENCODE3 (0x1F60u, 0x0342u, 0x1F66u), HB_CODEPOINT_ENCODE3 (0x1F60u, 0x0345u, 0x1FA0u), - HB_CODEPOINT_ENCODE3 (0x1F61u, 0x0300u, 0x1F63u), HB_CODEPOINT_ENCODE3 (0x1F61u, 0x0301u, 0x1F65u), - HB_CODEPOINT_ENCODE3 (0x1F61u, 0x0342u, 0x1F67u), HB_CODEPOINT_ENCODE3 (0x1F61u, 0x0345u, 0x1FA1u), - HB_CODEPOINT_ENCODE3 (0x1F62u, 0x0345u, 0x1FA2u), HB_CODEPOINT_ENCODE3 (0x1F63u, 0x0345u, 0x1FA3u), - HB_CODEPOINT_ENCODE3 (0x1F64u, 0x0345u, 0x1FA4u), HB_CODEPOINT_ENCODE3 (0x1F65u, 0x0345u, 0x1FA5u), - HB_CODEPOINT_ENCODE3 (0x1F66u, 0x0345u, 0x1FA6u), HB_CODEPOINT_ENCODE3 (0x1F67u, 0x0345u, 0x1FA7u), - HB_CODEPOINT_ENCODE3 (0x1F68u, 0x0300u, 0x1F6Au), HB_CODEPOINT_ENCODE3 (0x1F68u, 0x0301u, 0x1F6Cu), - HB_CODEPOINT_ENCODE3 (0x1F68u, 0x0342u, 0x1F6Eu), HB_CODEPOINT_ENCODE3 (0x1F68u, 0x0345u, 0x1FA8u), - HB_CODEPOINT_ENCODE3 (0x1F69u, 0x0300u, 0x1F6Bu), HB_CODEPOINT_ENCODE3 (0x1F69u, 0x0301u, 0x1F6Du), - HB_CODEPOINT_ENCODE3 (0x1F69u, 0x0342u, 0x1F6Fu), HB_CODEPOINT_ENCODE3 (0x1F69u, 0x0345u, 0x1FA9u), - HB_CODEPOINT_ENCODE3 (0x1F6Au, 0x0345u, 0x1FAAu), HB_CODEPOINT_ENCODE3 (0x1F6Bu, 0x0345u, 0x1FABu), - HB_CODEPOINT_ENCODE3 (0x1F6Cu, 0x0345u, 0x1FACu), HB_CODEPOINT_ENCODE3 (0x1F6Du, 0x0345u, 0x1FADu), - HB_CODEPOINT_ENCODE3 (0x1F6Eu, 0x0345u, 0x1FAEu), HB_CODEPOINT_ENCODE3 (0x1F6Fu, 0x0345u, 0x1FAFu), - HB_CODEPOINT_ENCODE3 (0x1F70u, 0x0345u, 0x1FB2u), HB_CODEPOINT_ENCODE3 (0x1F74u, 0x0345u, 0x1FC2u), - HB_CODEPOINT_ENCODE3 (0x1F7Cu, 0x0345u, 0x1FF2u), HB_CODEPOINT_ENCODE3 (0x1FB6u, 0x0345u, 0x1FB7u), - HB_CODEPOINT_ENCODE3 (0x1FBFu, 0x0300u, 0x1FCDu), HB_CODEPOINT_ENCODE3 (0x1FBFu, 0x0301u, 0x1FCEu), - HB_CODEPOINT_ENCODE3 (0x1FBFu, 0x0342u, 0x1FCFu), HB_CODEPOINT_ENCODE3 (0x1FC6u, 0x0345u, 0x1FC7u), - HB_CODEPOINT_ENCODE3 (0x1FF6u, 0x0345u, 0x1FF7u), HB_CODEPOINT_ENCODE3 (0x1FFEu, 0x0300u, 0x1FDDu), - HB_CODEPOINT_ENCODE3 (0x1FFEu, 0x0301u, 0x1FDEu), HB_CODEPOINT_ENCODE3 (0x1FFEu, 0x0342u, 0x1FDFu), - HB_CODEPOINT_ENCODE3 (0x2190u, 0x0338u, 0x219Au), HB_CODEPOINT_ENCODE3 (0x2192u, 0x0338u, 0x219Bu), - HB_CODEPOINT_ENCODE3 (0x2194u, 0x0338u, 0x21AEu), HB_CODEPOINT_ENCODE3 (0x21D0u, 0x0338u, 0x21CDu), - HB_CODEPOINT_ENCODE3 (0x21D2u, 0x0338u, 0x21CFu), HB_CODEPOINT_ENCODE3 (0x21D4u, 0x0338u, 0x21CEu), - HB_CODEPOINT_ENCODE3 (0x2203u, 0x0338u, 0x2204u), HB_CODEPOINT_ENCODE3 (0x2208u, 0x0338u, 0x2209u), - HB_CODEPOINT_ENCODE3 (0x220Bu, 0x0338u, 0x220Cu), HB_CODEPOINT_ENCODE3 (0x2223u, 0x0338u, 0x2224u), - HB_CODEPOINT_ENCODE3 (0x2225u, 0x0338u, 0x2226u), HB_CODEPOINT_ENCODE3 (0x223Cu, 0x0338u, 0x2241u), - HB_CODEPOINT_ENCODE3 (0x2243u, 0x0338u, 0x2244u), HB_CODEPOINT_ENCODE3 (0x2245u, 0x0338u, 0x2247u), - HB_CODEPOINT_ENCODE3 (0x2248u, 0x0338u, 0x2249u), HB_CODEPOINT_ENCODE3 (0x224Du, 0x0338u, 0x226Du), - HB_CODEPOINT_ENCODE3 (0x2261u, 0x0338u, 0x2262u), HB_CODEPOINT_ENCODE3 (0x2264u, 0x0338u, 0x2270u), - HB_CODEPOINT_ENCODE3 (0x2265u, 0x0338u, 0x2271u), HB_CODEPOINT_ENCODE3 (0x2272u, 0x0338u, 0x2274u), - HB_CODEPOINT_ENCODE3 (0x2273u, 0x0338u, 0x2275u), HB_CODEPOINT_ENCODE3 (0x2276u, 0x0338u, 0x2278u), - HB_CODEPOINT_ENCODE3 (0x2277u, 0x0338u, 0x2279u), HB_CODEPOINT_ENCODE3 (0x227Au, 0x0338u, 0x2280u), - HB_CODEPOINT_ENCODE3 (0x227Bu, 0x0338u, 0x2281u), HB_CODEPOINT_ENCODE3 (0x227Cu, 0x0338u, 0x22E0u), - HB_CODEPOINT_ENCODE3 (0x227Du, 0x0338u, 0x22E1u), HB_CODEPOINT_ENCODE3 (0x2282u, 0x0338u, 0x2284u), - HB_CODEPOINT_ENCODE3 (0x2283u, 0x0338u, 0x2285u), HB_CODEPOINT_ENCODE3 (0x2286u, 0x0338u, 0x2288u), - HB_CODEPOINT_ENCODE3 (0x2287u, 0x0338u, 0x2289u), HB_CODEPOINT_ENCODE3 (0x2291u, 0x0338u, 0x22E2u), - HB_CODEPOINT_ENCODE3 (0x2292u, 0x0338u, 0x22E3u), HB_CODEPOINT_ENCODE3 (0x22A2u, 0x0338u, 0x22ACu), - HB_CODEPOINT_ENCODE3 (0x22A8u, 0x0338u, 0x22ADu), HB_CODEPOINT_ENCODE3 (0x22A9u, 0x0338u, 0x22AEu), - HB_CODEPOINT_ENCODE3 (0x22ABu, 0x0338u, 0x22AFu), HB_CODEPOINT_ENCODE3 (0x22B2u, 0x0338u, 0x22EAu), - HB_CODEPOINT_ENCODE3 (0x22B3u, 0x0338u, 0x22EBu), HB_CODEPOINT_ENCODE3 (0x22B4u, 0x0338u, 0x22ECu), - HB_CODEPOINT_ENCODE3 (0x22B5u, 0x0338u, 0x22EDu), HB_CODEPOINT_ENCODE3 (0x2ADDu, 0x0338u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x3046u, 0x3099u, 0x3094u), HB_CODEPOINT_ENCODE3 (0x304Bu, 0x3099u, 0x304Cu), - HB_CODEPOINT_ENCODE3 (0x304Du, 0x3099u, 0x304Eu), HB_CODEPOINT_ENCODE3 (0x304Fu, 0x3099u, 0x3050u), - HB_CODEPOINT_ENCODE3 (0x3051u, 0x3099u, 0x3052u), HB_CODEPOINT_ENCODE3 (0x3053u, 0x3099u, 0x3054u), - HB_CODEPOINT_ENCODE3 (0x3055u, 0x3099u, 0x3056u), HB_CODEPOINT_ENCODE3 (0x3057u, 0x3099u, 0x3058u), - HB_CODEPOINT_ENCODE3 (0x3059u, 0x3099u, 0x305Au), HB_CODEPOINT_ENCODE3 (0x305Bu, 0x3099u, 0x305Cu), - HB_CODEPOINT_ENCODE3 (0x305Du, 0x3099u, 0x305Eu), HB_CODEPOINT_ENCODE3 (0x305Fu, 0x3099u, 0x3060u), - HB_CODEPOINT_ENCODE3 (0x3061u, 0x3099u, 0x3062u), HB_CODEPOINT_ENCODE3 (0x3064u, 0x3099u, 0x3065u), - HB_CODEPOINT_ENCODE3 (0x3066u, 0x3099u, 0x3067u), HB_CODEPOINT_ENCODE3 (0x3068u, 0x3099u, 0x3069u), - HB_CODEPOINT_ENCODE3 (0x306Fu, 0x3099u, 0x3070u), HB_CODEPOINT_ENCODE3 (0x306Fu, 0x309Au, 0x3071u), - HB_CODEPOINT_ENCODE3 (0x3072u, 0x3099u, 0x3073u), HB_CODEPOINT_ENCODE3 (0x3072u, 0x309Au, 0x3074u), - HB_CODEPOINT_ENCODE3 (0x3075u, 0x3099u, 0x3076u), HB_CODEPOINT_ENCODE3 (0x3075u, 0x309Au, 0x3077u), - HB_CODEPOINT_ENCODE3 (0x3078u, 0x3099u, 0x3079u), HB_CODEPOINT_ENCODE3 (0x3078u, 0x309Au, 0x307Au), - HB_CODEPOINT_ENCODE3 (0x307Bu, 0x3099u, 0x307Cu), HB_CODEPOINT_ENCODE3 (0x307Bu, 0x309Au, 0x307Du), - HB_CODEPOINT_ENCODE3 (0x309Du, 0x3099u, 0x309Eu), HB_CODEPOINT_ENCODE3 (0x30A6u, 0x3099u, 0x30F4u), - HB_CODEPOINT_ENCODE3 (0x30ABu, 0x3099u, 0x30ACu), HB_CODEPOINT_ENCODE3 (0x30ADu, 0x3099u, 0x30AEu), - HB_CODEPOINT_ENCODE3 (0x30AFu, 0x3099u, 0x30B0u), HB_CODEPOINT_ENCODE3 (0x30B1u, 0x3099u, 0x30B2u), - HB_CODEPOINT_ENCODE3 (0x30B3u, 0x3099u, 0x30B4u), HB_CODEPOINT_ENCODE3 (0x30B5u, 0x3099u, 0x30B6u), - HB_CODEPOINT_ENCODE3 (0x30B7u, 0x3099u, 0x30B8u), HB_CODEPOINT_ENCODE3 (0x30B9u, 0x3099u, 0x30BAu), - HB_CODEPOINT_ENCODE3 (0x30BBu, 0x3099u, 0x30BCu), HB_CODEPOINT_ENCODE3 (0x30BDu, 0x3099u, 0x30BEu), - HB_CODEPOINT_ENCODE3 (0x30BFu, 0x3099u, 0x30C0u), HB_CODEPOINT_ENCODE3 (0x30C1u, 0x3099u, 0x30C2u), - HB_CODEPOINT_ENCODE3 (0x30C4u, 0x3099u, 0x30C5u), HB_CODEPOINT_ENCODE3 (0x30C6u, 0x3099u, 0x30C7u), - HB_CODEPOINT_ENCODE3 (0x30C8u, 0x3099u, 0x30C9u), HB_CODEPOINT_ENCODE3 (0x30CFu, 0x3099u, 0x30D0u), - HB_CODEPOINT_ENCODE3 (0x30CFu, 0x309Au, 0x30D1u), HB_CODEPOINT_ENCODE3 (0x30D2u, 0x3099u, 0x30D3u), - HB_CODEPOINT_ENCODE3 (0x30D2u, 0x309Au, 0x30D4u), HB_CODEPOINT_ENCODE3 (0x30D5u, 0x3099u, 0x30D6u), - HB_CODEPOINT_ENCODE3 (0x30D5u, 0x309Au, 0x30D7u), HB_CODEPOINT_ENCODE3 (0x30D8u, 0x3099u, 0x30D9u), - HB_CODEPOINT_ENCODE3 (0x30D8u, 0x309Au, 0x30DAu), HB_CODEPOINT_ENCODE3 (0x30DBu, 0x3099u, 0x30DCu), - HB_CODEPOINT_ENCODE3 (0x30DBu, 0x309Au, 0x30DDu), HB_CODEPOINT_ENCODE3 (0x30EFu, 0x3099u, 0x30F7u), - HB_CODEPOINT_ENCODE3 (0x30F0u, 0x3099u, 0x30F8u), HB_CODEPOINT_ENCODE3 (0x30F1u, 0x3099u, 0x30F9u), - HB_CODEPOINT_ENCODE3 (0x30F2u, 0x3099u, 0x30FAu), HB_CODEPOINT_ENCODE3 (0x30FDu, 0x3099u, 0x30FEu), - HB_CODEPOINT_ENCODE3 (0xFB49u, 0x05C1u, 0x0000u), HB_CODEPOINT_ENCODE3 (0xFB49u, 0x05C2u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x105D2u, 0x0307u, 0x105C9u), HB_CODEPOINT_ENCODE3 (0x105DAu, 0x0307u, 0x105E4u), - HB_CODEPOINT_ENCODE3 (0x11099u, 0x110BAu, 0x1109Au),HB_CODEPOINT_ENCODE3 (0x1109Bu, 0x110BAu, 0x1109Cu), - HB_CODEPOINT_ENCODE3 (0x110A5u, 0x110BAu, 0x110ABu),HB_CODEPOINT_ENCODE3 (0x11131u, 0x11127u, 0x1112Eu), - HB_CODEPOINT_ENCODE3 (0x11132u, 0x11127u, 0x1112Fu),HB_CODEPOINT_ENCODE3 (0x11347u, 0x1133Eu, 0x1134Bu), - HB_CODEPOINT_ENCODE3 (0x11347u, 0x11357u, 0x1134Cu),HB_CODEPOINT_ENCODE3 (0x11382u, 0x113C9u, 0x11383u), - HB_CODEPOINT_ENCODE3 (0x11384u, 0x113BBu, 0x11385u),HB_CODEPOINT_ENCODE3 (0x1138Bu, 0x113C2u, 0x1138Eu), - HB_CODEPOINT_ENCODE3 (0x11390u, 0x113C9u, 0x11391u),HB_CODEPOINT_ENCODE3 (0x113C2u, 0x113B8u, 0x113C7u), - HB_CODEPOINT_ENCODE3 (0x113C2u, 0x113C2u, 0x113C5u),HB_CODEPOINT_ENCODE3 (0x113C2u, 0x113C9u, 0x113C8u), - HB_CODEPOINT_ENCODE3 (0x114B9u, 0x114B0u, 0x114BCu),HB_CODEPOINT_ENCODE3 (0x114B9u, 0x114BAu, 0x114BBu), - HB_CODEPOINT_ENCODE3 (0x114B9u, 0x114BDu, 0x114BEu),HB_CODEPOINT_ENCODE3 (0x115B8u, 0x115AFu, 0x115BAu), - HB_CODEPOINT_ENCODE3 (0x115B9u, 0x115AFu, 0x115BBu),HB_CODEPOINT_ENCODE3 (0x11935u, 0x11930u, 0x11938u), - HB_CODEPOINT_ENCODE3 (0x1611Eu, 0x1611Eu, 0x16121u),HB_CODEPOINT_ENCODE3 (0x1611Eu, 0x1611Fu, 0x16123u), - HB_CODEPOINT_ENCODE3 (0x1611Eu, 0x16120u, 0x16125u),HB_CODEPOINT_ENCODE3 (0x1611Eu, 0x16129u, 0x16122u), - HB_CODEPOINT_ENCODE3 (0x16121u, 0x1611Fu, 0x16126u),HB_CODEPOINT_ENCODE3 (0x16121u, 0x16120u, 0x16128u), - HB_CODEPOINT_ENCODE3 (0x16122u, 0x1611Fu, 0x16127u),HB_CODEPOINT_ENCODE3 (0x16129u, 0x1611Fu, 0x16124u), - HB_CODEPOINT_ENCODE3 (0x16D63u, 0x16D67u, 0x16D69u),HB_CODEPOINT_ENCODE3 (0x16D67u, 0x16D67u, 0x16D68u), - HB_CODEPOINT_ENCODE3 (0x16D69u, 0x16D67u, 0x16D6Au), HB_CODEPOINT_ENCODE3 (0x1D157u, 0x1D165u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x1D158u, 0x1D165u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1D15Fu, 0x1D16Eu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x1D15Fu, 0x1D16Fu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1D15Fu, 0x1D170u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x1D15Fu, 0x1D171u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1D15Fu, 0x1D172u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x1D1B9u, 0x1D165u, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1D1BAu, 0x1D165u, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x1D1BBu, 0x1D16Eu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1D1BBu, 0x1D16Fu, 0x0000u), - HB_CODEPOINT_ENCODE3 (0x1D1BCu, 0x1D16Eu, 0x0000u), HB_CODEPOINT_ENCODE3 (0x1D1BCu, 0x1D16Fu, 0x0000u), + HB_CODEPOINT_ENCODE3 (0x05D0, 0x05B7, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D0, 0x05B8, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05D0, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D1, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05D1, 0x05BF, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D2, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05D3, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D4, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05D5, 0x05B9, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D5, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05D6, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D8, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05D9, 0x05B4, 0x0000), HB_CODEPOINT_ENCODE3 (0x05D9, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05DA, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05DB, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05DB, 0x05BF, 0x0000), HB_CODEPOINT_ENCODE3 (0x05DC, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05DE, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05E0, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05E1, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05E3, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05E4, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05E4, 0x05BF, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05E6, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05E7, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05E8, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05E9, 0x05BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05E9, 0x05C1, 0x0000), HB_CODEPOINT_ENCODE3 (0x05E9, 0x05C2, 0x0000), + HB_CODEPOINT_ENCODE3 (0x05EA, 0x05BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x05F2, 0x05B7, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0627, 0x0653, 0x0622), HB_CODEPOINT_ENCODE3 (0x0627, 0x0654, 0x0623), + HB_CODEPOINT_ENCODE3 (0x0627, 0x0655, 0x0625), HB_CODEPOINT_ENCODE3 (0x0648, 0x0654, 0x0624), + HB_CODEPOINT_ENCODE3 (0x064A, 0x0654, 0x0626), HB_CODEPOINT_ENCODE3 (0x06C1, 0x0654, 0x06C2), + HB_CODEPOINT_ENCODE3 (0x06D2, 0x0654, 0x06D3), HB_CODEPOINT_ENCODE3 (0x06D5, 0x0654, 0x06C0), + HB_CODEPOINT_ENCODE3 (0x0915, 0x093C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0916, 0x093C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0917, 0x093C, 0x0000), HB_CODEPOINT_ENCODE3 (0x091C, 0x093C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0921, 0x093C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0922, 0x093C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0928, 0x093C, 0x0929), HB_CODEPOINT_ENCODE3 (0x092B, 0x093C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x092F, 0x093C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0930, 0x093C, 0x0931), + HB_CODEPOINT_ENCODE3 (0x0933, 0x093C, 0x0934), HB_CODEPOINT_ENCODE3 (0x09A1, 0x09BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x09A2, 0x09BC, 0x0000), HB_CODEPOINT_ENCODE3 (0x09AF, 0x09BC, 0x0000), + HB_CODEPOINT_ENCODE3 (0x09C7, 0x09BE, 0x09CB), HB_CODEPOINT_ENCODE3 (0x09C7, 0x09D7, 0x09CC), + HB_CODEPOINT_ENCODE3 (0x0A16, 0x0A3C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0A17, 0x0A3C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0A1C, 0x0A3C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0A2B, 0x0A3C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0A32, 0x0A3C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0A38, 0x0A3C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0B21, 0x0B3C, 0x0000), HB_CODEPOINT_ENCODE3 (0x0B22, 0x0B3C, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0B47, 0x0B3E, 0x0B4B), HB_CODEPOINT_ENCODE3 (0x0B47, 0x0B56, 0x0B48), + HB_CODEPOINT_ENCODE3 (0x0B47, 0x0B57, 0x0B4C), HB_CODEPOINT_ENCODE3 (0x0B92, 0x0BD7, 0x0B94), + HB_CODEPOINT_ENCODE3 (0x0BC6, 0x0BBE, 0x0BCA), HB_CODEPOINT_ENCODE3 (0x0BC6, 0x0BD7, 0x0BCC), + HB_CODEPOINT_ENCODE3 (0x0BC7, 0x0BBE, 0x0BCB), HB_CODEPOINT_ENCODE3 (0x0C46, 0x0C56, 0x0C48), + HB_CODEPOINT_ENCODE3 (0x0CBF, 0x0CD5, 0x0CC0), HB_CODEPOINT_ENCODE3 (0x0CC6, 0x0CC2, 0x0CCA), + HB_CODEPOINT_ENCODE3 (0x0CC6, 0x0CD5, 0x0CC7), HB_CODEPOINT_ENCODE3 (0x0CC6, 0x0CD6, 0x0CC8), + HB_CODEPOINT_ENCODE3 (0x0CCA, 0x0CD5, 0x0CCB), HB_CODEPOINT_ENCODE3 (0x0D46, 0x0D3E, 0x0D4A), + HB_CODEPOINT_ENCODE3 (0x0D46, 0x0D57, 0x0D4C), HB_CODEPOINT_ENCODE3 (0x0D47, 0x0D3E, 0x0D4B), + HB_CODEPOINT_ENCODE3 (0x0DD9, 0x0DCA, 0x0DDA), HB_CODEPOINT_ENCODE3 (0x0DD9, 0x0DCF, 0x0DDC), + HB_CODEPOINT_ENCODE3 (0x0DD9, 0x0DDF, 0x0DDE), HB_CODEPOINT_ENCODE3 (0x0DDC, 0x0DCA, 0x0DDD), + HB_CODEPOINT_ENCODE3 (0x0F40, 0x0FB5, 0x0000), HB_CODEPOINT_ENCODE3 (0x0F42, 0x0FB7, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0F4C, 0x0FB7, 0x0000), HB_CODEPOINT_ENCODE3 (0x0F51, 0x0FB7, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0F56, 0x0FB7, 0x0000), HB_CODEPOINT_ENCODE3 (0x0F5B, 0x0FB7, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0F71, 0x0F72, 0x0000), HB_CODEPOINT_ENCODE3 (0x0F71, 0x0F74, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0F71, 0x0F80, 0x0000), HB_CODEPOINT_ENCODE3 (0x0F90, 0x0FB5, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0F92, 0x0FB7, 0x0000), HB_CODEPOINT_ENCODE3 (0x0F9C, 0x0FB7, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0FA1, 0x0FB7, 0x0000), HB_CODEPOINT_ENCODE3 (0x0FA6, 0x0FB7, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0FAB, 0x0FB7, 0x0000), HB_CODEPOINT_ENCODE3 (0x0FB2, 0x0F80, 0x0000), + HB_CODEPOINT_ENCODE3 (0x0FB3, 0x0F80, 0x0000), HB_CODEPOINT_ENCODE3 (0x1025, 0x102E, 0x1026), + HB_CODEPOINT_ENCODE3 (0x1B05, 0x1B35, 0x1B06), HB_CODEPOINT_ENCODE3 (0x1B07, 0x1B35, 0x1B08), + HB_CODEPOINT_ENCODE3 (0x1B09, 0x1B35, 0x1B0A), HB_CODEPOINT_ENCODE3 (0x1B0B, 0x1B35, 0x1B0C), + HB_CODEPOINT_ENCODE3 (0x1B0D, 0x1B35, 0x1B0E), HB_CODEPOINT_ENCODE3 (0x1B11, 0x1B35, 0x1B12), + HB_CODEPOINT_ENCODE3 (0x1B3A, 0x1B35, 0x1B3B), HB_CODEPOINT_ENCODE3 (0x1B3C, 0x1B35, 0x1B3D), + HB_CODEPOINT_ENCODE3 (0x1B3E, 0x1B35, 0x1B40), HB_CODEPOINT_ENCODE3 (0x1B3F, 0x1B35, 0x1B41), + HB_CODEPOINT_ENCODE3 (0x1B42, 0x1B35, 0x1B43), HB_CODEPOINT_ENCODE3 (0x1E36, 0x0304, 0x1E38), + HB_CODEPOINT_ENCODE3 (0x1E37, 0x0304, 0x1E39), HB_CODEPOINT_ENCODE3 (0x1E5A, 0x0304, 0x1E5C), + HB_CODEPOINT_ENCODE3 (0x1E5B, 0x0304, 0x1E5D), HB_CODEPOINT_ENCODE3 (0x1E62, 0x0307, 0x1E68), + HB_CODEPOINT_ENCODE3 (0x1E63, 0x0307, 0x1E69), HB_CODEPOINT_ENCODE3 (0x1EA0, 0x0302, 0x1EAC), + HB_CODEPOINT_ENCODE3 (0x1EA0, 0x0306, 0x1EB6), HB_CODEPOINT_ENCODE3 (0x1EA1, 0x0302, 0x1EAD), + HB_CODEPOINT_ENCODE3 (0x1EA1, 0x0306, 0x1EB7), HB_CODEPOINT_ENCODE3 (0x1EB8, 0x0302, 0x1EC6), + HB_CODEPOINT_ENCODE3 (0x1EB9, 0x0302, 0x1EC7), HB_CODEPOINT_ENCODE3 (0x1ECC, 0x0302, 0x1ED8), + HB_CODEPOINT_ENCODE3 (0x1ECD, 0x0302, 0x1ED9), HB_CODEPOINT_ENCODE3 (0x1F00, 0x0300, 0x1F02), + HB_CODEPOINT_ENCODE3 (0x1F00, 0x0301, 0x1F04), HB_CODEPOINT_ENCODE3 (0x1F00, 0x0342, 0x1F06), + HB_CODEPOINT_ENCODE3 (0x1F00, 0x0345, 0x1F80), HB_CODEPOINT_ENCODE3 (0x1F01, 0x0300, 0x1F03), + HB_CODEPOINT_ENCODE3 (0x1F01, 0x0301, 0x1F05), HB_CODEPOINT_ENCODE3 (0x1F01, 0x0342, 0x1F07), + HB_CODEPOINT_ENCODE3 (0x1F01, 0x0345, 0x1F81), HB_CODEPOINT_ENCODE3 (0x1F02, 0x0345, 0x1F82), + HB_CODEPOINT_ENCODE3 (0x1F03, 0x0345, 0x1F83), HB_CODEPOINT_ENCODE3 (0x1F04, 0x0345, 0x1F84), + HB_CODEPOINT_ENCODE3 (0x1F05, 0x0345, 0x1F85), HB_CODEPOINT_ENCODE3 (0x1F06, 0x0345, 0x1F86), + HB_CODEPOINT_ENCODE3 (0x1F07, 0x0345, 0x1F87), HB_CODEPOINT_ENCODE3 (0x1F08, 0x0300, 0x1F0A), + HB_CODEPOINT_ENCODE3 (0x1F08, 0x0301, 0x1F0C), HB_CODEPOINT_ENCODE3 (0x1F08, 0x0342, 0x1F0E), + HB_CODEPOINT_ENCODE3 (0x1F08, 0x0345, 0x1F88), HB_CODEPOINT_ENCODE3 (0x1F09, 0x0300, 0x1F0B), + HB_CODEPOINT_ENCODE3 (0x1F09, 0x0301, 0x1F0D), HB_CODEPOINT_ENCODE3 (0x1F09, 0x0342, 0x1F0F), + HB_CODEPOINT_ENCODE3 (0x1F09, 0x0345, 0x1F89), HB_CODEPOINT_ENCODE3 (0x1F0A, 0x0345, 0x1F8A), + HB_CODEPOINT_ENCODE3 (0x1F0B, 0x0345, 0x1F8B), HB_CODEPOINT_ENCODE3 (0x1F0C, 0x0345, 0x1F8C), + HB_CODEPOINT_ENCODE3 (0x1F0D, 0x0345, 0x1F8D), HB_CODEPOINT_ENCODE3 (0x1F0E, 0x0345, 0x1F8E), + HB_CODEPOINT_ENCODE3 (0x1F0F, 0x0345, 0x1F8F), HB_CODEPOINT_ENCODE3 (0x1F10, 0x0300, 0x1F12), + HB_CODEPOINT_ENCODE3 (0x1F10, 0x0301, 0x1F14), HB_CODEPOINT_ENCODE3 (0x1F11, 0x0300, 0x1F13), + HB_CODEPOINT_ENCODE3 (0x1F11, 0x0301, 0x1F15), HB_CODEPOINT_ENCODE3 (0x1F18, 0x0300, 0x1F1A), + HB_CODEPOINT_ENCODE3 (0x1F18, 0x0301, 0x1F1C), HB_CODEPOINT_ENCODE3 (0x1F19, 0x0300, 0x1F1B), + HB_CODEPOINT_ENCODE3 (0x1F19, 0x0301, 0x1F1D), HB_CODEPOINT_ENCODE3 (0x1F20, 0x0300, 0x1F22), + HB_CODEPOINT_ENCODE3 (0x1F20, 0x0301, 0x1F24), HB_CODEPOINT_ENCODE3 (0x1F20, 0x0342, 0x1F26), + HB_CODEPOINT_ENCODE3 (0x1F20, 0x0345, 0x1F90), HB_CODEPOINT_ENCODE3 (0x1F21, 0x0300, 0x1F23), + HB_CODEPOINT_ENCODE3 (0x1F21, 0x0301, 0x1F25), HB_CODEPOINT_ENCODE3 (0x1F21, 0x0342, 0x1F27), + HB_CODEPOINT_ENCODE3 (0x1F21, 0x0345, 0x1F91), HB_CODEPOINT_ENCODE3 (0x1F22, 0x0345, 0x1F92), + HB_CODEPOINT_ENCODE3 (0x1F23, 0x0345, 0x1F93), HB_CODEPOINT_ENCODE3 (0x1F24, 0x0345, 0x1F94), + HB_CODEPOINT_ENCODE3 (0x1F25, 0x0345, 0x1F95), HB_CODEPOINT_ENCODE3 (0x1F26, 0x0345, 0x1F96), + HB_CODEPOINT_ENCODE3 (0x1F27, 0x0345, 0x1F97), HB_CODEPOINT_ENCODE3 (0x1F28, 0x0300, 0x1F2A), + HB_CODEPOINT_ENCODE3 (0x1F28, 0x0301, 0x1F2C), HB_CODEPOINT_ENCODE3 (0x1F28, 0x0342, 0x1F2E), + HB_CODEPOINT_ENCODE3 (0x1F28, 0x0345, 0x1F98), HB_CODEPOINT_ENCODE3 (0x1F29, 0x0300, 0x1F2B), + HB_CODEPOINT_ENCODE3 (0x1F29, 0x0301, 0x1F2D), HB_CODEPOINT_ENCODE3 (0x1F29, 0x0342, 0x1F2F), + HB_CODEPOINT_ENCODE3 (0x1F29, 0x0345, 0x1F99), HB_CODEPOINT_ENCODE3 (0x1F2A, 0x0345, 0x1F9A), + HB_CODEPOINT_ENCODE3 (0x1F2B, 0x0345, 0x1F9B), HB_CODEPOINT_ENCODE3 (0x1F2C, 0x0345, 0x1F9C), + HB_CODEPOINT_ENCODE3 (0x1F2D, 0x0345, 0x1F9D), HB_CODEPOINT_ENCODE3 (0x1F2E, 0x0345, 0x1F9E), + HB_CODEPOINT_ENCODE3 (0x1F2F, 0x0345, 0x1F9F), HB_CODEPOINT_ENCODE3 (0x1F30, 0x0300, 0x1F32), + HB_CODEPOINT_ENCODE3 (0x1F30, 0x0301, 0x1F34), HB_CODEPOINT_ENCODE3 (0x1F30, 0x0342, 0x1F36), + HB_CODEPOINT_ENCODE3 (0x1F31, 0x0300, 0x1F33), HB_CODEPOINT_ENCODE3 (0x1F31, 0x0301, 0x1F35), + HB_CODEPOINT_ENCODE3 (0x1F31, 0x0342, 0x1F37), HB_CODEPOINT_ENCODE3 (0x1F38, 0x0300, 0x1F3A), + HB_CODEPOINT_ENCODE3 (0x1F38, 0x0301, 0x1F3C), HB_CODEPOINT_ENCODE3 (0x1F38, 0x0342, 0x1F3E), + HB_CODEPOINT_ENCODE3 (0x1F39, 0x0300, 0x1F3B), HB_CODEPOINT_ENCODE3 (0x1F39, 0x0301, 0x1F3D), + HB_CODEPOINT_ENCODE3 (0x1F39, 0x0342, 0x1F3F), HB_CODEPOINT_ENCODE3 (0x1F40, 0x0300, 0x1F42), + HB_CODEPOINT_ENCODE3 (0x1F40, 0x0301, 0x1F44), HB_CODEPOINT_ENCODE3 (0x1F41, 0x0300, 0x1F43), + HB_CODEPOINT_ENCODE3 (0x1F41, 0x0301, 0x1F45), HB_CODEPOINT_ENCODE3 (0x1F48, 0x0300, 0x1F4A), + HB_CODEPOINT_ENCODE3 (0x1F48, 0x0301, 0x1F4C), HB_CODEPOINT_ENCODE3 (0x1F49, 0x0300, 0x1F4B), + HB_CODEPOINT_ENCODE3 (0x1F49, 0x0301, 0x1F4D), HB_CODEPOINT_ENCODE3 (0x1F50, 0x0300, 0x1F52), + HB_CODEPOINT_ENCODE3 (0x1F50, 0x0301, 0x1F54), HB_CODEPOINT_ENCODE3 (0x1F50, 0x0342, 0x1F56), + HB_CODEPOINT_ENCODE3 (0x1F51, 0x0300, 0x1F53), HB_CODEPOINT_ENCODE3 (0x1F51, 0x0301, 0x1F55), + HB_CODEPOINT_ENCODE3 (0x1F51, 0x0342, 0x1F57), HB_CODEPOINT_ENCODE3 (0x1F59, 0x0300, 0x1F5B), + HB_CODEPOINT_ENCODE3 (0x1F59, 0x0301, 0x1F5D), HB_CODEPOINT_ENCODE3 (0x1F59, 0x0342, 0x1F5F), + HB_CODEPOINT_ENCODE3 (0x1F60, 0x0300, 0x1F62), HB_CODEPOINT_ENCODE3 (0x1F60, 0x0301, 0x1F64), + HB_CODEPOINT_ENCODE3 (0x1F60, 0x0342, 0x1F66), HB_CODEPOINT_ENCODE3 (0x1F60, 0x0345, 0x1FA0), + HB_CODEPOINT_ENCODE3 (0x1F61, 0x0300, 0x1F63), HB_CODEPOINT_ENCODE3 (0x1F61, 0x0301, 0x1F65), + HB_CODEPOINT_ENCODE3 (0x1F61, 0x0342, 0x1F67), HB_CODEPOINT_ENCODE3 (0x1F61, 0x0345, 0x1FA1), + HB_CODEPOINT_ENCODE3 (0x1F62, 0x0345, 0x1FA2), HB_CODEPOINT_ENCODE3 (0x1F63, 0x0345, 0x1FA3), + HB_CODEPOINT_ENCODE3 (0x1F64, 0x0345, 0x1FA4), HB_CODEPOINT_ENCODE3 (0x1F65, 0x0345, 0x1FA5), + HB_CODEPOINT_ENCODE3 (0x1F66, 0x0345, 0x1FA6), HB_CODEPOINT_ENCODE3 (0x1F67, 0x0345, 0x1FA7), + HB_CODEPOINT_ENCODE3 (0x1F68, 0x0300, 0x1F6A), HB_CODEPOINT_ENCODE3 (0x1F68, 0x0301, 0x1F6C), + HB_CODEPOINT_ENCODE3 (0x1F68, 0x0342, 0x1F6E), HB_CODEPOINT_ENCODE3 (0x1F68, 0x0345, 0x1FA8), + HB_CODEPOINT_ENCODE3 (0x1F69, 0x0300, 0x1F6B), HB_CODEPOINT_ENCODE3 (0x1F69, 0x0301, 0x1F6D), + HB_CODEPOINT_ENCODE3 (0x1F69, 0x0342, 0x1F6F), HB_CODEPOINT_ENCODE3 (0x1F69, 0x0345, 0x1FA9), + HB_CODEPOINT_ENCODE3 (0x1F6A, 0x0345, 0x1FAA), HB_CODEPOINT_ENCODE3 (0x1F6B, 0x0345, 0x1FAB), + HB_CODEPOINT_ENCODE3 (0x1F6C, 0x0345, 0x1FAC), HB_CODEPOINT_ENCODE3 (0x1F6D, 0x0345, 0x1FAD), + HB_CODEPOINT_ENCODE3 (0x1F6E, 0x0345, 0x1FAE), HB_CODEPOINT_ENCODE3 (0x1F6F, 0x0345, 0x1FAF), + HB_CODEPOINT_ENCODE3 (0x1F70, 0x0345, 0x1FB2), HB_CODEPOINT_ENCODE3 (0x1F74, 0x0345, 0x1FC2), + HB_CODEPOINT_ENCODE3 (0x1F7C, 0x0345, 0x1FF2), HB_CODEPOINT_ENCODE3 (0x1FB6, 0x0345, 0x1FB7), + HB_CODEPOINT_ENCODE3 (0x1FBF, 0x0300, 0x1FCD), HB_CODEPOINT_ENCODE3 (0x1FBF, 0x0301, 0x1FCE), + HB_CODEPOINT_ENCODE3 (0x1FBF, 0x0342, 0x1FCF), HB_CODEPOINT_ENCODE3 (0x1FC6, 0x0345, 0x1FC7), + HB_CODEPOINT_ENCODE3 (0x1FF6, 0x0345, 0x1FF7), HB_CODEPOINT_ENCODE3 (0x1FFE, 0x0300, 0x1FDD), + HB_CODEPOINT_ENCODE3 (0x1FFE, 0x0301, 0x1FDE), HB_CODEPOINT_ENCODE3 (0x1FFE, 0x0342, 0x1FDF), + HB_CODEPOINT_ENCODE3 (0x2190, 0x0338, 0x219A), HB_CODEPOINT_ENCODE3 (0x2192, 0x0338, 0x219B), + HB_CODEPOINT_ENCODE3 (0x2194, 0x0338, 0x21AE), HB_CODEPOINT_ENCODE3 (0x21D0, 0x0338, 0x21CD), + HB_CODEPOINT_ENCODE3 (0x21D2, 0x0338, 0x21CF), HB_CODEPOINT_ENCODE3 (0x21D4, 0x0338, 0x21CE), + HB_CODEPOINT_ENCODE3 (0x2203, 0x0338, 0x2204), HB_CODEPOINT_ENCODE3 (0x2208, 0x0338, 0x2209), + HB_CODEPOINT_ENCODE3 (0x220B, 0x0338, 0x220C), HB_CODEPOINT_ENCODE3 (0x2223, 0x0338, 0x2224), + HB_CODEPOINT_ENCODE3 (0x2225, 0x0338, 0x2226), HB_CODEPOINT_ENCODE3 (0x223C, 0x0338, 0x2241), + HB_CODEPOINT_ENCODE3 (0x2243, 0x0338, 0x2244), HB_CODEPOINT_ENCODE3 (0x2245, 0x0338, 0x2247), + HB_CODEPOINT_ENCODE3 (0x2248, 0x0338, 0x2249), HB_CODEPOINT_ENCODE3 (0x224D, 0x0338, 0x226D), + HB_CODEPOINT_ENCODE3 (0x2261, 0x0338, 0x2262), HB_CODEPOINT_ENCODE3 (0x2264, 0x0338, 0x2270), + HB_CODEPOINT_ENCODE3 (0x2265, 0x0338, 0x2271), HB_CODEPOINT_ENCODE3 (0x2272, 0x0338, 0x2274), + HB_CODEPOINT_ENCODE3 (0x2273, 0x0338, 0x2275), HB_CODEPOINT_ENCODE3 (0x2276, 0x0338, 0x2278), + HB_CODEPOINT_ENCODE3 (0x2277, 0x0338, 0x2279), HB_CODEPOINT_ENCODE3 (0x227A, 0x0338, 0x2280), + HB_CODEPOINT_ENCODE3 (0x227B, 0x0338, 0x2281), HB_CODEPOINT_ENCODE3 (0x227C, 0x0338, 0x22E0), + HB_CODEPOINT_ENCODE3 (0x227D, 0x0338, 0x22E1), HB_CODEPOINT_ENCODE3 (0x2282, 0x0338, 0x2284), + HB_CODEPOINT_ENCODE3 (0x2283, 0x0338, 0x2285), HB_CODEPOINT_ENCODE3 (0x2286, 0x0338, 0x2288), + HB_CODEPOINT_ENCODE3 (0x2287, 0x0338, 0x2289), HB_CODEPOINT_ENCODE3 (0x2291, 0x0338, 0x22E2), + HB_CODEPOINT_ENCODE3 (0x2292, 0x0338, 0x22E3), HB_CODEPOINT_ENCODE3 (0x22A2, 0x0338, 0x22AC), + HB_CODEPOINT_ENCODE3 (0x22A8, 0x0338, 0x22AD), HB_CODEPOINT_ENCODE3 (0x22A9, 0x0338, 0x22AE), + HB_CODEPOINT_ENCODE3 (0x22AB, 0x0338, 0x22AF), HB_CODEPOINT_ENCODE3 (0x22B2, 0x0338, 0x22EA), + HB_CODEPOINT_ENCODE3 (0x22B3, 0x0338, 0x22EB), HB_CODEPOINT_ENCODE3 (0x22B4, 0x0338, 0x22EC), + HB_CODEPOINT_ENCODE3 (0x22B5, 0x0338, 0x22ED), HB_CODEPOINT_ENCODE3 (0x2ADD, 0x0338, 0x0000), + HB_CODEPOINT_ENCODE3 (0x3046, 0x3099, 0x3094), HB_CODEPOINT_ENCODE3 (0x304B, 0x3099, 0x304C), + HB_CODEPOINT_ENCODE3 (0x304D, 0x3099, 0x304E), HB_CODEPOINT_ENCODE3 (0x304F, 0x3099, 0x3050), + HB_CODEPOINT_ENCODE3 (0x3051, 0x3099, 0x3052), HB_CODEPOINT_ENCODE3 (0x3053, 0x3099, 0x3054), + HB_CODEPOINT_ENCODE3 (0x3055, 0x3099, 0x3056), HB_CODEPOINT_ENCODE3 (0x3057, 0x3099, 0x3058), + HB_CODEPOINT_ENCODE3 (0x3059, 0x3099, 0x305A), HB_CODEPOINT_ENCODE3 (0x305B, 0x3099, 0x305C), + HB_CODEPOINT_ENCODE3 (0x305D, 0x3099, 0x305E), HB_CODEPOINT_ENCODE3 (0x305F, 0x3099, 0x3060), + HB_CODEPOINT_ENCODE3 (0x3061, 0x3099, 0x3062), HB_CODEPOINT_ENCODE3 (0x3064, 0x3099, 0x3065), + HB_CODEPOINT_ENCODE3 (0x3066, 0x3099, 0x3067), HB_CODEPOINT_ENCODE3 (0x3068, 0x3099, 0x3069), + HB_CODEPOINT_ENCODE3 (0x306F, 0x3099, 0x3070), HB_CODEPOINT_ENCODE3 (0x306F, 0x309A, 0x3071), + HB_CODEPOINT_ENCODE3 (0x3072, 0x3099, 0x3073), HB_CODEPOINT_ENCODE3 (0x3072, 0x309A, 0x3074), + HB_CODEPOINT_ENCODE3 (0x3075, 0x3099, 0x3076), HB_CODEPOINT_ENCODE3 (0x3075, 0x309A, 0x3077), + HB_CODEPOINT_ENCODE3 (0x3078, 0x3099, 0x3079), HB_CODEPOINT_ENCODE3 (0x3078, 0x309A, 0x307A), + HB_CODEPOINT_ENCODE3 (0x307B, 0x3099, 0x307C), HB_CODEPOINT_ENCODE3 (0x307B, 0x309A, 0x307D), + HB_CODEPOINT_ENCODE3 (0x309D, 0x3099, 0x309E), HB_CODEPOINT_ENCODE3 (0x30A6, 0x3099, 0x30F4), + HB_CODEPOINT_ENCODE3 (0x30AB, 0x3099, 0x30AC), HB_CODEPOINT_ENCODE3 (0x30AD, 0x3099, 0x30AE), + HB_CODEPOINT_ENCODE3 (0x30AF, 0x3099, 0x30B0), HB_CODEPOINT_ENCODE3 (0x30B1, 0x3099, 0x30B2), + HB_CODEPOINT_ENCODE3 (0x30B3, 0x3099, 0x30B4), HB_CODEPOINT_ENCODE3 (0x30B5, 0x3099, 0x30B6), + HB_CODEPOINT_ENCODE3 (0x30B7, 0x3099, 0x30B8), HB_CODEPOINT_ENCODE3 (0x30B9, 0x3099, 0x30BA), + HB_CODEPOINT_ENCODE3 (0x30BB, 0x3099, 0x30BC), HB_CODEPOINT_ENCODE3 (0x30BD, 0x3099, 0x30BE), + HB_CODEPOINT_ENCODE3 (0x30BF, 0x3099, 0x30C0), HB_CODEPOINT_ENCODE3 (0x30C1, 0x3099, 0x30C2), + HB_CODEPOINT_ENCODE3 (0x30C4, 0x3099, 0x30C5), HB_CODEPOINT_ENCODE3 (0x30C6, 0x3099, 0x30C7), + HB_CODEPOINT_ENCODE3 (0x30C8, 0x3099, 0x30C9), HB_CODEPOINT_ENCODE3 (0x30CF, 0x3099, 0x30D0), + HB_CODEPOINT_ENCODE3 (0x30CF, 0x309A, 0x30D1), HB_CODEPOINT_ENCODE3 (0x30D2, 0x3099, 0x30D3), + HB_CODEPOINT_ENCODE3 (0x30D2, 0x309A, 0x30D4), HB_CODEPOINT_ENCODE3 (0x30D5, 0x3099, 0x30D6), + HB_CODEPOINT_ENCODE3 (0x30D5, 0x309A, 0x30D7), HB_CODEPOINT_ENCODE3 (0x30D8, 0x3099, 0x30D9), + HB_CODEPOINT_ENCODE3 (0x30D8, 0x309A, 0x30DA), HB_CODEPOINT_ENCODE3 (0x30DB, 0x3099, 0x30DC), + HB_CODEPOINT_ENCODE3 (0x30DB, 0x309A, 0x30DD), HB_CODEPOINT_ENCODE3 (0x30EF, 0x3099, 0x30F7), + HB_CODEPOINT_ENCODE3 (0x30F0, 0x3099, 0x30F8), HB_CODEPOINT_ENCODE3 (0x30F1, 0x3099, 0x30F9), + HB_CODEPOINT_ENCODE3 (0x30F2, 0x3099, 0x30FA), HB_CODEPOINT_ENCODE3 (0x30FD, 0x3099, 0x30FE), + HB_CODEPOINT_ENCODE3 (0xFB49, 0x05C1, 0x0000), HB_CODEPOINT_ENCODE3 (0xFB49, 0x05C2, 0x0000), + HB_CODEPOINT_ENCODE3 (0x105D2, 0x0307, 0x105C9), HB_CODEPOINT_ENCODE3 (0x105DA, 0x0307, 0x105E4), + HB_CODEPOINT_ENCODE3 (0x11099, 0x110BA, 0x1109A),HB_CODEPOINT_ENCODE3 (0x1109B, 0x110BA, 0x1109C), + HB_CODEPOINT_ENCODE3 (0x110A5, 0x110BA, 0x110AB),HB_CODEPOINT_ENCODE3 (0x11131, 0x11127, 0x1112E), + HB_CODEPOINT_ENCODE3 (0x11132, 0x11127, 0x1112F),HB_CODEPOINT_ENCODE3 (0x11347, 0x1133E, 0x1134B), + HB_CODEPOINT_ENCODE3 (0x11347, 0x11357, 0x1134C),HB_CODEPOINT_ENCODE3 (0x11382, 0x113C9, 0x11383), + HB_CODEPOINT_ENCODE3 (0x11384, 0x113BB, 0x11385),HB_CODEPOINT_ENCODE3 (0x1138B, 0x113C2, 0x1138E), + HB_CODEPOINT_ENCODE3 (0x11390, 0x113C9, 0x11391),HB_CODEPOINT_ENCODE3 (0x113C2, 0x113B8, 0x113C7), + HB_CODEPOINT_ENCODE3 (0x113C2, 0x113C2, 0x113C5),HB_CODEPOINT_ENCODE3 (0x113C2, 0x113C9, 0x113C8), + HB_CODEPOINT_ENCODE3 (0x114B9, 0x114B0, 0x114BC),HB_CODEPOINT_ENCODE3 (0x114B9, 0x114BA, 0x114BB), + HB_CODEPOINT_ENCODE3 (0x114B9, 0x114BD, 0x114BE),HB_CODEPOINT_ENCODE3 (0x115B8, 0x115AF, 0x115BA), + HB_CODEPOINT_ENCODE3 (0x115B9, 0x115AF, 0x115BB),HB_CODEPOINT_ENCODE3 (0x11935, 0x11930, 0x11938), + HB_CODEPOINT_ENCODE3 (0x1611E, 0x1611E, 0x16121),HB_CODEPOINT_ENCODE3 (0x1611E, 0x1611F, 0x16123), + HB_CODEPOINT_ENCODE3 (0x1611E, 0x16120, 0x16125),HB_CODEPOINT_ENCODE3 (0x1611E, 0x16129, 0x16122), + HB_CODEPOINT_ENCODE3 (0x16121, 0x1611F, 0x16126),HB_CODEPOINT_ENCODE3 (0x16121, 0x16120, 0x16128), + HB_CODEPOINT_ENCODE3 (0x16122, 0x1611F, 0x16127),HB_CODEPOINT_ENCODE3 (0x16129, 0x1611F, 0x16124), + HB_CODEPOINT_ENCODE3 (0x16D63, 0x16D67, 0x16D69),HB_CODEPOINT_ENCODE3 (0x16D67, 0x16D67, 0x16D68), + HB_CODEPOINT_ENCODE3 (0x16D69, 0x16D67, 0x16D6A), HB_CODEPOINT_ENCODE3 (0x1D157, 0x1D165, 0x0000), + HB_CODEPOINT_ENCODE3 (0x1D158, 0x1D165, 0x0000), HB_CODEPOINT_ENCODE3 (0x1D15F, 0x1D16E, 0x0000), + HB_CODEPOINT_ENCODE3 (0x1D15F, 0x1D16F, 0x0000), HB_CODEPOINT_ENCODE3 (0x1D15F, 0x1D170, 0x0000), + HB_CODEPOINT_ENCODE3 (0x1D15F, 0x1D171, 0x0000), HB_CODEPOINT_ENCODE3 (0x1D15F, 0x1D172, 0x0000), + HB_CODEPOINT_ENCODE3 (0x1D1B9, 0x1D165, 0x0000), HB_CODEPOINT_ENCODE3 (0x1D1BA, 0x1D165, 0x0000), + HB_CODEPOINT_ENCODE3 (0x1D1BB, 0x1D16E, 0x0000), HB_CODEPOINT_ENCODE3 (0x1D1BB, 0x1D16F, 0x0000), + HB_CODEPOINT_ENCODE3 (0x1D1BC, 0x1D16E, 0x0000), HB_CODEPOINT_ENCODE3 (0x1D1BC, 0x1D16F, 0x0000), }; #ifndef HB_OPTIMIZE_SIZE -static const uint8_t -_hb_ucd_u8[17612] = +#include <stdint.h> + +static const uint8_t _hb_ucd_u8[19868]= { - 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 5, 5, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 5, 17, 15, 18, 19, 20, 21, 22, 23, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 24, 25, 26, 5, 27, 28, - 5, 29, 30, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 31, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 32, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 33, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 17, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 33, 41, 42, 43, 44, 45, - 46, 47, 48, 39, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 49, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 50, 17, 17, 17, 51, 17, 52, 53, 54, 55, 56, 57, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 58, 59, 59, 59, 59, 59, 59, 59, 59, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 17, 61, 62, 17, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 17, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 17, 17, 17, 97, 98, 99,100,100,100,100,100,100,100,100,100,101, - 17, 17, 17, 17,102, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17,103, 17, 17,104,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,105,100,100,100,100,100,100, 17, 17,106,107,100,108,109,110, - 17, 17, 17, 17, 17, 17, 17,111, 17, 17, 17, 17,112,113,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,114, - 17,115,116,100,100,100,100,100,100,100,100,100,117,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,118, 39,119,120, - 121,122,123,124,125,126,127,128, 39, 39,129,100,100,100,100,130, - 131,132,133,100,134,135,100,136,137,138,100,100,139,140,141,100, - 142,143,144,145, 39, 39,146,147,148, 39,149,150,100,100,100,100, - 17, 17, 17, 17, 17, 17,151, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17,152,153, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,154, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,155, 17, 17,156,100, - 100,100,100,100,100,100,100,100, 17, 17,157,100,100,100,100,100, - 17, 17, 17,158, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17,159,100,100,100,100,100,100,100,100,100,100,100,100, - 160,161,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,162, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,163, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 27, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 28, 26, 29, 30, 31, 32, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 33, 34, 34, 34, 34, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 26, 56, 57, 58, 58, 58, 58, 59, 26, 26, 60, 26, 26, 26, 26, 26, + 26, 61, 26, 62, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 63, 58, 58, 58, 26, 64, 65, 66, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 67, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 68, 69, 70, 58, 58, 58, 58, 71, 58, + 58, 58, 58, 58, 58, 58, 72, 73, 74, 75, 76, 77, 78, 79, 58, 80, + 81, 82, 83, 84, 85, 58, 86, 87, 88, 89, 78, 90, 91, 92, 58, 58, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 93, 26, 26, 26, 26, 26, 26, 26, 26, 94, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 95, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 96, 26, 97, 58, 58, 58, 58, 26, 98, 58, 58, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 99, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,100, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 101, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,102, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,103, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2, 7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, @@ -1148,496 +914,529 @@ 34, 11, 34, 34, 32, 35, 32, 16, 36, 36, 37, 34, 38, 37, 34, 34, 34, 34, 34, 34, 34, 34, 16, 32, 34, 38, 32, 11, 32, 32, 32, 32, 32, 32, 16, 16, 16, 11, 34, 32, 34, 34, 11, 32, 32, 32, 32, 32, - 16, 16, 39, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 41, 41, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, - 40, 40, 42, 41, 41, 41, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, - 43, 43, 43, 43, 43, 43, 43, 43, 32, 32, 42, 32, 44, 45, 16, 10, - 44, 44, 41, 46, 11, 47, 47, 11, 34, 11, 11, 11, 11, 11, 11, 11, - 11, 48, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, - 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 49, 34, 32, 34, 11, - 32, 50, 43, 43, 51, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16, - 48, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 47, 52, 2, 2, 2, - 16, 16, 16, 16, 53, 54, 55, 56, 57, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 58, 59, 60, 43, 59, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, 62, - 36, 63, 64, 44, 44, 44, 44, 44, 65, 65, 65, 8, 9, 66, 2, 67, - 43, 43, 43, 43, 43, 60, 68, 2, 69, 36, 36, 36, 36, 70, 43, 43, - 7, 7, 7, 7, 7, 2, 2, 36, 71, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 72, 43, 43, 43, 73, 50, 43, 43, 74, 75, 76, 43, 43, 36, - 7, 7, 7, 7, 7, 36, 77, 78, 2, 2, 2, 2, 2, 2, 2, 79, - 70, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 80, 62, 36, - 36, 36, 36, 43, 43, 43, 43, 43, 71, 44, 44, 44, 44, 44, 44, 44, - 7, 7, 7, 7, 7, 36, 36, 36, 36, 36, 36, 36, 36, 70, 43, 43, - 43, 43, 40, 21, 2, 81, 57, 20, 36, 36, 36, 43, 43, 75, 43, 43, - 43, 43, 75, 43, 75, 43, 43, 44, 2, 2, 2, 2, 2, 2, 2, 64, - 36, 36, 36, 36, 70, 43, 44, 64, 36, 36, 36, 36, 36, 61, 44, 44, - 36, 36, 36, 36, 82, 36, 36, 61, 65, 44, 44, 57, 43, 43, 43, 43, - 36, 36, 36, 36, 83, 43, 43, 43, 43, 84, 43, 43, 43, 43, 43, 43, - 43, 85, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 85, 71, 86, - 87, 43, 43, 43, 85, 86, 87, 86, 70, 43, 43, 43, 36, 36, 36, 36, - 36, 43, 2, 7, 7, 7, 7, 7, 88, 36, 36, 36, 36, 36, 36, 36, - 70, 86, 62, 36, 36, 36, 61, 62, 61, 62, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 61, 36, 36, 36, 61, 61, 44, 36, 36, 44, 71, 86, - 87, 43, 80, 89, 90, 89, 87, 61, 44, 44, 44, 89, 44, 44, 36, 62, - 36, 43, 44, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 56, 63, 80, - 57, 85, 62, 36, 36, 61, 44, 62, 61, 36, 62, 61, 36, 44, 80, 86, - 87, 80, 44, 57, 80, 57, 43, 44, 57, 44, 44, 44, 62, 36, 61, 61, - 44, 44, 44, 7, 7, 7, 7, 7, 43, 36, 70, 64, 44, 44, 44, 44, - 57, 85, 62, 36, 36, 36, 36, 62, 36, 62, 36, 36, 36, 36, 36, 36, - 61, 36, 62, 36, 36, 44, 71, 86, 87, 43, 43, 57, 85, 89, 87, 44, - 61, 44, 44, 44, 44, 44, 44, 44, 66, 44, 44, 44, 62, 43, 43, 43, - 57, 86, 62, 36, 36, 36, 61, 62, 61, 36, 62, 36, 36, 44, 71, 87, - 87, 43, 80, 89, 90, 89, 87, 44, 44, 44, 57, 85, 44, 44, 36, 62, - 78, 27, 27, 27, 44, 44, 44, 44, 44, 71, 62, 36, 36, 61, 44, 36, - 61, 36, 36, 44, 62, 61, 61, 36, 44, 62, 61, 44, 36, 61, 44, 36, - 36, 36, 36, 36, 36, 44, 44, 86, 85, 90, 44, 86, 90, 86, 87, 44, - 61, 44, 44, 89, 44, 44, 44, 44, 27, 91, 67, 67, 56, 92, 44, 44, - 85, 86, 71, 36, 36, 36, 61, 36, 61, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 44, 71, 43, 85, 86, 90, 43, 80, 43, 43, 44, - 44, 44, 57, 80, 36, 61, 62, 44, 44, 44, 44, 93, 27, 27, 27, 91, - 70, 86, 72, 36, 36, 36, 61, 36, 36, 36, 62, 36, 36, 44, 71, 87, - 86, 86, 90, 85, 90, 86, 43, 44, 44, 44, 89, 90, 44, 44, 62, 61, - 62, 94, 44, 44, 44, 44, 44, 44, 43, 86, 36, 36, 36, 36, 61, 36, - 36, 36, 36, 36, 36, 70, 71, 86, 87, 43, 80, 86, 90, 86, 87, 77, - 44, 44, 36, 94, 27, 27, 27, 95, 27, 27, 27, 27, 91, 36, 36, 36, - 57, 86, 62, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, 36, 36, 36, - 36, 62, 36, 36, 36, 36, 62, 44, 36, 36, 36, 61, 44, 80, 44, 89, - 86, 43, 80, 80, 86, 86, 86, 86, 44, 86, 64, 44, 44, 44, 44, 44, - 62, 36, 36, 36, 36, 36, 36, 36, 70, 36, 43, 43, 43, 80, 44, 96, - 36, 36, 36, 75, 43, 43, 43, 60, 7, 7, 7, 7, 7, 2, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 62, 61, 61, 36, 36, 61, 36, 36, - 36, 36, 62, 62, 36, 36, 36, 36, 70, 36, 43, 43, 43, 43, 71, 44, - 36, 36, 61, 81, 43, 43, 43, 80, 7, 7, 7, 7, 7, 44, 36, 36, - 77, 67, 2, 2, 2, 2, 2, 2, 2, 97, 97, 67, 43, 67, 67, 67, - 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 50, 50, 50, 4, 4, 86, - 36, 36, 36, 36, 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, - 57, 43, 43, 43, 43, 43, 43, 85, 43, 43, 60, 43, 36, 36, 70, 43, - 43, 43, 43, 43, 57, 43, 43, 43, 43, 43, 43, 43, 43, 43, 80, 67, - 67, 67, 67, 76, 67, 67, 92, 67, 2, 2, 97, 67, 21, 64, 44, 44, - 36, 36, 36, 36, 36, 94, 87, 43, 85, 43, 43, 43, 87, 85, 87, 71, - 7, 7, 7, 7, 7, 2, 2, 2, 36, 36, 36, 86, 43, 36, 36, 43, - 71, 86, 98, 94, 86, 86, 86, 36, 70, 43, 71, 36, 36, 36, 36, 36, - 36, 85, 87, 85, 86, 86, 87, 94, 7, 7, 7, 7, 7, 86, 87, 67, - 11, 11, 11, 48, 44, 44, 48, 44, 16, 16, 16, 16, 16, 53, 45, 16, - 36, 36, 36, 36, 61, 36, 36, 44, 36, 36, 36, 61, 61, 36, 36, 44, - 61, 36, 36, 44, 36, 36, 36, 61, 61, 36, 36, 44, 36, 36, 36, 36, - 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 57, 43, - 2, 2, 2, 2, 99, 27, 27, 27, 27, 27, 27, 27, 27, 27,100, 44, - 67, 67, 67, 67, 67, 44, 44, 44, 11, 11, 11, 44, 16, 16, 16, 44, - 101, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 72, - 102, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,103,104, 44, - 36, 36, 36, 36, 36, 63, 2,105,106, 36, 36, 36, 61, 44, 44, 44, - 36, 43, 85, 44, 44, 44, 44, 62, 36, 43,107, 64, 44, 44, 44, 44, - 36, 43, 44, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 61, 36, - 61, 43, 44, 44, 44, 44, 44, 44, 36, 36, 43, 87, 43, 43, 43, 86, - 86, 86, 86, 85, 87, 43, 43, 43, 43, 43, 2, 88, 2, 66, 70, 44, - 7, 7, 7, 7, 7, 44, 44, 44, 27, 27, 27, 27, 27, 44, 44, 44, - 2, 2, 2,108, 2, 59, 43, 84, 36, 83, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 61, 44, 44, 44, 36, 36, 70, 71, 36, 36, 36, 36, - 36, 36, 36, 36, 70, 61, 44, 44, 36, 36, 36, 44, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 36, 36, 61, 43, 85, 86, 87, 85, 86, 44, 44, - 86, 85, 86, 86, 87, 43, 44, 44, 92, 44, 2, 7, 7, 7, 7, 7, - 36, 36, 36, 36, 36, 36, 36, 44, 36, 36, 61, 44, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 36, 44, 44, 36, 36, 36, 36, 36, 44, 44, 44, - 7, 7, 7, 7, 7,100, 44, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 36, 36, 36, 70, 85, 87, 44, 2, 36, 36, 94, 85, 43, 43, 43, 80, - 85, 85, 87, 43, 43, 43, 85, 86, 86, 87, 43, 43, 43, 43, 80, 57, - 2, 2, 2, 88, 2, 2, 2, 44, 43, 43, 43, 43, 43, 43, 43,109, - 43, 43, 43, 43, 43, 43, 43, 80, 43, 43, 98, 36, 36, 36, 36, 36, - 36, 36, 85, 43, 43, 85, 85, 86, 86, 85, 98, 36, 36, 36, 61, 2, - 97, 67, 67, 67, 67, 50, 43, 43, 43, 43, 67, 67, 67, 67, 21, 2, - 43, 98, 36, 36, 36, 36, 36, 36, 94, 43, 43, 86, 43, 87, 43, 36, - 36, 36, 36, 85, 43, 86, 87, 87, 43, 86, 44, 44, 44, 44, 2, 2, - 36, 36, 86, 86, 86, 86, 43, 43, 43, 43, 86, 43, 44, 93, 2, 2, - 7, 7, 7, 7, 7, 44, 62, 36, 36, 36, 36, 36, 40, 40, 40, 2, - 16, 16, 16, 16, 34,110, 44, 44, 11, 11, 11, 11, 11, 47, 48, 11, - 2, 2, 2, 2, 44, 44, 44, 44, 43, 60, 43, 43, 43, 43, 43, 43, - 85, 43, 43, 43, 71, 36, 70, 36, 36, 36, 71, 94, 43, 61, 44, 44, - 16, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 45, 16, 16, - 16, 16, 16, 16, 45, 16, 16, 16, 16, 16, 16, 16, 16,111, 40, 40, - 32, 32, 32, 16, 16, 16, 16, 32, 16, 16, 16, 16, 11, 11, 11, 11, - 16, 16, 16, 44, 11, 11, 11, 44, 16, 16, 16, 16, 48, 48, 48, 48, - 16, 16, 16, 16, 16, 16, 16, 44, 16, 16, 16, 16,112,112,112,112, - 16, 16,110, 16, 11, 11,113,114, 41, 16,110, 16, 11, 11,113, 41, - 16, 16, 44, 16, 11, 11,115, 41, 16, 16, 16, 16, 11, 11,116, 41, - 44, 16,110, 16, 11, 11,113,117,118,118,118,118,118,119, 65, 65, - 120,120,120, 2,121,122,121,122, 2, 2, 2, 2,123, 65, 65,124, - 2, 2, 2, 2,125,126, 2,127,128, 2,129,130, 2, 2, 2, 2, - 2, 9,128, 2, 2, 2, 2,131, 65, 65,132, 65, 65, 65, 65, 65, - 133, 44, 27, 27, 27, 8,129,134, 27, 27, 27, 27, 27, 8,129,104, - 40, 40, 40, 40, 40, 40, 81, 44, 20, 20, 20, 20, 20, 20, 20, 20, - 135, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43,136, 51, - 109, 51,109, 43, 43, 43, 43, 43, 80, 44, 44, 44, 44, 44, 44, 44, - 67,137, 67,138, 67, 34, 11, 16, 11, 32,138, 67, 49, 11, 11, 67, - 67, 67,137,137,137, 11, 11,139, 11, 11, 35, 36, 39, 67, 16, 11, - 8, 8, 49, 16, 16, 26, 67,140, 27, 27, 27, 27, 27, 27, 27, 27, - 105,105,105,105,105,105,105,105,105,141,142,105,143, 67, 44, 44, - 8, 8,144, 67, 67, 8, 67, 67,144, 26, 67,144, 67, 67, 67,144, - 67, 67, 67, 67, 67, 67, 67, 8, 67,144,144, 67, 67, 67, 67, 67, - 67, 67, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 67, 67, 67, 67, 4, 4, 67, 67, 8, 67, 67, 67,145,146, 67, 67, - 67, 67, 67, 67, 67, 67,144, 67, 67, 67, 67, 67, 67, 26, 8, 8, - 8, 8, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 8, 8, - 8, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 92, 44, 44, - 27, 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67, 67, 27, 27, 27, - 67, 67, 67, 26, 67, 67, 67, 67, 26, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 8, 8, 8, 8, 67, 67, 67, 67, 67, 67, 67, 26, - 67, 67, 67, 67, 4, 4, 4, 4, 4, 4, 4, 27, 27, 27, 27, 27, - 27, 27, 67, 67, 67, 67, 67, 67, 8, 8,129,147, 8, 8, 8, 8, - 8, 8, 8, 4, 4, 4, 4, 4, 8,129,148,148,148,148,148,148, - 148,148,148,148,147, 8, 8, 8, 8, 8, 8, 8, 4, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 4, 8, 8, 8,144, 26, 8, 8,144, 67, - 67, 67, 44, 67, 67, 67, 67, 67, 67, 67, 67, 55, 67, 67, 67, 67, - 32, 11, 32, 34, 34, 34, 34, 11, 32, 32, 34, 16, 16, 16, 40, 11, - 32, 32,140, 67, 67,138, 34,149, 43, 32, 44, 44, 93, 2, 99, 2, - 16, 16, 16,150, 44, 44,150, 44, 36, 36, 36, 36, 44, 44, 44, 52, - 64, 44, 44, 44, 44, 44, 44, 57, 36, 36, 36, 61, 44, 44, 44, 44, - 36, 36, 36, 61, 36, 36, 36, 61, 2,121,121, 2,125,126,121, 2, - 2, 2, 2, 6, 2,108,121, 2,121, 4, 4, 4, 4, 2, 2, 88, - 2, 2, 2, 2, 2,120, 2, 2,108,151, 2, 2, 2, 2, 2, 2, - 67, 2,152,148,148,148,153, 44, 67, 67, 67, 67, 67, 55, 67, 67, - 67, 67, 44, 44, 44, 44, 44, 44, 67, 67, 67, 44, 44, 44, 44, 44, - 1, 2,154,155, 4, 4, 4, 4, 4, 67, 4, 4, 4, 4,156,157, - 158,105,105,105,105, 43, 43, 86,159, 40, 40, 67,105,160, 63, 67, - 36, 36, 36, 61, 57,161,162, 69, 36, 36, 36, 36, 36, 63, 40, 69, - 44, 44, 62, 36, 36, 36, 36, 36, 67, 27, 27, 67, 67, 67, 67, 67, - 67, 67, 67, 44, 44, 44, 44, 55, 67, 67, 67, 67, 67, 67, 67, 92, - 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67, 67, 27, 27, 27, 27, - 163, 27, 27, 27, 27, 27, 27, 27, 36, 36, 83, 36, 36, 36, 36, 36, - 67, 67, 67, 92, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36,164, 2, - 7, 7, 7, 7, 7, 36, 44, 44, 32, 32, 32, 32, 32, 32, 32, 70, - 51,165, 43, 43, 43, 43, 43, 88, 32, 32, 32, 32, 32, 32, 40, 43, - 36, 36, 36,105,105,105,105,105, 43, 2, 2, 2, 44, 44, 44, 44, - 41, 41, 41,162, 40, 40, 40, 40, 41, 32, 32, 32, 32, 32, 32, 32, - 16, 32, 32, 32, 32, 32, 32, 32, 45, 16, 16, 16, 34, 34, 34, 32, - 32, 32, 32, 32, 42,166, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32, + 16, 16, 36, 16, 16, 16, 16, 16, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 40, 40, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, + 39, 39, 41, 40, 40, 40, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, + 42, 42, 42, 42, 42, 42, 42, 42, 32, 32, 41, 32, 43, 44, 16, 10, + 43, 43, 40, 45, 11, 46, 46, 11, 34, 11, 11, 11, 11, 11, 11, 11, + 11, 47, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, + 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 48, 34, 32, 34, 11, + 32, 49, 42, 42, 50, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16, + 47, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 46, 51, 2, 2, 2, + 16, 16, 16, 16, 52, 53, 54, 55, 56, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 57, 58, 59, 42, 58, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 43, 61, + 36, 62, 63, 43, 43, 43, 43, 43, 64, 64, 64, 8, 9, 65, 2, 66, + 42, 42, 42, 42, 42, 59, 67, 2, 68, 36, 36, 36, 36, 69, 42, 42, + 7, 7, 7, 7, 7, 2, 2, 36, 70, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 71, 42, 42, 42, 72, 49, 42, 42, 73, 74, 75, 42, 42, 36, + 7, 7, 7, 7, 7, 36, 76, 77, 2, 2, 2, 2, 2, 2, 2, 78, + 69, 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, 42, 42, 79, 61, 36, + 36, 36, 36, 42, 42, 42, 42, 42, 70, 43, 43, 43, 43, 43, 43, 43, + 7, 7, 7, 7, 7, 36, 36, 36, 36, 36, 36, 36, 36, 69, 42, 42, + 42, 42, 39, 21, 2, 80, 56, 20, 36, 36, 36, 42, 42, 74, 42, 42, + 42, 42, 74, 42, 74, 42, 42, 43, 2, 2, 2, 2, 2, 2, 2, 63, + 36, 36, 36, 36, 69, 42, 43, 63, 36, 36, 36, 36, 36, 60, 43, 43, + 36, 36, 36, 36, 81, 36, 36, 36, 64, 43, 43, 56, 42, 42, 42, 42, + 36, 36, 36, 36, 82, 42, 42, 42, 42, 83, 42, 42, 42, 42, 42, 42, + 42, 84, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 84, 70, 85, + 86, 42, 42, 42, 84, 85, 86, 85, 69, 42, 42, 42, 36, 36, 36, 36, + 36, 42, 2, 7, 7, 7, 7, 7, 87, 36, 36, 36, 36, 36, 36, 36, + 69, 85, 61, 36, 36, 36, 60, 61, 60, 61, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 60, 36, 36, 36, 60, 60, 43, 36, 36, 43, 70, 85, + 86, 42, 79, 88, 89, 88, 86, 60, 43, 43, 43, 88, 43, 43, 36, 61, + 36, 42, 43, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 55, 62, 79, + 56, 84, 61, 36, 36, 60, 43, 61, 60, 36, 61, 60, 36, 43, 79, 85, + 86, 79, 43, 56, 79, 56, 42, 43, 56, 43, 43, 43, 61, 36, 60, 60, + 43, 43, 43, 7, 7, 7, 7, 7, 42, 36, 69, 63, 43, 43, 43, 43, + 56, 84, 61, 36, 36, 36, 36, 61, 36, 61, 36, 36, 36, 36, 36, 36, + 60, 36, 61, 36, 36, 43, 70, 85, 86, 42, 42, 56, 84, 88, 86, 43, + 60, 43, 43, 43, 43, 43, 43, 43, 65, 43, 43, 43, 61, 42, 42, 42, + 56, 85, 61, 36, 36, 36, 60, 61, 60, 36, 61, 36, 36, 43, 70, 86, + 86, 42, 79, 88, 89, 88, 86, 43, 43, 43, 56, 84, 43, 43, 36, 61, + 77, 27, 27, 27, 43, 43, 43, 43, 43, 70, 61, 36, 36, 60, 43, 36, + 60, 36, 36, 43, 61, 60, 60, 36, 43, 61, 60, 43, 36, 60, 43, 36, + 36, 36, 36, 36, 36, 43, 43, 85, 84, 89, 43, 85, 89, 85, 86, 43, + 60, 43, 43, 88, 43, 43, 43, 43, 27, 90, 66, 66, 55, 91, 43, 43, + 84, 85, 70, 36, 36, 36, 60, 36, 60, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 43, 70, 42, 84, 85, 89, 42, 79, 42, 42, 43, + 43, 43, 56, 79, 36, 60, 36, 43, 43, 43, 43, 92, 27, 27, 27, 90, + 69, 85, 71, 36, 36, 36, 60, 36, 36, 36, 61, 36, 36, 43, 70, 86, + 85, 85, 89, 84, 89, 85, 42, 43, 43, 43, 88, 89, 43, 43, 36, 60, + 61, 93, 43, 43, 43, 43, 43, 43, 42, 85, 36, 36, 36, 36, 60, 36, + 36, 36, 36, 36, 36, 69, 70, 85, 86, 42, 79, 85, 89, 85, 86, 76, + 43, 43, 36, 93, 27, 27, 27, 94, 27, 27, 27, 27, 90, 36, 36, 36, + 56, 85, 61, 36, 36, 36, 36, 36, 36, 36, 36, 60, 43, 36, 36, 36, + 36, 61, 36, 36, 36, 36, 61, 43, 36, 36, 36, 60, 43, 79, 43, 88, + 85, 42, 79, 79, 85, 85, 85, 85, 43, 85, 63, 43, 43, 43, 43, 43, + 61, 36, 36, 36, 36, 36, 36, 36, 69, 36, 42, 42, 42, 79, 43, 95, + 36, 36, 36, 74, 42, 42, 42, 59, 7, 7, 7, 7, 7, 2, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 61, 60, 60, 36, 36, 60, 36, 36, + 36, 36, 61, 61, 36, 36, 36, 36, 69, 36, 42, 42, 42, 42, 70, 43, + 36, 36, 60, 80, 42, 42, 42, 79, 7, 7, 7, 7, 7, 43, 36, 36, + 76, 66, 2, 2, 2, 2, 2, 2, 2, 96, 96, 66, 42, 66, 66, 66, + 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 49, 49, 49, 4, 4, 85, + 36, 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 43, + 56, 42, 42, 42, 42, 42, 42, 84, 42, 42, 59, 42, 36, 36, 69, 42, + 42, 42, 42, 42, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 79, 66, + 66, 66, 66, 75, 66, 66, 91, 66, 2, 2, 96, 66, 21, 63, 43, 43, + 36, 36, 36, 36, 36, 93, 86, 42, 84, 42, 42, 42, 86, 84, 86, 70, + 7, 7, 7, 7, 7, 2, 2, 2, 36, 36, 36, 85, 42, 36, 36, 42, + 70, 85, 97, 93, 85, 85, 85, 36, 69, 42, 70, 36, 36, 36, 36, 36, + 36, 84, 86, 84, 85, 85, 86, 93, 7, 7, 7, 7, 7, 85, 86, 66, + 11, 11, 11, 47, 43, 43, 47, 43, 16, 16, 16, 16, 16, 52, 44, 16, + 36, 36, 36, 36, 60, 36, 36, 43, 36, 36, 36, 60, 60, 36, 36, 43, + 60, 36, 36, 43, 36, 36, 36, 60, 60, 36, 36, 43, 36, 36, 36, 36, + 36, 36, 36, 60, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 56, 42, + 2, 2, 2, 2, 98, 27, 27, 27, 27, 27, 27, 27, 27, 27, 99, 43, + 66, 66, 66, 66, 66, 43, 43, 43, 11, 11, 11, 43, 16, 16, 16, 43, + 100, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 76, 71, + 101, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,102,103, 43, + 36, 36, 36, 36, 36, 62, 2,104,105, 36, 36, 36, 60, 43, 43, 43, + 36, 42, 84, 43, 43, 43, 43, 61, 36, 42,106, 63, 43, 43, 43, 43, + 36, 42, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36, 60, 36, + 60, 42, 43, 43, 43, 43, 43, 43, 36, 36, 42, 86, 42, 42, 42, 85, + 85, 85, 85, 84, 86, 42, 42, 42, 42, 42, 2, 87, 2, 65, 69, 43, + 7, 7, 7, 7, 7, 43, 43, 43, 27, 27, 27, 27, 27, 43, 43, 43, + 2, 2, 2,107, 2, 58, 42, 83, 36, 82, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 60, 43, 43, 43, 36, 36, 69, 70, 36, 36, 36, 36, + 36, 36, 36, 36, 69, 60, 43, 43, 36, 36, 36, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 60, 42, 84, 85, 86, 84, 85, 43, 43, + 85, 84, 85, 85, 86, 42, 43, 43, 91, 43, 2, 7, 7, 7, 7, 7, + 36, 36, 36, 36, 36, 36, 36, 43, 36, 36, 60, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 43, 43, 36, 36, 36, 36, 36, 43, 43, 43, + 7, 7, 7, 7, 7, 99, 43, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 36, 36, 36, 69, 84, 86, 43, 2, 36, 36, 93, 84, 42, 42, 42, 79, + 84, 84, 86, 42, 42, 42, 84, 85, 85, 86, 42, 42, 42, 42, 79, 56, + 2, 2, 2, 87, 2, 2, 2, 43, 42, 42, 42, 42, 42, 42, 42,108, + 42, 42, 42, 42, 42, 42, 42, 43, 42, 42, 42, 42, 42, 42, 43, 43, + 42, 42, 97, 36, 36, 36, 36, 36, 36, 36, 84, 42, 42, 84, 84, 85, + 85, 84, 97, 36, 36, 36, 60, 2, 96, 66, 66, 66, 66, 49, 42, 42, + 42, 42, 66, 66, 66, 66, 21, 2, 42, 97, 36, 36, 36, 36, 36, 36, + 93, 42, 42, 85, 42, 86, 42, 36, 36, 36, 36, 84, 42, 85, 86, 86, + 42, 85, 43, 43, 43, 43, 2, 2, 36, 36, 85, 85, 85, 85, 42, 42, + 42, 42, 85, 42, 43, 92, 2, 2, 7, 7, 7, 7, 7, 43, 61, 36, + 36, 36, 36, 36, 39, 39, 39, 2, 16, 16, 16, 16, 34,109, 43, 43, + 11, 11, 11, 11, 11, 46, 47, 11, 2, 2, 2, 2, 43, 43, 43, 43, + 42, 59, 42, 42, 42, 42, 42, 42, 84, 42, 42, 42, 70, 36, 69, 36, + 36, 36, 70, 93, 42, 60, 43, 43, 16, 16, 16, 16, 16, 16, 39, 39, + 39, 39, 39, 39, 39, 44, 16, 16, 16, 16, 16, 16, 44, 16, 16, 16, + 16, 16, 16, 16, 16,110, 39, 39, 32, 32, 32, 16, 16, 16, 16, 32, + 16, 16, 16, 16, 11, 11, 11, 11, 16, 16, 16, 43, 11, 11, 11, 43, + 16, 16, 16, 16, 47, 47, 47, 47, 16, 16, 16, 16, 16, 16, 16, 43, + 16, 16, 16, 16,111,111,111,111, 16, 16,109, 16, 11, 11,112,113, + 40, 16,109, 16, 11, 11,112, 40, 16, 16, 43, 16, 11, 11,114, 40, + 16, 16, 16, 16, 11, 11,115, 40, 43, 16,109, 16, 11, 11,112,116, + 117,117,117,117,117,118, 64, 64,119,119,119, 2,120,121,120,121, + 2, 2, 2, 2,122, 64, 64,123, 2, 2, 2, 2,124,125, 2,126, + 127, 2,128,129, 2, 2, 2, 2, 2, 9,127, 2, 2, 2, 2,130, + 64, 64,131, 64, 64, 64, 64, 64,132, 43, 27, 27, 27, 8,128,133, + 27, 27, 27, 27, 27, 8,128,103, 39, 39, 39, 39, 39, 39, 80, 43, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 43, 43, 43, 43, 43, 43, 43, + 42, 42, 42, 42, 42, 42,134, 50,108, 50,108, 42, 42, 42, 42, 42, + 79, 43, 43, 43, 43, 43, 43, 43, 66,135, 66,136, 66, 34, 11, 16, + 11, 32,136, 66, 48, 11, 11, 66, 66, 66,135,135,135, 11, 11,137, + 11, 11, 35, 36,138, 66, 16, 11, 8, 8, 48, 16, 16, 26, 66,139, + 27, 27, 27, 27, 27, 27, 27, 27,104,104,104,104,104,104,104,104, + 104,140,141,104,142, 66, 43, 43, 8, 8,143, 66, 66, 8, 66, 66, + 143, 26, 66,143, 66, 66, 66,143, 66, 66, 66, 66, 66, 66, 66, 8, + 66,143,143, 66, 66, 66, 66, 66, 66, 66, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 66, 66, 66, 66, 4, 4, 66, 66, + 8, 66, 66, 66,144,145, 66, 66, 66, 66, 66, 66, 66, 66,143, 66, + 66, 66, 66, 66, 66, 26, 8, 8, 8, 8, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 8, 8, 8, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 91, 43, 43, 27, 27, 27, 27, 27, 27, 66, 66, + 66, 66, 66, 66, 66, 27, 27, 27, 66, 66, 66, 26, 66, 66, 66, 66, + 26, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 8, 8, 8, 8, + 66, 66, 66, 66, 66, 66, 66, 26, 66, 66, 66, 66, 4, 4, 4, 4, + 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 66, 66, 66, 66, 66, 66, + 8, 8,128,146, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, + 8,128,147,147,147,147,147,147,147,147,147,147,146, 8, 8, 8, + 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, + 8, 8,143, 26, 8, 8,143, 66, 66, 66, 43, 66, 66, 66, 66, 66, + 32, 11, 32, 34, 34, 34, 34, 11, 32, 32, 34, 16, 16, 16, 39, 11, + 32, 32,139, 66, 66,136, 34,148, 42, 32, 43, 43, 92, 2, 98, 2, + 16, 16, 16,149, 43, 43,149, 43, 36, 36, 36, 36, 43, 43, 43, 51, + 63, 43, 43, 43, 43, 43, 43, 56, 36, 36, 36, 60, 43, 43, 43, 43, + 36, 36, 36, 60, 36, 36, 36, 60, 2,120,120, 2,124,125,120, 2, + 2, 2, 2, 6, 2,107,120, 2,120, 4, 4, 4, 4, 2, 2, 87, + 2, 2, 2, 2, 2,119, 2, 2,107,150, 2, 2, 2, 2, 2, 2, + 66, 2,151,147,147,147,152, 43, 66, 66, 66, 66, 66, 54, 66, 66, + 66, 66, 43, 43, 43, 43, 43, 43, 66, 66, 66, 43, 43, 43, 43, 43, + 1, 2,153,154, 4, 4, 4, 4, 4, 66, 4, 4, 4, 4,155,156, + 157,104,104,104,104, 42, 42, 85,158, 39, 39, 66,104,159, 62, 66, + 36, 36, 36, 60, 56,160,161, 68, 36, 36, 36, 36, 36, 62, 39, 68, + 43, 43, 61, 36, 36, 36, 36, 36, 66, 27, 27, 66, 66, 66, 66, 66, + 66, 66, 66, 43, 43, 43, 43, 54, 66, 66, 66, 66, 66, 66, 66, 91, + 27, 27, 27, 27, 27, 66, 66, 66, 66, 66, 66, 66, 27, 27, 27, 27, + 162, 27, 27, 27, 27, 27, 27, 27, 36, 36, 82, 36, 36, 36, 36, 36, + 66, 66, 66, 91, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36,163, 2, + 7, 7, 7, 7, 7, 36, 43, 43, 32, 32, 32, 32, 32, 32, 32, 69, + 50,164, 42, 42, 42, 42, 42, 87, 32, 32, 32, 32, 32, 32, 39, 42, + 36, 36, 36,104,104,104,104,104, 42, 2, 2, 2, 43, 43, 43, 43, + 40, 40, 40,161, 39, 39, 39, 39, 40, 32, 32, 32, 32, 32, 32, 32, + 16, 32, 32, 32, 32, 32, 32, 32, 44, 16, 16, 16, 34, 34, 34, 32, + 32, 32, 32, 32, 41,165, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, 32, 11, 11, 32, 32, 32, 32, 32, 32, - 32, 32, 11, 11, 34, 34, 32, 44, 32,150,150, 32, 32, 32, 47, 44, - 44, 40,167, 35, 40, 35, 36, 36, 36, 71, 36, 71, 36, 70, 36, 36, - 36, 94, 87, 85, 67, 67, 80, 44, 27, 27, 27, 67,168, 44, 44, 44, - 36, 36, 2, 2, 44, 44, 44, 44, 86, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 86, 86, 86, 86, 86, 86, 86, 86, 43, 44, 44, 44, 44, 2, - 43, 36, 36, 36, 2, 72, 72, 70, 36, 36, 36, 43, 43, 43, 43, 2, - 36, 36, 36, 70, 43, 43, 43, 43, 43, 86, 44, 44, 44, 44, 44, 93, - 36, 70, 86, 43, 43, 86, 43, 86,107, 2, 2, 2, 2, 2, 2, 52, - 7, 7, 7, 7, 7, 44, 44, 2, 36, 36, 70, 69, 36, 36, 36, 36, - 7, 7, 7, 7, 7, 36, 36, 61, 36, 36, 36, 36, 70, 43, 43, 85, - 87, 85, 87, 80, 44, 44, 44, 44, 36, 70, 36, 36, 36, 36, 85, 44, - 7, 7, 7, 7, 7, 44, 2, 2, 69, 36, 36, 77, 67, 94, 85, 36, - 71, 43, 71, 70, 71, 36, 36, 43, 70, 61, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 62, 83, 2, 36, 36, 36, 36, 36, 94, 43, 86, - 2, 83,169, 80, 44, 44, 44, 44, 62, 36, 36, 61, 62, 36, 36, 61, - 62, 36, 36, 61, 44, 44, 44, 44, 16, 16, 16, 16, 16,114, 40, 40, - 16, 16, 16, 16,111, 41, 44, 44, 36, 94, 87, 86, 85,107, 87, 44, - 36, 36, 44, 44, 44, 44, 44, 44, 36, 36, 36, 61, 44, 62, 36, 36, - 170,170,170,170,170,170,170,170,171,171,171,171,171,171,171,171, - 16, 16, 16,110, 44, 44, 44, 44, 44,150, 16, 16, 44, 44, 62, 71, - 36, 36, 36, 36,172, 36, 36, 36, 36, 36, 36, 61, 36, 36, 61, 61, - 36, 62, 61, 36, 36, 36, 36, 36, 36, 41, 41, 41, 41, 41, 41, 41, - 41,117, 44, 44, 44, 44, 44, 44, 44, 62, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36,148, 44, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 44, 44, 44, 55, 36, 36, 36, 36, 36, 36,168, 67, - 2, 2, 2,152,130, 44, 44, 44, 6,173,174,148,148,148,148,148, - 148,148,130,152,130, 2,127,175, 2, 64, 2, 2,156,148,148,130, - 2,176, 8,177, 66, 2, 44, 44, 36, 36, 61, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 61, 79, 93, 2, 3, 2, 4, 5, 6, 2, - 16, 16, 16, 16, 16, 17, 18,129,130, 4, 2, 36, 36, 36, 36, 36, - 69, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40, - 44, 36, 36, 36, 44, 36, 36, 36, 44, 36, 36, 36, 44, 36, 61, 44, - 20,178, 56,135, 26, 8,144, 92, 44, 44, 44, 44, 79, 65, 67, 44, - 36, 36, 36, 36, 36, 36, 62, 36, 36, 36, 36, 36, 36, 61, 36, 62, - 2, 64, 44,179, 27, 27, 27, 27, 27, 27, 44, 55, 67, 67, 67, 67, - 105,105,143, 27, 91, 67, 67, 67, 67, 67, 67, 67, 67, 27, 67, 92, - 67, 67, 67, 67, 67, 67, 92, 44, 92, 44, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 67, 50, 44,180, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 44, 44, 27, 27, 44, 44, 44, 44, 62, 36, - 155, 36, 36, 36, 36,181, 44, 44, 36, 36, 36, 43, 43, 80, 44, 44, - 36, 36, 36, 36, 36, 36, 36, 93, 36, 36, 44, 44, 36, 36, 36, 36, - 182,105,105, 44, 44, 44, 44, 44, 11, 11, 11, 11, 16, 16, 16, 16, - 11, 11, 44, 44, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44, - 36, 36, 36, 36, 44, 44, 44, 44, 36, 36, 44, 44, 44, 44, 44, 93, - 11, 11, 11, 11, 11, 47, 11, 11, 11, 47, 11,150, 16, 16, 16, 16, - 16,150, 16, 16, 16, 16, 16, 16, 16,150, 16, 16, 16,150,110, 44, - 40, 40, 40, 52, 40, 40, 40, 40, 81, 40, 40, 40, 40, 81, 44, 44, - 36, 36, 36, 44, 61, 36, 36, 36, 36, 36, 36, 62, 61, 44, 61, 62, - 36, 36, 36, 93, 27, 27, 27, 27, 36, 36, 36, 77,163, 27, 27, 27, - 44, 44, 44,179, 27, 27, 27, 27, 36, 61, 36, 44, 44,179, 27, 27, - 36, 36, 36, 27, 27, 27, 44, 93, 36, 36, 36, 36, 36, 44, 44, 93, - 36, 36, 36, 36, 44, 44, 27, 36, 44, 27, 27, 27, 27, 27, 27, 27, - 70, 43, 57, 80, 44, 44, 43, 43, 36, 36, 62, 36, 62, 36, 36, 36, - 36, 36, 36, 44, 43, 80, 44, 57, 27, 27, 27, 27,100, 44, 44, 44, - 2, 2, 2, 2, 64, 44, 44, 44, 36, 36, 36, 36, 36, 36,183, 30, - 36, 36, 36, 36, 36, 36,183, 27, 36, 36, 36, 36, 78, 36, 36, 36, - 36, 36, 70, 80, 44,179, 27, 27, 2, 2, 2, 64, 44, 44, 44, 44, - 36, 36, 36, 44, 93, 2, 2, 2, 36, 36, 36, 44, 27, 27, 27, 27, - 36, 61, 44, 44, 27, 27, 27, 27, 36, 44, 44, 44, 93, 2, 64, 44, - 44, 44, 44, 44,179, 27, 27, 27, 11, 47, 44, 44, 44, 44, 44, 44, - 16,110, 44, 44, 44, 27, 27, 27, 36, 36, 43, 43, 44, 44, 44, 44, - 7, 7, 7, 7, 7, 36, 36, 69, 11, 11, 11, 44, 57, 43, 43,159, - 16, 16, 16, 44, 44, 44, 44, 8, 27, 27, 27, 27, 27, 27, 27,100, - 36, 36, 36, 36, 36, 57,184, 44, 36, 44, 44, 44, 44, 44, 44, 44, - 44, 36, 61, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, - 27, 27, 27, 95, 44, 44, 44, 44,180, 27, 30, 2, 2, 44, 44, 44, - 36, 43, 43, 2, 2, 44, 44, 44, 36, 36,183, 27, 27, 27, 44, 44, - 87, 98, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, - 43, 43, 43, 60, 2, 2, 2, 44, 27, 27, 27, 7, 7, 7, 7, 7, - 71, 70, 71, 44, 44, 44, 44, 57, 86, 87, 43, 85, 87, 60,185, 2, - 2, 80, 44, 44, 44, 44, 79, 44, 43, 71, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 70, 43, 43, 87, 43, 43, 43, 80, 7, 7, 7, 7, 7, - 2, 2, 94, 98, 44, 44, 44, 44, 36, 70, 2, 61, 44, 44, 44, 44, - 36, 94, 86, 43, 43, 43, 43, 85, 98, 36, 63, 2, 59, 43, 60, 87, - 7, 7, 7, 7, 7, 63, 63, 2,179, 27, 27, 27, 27, 27, 27, 27, - 27, 27,100, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 86, 87, - 43, 86, 85, 43, 2, 2, 2, 71, 70, 44, 44, 44, 44, 44, 44, 44, - 36, 36, 36, 61, 61, 36, 36, 62, 36, 36, 36, 36, 36, 36, 36, 62, - 36, 36, 36, 36, 63, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 70, - 86, 87, 43, 43, 43, 80, 44, 44, 43, 86, 62, 36, 36, 36, 61, 62, - 61, 36, 62, 36, 36, 57, 71, 86, 85, 86, 90, 89, 90, 89, 86, 44, - 61, 44, 44, 89, 44, 44, 62, 36, 36, 86, 44, 43, 43, 43, 80, 44, - 43, 43, 80, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 62, 44, 61, - 36, 36, 36, 62, 86, 87, 43, 43, 80, 90, 89, 89, 86, 90, 86, 85, - 71, 71, 2, 93, 64, 44, 44, 44, 57, 80, 44, 44, 44, 44, 44, 44, - 36, 36, 94, 86, 43, 43, 43, 43, 86, 43, 85, 71, 36, 63, 2, 2, - 7, 7, 7, 7, 7, 2, 93, 71, 86, 87, 43, 43, 85, 85, 86, 87, - 85, 43, 36, 72, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 94, - 86, 43, 43, 44, 86, 86, 43, 87, 60, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 36, 36, 43, 44, 86, 87, 43, 43, 43, 85, 87, 87, - 60, 2, 61, 44, 44, 44, 44, 44, 2, 2, 2, 2, 2, 2, 64, 44, - 36, 36, 36, 36, 36, 70, 87, 86, 43, 43, 43, 87, 63, 44, 44, 44, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 44, 44, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 61, 57, 87, 86, 43, 43, 87, 43, 43, 44, 44, - 7, 7, 7, 7, 7, 27, 2, 97, 43, 43, 43, 43, 87, 60, 44, 44, - 27,100, 44, 44, 44, 44, 44, 62, 36, 36, 36, 61, 62, 44, 36, 36, - 36, 36, 62, 61, 36, 36, 36, 36, 86, 86, 86, 89, 90, 57, 85, 71, - 98, 87, 2, 64, 44, 44, 44, 44, 36, 36, 36, 36, 44, 36, 36, 36, - 94, 86, 43, 43, 44, 43, 86, 86, 71, 72, 90, 44, 44, 44, 44, 44, - 70, 43, 43, 43, 43, 71, 36, 36, 36, 70, 43, 43, 85, 70, 43, 60, - 2, 2, 2, 59, 44, 44, 44, 44, 70, 43, 43, 85, 87, 43, 36, 36, - 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 85, 43, 2, 72, 2, - 2, 64, 44, 44, 44, 44, 44, 44, 2, 2, 2, 2, 2, 44, 44, 44, - 63, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 80, 43, 43, 43, 87, - 63, 2, 2, 44, 44, 44, 44, 44, 2, 36, 36, 36, 36, 36, 36, 36, - 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 89, 43, 43, 43, - 85, 43, 87, 80, 44, 44, 44, 44, 36, 36, 36, 61, 36, 62, 36, 36, - 70, 43, 43, 80, 44, 80, 43, 57, 43, 43, 43, 70, 44, 44, 44, 44, - 36, 36, 36, 62, 61, 36, 36, 36, 36, 36, 36, 36, 36, 86, 86, 90, - 43, 89, 87, 87, 61, 44, 44, 44, 36, 70, 85,107, 64, 44, 44, 44, - 43, 94, 36, 36, 36, 36, 36, 36, 36, 36, 86, 43, 43, 80, 44, 86, - 85, 60, 2, 2, 2, 2, 2, 2, 7, 7, 7, 7, 7, 80, 44, 44, - 27, 27, 91, 67, 67, 67, 56, 20,168, 67, 67, 67, 67, 67, 67, 67, - 67, 44, 44, 44, 44, 44, 44, 93,105,105,105,105,105,105,105,181, - 2, 2, 64, 44, 44, 44, 44, 44, 63, 64, 44, 44, 44, 44, 44, 44, - 65, 65, 65, 65, 65, 65, 65, 65, 71, 36, 36, 70, 43, 43, 43, 43, - 43, 43, 43, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 43, - 43, 43, 43, 43, 43, 86, 87, 43, 43, 43, 60, 44, 44, 44, 44, 44, - 43, 43, 43, 60, 2, 2, 67, 67, 40, 40, 97, 44, 44, 44, 44, 44, - 7, 7, 7, 7, 7,179, 27, 27, 27, 62, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 44, 44, 62, 36, 40, 69, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 83,164, 2, 27, 27, 27, 30, 2, 64, 44, 44, - 36, 36, 36, 36, 36, 61, 44, 57, 94, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 44, 44, 44, 57, - 43, 74, 40, 40, 40, 40, 40, 40, 40, 88, 80, 44, 44, 44, 44, 44, - 86, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 62, - 40, 40, 52, 40, 40, 40, 52, 81, 36, 61, 44, 44, 44, 44, 44, 44, - 44, 61, 44, 44, 44, 44, 44, 44, 36, 61, 62, 44, 44, 44, 44, 44, - 44, 44, 36, 36, 44, 44, 44, 44, 36, 36, 36, 36, 36, 44, 50, 60, - 65, 65, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 44, - 43, 43, 43, 80, 44, 44, 44, 44, 67, 67, 67, 92, 55, 67, 67, 67, - 67, 67,186, 87, 43, 67,186, 86, 86,187, 65, 65, 65, 84, 43, 43, - 43, 76, 50, 43, 43, 43, 67, 67, 67, 67, 67, 67, 67, 43, 43, 67, - 67, 43, 76, 44, 44, 44, 44, 44, 27, 27, 44, 44, 44, 44, 44, 44, - 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 16, 16, 16,110, 16, 16, 16, 16, 16, - 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 47, 11, - 44, 47, 48, 47, 48, 11, 47, 11, 11, 11, 11, 16, 16,150,150, 16, - 16, 16,150, 16, 16, 16, 16, 16, 16, 16, 11, 48, 11, 47, 48, 11, - 11, 11, 47, 11, 11, 11, 47, 16, 16, 16, 16, 16, 11, 48, 11, 47, - 11, 11, 47, 47, 44, 11, 11, 11, 47, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, - 16, 16, 16, 44, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, - 11, 11, 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, - 16, 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, - 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, - 16, 33, 16, 16, 16, 32, 44, 7, 43, 43, 43, 76, 67, 50, 43, 43, - 43, 43, 43, 43, 43, 43, 76, 67, 67, 67, 50, 67, 67, 67, 67, 67, - 67, 67, 76, 21, 2, 2, 44, 44, 44, 44, 44, 44, 44, 57, 43, 43, - 16, 16, 16, 16, 16, 39, 16, 16, 16, 16, 16, 16, 16, 16, 16,110, - 44, 44,150, 16, 16,110, 44, 44, 43, 43, 43, 80, 43, 43, 43, 43, - 43, 43, 43, 43, 80, 57, 43, 43, 43, 57, 80, 43, 43, 80, 44, 44, - 40, 40, 40, 40, 40, 40, 40, 44, 44, 44, 44, 44, 44, 44, 44, 57, - 43, 43, 43, 74, 40, 40, 40, 44, 7, 7, 7, 7, 7, 44, 44, 77, - 36, 36, 36, 36, 36, 36, 36, 80, 36, 36, 36, 36, 36, 36, 43, 43, - 7, 7, 7, 7, 7, 44, 44, 96, 36, 36, 36, 36, 36, 83, 43, 43, - 188, 7, 7, 7, 7,189, 44, 93, 36, 36, 36, 61, 36, 36, 62, 61, - 36, 36, 61,179, 27, 27, 27, 27, 16, 16, 43, 43, 43, 74, 44, 44, - 27, 27, 27, 27, 27, 27,163, 27,190, 27,100, 44, 44, 44, 44, 44, - 27, 27, 27, 27, 27, 27, 27,163, 27, 27, 27, 27, 27, 27, 27, 44, - 36, 36, 62, 36, 36, 36, 36, 36, 62, 61, 61, 62, 62, 36, 36, 36, - 36, 61, 36, 36, 62, 62, 44, 44, 44, 61, 44, 62, 62, 62, 62, 36, - 62, 61, 61, 62, 62, 62, 62, 62, 62, 61, 61, 62, 36, 61, 36, 36, - 36, 61, 36, 36, 62, 36, 61, 61, 36, 36, 36, 36, 36, 62, 36, 36, - 62, 36, 62, 36, 36, 62, 36, 36, 8, 44, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 67, 44, 44, 55, 67, 67, 67, 67, 67, 67, 67, - 27, 27, 27, 27, 27, 27, 91, 67, 67, 67, 67, 67, 67, 67, 67, 44, - 44, 44, 44, 67, 67, 67, 67, 67, 67, 92, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 92, 44, 44, 44, 67, 44, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 25, 41, 41, 67, 67, 67, 67, 44, 44, 67, 67, - 67, 67, 67, 92, 44, 55, 67, 67, 67, 67, 67, 67, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 44, 44, 55, 67, 67, 67, 92, 44, 44, 44, 67, - 67, 67, 67, 67, 67, 67, 92, 55, 67, 92, 67, 67, 67, 67, 67, 67, - 79, 44, 44, 44, 44, 44, 44, 44,171,171,171,171,171,171,171, 44, - 171,171,171,171,171,171,171, 0, 0, 0, 29, 21, 21, 21, 23, 21, - 22, 18, 21, 25, 21, 17, 13, 13, 25, 25, 25, 21, 21, 9, 9, 9, - 9, 22, 21, 18, 24, 16, 24, 5, 5, 5, 5, 22, 25, 18, 25, 0, - 23, 23, 26, 21, 24, 26, 7, 20, 25, 1, 26, 24, 26, 25, 15, 15, - 24, 15, 7, 19, 15, 21, 9, 25, 9, 5, 5, 25, 5, 9, 5, 7, - 7, 7, 9, 8, 8, 5, 7, 5, 6, 6, 24, 24, 6, 24, 12, 12, - 2, 2, 6, 5, 9, 21, 9, 2, 2, 9, 25, 9, 26, 12, 11, 11, - 2, 6, 5, 21, 17, 2, 2, 26, 26, 23, 2, 12, 17, 12, 21, 12, - 12, 21, 7, 2, 2, 7, 7, 21, 21, 2, 1, 1, 21, 23, 26, 26, - 1, 21, 6, 7, 7, 12, 12, 7, 21, 7, 12, 1, 12, 6, 6, 12, - 12, 26, 7, 26, 26, 7, 2, 1, 12, 2, 6, 2, 24, 7, 7, 6, - 1, 12, 12, 10, 10, 10, 10, 12, 21, 6, 2, 10, 10, 2, 15, 26, - 26, 2, 2, 21, 7, 10, 15, 7, 2, 23, 21, 26, 10, 7, 21, 15, - 15, 2, 17, 7, 29, 7, 7, 22, 18, 2, 14, 14, 14, 7, 10, 21, - 17, 21, 11, 12, 5, 2, 5, 6, 8, 8, 8, 24, 5, 24, 2, 24, - 9, 24, 24, 2, 29, 29, 29, 1, 17, 17, 20, 19, 22, 20, 27, 28, - 1, 29, 21, 20, 19, 21, 21, 16, 16, 21, 25, 22, 18, 21, 21, 29, - 1, 2, 15, 6, 18, 6, 23, 2, 12, 11, 9, 26, 26, 9, 26, 5, - 5, 26, 14, 9, 5, 14, 14, 15, 25, 26, 26, 22, 18, 26, 18, 25, - 18, 22, 5, 12, 2, 5, 22, 21, 21, 22, 18, 17, 26, 6, 7, 14, - 17, 22, 18, 18, 26, 14, 17, 6, 14, 6, 12, 24, 24, 6, 26, 15, - 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, 6, 10, 4, 4, 3, 3, - 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, 25, 2, 25, 24, 2, 15, - 12, 15, 14, 2, 21, 14, 7, 15, 12, 17, 21, 1, 26, 10, 10, 1, - 7, 13, 13, 2, 23, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 0, 10, 11, 12, 13, 0, 14, 0, 0, 0, 0, 0, 15, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 20, 0, 21, 22, 23, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 36, 0, 37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 40, - 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 44, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 3, 0, - 0, 0, 4, 5, 6, 7, 0, 8, 9, 10, 0, 11, 12, 13, 14, 15, - 16, 17, 16, 18, 16, 19, 16, 19, 16, 19, 0, 19, 16, 20, 16, 19, - 21, 19, 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 32, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, - 34, 0, 0, 35, 0, 0, 36, 0, 37, 0, 0, 0, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 49, - 0, 0, 0, 0, 0, 0, 0, 50, 0, 51, 0, 52, 53, 0, 54, 0, - 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, 58, 0, 0, 59, - 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 66, 0, 0, 0, 0, - 67, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 72, 0, 0, 73, - 0, 0, 0, 0, 0, 0, 0, 0, 74, 75, 0, 0, 0, 0, 76, 77, - 0, 78, 79, 0, 0, 80, 81, 0, 82, 62, 0, 83, 84, 0, 0, 85, - 86, 87, 0, 88, 0, 89, 0, 90, 0, 0, 51, 91, 51, 0, 92, 0, - 93, 0, 0, 0, 81, 0, 0, 0, 94, 95, 0, 96, 97, 98, 99, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0,100,101, 0, 0, 0, 0, 0, - 0,102, 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 0,104, - 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 0, 0,107, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,108,109, 0, 0,110, 0, 0, - 0, 0, 0, 0,111, 0,112, 0,105, 0, 0, 0, 0, 0,113,114, - 0, 0, 0, 0, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,117, - 0,118, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, - 8, 0, 0, 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, 13, 0, 0, - 14, 15, 0, 16, 0, 17, 18, 0, 0, 19, 0, 20, 21, 0, 0, 0, - 0, 0, 22, 23, 0, 24, 25, 0, 0, 26, 0, 0, 0, 27, 0, 0, - 28, 29, 30, 31, 0, 0, 0, 32, 33, 34, 0, 0, 33, 0, 0, 35, - 33, 0, 0, 0, 33, 36, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, - 0, 0, 0, 39, 40, 0, 0, 0, 0, 0, 0, 41, 42, 0, 0, 0, - 0, 43, 0, 44, 0, 0, 0, 45, 46, 0, 0, 0, 47, 0, 0, 0, - 0, 0, 0, 48, 49, 0, 0, 0, 0, 50, 0, 0, 0, 51, 0, 52, - 0, 53, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 0, 56, 0, 0, - 0, 0, 57, 58, 0, 0, 0, 59, 60, 0, 0, 0, 0, 0, 0, 61, - 52, 0, 62, 63, 0, 0, 64, 0, 0, 0, 65, 66, 0, 0, 0, 67, - 0, 68, 69, 70, 71, 72, 1, 73, 0, 74, 75, 76, 0, 0, 77, 78, - 0, 0, 0, 79, 0, 0, 1, 1, 0, 0, 80, 0, 0, 81, 0, 0, - 0, 0, 77, 82, 0, 83, 0, 0, 0, 0, 0, 78, 84, 0, 85, 0, - 52, 0, 1, 78, 0, 0, 86, 0, 0, 87, 0, 0, 0, 0, 0, 88, - 57, 0, 0, 0, 0, 0, 0, 89, 90, 0, 0, 84, 0, 0, 33, 0, - 0, 91, 0, 0, 0, 0, 92, 0, 0, 0, 0, 49, 0, 0, 93, 0, - 0, 0, 0, 94, 95, 0, 0, 96, 0, 0, 97, 0, 0, 0, 98, 0, - 0, 0, 99, 0, 0, 0,100, 0, 0, 0, 0,101,102, 93, 0, 0, - 103, 0, 0, 0, 84, 0, 0,104, 0, 0, 0,105,106, 0, 0,107, - 108, 0, 0, 0, 0, 0, 0,109, 0, 0,110, 0, 0, 0, 0,111, - 33, 0,112,113,114, 57, 0, 0,115, 35, 0, 0,116, 0, 0, 0, - 117, 0, 0, 0, 0, 0, 0,118, 0, 0,119, 0, 0, 0, 0,120, - 88, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 52,121, 0, 0, 0, - 0,122, 0, 0,123, 0, 0, 0, 0,121, 0, 0,124, 0, 0, 0, - 0, 0, 79, 0, 0, 0, 0,125, 0, 0, 0,126, 0, 0, 0,127, - 0,128, 0, 0, 0, 0,129,130,131, 0,132, 0,133, 0, 0, 0, - 134,135,136, 0, 77, 0, 0, 0, 0, 0, 35, 0, 0, 0,137, 0, - 0, 0,138, 0, 0, 0,139, 0, 0,140, 0, 0,141, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 4, - 4, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 1, 1, 1, - 19, 1, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, 25, 26, 27, 28, - 29, 30, 0, 0, 1, 1, 31, 0, 0, 0, 32, 33, 34, 35, 1, 36, - 37, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, 42, 0, 0, 0, - 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 19, 1, 21, 0, 0, 47, - 0, 38, 48, 1, 1, 49, 49, 50, 0, 0, 51, 0, 0, 19, 52, 1, - 0, 0, 38, 14, 4, 1, 1, 1, 53, 21, 43, 52, 54, 21, 35, 1, - 0, 0, 0, 55, 0, 0, 0, 56, 57, 58, 0, 0, 0, 0, 0, 59, - 0, 60, 0, 0, 0, 0, 61, 62, 0, 0, 63, 0, 0, 0, 64, 0, - 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 68, 0, - 0, 69, 70, 0, 71, 72, 73, 74, 75, 76, 0, 0, 0, 77, 0, 0, - 0, 78, 79, 0, 0, 0, 0, 47, 0, 0, 0, 49, 0, 80, 0, 0, - 0, 62, 0, 0, 63, 0, 0, 81, 0, 0, 82, 0, 0, 0, 83, 0, - 0, 19, 84, 0, 62, 0, 0, 0, 0, 49, 1, 85, 1, 52, 15, 86, - 36, 10, 21, 87, 0, 55, 0, 0, 0, 0, 19, 10, 1, 0, 0, 0, - 0, 0, 88, 0, 0, 89, 0, 0, 88, 0, 0, 0, 0, 78, 0, 0, - 87, 9, 12, 4, 90, 8, 91, 47, 0, 58, 50, 0, 21, 1, 21, 92, - 93, 1, 1, 1, 1, 94, 95, 96, 97, 1, 98, 58, 81, 99,100, 4, - 58, 0, 0, 0, 0, 0, 0, 19, 50, 0, 0, 0, 0, 0, 0, 61, - 0, 0,101,102, 0, 0,103, 0, 0, 1, 1, 50, 0, 0, 0, 38, - 0, 63, 0, 0, 0, 0, 0, 62, 0, 0,104, 68, 61, 0, 0, 0, - 78, 0, 0, 0,105,106, 58, 38, 81, 0, 0, 0, 0, 0, 0,107, - 1, 14, 4, 12, 84, 0, 0, 0, 0, 38, 87, 0, 0, 0, 0,108, - 0, 0,109, 61, 0,110, 0, 0, 0, 1, 0, 0, 0, 0, 49, 50, - 0, 0, 19, 58, 0, 0, 0, 51, 0,111, 14, 52,112, 41, 0, 0, - 62, 0, 0, 61, 0, 0,113, 0, 87, 0, 0, 0, 61, 62, 0, 0, - 62, 0, 89, 0, 0,113, 0, 0, 0, 0,114, 0, 0, 0, 78, 55, - 0, 38, 1, 58, 1, 58, 0, 0, 0, 0, 0, 88, 63, 89, 0, 0, - 115, 0, 0, 0, 55, 0, 0, 0, 0,115, 0, 0, 0, 0, 61, 0, - 0, 0, 0, 79, 0, 61, 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, - 79, 0, 0, 0, 8, 91, 0, 0, 1, 87, 0, 0,116, 0, 0, 0, - 0, 0, 0,117, 0,118,119,120,121, 0,104, 4,122, 49, 23, 0, - 0, 0, 38, 50, 38, 58, 0, 0, 1, 87, 1, 1, 1, 1, 39, 1, - 48,105, 87, 0, 0, 0, 0, 1, 0, 0, 0,123, 0, 0, 0,112, - 4,122, 0, 0, 0, 1,124, 0, 0, 0, 0, 0,230,230,230,230, - 230,232,220,220,220,220,232,216,220,220,220,220,220,202,202,220, - 220,220,220,202,202,220,220,220, 1, 1, 1, 1, 1,220,220,220, - 220,230,230,230,230,240,230,220,220,220,230,230,230,220,220, 0, - 230,230,230,220,220,220,220,230,232,220,220,230,233,234,234,233, - 234,234,233,230, 0, 0, 0,230, 0,220,230,230,230,230,220,230, - 230,230,222,220,230,230,220,220,230,222,228,230, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, 25, 0, - 230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, 28, 29, 30, 31, - 32, 33, 34,230,230,220,220,230,220,230,230,220, 35, 0, 0, 0, - 0, 0,230,230,230, 0, 0,230,230, 0,220,230,230,220, 0, 0, - 0, 36, 0, 0,230,220,230,230,220,220,230,220,220,230,220,230, - 220,230,230, 0, 0,220, 0, 0,230,230, 0,230, 0,230,230,230, - 230,230, 0, 0, 0,220,220,220,230,220,220,220,230,230, 0,220, - 27, 28, 29,230, 7, 0, 0, 0, 0, 9, 0, 0, 0,230,220,230, - 230, 0, 0, 0, 0, 0,230, 0, 0, 84, 91, 0, 0, 0, 0, 9, - 9, 0, 0, 0, 0, 0, 9, 0,103,103, 9, 0,107,107,107,107, - 118,118, 9, 0,122,122,122,122,220,220, 0, 0, 0,220, 0,220, - 0,216, 0, 0, 0,129,130, 0,132, 0, 0, 0, 0, 0,130,130, - 130,130, 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0,220, 0, - 0, 0, 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, 0,230, 0, 0, - 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0,230, 0, 0,220, - 230,220, 0,220,230,230,230, 0, 0, 0, 9, 9, 0, 0, 7, 0, + 32, 32, 11, 11, 34, 34, 32, 32, 32, 32, 32, 32, 32, 32, 46, 43, + 51, 39,166, 35, 39, 35, 36, 36, 36, 70, 36, 70, 36, 69, 36, 36, + 36, 93, 86, 84, 66, 66, 79, 43, 27, 27, 27, 66,167, 43, 43, 43, + 36, 36, 2, 2, 43, 43, 43, 43, 85, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 85, 85, 85, 85, 85, 85, 85, 85, 42, 43, 43, 43, 43, 2, + 42, 36, 36, 36, 2, 71, 71, 69, 36, 36, 36, 42, 42, 42, 42, 2, + 36, 36, 36, 69, 42, 42, 42, 42, 42, 85, 43, 43, 43, 43, 43, 92, + 36, 69, 85, 42, 42, 85, 42, 85,106, 2, 2, 2, 2, 2, 2, 51, + 7, 7, 7, 7, 7, 43, 43, 2, 36, 36, 69, 68, 36, 36, 36, 36, + 7, 7, 7, 7, 7, 36, 36, 60, 36, 36, 36, 36, 69, 42, 42, 84, + 86, 84, 86, 79, 43, 43, 43, 43, 36, 69, 36, 36, 36, 36, 84, 43, + 7, 7, 7, 7, 7, 43, 2, 2, 68, 36, 36, 76, 66, 93, 84, 36, + 70, 42, 70, 69, 70, 36, 36, 42, 69, 60, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 61, 82, 2, 36, 36, 36, 36, 36, 93, 42, 85, + 2, 82,168, 79, 43, 43, 43, 43, 61, 36, 36, 60, 61, 36, 36, 60, + 61, 36, 36, 60, 43, 43, 43, 43, 16, 16, 16, 16, 16,113, 39, 39, + 16, 16, 16, 16,110, 40, 43, 43, 36, 93, 86, 85, 84,106, 86, 43, + 36, 36, 43, 43, 43, 43, 43, 43, 36, 36, 36, 60, 43, 61, 36, 36, + 169,169,169,169,169,169,169,169,170,170,170,170,170,170,170,170, + 16, 16, 16,109, 43, 43, 43, 43, 43,149, 16, 16, 43, 43, 61, 70, + 36, 36, 36, 36,171, 36, 36, 36, 36, 36, 36, 60, 36, 36, 60, 60, + 36, 61, 60, 36, 36, 36, 36, 36, 36, 40, 40, 40, 40, 40, 40, 40, + 40, 22, 66, 66, 66, 66, 66, 66, 66, 77, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36,147, 66, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 66, 66, 66, 66, 36, 36, 36, 36, 36, 36,167, 66, + 2, 2, 2,151,129, 43, 43, 43, 6,172,173,147,147,147,147,147, + 147,147,129,151,129, 2,126,174, 2, 63, 2, 2,155,147,147,129, + 2,175, 8,176, 65, 2, 43, 43, 36, 36, 60, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 60, 78, 92, 2, 3, 2, 4, 5, 6, 2, + 16, 16, 16, 16, 16, 17, 18,128,129, 4, 2, 36, 36, 36, 36, 36, + 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 39, + 43, 36, 36, 36, 43, 36, 36, 36, 43, 36, 36, 36, 43, 36, 60, 43, + 20,177, 55,178, 26, 8,143, 91, 43, 43, 43, 43, 78, 64, 66, 43, + 36, 36, 36, 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 60, 36, 61, + 2, 63, 43,179, 27, 27, 27, 27, 27, 27, 43, 54, 66, 66, 66, 66, + 104,104,142, 27, 90, 66, 66, 66, 66, 66, 66, 66, 66, 27, 66, 91, + 66, 66, 66, 66, 66, 66, 91, 43, 91, 43, 43, 43, 43, 43, 43, 43, + 66, 66, 66, 66, 66, 66, 49, 43,180, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 43, 43, 27, 27, 43, 43, 43, 43, 61, 36, + 154, 36, 36, 36, 36,181, 43, 43, 36, 36, 36, 42, 42, 79, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 92, 36, 36, 43, 43, 36, 36, 36, 36, + 182,104,104, 43, 43, 43, 43, 43, 11, 11, 11, 11, 16, 16, 16, 16, + 11, 11, 43, 43, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 43, 43, + 36, 36, 36, 36, 43, 43, 43, 43, 36, 36, 43, 43, 43, 43, 43, 92, + 11, 11, 11, 11, 11, 46, 11, 11, 11, 46, 11,149, 16, 16, 16, 16, + 16,149, 16, 16, 16, 16, 16, 16, 16,149, 16, 16, 16,149,109, 43, + 39, 39, 39, 51, 39, 39, 39, 39, 80, 39, 39, 39, 39, 80, 43, 43, + 36, 36, 36, 43, 60, 36, 36, 36, 36, 36, 36, 61, 60, 43, 60, 61, + 36, 36, 36, 92, 27, 27, 27, 27, 36, 36, 36, 76,162, 27, 27, 27, + 43, 43, 43,179, 27, 27, 27, 27, 36, 60, 36, 43, 43,179, 27, 27, + 36, 36, 36, 27, 27, 27, 43, 92, 36, 36, 36, 36, 36, 43, 43, 92, + 36, 36, 36, 36, 43, 43, 27, 36, 43, 27, 27, 27, 27, 27, 27, 27, + 69, 42, 56, 79, 43, 43, 42, 42, 36, 36, 61, 36, 61, 36, 36, 36, + 36, 36, 36, 43, 42, 79, 43, 56, 27, 27, 27, 27, 99, 43, 43, 43, + 2, 2, 2, 2, 63, 43, 43, 43, 36, 36, 36, 36, 36, 36,183, 30, + 36, 36, 36, 36, 36, 36,183, 27, 36, 36, 36, 36, 77, 36, 36, 36, + 36, 36, 69, 79, 43,179, 27, 27, 2, 2, 2, 63, 43, 43, 43, 43, + 36, 36, 36, 43, 92, 2, 2, 2, 36, 36, 36, 43, 27, 27, 27, 27, + 36, 60, 43, 43, 27, 27, 27, 27, 36, 43, 43, 43, 92, 2, 63, 43, + 43, 43, 43, 43,179, 27, 27, 27, 11, 46, 43, 43, 43, 43, 43, 43, + 16,109, 43, 43, 43, 27, 27, 27, 36, 36, 42, 42, 43, 43, 43, 43, + 7, 7, 7, 7, 7, 36, 36, 68, 11, 11, 11, 43, 56, 42, 42,158, + 16, 16, 16, 43, 43, 43, 43, 8, 27, 27, 27, 27, 27, 27, 27, 99, + 36, 36, 36, 36, 36, 56,184, 43, 36, 43, 43, 43, 43, 43, 43, 43, + 43, 36, 82, 36, 43, 43, 43, 43, 96, 66, 66, 66, 91, 43, 43, 43, + 43, 43, 43, 43, 43, 42, 42, 42, 27, 27, 27, 94, 43, 43, 43, 43, + 180, 27, 30, 2, 2, 43, 43, 43, 36, 42, 42, 2, 2, 43, 43, 43, + 36, 36,183, 27, 27, 27, 43, 43, 86, 97, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 42, 42, 42, 42, 42, 42, 42, 59, 2, 2, 2, 43, + 27, 27, 27, 7, 7, 7, 7, 7, 70, 69, 70, 43, 43, 43, 43, 56, + 85, 86, 42, 84, 86, 59,185, 2, 2, 79, 43, 43, 43, 43, 78, 43, + 42, 70, 36, 36, 36, 36, 36, 36, 36, 36, 36, 69, 42, 42, 86, 42, + 42, 42, 79, 7, 7, 7, 7, 7, 2, 2, 93, 97, 43, 43, 43, 43, + 36, 69, 2, 60, 43, 43, 43, 43, 36, 93, 85, 42, 42, 42, 42, 84, + 97, 36, 62, 2, 58, 42, 59, 86, 7, 7, 7, 7, 7, 62, 62, 2, + 179, 27, 27, 27, 27, 27, 27, 27, 27, 27, 99, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 85, 86, 42, 85, 84, 42, 2, 2, 2, 70, + 69, 43, 43, 43, 43, 43, 43, 43, 36, 36, 36, 60, 60, 36, 36, 61, + 36, 36, 36, 36, 36, 36, 36, 61, 36, 36, 36, 36, 62, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 69, 85, 86, 42, 42, 42, 79, 43, 43, + 42, 85, 61, 36, 36, 36, 60, 61, 60, 36, 61, 36, 36, 56, 70, 85, + 84, 85, 89, 88, 89, 88, 85, 43, 60, 43, 43, 88, 43, 43, 61, 36, + 36, 85, 43, 42, 42, 42, 79, 43, 42, 42, 79, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 61, 43, 60, 36, 36, 36, 61, 85, 86, 42, 42, + 79, 89, 88, 88, 85, 89, 85, 84, 70, 70, 2, 92, 63, 43, 43, 43, + 56, 79, 43, 43, 43, 43, 43, 43, 36, 36, 93, 85, 42, 42, 42, 42, + 85, 42, 84, 70, 36, 62, 2, 2, 7, 7, 7, 7, 7, 2, 92, 70, + 85, 86, 42, 42, 84, 84, 85, 86, 84, 42, 36, 71, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 93, 85, 42, 42, 43, 85, 85, 42, 86, + 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 42, 43, + 85, 86, 42, 42, 42, 84, 86, 86, 59, 2, 60, 43, 43, 43, 43, 43, + 2, 2, 2, 2, 2, 2, 63, 43, 36, 36, 36, 36, 36, 69, 86, 85, + 42, 42, 42, 86, 62, 43, 43, 43, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 60, 56, 86, + 85, 42, 42, 86, 42, 42, 43, 43, 7, 7, 7, 7, 7, 27, 2, 96, + 42, 42, 42, 42, 86, 59, 43, 43, 27, 99, 43, 43, 43, 43, 43, 61, + 36, 36, 36, 60, 61, 43, 36, 36, 36, 36, 61, 60, 36, 36, 36, 36, + 85, 85, 85, 88, 89, 56, 84, 70, 97, 86, 2, 63, 43, 43, 43, 43, + 36, 36, 36, 36, 43, 36, 36, 36, 93, 85, 42, 42, 43, 42, 85, 85, + 70, 71, 89, 43, 43, 43, 43, 43, 69, 42, 42, 42, 42, 70, 36, 36, + 36, 69, 42, 42, 84, 69, 42, 59, 2, 2, 2, 58, 43, 43, 43, 43, + 69, 42, 42, 84, 86, 42, 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, + 42, 42, 42, 84, 42, 2, 71, 2, 2, 63, 43, 43, 43, 43, 43, 43, + 2, 2, 2, 2, 2, 43, 43, 43, 84, 42, 84, 84, 43, 43, 43, 43, + 62, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 79, 42, 42, 42, 86, + 62, 2, 2, 43, 43, 43, 43, 43, 2, 36, 36, 36, 36, 36, 36, 36, + 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 88, 42, 42, 42, + 84, 42, 86, 79, 43, 43, 43, 43, 36, 36, 36, 60, 36, 61, 36, 36, + 69, 42, 42, 79, 43, 79, 42, 56, 42, 42, 42, 69, 43, 43, 43, 43, + 36, 36, 36, 61, 60, 36, 36, 36, 36, 36, 36, 36, 36, 85, 85, 89, + 42, 88, 86, 86, 60, 43, 43, 43, 36, 36, 36, 36, 82, 36, 43, 43, + 36, 69, 84,106, 63, 43, 43, 43, 42, 93, 36, 36, 36, 36, 36, 36, + 36, 36, 85, 42, 42, 79, 43, 85, 84, 59, 2, 2, 2, 2, 2, 2, + 7, 7, 7, 7, 7, 79, 43, 43, 27, 27, 90, 66, 66, 66, 55, 20, + 167, 66, 66, 66, 66, 66, 66, 66, 66, 43, 43, 43, 43, 43, 43, 92, + 104,104,104,104,104,104,104,181, 2, 2, 63, 43, 43, 43, 43, 43, + 62, 63, 43, 43, 43, 43, 43, 43, 64, 64, 64, 64, 64, 64, 64, 64, + 70, 36, 36, 69, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, 42, 42, 42, 85, 86, 42, + 42, 42, 59, 43, 43, 43, 43, 43, 42, 42, 42, 59, 2, 2, 66, 66, + 39, 39, 96, 43, 43, 43, 43, 43, 7, 7, 7, 7, 7,179, 27, 27, + 27, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 61, 36, + 39, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 82,163, 2, + 27, 27, 27, 30, 2, 63, 43, 43, 11, 11, 11, 11, 46,149, 16, 16, + 16, 16, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 60, 43, 56, + 93, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 43, 43, 43, 56, 42, 73, 39, 39, 39, 39, 39, 39, + 39, 87, 79, 43, 43, 43, 43, 43, 85, 39,104,181, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 61, 36, 60, 43, 43, 43, 43, 43, 43, + 39, 39, 51, 39, 39, 39, 51, 80, 43, 60, 43, 43, 43, 43, 43, 43, + 36, 60, 61, 43, 43, 43, 43, 43, 43, 43, 36, 36, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 43, 49, 59, 64, 64, 43, 43, 43, 43, 43, 43, + 7, 7, 7, 7, 7, 66, 91, 43, 66, 66, 43, 43, 43, 66, 66, 66, + 176, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 79, 43, 43, 43, 43, + 66, 66, 66, 91, 54, 66, 66, 66, 66, 66,186, 86, 42, 66,186, 85, + 85,187, 64, 64, 64, 83, 42, 42, 42, 75, 49, 42, 42, 42, 66, 66, + 66, 66, 66, 66, 66, 42, 42, 66, 66, 42, 75, 43, 43, 43, 43, 43, + 27, 27, 43, 43, 43, 43, 43, 43, 11, 11, 11, 11, 11, 16, 16, 16, + 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 16, + 16, 16,109, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 46, 11, 43, 46, 47, 46, 47, 11, 46, 11, + 11, 11, 11, 16, 16,149,149, 16, 16, 16,149, 16, 16, 16, 16, 16, + 16, 16, 11, 47, 11, 46, 47, 11, 11, 11, 46, 11, 11, 11, 46, 16, + 16, 16, 16, 16, 11, 47, 11, 46, 11, 11, 46, 46, 43, 11, 11, 11, + 46, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 11, 11, + 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 43, 11, 11, 11, 11, + 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, + 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, + 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, + 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 32, 43, 7, + 42, 42, 42, 75, 66, 49, 42, 42, 42, 42, 42, 42, 42, 42, 75, 66, + 66, 66, 49, 66, 66, 66, 66, 66, 66, 66, 75, 21, 2, 2, 43, 43, + 43, 43, 43, 43, 43, 56, 42, 42, 16, 16, 16, 16, 16,138, 16, 16, + 16, 16, 16, 16, 16, 16, 16,109, 43, 43,149, 16, 16,109, 43, 43, + 42, 42, 42, 79, 42, 42, 42, 42, 42, 42, 42, 42, 79, 56, 42, 42, + 42, 56, 79, 42, 42, 79, 43, 43, 39, 39, 39, 39, 39, 39, 39, 43, + 43, 43, 43, 43, 43, 43, 43, 56, 42, 42, 42, 73, 39, 39, 39, 43, + 7, 7, 7, 7, 7, 43, 43, 76, 36, 36, 36, 36, 36, 36, 36, 79, + 36, 36, 36, 36, 36, 36, 42, 42, 7, 7, 7, 7, 7, 43, 43, 95, + 36, 36, 36, 36, 36, 82, 42, 42,188, 7, 7, 7, 7,189, 43, 92, + 36, 69, 36, 70, 36, 36, 36, 42, 36, 36, 69, 43, 43, 43, 43, 82, + 36, 36, 36, 60, 36, 36, 61, 60, 36, 36, 60,179, 27, 27, 27, 27, + 16, 16, 42, 42, 42, 73, 43, 43, 27, 27, 27, 27, 27, 27,162, 27, + 190, 27, 99, 43, 43, 43, 43, 43, 27, 27, 27, 27, 27, 27, 27,162, + 27, 27, 27, 27, 27, 27, 27, 43, 36, 36, 61, 36, 36, 36, 36, 36, + 61, 60, 60, 61, 61, 36, 36, 36, 36, 60, 36, 36, 61, 61, 43, 43, + 43, 60, 43, 61, 61, 61, 61, 36, 61, 60, 60, 61, 61, 61, 61, 61, + 61, 60, 60, 61, 36, 60, 36, 36, 36, 60, 36, 36, 61, 36, 60, 60, + 36, 36, 36, 36, 36, 61, 36, 36, 61, 36, 61, 36, 36, 61, 36, 36, + 8, 43, 43, 43, 43, 43, 43, 43, 66, 66, 66, 66, 66, 66, 43, 43, + 54, 66, 66, 66, 66, 66, 66, 66, 27, 27, 27, 27, 27, 27, 90, 66, + 66, 66, 66, 66, 66, 66, 66, 43, 43, 43, 43, 66, 66, 66, 66, 66, + 66, 91, 43, 43, 43, 43, 43, 43, 66, 66, 66, 66, 91, 43, 43, 43, + 66, 43, 43, 43, 43, 43, 43, 43, 66, 66, 66, 66, 66, 25, 40, 40, + 66, 66, 66, 66, 91, 43, 66, 66, 66, 66, 66, 66, 43, 43, 43, 43, + 8, 8, 8, 8,176, 43, 43, 43, 66, 66, 66, 66, 66, 91, 43, 66, + 66, 66, 66, 91, 91, 43, 54, 66, 66, 66, 66, 66, 66, 66, 91, 54, + 66, 66, 66, 66, 66, 91, 43, 54, 66, 91, 66, 66, 66, 66, 66, 66, + 7, 7, 7, 7, 7, 91, 43, 43, 78, 43, 43, 43, 43, 43, 43, 43, + 170,170,170,170,170,170,170, 43,170,170,170,170,170,170,170, 0, + 0, 0, 29, 21, 21, 21, 23, 21, 22, 18, 21, 25, 21, 17, 13, 13, + 25, 25, 25, 21, 21, 9, 9, 9, 9, 22, 21, 18, 24, 16, 24, 5, + 5, 5, 5, 22, 25, 18, 25, 0, 23, 23, 26, 21, 24, 26, 7, 20, + 25, 1, 26, 24, 26, 25, 15, 15, 24, 15, 7, 19, 15, 21, 9, 25, + 9, 5, 5, 25, 5, 9, 5, 7, 7, 7, 9, 8, 8, 5, 6, 6, + 24, 24, 6, 24, 12, 12, 2, 2, 6, 5, 9, 21, 9, 2, 2, 9, + 25, 9, 26, 12, 11, 11, 2, 6, 5, 21, 17, 2, 2, 26, 26, 23, + 2, 12, 17, 12, 21, 12, 12, 21, 7, 2, 2, 7, 7, 21, 21, 2, + 1, 1, 21, 23, 26, 26, 1, 21, 6, 7, 7, 12, 12, 7, 21, 7, + 12, 1, 12, 6, 6, 12, 12, 26, 7, 26, 26, 7, 2, 1, 12, 2, + 6, 2, 24, 7, 7, 6, 1, 12, 12, 10, 10, 10, 10, 12, 21, 6, + 2, 10, 10, 2, 15, 26, 26, 2, 2, 21, 7, 10, 15, 7, 2, 23, + 21, 26, 10, 7, 21, 15, 15, 2, 17, 7, 29, 7, 7, 22, 18, 2, + 14, 14, 14, 7, 10, 21, 17, 21, 11, 12, 5, 2, 5, 6, 8, 8, + 8, 24, 5, 24, 2, 24, 9, 24, 24, 2, 29, 29, 29, 1, 17, 17, + 20, 19, 22, 20, 27, 28, 1, 29, 21, 20, 19, 21, 21, 16, 16, 21, + 25, 22, 18, 21, 21, 29, 1, 2, 15, 6, 18, 6, 12, 11, 9, 26, + 26, 9, 26, 5, 7, 5, 5, 26, 14, 9, 5, 14, 14, 15, 25, 26, + 26, 22, 18, 26, 18, 25, 18, 22, 5, 12, 2, 5, 22, 21, 21, 22, + 18, 17, 26, 6, 7, 14, 17, 22, 18, 18, 26, 14, 17, 6, 14, 6, + 12, 24, 24, 6, 26, 15, 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, + 6, 10, 4, 4, 3, 3, 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, + 25, 2, 25, 24, 23, 2, 2, 15, 12, 15, 14, 2, 21, 14, 7, 15, + 12, 17, 21, 1, 26, 10, 10, 1, 7, 13, 13, 2, 23, 15, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 13, 0, 14, 0, + 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, + 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, + 0, 0, 0, 36, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 39, 40, 0, 0, 0, 0, 0, 0, 41, 42, + 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 6, 7, 8, 0, 9, 0, 10, 11, 0, 0, 12, 13, 14, 15, 16, 0, + 0, 0, 0, 17, 18, 19, 20, 0, 21, 0, 22, 23, 0, 24, 25, 0, + 0, 24, 26, 27, 0, 24, 26, 0, 0, 24, 26, 0, 0, 24, 26, 0, + 0, 0, 26, 0, 0, 24, 28, 0, 0, 24, 26, 0, 0, 29, 26, 0, + 0, 0, 30, 0, 0, 31, 32, 0, 0, 33, 34, 0, 35, 36, 0, 37, + 38, 0, 39, 0, 0, 40, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 0, 0, + 0, 0, 45, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 47, 0, 0, + 0, 0, 0, 0, 48, 0, 0, 49, 0, 50, 51, 52, 0, 53, 54, 55, + 0, 56, 0, 57, 0, 58, 0, 0, 0, 0, 59, 60, 0, 0, 0, 0, + 0, 0, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 66, + 0, 0, 0, 67, 0, 68, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 70, 71, 0, 0, 72, 0, 0, 0, 0, + 0, 0, 0, 0, 73, 74, 0, 0, 0, 0, 54, 75, 0, 76, 77, 0, + 0, 78, 79, 0, 0, 0, 0, 0, 0, 80, 81, 82, 0, 0, 0, 0, + 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, + 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 87, + 0, 0, 0, 0, 88, 89, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 0, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 94, 0, 0, 95, 0, + 96, 0, 0, 0, 0, 0, 73, 97, 0, 98, 0, 0, 99,100, 0, 78, + 0, 0,101, 0, 0,102, 0, 0, 0, 0, 0,103, 0,104, 26,105, + 0, 0,106, 0, 0, 0,107, 0, 0, 0,108, 0, 0, 0, 0, 0, + 0, 66,109, 0, 0, 66, 0, 0, 0,110, 0, 0, 0,111, 0, 0, + 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,112,113, 0, + 0, 0, 0, 79, 0, 44,114, 0,115, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0,116, 0, + 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,118, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 0,121, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,122, 0, 0, 0, 0,123, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124, + 125,126, 0, 0, 0, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,128,129, 0, 0,130, 0, 0, 0, 0,121, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,131, 0,132, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0, 0, + 0, 0, 0,134, 0, 0, 0, 0, 0, 0, 0,135, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 0, 0, 0,137, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 2, 3, 4, 5, 6, 7, 4, 4, 8, 9, 10, 1, 11, 12, 13, + 14, 15, 16, 17, 18, 1, 1, 1, 0, 0, 0, 0, 19, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, + 25, 26, 27, 28, 29, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 31, 0, 0, 0, 32, 33, 34, 35, 1, 36, 0, 0, 0, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, + 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, + 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 0, 0, 0, 0, 19, 1, + 21, 0, 0, 47, 0, 0, 0, 0, 0, 38, 48, 1, 1, 49, 49, 50, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, + 0, 19, 52, 1, 0, 0, 38, 14, 4, 1, 1, 1, 53, 21, 43, 52, + 54, 21, 35, 1, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, + 57, 58, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 59, 0, 0, 0, 56, 0, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 62, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 68, 0, 0, 0, 0, 0, 0, 69, 70, 0, 0, 0, 0, 0, + 71, 72, 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 79, 0, 0, 0, 0, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, + 0, 80, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, + 63, 0, 0, 81, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 0, 0, 0, 0, 0, 0, 19, 84, 0, 62, 0, 0, 0, + 0, 49, 1, 85, 0, 0, 0, 0, 1, 52, 15, 86, 36, 10, 21, 1, + 1, 1, 1, 41, 1, 21, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 19, 10, + 1, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 89, 0, 0, + 88, 0, 0, 0, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, + 90, 9, 12, 4, 91, 8, 92, 47, 0, 58, 50, 0, 21, 1, 21, 93, + 94, 1, 1, 1, 1, 1, 1, 1, 1, 95, 96, 97, 0, 0, 0, 0, + 98, 1, 99, 58, 81,100,101, 4, 58, 0, 0, 0, 0, 0, 0, 19, + 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 0,102,103, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,104, 0, 0, 0, 0, 19, 0, 1, 1, 50, 0, 0, 0, 0, + 0, 0, 0, 38, 0, 0, 0, 0, 50, 0, 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 1, 1, 1, 1, + 50, 0, 0, 0, 0, 0,105, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 61, 0, 0, 0, 0, 0, 0, 0, 78, 0, 0, 0, 62, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,106,107, 58, 38, 81, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, + 0, 0, 0,108, 1, 14, 4, 12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 47, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 38, 90, 0, 0, 0, 0,109, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,110, 61, 0,111, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 49, 50, 0, 0, 0, 0, 0, 0, 19, 58, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112, 51, 0,112, 14, 52, + 84, 0, 0, 0,113, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 62, 0, 0, 61, 0, 0, 0, 0, 0, 0,114, 0, 90, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 61, 62, 0, 0, 62, 0, 89, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 0, 0,115, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 55, 0, 38, 1, 58, + 1, 58, 0, 0, 0, 0, 0, 88, 62, 0, 0, 0, 63, 89, 0, 0, + 0, 0, 0, 59,116, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 61, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 78, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 56, 0, 89, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 61, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 92, 0, 0, 0, 0, 0, 0, + 1, 90, 0, 0, 0, 0, 0, 0,117, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,118, 0,119,120,121,122, 0,105, 4,123, 49, 23, 0, + 0, 0, 0, 0, 0, 0, 38, 50, 0, 0, 0, 0, 38, 58, 0, 0, + 0, 0, 0, 0, 1, 90, 1, 1, 1, 1, 39, 1, 48,106, 90, 0, + 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 59, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,124, + 0, 0, 0, 0, 0, 0, 0,113, 0, 0, 0, 0, 19, 59, 0, 38, + 0, 81, 0, 0, 0, 0, 0, 0, 4,123, 0, 0, 0, 1,125, 0, + 0, 0, 0, 0, 0, 0, 0, 0,230,230,230,230,230,232,220,220, + 220,220,232,216,220,220,220,220,220,202,202,220,220,220,220,202, + 202,220,220,220, 1, 1, 1, 1, 1,220,220,220,220,230,230,230, + 230,240,230,220,220,220,230,230,230,220,220, 0,230,230,230,220, + 220,220,220,230,232,220,220,230,233,234,234,233,234,234,233,230, + 0, 0, 0,230, 0,220,230,230,230,230,220,230,230,230,222,220, + 230,230,220,220,230,222,228,230, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, 25, 0,230,220, 0, 18, + 30, 31, 32, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34,230, + 230,220,220,230,220,230,230,220, 35, 0, 0, 0, 0, 0,230,230, + 230, 0, 0,230,230, 0,220,230,230,220, 0, 0, 0, 36, 0, 0, + 230,220,230,230,220,220,230,220,220,230,220,230,220,230,230, 0, + 0,220, 0, 0,230,230, 0,230, 0,230,230,230,230,230, 0, 0, + 0,220,220,220,230,220,220,220,230,230, 0,220, 27, 28, 29,230, + 7, 0, 0, 0, 0, 9, 0, 0, 0,230,220,230,230, 0, 0, 0, + 0, 0,230, 0, 0, 84, 91, 0, 0, 0, 0, 9, 9, 0, 0, 0, + 0, 0, 9, 0,103,103, 9, 0,107,107,107,107,118,118, 9, 0, + 122,122,122,122,220,220, 0, 0, 0,220, 0,220, 0,216, 0, 0, + 0,129,130, 0,132, 0, 0, 0, 0, 0,130,130,130,130, 0, 0, + 130, 0,230,230, 9, 0,230,230, 0, 0,220, 0, 0, 0, 0, 7, + 0, 9, 9, 0, 9, 9, 0, 0, 0,230, 0, 0, 0,228, 0, 0, + 0,222,230,220,220, 0, 0, 0,230, 0, 0,220,230,220, 0,220, + 230,230,230,234, 0, 0, 9, 9, 0, 0, 7, 0,230,230,230, 0, 230, 0, 1, 1, 1, 0, 0, 0,230,234,214,220,202,230,230,230, 230,230,232,228,228,220,218,230,233,220,230,220,230,230, 1, 1, 1, 1, 1,230, 0, 1, 1,230,220,230, 1, 1, 0, 0,218,228, @@ -1683,63 +1482,81 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 34, 9, 0, 0, 20, 20, 1, 20, 20, 0, 0, 0, 0, 0, 0, 0, 26, 21, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 47, 48, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 16, 17, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 20, 20, 20, 20, 20, - 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 20, 33, - 34, 35, 34, 34, 36, 37, 20, 20, 20, 20, 20, 20, 38, 20, 39, 40, - 41, 41, 41, 41, 41, 42, 43, 44, 20, 20, 20, 20, 20, 20, 20, 45, - 46, 20, 20, 47, 20, 20, 20, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 20, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 60, 13, 13, - 13, 61, 62, 13, 13, 13, 13, 63, 13, 13, 13, 13, 13, 13, 64, 65, - 20, 20, 66, 20, 13, 13, 13, 13, 67, 13, 13, 13, 68, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 11, 11, 11, 11, 12, 13, + 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 13, 13, 13, + 24, 25, 26, 26, 26, 27, 13, 13, 13, 28, 29, 30, 13, 31, 32, 33, + 34, 35, 36, 37, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 38, 7, 7, 39, 7, 40, 7, 7, + 7, 41, 13, 42, 7, 7, 43, 7, 7, 7, 44, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 45, 0, 0, 1, 2, 2, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, 37, + 37, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 2, 2, 53, 54, 55, 56, 57, 58, 59, 59, 59, 59, 60, 59, + 59, 59, 59, 59, 59, 59, 61, 61, 59, 59, 59, 59, 62, 59, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 59, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 78, 69, 69, 69, 69, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, + 81, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 69, 69, 96, 97, 98, 99, 99, 99, + 100,101,102,103,104,105,106,107,108,109, 95,110,111,112,113,114, + 115,116,117,117,118,119,120,121,122,123,124,125,126,127,128,129, + 130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145, + 95,146,147,148,149, 95,150,151,152,153,154,155,156,157,158,159, + 160,161, 95,162,163,164,165,165,165,165,165,165,165,166,167,165, + 168, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95,169,170,170,170,170,170,170,170,170,171,170, + 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170, + 170,170,170,170,170,170,170,170,170,170,170,170,170,172,173,173, + 173,173,174, 95, 95, 95, 95, 95,175, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95,176,176,176,176,177,178,179,180, 95, 95, + 181, 95,182,183,184,185,186,186,186,186,186,186,186,186,186,186, + 186,186,186,186,186,186,186,186,186,186,186,186,187,187,187,188, + 189,190, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95,191,192,193,194,195,195,196, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,197,198, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 59,199, + 59, 59, 59,200,201,202, 59,203,204,205,206,207,208, 95,209,210, + 211, 59, 59,212, 59,213,214,214,214,214,214,215, 95, 95, 95, 95, + 95, 95, 95, 95,216, 95,217,218,219, 95, 95,220, 95, 95, 95,221, + 95,222, 95,223, 95,224,225,226,227, 95, 95, 95, 95, 95,228,229, + 230, 95,231,232, 95, 95,233,234, 59,235,236, 95, 59, 59, 59, 59, + 59, 59, 59,237, 59,238,239,240, 59, 59,241,242, 59,243, 95, 95, + 95, 95, 95, 95, 95, 95, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69,244, 69, 69,245, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69,246, 69, 69, 69, 69, 69, 69, 69, 69, 69,247, 69, 69, + 69, 69,248, 95, 95, 95, 69, 69, 69, 69,249, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 69, 69, 69, 69, 69, 69,250, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,251, 95, + 95, 95, 95, 95, 95, 95,252, 95,253,254, 0, 1, 2, 2, 0, 1, + 2, 2, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19, 19, @@ -1764,46 +1581,46 @@ 64, 2, 2, 64, 64, 64, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 2, 2, 90, 90, 90, 90, 90, 90, 90, 2, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 2, 2, 95, 2, 37, 37, - 37, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, - 2, 2, 2, 2, 2, 3, 3, 3, 0, 3, 3, 3, 3, 3, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 7, 7, 7, 7, 7, - 7, 7, 0, 0, 7, 7, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5, - 5, 5, 5, 2, 2, 5, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 2, - 5, 2, 2, 2, 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, 5, 2, - 2, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, - 2, 2, 5, 5, 2, 5, 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 2, 2, 11, 11, 11, 2, 11, 11, 11, 11, 11, - 11, 2, 2, 2, 2, 11, 11, 2, 2, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 2, 11, 11, 11, 11, 11, 11, 11, 2, - 11, 11, 2, 11, 11, 2, 11, 11, 2, 2, 11, 2, 11, 11, 11, 2, - 2, 11, 11, 11, 2, 2, 2, 11, 2, 2, 2, 2, 2, 2, 2, 11, - 11, 11, 11, 2, 11, 2, 2, 2, 2, 2, 2, 2, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 2, 2, 10, 10, 10, 2, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 2, 10, 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 2, - 10, 10, 2, 10, 10, 10, 10, 10, 2, 2, 10, 10, 10, 10, 10, 10, - 2, 10, 10, 10, 2, 2, 10, 2, 2, 2, 2, 2, 2, 2, 10, 10, - 10, 10, 2, 2, 10, 10, 10, 10, 2, 2, 2, 2, 2, 2, 2, 10, - 10, 10, 10, 10, 10, 10, 2, 21, 21, 21, 2, 21, 21, 21, 21, 21, - 21, 21, 21, 2, 2, 21, 21, 2, 2, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 2, 21, 21, 21, 21, 21, 21, 21, 2, - 21, 21, 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 21, 21, 21, 2, - 2, 21, 21, 21, 2, 2, 2, 2, 2, 2, 2, 21, 21, 21, 2, 2, - 2, 2, 21, 21, 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 2, 2, - 22, 22, 2, 22, 22, 22, 22, 22, 22, 2, 2, 2, 22, 22, 22, 2, - 22, 22, 22, 22, 2, 2, 2, 22, 22, 2, 22, 2, 22, 22, 2, 2, - 2, 22, 22, 2, 2, 2, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 2, 2, 2, 2, 22, 22, 22, 2, 2, 2, 2, 2, 2, 22, 2, 2, - 2, 2, 2, 2, 22, 22, 22, 22, 22, 2, 2, 2, 2, 2, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 2, 23, 23, 23, 2, - 23, 23, 23, 23, 23, 23, 23, 23, 2, 2, 23, 23, 23, 23, 23, 2, - 23, 23, 23, 23, 2, 2, 2, 2, 2, 2, 2, 23, 23, 2, 23, 23, - 23, 2, 2, 23, 2, 2, 23, 23, 23, 23, 2, 2, 23, 23, 2, 2, - 2, 2, 2, 2, 2, 23, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 2, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 2, 16, 16, 16, 16, 16, 2, 2, 16, 16, 16, 16, 16, 2, - 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 16, 16, 2, 16, 16, + 37, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, + 0, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, + 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, 7, 5, 5, + 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 5, 5, 2, + 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, + 5, 5, 5, 5, 5, 5, 5, 2, 5, 2, 2, 2, 5, 5, 5, 5, + 2, 2, 5, 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, 2, 2, 2, + 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 5, 2, 5, 5, 5, + 5, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 11, + 11, 11, 2, 11, 11, 11, 11, 11, 11, 2, 2, 2, 2, 11, 11, 2, + 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, + 11, 11, 11, 11, 11, 11, 11, 2, 11, 11, 2, 11, 11, 2, 11, 11, + 2, 2, 11, 2, 11, 11, 11, 2, 2, 11, 11, 11, 2, 2, 2, 11, + 2, 2, 2, 2, 2, 2, 2, 11, 11, 11, 11, 2, 11, 2, 2, 2, + 2, 2, 2, 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, 2, 10, + 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10, + 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, + 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 2, 10, 10, 10, 10, 10, + 2, 2, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10, 2, 2, 10, 2, + 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 2, 2, 10, 10, 10, 10, + 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 2, 21, + 21, 21, 2, 21, 21, 21, 21, 21, 21, 21, 21, 2, 2, 21, 21, 2, + 2, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 2, + 21, 21, 21, 21, 21, 21, 21, 2, 21, 21, 2, 21, 21, 21, 21, 21, + 2, 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 21, 2, 2, 2, 2, + 2, 2, 2, 21, 21, 21, 2, 2, 2, 2, 21, 21, 2, 21, 21, 21, + 21, 21, 2, 2, 21, 21, 2, 2, 22, 22, 2, 22, 22, 22, 22, 22, + 22, 2, 2, 2, 22, 22, 22, 2, 22, 22, 22, 22, 2, 2, 2, 22, + 22, 2, 22, 2, 22, 22, 2, 2, 2, 22, 22, 2, 2, 2, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 2, 2, 2, 2, 22, 22, 22, 2, + 2, 2, 2, 2, 2, 22, 2, 2, 2, 2, 2, 2, 22, 22, 22, 22, + 22, 2, 2, 2, 2, 2, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 2, 23, 23, 23, 2, 23, 23, 23, 23, 23, 23, 23, 23, + 2, 2, 23, 23, 23, 23, 23, 2, 23, 23, 23, 23, 2, 2, 2, 2, + 2, 2, 2, 23, 23, 2, 23, 23, 23, 2, 23, 23, 2, 2, 23, 23, + 23, 23, 2, 2, 23, 23, 2, 2, 2, 2, 2, 2, 2, 23, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 2, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, + 2, 2, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 2, 2, 2, 2, + 2, 2, 2, 16, 16, 2, 2, 2, 2, 2, 16, 16, 16, 2, 16, 16, 16, 16, 2, 2, 16, 16, 2, 16, 16, 16, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 2, 20, 20, 20, 2, 20, 20, 20, 20, 20, 20, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20, @@ -1850,137 +1667,135 @@ 54, 54, 2, 2, 54, 54, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 2, 91, 91, 91, 91, 91, 2, 2, 91, 91, 91, 2, 2, 2, 2, 2, 2, 91, 91, 91, 91, 91, 91, 2, 2, 1, 1, - 1, 1, 1, 1, 1, 2, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 2, 62, 62, 76, 76, 76, 76, 76, 76, 76, 76, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 2, 2, 2, 2, 2, 2, - 2, 2, 93, 93, 93, 93, 70, 70, 70, 70, 70, 70, 70, 70, 2, 2, - 2, 70, 70, 70, 70, 70, 70, 70, 2, 2, 2, 70, 70, 70, 73, 73, - 73, 73, 73, 73, 73, 73, 6, 6, 6, 2, 2, 2, 2, 2, 8, 8, - 8, 2, 2, 8, 8, 8, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 1, 1, 0, 2, 2, 2, 2, 2, 19, 19, - 19, 19, 19, 19, 9, 9, 9, 9, 9, 6, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 9, 9, 9, 9, 9, 19, 19, 19, 19, 9, 9, 9, 9, - 9, 19, 19, 19, 19, 19, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 9, 9, 9, 9, 9, 9, 9, 2, 2, 2, 9, - 2, 9, 2, 9, 2, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9, - 9, 9, 2, 2, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 2, 2, - 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 0, 0, - 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 19, - 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 0, 2, 19, 19, 19, 19, 19, 2, 2, 2, 0, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, 19, 19, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 0, 19, 0, 0, 0, 2, 2, 2, 2, 0, 0, - 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 27, 27, - 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 56, 56, 56, 56, 56, 56, 56, 56, 55, 55, - 55, 55, 2, 2, 2, 2, 2, 55, 55, 55, 55, 55, 55, 55, 61, 61, - 61, 61, 61, 61, 61, 61, 2, 2, 2, 2, 2, 2, 2, 61, 61, 2, - 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 2, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 2, 2, 0, 0, - 0, 0, 0, 13, 0, 13, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 1, 1, 1, 1, 12, 12, 13, 13, 13, 13, 0, 0, 0, 0, 2, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 2, 2, 1, 1, 0, 0, 15, 15, 15, 0, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 0, 0, 17, 17, 17, 2, 2, 2, 2, 2, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 0, 12, 12, - 12, 12, 12, 12, 12, 0, 17, 17, 17, 17, 17, 17, 17, 0, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 2, 2, 2, 39, 39, - 39, 39, 39, 39, 39, 2, 86, 86, 86, 86, 86, 86, 86, 86, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 2, 2, 2, 2, 79, 79, - 79, 79, 79, 79, 79, 79, 0, 0, 19, 19, 19, 19, 19, 19, 0, 0, - 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 2, 2, 19, 19, - 2, 19, 2, 19, 19, 19, 2, 2, 19, 19, 19, 19, 19, 19, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 2, 2, 2, 65, 65, - 65, 65, 65, 65, 65, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 2, 2, 2, 2, 2, 2, 2, 2, 75, 75, 75, 75, - 2, 2, 2, 2, 2, 2, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 0, 69, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74, 12, 12, - 12, 12, 12, 2, 2, 2, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 2, 0, 84, 84, 2, 2, 2, 2, 84, 84, 33, 33, - 33, 33, 33, 33, 33, 2, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 2, 68, 68, 68, 68, 68, 68, 2, 2, 68, 68, - 2, 2, 68, 68, 68, 68, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 2, 2, 2, 2, 2, 2, 2, 2, 92, 92, 92, 92, 92, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 2, 2, 30, - 30, 30, 30, 30, 30, 2, 19, 19, 19, 0, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 9, 19, 19, 19, 19, 0, 0, 2, 2, 2, 2, 87, 87, - 87, 87, 87, 87, 2, 2, 87, 87, 2, 2, 2, 2, 2, 2, 12, 12, - 12, 12, 2, 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 12, 13, 13, - 2, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 19, 2, 2, 2, - 2, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 2, 14, 14, 14, 14, 14, 2, 14, 2, 14, 14, - 2, 14, 14, 2, 14, 14, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 2, 2, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, - 1, 1, 1, 1, 6, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 2, 2, - 12, 12, 12, 12, 12, 12, 2, 2, 12, 12, 12, 2, 2, 2, 2, 0, - 0, 0, 0, 0, 2, 2, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 2, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49, 49, - 49, 2, 49, 49, 2, 49, 49, 49, 49, 49, 49, 49, 2, 2, 49, 49, - 49, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 9, 2, - 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 2, 2, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 2, 2, 2, 67, 67, - 67, 67, 67, 67, 67, 67, 67, 2, 2, 2, 2, 2, 2, 2, 1, 0, - 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 2, 2, 2, 2, 2, 2, 2, 2, 2, 42, 42, 42, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 2, 2, 2, 2, 2,118,118, - 118,118,118,118,118,118,118,118,118, 2, 2, 2, 2, 2, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 2, 53, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 2, 2, 2, 2, 59, 59, - 59, 59, 59, 59, 2, 2, 40, 40, 40, 40, 40, 40, 40, 40, 51, 51, - 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 2, 2, 50, 50, 2, 2, 2, 2, 2, 2,135,135, - 135,135,135,135,135,135,135,135,135,135, 2, 2, 2, 2,106,106, - 106,106,106,106,106,106,104,104,104,104,104,104,104,104,104,104, - 104,104, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,104,161,161, - 161,161,161,161,161,161,161,161,161, 2,161,161,161,161,161,161, - 161, 2,161,161, 2,161,161,161, 2,161,161,161,161,161,161,161, - 2,161,161, 2, 2, 2,170,170,170,170,170,170,170,170,170,170, - 170,170, 2, 2, 2, 2,110,110,110,110,110,110,110,110,110,110, - 110,110,110,110,110, 2,110,110,110,110,110,110, 2, 2, 19, 19, - 19, 19, 19, 19, 2, 19, 19, 2, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 2, 2, 2, 2, 2, 47, 47, 47, 47, 47, 47, 2, 2, 47, 2, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 2, 47, 47, 2, 2, 2, 47, 2, 2, 47, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 2, 81,120,120, - 120,120,120,120,120,120,116,116,116,116,116,116,116,116,116,116, - 116,116,116,116,116, 2, 2, 2, 2, 2, 2, 2, 2,116,128,128, - 128,128,128,128,128,128,128,128,128, 2,128,128, 2, 2, 2, 2, - 2,128,128,128,128,128, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 2, 2, 2, 66, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 2, 2, 2, 2, 2, 72, 98, 98, 98, 98, 98, 98, 98, 98, 97, 97, - 97, 97, 97, 97, 97, 97, 2, 2, 2, 2, 97, 97, 97, 97, 2, 2, - 97, 97, 97, 97, 97, 97, 57, 57, 57, 57, 2, 57, 57, 2, 2, 2, - 2, 2, 57, 57, 57, 57, 57, 57, 57, 57, 2, 57, 57, 57, 2, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 2, 2, 57, 57, 57, 2, 2, 2, 2, 57, 57, 2, - 2, 2, 2, 2, 2, 2, 88, 88, 88, 88, 88, 88, 88, 88,117,117, - 117,117,117,117,117,117,112,112,112,112,112,112,112,112,112,112, - 112,112,112,112,112, 2, 2, 2, 2,112,112,112,112,112, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 2, 2, 2, 78, - 78, 78, 78, 78, 78, 78, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 2, 2, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 2, 2, 2, 2, 2,122,122,122,122,122,122,122,122,122,122, - 2, 2, 2, 2, 2, 2, 2,122,122,122,122, 2, 2, 2, 2,122, - 122,122,122,122,122,122, 89, 89, 89, 89, 89, 89, 89, 89, 89, 2, - 2, 2, 2, 2, 2, 2,130,130,130,130,130,130,130,130,130,130, - 130, 2, 2, 2, 2, 2, 2, 2,130,130,130,130,130,130,144,144, - 144,144,144,144,144,144,144,144, 2, 2, 2, 2, 2, 2,165,165, - 165,165,165,165,165,165,165,165,165,165,165,165, 2, 2, 2,165, - 165,165,165,165,165,165, 2, 2, 2, 2, 2, 2,165,165,156,156, + 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 2, 62, 62, 76, 76, + 76, 76, 76, 76, 76, 76, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, + 93, 93, 2, 2, 2, 2, 2, 2, 2, 2, 93, 93, 93, 93, 70, 70, + 70, 70, 70, 70, 70, 70, 2, 2, 2, 70, 70, 70, 70, 70, 70, 70, + 2, 2, 2, 70, 70, 70, 73, 73, 73, 73, 73, 73, 73, 73, 6, 6, + 6, 2, 2, 2, 2, 2, 8, 8, 8, 2, 2, 8, 8, 8, 1, 1, + 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, + 0, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 9, 9, 9, 9, + 9, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 9, 9, 9, 9, + 19, 19, 19, 19, 9, 9, 9, 9, 9, 19, 19, 19, 19, 19, 6, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 9, 9, + 9, 9, 9, 9, 2, 2, 2, 9, 2, 9, 2, 9, 2, 9, 9, 9, + 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 2, 2, 9, 9, 9, 9, + 9, 9, 2, 9, 9, 9, 2, 2, 9, 9, 9, 2, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 19, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 2, 19, 19, + 19, 19, 19, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 1, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, + 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 19, 0, + 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 27, 27, + 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 2, 2, 0, 0, 56, 56, + 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 2, 2, 2, 2, 2, 55, + 55, 55, 55, 55, 55, 55, 61, 61, 61, 61, 61, 61, 61, 61, 2, 2, + 2, 2, 2, 2, 2, 61, 61, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 13, 13, + 13, 13, 13, 13, 2, 2, 0, 0, 0, 0, 0, 13, 0, 13, 0, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 12, 12, 13, 13, + 13, 13, 0, 0, 0, 0, 2, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 2, 2, 1, + 1, 0, 0, 15, 15, 15, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 17, 17, 17, 2, 2, + 2, 2, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, + 2, 2, 2, 2, 2, 0, 12, 12, 12, 12, 12, 12, 12, 0, 17, 17, + 17, 17, 17, 17, 17, 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 2, 2, 2, 39, 39, 39, 39, 39, 39, 39, 2, 86, 86, + 86, 86, 86, 86, 86, 86, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 2, 2, 2, 2, 79, 79, 79, 79, 79, 79, 79, 79, 0, 0, + 19, 19, 19, 19, 19, 19, 0, 0, 0, 19, 19, 19, 19, 19, 2, 19, + 19, 19, 19, 19, 19, 19, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 2, 2, 2, 65, 65, 65, 65, 65, 65, 65, 65, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 2, 2, 2, 2, + 2, 2, 2, 2, 75, 75, 75, 75, 2, 2, 2, 2, 2, 2, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 0, 69, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 74, 12, 12, 12, 12, 12, 2, 2, 2, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 2, 0, 84, 84, + 2, 2, 2, 2, 84, 84, 33, 33, 33, 33, 33, 33, 33, 2, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 68, 68, + 68, 68, 68, 68, 2, 2, 68, 68, 2, 2, 68, 68, 68, 68, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 2, 2, 2, 2, 2, 2, 2, + 2, 92, 92, 92, 92, 92, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 2, 2, 30, 30, 30, 30, 30, 30, 2, 19, 19, + 19, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 19, 19, 19, 19, + 0, 0, 2, 2, 2, 2, 87, 87, 87, 87, 87, 87, 2, 2, 87, 87, + 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, + 2, 12, 12, 12, 12, 12, 13, 13, 2, 2, 2, 2, 2, 2, 19, 19, + 19, 19, 19, 19, 19, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2, + 2, 2, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 14, 14, + 14, 14, 14, 2, 14, 2, 14, 14, 2, 14, 14, 2, 14, 14, 3, 3, + 3, 3, 3, 3, 0, 0, 1, 1, 1, 1, 1, 1, 6, 6, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, + 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, + 17, 17, 17, 17, 0, 0, 2, 2, 12, 12, 12, 12, 12, 12, 2, 2, + 12, 12, 12, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 2, 49, 49, 49, 2, 49, 49, 2, 49, 49, 49, + 49, 49, 49, 49, 2, 2, 49, 49, 49, 2, 2, 2, 2, 2, 0, 0, + 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 2, 2, 2, 9, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 1, 2, 2, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 2, 2, 2, 67, 67, 67, 67, 67, 67, 67, 67, 67, 2, + 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 2, 2, 2, 2, 2,118,118,118,118,118,118,118,118,118,118, + 118, 2, 2, 2, 2, 2, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 2, 53, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 2, 2, 2, 2, 59, 59, 59, 59, 59, 59, 2, 2, 40, 40, + 40, 40, 40, 40, 40, 40, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 2, 2, 50, 50, + 2, 2, 2, 2, 2, 2,135,135,135,135,135,135,135,135,135,135, + 135,135, 2, 2, 2, 2,106,106,106,106,106,106,106,106,104,104, + 104,104,104,104,104,104,104,104,104,104, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2,104,161,161,161,161,161,161,161,161,161,161, + 161, 2,161,161,161,161,161,161,161, 2,161,161, 2,161,161,161, + 2,161,161,161,161,161,161,161, 2,161,161, 2, 2, 2,170,170, + 170,170,170,170,170,170,170,170,170,170, 2, 2, 2, 2,110,110, + 110,110,110,110,110,110,110,110,110,110,110,110,110, 2,110,110, + 110,110,110,110, 2, 2, 19, 19, 19, 19, 19, 19, 2, 19, 19, 2, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 2, 2, 2, 2, 2, 47, 47, + 47, 47, 47, 47, 2, 2, 47, 2, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 2, 47, 47, 2, + 2, 2, 47, 2, 2, 47, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 2, 81,120,120,120,120,120,120,120,120,116,116, + 116,116,116,116,116,116,116,116,116,116,116,116,116, 2, 2, 2, + 2, 2, 2, 2, 2,116,128,128,128,128,128,128,128,128,128,128, + 128, 2,128,128, 2, 2, 2, 2, 2,128,128,128,128,128, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 2, 2, 2, 66, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 2, 2, 2, 2, 2, 72,173,173, + 173,173,173,173,173,173,173,173, 2, 2, 2, 2, 2, 2, 98, 98, + 98, 98, 98, 98, 98, 98, 97, 97, 97, 97, 97, 97, 97, 97, 2, 2, + 2, 2, 97, 97, 97, 97, 2, 2, 97, 97, 97, 97, 97, 97, 57, 57, + 57, 57, 2, 57, 57, 2, 2, 2, 2, 2, 57, 57, 57, 57, 57, 57, + 57, 57, 2, 57, 57, 57, 2, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 2, 2, 57, 57, + 57, 2, 2, 2, 2, 57, 57, 2, 2, 2, 2, 2, 2, 2, 88, 88, + 88, 88, 88, 88, 88, 88,117,117,117,117,117,117,117,117,112,112, + 112,112,112,112,112,112,112,112,112,112,112,112,112, 2, 2, 2, + 2,112,112,112,112,112, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 2, 2, 2, 78, 78, 78, 78, 78, 78, 78, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2, 2, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 2, 2, 2, 2, 2,122,122, + 122,122,122,122,122,122,122,122, 2, 2, 2, 2, 2, 2, 2,122, + 122,122,122, 2, 2, 2, 2,122,122,122,122,122,122,122, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 2, 2, 2, 2, 2, 2, 2,130,130, + 130,130,130,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, + 130,130,130,130,130,130,144,144,144,144,144,144,144,144,144,144, + 2, 2, 2, 2, 2, 2,165,165,165,165,165,165,165,165,165,165, + 165,165,165,165, 2, 2, 2,165,165,165,165,165,165,165, 2, 2, + 2, 2, 2, 2,165,165, 3, 3, 3, 3, 3, 3, 3, 2,156,156, 156,156,156,156,156,156,156,156, 2,156,156,156, 2, 2,156,156, - 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, - 2, 2, 3, 3, 3, 3,147,147,147,147,147,147,147,147,148,148, + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, + 2, 2, 2, 2, 2, 2,147,147,147,147,147,147,147,147,148,148, 148,148,148,148,148,148,148,148, 2, 2, 2, 2, 2, 2,158,158, 158,158,158,158,158,158,158,158, 2, 2, 2, 2, 2, 2,153,153, 153,153,153,153,153,153,153,153,153,153, 2, 2, 2, 2,149,149, @@ -2039,46 +1854,51 @@ 143,143,143,143, 2,143,143, 2,143,143,143,143,143,143,143,143, 143,143,143,143,143,143,143,143,143,143,143,143,143, 2,143,143, 2,143,143,143,143,143,143, 2, 2, 2, 2, 2, 2, 2,143,143, - 2, 2, 2, 2, 2, 2,145,145,145,145,145,145,145,145,145, 2, - 2, 2, 2, 2, 2, 2,163,163,163,163,163,163,163,163,163, 2, - 163,163,163,163,163,163,163,163,163, 2, 2, 2,163,163,163,163, - 163, 2, 2, 2, 2, 2, 86, 2, 2, 2, 2, 2, 2, 2, 22, 22, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 22, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 2, 2, 2, 2, 2, 2, 63, 63, - 63, 63, 63, 63, 63, 2, 63, 63, 63, 63, 63, 2, 2, 2, 63, 63, - 63, 63, 2, 2, 2, 2,157,157,157,157,157,157,157,157,157,157, - 157, 2, 2, 2, 2, 2, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 2, 2, 80, 80, 80, 2, 2, 2, 2, 2,127,127, - 127,127,127,127,127,127,127,127,127,127,127,127,127, 2,166,166, - 166,166,166,166,166,166,166,166, 2, 2, 2, 2, 2, 2, 79, 2, - 2, 2, 2, 2, 2, 2,115,115,115,115,115,115,115,115,115,115, - 115,115,115,115,115, 2,115,115, 2, 2, 2, 2,115,115,159,159, - 159,159,159,159,159,159,159,159,159,159,159,159,159, 2,159,159, - 2, 2, 2, 2, 2, 2,103,103,103,103,103,103,103,103,103,103, - 103,103,103,103, 2, 2,119,119,119,119,119,119,119,119,119,119, - 119,119,119,119, 2, 2,119,119, 2,119,119,119,119,119, 2, 2, - 2, 2, 2,119,119,119,167,167,167,167,167,167,167,167,167,167, - 2, 2, 2, 2, 2, 2,146,146,146,146,146,146,146,146,146,146, - 146, 2, 2, 2, 2, 2, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 2, 2, 2, 2, 2, 2,175,175,175,175,175,175,175,175,175,175, + 175,175, 2, 2, 2, 2,175,175, 2, 2, 2, 2, 2, 2,145,145, + 145,145,145,145,145,145,145, 2, 2, 2, 2, 2, 2, 2,163,163, + 163,163,163,163,163,163,163, 2,163,163,163,163,163,163,163,163, + 163, 2, 2, 2,163,163,163,163,163, 2, 2, 2, 2, 2, 86, 2, + 2, 2, 2, 2, 2, 2, 22, 22, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 22, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 2, 2, 2, 2, 2, 2, 63, 63, 63, 63, 63, 63, 63, 2, 63, 63, + 63, 63, 63, 2, 2, 2, 63, 63, 63, 63, 2, 2, 2, 2,157,157, + 157,157,157,157,157,157,157,157,157, 2, 2, 2, 2, 2, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 2, 2, 80, 80, + 80, 2, 2, 2, 2, 2,127,127,127,127,127,127,127,127,127,127, + 127,127,127,127,127, 2,166,166,166,166,166,166,166,166,166,166, + 2, 2, 2, 2, 2, 2, 79, 2, 2, 2, 2, 2, 2, 2,115,115, + 115,115,115,115,115,115,115,115,115,115,115,115,115, 2,115,115, + 2, 2, 2, 2,115,115,159,159,159,159,159,159,159,159,159,159, + 159,159,159,159,159, 2,159,159, 2, 2, 2, 2, 2, 2,103,103, + 103,103,103,103,103,103,103,103,103,103,103,103, 2, 2,119,119, + 119,119,119,119,119,119,119,119,119,119,119,119, 2, 2,119,119, + 2,119,119,119,119,119, 2, 2, 2, 2, 2,119,119,119,167,167, + 167,167,167,167,167,167,167,167, 2, 2, 2, 2, 2, 2,146,146, + 146,146,146,146,146,146,146,146,146, 2, 2, 2, 2, 2,172,172, + 172,172,172,172,172,172,172, 2, 2,172,172,172,172,172,172,172, + 172,172, 2, 2, 2, 2, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 2, 2, 2, 2, 99, 2, 2, 2, 2, 2, 2, 2, 99,136,139, - 13, 13,155, 2, 2, 2,136,136,136,136,136,136,136,136,155,155, - 155,155,155,155,155,155,155,155,155,155,155,155, 2, 2, 2, 2, - 2, 2, 2, 2, 2,155,136, 2, 2, 2, 2, 2, 2, 2, 17, 17, + 13, 13,155, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 2,136,136, + 136,136,136,136,136,136,155,155,155,155,155,155,155,155,155,155, + 155,155,155,155, 2, 2, 2, 2, 2, 2, 2, 2, 2,155,136,136, + 136,136,136,136,136, 2,136,136,136, 2, 2, 2, 2, 2, 17, 17, 17, 17, 2, 17, 17, 17, 17, 17, 17, 17, 2, 17, 17, 2, 17, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 2, 2, 2, 2, 2, 2, 2, 15, 2, 2, 2, 2, 2, 15, 15, 15, 2, 2, 17, 2, 2, 2, 2, 2, 2, 17, 17, 17, 17,139,139,139,139,139,139,139,139,139,139, 139,139, 2, 2, 2, 2,105,105,105,105,105,105,105,105,105,105, 105, 2, 2, 2, 2, 2,105,105,105,105,105, 2, 2, 2,105, 2, - 2, 2, 2, 2, 2, 2,105,105, 2, 2,105,105,105,105, 1, 1, - 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 2, 2, 2, 2, 2, 2,105,105, 2, 2,105,105,105,105, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 2, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, - 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,131,131, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0,131,131, 131,131,131,131,131,131,131,131,131,131, 2, 2, 2, 2, 2, 2, 2,131,131,131,131,131, 2,131,131,131,131,131,131,131, 2, 2, 2, 2, 2, 19, 19, 19, 56, 56, 56, 56, 56, 56, 56, 2, 56, 2, @@ -2090,7 +1910,9 @@ 160,160,160,160,160, 2,152,152,152,152,152,152,152,152,152,152, 2, 2, 2, 2, 2,152,164,164,164,164,164,164,164,164,164,164, 2, 2, 2, 2, 2, 2,168,168,168,168,168,168,168,168,168,168, - 168, 2, 2, 2, 2,168, 30, 30, 30, 30, 2, 30, 30, 2,113,113, + 168, 2, 2, 2, 2,168,174,174,174,174,174,174,174,174,174,174, + 174,174,174,174,174, 2,174,174,174,174,174,174, 2, 2, 2, 2, + 2, 2, 2, 2,174,174, 30, 30, 30, 30, 2, 30, 30, 2,113,113, 113,113,113,113,113,113,113,113,113,113,113, 2, 2,113,113,113, 113,113,113,113,113, 2,132,132,132,132,132,132,132,132,132,132, 132,132, 2, 2, 2, 2,132,132, 2, 2, 2, 2,132,132, 3, 3, @@ -2101,8 +1923,8 @@ 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 15, 0, - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, - 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 13, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 10, 9, 11, 12, 13, @@ -2186,8 +2008,7 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, }; -static const uint16_t -_hb_ucd_u16[10400] = +static const uint16_t _hb_ucd_u16[10832]= { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12, 13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23, @@ -2210,27 +2031,29 @@ 48, 48, 48, 48, 168, 169, 48, 48, 168, 48, 48, 170, 171, 172, 48, 48, 48, 171, 48, 48, 48, 173, 174, 175, 48, 176, 9, 9, 9, 9, 9, 177, 178, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 179, 48, 180, 181, 48, 48, 48, 48, 182, 183, 48, 184, 48, 185, 48, 186, 187, 188, 48, 48, 48, 189, 190, 191, 192, 193, 194, 192, 48, 48, 195, 48, 48, 196, 197, 48, 198, 48, 48, 48, 48, 199, 48, 200, 201, 202, 203, 48, 204, 205, 48, 48, 206, 48, 207, 208, 209, 209, - 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 140, 140, 140, - 217, 48, 48, 218, 219, 160, 220, 221, 222, 48, 223, 64, 48, 48, 224, 225, - 48, 48, 226, 227, 228, 64, 48, 229, 230, 9, 9, 231, 232, 233, 234, 235, - 11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 32, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 240, 13, 13, 13, 13, 13, 13, - 241, 242, 241, 241, 242, 243, 241, 244, 245, 245, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 272, 273, 274, 275, 209, 276, 277, 209, 278, - 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, - 280, 209, 281, 209, 209, 209, 209, 282, 209, 283, 279, 284, 209, 285, 286, 209, - 209, 209, 176, 140, 287, 140, 271, 271, 271, 288, 209, 209, 209, 209, 289, 271, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 290, 291, 209, 209, 292, - 209, 209, 209, 209, 209, 209, 293, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 294, 295, 271, 296, 209, 209, 297, 279, 298, 279, + 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 32, 216, 217, 140, + 218, 48, 48, 219, 220, 160, 221, 222, 223, 48, 224, 64, 48, 48, 225, 226, + 48, 48, 227, 228, 229, 64, 48, 230, 231, 9, 9, 232, 233, 234, 235, 236, + 11, 11, 237, 27, 27, 27, 238, 239, 11, 240, 27, 27, 32, 32, 32, 32, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 241, 13, 13, 13, 13, 13, 13, + 242, 243, 242, 242, 243, 244, 242, 245, 246, 246, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 273, 274, 275, 276, 209, 277, 278, 209, 279, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 281, 209, 282, 209, 209, 209, 209, 283, 209, 284, 280, 285, 209, 286, 287, 209, + 209, 209, 176, 140, 288, 140, 272, 272, 272, 289, 209, 209, 209, 209, 290, 272, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 291, 292, 209, 209, 293, + 209, 209, 209, 209, 209, 209, 294, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 295, 296, 272, 297, 209, 209, 298, 280, 299, 280, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 279, 279, 279, 279, 279, 279, 279, 279, 299, 300, 279, 279, 279, 301, 279, 302, - 209, 209, 209, 279, 303, 209, 209, 304, 209, 305, 209, 209, 209, 209, 209, 209, + 280, 280, 280, 280, 280, 280, 280, 280, 300, 301, 280, 280, 280, 302, 280, 303, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 209, 209, 209, 280, 304, 209, 209, 305, 209, 209, 209, 209, 209, 209, 209, 209, 9, 9, 9, 11, 11, 11, 306, 307, 13, 13, 13, 13, 13, 13, 308, 309, 11, 11, 310, 48, 48, 48, 311, 312, 48, 313, 314, 314, 314, 314, 32, 32, 315, 316, 317, 318, 319, 320, 140, 140, 209, 321, 209, 209, 209, 209, 209, 322, @@ -2238,226 +2061,201 @@ 324, 325, 326, 327, 136, 48, 48, 48, 48, 328, 178, 48, 48, 48, 48, 329, 330, 48, 48, 136, 48, 48, 48, 48, 200, 331, 48, 48, 209, 209, 332, 48, 209, 333, 334, 209, 335, 336, 209, 209, 334, 209, 209, 336, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 209, 209, 209, 209, 48, 337, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 338, 48, 48, 229, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 338, 48, 48, 230, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 339, 48, 340, 140, 13, 13, 341, 342, 13, 343, 48, 48, 48, 48, 344, 345, 31, 346, 347, 348, 13, 13, 13, 349, 350, 351, 352, 353, 354, 355, 140, 356, 357, 48, 358, 359, 48, 48, 48, 360, 361, 48, 48, 362, 363, 192, 32, 364, 64, 48, 365, 48, 366, 367, 48, 151, 76, 48, 48, 368, 369, 370, 371, 372, 48, 48, 373, 374, 375, 376, 48, 377, 48, 48, 48, 378, 379, 380, 381, 382, 383, 384, 314, 11, 11, 385, 386, 11, 11, 11, 11, 11, 48, 48, 387, 192, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 388, 48, 389, 48, 48, 206, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 207, 140, 140, 392, 393, 394, 395, 396, 48, 48, 48, 48, 48, 48, 397, 398, 399, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 400, 209, 48, 48, 48, 48, 401, 48, 48, 402, 140, 140, 403, 32, 404, 32, 405, 406, 407, 408, 409, 48, 48, 48, 48, 48, 48, 48, 410, 411, 2, 3, 4, 5, 412, 413, 414, 48, 415, 48, 200, 416, 417, 418, 419, 420, 48, 172, 421, 204, 204, 140, 140, 48, 48, 48, 48, 48, 48, 48, 71, - 422, 271, 271, 423, 272, 272, 272, 424, 425, 426, 427, 140, 140, 209, 209, 428, + 422, 272, 272, 423, 273, 273, 273, 424, 425, 426, 427, 140, 140, 209, 209, 428, 140, 140, 140, 140, 140, 140, 140, 140, 48, 151, 48, 48, 48, 100, 429, 430, 48, 48, 431, 48, 432, 48, 48, 433, 48, 434, 48, 48, 435, 436, 140, 140, 9, 9, 437, 11, 11, 48, 48, 48, 48, 204, 192, 9, 9, 438, 11, 439, 48, 48, 440, 48, 48, 48, 441, 442, 442, 443, 444, 445, 48, 48, 48, 388, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 313, 48, 199, 440, 140, 446, 27, 27, 447, 140, 140, 140, 140, 448, 48, 48, 449, 48, 450, 48, 451, 48, 200, 452, 140, 140, 140, 48, 453, - 48, 454, 48, 455, 140, 140, 140, 140, 48, 48, 48, 456, 271, 457, 271, 271, + 48, 454, 48, 455, 48, 207, 140, 140, 48, 48, 48, 456, 272, 457, 272, 272, 458, 459, 48, 460, 461, 462, 48, 463, 48, 464, 140, 140, 465, 48, 466, 467, 48, 48, 48, 468, 48, 469, 48, 470, 48, 471, 472, 140, 140, 140, 140, 140, 48, 48, 48, 48, 196, 140, 140, 140, 9, 9, 9, 473, 11, 11, 11, 474, 48, 48, 475, 192, 476, 9, 477, 11, 478, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 271, 479, 48, 48, 480, 481, 482, 140, 140, 483, - 48, 464, 484, 48, 62, 485, 140, 48, 486, 140, 140, 48, 487, 140, 48, 313, - 488, 48, 48, 489, 490, 457, 491, 492, 222, 48, 48, 493, 494, 48, 196, 192, - 495, 48, 496, 497, 498, 48, 48, 499, 222, 48, 48, 500, 501, 502, 503, 504, - 48, 97, 505, 506, 507, 140, 140, 140, 508, 509, 510, 48, 48, 511, 512, 192, - 513, 83, 84, 514, 515, 516, 517, 518, 519, 48, 48, 520, 521, 522, 523, 140, - 48, 48, 48, 524, 525, 526, 481, 140, 48, 48, 48, 527, 528, 192, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 529, 530, 531, 532, 140, 140, - 48, 48, 48, 533, 534, 192, 535, 140, 48, 48, 536, 537, 192, 538, 539, 140, - 48, 540, 541, 542, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 48, 48, 505, 543, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 544, - 545, 546, 48, 547, 548, 192, 140, 140, 140, 140, 549, 48, 48, 550, 551, 140, - 552, 48, 48, 553, 554, 555, 48, 48, 556, 557, 558, 48, 48, 48, 48, 196, - 559, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 560, 192, - 84, 48, 529, 561, 562, 148, 175, 563, 48, 564, 565, 566, 140, 140, 140, 140, - 567, 48, 48, 568, 569, 192, 570, 48, 571, 572, 192, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 573, - 574, 115, 48, 575, 576, 577, 140, 140, 140, 140, 140, 100, 271, 578, 579, 580, + 140, 140, 140, 140, 140, 140, 272, 479, 48, 48, 480, 481, 482, 483, 140, 484, + 48, 464, 485, 48, 62, 486, 140, 48, 487, 140, 140, 48, 488, 140, 48, 313, + 489, 48, 48, 490, 491, 457, 492, 493, 223, 48, 48, 494, 495, 48, 196, 192, + 496, 48, 497, 498, 499, 48, 48, 500, 223, 48, 48, 501, 502, 503, 504, 505, + 48, 97, 506, 507, 508, 140, 140, 140, 509, 510, 511, 48, 48, 512, 513, 192, + 514, 83, 84, 515, 516, 517, 518, 519, 520, 48, 48, 521, 522, 523, 524, 140, + 48, 48, 48, 525, 526, 527, 481, 140, 48, 48, 48, 528, 529, 192, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 530, 531, 532, 533, 140, 140, + 48, 48, 48, 534, 535, 192, 536, 140, 48, 48, 537, 538, 192, 539, 540, 140, + 48, 541, 542, 543, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 506, 544, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 545, + 546, 547, 48, 548, 549, 192, 140, 140, 140, 140, 550, 48, 48, 551, 552, 140, + 553, 48, 48, 554, 555, 556, 48, 48, 557, 558, 559, 48, 48, 48, 48, 196, + 560, 140, 140, 140, 140, 140, 561, 140, 140, 140, 140, 140, 48, 48, 562, 192, + 84, 48, 530, 563, 564, 148, 175, 565, 48, 566, 567, 568, 140, 140, 140, 140, + 569, 48, 48, 570, 571, 192, 572, 48, 573, 574, 192, 48, 48, 575, 192, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 576, + 577, 115, 48, 578, 579, 580, 140, 140, 140, 140, 140, 100, 272, 581, 582, 583, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 207, 140, 140, 140, 140, 140, 140, - 272, 272, 272, 272, 272, 272, 581, 582, 48, 48, 48, 48, 48, 48, 48, 48, + 273, 273, 273, 273, 273, 273, 584, 585, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 388, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 583, - 48, 48, 48, 584, 585, 586, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 586, + 48, 48, 48, 587, 588, 589, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 71, 48, 48, 48, 48, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 48, 587, 588, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 589, - 48, 48, 48, 590, 591, 592, 593, 594, 48, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 595, 48, 596, 192, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 9, 9, 11, 11, 271, 597, 140, 140, 140, 140, 140, 140, - 48, 48, 48, 48, 598, 599, 600, 600, 601, 602, 140, 140, 140, 140, 603, 604, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 440, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 140, 605, - 196, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 606, - 48, 48, 607, 608, 140, 609, 610, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 590, 591, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 592, + 48, 48, 48, 593, 594, 595, 596, 597, 48, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 598, 48, 599, 192, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 9, 9, 11, 11, 272, 600, 9, 601, 11, 602, 140, 140, + 48, 48, 48, 48, 603, 604, 605, 605, 606, 607, 140, 140, 140, 140, 608, 609, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 140, 610, + 48, 200, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 48, 611, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 612, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 611, 613, 140, 614, 615, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 206, - 48, 48, 48, 48, 48, 48, 71, 151, 196, 611, 612, 140, 140, 140, 140, 140, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 192, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140, 140, - 32, 32, 613, 32, 614, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 48, 48, 48, 48, 71, 151, 196, 616, 617, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 618, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 619, 209, 427, 209, 620, + 32, 32, 216, 32, 621, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 323, - 209, 209, 615, 209, 209, 209, 616, 617, 618, 209, 619, 209, 209, 209, 287, 140, - 209, 209, 209, 209, 620, 140, 140, 140, 140, 140, 140, 140, 271, 621, 271, 621, - 209, 209, 209, 209, 209, 338, 271, 461, 140, 140, 140, 140, 140, 140, 140, 140, - 9, 622, 11, 623, 624, 625, 241, 9, 626, 627, 628, 629, 630, 9, 622, 11, - 631, 632, 11, 633, 634, 635, 636, 9, 637, 11, 9, 622, 11, 623, 624, 11, - 241, 9, 626, 636, 9, 637, 11, 9, 622, 11, 638, 9, 639, 640, 641, 642, - 11, 643, 9, 644, 645, 646, 647, 11, 648, 9, 649, 11, 650, 538, 538, 538, - 32, 32, 32, 651, 32, 32, 652, 653, 654, 655, 45, 140, 140, 140, 140, 140, - 656, 657, 658, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 659, 660, 661, 27, 27, 27, 662, 140, 663, 140, 140, 140, 140, 140, 140, 140, - 48, 48, 151, 664, 665, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 666, 140, 48, 48, 667, 668, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 669, 192, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 587, 670, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 671, 200, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 672, 614, 140, 140, - 9, 9, 626, 11, 673, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 503, 271, 271, 674, 675, 140, 140, 140, 140, - 503, 271, 676, 677, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 678, 48, 679, 680, 681, 682, 683, 684, 685, 206, 686, 206, 140, 140, 140, 687, - 209, 209, 688, 209, 209, 209, 209, 209, 209, 322, 333, 689, 689, 689, 209, 323, - 690, 209, 209, 209, 209, 209, 209, 209, 209, 209, 691, 140, 140, 140, 692, 209, - 693, 209, 209, 688, 694, 695, 323, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 696, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 697, 426, 426, - 209, 209, 209, 209, 209, 209, 209, 698, 209, 209, 209, 209, 209, 176, 688, 427, - 688, 209, 209, 209, 699, 176, 209, 209, 699, 209, 691, 688, 695, 140, 140, 140, - 209, 209, 209, 209, 209, 322, 691, 426, 700, 209, 209, 209, 701, 702, 176, 694, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 703, 209, 209, 209, 209, 209, 192, + 209, 209, 622, 209, 209, 209, 623, 624, 625, 209, 626, 209, 209, 209, 288, 140, + 209, 209, 209, 209, 627, 140, 140, 140, 140, 140, 140, 140, 272, 628, 272, 628, + 209, 209, 209, 209, 209, 338, 272, 461, 140, 140, 140, 140, 140, 140, 140, 140, + 9, 629, 11, 630, 631, 632, 242, 9, 633, 634, 635, 636, 637, 9, 629, 11, + 638, 639, 11, 640, 641, 642, 643, 9, 644, 11, 9, 629, 11, 630, 631, 11, + 242, 9, 633, 643, 9, 644, 11, 9, 629, 11, 645, 9, 646, 647, 648, 649, + 11, 650, 9, 651, 652, 653, 654, 11, 655, 9, 656, 11, 657, 539, 539, 539, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 32, 32, 32, 658, 32, 32, 659, 660, 661, 662, 45, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 663, 664, 665, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 666, 667, 668, 27, 27, 27, 669, 140, 670, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 151, 671, 672, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 673, 140, 48, 48, 674, 675, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 676, 192, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 590, 677, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 200, 678, 679, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 680, 200, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 681, 621, 140, 140, + 9, 9, 633, 11, 682, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 504, 272, 272, 683, 684, 140, 140, 140, 140, + 504, 272, 685, 686, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 687, 48, 688, 689, 690, 691, 692, 693, 694, 206, 695, 206, 140, 140, 140, 696, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 209, 209, 697, 209, 209, 209, 209, 209, 209, 322, 333, 698, 698, 698, 209, 323, + 699, 209, 209, 209, 209, 209, 209, 209, 209, 209, 700, 140, 140, 140, 701, 209, + 702, 209, 209, 697, 703, 704, 323, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 705, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 706, 426, 426, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 176, 697, 427, + 697, 209, 209, 209, 707, 176, 209, 209, 707, 209, 700, 697, 704, 708, 140, 140, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 707, 700, 426, 709, 209, 209, 209, 710, 711, 712, 703, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 713, 209, 209, 209, 209, 209, 714, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140, - 48, 48, 48, 207, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 481, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 100, 48, 48, 48, 48, 48, 48, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 71, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140, 140, 140, 140, - 704, 140, 584, 584, 584, 584, 584, 584, 140, 140, 140, 140, 140, 140, 140, 140, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 140, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 705, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 706, - 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, - 11, 11, 12, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 57, 58, 59, 60, 60, 60, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 7, 4, 4, 4, 4, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 112, 112, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 114, 0, - 115, 116, 117, 118, 119, 120, 121, 122, 0, 123, 124, 125, 126, 126, 126, 127, - 128, 129, 130, 131, 132, 60, 133, 134, 135, 136, 0, 137, 138, 139, 0, 0, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 0, 126, 126, 126, 126, 126, 126, 126, 126, + 48, 48, 48, 48, 48, 48, 48, 207, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 141, 142, 143, 143, 143, 143, 144, 11, 145, 146, 147, 4, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 166, 167, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 126, 126, 126, 126, 126, 169, 126, 170, 171, 172, 19, 173, - 19, 19, 19, 19, 174, 19, 175, 176, 177, 178, 19, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 168, 168, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 206, 206, 206, 207, 208, 209, 168, - 210, 211, 212, 213, 214, 168, 215, 216, 217, 218, 219, 220, 221, 222, 223, 168, - 224, 225, 226, 227, 228, 229, 230, 168, 168, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 168, 168, 258, 259, 260, 261, 262, 263, 264, 265, 168, 168, - 266, 168, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 168, 168, 278, - 279, 280, 281, 168, 282, 283, 284, 168, 168, 168, 168, 285, 286, 287, 288, 289, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 291, 168, - 290, 292, 290, 290, 290, 293, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 294, 295, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 297, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 298, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 300, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 301, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 302, 302, 302, 302, 302, 302, 302, 302, 303, 304, 305, 306, 307, 308, 309, 168, - 168, 168, 168, 168, 168, 310, 168, 168, 168, 311, 312, 168, 313, 314, 315, 316, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 318, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 319, 319, 319, 319, - 319, 319, 319, 320, 321, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 322, - 323, 324, 324, 324, 325, 326, 327, 327, 327, 327, 327, 328, 168, 168, 168, 168, - 329, 330, 331, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, 333, 168, 334, 335, 0, 336, - 0, 0, 0, 337, 338, 339, 340, 341, 189, 342, 168, 343, 0, 344, 168, 168, - 0, 345, 346, 347, 348, 349, 0, 0, 0, 0, 350, 0, 0, 0, 0, 351, - 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 353, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 354, 168, 168, 168, - 355, 356, 357, 168, 358, 359, 168, 168, 168, 168, 360, 361, 168, 168, 168, 168, - 168, 168, 168, 362, 168, 168, 168, 363, 168, 168, 168, 168, 168, 168, 168, 364, - 365, 365, 365, 366, 367, 368, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 369, 370, 168, 371, 168, 168, 168, 372, 373, 374, 375, 168, 168, 168, 168, - 376, 0, 377, 378, 0, 0, 379, 380, 381, 382, 168, 168, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 0, 384, 0, 385, - 386, 387, 388, 389, 0, 0, 0, 0, 0, 390, 391, 392, 0, 0, 393, 332, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 394, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 395, 126, 126, 126, - 396, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 397, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 398, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 399, 168, 168, 168, 168, 168, 168, - 126, 126, 126, 126, 126, 126, 126, 126, 399, 168, 168, 168, 168, 168, 168, 168, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 400, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 401, 168, - 402, 0, 168, 168, 7, 7, 7, 403, 0, 1, 2, 3, 4, 4, 4, 4, + 715, 140, 587, 587, 587, 587, 587, 587, 140, 140, 140, 140, 140, 140, 140, 140, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 140, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 716, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 717, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 1, 2, 2, 3, 0, 0, 0, 0, 0, 4, 0, 4, 2, 2, 5, 2, 2, 2, 5, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, - 0, 0, 0, 0, 7, 8, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 10, 11, 12, 13, 14, 14, 15, 14, 14, 14, - 14, 14, 14, 14, 16, 17, 14, 14, 18, 18, 18, 18, 18, 18, 18, 18, - 19, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 21, - 21, 21, 22, 20, 21, 21, 21, 21, 21, 23, 24, 25, 25, 25, 25, 25, - 25, 26, 25, 25, 25, 27, 28, 26, 29, 30, 31, 32, 31, 31, 31, 31, - 33, 34, 35, 31, 31, 31, 36, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 29, 31, 31, 31, 31, 37, 38, 37, 37, 37, 37, 37, 37, - 37, 39, 31, 31, 31, 31, 31, 31, 40, 40, 40, 40, 40, 40, 41, 26, - 42, 42, 42, 42, 42, 42, 42, 43, 44, 44, 44, 44, 44, 45, 44, 46, - 47, 47, 47, 48, 37, 49, 31, 31, 31, 50, 51, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 52, 31, 31, 31, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 54, 53, 55, 53, 53, 53, 56, 57, 58, 59, 59, 60, 61, 62, - 57, 63, 64, 65, 66, 59, 59, 67, 68, 69, 70, 71, 71, 72, 73, 74, - 69, 75, 76, 77, 78, 71, 79, 26, 80, 81, 82, 83, 83, 84, 85, 86, - 81, 87, 88, 26, 89, 83, 90, 91, 92, 93, 94, 95, 95, 96, 97, 98, - 93, 99, 100, 101, 102, 95, 95, 26, 103, 104, 105, 106, 107, 104, 108, 109, - 104, 105, 110, 26, 111, 108, 108, 112, 113, 114, 115, 113, 113, 115, 113, 116, - 114, 117, 118, 119, 120, 113, 121, 113, 122, 123, 124, 122, 122, 124, 125, 126, - 123, 127, 128, 128, 129, 122, 130, 26, 131, 132, 133, 131, 131, 131, 131, 131, - 132, 133, 134, 131, 135, 131, 131, 131, 136, 137, 138, 139, 137, 137, 140, 141, - 138, 142, 143, 137, 144, 137, 145, 26, 146, 147, 147, 147, 147, 147, 147, 148, - 147, 147, 147, 149, 26, 26, 26, 26, 150, 151, 152, 152, 153, 152, 152, 154, - 155, 156, 152, 157, 26, 26, 26, 26, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 159, 158, 158, 158, 160, 159, 158, 158, 158, 158, 159, 158, 158, 158, 161, - 158, 161, 162, 163, 26, 26, 26, 26, 164, 164, 164, 164, 164, 164, 164, 164, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 6, 0, 0, 0, 0, 7, 8, 0, 0, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, + 12, 13, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, 16, 17, 14, 14, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 19, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 20, 21, 21, 21, 22, 20, 21, 21, 21, 21, + 21, 23, 24, 25, 25, 25, 25, 25, 25, 26, 25, 25, 25, 27, 28, 26, + 29, 30, 31, 32, 31, 31, 31, 31, 33, 34, 35, 31, 31, 31, 36, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 29, 31, 31, 31, 31, + 37, 38, 37, 37, 37, 37, 37, 37, 37, 39, 31, 31, 31, 31, 31, 31, + 40, 40, 40, 40, 40, 40, 41, 26, 42, 42, 42, 42, 42, 42, 42, 43, + 44, 44, 44, 44, 44, 45, 44, 46, 47, 47, 47, 48, 37, 49, 31, 31, + 31, 31, 50, 31, 31, 31, 31, 31, 31, 31, 31, 31, 51, 31, 31, 31, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 52, 54, 52, 52, 52, + 55, 56, 57, 58, 58, 59, 60, 61, 56, 62, 63, 64, 65, 58, 58, 66, + 67, 68, 69, 70, 70, 71, 72, 73, 68, 74, 75, 76, 77, 70, 78, 26, + 79, 80, 81, 82, 82, 83, 84, 85, 80, 86, 87, 26, 88, 82, 89, 90, + 91, 92, 93, 94, 94, 95, 96, 97, 92, 98, 99, 100, 101, 94, 94, 26, + 102, 103, 104, 105, 106, 103, 107, 108, 103, 104, 109, 26, 110, 107, 107, 111, + 112, 113, 114, 112, 112, 114, 112, 115, 113, 116, 117, 118, 119, 112, 120, 112, + 121, 122, 123, 121, 121, 123, 124, 125, 122, 126, 127, 128, 129, 121, 130, 26, + 131, 132, 133, 131, 131, 131, 131, 131, 132, 133, 134, 131, 135, 131, 131, 131, + 136, 137, 138, 139, 137, 137, 140, 141, 138, 142, 143, 137, 144, 137, 145, 26, + 146, 147, 147, 147, 147, 147, 147, 148, 147, 147, 147, 149, 26, 26, 26, 26, + 150, 151, 152, 152, 153, 152, 152, 154, 155, 156, 152, 157, 26, 26, 26, 26, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 159, 158, 158, 158, 160, 159, 158, + 158, 158, 158, 159, 158, 158, 158, 161, 158, 161, 162, 163, 26, 26, 26, 26, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, 165, 165, 165, 166, 167, 165, 165, 165, 165, 165, 168, - 169, 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, 170, 170, 170, 170, 170, - 170, 171, 172, 171, 170, 170, 170, 170, 170, 171, 170, 170, 170, 170, 171, 172, - 171, 170, 172, 170, 170, 170, 170, 170, 170, 170, 171, 170, 170, 170, 170, 170, - 170, 170, 170, 173, 170, 170, 170, 174, 170, 170, 170, 175, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, 172, 171, 170, 170, 170, 170, + 170, 171, 170, 170, 170, 170, 171, 172, 171, 170, 172, 170, 170, 170, 170, 170, + 170, 170, 171, 170, 170, 170, 170, 170, 170, 170, 170, 173, 170, 170, 170, 174, + 170, 170, 170, 175, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 179, 179, 179, 180, 181, 181, 181, 181, 181, 181, 181, 181, 181, 182, 181, 183, 184, 184, 185, 186, 187, 187, 188, 26, 189, 189, 190, 26, 191, 192, 193, 26, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 195, 194, 196, 194, 196, @@ -2466,165 +2264,215 @@ 203, 203, 203, 204, 203, 205, 203, 205, 206, 203, 207, 207, 207, 208, 209, 26, 210, 210, 210, 210, 210, 211, 210, 210, 210, 212, 210, 213, 194, 194, 194, 194, 214, 214, 214, 215, 216, 216, 216, 216, 216, 216, 216, 217, 216, 216, 216, 218, - 216, 219, 216, 219, 216, 220, 9, 9, 9, 221, 26, 26, 26, 26, 26, 26, - 222, 222, 222, 222, 222, 222, 222, 222, 222, 223, 222, 222, 222, 222, 222, 222, - 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225, 225, 225, 226, 227, - 228, 228, 228, 228, 228, 228, 228, 229, 228, 230, 231, 231, 231, 231, 231, 231, - 18, 232, 165, 165, 165, 165, 165, 233, 224, 26, 234, 9, 235, 236, 237, 238, - 2, 2, 2, 2, 239, 240, 2, 2, 2, 2, 2, 241, 242, 243, 2, 244, - 2, 2, 2, 2, 2, 2, 2, 245, 14, 14, 246, 246, 14, 14, 14, 14, - 246, 246, 14, 247, 14, 14, 14, 246, 14, 14, 14, 14, 14, 14, 248, 14, - 248, 14, 249, 250, 14, 14, 251, 252, 0, 253, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 254, 0, 255, 256, 0, 257, 2, 258, 0, 0, 0, 0, - 259, 26, 9, 9, 9, 9, 260, 26, 0, 0, 0, 0, 261, 262, 4, 0, - 0, 263, 0, 0, 2, 2, 2, 2, 2, 264, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 265, 26, 26, 0, 266, 26, 26, 0, 0, 0, 0, - 267, 267, 267, 267, 267, 267, 267, 267, 0, 0, 0, 0, 0, 0, 268, 0, - 0, 0, 269, 0, 0, 0, 0, 0, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 2, 2, 2, 2, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 271, 272, 165, 165, 165, 165, 166, 167, 273, 273, - 273, 273, 273, 273, 273, 274, 275, 274, 170, 170, 172, 26, 172, 172, 172, 172, - 172, 172, 172, 172, 18, 18, 18, 18, 0, 0, 0, 276, 26, 26, 26, 26, - 277, 277, 277, 278, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 279, 26, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 280, 26, 26, 26, 0, 0, - 281, 0, 0, 0, 282, 283, 0, 284, 285, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 287, 288, 289, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 291, - 292, 293, 293, 293, 293, 293, 294, 169, 169, 295, 0, 0, 293, 293, 293, 293, - 0, 0, 0, 0, 276, 296, 290, 290, 169, 169, 169, 295, 0, 0, 0, 0, - 0, 0, 0, 0, 169, 169, 169, 297, 0, 0, 290, 290, 290, 290, 290, 298, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 0, 0, 0, 0, 0, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 300, 299, 299, 299, 299, 299, 299, - 301, 26, 302, 302, 302, 302, 302, 302, 303, 303, 303, 303, 303, 303, 303, 303, - 303, 303, 303, 303, 303, 304, 26, 26, 18, 18, 18, 18, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 26, 0, 0, 0, 0, 306, 2, 2, 2, - 2, 307, 2, 2, 2, 2, 2, 2, 2, 308, 309, 258, 26, 26, 310, 2, - 311, 311, 311, 311, 311, 312, 0, 265, 313, 313, 313, 313, 313, 313, 313, 26, - 314, 314, 314, 314, 314, 314, 314, 314, 315, 316, 314, 317, 53, 53, 53, 53, - 318, 318, 318, 318, 318, 319, 320, 320, 320, 320, 321, 322, 169, 169, 169, 323, - 324, 324, 324, 324, 324, 324, 324, 324, 324, 325, 324, 326, 164, 164, 164, 327, - 328, 328, 328, 328, 328, 328, 329, 26, 328, 330, 328, 331, 164, 164, 164, 164, - 332, 332, 332, 332, 332, 332, 332, 332, 333, 26, 26, 334, 335, 335, 336, 26, - 337, 337, 337, 26, 172, 172, 2, 2, 2, 2, 2, 338, 339, 340, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 335, 335, 335, 335, 335, 341, 335, 342, - 169, 169, 169, 169, 343, 26, 169, 169, 295, 344, 169, 169, 169, 169, 169, 343, - 26, 26, 26, 26, 26, 26, 26, 26, 277, 277, 277, 277, 277, 280, 277, 277, - 277, 277, 277, 345, 26, 26, 26, 26, 346, 26, 347, 348, 25, 25, 349, 350, - 351, 25, 31, 31, 31, 31, 31, 31, 352, 26, 353, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 354, 31, 31, 355, 31, 31, 31, 31, 31, - 31, 356, 26, 26, 26, 26, 31, 31, 9, 9, 0, 265, 9, 357, 0, 0, - 0, 0, 358, 0, 257, 359, 360, 31, 31, 31, 31, 31, 31, 31, 31, 361, - 362, 0, 0, 0, 1, 2, 2, 3, 1, 2, 2, 3, 363, 290, 289, 290, - 290, 290, 290, 364, 169, 169, 169, 295, 365, 365, 365, 366, 257, 257, 26, 367, - 368, 369, 368, 368, 370, 368, 368, 371, 368, 372, 368, 372, 26, 26, 26, 26, - 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 373, - 374, 0, 0, 0, 0, 0, 375, 0, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 252, 0, 376, 377, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 378, - 379, 379, 379, 380, 381, 381, 381, 381, 381, 381, 382, 26, 383, 0, 0, 359, - 384, 384, 384, 384, 385, 386, 387, 387, 387, 388, 389, 389, 389, 389, 389, 390, - 391, 391, 391, 392, 393, 393, 393, 393, 394, 393, 395, 26, 26, 26, 26, 26, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, 397, 397, 397, 397, 397, 397, - 398, 398, 398, 399, 398, 400, 401, 401, 401, 401, 402, 401, 401, 401, 401, 402, - 403, 403, 403, 403, 403, 26, 404, 404, 404, 404, 404, 404, 405, 406, 407, 408, - 407, 408, 409, 407, 410, 407, 410, 411, 412, 412, 412, 412, 412, 412, 413, 26, - 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 415, 26, - 414, 414, 416, 26, 414, 26, 26, 26, 417, 2, 2, 2, 2, 2, 418, 419, - 420, 421, 422, 422, 422, 422, 423, 424, 425, 425, 426, 425, 427, 427, 427, 427, - 428, 428, 428, 429, 430, 428, 26, 26, 26, 26, 26, 26, 431, 431, 432, 433, - 434, 434, 434, 435, 436, 436, 436, 437, 438, 438, 438, 438, 439, 439, 439, 440, - 439, 439, 441, 439, 439, 439, 439, 439, 442, 443, 444, 445, 446, 446, 447, 448, - 446, 449, 446, 449, 450, 450, 450, 450, 451, 451, 451, 451, 26, 26, 26, 26, - 452, 452, 452, 452, 453, 454, 453, 26, 455, 455, 455, 455, 455, 455, 456, 457, - 458, 458, 459, 458, 460, 460, 461, 460, 462, 462, 463, 464, 26, 465, 26, 26, - 466, 466, 466, 466, 466, 466, 466, 466, 466, 467, 26, 26, 26, 26, 26, 26, - 468, 468, 468, 468, 468, 468, 469, 26, 468, 468, 468, 468, 468, 468, 469, 470, - 471, 471, 471, 471, 471, 26, 471, 472, 473, 473, 473, 473, 474, 475, 473, 473, - 474, 476, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 31, 31, 31, 50, - 477, 477, 477, 477, 477, 478, 479, 26, 480, 26, 26, 26, 26, 26, 26, 481, - 482, 482, 482, 482, 482, 26, 483, 483, 483, 483, 483, 484, 26, 26, 485, 485, - 485, 486, 26, 26, 26, 26, 487, 487, 487, 488, 26, 26, 489, 489, 490, 26, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 492, 493, 491, 491, 491, 492, 494, - 495, 495, 495, 495, 495, 495, 495, 495, 496, 497, 498, 498, 498, 499, 498, 500, - 501, 501, 501, 501, 501, 501, 502, 501, 501, 26, 503, 503, 503, 503, 504, 26, - 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 506, 137, 507, 26, - 508, 508, 509, 508, 508, 508, 508, 508, 510, 26, 26, 26, 26, 26, 26, 26, - 511, 512, 513, 514, 513, 515, 516, 516, 516, 516, 516, 516, 516, 517, 516, 518, - 519, 520, 521, 522, 522, 523, 524, 525, 520, 526, 527, 528, 529, 530, 530, 26, - 531, 532, 531, 531, 531, 531, 533, 531, 534, 535, 533, 536, 537, 26, 26, 26, - 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 539, 540, 26, 26, 26, - 541, 541, 541, 541, 541, 541, 541, 541, 541, 26, 541, 542, 26, 26, 26, 26, - 543, 543, 543, 543, 543, 543, 544, 543, 543, 543, 543, 544, 26, 26, 26, 26, - 545, 545, 545, 545, 545, 545, 545, 545, 546, 26, 545, 547, 198, 548, 26, 26, - 549, 549, 549, 549, 549, 549, 549, 550, 549, 550, 164, 164, 551, 26, 26, 26, - 552, 552, 552, 553, 552, 554, 552, 552, 555, 26, 26, 26, 26, 26, 26, 26, - 556, 556, 556, 556, 556, 556, 556, 557, 26, 26, 26, 26, 558, 558, 558, 558, - 558, 558, 558, 558, 558, 558, 559, 560, 561, 562, 563, 564, 564, 564, 565, 566, - 561, 26, 564, 567, 26, 26, 26, 26, 26, 26, 26, 26, 568, 569, 568, 568, - 568, 568, 568, 569, 570, 26, 26, 26, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 26, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 573, 26, 178, 178, - 574, 574, 574, 574, 574, 574, 574, 575, 53, 576, 26, 26, 26, 26, 26, 26, - 577, 577, 577, 577, 578, 26, 577, 578, 579, 580, 579, 579, 579, 579, 581, 579, - 582, 26, 579, 579, 579, 583, 584, 584, 584, 584, 585, 584, 584, 586, 587, 26, - 588, 589, 590, 590, 590, 590, 588, 591, 590, 26, 590, 592, 593, 594, 595, 595, - 595, 596, 597, 598, 595, 599, 26, 26, 26, 26, 26, 26, 600, 600, 600, 601, - 602, 602, 603, 602, 602, 602, 602, 604, 602, 602, 602, 605, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 606, 26, 108, 108, 108, 108, 108, 108, 607, 608, - 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 610, 26, 26, 26, 26, - 609, 609, 609, 609, 609, 611, 612, 26, 613, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 615, 26, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 617, 26, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 618, 619, 619, 619, 619, 619, 619, 619, 619, - 620, 26, 26, 26, 26, 26, 26, 26, 621, 621, 621, 621, 621, 621, 621, 622, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 623, - 624, 624, 624, 625, 624, 626, 627, 627, 627, 627, 627, 627, 627, 627, 627, 628, - 627, 629, 630, 630, 630, 631, 631, 26, 632, 632, 632, 632, 632, 632, 632, 632, - 633, 26, 632, 634, 634, 632, 632, 635, 632, 632, 26, 26, 26, 26, 26, 26, - 636, 636, 636, 636, 636, 636, 636, 637, 638, 638, 638, 638, 638, 638, 638, 638, - 638, 638, 638, 639, 26, 26, 26, 26, 640, 640, 640, 640, 640, 640, 640, 640, - 640, 641, 640, 640, 640, 640, 640, 640, 640, 642, 640, 640, 26, 26, 26, 26, - 26, 26, 26, 26, 643, 26, 345, 26, 644, 644, 644, 644, 644, 644, 644, 644, - 644, 644, 644, 644, 644, 644, 644, 26, 645, 645, 645, 645, 645, 645, 645, 645, - 645, 645, 646, 26, 26, 26, 26, 647, 644, 648, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 649, 650, 651, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 652, 26, 653, 26, - 26, 26, 654, 26, 655, 26, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 657, 658, 658, 658, 658, 658, 658, 658, 658, - 658, 658, 658, 658, 658, 659, 658, 660, 658, 661, 658, 662, 359, 26, 26, 26, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 0, 0, 0, 0, 0, 359, 26, - 9, 9, 9, 9, 9, 663, 9, 9, 221, 26, 0, 0, 0, 0, 0, 0, - 359, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 276, 26, - 0, 0, 0, 0, 257, 362, 0, 0, 0, 0, 0, 0, 664, 665, 0, 666, - 667, 668, 0, 0, 0, 669, 0, 0, 0, 0, 0, 0, 0, 266, 26, 26, - 246, 26, 26, 26, 26, 26, 26, 26, 0, 0, 359, 26, 0, 0, 359, 26, - 0, 0, 257, 26, 0, 0, 0, 259, 0, 0, 254, 0, 0, 0, 0, 0, - 0, 0, 0, 254, 670, 671, 0, 672, 673, 0, 0, 0, 0, 0, 0, 0, - 269, 674, 254, 254, 0, 0, 0, 675, 676, 677, 678, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 276, 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, 0, - 679, 679, 679, 679, 679, 679, 679, 679, 679, 680, 26, 681, 682, 679, 26, 26, - 2, 2, 2, 346, 683, 419, 26, 26, 684, 270, 270, 685, 686, 687, 18, 18, - 18, 18, 18, 18, 18, 688, 26, 26, 26, 689, 26, 26, 26, 26, 26, 26, - 690, 690, 690, 690, 690, 691, 690, 692, 690, 693, 26, 26, 26, 26, 26, 26, - 26, 26, 694, 694, 694, 695, 26, 26, 696, 696, 696, 696, 696, 696, 696, 697, - 26, 26, 698, 698, 698, 698, 698, 699, 26, 26, 700, 700, 700, 700, 700, 701, - 26, 26, 26, 26, 172, 702, 170, 172, 703, 703, 703, 703, 703, 703, 703, 703, - 704, 703, 705, 26, 26, 26, 26, 26, 706, 706, 706, 706, 706, 706, 706, 706, - 706, 707, 706, 708, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 362, 0, - 0, 0, 0, 0, 0, 0, 376, 26, 362, 0, 0, 0, 0, 0, 0, 276, - 709, 31, 31, 31, 710, 711, 712, 713, 714, 715, 710, 716, 710, 712, 712, 717, - 31, 718, 31, 719, 720, 718, 31, 719, 26, 26, 26, 26, 26, 26, 721, 26, - 0, 0, 0, 0, 0, 359, 0, 0, 0, 0, 359, 26, 0, 257, 362, 0, - 362, 0, 362, 0, 0, 0, 276, 26, 0, 0, 0, 0, 0, 276, 26, 26, - 26, 26, 26, 26, 722, 0, 0, 0, 723, 26, 0, 0, 0, 0, 0, 359, - 0, 259, 265, 26, 276, 26, 26, 26, 0, 0, 0, 724, 0, 376, 0, 376, - 0, 0, 0, 0, 0, 0, 257, 725, 0, 0, 0, 265, 0, 359, 259, 26, - 0, 359, 0, 0, 0, 0, 0, 0, 0, 26, 0, 265, 0, 0, 0, 0, - 0, 26, 0, 0, 0, 276, 0, 359, 265, 26, 26, 26, 26, 26, 26, 26, - 0, 0, 359, 26, 0, 276, 0, 376, 0, 726, 0, 0, 0, 0, 0, 0, - 257, 722, 0, 727, 0, 265, 0, 259, 0, 0, 358, 0, 0, 0, 0, 0, - 277, 277, 277, 277, 26, 26, 26, 26, 277, 277, 277, 277, 277, 277, 277, 345, - 277, 277, 277, 280, 277, 277, 277, 277, 277, 277, 277, 277, 345, 26, 277, 277, - 277, 277, 277, 277, 728, 26, 277, 277, 277, 277, 277, 280, 26, 26, 26, 26, - 277, 729, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 26, 26, - 730, 26, 26, 26, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, + 216, 219, 216, 219, 216, 220, 9, 9, 9, 9, 9, 221, 9, 222, 26, 26, + 223, 223, 223, 223, 223, 223, 223, 223, 223, 224, 223, 223, 223, 223, 223, 223, + 225, 225, 225, 225, 225, 225, 225, 225, 226, 226, 226, 226, 226, 226, 227, 228, + 229, 229, 229, 229, 229, 229, 229, 230, 229, 231, 232, 232, 232, 232, 232, 232, + 18, 233, 165, 165, 165, 165, 165, 234, 225, 26, 235, 9, 236, 237, 238, 239, + 2, 2, 2, 2, 240, 241, 2, 2, 2, 2, 2, 242, 243, 244, 2, 245, + 2, 2, 2, 2, 2, 2, 2, 246, 9, 9, 9, 9, 9, 9, 9, 9, + 14, 14, 247, 247, 14, 14, 14, 14, 247, 247, 14, 248, 14, 14, 14, 247, + 14, 14, 14, 14, 14, 14, 249, 14, 249, 14, 250, 251, 14, 14, 252, 253, + 0, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 256, 257, + 0, 258, 2, 259, 0, 0, 0, 0, 260, 26, 9, 9, 9, 9, 261, 26, + 0, 0, 0, 0, 262, 263, 4, 0, 0, 264, 0, 0, 2, 2, 2, 2, + 2, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 260, 26, 26, 0, 266, 26, 26, 0, 0, 0, 0, + 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 2, 2, 2, 2, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 270, 271, + 165, 165, 165, 165, 166, 167, 272, 272, 272, 272, 272, 272, 272, 273, 274, 273, + 170, 170, 172, 26, 172, 172, 172, 172, 172, 172, 172, 172, 18, 18, 18, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 26, 26, 26, 26, + 276, 276, 276, 277, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 278, 26, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 279, 26, 26, 26, 0, 0, + 280, 0, 0, 0, 281, 282, 0, 283, 284, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 286, 287, 288, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 290, + 291, 292, 292, 292, 292, 292, 293, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 294, 0, 0, 292, 292, 292, 292, 0, 0, 0, 0, 275, 295, 289, 289, + 169, 169, 169, 294, 0, 0, 0, 0, 0, 0, 0, 0, 169, 169, 169, 296, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 289, 289, 289, 289, 297, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, 0, + 276, 276, 276, 276, 276, 276, 276, 276, 0, 0, 0, 0, 0, 0, 0, 0, + 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, + 298, 299, 298, 298, 298, 298, 298, 298, 300, 26, 301, 301, 301, 301, 301, 301, + 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 303, 26, 26, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 26, + 0, 0, 0, 0, 305, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 306, 2, 2, 2, 2, 2, 2, 2, 2, 2, 259, 26, 26, 307, 2, + 308, 308, 308, 308, 308, 309, 0, 260, 310, 310, 310, 310, 310, 310, 310, 26, + 311, 311, 311, 311, 311, 311, 311, 311, 312, 313, 311, 314, 52, 52, 52, 52, + 315, 315, 315, 315, 315, 316, 317, 317, 317, 317, 318, 319, 169, 169, 169, 320, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 322, 321, 323, 164, 164, 164, 324, + 325, 325, 325, 325, 325, 325, 326, 26, 325, 327, 325, 328, 164, 164, 164, 164, + 329, 329, 329, 329, 329, 329, 329, 329, 330, 26, 26, 331, 332, 332, 333, 26, + 334, 334, 334, 26, 172, 172, 2, 2, 2, 2, 2, 335, 336, 337, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 332, 332, 332, 332, 332, 338, 332, 339, + 169, 169, 169, 169, 340, 26, 169, 169, 294, 341, 169, 169, 169, 169, 169, 340, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 279, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 342, 26, 26, 26, 26, + 343, 26, 344, 345, 25, 25, 346, 347, 348, 25, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 349, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 26, 26, 26, 26, 31, 31, + 9, 9, 0, 260, 9, 350, 0, 0, 0, 0, 351, 0, 258, 352, 353, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 354, + 355, 0, 0, 0, 1, 2, 2, 3, 1, 2, 2, 3, 356, 289, 288, 289, + 289, 289, 289, 357, 169, 169, 169, 294, 358, 358, 358, 359, 258, 258, 26, 360, + 361, 362, 361, 361, 363, 361, 361, 364, 361, 365, 361, 365, 26, 26, 26, 26, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 366, + 367, 0, 0, 0, 0, 0, 368, 0, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 253, 0, 369, 370, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 371, + 372, 372, 372, 373, 374, 374, 374, 374, 374, 374, 375, 26, 376, 0, 0, 352, + 377, 377, 377, 377, 378, 379, 380, 380, 380, 381, 382, 382, 382, 382, 382, 383, + 384, 384, 384, 385, 386, 386, 386, 386, 387, 386, 388, 26, 26, 26, 26, 26, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 390, 390, 390, 390, 390, 390, + 391, 391, 391, 392, 391, 393, 394, 394, 394, 394, 395, 394, 394, 394, 394, 395, + 396, 396, 396, 396, 396, 26, 397, 397, 397, 397, 397, 397, 398, 399, 400, 401, + 400, 401, 402, 400, 403, 400, 403, 404, 405, 405, 405, 405, 405, 405, 406, 26, + 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, + 407, 407, 407, 407, 407, 407, 408, 26, 407, 407, 409, 26, 407, 26, 26, 26, + 410, 2, 2, 2, 2, 2, 411, 412, 26, 26, 26, 26, 26, 26, 26, 26, + 413, 414, 415, 415, 415, 415, 416, 417, 418, 418, 419, 418, 420, 420, 420, 420, + 421, 421, 421, 422, 423, 421, 26, 26, 26, 26, 26, 26, 424, 424, 425, 426, + 427, 427, 427, 428, 429, 429, 429, 430, 431, 431, 431, 432, 26, 26, 26, 26, + 433, 433, 433, 433, 434, 434, 434, 435, 434, 434, 436, 434, 434, 434, 434, 434, + 437, 438, 439, 440, 441, 441, 442, 443, 441, 444, 441, 444, 445, 445, 445, 445, + 446, 446, 446, 446, 26, 26, 26, 26, 447, 447, 447, 447, 448, 449, 448, 26, + 450, 450, 450, 450, 450, 450, 451, 452, 453, 453, 454, 453, 455, 455, 456, 455, + 457, 457, 458, 459, 26, 460, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 26, 26, 26, 26, 26, 26, + 463, 463, 463, 463, 463, 463, 464, 26, 463, 463, 463, 463, 463, 463, 464, 465, + 466, 466, 466, 466, 466, 26, 466, 467, 468, 468, 468, 468, 469, 470, 468, 468, + 469, 471, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 31, 31, 31, 472, + 473, 473, 473, 473, 473, 474, 475, 26, 476, 26, 31, 477, 26, 26, 26, 476, + 478, 478, 478, 478, 478, 26, 479, 479, 479, 479, 479, 480, 26, 26, 481, 481, + 481, 482, 26, 26, 26, 26, 483, 483, 483, 484, 26, 26, 485, 485, 486, 26, + 487, 487, 487, 487, 487, 487, 487, 487, 487, 488, 489, 487, 487, 487, 488, 490, + 491, 491, 491, 491, 491, 491, 491, 491, 492, 493, 494, 494, 494, 495, 494, 496, + 497, 497, 497, 497, 497, 497, 498, 497, 497, 26, 499, 499, 499, 499, 500, 26, + 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 502, 137, 503, 26, + 504, 504, 505, 504, 504, 504, 504, 504, 506, 26, 26, 26, 26, 26, 26, 26, + 507, 508, 509, 510, 509, 511, 512, 512, 512, 512, 512, 512, 512, 513, 512, 514, + 515, 516, 517, 518, 518, 519, 520, 521, 516, 522, 523, 524, 525, 526, 526, 26, + 527, 528, 527, 527, 527, 527, 529, 527, 530, 531, 529, 532, 533, 26, 26, 26, + 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 535, 536, 26, 26, 26, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 26, 537, 538, 26, 26, 26, 26, + 539, 539, 539, 539, 539, 539, 540, 539, 539, 539, 539, 540, 26, 26, 26, 26, + 541, 541, 541, 541, 541, 541, 541, 541, 542, 26, 541, 543, 198, 544, 26, 26, + 545, 545, 545, 545, 545, 545, 545, 546, 545, 546, 164, 164, 547, 26, 26, 26, + 548, 548, 548, 549, 548, 550, 548, 548, 551, 26, 26, 26, 26, 26, 26, 26, + 552, 552, 552, 552, 552, 552, 552, 553, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 555, 556, + 557, 558, 559, 560, 560, 560, 561, 562, 557, 26, 560, 563, 26, 26, 26, 26, + 26, 26, 26, 26, 564, 565, 564, 564, 564, 564, 564, 565, 566, 26, 26, 26, + 567, 567, 567, 567, 567, 567, 567, 567, 567, 26, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 569, 26, 178, 178, 570, 570, 570, 570, 570, 570, 570, 571, + 52, 572, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 501, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 573, 573, 573, 573, 574, 26, 573, 574, + 575, 576, 575, 575, 575, 575, 577, 575, 578, 26, 575, 575, 575, 579, 580, 580, + 580, 580, 581, 580, 580, 582, 583, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 584, 585, 586, 586, 586, 586, 584, 587, 586, 26, 586, 588, 589, 590, 591, 591, + 591, 592, 593, 594, 591, 595, 596, 596, 596, 596, 596, 597, 596, 598, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 599, 599, 599, 600, + 601, 601, 602, 601, 601, 601, 601, 603, 601, 601, 601, 604, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 605, 26, 107, 107, 107, 107, 107, 107, 606, 607, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, + 608, 608, 608, 609, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 610, 611, 26, + 608, 608, 608, 608, 608, 608, 608, 608, 612, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 614, 26, + 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, + 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 616, 26, 615, 615, 615, 615, + 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 617, + 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, + 618, 618, 618, 618, 618, 618, 618, 618, 619, 26, 26, 26, 26, 26, 26, 26, + 620, 620, 620, 620, 620, 620, 620, 621, 26, 26, 26, 26, 26, 26, 26, 26, + 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 622, 623, 623, 623, 624, 623, 625, 626, 626, + 626, 626, 626, 626, 626, 626, 626, 627, 626, 628, 629, 629, 629, 630, 630, 26, + 631, 631, 631, 631, 631, 631, 631, 631, 632, 26, 631, 633, 633, 631, 631, 634, + 631, 631, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 635, 635, 635, 635, 635, 635, 635, 636, + 26, 26, 26, 26, 26, 26, 26, 26, 637, 637, 637, 637, 637, 637, 637, 637, + 637, 637, 637, 638, 639, 639, 639, 640, 639, 639, 641, 26, 26, 26, 26, 26, + 642, 642, 642, 642, 642, 642, 642, 642, 642, 643, 642, 642, 642, 642, 642, 642, + 642, 644, 642, 642, 26, 26, 26, 26, 26, 26, 26, 26, 645, 26, 646, 26, + 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, + 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, + 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 649, 26, 26, 26, 26, 650, + 647, 647, 647, 651, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 652, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 653, 654, + 655, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 656, 26, 657, 26, 26, 26, 658, 26, 659, 26, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 661, + 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 663, 662, 664, + 662, 665, 662, 666, 352, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, + 0, 0, 0, 0, 0, 0, 352, 667, 0, 0, 668, 26, 0, 0, 668, 26, + 9, 9, 9, 9, 9, 221, 9, 9, 669, 26, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 352, 26, 26, 26, 26, 26, 26, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 26, + 0, 0, 0, 0, 258, 355, 0, 0, 0, 0, 0, 0, 670, 671, 0, 672, + 673, 674, 0, 0, 0, 675, 0, 0, 0, 0, 0, 0, 0, 266, 26, 26, + 14, 14, 14, 14, 14, 14, 14, 14, 247, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 352, 26, 0, 0, 352, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 258, 26, 0, 0, 0, 668, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 255, 676, 677, 0, 678, 679, 0, 0, 0, 0, 0, 0, 0, + 680, 681, 255, 255, 0, 0, 0, 682, 683, 667, 684, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, 0, + 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, + 685, 686, 26, 687, 688, 685, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 2, 2, 2, 343, 689, 412, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 690, 269, 269, 691, 692, 693, 18, 18, 18, 18, 18, 18, 18, 694, 26, 26, + 26, 695, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 696, 696, 696, 696, 696, 697, 696, 698, 696, 699, 26, 26, 26, 26, 26, 26, + 26, 26, 700, 700, 700, 701, 26, 26, 702, 702, 702, 702, 702, 702, 702, 703, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 704, 704, 704, 704, 704, 705, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 706, 706, 706, 706, 706, 707, + 26, 26, 26, 26, 26, 26, 26, 26, 708, 708, 708, 709, 708, 708, 710, 711, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 172, 712, 170, 172, + 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, + 713, 713, 713, 713, 713, 713, 713, 713, 714, 713, 715, 26, 26, 26, 26, 26, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 717, 716, 718, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 355, 0, + 0, 0, 0, 0, 0, 0, 369, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 355, 0, 0, 0, 0, 0, 0, 275, 26, 26, 26, 26, 26, 26, 26, 26, + 719, 31, 31, 31, 720, 721, 722, 723, 724, 725, 720, 726, 720, 722, 722, 727, + 31, 728, 31, 729, 730, 728, 31, 729, 26, 26, 26, 26, 26, 26, 731, 26, + 0, 0, 0, 0, 0, 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 352, 26, 0, 258, 355, 0, 355, 0, 355, 0, 0, 0, 275, 26, + 0, 0, 0, 0, 0, 275, 26, 26, 26, 26, 26, 26, 732, 0, 0, 0, + 733, 26, 0, 0, 0, 0, 0, 352, 0, 668, 260, 26, 275, 26, 26, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 734, 0, 369, 0, 369, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, 352, 668, 26, + 0, 352, 0, 0, 0, 0, 0, 0, 0, 26, 0, 260, 0, 0, 0, 0, + 0, 26, 0, 0, 0, 275, 0, 352, 260, 26, 0, 668, 26, 26, 26, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 275, 0, 369, + 0, 735, 0, 0, 0, 0, 0, 0, 258, 736, 0, 737, 0, 367, 0, 668, + 0, 0, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 26, 26, 26, 26, + 276, 276, 276, 279, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 279, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 738, 26, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 279, 26, 26, 26, 26, + 276, 276, 276, 279, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 739, 276, 276, 276, 276, 276, 276, + 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 342, + 740, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 939, 940, 941, 942, 946, 948, 0, 962, 969, 970, 971, 976,1001,1002,1003,1008, 0,1033,1040,1041,1042,1043,1047, 0, 0,1080,1081,1082,1086,1110, 0, 0, @@ -2840,8 +2688,7 @@ 789, 928, 792, 95, 796, 797, 798, 800, 96, 929, 802, 804, 806, 97, 98, 807, 930, 99, 931, 932, 933, 814, 100, 816, 817, 818, 819, 820, 821, 935, 0, 0, }; -static const int16_t -_hb_ucd_i16[196] = +static const int16_t _hb_ucd_i16[196]= { 0, 0, 0, 0, 1, -1, 0, 0, 2, 0, -2, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, 16, 0, 0, 0, -16, 0, 0, 1, -1, @@ -2858,47 +2705,42 @@ -1, 0, 1, -1, }; -static inline uint_fast8_t -_hb_ucd_gc (unsigned u) +static inline uint8_t _hb_ucd_gc (unsigned u) { - return u<1114110u?_hb_ucd_u8[6472+(((_hb_ucd_u8[816+(((_hb_ucd_u16[((_hb_ucd_u8[272+(((_hb_ucd_u8[u>>1>>3>>4>>4])<<4)+((u>>1>>3>>4)&15u))])<<4)+((u>>1>>3)&15u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2; + return u<1114110 ? _hb_ucd_u8[7920u+((_hb_ucd_u8[2176u+((_hb_ucd_u16[((_hb_ucd_u8[((((((u)>>1))>>3))>>5)])<<5)+((((((u)>>1))>>3))&31)])<<3)+((((u)>>1))&7)])<<1)+((u)&1)] : 2; } -static inline uint_fast8_t -_hb_ucd_ccc (unsigned u) +static inline uint8_t _hb_ucd_ccc (unsigned u) { - return u<125259u?_hb_ucd_u8[8504+(((_hb_ucd_u8[7936+(((_hb_ucd_u8[7460+(((_hb_ucd_u8[7100+(((_hb_ucd_u8[6854+(u>>2>>2>>2>>3)])<<3)+((u>>2>>2>>2)&7u))])<<2)+((u>>2>>2)&3u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:0; + return u<125259 ? _hb_ucd_u8[10388u+((_hb_ucd_u8[9284u+((_hb_ucd_u8[8548u+((_hb_ucd_u8[8302u+((((((u)>>2))>>3))>>4)])<<4)+((((((u)>>2))>>3))&15)])<<3)+((((u)>>2))&7)])<<2)+((u)&3)] : 0; } -static inline unsigned -_hb_ucd_b4 (const uint8_t* a, unsigned i) +static inline uint8_t _hb_ucd_b4 (const uint8_t* a, unsigned i) { - return (a[i>>1]>>((i&1u)<<2))&15u; + return (a[i>>1]>>((i&1)<<2))&15; } -static inline int_fast16_t -_hb_ucd_bmg (unsigned u) +static inline int16_t _hb_ucd_bmg (unsigned u) { - return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[9252+(((_hb_ucd_u8[9132+(((_hb_ucd_b4(9004+_hb_ucd_u8,u>>2>>3>>3))<<3)+((u>>2>>3)&7u))])<<3)+((u>>2)&7u))])<<2)+((u)&3u)]:0; + return u<65380 ? _hb_ucd_i16[((_hb_ucd_u8[11140u+((_hb_ucd_u8[11020u+((_hb_ucd_b4(_hb_ucd_u8+10892u,((((((u)>>2))>>3))>>3)))<<3)+((((((u)>>2))>>3))&7)])<<3)+((((u)>>2))&7)])<<2)+((u)&3)] : 0; } -static inline uint_fast8_t -_hb_ucd_sc (unsigned u) +static inline uint8_t _hb_ucd_sc (unsigned u) { - return u<918000u?_hb_ucd_u8[10486+(((_hb_ucd_u16[3744+(((_hb_ucd_u16[2624+(((_hb_ucd_u8[9588+(u>>3>>3>>4)])<<4)+((u>>3>>3)&15u))])<<3)+((u>>3)&7u))])<<3)+((u)&7u))]:2; + return u<918000 ? _hb_ucd_u8[12662u+((_hb_ucd_u16[3328u+((_hb_ucd_u8[11926u+((_hb_ucd_u8[11476u+((((((u)>>3))>>4))>>4)])<<4)+((((((u)>>3))>>4))&15)])<<4)+((((u)>>3))&15)])<<3)+((u)&7)] : 2; } -static inline uint_fast16_t -_hb_ucd_dm (unsigned u) +static inline uint16_t _hb_ucd_dm (unsigned u) { - return u<195102u?_hb_ucd_u16[6976+(((_hb_ucd_u8[16716+(((_hb_ucd_u8[16334+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0; + return u<195102 ? _hb_ucd_u16[7408u+((_hb_ucd_u8[18972u+((_hb_ucd_u8[18590u+((((u)>>4))>>5)])<<5)+((((u)>>4))&31)])<<4)+((u)&15)] : 0; } #elif !defined(HB_NO_UCD_UNASSIGNED) -static const uint8_t -_hb_ucd_u8[17524] = +#include <stdint.h> + +static const uint8_t _hb_ucd_u8[14800]= { 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 5, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 17, 15, 18, 19, 20, 21, 22, 23, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 24, 25, 26, 5, 27, 28, - 5, 29, 30, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 5, 29, 5, 30, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, @@ -2929,23 +2771,23 @@ 17, 17, 17,103, 17, 17,104,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, 100,105,100,100,100,100,100,100, 17, 17,106,107,100,108,109,110, - 17, 17, 17, 17, 17, 17, 17,111, 17, 17, 17, 17,112,113,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,114, - 17,115,116,100,100,100,100,100,100,100,100,100,117,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,118, 39,119,120, - 121,122,123,124,125,126,127,128, 39, 39,129,100,100,100,100,130, - 131,132,133,100,134,135,100,136,137,138,100,100,139,140,141,100, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,111,112,100,100, + 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,113, + 17,114,115,100,100,100,100,100,100,100,100,100,116,100,100,100, + 100,100,100,100,100,100,100,100,100,100,100,100,117, 39,118,119, + 120,121,122,123,124,125,126,127, 39, 39,128,100,100,100,100,129, + 130,131,132,100,133,134,135,136,137,138,100,100,139,140,141,100, 142,143,144,145, 39, 39,146,147,148, 39,149,150,100,100,100,100, 17, 17, 17, 17, 17, 17,151, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17,152,153, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,154, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,155, 17, 17,156,100, - 100,100,100,100,100,100,100,100, 17, 17,157,100,100,100,100,100, - 17, 17, 17,158, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17,159,100,100,100,100,100,100,100,100,100,100,100,100, - 160,161,100,100,100,100,100,100,100,100,100,100,100,100,100,100, + 17, 17, 17, 17, 17, 17, 17, 17,152, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,153, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,154, 17, 17,155,100, + 100,100,100,100,100,100,100,100, 17, 17,156,100,100,100,100,100, + 17, 17, 17,157, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17,158,100,100,100,100,100,100,100,100,100,100,100, + 159,160,100,100,100,100,100,100,100,100,100,100,100,100,100,100, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,161, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,162, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,163, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2, 7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, @@ -2959,409 +2801,415 @@ 34, 11, 34, 34, 32, 35, 32, 16, 36, 36, 37, 34, 38, 37, 34, 34, 34, 34, 34, 34, 34, 34, 16, 32, 34, 38, 32, 11, 32, 32, 32, 32, 32, 32, 16, 16, 16, 11, 34, 32, 34, 34, 11, 32, 32, 32, 32, 32, - 16, 16, 39, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 41, 41, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, - 40, 40, 42, 41, 41, 41, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, - 43, 43, 43, 43, 43, 43, 43, 43, 32, 32, 42, 32, 44, 45, 16, 10, - 44, 44, 41, 46, 11, 47, 47, 11, 34, 11, 11, 11, 11, 11, 11, 11, - 11, 48, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, - 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 49, 34, 32, 34, 11, - 32, 50, 43, 43, 51, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16, - 48, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 47, 52, 2, 2, 2, - 16, 16, 16, 16, 53, 54, 55, 56, 57, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 58, 59, 60, 43, 59, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, 62, - 36, 63, 64, 44, 44, 44, 44, 44, 65, 65, 65, 8, 9, 66, 2, 67, - 43, 43, 43, 43, 43, 60, 68, 2, 69, 36, 36, 36, 36, 70, 43, 43, - 7, 7, 7, 7, 7, 2, 2, 36, 71, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 72, 43, 43, 43, 73, 50, 43, 43, 74, 75, 76, 43, 43, 36, - 7, 7, 7, 7, 7, 36, 77, 78, 2, 2, 2, 2, 2, 2, 2, 79, - 70, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 80, 62, 36, - 36, 36, 36, 43, 43, 43, 43, 43, 71, 44, 44, 44, 44, 44, 44, 44, - 7, 7, 7, 7, 7, 36, 36, 36, 36, 36, 36, 36, 36, 70, 43, 43, - 43, 43, 40, 21, 2, 81, 57, 20, 36, 36, 36, 43, 43, 75, 43, 43, - 43, 43, 75, 43, 75, 43, 43, 44, 2, 2, 2, 2, 2, 2, 2, 64, - 36, 36, 36, 36, 70, 43, 44, 64, 36, 36, 36, 36, 36, 61, 44, 44, - 36, 36, 36, 36, 82, 36, 36, 61, 65, 44, 44, 57, 43, 43, 43, 43, - 36, 36, 36, 36, 83, 43, 43, 43, 43, 84, 43, 43, 43, 43, 43, 43, - 43, 85, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 85, 71, 86, - 87, 43, 43, 43, 85, 86, 87, 86, 70, 43, 43, 43, 36, 36, 36, 36, - 36, 43, 2, 7, 7, 7, 7, 7, 88, 36, 36, 36, 36, 36, 36, 36, - 70, 86, 62, 36, 36, 36, 61, 62, 61, 62, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 61, 36, 36, 36, 61, 61, 44, 36, 36, 44, 71, 86, - 87, 43, 80, 89, 90, 89, 87, 61, 44, 44, 44, 89, 44, 44, 36, 62, - 36, 43, 44, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 56, 63, 80, - 57, 85, 62, 36, 36, 61, 44, 62, 61, 36, 62, 61, 36, 44, 80, 86, - 87, 80, 44, 57, 80, 57, 43, 44, 57, 44, 44, 44, 62, 36, 61, 61, - 44, 44, 44, 7, 7, 7, 7, 7, 43, 36, 70, 64, 44, 44, 44, 44, - 57, 85, 62, 36, 36, 36, 36, 62, 36, 62, 36, 36, 36, 36, 36, 36, - 61, 36, 62, 36, 36, 44, 71, 86, 87, 43, 43, 57, 85, 89, 87, 44, - 61, 44, 44, 44, 44, 44, 44, 44, 66, 44, 44, 44, 62, 43, 43, 43, - 57, 86, 62, 36, 36, 36, 61, 62, 61, 36, 62, 36, 36, 44, 71, 87, - 87, 43, 80, 89, 90, 89, 87, 44, 44, 44, 57, 85, 44, 44, 36, 62, - 78, 27, 27, 27, 44, 44, 44, 44, 44, 71, 62, 36, 36, 61, 44, 36, - 61, 36, 36, 44, 62, 61, 61, 36, 44, 62, 61, 44, 36, 61, 44, 36, - 36, 36, 36, 36, 36, 44, 44, 86, 85, 90, 44, 86, 90, 86, 87, 44, - 61, 44, 44, 89, 44, 44, 44, 44, 27, 91, 67, 67, 56, 92, 44, 44, - 85, 86, 71, 36, 36, 36, 61, 36, 61, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 44, 71, 43, 85, 86, 90, 43, 80, 43, 43, 44, - 44, 44, 57, 80, 36, 61, 62, 44, 44, 44, 44, 93, 27, 27, 27, 91, - 70, 86, 72, 36, 36, 36, 61, 36, 36, 36, 62, 36, 36, 44, 71, 87, - 86, 86, 90, 85, 90, 86, 43, 44, 44, 44, 89, 90, 44, 44, 62, 61, - 62, 94, 44, 44, 44, 44, 44, 44, 43, 86, 36, 36, 36, 36, 61, 36, - 36, 36, 36, 36, 36, 70, 71, 86, 87, 43, 80, 86, 90, 86, 87, 77, - 44, 44, 36, 94, 27, 27, 27, 95, 27, 27, 27, 27, 91, 36, 36, 36, - 57, 86, 62, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, 36, 36, 36, - 36, 62, 36, 36, 36, 36, 62, 44, 36, 36, 36, 61, 44, 80, 44, 89, - 86, 43, 80, 80, 86, 86, 86, 86, 44, 86, 64, 44, 44, 44, 44, 44, - 62, 36, 36, 36, 36, 36, 36, 36, 70, 36, 43, 43, 43, 80, 44, 96, - 36, 36, 36, 75, 43, 43, 43, 60, 7, 7, 7, 7, 7, 2, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 62, 61, 61, 36, 36, 61, 36, 36, - 36, 36, 62, 62, 36, 36, 36, 36, 70, 36, 43, 43, 43, 43, 71, 44, - 36, 36, 61, 81, 43, 43, 43, 80, 7, 7, 7, 7, 7, 44, 36, 36, - 77, 67, 2, 2, 2, 2, 2, 2, 2, 97, 97, 67, 43, 67, 67, 67, - 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 50, 50, 50, 4, 4, 86, - 36, 36, 36, 36, 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, - 57, 43, 43, 43, 43, 43, 43, 85, 43, 43, 60, 43, 36, 36, 70, 43, - 43, 43, 43, 43, 57, 43, 43, 43, 43, 43, 43, 43, 43, 43, 80, 67, - 67, 67, 67, 76, 67, 67, 92, 67, 2, 2, 97, 67, 21, 64, 44, 44, - 36, 36, 36, 36, 36, 94, 87, 43, 85, 43, 43, 43, 87, 85, 87, 71, - 7, 7, 7, 7, 7, 2, 2, 2, 36, 36, 36, 86, 43, 36, 36, 43, - 71, 86, 98, 94, 86, 86, 86, 36, 70, 43, 71, 36, 36, 36, 36, 36, - 36, 85, 87, 85, 86, 86, 87, 94, 7, 7, 7, 7, 7, 86, 87, 67, - 11, 11, 11, 48, 44, 44, 48, 44, 16, 16, 16, 16, 16, 53, 45, 16, - 36, 36, 36, 36, 61, 36, 36, 44, 36, 36, 36, 61, 61, 36, 36, 44, - 61, 36, 36, 44, 36, 36, 36, 61, 61, 36, 36, 44, 36, 36, 36, 36, - 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 57, 43, - 2, 2, 2, 2, 99, 27, 27, 27, 27, 27, 27, 27, 27, 27,100, 44, - 67, 67, 67, 67, 67, 44, 44, 44, 11, 11, 11, 44, 16, 16, 16, 44, - 101, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 72, - 102, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,103,104, 44, - 36, 36, 36, 36, 36, 63, 2,105,106, 36, 36, 36, 61, 44, 44, 44, - 36, 43, 85, 44, 44, 44, 44, 62, 36, 43,107, 64, 44, 44, 44, 44, - 36, 43, 44, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 61, 36, - 61, 43, 44, 44, 44, 44, 44, 44, 36, 36, 43, 87, 43, 43, 43, 86, - 86, 86, 86, 85, 87, 43, 43, 43, 43, 43, 2, 88, 2, 66, 70, 44, - 7, 7, 7, 7, 7, 44, 44, 44, 27, 27, 27, 27, 27, 44, 44, 44, - 2, 2, 2,108, 2, 59, 43, 84, 36, 83, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 61, 44, 44, 44, 36, 36, 70, 71, 36, 36, 36, 36, - 36, 36, 36, 36, 70, 61, 44, 44, 36, 36, 36, 44, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 36, 36, 61, 43, 85, 86, 87, 85, 86, 44, 44, - 86, 85, 86, 86, 87, 43, 44, 44, 92, 44, 2, 7, 7, 7, 7, 7, - 36, 36, 36, 36, 36, 36, 36, 44, 36, 36, 61, 44, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 36, 44, 44, 36, 36, 36, 36, 36, 44, 44, 44, - 7, 7, 7, 7, 7,100, 44, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 36, 36, 36, 70, 85, 87, 44, 2, 36, 36, 94, 85, 43, 43, 43, 80, - 85, 85, 87, 43, 43, 43, 85, 86, 86, 87, 43, 43, 43, 43, 80, 57, - 2, 2, 2, 88, 2, 2, 2, 44, 43, 43, 43, 43, 43, 43, 43,109, - 43, 43, 43, 43, 43, 43, 43, 80, 43, 43, 98, 36, 36, 36, 36, 36, - 36, 36, 85, 43, 43, 85, 85, 86, 86, 85, 98, 36, 36, 36, 61, 2, - 97, 67, 67, 67, 67, 50, 43, 43, 43, 43, 67, 67, 67, 67, 21, 2, - 43, 98, 36, 36, 36, 36, 36, 36, 94, 43, 43, 86, 43, 87, 43, 36, - 36, 36, 36, 85, 43, 86, 87, 87, 43, 86, 44, 44, 44, 44, 2, 2, - 36, 36, 86, 86, 86, 86, 43, 43, 43, 43, 86, 43, 44, 93, 2, 2, - 7, 7, 7, 7, 7, 44, 62, 36, 36, 36, 36, 36, 40, 40, 40, 2, - 16, 16, 16, 16, 34,110, 44, 44, 11, 11, 11, 11, 11, 47, 48, 11, - 2, 2, 2, 2, 44, 44, 44, 44, 43, 60, 43, 43, 43, 43, 43, 43, - 85, 43, 43, 43, 71, 36, 70, 36, 36, 36, 71, 94, 43, 61, 44, 44, - 16, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 45, 16, 16, - 16, 16, 16, 16, 45, 16, 16, 16, 16, 16, 16, 16, 16,111, 40, 40, - 32, 32, 32, 16, 16, 16, 16, 32, 16, 16, 16, 16, 11, 11, 11, 11, - 16, 16, 16, 44, 11, 11, 11, 44, 16, 16, 16, 16, 48, 48, 48, 48, - 16, 16, 16, 16, 16, 16, 16, 44, 16, 16, 16, 16,112,112,112,112, - 16, 16,110, 16, 11, 11,113,114, 41, 16,110, 16, 11, 11,113, 41, - 16, 16, 44, 16, 11, 11,115, 41, 16, 16, 16, 16, 11, 11,116, 41, - 44, 16,110, 16, 11, 11,113,117,118,118,118,118,118,119, 65, 65, - 120,120,120, 2,121,122,121,122, 2, 2, 2, 2,123, 65, 65,124, - 2, 2, 2, 2,125,126, 2,127,128, 2,129,130, 2, 2, 2, 2, - 2, 9,128, 2, 2, 2, 2,131, 65, 65,132, 65, 65, 65, 65, 65, - 133, 44, 27, 27, 27, 8,129,134, 27, 27, 27, 27, 27, 8,129,104, - 40, 40, 40, 40, 40, 40, 81, 44, 20, 20, 20, 20, 20, 20, 20, 20, - 135, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43,136, 51, - 109, 51,109, 43, 43, 43, 43, 43, 80, 44, 44, 44, 44, 44, 44, 44, - 67,137, 67,138, 67, 34, 11, 16, 11, 32,138, 67, 49, 11, 11, 67, - 67, 67,137,137,137, 11, 11,139, 11, 11, 35, 36, 39, 67, 16, 11, - 8, 8, 49, 16, 16, 26, 67,140, 27, 27, 27, 27, 27, 27, 27, 27, - 105,105,105,105,105,105,105,105,105,141,142,105,143, 67, 44, 44, - 8, 8,144, 67, 67, 8, 67, 67,144, 26, 67,144, 67, 67, 67,144, - 67, 67, 67, 67, 67, 67, 67, 8, 67,144,144, 67, 67, 67, 67, 67, - 67, 67, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 67, 67, 67, 67, 4, 4, 67, 67, 8, 67, 67, 67,145,146, 67, 67, - 67, 67, 67, 67, 67, 67,144, 67, 67, 67, 67, 67, 67, 26, 8, 8, - 8, 8, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 8, 8, - 8, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 92, 44, 44, - 27, 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67, 67, 27, 27, 27, - 67, 67, 67, 26, 67, 67, 67, 67, 26, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 8, 8, 8, 8, 67, 67, 67, 67, 67, 67, 67, 26, - 67, 67, 67, 67, 4, 4, 4, 4, 4, 4, 4, 27, 27, 27, 27, 27, - 27, 27, 67, 67, 67, 67, 67, 67, 8, 8,129,147, 8, 8, 8, 8, - 8, 8, 8, 4, 4, 4, 4, 4, 8,129,148,148,148,148,148,148, - 148,148,148,148,147, 8, 8, 8, 8, 8, 8, 8, 4, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 4, 8, 8, 8,144, 26, 8, 8,144, 67, - 67, 67, 44, 67, 67, 67, 67, 67, 67, 67, 67, 55, 67, 67, 67, 67, - 32, 11, 32, 34, 34, 34, 34, 11, 32, 32, 34, 16, 16, 16, 40, 11, - 32, 32,140, 67, 67,138, 34,149, 43, 32, 44, 44, 93, 2, 99, 2, - 16, 16, 16,150, 44, 44,150, 44, 36, 36, 36, 36, 44, 44, 44, 52, - 64, 44, 44, 44, 44, 44, 44, 57, 36, 36, 36, 61, 44, 44, 44, 44, - 36, 36, 36, 61, 36, 36, 36, 61, 2,121,121, 2,125,126,121, 2, - 2, 2, 2, 6, 2,108,121, 2,121, 4, 4, 4, 4, 2, 2, 88, - 2, 2, 2, 2, 2,120, 2, 2,108,151, 2, 2, 2, 2, 2, 2, - 67, 2,152,148,148,148,153, 44, 67, 67, 67, 67, 67, 55, 67, 67, - 67, 67, 44, 44, 44, 44, 44, 44, 67, 67, 67, 44, 44, 44, 44, 44, - 1, 2,154,155, 4, 4, 4, 4, 4, 67, 4, 4, 4, 4,156,157, - 158,105,105,105,105, 43, 43, 86,159, 40, 40, 67,105,160, 63, 67, - 36, 36, 36, 61, 57,161,162, 69, 36, 36, 36, 36, 36, 63, 40, 69, - 44, 44, 62, 36, 36, 36, 36, 36, 67, 27, 27, 67, 67, 67, 67, 67, - 67, 67, 67, 44, 44, 44, 44, 55, 67, 67, 67, 67, 67, 67, 67, 92, - 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67, 67, 27, 27, 27, 27, - 163, 27, 27, 27, 27, 27, 27, 27, 36, 36, 83, 36, 36, 36, 36, 36, - 67, 67, 67, 92, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36,164, 2, - 7, 7, 7, 7, 7, 36, 44, 44, 32, 32, 32, 32, 32, 32, 32, 70, - 51,165, 43, 43, 43, 43, 43, 88, 32, 32, 32, 32, 32, 32, 40, 43, - 36, 36, 36,105,105,105,105,105, 43, 2, 2, 2, 44, 44, 44, 44, - 41, 41, 41,162, 40, 40, 40, 40, 41, 32, 32, 32, 32, 32, 32, 32, - 16, 32, 32, 32, 32, 32, 32, 32, 45, 16, 16, 16, 34, 34, 34, 32, - 32, 32, 32, 32, 42,166, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32, + 16, 16, 36, 16, 16, 16, 16, 16, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 40, 40, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, + 39, 39, 41, 40, 40, 40, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, + 42, 42, 42, 42, 42, 42, 42, 42, 32, 32, 41, 32, 43, 44, 16, 10, + 43, 43, 40, 45, 11, 46, 46, 11, 34, 11, 11, 11, 11, 11, 11, 11, + 11, 47, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, + 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 48, 34, 32, 34, 11, + 32, 49, 42, 42, 50, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16, + 47, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 46, 51, 2, 2, 2, + 16, 16, 16, 16, 52, 53, 54, 55, 56, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 57, 58, 59, 42, 58, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 43, 61, + 36, 62, 63, 43, 43, 43, 43, 43, 64, 64, 64, 8, 9, 65, 2, 66, + 42, 42, 42, 42, 42, 59, 67, 2, 68, 36, 36, 36, 36, 69, 42, 42, + 7, 7, 7, 7, 7, 2, 2, 36, 70, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 71, 42, 42, 42, 72, 49, 42, 42, 73, 74, 75, 42, 42, 36, + 7, 7, 7, 7, 7, 36, 76, 77, 2, 2, 2, 2, 2, 2, 2, 78, + 69, 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, 42, 42, 79, 61, 36, + 36, 36, 36, 42, 42, 42, 42, 42, 70, 43, 43, 43, 43, 43, 43, 43, + 7, 7, 7, 7, 7, 36, 36, 36, 36, 36, 36, 36, 36, 69, 42, 42, + 42, 42, 39, 21, 2, 80, 56, 20, 36, 36, 36, 42, 42, 74, 42, 42, + 42, 42, 74, 42, 74, 42, 42, 43, 2, 2, 2, 2, 2, 2, 2, 63, + 36, 36, 36, 36, 69, 42, 43, 63, 36, 36, 36, 36, 36, 60, 43, 43, + 36, 36, 36, 36, 81, 36, 36, 36, 64, 43, 43, 56, 42, 42, 42, 42, + 36, 36, 36, 36, 82, 42, 42, 42, 42, 83, 42, 42, 42, 42, 42, 42, + 42, 84, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 84, 70, 85, + 86, 42, 42, 42, 84, 85, 86, 85, 69, 42, 42, 42, 36, 36, 36, 36, + 36, 42, 2, 7, 7, 7, 7, 7, 87, 36, 36, 36, 36, 36, 36, 36, + 69, 85, 61, 36, 36, 36, 60, 61, 60, 61, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 60, 36, 36, 36, 60, 60, 43, 36, 36, 43, 70, 85, + 86, 42, 79, 88, 89, 88, 86, 60, 43, 43, 43, 88, 43, 43, 36, 61, + 36, 42, 43, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 55, 62, 79, + 56, 84, 61, 36, 36, 60, 43, 61, 60, 36, 61, 60, 36, 43, 79, 85, + 86, 79, 43, 56, 79, 56, 42, 43, 56, 43, 43, 43, 61, 36, 60, 60, + 43, 43, 43, 7, 7, 7, 7, 7, 42, 36, 69, 63, 43, 43, 43, 43, + 56, 84, 61, 36, 36, 36, 36, 61, 36, 61, 36, 36, 36, 36, 36, 36, + 60, 36, 61, 36, 36, 43, 70, 85, 86, 42, 42, 56, 84, 88, 86, 43, + 60, 43, 43, 43, 43, 43, 43, 43, 65, 43, 43, 43, 61, 42, 42, 42, + 56, 85, 61, 36, 36, 36, 60, 61, 60, 36, 61, 36, 36, 43, 70, 86, + 86, 42, 79, 88, 89, 88, 86, 43, 43, 43, 56, 84, 43, 43, 36, 61, + 77, 27, 27, 27, 43, 43, 43, 43, 43, 70, 61, 36, 36, 60, 43, 36, + 60, 36, 36, 43, 61, 60, 60, 36, 43, 61, 60, 43, 36, 60, 43, 36, + 36, 36, 36, 36, 36, 43, 43, 85, 84, 89, 43, 85, 89, 85, 86, 43, + 60, 43, 43, 88, 43, 43, 43, 43, 27, 90, 66, 66, 55, 91, 43, 43, + 84, 85, 70, 36, 36, 36, 60, 36, 60, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 43, 70, 42, 84, 85, 89, 42, 79, 42, 42, 43, + 43, 43, 56, 79, 36, 60, 36, 43, 43, 43, 43, 92, 27, 27, 27, 90, + 69, 85, 71, 36, 36, 36, 60, 36, 36, 36, 61, 36, 36, 43, 70, 86, + 85, 85, 89, 84, 89, 85, 42, 43, 43, 43, 88, 89, 43, 43, 36, 60, + 61, 93, 43, 43, 43, 43, 43, 43, 42, 85, 36, 36, 36, 36, 60, 36, + 36, 36, 36, 36, 36, 69, 70, 85, 86, 42, 79, 85, 89, 85, 86, 76, + 43, 43, 36, 93, 27, 27, 27, 94, 27, 27, 27, 27, 90, 36, 36, 36, + 56, 85, 61, 36, 36, 36, 36, 36, 36, 36, 36, 60, 43, 36, 36, 36, + 36, 61, 36, 36, 36, 36, 61, 43, 36, 36, 36, 60, 43, 79, 43, 88, + 85, 42, 79, 79, 85, 85, 85, 85, 43, 85, 63, 43, 43, 43, 43, 43, + 61, 36, 36, 36, 36, 36, 36, 36, 69, 36, 42, 42, 42, 79, 43, 95, + 36, 36, 36, 74, 42, 42, 42, 59, 7, 7, 7, 7, 7, 2, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 61, 60, 60, 36, 36, 60, 36, 36, + 36, 36, 61, 61, 36, 36, 36, 36, 69, 36, 42, 42, 42, 42, 70, 43, + 36, 36, 60, 80, 42, 42, 42, 79, 7, 7, 7, 7, 7, 43, 36, 36, + 76, 66, 2, 2, 2, 2, 2, 2, 2, 96, 96, 66, 42, 66, 66, 66, + 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 49, 49, 49, 4, 4, 85, + 36, 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 43, + 56, 42, 42, 42, 42, 42, 42, 84, 42, 42, 59, 42, 36, 36, 69, 42, + 42, 42, 42, 42, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 79, 66, + 66, 66, 66, 75, 66, 66, 91, 66, 2, 2, 96, 66, 21, 63, 43, 43, + 36, 36, 36, 36, 36, 93, 86, 42, 84, 42, 42, 42, 86, 84, 86, 70, + 7, 7, 7, 7, 7, 2, 2, 2, 36, 36, 36, 85, 42, 36, 36, 42, + 70, 85, 97, 93, 85, 85, 85, 36, 69, 42, 70, 36, 36, 36, 36, 36, + 36, 84, 86, 84, 85, 85, 86, 93, 7, 7, 7, 7, 7, 85, 86, 66, + 11, 11, 11, 47, 43, 43, 47, 43, 16, 16, 16, 16, 16, 52, 44, 16, + 36, 36, 36, 36, 60, 36, 36, 43, 36, 36, 36, 60, 60, 36, 36, 43, + 60, 36, 36, 43, 36, 36, 36, 60, 60, 36, 36, 43, 36, 36, 36, 36, + 36, 36, 36, 60, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 56, 42, + 2, 2, 2, 2, 98, 27, 27, 27, 27, 27, 27, 27, 27, 27, 99, 43, + 66, 66, 66, 66, 66, 43, 43, 43, 11, 11, 11, 43, 16, 16, 16, 43, + 100, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 76, 71, + 101, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,102,103, 43, + 36, 36, 36, 36, 36, 62, 2,104,105, 36, 36, 36, 60, 43, 43, 43, + 36, 42, 84, 43, 43, 43, 43, 61, 36, 42,106, 63, 43, 43, 43, 43, + 36, 42, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36, 60, 36, + 60, 42, 43, 43, 43, 43, 43, 43, 36, 36, 42, 86, 42, 42, 42, 85, + 85, 85, 85, 84, 86, 42, 42, 42, 42, 42, 2, 87, 2, 65, 69, 43, + 7, 7, 7, 7, 7, 43, 43, 43, 27, 27, 27, 27, 27, 43, 43, 43, + 2, 2, 2,107, 2, 58, 42, 83, 36, 82, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 60, 43, 43, 43, 36, 36, 69, 70, 36, 36, 36, 36, + 36, 36, 36, 36, 69, 60, 43, 43, 36, 36, 36, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 60, 42, 84, 85, 86, 84, 85, 43, 43, + 85, 84, 85, 85, 86, 42, 43, 43, 91, 43, 2, 7, 7, 7, 7, 7, + 36, 36, 36, 36, 36, 36, 36, 43, 36, 36, 60, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 43, 43, 36, 36, 36, 36, 36, 43, 43, 43, + 7, 7, 7, 7, 7, 99, 43, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 36, 36, 36, 69, 84, 86, 43, 2, 36, 36, 93, 84, 42, 42, 42, 79, + 84, 84, 86, 42, 42, 42, 84, 85, 85, 86, 42, 42, 42, 42, 79, 56, + 2, 2, 2, 87, 2, 2, 2, 43, 42, 42, 42, 42, 42, 42, 42,108, + 42, 42, 42, 42, 42, 42, 42, 43, 42, 42, 42, 42, 42, 42, 43, 43, + 42, 42, 97, 36, 36, 36, 36, 36, 36, 36, 84, 42, 42, 84, 84, 85, + 85, 84, 97, 36, 36, 36, 60, 2, 96, 66, 66, 66, 66, 49, 42, 42, + 42, 42, 66, 66, 66, 66, 21, 2, 42, 97, 36, 36, 36, 36, 36, 36, + 93, 42, 42, 85, 42, 86, 42, 36, 36, 36, 36, 84, 42, 85, 86, 86, + 42, 85, 43, 43, 43, 43, 2, 2, 36, 36, 85, 85, 85, 85, 42, 42, + 42, 42, 85, 42, 43, 92, 2, 2, 7, 7, 7, 7, 7, 43, 61, 36, + 36, 36, 36, 36, 39, 39, 39, 2, 16, 16, 16, 16, 34,109, 43, 43, + 11, 11, 11, 11, 11, 46, 47, 11, 2, 2, 2, 2, 43, 43, 43, 43, + 42, 59, 42, 42, 42, 42, 42, 42, 84, 42, 42, 42, 70, 36, 69, 36, + 36, 36, 70, 93, 42, 60, 43, 43, 16, 16, 16, 16, 16, 16, 39, 39, + 39, 39, 39, 39, 39, 44, 16, 16, 16, 16, 16, 16, 44, 16, 16, 16, + 16, 16, 16, 16, 16,110, 39, 39, 32, 32, 32, 16, 16, 16, 16, 32, + 16, 16, 16, 16, 11, 11, 11, 11, 16, 16, 16, 43, 11, 11, 11, 43, + 16, 16, 16, 16, 47, 47, 47, 47, 16, 16, 16, 16, 16, 16, 16, 43, + 16, 16, 16, 16,111,111,111,111, 16, 16,109, 16, 11, 11,112,113, + 40, 16,109, 16, 11, 11,112, 40, 16, 16, 43, 16, 11, 11,114, 40, + 16, 16, 16, 16, 11, 11,115, 40, 43, 16,109, 16, 11, 11,112,116, + 117,117,117,117,117,118, 64, 64,119,119,119, 2,120,121,120,121, + 2, 2, 2, 2,122, 64, 64,123, 2, 2, 2, 2,124,125, 2,126, + 127, 2,128,129, 2, 2, 2, 2, 2, 9,127, 2, 2, 2, 2,130, + 64, 64,131, 64, 64, 64, 64, 64,132, 43, 27, 27, 27, 8,128,133, + 27, 27, 27, 27, 27, 8,128,103, 39, 39, 39, 39, 39, 39, 80, 43, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 43, 43, 43, 43, 43, 43, 43, + 42, 42, 42, 42, 42, 42,134, 50,108, 50,108, 42, 42, 42, 42, 42, + 79, 43, 43, 43, 43, 43, 43, 43, 66,135, 66,136, 66, 34, 11, 16, + 11, 32,136, 66, 48, 11, 11, 66, 66, 66,135,135,135, 11, 11,137, + 11, 11, 35, 36,138, 66, 16, 11, 8, 8, 48, 16, 16, 26, 66,139, + 27, 27, 27, 27, 27, 27, 27, 27,104,104,104,104,104,104,104,104, + 104,140,141,104,142, 66, 43, 43, 8, 8,143, 66, 66, 8, 66, 66, + 143, 26, 66,143, 66, 66, 66,143, 66, 66, 66, 66, 66, 66, 66, 8, + 66,143,143, 66, 66, 66, 66, 66, 66, 66, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 66, 66, 66, 66, 4, 4, 66, 66, + 8, 66, 66, 66,144,145, 66, 66, 66, 66, 66, 66, 66, 66,143, 66, + 66, 66, 66, 66, 66, 26, 8, 8, 8, 8, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 8, 8, 8, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 91, 43, 43, 27, 27, 27, 27, 27, 27, 66, 66, + 66, 66, 66, 66, 66, 27, 27, 27, 66, 66, 66, 26, 66, 66, 66, 66, + 26, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 8, 8, 8, 8, + 66, 66, 66, 66, 66, 66, 66, 26, 66, 66, 66, 66, 4, 4, 4, 4, + 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 66, 66, 66, 66, 66, 66, + 8, 8,128,146, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, + 8,128,147,147,147,147,147,147,147,147,147,147,146, 8, 8, 8, + 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, + 8, 8,143, 26, 8, 8,143, 66, 66, 66, 43, 66, 66, 66, 66, 66, + 32, 11, 32, 34, 34, 34, 34, 11, 32, 32, 34, 16, 16, 16, 39, 11, + 32, 32,139, 66, 66,136, 34,148, 42, 32, 43, 43, 92, 2, 98, 2, + 16, 16, 16,149, 43, 43,149, 43, 36, 36, 36, 36, 43, 43, 43, 51, + 63, 43, 43, 43, 43, 43, 43, 56, 36, 36, 36, 60, 43, 43, 43, 43, + 36, 36, 36, 60, 36, 36, 36, 60, 2,120,120, 2,124,125,120, 2, + 2, 2, 2, 6, 2,107,120, 2,120, 4, 4, 4, 4, 2, 2, 87, + 2, 2, 2, 2, 2,119, 2, 2,107,150, 2, 2, 2, 2, 2, 2, + 66, 2,151,147,147,147,152, 43, 66, 66, 66, 66, 66, 54, 66, 66, + 66, 66, 43, 43, 43, 43, 43, 43, 66, 66, 66, 43, 43, 43, 43, 43, + 1, 2,153,154, 4, 4, 4, 4, 4, 66, 4, 4, 4, 4,155,156, + 157,104,104,104,104, 42, 42, 85,158, 39, 39, 66,104,159, 62, 66, + 36, 36, 36, 60, 56,160,161, 68, 36, 36, 36, 36, 36, 62, 39, 68, + 43, 43, 61, 36, 36, 36, 36, 36, 66, 27, 27, 66, 66, 66, 66, 66, + 66, 66, 66, 43, 43, 43, 43, 54, 66, 66, 66, 66, 66, 66, 66, 91, + 27, 27, 27, 27, 27, 66, 66, 66, 66, 66, 66, 66, 27, 27, 27, 27, + 162, 27, 27, 27, 27, 27, 27, 27, 36, 36, 82, 36, 36, 36, 36, 36, + 66, 66, 66, 91, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36,163, 2, + 7, 7, 7, 7, 7, 36, 43, 43, 32, 32, 32, 32, 32, 32, 32, 69, + 50,164, 42, 42, 42, 42, 42, 87, 32, 32, 32, 32, 32, 32, 39, 42, + 36, 36, 36,104,104,104,104,104, 42, 2, 2, 2, 43, 43, 43, 43, + 40, 40, 40,161, 39, 39, 39, 39, 40, 32, 32, 32, 32, 32, 32, 32, + 16, 32, 32, 32, 32, 32, 32, 32, 44, 16, 16, 16, 34, 34, 34, 32, + 32, 32, 32, 32, 41,165, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, 32, 11, 11, 32, 32, 32, 32, 32, 32, - 32, 32, 11, 11, 34, 34, 32, 44, 32,150,150, 32, 32, 32, 47, 44, - 44, 40,167, 35, 40, 35, 36, 36, 36, 71, 36, 71, 36, 70, 36, 36, - 36, 94, 87, 85, 67, 67, 80, 44, 27, 27, 27, 67,168, 44, 44, 44, - 36, 36, 2, 2, 44, 44, 44, 44, 86, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 86, 86, 86, 86, 86, 86, 86, 86, 43, 44, 44, 44, 44, 2, - 43, 36, 36, 36, 2, 72, 72, 70, 36, 36, 36, 43, 43, 43, 43, 2, - 36, 36, 36, 70, 43, 43, 43, 43, 43, 86, 44, 44, 44, 44, 44, 93, - 36, 70, 86, 43, 43, 86, 43, 86,107, 2, 2, 2, 2, 2, 2, 52, - 7, 7, 7, 7, 7, 44, 44, 2, 36, 36, 70, 69, 36, 36, 36, 36, - 7, 7, 7, 7, 7, 36, 36, 61, 36, 36, 36, 36, 70, 43, 43, 85, - 87, 85, 87, 80, 44, 44, 44, 44, 36, 70, 36, 36, 36, 36, 85, 44, - 7, 7, 7, 7, 7, 44, 2, 2, 69, 36, 36, 77, 67, 94, 85, 36, - 71, 43, 71, 70, 71, 36, 36, 43, 70, 61, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 62, 83, 2, 36, 36, 36, 36, 36, 94, 43, 86, - 2, 83,169, 80, 44, 44, 44, 44, 62, 36, 36, 61, 62, 36, 36, 61, - 62, 36, 36, 61, 44, 44, 44, 44, 16, 16, 16, 16, 16,114, 40, 40, - 16, 16, 16, 16,111, 41, 44, 44, 36, 94, 87, 86, 85,107, 87, 44, - 36, 36, 44, 44, 44, 44, 44, 44, 36, 36, 36, 61, 44, 62, 36, 36, - 170,170,170,170,170,170,170,170,171,171,171,171,171,171,171,171, - 16, 16, 16,110, 44, 44, 44, 44, 44,150, 16, 16, 44, 44, 62, 71, - 36, 36, 36, 36,172, 36, 36, 36, 36, 36, 36, 61, 36, 36, 61, 61, - 36, 62, 61, 36, 36, 36, 36, 36, 36, 41, 41, 41, 41, 41, 41, 41, - 41,117, 44, 44, 44, 44, 44, 44, 44, 62, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36,148, 44, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 44, 44, 44, 55, 36, 36, 36, 36, 36, 36,168, 67, - 2, 2, 2,152,130, 44, 44, 44, 6,173,174,148,148,148,148,148, - 148,148,130,152,130, 2,127,175, 2, 64, 2, 2,156,148,148,130, - 2,176, 8,177, 66, 2, 44, 44, 36, 36, 61, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 61, 79, 93, 2, 3, 2, 4, 5, 6, 2, - 16, 16, 16, 16, 16, 17, 18,129,130, 4, 2, 36, 36, 36, 36, 36, - 69, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40, - 44, 36, 36, 36, 44, 36, 36, 36, 44, 36, 36, 36, 44, 36, 61, 44, - 20,178, 56,135, 26, 8,144, 92, 44, 44, 44, 44, 79, 65, 67, 44, - 36, 36, 36, 36, 36, 36, 62, 36, 36, 36, 36, 36, 36, 61, 36, 62, - 2, 64, 44,179, 27, 27, 27, 27, 27, 27, 44, 55, 67, 67, 67, 67, - 105,105,143, 27, 91, 67, 67, 67, 67, 67, 67, 67, 67, 27, 67, 92, - 67, 67, 67, 67, 67, 67, 92, 44, 92, 44, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 67, 50, 44,180, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 44, 44, 27, 27, 44, 44, 44, 44, 62, 36, - 155, 36, 36, 36, 36,181, 44, 44, 36, 36, 36, 43, 43, 80, 44, 44, - 36, 36, 36, 36, 36, 36, 36, 93, 36, 36, 44, 44, 36, 36, 36, 36, - 182,105,105, 44, 44, 44, 44, 44, 11, 11, 11, 11, 16, 16, 16, 16, - 11, 11, 44, 44, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44, - 36, 36, 36, 36, 44, 44, 44, 44, 36, 36, 44, 44, 44, 44, 44, 93, - 11, 11, 11, 11, 11, 47, 11, 11, 11, 47, 11,150, 16, 16, 16, 16, - 16,150, 16, 16, 16, 16, 16, 16, 16,150, 16, 16, 16,150,110, 44, - 40, 40, 40, 52, 40, 40, 40, 40, 81, 40, 40, 40, 40, 81, 44, 44, - 36, 36, 36, 44, 61, 36, 36, 36, 36, 36, 36, 62, 61, 44, 61, 62, - 36, 36, 36, 93, 27, 27, 27, 27, 36, 36, 36, 77,163, 27, 27, 27, - 44, 44, 44,179, 27, 27, 27, 27, 36, 61, 36, 44, 44,179, 27, 27, - 36, 36, 36, 27, 27, 27, 44, 93, 36, 36, 36, 36, 36, 44, 44, 93, - 36, 36, 36, 36, 44, 44, 27, 36, 44, 27, 27, 27, 27, 27, 27, 27, - 70, 43, 57, 80, 44, 44, 43, 43, 36, 36, 62, 36, 62, 36, 36, 36, - 36, 36, 36, 44, 43, 80, 44, 57, 27, 27, 27, 27,100, 44, 44, 44, - 2, 2, 2, 2, 64, 44, 44, 44, 36, 36, 36, 36, 36, 36,183, 30, - 36, 36, 36, 36, 36, 36,183, 27, 36, 36, 36, 36, 78, 36, 36, 36, - 36, 36, 70, 80, 44,179, 27, 27, 2, 2, 2, 64, 44, 44, 44, 44, - 36, 36, 36, 44, 93, 2, 2, 2, 36, 36, 36, 44, 27, 27, 27, 27, - 36, 61, 44, 44, 27, 27, 27, 27, 36, 44, 44, 44, 93, 2, 64, 44, - 44, 44, 44, 44,179, 27, 27, 27, 11, 47, 44, 44, 44, 44, 44, 44, - 16,110, 44, 44, 44, 27, 27, 27, 36, 36, 43, 43, 44, 44, 44, 44, - 7, 7, 7, 7, 7, 36, 36, 69, 11, 11, 11, 44, 57, 43, 43,159, - 16, 16, 16, 44, 44, 44, 44, 8, 27, 27, 27, 27, 27, 27, 27,100, - 36, 36, 36, 36, 36, 57,184, 44, 36, 44, 44, 44, 44, 44, 44, 44, - 44, 36, 61, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, - 27, 27, 27, 95, 44, 44, 44, 44,180, 27, 30, 2, 2, 44, 44, 44, - 36, 43, 43, 2, 2, 44, 44, 44, 36, 36,183, 27, 27, 27, 44, 44, - 87, 98, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, - 43, 43, 43, 60, 2, 2, 2, 44, 27, 27, 27, 7, 7, 7, 7, 7, - 71, 70, 71, 44, 44, 44, 44, 57, 86, 87, 43, 85, 87, 60,185, 2, - 2, 80, 44, 44, 44, 44, 79, 44, 43, 71, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 70, 43, 43, 87, 43, 43, 43, 80, 7, 7, 7, 7, 7, - 2, 2, 94, 98, 44, 44, 44, 44, 36, 70, 2, 61, 44, 44, 44, 44, - 36, 94, 86, 43, 43, 43, 43, 85, 98, 36, 63, 2, 59, 43, 60, 87, - 7, 7, 7, 7, 7, 63, 63, 2,179, 27, 27, 27, 27, 27, 27, 27, - 27, 27,100, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 86, 87, - 43, 86, 85, 43, 2, 2, 2, 71, 70, 44, 44, 44, 44, 44, 44, 44, - 36, 36, 36, 61, 61, 36, 36, 62, 36, 36, 36, 36, 36, 36, 36, 62, - 36, 36, 36, 36, 63, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 70, - 86, 87, 43, 43, 43, 80, 44, 44, 43, 86, 62, 36, 36, 36, 61, 62, - 61, 36, 62, 36, 36, 57, 71, 86, 85, 86, 90, 89, 90, 89, 86, 44, - 61, 44, 44, 89, 44, 44, 62, 36, 36, 86, 44, 43, 43, 43, 80, 44, - 43, 43, 80, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 62, 44, 61, - 36, 36, 36, 62, 86, 87, 43, 43, 80, 90, 89, 89, 86, 90, 86, 85, - 71, 71, 2, 93, 64, 44, 44, 44, 57, 80, 44, 44, 44, 44, 44, 44, - 36, 36, 94, 86, 43, 43, 43, 43, 86, 43, 85, 71, 36, 63, 2, 2, - 7, 7, 7, 7, 7, 2, 93, 71, 86, 87, 43, 43, 85, 85, 86, 87, - 85, 43, 36, 72, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 94, - 86, 43, 43, 44, 86, 86, 43, 87, 60, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 36, 36, 43, 44, 86, 87, 43, 43, 43, 85, 87, 87, - 60, 2, 61, 44, 44, 44, 44, 44, 2, 2, 2, 2, 2, 2, 64, 44, - 36, 36, 36, 36, 36, 70, 87, 86, 43, 43, 43, 87, 63, 44, 44, 44, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 44, 44, 44, 44, 44, 44, - 36, 36, 36, 36, 36, 61, 57, 87, 86, 43, 43, 87, 43, 43, 44, 44, - 7, 7, 7, 7, 7, 27, 2, 97, 43, 43, 43, 43, 87, 60, 44, 44, - 27,100, 44, 44, 44, 44, 44, 62, 36, 36, 36, 61, 62, 44, 36, 36, - 36, 36, 62, 61, 36, 36, 36, 36, 86, 86, 86, 89, 90, 57, 85, 71, - 98, 87, 2, 64, 44, 44, 44, 44, 36, 36, 36, 36, 44, 36, 36, 36, - 94, 86, 43, 43, 44, 43, 86, 86, 71, 72, 90, 44, 44, 44, 44, 44, - 70, 43, 43, 43, 43, 71, 36, 36, 36, 70, 43, 43, 85, 70, 43, 60, - 2, 2, 2, 59, 44, 44, 44, 44, 70, 43, 43, 85, 87, 43, 36, 36, - 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 85, 43, 2, 72, 2, - 2, 64, 44, 44, 44, 44, 44, 44, 2, 2, 2, 2, 2, 44, 44, 44, - 63, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 80, 43, 43, 43, 87, - 63, 2, 2, 44, 44, 44, 44, 44, 2, 36, 36, 36, 36, 36, 36, 36, - 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 89, 43, 43, 43, - 85, 43, 87, 80, 44, 44, 44, 44, 36, 36, 36, 61, 36, 62, 36, 36, - 70, 43, 43, 80, 44, 80, 43, 57, 43, 43, 43, 70, 44, 44, 44, 44, - 36, 36, 36, 62, 61, 36, 36, 36, 36, 36, 36, 36, 36, 86, 86, 90, - 43, 89, 87, 87, 61, 44, 44, 44, 36, 70, 85,107, 64, 44, 44, 44, - 43, 94, 36, 36, 36, 36, 36, 36, 36, 36, 86, 43, 43, 80, 44, 86, - 85, 60, 2, 2, 2, 2, 2, 2, 7, 7, 7, 7, 7, 80, 44, 44, - 27, 27, 91, 67, 67, 67, 56, 20,168, 67, 67, 67, 67, 67, 67, 67, - 67, 44, 44, 44, 44, 44, 44, 93,105,105,105,105,105,105,105,181, - 2, 2, 64, 44, 44, 44, 44, 44, 63, 64, 44, 44, 44, 44, 44, 44, - 65, 65, 65, 65, 65, 65, 65, 65, 71, 36, 36, 70, 43, 43, 43, 43, - 43, 43, 43, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 43, - 43, 43, 43, 43, 43, 86, 87, 43, 43, 43, 60, 44, 44, 44, 44, 44, - 43, 43, 43, 60, 2, 2, 67, 67, 40, 40, 97, 44, 44, 44, 44, 44, - 7, 7, 7, 7, 7,179, 27, 27, 27, 62, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 44, 44, 62, 36, 40, 69, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 83,164, 2, 27, 27, 27, 30, 2, 64, 44, 44, - 36, 36, 36, 36, 36, 61, 44, 57, 94, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 44, 44, 44, 57, - 43, 74, 40, 40, 40, 40, 40, 40, 40, 88, 80, 44, 44, 44, 44, 44, - 86, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 62, - 40, 40, 52, 40, 40, 40, 52, 81, 36, 61, 44, 44, 44, 44, 44, 44, - 44, 61, 44, 44, 44, 44, 44, 44, 36, 61, 62, 44, 44, 44, 44, 44, - 44, 44, 36, 36, 44, 44, 44, 44, 36, 36, 36, 36, 36, 44, 50, 60, - 65, 65, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 44, - 43, 43, 43, 80, 44, 44, 44, 44, 67, 67, 67, 92, 55, 67, 67, 67, - 67, 67,186, 87, 43, 67,186, 86, 86,187, 65, 65, 65, 84, 43, 43, - 43, 76, 50, 43, 43, 43, 67, 67, 67, 67, 67, 67, 67, 43, 43, 67, - 67, 43, 76, 44, 44, 44, 44, 44, 27, 27, 44, 44, 44, 44, 44, 44, - 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 16, 16, 16,110, 16, 16, 16, 16, 16, - 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 47, 11, - 44, 47, 48, 47, 48, 11, 47, 11, 11, 11, 11, 16, 16,150,150, 16, - 16, 16,150, 16, 16, 16, 16, 16, 16, 16, 11, 48, 11, 47, 48, 11, - 11, 11, 47, 11, 11, 11, 47, 16, 16, 16, 16, 16, 11, 48, 11, 47, - 11, 11, 47, 47, 44, 11, 11, 11, 47, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, - 16, 16, 16, 44, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, - 11, 11, 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, - 16, 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, - 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, - 16, 33, 16, 16, 16, 32, 44, 7, 43, 43, 43, 76, 67, 50, 43, 43, - 43, 43, 43, 43, 43, 43, 76, 67, 67, 67, 50, 67, 67, 67, 67, 67, - 67, 67, 76, 21, 2, 2, 44, 44, 44, 44, 44, 44, 44, 57, 43, 43, - 16, 16, 16, 16, 16, 39, 16, 16, 16, 16, 16, 16, 16, 16, 16,110, - 44, 44,150, 16, 16,110, 44, 44, 43, 43, 43, 80, 43, 43, 43, 43, - 43, 43, 43, 43, 80, 57, 43, 43, 43, 57, 80, 43, 43, 80, 44, 44, - 40, 40, 40, 40, 40, 40, 40, 44, 44, 44, 44, 44, 44, 44, 44, 57, - 43, 43, 43, 74, 40, 40, 40, 44, 7, 7, 7, 7, 7, 44, 44, 77, - 36, 36, 36, 36, 36, 36, 36, 80, 36, 36, 36, 36, 36, 36, 43, 43, - 7, 7, 7, 7, 7, 44, 44, 96, 36, 36, 36, 36, 36, 83, 43, 43, - 188, 7, 7, 7, 7,189, 44, 93, 36, 36, 36, 61, 36, 36, 62, 61, - 36, 36, 61,179, 27, 27, 27, 27, 16, 16, 43, 43, 43, 74, 44, 44, - 27, 27, 27, 27, 27, 27,163, 27,190, 27,100, 44, 44, 44, 44, 44, - 27, 27, 27, 27, 27, 27, 27,163, 27, 27, 27, 27, 27, 27, 27, 44, - 36, 36, 62, 36, 36, 36, 36, 36, 62, 61, 61, 62, 62, 36, 36, 36, - 36, 61, 36, 36, 62, 62, 44, 44, 44, 61, 44, 62, 62, 62, 62, 36, - 62, 61, 61, 62, 62, 62, 62, 62, 62, 61, 61, 62, 36, 61, 36, 36, - 36, 61, 36, 36, 62, 36, 61, 61, 36, 36, 36, 36, 36, 62, 36, 36, - 62, 36, 62, 36, 36, 62, 36, 36, 8, 44, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 67, 44, 44, 55, 67, 67, 67, 67, 67, 67, 67, - 27, 27, 27, 27, 27, 27, 91, 67, 67, 67, 67, 67, 67, 67, 67, 44, - 44, 44, 44, 67, 67, 67, 67, 67, 67, 92, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 92, 44, 44, 44, 67, 44, 44, 44, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 25, 41, 41, 67, 67, 67, 67, 44, 44, 67, 67, - 67, 67, 67, 92, 44, 55, 67, 67, 67, 67, 67, 67, 44, 44, 44, 44, - 67, 67, 67, 67, 67, 44, 44, 55, 67, 67, 67, 92, 44, 44, 44, 67, - 67, 67, 67, 67, 67, 67, 92, 55, 67, 92, 67, 67, 67, 67, 67, 67, - 79, 44, 44, 44, 44, 44, 44, 44,171,171,171,171,171,171,171, 44, - 171,171,171,171,171,171,171, 0, 0, 0, 29, 21, 21, 21, 23, 21, - 22, 18, 21, 25, 21, 17, 13, 13, 25, 25, 25, 21, 21, 9, 9, 9, - 9, 22, 21, 18, 24, 16, 24, 5, 5, 5, 5, 22, 25, 18, 25, 0, - 23, 23, 26, 21, 24, 26, 7, 20, 25, 1, 26, 24, 26, 25, 15, 15, - 24, 15, 7, 19, 15, 21, 9, 25, 9, 5, 5, 25, 5, 9, 5, 7, - 7, 7, 9, 8, 8, 5, 7, 5, 6, 6, 24, 24, 6, 24, 12, 12, - 2, 2, 6, 5, 9, 21, 9, 2, 2, 9, 25, 9, 26, 12, 11, 11, - 2, 6, 5, 21, 17, 2, 2, 26, 26, 23, 2, 12, 17, 12, 21, 12, - 12, 21, 7, 2, 2, 7, 7, 21, 21, 2, 1, 1, 21, 23, 26, 26, - 1, 21, 6, 7, 7, 12, 12, 7, 21, 7, 12, 1, 12, 6, 6, 12, - 12, 26, 7, 26, 26, 7, 2, 1, 12, 2, 6, 2, 24, 7, 7, 6, - 1, 12, 12, 10, 10, 10, 10, 12, 21, 6, 2, 10, 10, 2, 15, 26, - 26, 2, 2, 21, 7, 10, 15, 7, 2, 23, 21, 26, 10, 7, 21, 15, - 15, 2, 17, 7, 29, 7, 7, 22, 18, 2, 14, 14, 14, 7, 10, 21, - 17, 21, 11, 12, 5, 2, 5, 6, 8, 8, 8, 24, 5, 24, 2, 24, - 9, 24, 24, 2, 29, 29, 29, 1, 17, 17, 20, 19, 22, 20, 27, 28, - 1, 29, 21, 20, 19, 21, 21, 16, 16, 21, 25, 22, 18, 21, 21, 29, - 1, 2, 15, 6, 18, 6, 23, 2, 12, 11, 9, 26, 26, 9, 26, 5, - 5, 26, 14, 9, 5, 14, 14, 15, 25, 26, 26, 22, 18, 26, 18, 25, - 18, 22, 5, 12, 2, 5, 22, 21, 21, 22, 18, 17, 26, 6, 7, 14, - 17, 22, 18, 18, 26, 14, 17, 6, 14, 6, 12, 24, 24, 6, 26, 15, - 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, 6, 10, 4, 4, 3, 3, - 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, 25, 2, 25, 24, 2, 15, - 12, 15, 14, 2, 21, 14, 7, 15, 12, 17, 21, 1, 26, 10, 10, 1, - 7, 13, 13, 2, 23, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 0, 10, 11, 12, 13, 0, 14, 0, 0, 0, 0, 0, 15, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 20, 0, 21, 22, 23, 0, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 36, 0, 37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 40, - 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 44, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 3, 0, - 0, 0, 4, 5, 6, 7, 0, 8, 9, 10, 0, 11, 12, 13, 14, 15, - 16, 17, 16, 18, 16, 19, 16, 19, 16, 19, 0, 19, 16, 20, 16, 19, - 21, 19, 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 32, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, - 34, 0, 0, 35, 0, 0, 36, 0, 37, 0, 0, 0, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 49, - 0, 0, 0, 0, 0, 0, 0, 50, 0, 51, 0, 52, 53, 0, 54, 0, - 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, 58, 0, 0, 59, - 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 66, 0, 0, 0, 0, - 67, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 72, 0, 0, 73, - 0, 0, 0, 0, 0, 0, 0, 0, 74, 75, 0, 0, 0, 0, 76, 77, - 0, 78, 79, 0, 0, 80, 81, 0, 82, 62, 0, 83, 84, 0, 0, 85, - 86, 87, 0, 88, 0, 89, 0, 90, 0, 0, 51, 91, 51, 0, 92, 0, - 93, 0, 0, 0, 81, 0, 0, 0, 94, 95, 0, 96, 97, 98, 99, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0,100,101, 0, 0, 0, 0, 0, - 0,102, 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 0,104, - 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 0, 0,107, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,108,109, 0, 0,110, 0, 0, - 0, 0, 0, 0,111, 0,112, 0,105, 0, 0, 0, 0, 0,113,114, - 0, 0, 0, 0, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,117, - 0,118, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, + 32, 32, 11, 11, 34, 34, 32, 32, 32, 32, 32, 32, 32, 32, 46, 43, + 51, 39,166, 35, 39, 35, 36, 36, 36, 70, 36, 70, 36, 69, 36, 36, + 36, 93, 86, 84, 66, 66, 79, 43, 27, 27, 27, 66,167, 43, 43, 43, + 36, 36, 2, 2, 43, 43, 43, 43, 85, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 85, 85, 85, 85, 85, 85, 85, 85, 42, 43, 43, 43, 43, 2, + 42, 36, 36, 36, 2, 71, 71, 69, 36, 36, 36, 42, 42, 42, 42, 2, + 36, 36, 36, 69, 42, 42, 42, 42, 42, 85, 43, 43, 43, 43, 43, 92, + 36, 69, 85, 42, 42, 85, 42, 85,106, 2, 2, 2, 2, 2, 2, 51, + 7, 7, 7, 7, 7, 43, 43, 2, 36, 36, 69, 68, 36, 36, 36, 36, + 7, 7, 7, 7, 7, 36, 36, 60, 36, 36, 36, 36, 69, 42, 42, 84, + 86, 84, 86, 79, 43, 43, 43, 43, 36, 69, 36, 36, 36, 36, 84, 43, + 7, 7, 7, 7, 7, 43, 2, 2, 68, 36, 36, 76, 66, 93, 84, 36, + 70, 42, 70, 69, 70, 36, 36, 42, 69, 60, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 61, 82, 2, 36, 36, 36, 36, 36, 93, 42, 85, + 2, 82,168, 79, 43, 43, 43, 43, 61, 36, 36, 60, 61, 36, 36, 60, + 61, 36, 36, 60, 43, 43, 43, 43, 16, 16, 16, 16, 16,113, 39, 39, + 16, 16, 16, 16,110, 40, 43, 43, 36, 93, 86, 85, 84,106, 86, 43, + 36, 36, 43, 43, 43, 43, 43, 43, 36, 36, 36, 60, 43, 61, 36, 36, + 169,169,169,169,169,169,169,169,170,170,170,170,170,170,170,170, + 16, 16, 16,109, 43, 43, 43, 43, 43,149, 16, 16, 43, 43, 61, 70, + 36, 36, 36, 36,171, 36, 36, 36, 36, 36, 36, 60, 36, 36, 60, 60, + 36, 61, 60, 36, 36, 36, 36, 36, 36, 40, 40, 40, 40, 40, 40, 40, + 40, 22, 66, 66, 66, 66, 66, 66, 66, 77, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36,147, 66, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 66, 66, 66, 66, 36, 36, 36, 36, 36, 36,167, 66, + 2, 2, 2,151,129, 43, 43, 43, 6,172,173,147,147,147,147,147, + 147,147,129,151,129, 2,126,174, 2, 63, 2, 2,155,147,147,129, + 2,175, 8,176, 65, 2, 43, 43, 36, 36, 60, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 60, 78, 92, 2, 3, 2, 4, 5, 6, 2, + 16, 16, 16, 16, 16, 17, 18,128,129, 4, 2, 36, 36, 36, 36, 36, + 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 39, + 43, 36, 36, 36, 43, 36, 36, 36, 43, 36, 36, 36, 43, 36, 60, 43, + 20,177, 55,178, 26, 8,143, 91, 43, 43, 43, 43, 78, 64, 66, 43, + 36, 36, 36, 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 60, 36, 61, + 2, 63, 43,179, 27, 27, 27, 27, 27, 27, 43, 54, 66, 66, 66, 66, + 104,104,142, 27, 90, 66, 66, 66, 66, 66, 66, 66, 66, 27, 66, 91, + 66, 66, 66, 66, 66, 66, 91, 43, 91, 43, 43, 43, 43, 43, 43, 43, + 66, 66, 66, 66, 66, 66, 49, 43,180, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 43, 43, 27, 27, 43, 43, 43, 43, 61, 36, + 154, 36, 36, 36, 36,181, 43, 43, 36, 36, 36, 42, 42, 79, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 92, 36, 36, 43, 43, 36, 36, 36, 36, + 182,104,104, 43, 43, 43, 43, 43, 11, 11, 11, 11, 16, 16, 16, 16, + 11, 11, 43, 43, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 43, 43, + 36, 36, 36, 36, 43, 43, 43, 43, 36, 36, 43, 43, 43, 43, 43, 92, + 11, 11, 11, 11, 11, 46, 11, 11, 11, 46, 11,149, 16, 16, 16, 16, + 16,149, 16, 16, 16, 16, 16, 16, 16,149, 16, 16, 16,149,109, 43, + 39, 39, 39, 51, 39, 39, 39, 39, 80, 39, 39, 39, 39, 80, 43, 43, + 36, 36, 36, 43, 60, 36, 36, 36, 36, 36, 36, 61, 60, 43, 60, 61, + 36, 36, 36, 92, 27, 27, 27, 27, 36, 36, 36, 76,162, 27, 27, 27, + 43, 43, 43,179, 27, 27, 27, 27, 36, 60, 36, 43, 43,179, 27, 27, + 36, 36, 36, 27, 27, 27, 43, 92, 36, 36, 36, 36, 36, 43, 43, 92, + 36, 36, 36, 36, 43, 43, 27, 36, 43, 27, 27, 27, 27, 27, 27, 27, + 69, 42, 56, 79, 43, 43, 42, 42, 36, 36, 61, 36, 61, 36, 36, 36, + 36, 36, 36, 43, 42, 79, 43, 56, 27, 27, 27, 27, 99, 43, 43, 43, + 2, 2, 2, 2, 63, 43, 43, 43, 36, 36, 36, 36, 36, 36,183, 30, + 36, 36, 36, 36, 36, 36,183, 27, 36, 36, 36, 36, 77, 36, 36, 36, + 36, 36, 69, 79, 43,179, 27, 27, 2, 2, 2, 63, 43, 43, 43, 43, + 36, 36, 36, 43, 92, 2, 2, 2, 36, 36, 36, 43, 27, 27, 27, 27, + 36, 60, 43, 43, 27, 27, 27, 27, 36, 43, 43, 43, 92, 2, 63, 43, + 43, 43, 43, 43,179, 27, 27, 27, 11, 46, 43, 43, 43, 43, 43, 43, + 16,109, 43, 43, 43, 27, 27, 27, 36, 36, 42, 42, 43, 43, 43, 43, + 7, 7, 7, 7, 7, 36, 36, 68, 11, 11, 11, 43, 56, 42, 42,158, + 16, 16, 16, 43, 43, 43, 43, 8, 27, 27, 27, 27, 27, 27, 27, 99, + 36, 36, 36, 36, 36, 56,184, 43, 36, 43, 43, 43, 43, 43, 43, 43, + 43, 36, 82, 36, 43, 43, 43, 43, 96, 66, 66, 66, 91, 43, 43, 43, + 43, 43, 43, 43, 43, 42, 42, 42, 27, 27, 27, 94, 43, 43, 43, 43, + 180, 27, 30, 2, 2, 43, 43, 43, 36, 42, 42, 2, 2, 43, 43, 43, + 36, 36,183, 27, 27, 27, 43, 43, 86, 97, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 42, 42, 42, 42, 42, 42, 42, 59, 2, 2, 2, 43, + 27, 27, 27, 7, 7, 7, 7, 7, 70, 69, 70, 43, 43, 43, 43, 56, + 85, 86, 42, 84, 86, 59,185, 2, 2, 79, 43, 43, 43, 43, 78, 43, + 42, 70, 36, 36, 36, 36, 36, 36, 36, 36, 36, 69, 42, 42, 86, 42, + 42, 42, 79, 7, 7, 7, 7, 7, 2, 2, 93, 97, 43, 43, 43, 43, + 36, 69, 2, 60, 43, 43, 43, 43, 36, 93, 85, 42, 42, 42, 42, 84, + 97, 36, 62, 2, 58, 42, 59, 86, 7, 7, 7, 7, 7, 62, 62, 2, + 179, 27, 27, 27, 27, 27, 27, 27, 27, 27, 99, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 85, 86, 42, 85, 84, 42, 2, 2, 2, 70, + 69, 43, 43, 43, 43, 43, 43, 43, 36, 36, 36, 60, 60, 36, 36, 61, + 36, 36, 36, 36, 36, 36, 36, 61, 36, 36, 36, 36, 62, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 69, 85, 86, 42, 42, 42, 79, 43, 43, + 42, 85, 61, 36, 36, 36, 60, 61, 60, 36, 61, 36, 36, 56, 70, 85, + 84, 85, 89, 88, 89, 88, 85, 43, 60, 43, 43, 88, 43, 43, 61, 36, + 36, 85, 43, 42, 42, 42, 79, 43, 42, 42, 79, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 61, 43, 60, 36, 36, 36, 61, 85, 86, 42, 42, + 79, 89, 88, 88, 85, 89, 85, 84, 70, 70, 2, 92, 63, 43, 43, 43, + 56, 79, 43, 43, 43, 43, 43, 43, 36, 36, 93, 85, 42, 42, 42, 42, + 85, 42, 84, 70, 36, 62, 2, 2, 7, 7, 7, 7, 7, 2, 92, 70, + 85, 86, 42, 42, 84, 84, 85, 86, 84, 42, 36, 71, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 93, 85, 42, 42, 43, 85, 85, 42, 86, + 59, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 42, 43, + 85, 86, 42, 42, 42, 84, 86, 86, 59, 2, 60, 43, 43, 43, 43, 43, + 2, 2, 2, 2, 2, 2, 63, 43, 36, 36, 36, 36, 36, 69, 86, 85, + 42, 42, 42, 86, 62, 43, 43, 43, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 60, 56, 86, + 85, 42, 42, 86, 42, 42, 43, 43, 7, 7, 7, 7, 7, 27, 2, 96, + 42, 42, 42, 42, 86, 59, 43, 43, 27, 99, 43, 43, 43, 43, 43, 61, + 36, 36, 36, 60, 61, 43, 36, 36, 36, 36, 61, 60, 36, 36, 36, 36, + 85, 85, 85, 88, 89, 56, 84, 70, 97, 86, 2, 63, 43, 43, 43, 43, + 36, 36, 36, 36, 43, 36, 36, 36, 93, 85, 42, 42, 43, 42, 85, 85, + 70, 71, 89, 43, 43, 43, 43, 43, 69, 42, 42, 42, 42, 70, 36, 36, + 36, 69, 42, 42, 84, 69, 42, 59, 2, 2, 2, 58, 43, 43, 43, 43, + 69, 42, 42, 84, 86, 42, 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, + 42, 42, 42, 84, 42, 2, 71, 2, 2, 63, 43, 43, 43, 43, 43, 43, + 2, 2, 2, 2, 2, 43, 43, 43, 84, 42, 84, 84, 43, 43, 43, 43, + 62, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 79, 42, 42, 42, 86, + 62, 2, 2, 43, 43, 43, 43, 43, 2, 36, 36, 36, 36, 36, 36, 36, + 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 88, 42, 42, 42, + 84, 42, 86, 79, 43, 43, 43, 43, 36, 36, 36, 60, 36, 61, 36, 36, + 69, 42, 42, 79, 43, 79, 42, 56, 42, 42, 42, 69, 43, 43, 43, 43, + 36, 36, 36, 61, 60, 36, 36, 36, 36, 36, 36, 36, 36, 85, 85, 89, + 42, 88, 86, 86, 60, 43, 43, 43, 36, 36, 36, 36, 82, 36, 43, 43, + 36, 69, 84,106, 63, 43, 43, 43, 42, 93, 36, 36, 36, 36, 36, 36, + 36, 36, 85, 42, 42, 79, 43, 85, 84, 59, 2, 2, 2, 2, 2, 2, + 7, 7, 7, 7, 7, 79, 43, 43, 27, 27, 90, 66, 66, 66, 55, 20, + 167, 66, 66, 66, 66, 66, 66, 66, 66, 43, 43, 43, 43, 43, 43, 92, + 104,104,104,104,104,104,104,181, 2, 2, 63, 43, 43, 43, 43, 43, + 62, 63, 43, 43, 43, 43, 43, 43, 64, 64, 64, 64, 64, 64, 64, 64, + 70, 36, 36, 69, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, 42, 42, 42, 85, 86, 42, + 42, 42, 59, 43, 43, 43, 43, 43, 42, 42, 42, 59, 2, 2, 66, 66, + 39, 39, 96, 43, 43, 43, 43, 43, 7, 7, 7, 7, 7,179, 27, 27, + 27, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 61, 36, + 39, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 82,163, 2, + 27, 27, 27, 30, 2, 63, 43, 43, 11, 11, 11, 11, 46,149, 16, 16, + 16, 16, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 60, 43, 56, + 93, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 43, 43, 43, 56, 42, 73, 39, 39, 39, 39, 39, 39, + 39, 87, 79, 43, 43, 43, 43, 43, 85, 39,104,181, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 61, 36, 60, 43, 43, 43, 43, 43, 43, + 39, 39, 51, 39, 39, 39, 51, 80, 43, 60, 43, 43, 43, 43, 43, 43, + 36, 60, 61, 43, 43, 43, 43, 43, 43, 43, 36, 36, 43, 43, 43, 43, + 36, 36, 36, 36, 36, 43, 49, 59, 64, 64, 43, 43, 43, 43, 43, 43, + 7, 7, 7, 7, 7, 66, 91, 43, 66, 66, 43, 43, 43, 66, 66, 66, + 176, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 79, 43, 43, 43, 43, + 66, 66, 66, 91, 54, 66, 66, 66, 66, 66,186, 86, 42, 66,186, 85, + 85,187, 64, 64, 64, 83, 42, 42, 42, 75, 49, 42, 42, 42, 66, 66, + 66, 66, 66, 66, 66, 42, 42, 66, 66, 42, 75, 43, 43, 43, 43, 43, + 27, 27, 43, 43, 43, 43, 43, 43, 11, 11, 11, 11, 11, 16, 16, 16, + 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 16, + 16, 16,109, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 46, 11, 43, 46, 47, 46, 47, 11, 46, 11, + 11, 11, 11, 16, 16,149,149, 16, 16, 16,149, 16, 16, 16, 16, 16, + 16, 16, 11, 47, 11, 46, 47, 11, 11, 11, 46, 11, 11, 11, 46, 16, + 16, 16, 16, 16, 11, 47, 11, 46, 11, 11, 46, 46, 43, 11, 11, 11, + 46, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 11, 11, + 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 43, 11, 11, 11, 11, + 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, + 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, + 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, + 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 32, 43, 7, + 42, 42, 42, 75, 66, 49, 42, 42, 42, 42, 42, 42, 42, 42, 75, 66, + 66, 66, 49, 66, 66, 66, 66, 66, 66, 66, 75, 21, 2, 2, 43, 43, + 43, 43, 43, 43, 43, 56, 42, 42, 16, 16, 16, 16, 16,138, 16, 16, + 16, 16, 16, 16, 16, 16, 16,109, 43, 43,149, 16, 16,109, 43, 43, + 42, 42, 42, 79, 42, 42, 42, 42, 42, 42, 42, 42, 79, 56, 42, 42, + 42, 56, 79, 42, 42, 79, 43, 43, 39, 39, 39, 39, 39, 39, 39, 43, + 43, 43, 43, 43, 43, 43, 43, 56, 42, 42, 42, 73, 39, 39, 39, 43, + 7, 7, 7, 7, 7, 43, 43, 76, 36, 36, 36, 36, 36, 36, 36, 79, + 36, 36, 36, 36, 36, 36, 42, 42, 7, 7, 7, 7, 7, 43, 43, 95, + 36, 36, 36, 36, 36, 82, 42, 42,188, 7, 7, 7, 7,189, 43, 92, + 36, 69, 36, 70, 36, 36, 36, 42, 36, 36, 69, 43, 43, 43, 43, 82, + 36, 36, 36, 60, 36, 36, 61, 60, 36, 36, 60,179, 27, 27, 27, 27, + 16, 16, 42, 42, 42, 73, 43, 43, 27, 27, 27, 27, 27, 27,162, 27, + 190, 27, 99, 43, 43, 43, 43, 43, 27, 27, 27, 27, 27, 27, 27,162, + 27, 27, 27, 27, 27, 27, 27, 43, 36, 36, 61, 36, 36, 36, 36, 36, + 61, 60, 60, 61, 61, 36, 36, 36, 36, 60, 36, 36, 61, 61, 43, 43, + 43, 60, 43, 61, 61, 61, 61, 36, 61, 60, 60, 61, 61, 61, 61, 61, + 61, 60, 60, 61, 36, 60, 36, 36, 36, 60, 36, 36, 61, 36, 60, 60, + 36, 36, 36, 36, 36, 61, 36, 36, 61, 36, 61, 36, 36, 61, 36, 36, + 8, 43, 43, 43, 43, 43, 43, 43, 66, 66, 66, 66, 66, 66, 43, 43, + 54, 66, 66, 66, 66, 66, 66, 66, 27, 27, 27, 27, 27, 27, 90, 66, + 66, 66, 66, 66, 66, 66, 66, 43, 43, 43, 43, 66, 66, 66, 66, 66, + 66, 91, 43, 43, 43, 43, 43, 43, 66, 66, 66, 66, 91, 43, 43, 43, + 66, 43, 43, 43, 43, 43, 43, 43, 66, 66, 66, 66, 66, 25, 40, 40, + 66, 66, 66, 66, 91, 43, 66, 66, 66, 66, 66, 66, 43, 43, 43, 43, + 8, 8, 8, 8,176, 43, 43, 43, 66, 66, 66, 66, 66, 91, 43, 66, + 66, 66, 66, 91, 91, 43, 54, 66, 66, 66, 66, 66, 66, 66, 91, 54, + 66, 66, 66, 66, 66, 91, 43, 54, 66, 91, 66, 66, 66, 66, 66, 66, + 7, 7, 7, 7, 7, 91, 43, 43, 78, 43, 43, 43, 43, 43, 43, 43, + 170,170,170,170,170,170,170, 43,170,170,170,170,170,170,170, 0, + 0, 0, 29, 21, 21, 21, 23, 21, 22, 18, 21, 25, 21, 17, 13, 13, + 25, 25, 25, 21, 21, 9, 9, 9, 9, 22, 21, 18, 24, 16, 24, 5, + 5, 5, 5, 22, 25, 18, 25, 0, 23, 23, 26, 21, 24, 26, 7, 20, + 25, 1, 26, 24, 26, 25, 15, 15, 24, 15, 7, 19, 15, 21, 9, 25, + 9, 5, 5, 25, 5, 9, 5, 7, 7, 7, 9, 8, 8, 5, 6, 6, + 24, 24, 6, 24, 12, 12, 2, 2, 6, 5, 9, 21, 9, 2, 2, 9, + 25, 9, 26, 12, 11, 11, 2, 6, 5, 21, 17, 2, 2, 26, 26, 23, + 2, 12, 17, 12, 21, 12, 12, 21, 7, 2, 2, 7, 7, 21, 21, 2, + 1, 1, 21, 23, 26, 26, 1, 21, 6, 7, 7, 12, 12, 7, 21, 7, + 12, 1, 12, 6, 6, 12, 12, 26, 7, 26, 26, 7, 2, 1, 12, 2, + 6, 2, 24, 7, 7, 6, 1, 12, 12, 10, 10, 10, 10, 12, 21, 6, + 2, 10, 10, 2, 15, 26, 26, 2, 2, 21, 7, 10, 15, 7, 2, 23, + 21, 26, 10, 7, 21, 15, 15, 2, 17, 7, 29, 7, 7, 22, 18, 2, + 14, 14, 14, 7, 10, 21, 17, 21, 11, 12, 5, 2, 5, 6, 8, 8, + 8, 24, 5, 24, 2, 24, 9, 24, 24, 2, 29, 29, 29, 1, 17, 17, + 20, 19, 22, 20, 27, 28, 1, 29, 21, 20, 19, 21, 21, 16, 16, 21, + 25, 22, 18, 21, 21, 29, 1, 2, 15, 6, 18, 6, 12, 11, 9, 26, + 26, 9, 26, 5, 7, 5, 5, 26, 14, 9, 5, 14, 14, 15, 25, 26, + 26, 22, 18, 26, 18, 25, 18, 22, 5, 12, 2, 5, 22, 21, 21, 22, + 18, 17, 26, 6, 7, 14, 17, 22, 18, 18, 26, 14, 17, 6, 14, 6, + 12, 24, 24, 6, 26, 15, 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, + 6, 10, 4, 4, 3, 3, 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, + 25, 2, 25, 24, 23, 2, 2, 15, 12, 15, 14, 2, 21, 14, 7, 15, + 12, 17, 21, 1, 26, 10, 10, 1, 7, 13, 13, 2, 23, 15, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 13, 0, 14, 0, + 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, + 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, + 0, 0, 0, 36, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 39, 40, 0, 0, 0, 0, 0, 0, 41, 42, + 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 0, 0, 0, 3, 0, 0, 0, 4, 5, 6, 7, 0, 8, + 9, 10, 0, 11, 12, 13, 14, 15, 16, 17, 16, 18, 16, 19, 16, 19, + 16, 19, 0, 19, 16, 20, 16, 19, 21, 19, 0, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 0, 0, 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, + 37, 0, 0, 0, 38, 39, 40, 41, 42, 43, 44, 45, 46, 0, 0, 47, + 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 50, + 0, 51, 0, 52, 53, 0, 54, 0, 0, 0, 0, 0, 0, 55, 56, 57, + 0, 0, 0, 0, 58, 0, 0, 59, 60, 61, 62, 63, 0, 0, 64, 65, + 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 70, + 0, 71, 0, 0, 72, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, + 74, 75, 0, 0, 0, 0, 76, 77, 0, 78, 79, 0, 0, 80, 81, 0, + 82, 62, 0, 83, 84, 0, 0, 85, 86, 87, 0, 88, 0, 89, 0, 90, + 0, 0, 51, 91, 51, 0, 92, 0, 93, 0, 0, 0, 81, 0, 0, 0, + 94, 95, 0, 96, 97, 98, 99, 0, 0, 0, 0, 0, 51, 0, 0, 0, + 0,100,101, 0, 0, 0, 0, 0, 0,102, 0, 0, 0, 0, 0, 0, + 103, 0, 0, 0, 0, 0, 0,104,105, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,106, 0, 0,107, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,108,109, 0, 0,110, 0, 0, 0, 0, 0, 0,111, 0,112, 0, + 105, 0, 0, 0, 0, 0,113,114, 0, 0, 0, 0, 0, 0, 0,115, + 0, 0, 0,116, 0, 0, 0,117, 0, 0, 0, 0, 0, 0, 0,118, + 0,119, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 0, 0, 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, 13, 0, 0, 14, 15, 0, 16, 0, 17, 18, 0, 0, 19, 0, 20, 21, 0, 0, 0, 0, 0, 22, 23, 0, 24, 25, 0, 0, 26, 0, 0, 0, 27, 0, 0, @@ -3371,561 +3219,384 @@ 0, 43, 0, 44, 0, 0, 0, 45, 46, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 48, 49, 0, 0, 0, 0, 50, 0, 0, 0, 51, 0, 52, 0, 53, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 0, 56, 0, 0, - 0, 0, 57, 58, 0, 0, 0, 59, 60, 0, 0, 0, 0, 0, 0, 61, - 52, 0, 62, 63, 0, 0, 64, 0, 0, 0, 65, 66, 0, 0, 0, 67, - 0, 68, 69, 70, 71, 72, 1, 73, 0, 74, 75, 76, 0, 0, 77, 78, - 0, 0, 0, 79, 0, 0, 1, 1, 0, 0, 80, 0, 0, 81, 0, 0, - 0, 0, 77, 82, 0, 83, 0, 0, 0, 0, 0, 78, 84, 0, 85, 0, - 52, 0, 1, 78, 0, 0, 86, 0, 0, 87, 0, 0, 0, 0, 0, 88, - 57, 0, 0, 0, 0, 0, 0, 89, 90, 0, 0, 84, 0, 0, 33, 0, - 0, 91, 0, 0, 0, 0, 92, 0, 0, 0, 0, 49, 0, 0, 93, 0, - 0, 0, 0, 94, 95, 0, 0, 96, 0, 0, 97, 0, 0, 0, 98, 0, - 0, 0, 99, 0, 0, 0,100, 0, 0, 0, 0,101,102, 93, 0, 0, - 103, 0, 0, 0, 84, 0, 0,104, 0, 0, 0,105,106, 0, 0,107, - 108, 0, 0, 0, 0, 0, 0,109, 0, 0,110, 0, 0, 0, 0,111, - 33, 0,112,113,114, 57, 0, 0,115, 35, 0, 0,116, 0, 0, 0, - 117, 0, 0, 0, 0, 0, 0,118, 0, 0,119, 0, 0, 0, 0,120, - 88, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 52,121, 0, 0, 0, - 0,122, 0, 0,123, 0, 0, 0, 0,121, 0, 0,124, 0, 0, 0, - 0, 0, 79, 0, 0, 0, 0,125, 0, 0, 0,126, 0, 0, 0,127, - 0,128, 0, 0, 0, 0,129,130,131, 0,132, 0,133, 0, 0, 0, - 134,135,136, 0, 77, 0, 0, 0, 0, 0, 35, 0, 0, 0,137, 0, - 0, 0,138, 0, 0, 0,139, 0, 0,140, 0, 0,141, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 4, - 4, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 1, 1, 1, - 19, 1, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, 25, 26, 27, 28, - 29, 30, 0, 0, 1, 1, 31, 0, 0, 0, 32, 33, 34, 35, 1, 36, - 37, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, 42, 0, 0, 0, - 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 19, 1, 21, 0, 0, 47, - 0, 38, 48, 1, 1, 49, 49, 50, 0, 0, 51, 0, 0, 19, 52, 1, - 0, 0, 38, 14, 4, 1, 1, 1, 53, 21, 43, 52, 54, 21, 35, 1, - 0, 0, 0, 55, 0, 0, 0, 56, 57, 58, 0, 0, 0, 0, 0, 59, - 0, 60, 0, 0, 0, 0, 61, 62, 0, 0, 63, 0, 0, 0, 64, 0, - 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 68, 0, - 0, 69, 70, 0, 71, 72, 73, 74, 75, 76, 0, 0, 0, 77, 0, 0, - 0, 78, 79, 0, 0, 0, 0, 47, 0, 0, 0, 49, 0, 80, 0, 0, - 0, 62, 0, 0, 63, 0, 0, 81, 0, 0, 82, 0, 0, 0, 83, 0, - 0, 19, 84, 0, 62, 0, 0, 0, 0, 49, 1, 85, 1, 52, 15, 86, - 36, 10, 21, 87, 0, 55, 0, 0, 0, 0, 19, 10, 1, 0, 0, 0, - 0, 0, 88, 0, 0, 89, 0, 0, 88, 0, 0, 0, 0, 78, 0, 0, - 87, 9, 12, 4, 90, 8, 91, 47, 0, 58, 50, 0, 21, 1, 21, 92, - 93, 1, 1, 1, 1, 94, 95, 96, 97, 1, 98, 58, 81, 99,100, 4, - 58, 0, 0, 0, 0, 0, 0, 19, 50, 0, 0, 0, 0, 0, 0, 61, - 0, 0,101,102, 0, 0,103, 0, 0, 1, 1, 50, 0, 0, 0, 38, - 0, 63, 0, 0, 0, 0, 0, 62, 0, 0,104, 68, 61, 0, 0, 0, - 78, 0, 0, 0,105,106, 58, 38, 81, 0, 0, 0, 0, 0, 0,107, - 1, 14, 4, 12, 84, 0, 0, 0, 0, 38, 87, 0, 0, 0, 0,108, - 0, 0,109, 61, 0,110, 0, 0, 0, 1, 0, 0, 0, 0, 49, 50, - 0, 0, 19, 58, 0, 0, 0, 51, 0,111, 14, 52,112, 41, 0, 0, - 62, 0, 0, 61, 0, 0,113, 0, 87, 0, 0, 0, 61, 62, 0, 0, - 62, 0, 89, 0, 0,113, 0, 0, 0, 0,114, 0, 0, 0, 78, 55, - 0, 38, 1, 58, 1, 58, 0, 0, 0, 0, 0, 88, 63, 89, 0, 0, - 115, 0, 0, 0, 55, 0, 0, 0, 0,115, 0, 0, 0, 0, 61, 0, - 0, 0, 0, 79, 0, 61, 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, - 79, 0, 0, 0, 8, 91, 0, 0, 1, 87, 0, 0,116, 0, 0, 0, - 0, 0, 0,117, 0,118,119,120,121, 0,104, 4,122, 49, 23, 0, - 0, 0, 38, 50, 38, 58, 0, 0, 1, 87, 1, 1, 1, 1, 39, 1, - 48,105, 87, 0, 0, 0, 0, 1, 0, 0, 0,123, 0, 0, 0,112, - 4,122, 0, 0, 0, 1,124, 0, 0, 0, 0, 0,230,230,230,230, - 230,232,220,220,220,220,232,216,220,220,220,220,220,202,202,220, - 220,220,220,202,202,220,220,220, 1, 1, 1, 1, 1,220,220,220, - 220,230,230,230,230,240,230,220,220,220,230,230,230,220,220, 0, - 230,230,230,220,220,220,220,230,232,220,220,230,233,234,234,233, - 234,234,233,230, 0, 0, 0,230, 0,220,230,230,230,230,220,230, - 230,230,222,220,230,230,220,220,230,222,228,230, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, 25, 0, - 230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, 28, 29, 30, 31, - 32, 33, 34,230,230,220,220,230,220,230,230,220, 35, 0, 0, 0, - 0, 0,230,230,230, 0, 0,230,230, 0,220,230,230,220, 0, 0, - 0, 36, 0, 0,230,220,230,230,220,220,230,220,220,230,220,230, - 220,230,230, 0, 0,220, 0, 0,230,230, 0,230, 0,230,230,230, - 230,230, 0, 0, 0,220,220,220,230,220,220,220,230,230, 0,220, - 27, 28, 29,230, 7, 0, 0, 0, 0, 9, 0, 0, 0,230,220,230, - 230, 0, 0, 0, 0, 0,230, 0, 0, 84, 91, 0, 0, 0, 0, 9, - 9, 0, 0, 0, 0, 0, 9, 0,103,103, 9, 0,107,107,107,107, - 118,118, 9, 0,122,122,122,122,220,220, 0, 0, 0,220, 0,220, - 0,216, 0, 0, 0,129,130, 0,132, 0, 0, 0, 0, 0,130,130, - 130,130, 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0,220, 0, - 0, 0, 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, 0,230, 0, 0, - 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0,230, 0, 0,220, - 230,220, 0,220,230,230,230, 0, 0, 0, 9, 9, 0, 0, 7, 0, - 230, 0, 1, 1, 1, 0, 0, 0,230,234,214,220,202,230,230,230, - 230,230,232,228,228,220,218,230,233,220,230,220,230,230, 1, 1, - 1, 1, 1,230, 0, 1, 1,230,220,230, 1, 1, 0, 0,218,228, - 232,222,224,224, 0, 8, 8, 0, 0, 0, 0,220,230, 0,230,230, - 220, 0, 0,230, 0, 0, 26, 0, 0,220, 0,230,230, 1,220, 0, - 0,230,220, 0, 0, 0,220,220, 0, 0,230,220, 0, 9, 7, 0, - 0, 7, 9, 0, 0, 0, 9, 7, 6, 6, 0, 0, 0, 0, 1, 0, - 0,216,216, 1, 1, 1, 0, 0, 0,226,216,216,216,216,216, 0, - 220,220,220, 0,232,232,220,230,230,230, 7, 0, 16, 17, 17, 33, - 17, 49, 17, 17, 84, 97,135,145, 26, 17, 17, 17, 17, 17, 17, 17, + 0, 0, 57, 58, 0, 0, 0, 59, 60, 61, 62, 0, 0, 0, 0, 63, + 52, 0, 64, 65, 0, 0, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, + 0, 70, 71, 72, 73, 74, 1, 75, 0, 76, 77, 78, 0, 0, 79, 80, + 0, 0, 0, 81, 0, 0, 1, 1, 0, 0, 82, 0, 0, 83, 0, 0, + 0, 0, 79, 84, 0, 85, 0, 0, 0, 0, 0, 80, 86, 0, 87, 0, + 52, 0, 1, 80, 0, 0, 88, 0, 0, 89, 0, 0, 0, 0, 0, 90, + 57, 0, 0, 0, 0, 0, 0, 91, 92, 0, 0, 86, 0, 0, 33, 0, + 0, 93, 0, 0, 0, 0, 94, 0, 0, 0, 0, 49, 0, 0, 95, 0, + 0, 0, 0, 96, 97, 0, 0, 98, 0, 0, 99, 0, 0, 0,100, 0, + 0, 0,101, 0, 0, 0,102, 0, 0, 0, 0,103,104, 95, 0, 0, + 105, 0, 0, 0, 86, 0, 0,106, 0, 0, 0,107,108, 0, 0,109, + 110, 0, 0, 0, 0, 0, 0,111, 0, 0,112, 0, 0, 0, 0,113, + 33, 0,114,115,116, 57, 0, 0,117, 35, 0, 0,118, 0, 0, 0, + 119, 0, 0, 0, 0, 0, 0,120, 0, 0,121, 0, 0, 0, 0,122, + 90, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 52,123, 0, 0, 0, + 0,124, 0, 0,125, 0, 0, 0, 0,123, 0, 0,126, 0, 0, 0, + 0, 0, 81, 0, 0, 0, 0,127, 0, 0, 0,128, 0, 0, 0,129, + 0,130, 0, 0, 0, 0,131,132,133, 0,134, 0,135, 0, 0, 0, + 136,137,138, 0, 79, 0, 0, 0, 0, 0, 35, 0, 0, 0,139, 0, + 0, 0,140, 0, 0, 0,141, 0, 0, 0,142,143, 0,144, 0, 0, + 145, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, + 5, 6, 7, 4, 4, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, + 18, 1, 1, 1, 19, 1, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, + 25, 26, 27, 28, 29, 30, 0, 0, 1, 1, 31, 0, 0, 0, 32, 33, + 34, 35, 1, 36, 37, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, + 42, 0, 0, 0, 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 19, 1, + 21, 0, 0, 47, 0, 38, 48, 1, 1, 49, 49, 50, 0, 0, 51, 0, + 0, 19, 52, 1, 0, 0, 38, 14, 4, 1, 1, 1, 53, 21, 43, 52, + 54, 21, 35, 1, 0, 0, 0, 55, 0, 0, 0, 56, 57, 58, 0, 0, + 0, 0, 0, 59, 0, 60, 0, 0, 0, 0, 61, 62, 0, 0, 63, 0, + 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, 67, 0, + 0, 0, 68, 0, 0, 69, 70, 0, 71, 72, 73, 74, 75, 76, 0, 0, + 0, 77, 0, 0, 0, 78, 79, 0, 0, 0, 0, 47, 0, 0, 0, 49, + 0, 80, 0, 0, 0, 62, 0, 0, 63, 0, 0, 81, 0, 0, 82, 0, + 0, 0, 83, 0, 0, 19, 84, 0, 62, 0, 0, 0, 0, 49, 1, 85, + 1, 52, 15, 86, 36, 10, 21, 1, 1, 1, 1, 41, 1, 21, 87, 0, + 0, 55, 0, 0, 0, 0, 19, 10, 1, 0, 0, 0, 0, 0, 88, 0, + 0, 89, 0, 0, 88, 0, 0, 0, 0, 78, 0, 0, 90, 9, 12, 4, + 91, 8, 92, 47, 0, 58, 50, 0, 21, 1, 21, 93, 94, 1, 1, 1, + 1, 95, 96, 97, 98, 1, 99, 58, 81,100,101, 4, 58, 0, 0, 0, + 0, 0, 0, 19, 50, 0, 0, 0, 0, 0, 0, 61, 0, 0,102,103, + 0, 0,104, 0, 0, 1, 1, 50, 0, 0, 0, 38, 0, 63, 0, 0, + 0, 0, 0, 62, 0, 0,105, 68, 61, 0, 0, 0, 78, 0, 0, 0, + 106,107, 58, 38, 81, 0, 0, 0, 0, 0, 0,108, 1, 14, 4, 12, + 84, 0, 0, 0, 0, 38, 90, 0, 0, 0, 0,109, 0, 0,110, 61, + 0,111, 0, 0, 0, 1, 0, 0, 0, 0, 49, 50, 0, 0, 19, 58, + 0, 0,112, 51, 0,112, 14, 52,113, 41, 0, 0, 62, 0, 0, 61, + 0, 0,114, 0, 90, 0, 0, 0, 61, 62, 0, 0, 62, 0, 89, 0, + 0,114, 0, 0, 0, 0,115, 0, 0, 0, 78, 55, 0, 38, 1, 58, + 1, 58, 0, 0, 0, 0, 0, 88, 63, 89, 0, 0,116, 0, 0, 0, + 55, 0, 0, 0, 0,116, 0, 0, 0, 0, 61, 0, 0, 0, 0, 79, + 0, 61, 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, 79, 0, 0, 0, + 8, 92, 0, 0, 1, 90, 0, 0,117, 0, 0, 0, 0, 0, 0,118, + 0,119,120,121,122, 0,105, 4,123, 49, 23, 0, 0, 0, 38, 50, + 38, 58, 0, 0, 1, 90, 1, 1, 1, 1, 39, 1, 48,106, 90, 0, + 0, 0, 0, 1, 0, 0, 0,124, 0, 0, 0,113, 19, 59, 0, 38, + 0, 81, 0, 0, 4,123, 0, 0, 0, 1,125, 0, 0, 0, 0, 0, + 230,230,230,230,230,232,220,220,220,220,232,216,220,220,220,220, + 220,202,202,220,220,220,220,202,202,220,220,220, 1, 1, 1, 1, + 1,220,220,220,220,230,230,230,230,240,230,220,220,220,230,230, + 230,220,220, 0,230,230,230,220,220,220,220,230,232,220,220,230, + 233,234,234,233,234,234,233,230, 0, 0, 0,230, 0,220,230,230, + 230,230,220,230,230,230,222,220,230,230,220,220,230,222,228,230, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, + 0, 24, 25, 0,230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, + 28, 29, 30, 31, 32, 33, 34,230,230,220,220,230,220,230,230,220, + 35, 0, 0, 0, 0, 0,230,230,230, 0, 0,230,230, 0,220,230, + 230,220, 0, 0, 0, 36, 0, 0,230,220,230,230,220,220,230,220, + 220,230,220,230,220,230,230, 0, 0,220, 0, 0,230,230, 0,230, + 0,230,230,230,230,230, 0, 0, 0,220,220,220,230,220,220,220, + 230,230, 0,220, 27, 28, 29,230, 7, 0, 0, 0, 0, 9, 0, 0, + 0,230,220,230,230, 0, 0, 0, 0, 0,230, 0, 0, 84, 91, 0, + 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 9, 0,103,103, 9, 0, + 107,107,107,107,118,118, 9, 0,122,122,122,122,220,220, 0, 0, + 0,220, 0,220, 0,216, 0, 0, 0,129,130, 0,132, 0, 0, 0, + 0, 0,130,130,130,130, 0, 0,130, 0,230,230, 9, 0,230,230, + 0, 0,220, 0, 0, 0, 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, + 0,230, 0, 0, 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0, + 230, 0, 0,220,230,220, 0,220,230,230,230,234, 0, 0, 9, 9, + 0, 0, 7, 0,230,230,230, 0,230, 0, 1, 1, 1, 0, 0, 0, + 230,234,214,220,202,230,230,230,230,230,232,228,228,220,218,230, + 233,220,230,220,230,230, 1, 1, 1, 1, 1,230, 0, 1, 1,230, + 220,230, 1, 1, 0, 0,218,228,232,222,224,224, 0, 8, 8, 0, + 0, 0, 0,220,230, 0,230,230,220, 0, 0,230, 0, 0, 26, 0, + 0,220, 0,230,230, 1,220, 0, 0,230,220, 0, 0, 0,220,220, + 0, 0,230,220, 0, 9, 7, 0, 0, 7, 9, 0, 0, 0, 9, 7, + 6, 6, 0, 0, 0, 0, 1, 0, 0,216,216, 1, 1, 1, 0, 0, + 0,226,216,216,216,216,216, 0,220,220,220, 0,232,232,220,230, + 230,230, 7, 0, 16, 17, 17, 33, 17, 49, 17, 17, 84, 97,135,145, + 26, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,177, 0, 1, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 6, 7, 8, 3, - 3, 3, 3, 3, 9, 10, 11, 12, 13, 3, 3, 3, 3, 3, 3, 3, - 3, 14, 3, 15, 3, 3, 3, 3, 3, 3, 16, 17, 18, 19, 20, 21, - 3, 3, 3, 22, 23, 24, 3, 3, 3, 3, 3, 3, 25, 3, 3, 3, - 3, 3, 3, 3, 3, 26, 3, 3, 27, 28, 0, 1, 0, 0, 0, 0, - 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, - 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 9, 0, 9, 0, 0, - 0, 0, 0, 0, 0, 10, 11, 12, 13, 0, 0, 14, 15, 16, 6, 0, - 17, 18, 19, 19, 19, 20, 21, 22, 23, 24, 19, 25, 0, 26, 27, 19, - 19, 28, 29, 30, 0, 31, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, - 0, 19, 28, 0, 32, 33, 9, 34, 35, 19, 0, 0, 36, 37, 38, 39, - 40, 19, 0, 41, 42, 43, 44, 31, 0, 1, 45, 42, 0, 0, 0, 0, - 0, 32, 14, 14, 0, 0, 0, 0, 14, 0, 0, 46, 47, 47, 47, 47, - 48, 49, 47, 47, 47, 47, 50, 51, 52, 53, 43, 21, 0, 0, 0, 0, - 0, 0, 0, 54, 6, 55, 0, 14, 19, 1, 0, 0, 0, 0, 56, 57, - 0, 0, 0, 0, 0, 19, 58, 31, 0, 0, 0, 0, 0, 0, 0, 59, - 14, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 60, - 61, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, - 0, 4, 5, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 1, 1, 0, - 0, 8, 9, 0, 8, 9, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, - 0, 0, 13, 0, 0, 0, 0, 14, 15, 16, 17, 0, 0, 0, 1, 0, - 0, 18, 19, 0, 0, 0, 20, 0, 0, 0, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 0, 8, 21, 9, 0, 0, 22, 0, 0, 0, - 0, 1, 0, 23, 24, 25, 0, 0, 26, 0, 0, 0, 8, 21, 27, 0, - 1, 0, 0, 1, 1, 1, 1, 0, 1, 28, 29, 30, 0, 31, 32, 20, - 1, 1, 0, 0, 0, 8, 21, 9, 1, 4, 5, 0, 0, 0, 33, 9, - 0, 1, 1, 1, 0, 8, 21, 21, 21, 21, 34, 1, 35, 21, 21, 21, - 9, 36, 0, 0, 37, 38, 1, 0, 39, 0, 0, 0, 1, 0, 1, 0, - 0, 0, 0, 8, 21, 9, 1, 0, 0, 0, 40, 0, 8, 21, 21, 21, - 21, 21, 21, 21, 21, 9, 0, 1, 1, 1, 1, 8, 21, 21, 21, 9, - 0, 0, 0, 41, 0, 42, 43, 0, 0, 0, 1, 44, 0, 0, 0, 45, - 8, 9, 1, 0, 0, 0, 8, 21, 21, 21, 9, 0, 1, 0, 1, 1, - 8, 21, 21, 9, 0, 4, 5, 8, 9, 1, 0, 0, 0, 1, 2, 3, - 4, 5, 5, 5, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 9, 16, 17, 18, 9, 19, 20, 21, 22, 23, 24, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 25, 26, 27, 5, 28, 29, 5, 30, 31, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 32, 0, 0, 1, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1, 29, 30, 31, - 32, 32, 33, 32, 32, 32, 34, 32, 32, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 46, 46, - 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 44, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 95, - 95, 96, 97, 98, 56, 56, 56, 56, 56, 56, 56, 56, 56, 99,100,100, - 100,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,102,103,103,104, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,105, - 56, 56, 56, 56, 56, 56,106,106,107,108, 56,109,110,111,112,112, - 112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112, - 112,112,112,112,112,113,112,112,112,114,115,116, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,117,118,119, - 120, 56, 56, 56, 56, 56, 56, 56, 56, 56,121, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,122, 32,123,124,125,126, - 127,128,129,130,131,132,133,133,134, 56, 56, 56, 56,135,136,137, - 138, 56,139,140, 56,141,142,143, 56, 56,144,145,146, 56,147,148, - 149, 32, 32, 32,150,151,152, 32,153,154, 56, 56, 56, 56, 44, 44, - 44, 44, 44, 44,155, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44,156,157, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,158, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44,159, 44, 44,160, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 44, 44,161, 56, 56, 56, 56, 56, 44, 44, - 44,162, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44,163, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,164,165, - 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 0, 19, 0, - 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 0, 0, 0, 0, 0, - 26, 26, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, - 9, 9, 0, 9, 9, 9, 2, 2, 9, 9, 9, 9, 0, 9, 2, 2, - 2, 2, 9, 0, 9, 0, 9, 9, 9, 2, 9, 2, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 9, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 6, 2, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 2, 4, 4, 4, 2, 2, 4, 4, 4, 2, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 2, - 2, 2, 2, 2, 2, 2, 14, 14, 14, 2, 2, 2, 2, 14, 14, 14, - 14, 14, 14, 2, 2, 2, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, - 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, - 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 2, 37, 37, 37, 37, 2, 2, 37, 37, 37, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 2, 2, 2, 2, 2, 2, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 2, 2, 64, 64, 64, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 2, 2, 90, 90, - 90, 90, 90, 90, 90, 2, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 2, 2, 95, 2, 37, 37, 37, 2, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, - 0, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, - 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, 7, 5, 5, - 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 5, 5, 2, - 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, - 5, 5, 5, 5, 5, 5, 5, 2, 5, 2, 2, 2, 5, 5, 5, 5, - 2, 2, 5, 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, 2, 2, 2, - 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 5, 2, 5, 5, 5, - 5, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 11, - 11, 11, 2, 11, 11, 11, 11, 11, 11, 2, 2, 2, 2, 11, 11, 2, - 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, - 11, 11, 11, 11, 11, 11, 11, 2, 11, 11, 2, 11, 11, 2, 11, 11, - 2, 2, 11, 2, 11, 11, 11, 2, 2, 11, 11, 11, 2, 2, 2, 11, - 2, 2, 2, 2, 2, 2, 2, 11, 11, 11, 11, 2, 11, 2, 2, 2, - 2, 2, 2, 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, 2, 10, - 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10, - 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, - 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 2, 10, 10, 10, 10, 10, - 2, 2, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10, 2, 2, 10, 2, - 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 2, 2, 10, 10, 10, 10, - 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 2, 21, - 21, 21, 2, 21, 21, 21, 21, 21, 21, 21, 21, 2, 2, 21, 21, 2, - 2, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 2, - 21, 21, 21, 21, 21, 21, 21, 2, 21, 21, 2, 21, 21, 21, 21, 21, - 2, 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 21, 2, 2, 2, 2, - 2, 2, 2, 21, 21, 21, 2, 2, 2, 2, 21, 21, 2, 21, 21, 21, - 21, 21, 2, 2, 21, 21, 2, 2, 22, 22, 2, 22, 22, 22, 22, 22, - 22, 2, 2, 2, 22, 22, 22, 2, 22, 22, 22, 22, 2, 2, 2, 22, - 22, 2, 22, 2, 22, 22, 2, 2, 2, 22, 22, 2, 2, 2, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 2, 2, 2, 2, 22, 22, 22, 2, - 2, 2, 2, 2, 2, 22, 2, 2, 2, 2, 2, 2, 22, 22, 22, 22, - 22, 2, 2, 2, 2, 2, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 2, 23, 23, 23, 2, 23, 23, 23, 23, 23, 23, 23, 23, - 2, 2, 23, 23, 23, 23, 23, 2, 23, 23, 23, 23, 2, 2, 2, 2, - 2, 2, 2, 23, 23, 2, 23, 23, 23, 2, 2, 23, 2, 2, 23, 23, - 23, 23, 2, 2, 23, 23, 2, 2, 2, 2, 2, 2, 2, 23, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 2, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, - 2, 2, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 2, 2, 2, 2, - 2, 2, 2, 16, 16, 2, 16, 16, 16, 16, 2, 2, 16, 16, 2, 16, - 16, 16, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 2, 20, 20, 20, 2, 20, 20, 20, 20, 20, 20, 2, 2, - 2, 2, 20, 20, 20, 20, 20, 20, 20, 20, 2, 2, 20, 20, 2, 36, - 36, 36, 2, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 2, 2, 2, 36, 36, 36, 36, 36, 36, 36, 36, - 2, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 36, 2, 2, 2, 2, - 36, 2, 2, 2, 2, 36, 36, 36, 36, 36, 36, 2, 36, 2, 2, 2, - 2, 2, 2, 2, 36, 36, 2, 2, 36, 36, 36, 2, 2, 2, 2, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 2, 2, 2, 2, 0, 24, 24, 24, 24, 2, 2, 2, 2, 2, 18, - 18, 2, 18, 2, 18, 18, 18, 18, 18, 2, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 2, 18, 2, 18, 18, 18, - 18, 18, 18, 18, 2, 2, 18, 18, 18, 18, 18, 2, 18, 2, 18, 18, - 18, 18, 18, 18, 18, 2, 18, 18, 2, 2, 18, 18, 18, 18, 25, 25, - 25, 25, 25, 25, 25, 25, 2, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 2, 2, 2, 25, 25, 25, 25, 25, 2, 25, 25, 25, 25, - 25, 25, 25, 0, 0, 0, 0, 25, 25, 2, 2, 2, 2, 2, 33, 33, - 33, 33, 33, 33, 33, 33, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 2, 8, 2, 2, 2, 2, 2, 8, 2, 2, 8, 8, - 8, 0, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 2, 30, 30, 30, 30, 2, 2, 30, 30, - 30, 30, 30, 30, 30, 2, 30, 30, 30, 2, 2, 30, 30, 30, 30, 30, - 30, 30, 30, 2, 2, 2, 30, 30, 2, 2, 2, 2, 2, 2, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 2, 2, 28, 28, - 28, 28, 28, 28, 28, 28, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 2, 2, 2, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 0, 0, 0, 35, 35, 35, 2, 2, 2, 2, 2, 2, 2, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 0, 0, 2, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 2, 2, 2, 2, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 2, 46, 46, 46, 2, 46, 46, 2, 2, 2, 2, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 2, 2, 31, 31, - 2, 2, 2, 2, 2, 2, 32, 32, 0, 0, 32, 0, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 2, 2, 2, 2, 2, 2, 32, 2, - 2, 2, 2, 2, 2, 2, 32, 32, 32, 2, 2, 2, 2, 2, 28, 28, - 28, 28, 28, 28, 2, 2, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 2, 48, 48, 48, 48, 2, 2, 2, 2, 48, 2, - 2, 2, 48, 48, 48, 48, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 2, 2, 52, 52, 52, 52, 52, 2, 2, 2, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 2, 2, 2, 2, 58, 58, - 2, 2, 2, 2, 2, 2, 58, 58, 58, 2, 2, 2, 58, 58, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 2, 2, 54, 54, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 2, 91, 91, - 91, 91, 91, 2, 2, 91, 91, 91, 2, 2, 2, 2, 2, 2, 91, 91, - 91, 91, 91, 91, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 2, 62, 62, 76, 76, - 76, 76, 76, 76, 76, 76, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 2, 2, 2, 2, 2, 2, 2, 2, 93, 93, 93, 93, 70, 70, - 70, 70, 70, 70, 70, 70, 2, 2, 2, 70, 70, 70, 70, 70, 70, 70, - 2, 2, 2, 70, 70, 70, 73, 73, 73, 73, 73, 73, 73, 73, 6, 6, - 6, 2, 2, 2, 2, 2, 8, 8, 8, 2, 2, 8, 8, 8, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, - 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, - 0, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 9, 9, 9, 9, - 9, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 9, 9, 9, 9, - 19, 19, 19, 19, 9, 9, 9, 9, 9, 19, 19, 19, 19, 19, 6, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 9, 9, - 9, 9, 9, 9, 2, 2, 2, 9, 2, 9, 2, 9, 2, 9, 9, 9, - 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 2, 2, 9, 9, 9, 9, - 9, 9, 2, 9, 9, 9, 2, 2, 9, 9, 9, 2, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, 0, 19, 2, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 2, 19, 19, - 19, 19, 19, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, - 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, - 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 19, 0, - 0, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 2, 2, 2, 2, 2, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, - 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 56, 56, - 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 2, 2, 2, 2, 2, 55, - 55, 55, 55, 55, 55, 55, 61, 61, 61, 61, 61, 61, 61, 61, 2, 2, - 2, 2, 2, 2, 2, 61, 61, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 13, 13, - 13, 13, 13, 13, 2, 2, 0, 0, 0, 0, 0, 13, 0, 13, 0, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 12, 12, 13, 13, - 13, 13, 0, 0, 0, 0, 2, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 2, 2, 1, + 17, 17, 17,177, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 5, 3, + 3, 3, 3, 3, 6, 7, 8, 3, 3, 3, 3, 3, 9, 10, 11, 12, + 13, 3, 3, 3, 3, 3, 3, 3, 3, 14, 3, 15, 3, 3, 3, 3, + 3, 3, 16, 17, 18, 19, 20, 21, 3, 3, 3, 22, 23, 24, 3, 3, + 3, 3, 3, 3, 25, 3, 3, 3, 3, 3, 3, 3, 3, 26, 3, 3, + 27, 28, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, + 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, + 0, 0, 0, 9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, + 13, 0, 0, 14, 15, 16, 6, 0, 17, 18, 19, 19, 19, 20, 21, 22, + 23, 24, 19, 25, 0, 26, 27, 19, 19, 28, 29, 30, 0, 31, 0, 0, + 0, 8, 0, 0, 0, 0, 0, 0, 0, 19, 28, 0, 32, 33, 9, 34, + 35, 19, 0, 0, 36, 37, 38, 39, 40, 19, 0, 41, 42, 43, 44, 31, + 0, 1, 45, 42, 0, 0, 0, 0, 0, 32, 14, 14, 0, 0, 0, 0, + 14, 0, 0, 46, 47, 47, 47, 47, 48, 49, 47, 47, 47, 47, 50, 51, + 52, 53, 43, 21, 0, 0, 0, 0, 0, 0, 0, 54, 6, 55, 0, 14, + 19, 1, 0, 0, 0, 0, 56, 57, 0, 0, 0, 0, 0, 19, 58, 31, + 0, 0, 0, 0, 0, 0, 0, 59, 14, 0, 0, 0, 0, 1, 0, 2, + 0, 0, 0, 3, 0, 0, 0, 60, 61, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 2, 3, 0, 4, 5, 0, 0, 6, 0, 0, + 0, 7, 0, 0, 0, 1, 1, 0, 0, 8, 9, 0, 8, 9, 0, 0, + 0, 0, 8, 9, 10, 11, 12, 0, 0, 0, 13, 0, 0, 0, 0, 14, + 15, 16, 17, 0, 0, 0, 1, 0, 0, 18, 19, 0, 0, 0, 20, 0, + 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 8, + 21, 9, 0, 0, 22, 0, 0, 0, 0, 1, 0, 23, 24, 25, 0, 0, + 26, 0, 0, 0, 8, 21, 27, 0, 1, 0, 0, 1, 1, 1, 1, 0, + 1, 28, 29, 30, 0, 31, 32, 20, 1, 1, 0, 0, 0, 8, 21, 9, + 1, 4, 5, 0, 0, 0, 33, 9, 0, 1, 1, 1, 0, 8, 21, 21, + 21, 21, 34, 1, 35, 21, 21, 21, 9, 36, 0, 0, 37, 38, 1, 0, + 39, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 8, 21, 9, 1, 0, + 0, 0, 40, 0, 8, 21, 21, 21, 21, 21, 21, 21, 21, 9, 0, 1, + 1, 1, 1, 8, 21, 21, 21, 9, 0, 0, 0, 41, 0, 42, 43, 0, + 0, 0, 1, 44, 0, 0, 0, 45, 8, 9, 1, 0, 0, 0, 8, 21, + 21, 21, 9, 0, 1, 0, 1, 1, 8, 21, 21, 9, 0, 4, 5, 8, + 9, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 11, 11, 11, 11, 12, 13, + 13, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 13, 13, 13, + 24, 25, 26, 26, 26, 27, 13, 13, 13, 28, 29, 30, 13, 31, 32, 33, + 34, 35, 36, 37, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 38, 7, 7, 39, 7, 40, 7, 7, + 7, 41, 13, 42, 7, 7, 43, 7, 7, 7, 44, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 45, 0, 0, 1, 2, 2, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, 37, + 37, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 2, 2, 53, 54, 55, 56, 57, 58, 59, 59, 59, 59, 60, 59, + 59, 59, 59, 59, 59, 59, 61, 61, 59, 59, 59, 59, 62, 59, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 59, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 78, 69, 69, 69, 69, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, + 81, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 69, 69, 96, 97, 98, 99, 99, 99, + 100,101,102,103,104,105,106,107,108,109, 95,110,111,112,113,114, + 115,116,117,117,118,119,120,121,122,123,124,125,126,127,128,129, + 130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145, + 95,146,147,148,149, 95,150,151,152,153,154,155,156,157,158,159, + 160,161, 95,162,163,164,165,165,165,165,165,165,165,166,167,165, + 168, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95,169,170,170,170,170,170,170,170,170,171,170, + 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170, + 170,170,170,170,170,170,170,170,170,170,170,170,170,172,173,173, + 173,173,174, 95, 95, 95, 95, 95,175, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95,176,176,176,176,177,178,179,180, 95, 95, + 181, 95,182,183,184,185,186,186,186,186,186,186,186,186,186,186, + 186,186,186,186,186,186,186,186,186,186,186,186,187,187,187,188, + 189,190, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95,191,192,193,194,195,195,196, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,197,198, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 59,199, + 59, 59, 59,200,201,202, 59,203,204,205,206,207,208, 95,209,210, + 211, 59, 59,212, 59,213,214,214,214,214,214,215, 95, 95, 95, 95, + 95, 95, 95, 95,216, 95,217,218,219, 95, 95,220, 95, 95, 95,221, + 95,222, 95,223, 95,224,225,226,227, 95, 95, 95, 95, 95,228,229, + 230, 95,231,232, 95, 95,233,234, 59,235,236, 95, 59, 59, 59, 59, + 59, 59, 59,237, 59,238,239,240, 59, 59,241,242, 59,243, 95, 95, + 95, 95, 95, 95, 95, 95, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69,244, 69, 69,245, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69,246, 69, 69, 69, 69, 69, 69, 69, 69, 69,247, 69, 69, + 69, 69,248, 95, 95, 95, 69, 69, 69, 69,249, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 69, 69, 69, 69, 69, 69,250, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,251, 95, + 95, 95, 95, 95, 95, 95,252, 95,253,254, 0, 1, 2, 2, 0, 1, + 2, 2, 2, 3, 4, 5, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 0, 0, 0, 19, 0, 19, 0, 0, 0, 0, 0, + 26, 26, 1, 1, 1, 1, 9, 9, 9, 9, 0, 9, 9, 9, 2, 2, + 9, 9, 9, 9, 0, 9, 2, 2, 2, 2, 9, 0, 9, 0, 9, 9, + 9, 2, 9, 2, 9, 9, 9, 9, 2, 9, 9, 9, 55, 55, 55, 55, + 55, 55, 6, 6, 6, 6, 6, 1, 1, 6, 2, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 2, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 2, 2, 2, 2, 14, 14, 2, 2, 2, 3, 3, 3, 3, 3, 0, + 3, 3, 0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 1, 1, 1, + 3, 3, 1, 3, 3, 3, 37, 37, 37, 37, 37, 37, 2, 37, 37, 37, + 37, 2, 2, 37, 37, 37, 38, 38, 38, 38, 38, 38, 2, 2, 64, 64, + 64, 64, 64, 64, 64, 2, 2, 64, 64, 64, 90, 90, 90, 90, 90, 90, + 2, 2, 90, 90, 90, 2, 95, 95, 95, 95, 2, 2, 95, 2, 3, 3, + 2, 2, 2, 2, 2, 3, 3, 3, 0, 3, 7, 7, 7, 7, 7, 1, + 1, 1, 1, 7, 7, 7, 0, 0, 7, 7, 5, 5, 5, 5, 2, 5, + 5, 5, 5, 2, 2, 5, 5, 2, 5, 5, 5, 2, 5, 2, 2, 2, + 5, 5, 5, 5, 2, 2, 5, 5, 5, 2, 2, 2, 2, 5, 5, 5, + 2, 5, 2, 11, 11, 11, 11, 11, 11, 2, 2, 2, 2, 11, 11, 2, + 2, 11, 11, 11, 11, 11, 11, 2, 11, 11, 2, 11, 11, 2, 11, 11, + 2, 2, 2, 11, 2, 2, 11, 2, 11, 2, 2, 2, 11, 11, 2, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 2, 10, 10, 10, 10, + 2, 2, 10, 2, 2, 2, 2, 2, 10, 10, 2, 21, 21, 21, 21, 21, + 21, 21, 21, 2, 2, 21, 21, 2, 21, 21, 21, 21, 2, 2, 21, 21, + 2, 21, 2, 2, 21, 21, 2, 2, 22, 22, 2, 22, 22, 22, 22, 22, + 22, 2, 22, 2, 22, 22, 22, 22, 2, 2, 2, 22, 22, 2, 2, 2, + 2, 22, 22, 2, 2, 2, 22, 22, 22, 22, 23, 23, 23, 23, 23, 2, + 23, 23, 23, 23, 2, 2, 2, 23, 23, 2, 23, 23, 23, 2, 2, 2, + 23, 23, 2, 2, 2, 23, 16, 16, 16, 16, 16, 2, 16, 16, 2, 16, + 16, 16, 16, 16, 2, 2, 2, 16, 16, 2, 16, 16, 16, 2, 2, 2, + 16, 16, 20, 20, 20, 20, 20, 2, 20, 20, 2, 2, 20, 20, 2, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 2, 2, 36, 36, 36, 36, + 2, 36, 2, 36, 2, 2, 2, 2, 36, 2, 2, 2, 2, 36, 36, 2, + 36, 2, 36, 2, 2, 2, 2, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 2, 2, 2, 2, 0, 2, 18, 18, 2, 18, 2, 18, 18, 18, 18, + 18, 2, 18, 18, 18, 18, 2, 18, 2, 18, 18, 18, 2, 2, 18, 2, + 18, 2, 25, 25, 25, 25, 2, 25, 25, 25, 25, 2, 2, 2, 25, 2, + 25, 25, 25, 0, 0, 0, 0, 25, 25, 2, 33, 33, 33, 33, 8, 8, + 8, 8, 8, 8, 2, 8, 2, 8, 2, 2, 8, 8, 8, 0, 12, 12, + 12, 12, 30, 30, 30, 30, 30, 2, 30, 30, 30, 30, 2, 2, 30, 30, + 30, 2, 2, 30, 30, 30, 30, 2, 2, 2, 29, 29, 29, 29, 29, 29, + 2, 2, 28, 28, 28, 28, 34, 34, 34, 34, 34, 2, 2, 2, 35, 35, + 35, 35, 35, 35, 35, 0, 0, 0, 35, 35, 35, 2, 2, 2, 45, 45, + 45, 45, 45, 45, 2, 2, 2, 2, 2, 45, 44, 44, 44, 44, 44, 0, + 0, 2, 43, 43, 43, 43, 46, 46, 46, 46, 46, 2, 46, 46, 31, 31, + 31, 31, 31, 31, 2, 2, 32, 32, 0, 0, 32, 0, 32, 32, 32, 32, + 32, 32, 32, 32, 2, 2, 32, 2, 2, 2, 32, 32, 32, 2, 28, 28, + 2, 2, 48, 48, 48, 48, 48, 48, 48, 2, 48, 2, 2, 2, 52, 52, + 52, 52, 52, 52, 2, 2, 52, 2, 2, 2, 58, 58, 58, 58, 58, 58, + 2, 2, 58, 58, 58, 2, 2, 2, 58, 58, 54, 54, 54, 54, 2, 2, + 54, 54, 91, 91, 91, 91, 91, 91, 91, 2, 91, 2, 2, 91, 91, 91, + 2, 2, 1, 1, 2, 2, 62, 62, 62, 62, 62, 2, 62, 62, 76, 76, + 76, 76, 93, 93, 93, 93, 70, 70, 70, 70, 2, 2, 2, 70, 70, 70, + 2, 2, 2, 70, 70, 70, 73, 73, 73, 73, 6, 6, 6, 2, 8, 8, + 8, 2, 2, 8, 8, 8, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, + 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 19, 19, 9, 9, 9, 9, + 9, 6, 19, 9, 9, 9, 9, 9, 19, 19, 9, 9, 9, 19, 6, 19, + 19, 19, 19, 19, 19, 9, 9, 9, 2, 2, 2, 9, 2, 9, 2, 9, + 9, 9, 1, 1, 0, 0, 0, 2, 0, 0, 0, 19, 2, 2, 0, 0, + 0, 19, 0, 0, 0, 2, 19, 2, 2, 2, 0, 0, 2, 2, 1, 2, + 2, 2, 0, 0, 9, 0, 0, 0, 19, 19, 27, 27, 27, 27, 2, 2, + 0, 0, 56, 56, 56, 56, 2, 55, 55, 55, 61, 61, 61, 61, 2, 2, + 2, 61, 61, 2, 2, 2, 13, 13, 13, 13, 13, 13, 2, 13, 13, 13, + 2, 2, 0, 13, 0, 13, 0, 13, 13, 13, 13, 13, 1, 1, 1, 1, + 12, 12, 2, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 2, 2, 1, 1, 0, 0, 15, 15, 15, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 17, 17, 17, 2, 2, - 2, 2, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, - 2, 2, 2, 2, 2, 0, 12, 12, 12, 12, 12, 12, 12, 0, 17, 17, - 17, 17, 17, 17, 17, 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 2, 2, 2, 39, 39, 39, 39, 39, 39, 39, 2, 86, 86, - 86, 86, 86, 86, 86, 86, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 2, 2, 2, 2, 79, 79, 79, 79, 79, 79, 79, 79, 0, 0, - 19, 19, 19, 19, 19, 19, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 2, 2, 19, 19, 2, 19, 2, 19, 19, 19, 2, 2, - 19, 19, 19, 19, 19, 19, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 2, 2, 2, 65, 65, 65, 65, 65, 65, 65, 65, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 2, 2, 2, 2, - 2, 2, 2, 2, 75, 75, 75, 75, 2, 2, 2, 2, 2, 2, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 0, 69, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 74, 12, 12, 12, 12, 12, 2, 2, 2, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 2, 0, 84, 84, - 2, 2, 2, 2, 84, 84, 33, 33, 33, 33, 33, 33, 33, 2, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 68, 68, - 68, 68, 68, 68, 2, 2, 68, 68, 2, 2, 68, 68, 68, 68, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 2, 2, 2, 2, 2, 2, 2, - 2, 92, 92, 92, 92, 92, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 2, 2, 30, 30, 30, 30, 30, 30, 2, 19, 19, - 19, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 19, 19, 19, 19, - 0, 0, 2, 2, 2, 2, 87, 87, 87, 87, 87, 87, 2, 2, 87, 87, - 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, - 2, 12, 12, 12, 12, 12, 13, 13, 2, 2, 2, 2, 2, 2, 19, 19, - 19, 19, 19, 19, 19, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2, - 2, 2, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 14, 14, - 14, 14, 14, 2, 14, 2, 14, 14, 2, 14, 14, 2, 14, 14, 3, 3, - 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, - 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 6, 6, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, - 17, 17, 17, 17, 0, 0, 2, 2, 12, 12, 12, 12, 12, 12, 2, 2, - 12, 12, 12, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 2, 49, 49, 49, 2, 49, 49, 2, 49, 49, 49, - 49, 49, 49, 49, 2, 2, 49, 49, 49, 2, 2, 2, 2, 2, 0, 0, - 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 2, 2, 2, 9, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 1, 2, 2, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 2, 2, 2, 67, 67, 67, 67, 67, 67, 67, 67, 67, 2, - 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 2, 2, 2, 2, 2,118,118,118,118,118,118,118,118,118,118, - 118, 2, 2, 2, 2, 2, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 2, 53, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 2, 2, 2, 2, 59, 59, 59, 59, 59, 59, 2, 2, 40, 40, - 40, 40, 40, 40, 40, 40, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 2, 2, 50, 50, - 2, 2, 2, 2, 2, 2,135,135,135,135,135,135,135,135,135,135, - 135,135, 2, 2, 2, 2,106,106,106,106,106,106,106,106,104,104, - 104,104,104,104,104,104,104,104,104,104, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2,104,161,161,161,161,161,161,161,161,161,161, - 161, 2,161,161,161,161,161,161,161, 2,161,161, 2,161,161,161, - 2,161,161,161,161,161,161,161, 2,161,161, 2, 2, 2,170,170, - 170,170,170,170,170,170,170,170,170,170, 2, 2, 2, 2,110,110, - 110,110,110,110,110,110,110,110,110,110,110,110,110, 2,110,110, - 110,110,110,110, 2, 2, 19, 19, 19, 19, 19, 19, 2, 19, 19, 2, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 2, 2, 2, 2, 2, 47, 47, - 47, 47, 47, 47, 2, 2, 47, 2, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 2, 47, 47, 2, - 2, 2, 47, 2, 2, 47, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 2, 81,120,120,120,120,120,120,120,120,116,116, - 116,116,116,116,116,116,116,116,116,116,116,116,116, 2, 2, 2, - 2, 2, 2, 2, 2,116,128,128,128,128,128,128,128,128,128,128, - 128, 2,128,128, 2, 2, 2, 2, 2,128,128,128,128,128, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 2, 2, 2, 66, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, 2, 2, 2, 2, 2, 72, 98, 98, - 98, 98, 98, 98, 98, 98, 97, 97, 97, 97, 97, 97, 97, 97, 2, 2, - 2, 2, 97, 97, 97, 97, 2, 2, 97, 97, 97, 97, 97, 97, 57, 57, - 57, 57, 2, 57, 57, 2, 2, 2, 2, 2, 57, 57, 57, 57, 57, 57, - 57, 57, 2, 57, 57, 57, 2, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 2, 2, 57, 57, - 57, 2, 2, 2, 2, 57, 57, 2, 2, 2, 2, 2, 2, 2, 88, 88, - 88, 88, 88, 88, 88, 88,117,117,117,117,117,117,117,117,112,112, - 112,112,112,112,112,112,112,112,112,112,112,112,112, 2, 2, 2, - 2,112,112,112,112,112, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 2, 2, 2, 78, 78, 78, 78, 78, 78, 78, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 2, 2, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 2, 2, 2, 2, 2,122,122, - 122,122,122,122,122,122,122,122, 2, 2, 2, 2, 2, 2, 2,122, - 122,122,122, 2, 2, 2, 2,122,122,122,122,122,122,122, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 2, 2, 2, 2, 2, 2, 2,130,130, - 130,130,130,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, - 130,130,130,130,130,130,144,144,144,144,144,144,144,144,144,144, - 2, 2, 2, 2, 2, 2,165,165,165,165,165,165,165,165,165,165, - 165,165,165,165, 2, 2, 2,165,165,165,165,165,165,165, 2, 2, - 2, 2, 2, 2,165,165,156,156,156,156,156,156,156,156,156,156, - 2,156,156,156, 2, 2,156,156, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,147,147, - 147,147,147,147,147,147,148,148,148,148,148,148,148,148,148,148, - 2, 2, 2, 2, 2, 2,158,158,158,158,158,158,158,158,158,158, - 2, 2, 2, 2, 2, 2,153,153,153,153,153,153,153,153,153,153, - 153,153, 2, 2, 2, 2,149,149,149,149,149,149,149,149,149,149, - 149,149,149,149,149, 2, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 2, 2, 2, 2, 94, 94, 94, 94, 94, 94, 2, 2, - 2, 2, 2, 2, 2, 94, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85, 2, 2,101,101, - 101,101,101,101,101,101,101, 2, 2, 2, 2, 2, 2, 2,101,101, - 2, 2, 2, 2, 2, 2, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 2, 96, 96,111,111,111,111,111,111,111,111,111,111, - 111,111,111,111,111, 2,100,100,100,100,100,100,100,100, 2, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 2, 2,108,108, - 108,108,108,108,108,108,108,108, 2,108,108,108,108,108,108,108, - 2, 2, 2, 2, 2, 2,129,129,129,129,129,129,129, 2,129, 2, - 129,129,129,129, 2,129,129,129,129,129,129,129,129,129,129,129, - 129,129,129,129, 2,129,129,129, 2, 2, 2, 2, 2, 2,109,109, - 109,109,109,109,109,109,109,109,109, 2, 2, 2, 2, 2,109,109, - 2, 2, 2, 2, 2, 2,107,107,107,107, 2,107,107,107,107,107, - 107,107,107, 2, 2,107,107, 2, 2,107,107,107,107,107,107,107, - 107,107,107,107,107,107,107, 2,107,107,107,107,107,107,107, 2, - 107,107, 2,107,107,107,107,107, 2, 1,107,107,107,107,107, 2, - 2,107,107,107, 2, 2,107, 2, 2, 2, 2, 2, 2,107, 2, 2, - 2, 2, 2,107,107,107,107,107,107,107, 2, 2,107,107,107,107, - 107,107,107, 2, 2, 2,171,171,171,171,171,171,171,171,171,171, - 2,171, 2, 2,171, 2,171,171,171,171,171,171, 2,171,171, 2, - 171, 2, 2,171, 2,171,171,171,171, 2,171,171,171,171,171, 2, - 2, 2, 2, 2, 2, 2, 2,171,171, 2, 2, 2, 2, 2,137,137, - 137,137,137,137,137,137,137,137,137,137, 2,137,137,137,137,137, - 2, 2, 2, 2, 2, 2,124,124,124,124,124,124,124,124,124,124, - 2, 2, 2, 2, 2, 2,123,123,123,123,123,123,123,123,123,123, - 123,123,123,123, 2, 2,114,114,114,114,114,114,114,114,114,114, - 114,114,114, 2, 2, 2,114,114, 2, 2, 2, 2, 2, 2, 32, 32, - 32, 32, 32, 2, 2, 2,102,102,102,102,102,102,102,102,102,102, - 2, 2, 2, 2, 2, 2, 33, 33, 33, 33, 2, 2, 2, 2,126,126, - 126,126,126,126,126,126,126,126,126, 2, 2,126,126,126,126,126, - 126,126, 2, 2, 2, 2,126,126,126,126,126,126,126, 2,142,142, - 142,142,142,142,142,142,142,142,142,142, 2, 2, 2, 2,125,125, - 125,125,125,125,125,125,125,125,125, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2,125,154,154,154,154,154,154,154, 2, 2,154, - 2, 2,154,154,154,154,154,154,154,154, 2,154,154, 2,154,154, - 154,154,154,154,154,154,154,154,154,154,154,154, 2,154,154, 2, - 2,154,154,154,154,154,154,154, 2, 2, 2, 2, 2, 2,150,150, - 150,150,150,150,150,150, 2, 2,150,150,150,150,150,150,150,150, - 150,150,150, 2, 2, 2,141,141,141,141,141,141,141,141,140,140, - 140,140,140,140,140,140,140,140,140, 2, 2, 2, 2, 2,121,121, - 121,121,121,121,121,121,121, 2, 2, 2, 2, 2, 2, 2, 7, 7, - 2, 2, 2, 2, 2, 2,169,169,169,169,169,169,169,169,169,169, - 2, 2, 2, 2, 2, 2,133,133,133,133,133,133,133,133,133, 2, - 133,133,133,133,133,133,133,133,133,133,133,133,133, 2,133,133, - 133,133,133,133, 2, 2,133,133,133,133,133, 2, 2, 2,134,134, - 134,134,134,134,134,134, 2, 2,134,134,134,134,134,134, 2,134, - 134,134,134,134,134,134,134,134,134,134,134,134,134, 2,138,138, - 138,138,138,138,138, 2,138,138, 2,138,138,138,138,138,138,138, - 138,138,138,138,138,138, 2, 2,138, 2,138,138, 2,138,138,138, - 2, 2, 2, 2, 2, 2,143,143,143,143,143,143, 2,143,143, 2, - 143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143, - 143,143,143,143,143, 2,143,143, 2,143,143,143,143,143,143, 2, - 2, 2, 2, 2, 2, 2,143,143, 2, 2, 2, 2, 2, 2,145,145, - 145,145,145,145,145,145,145, 2, 2, 2, 2, 2, 2, 2,163,163, - 163,163,163,163,163,163,163, 2,163,163,163,163,163,163,163,163, - 163, 2, 2, 2,163,163,163,163,163, 2, 2, 2, 2, 2, 86, 2, - 2, 2, 2, 2, 2, 2, 22, 22, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 22, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 2, 2, 2, 2, 2, 2, 63, 63, 63, 63, 63, 63, 63, 2, 63, 63, - 63, 63, 63, 2, 2, 2, 63, 63, 63, 63, 2, 2, 2, 2,157,157, - 157,157,157,157,157,157,157,157,157, 2, 2, 2, 2, 2, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 2, 2, 80, 80, - 80, 2, 2, 2, 2, 2,127,127,127,127,127,127,127,127,127,127, - 127,127,127,127,127, 2,166,166,166,166,166,166,166,166,166,166, - 2, 2, 2, 2, 2, 2, 79, 2, 2, 2, 2, 2, 2, 2,115,115, - 115,115,115,115,115,115,115,115,115,115,115,115,115, 2,115,115, - 2, 2, 2, 2,115,115,159,159,159,159,159,159,159,159,159,159, - 159,159,159,159,159, 2,159,159, 2, 2, 2, 2, 2, 2,103,103, - 103,103,103,103,103,103,103,103,103,103,103,103, 2, 2,119,119, - 119,119,119,119,119,119,119,119,119,119,119,119, 2, 2,119,119, - 2,119,119,119,119,119, 2, 2, 2, 2, 2,119,119,119,167,167, - 167,167,167,167,167,167,167,167, 2, 2, 2, 2, 2, 2,146,146, - 146,146,146,146,146,146,146,146,146, 2, 2, 2, 2, 2, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 2, 2, 2, 2, 99, 2, 2, - 2, 2, 2, 2, 2, 99,136,139, 13, 13,155, 2, 2, 2,136,136, - 136,136,136,136,136,136,155,155,155,155,155,155,155,155,155,155, - 155,155,155,155, 2, 2, 2, 2, 2, 2, 2, 2, 2,155,136, 2, - 2, 2, 2, 2, 2, 2, 17, 17, 17, 17, 2, 17, 17, 17, 17, 17, - 17, 17, 2, 17, 17, 2, 17, 15, 15, 15, 15, 15, 15, 15, 17, 17, - 17, 2, 2, 2, 2, 2, 2, 2, 15, 2, 2, 2, 2, 2, 15, 15, - 15, 2, 2, 17, 2, 2, 2, 2, 2, 2, 17, 17, 17, 17,139,139, - 139,139,139,139,139,139,139,139,139,139, 2, 2, 2, 2,105,105, - 105,105,105,105,105,105,105,105,105, 2, 2, 2, 2, 2,105,105, - 105,105,105, 2, 2, 2,105, 2, 2, 2, 2, 2, 2, 2,105,105, - 2, 2,105,105,105,105, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 2, - 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, - 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, - 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, - 0, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0,131,131,131,131,131,131,131,131,131,131, - 131,131, 2, 2, 2, 2, 2, 2, 2,131,131,131,131,131, 2,131, - 131,131,131,131,131,131, 2, 2, 2, 2, 2, 19, 19, 19, 56, 56, - 56, 56, 56, 56, 56, 2, 56, 2, 2, 56, 56, 56, 56, 56, 56, 56, - 2, 56, 56, 2, 56, 56, 56, 56, 56, 2, 2, 2, 2, 2, 6, 6, - 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,151,151, - 151,151,151,151,151,151,151,151,151,151,151, 2, 2, 2,151,151, - 151,151,151,151, 2, 2,151,151, 2, 2, 2, 2,151,151,160,160, - 160,160,160,160,160,160,160,160,160,160,160,160,160, 2,152,152, - 152,152,152,152,152,152,152,152, 2, 2, 2, 2, 2,152,164,164, - 164,164,164,164,164,164,164,164, 2, 2, 2, 2, 2, 2,168,168, - 168,168,168,168,168,168,168,168,168, 2, 2, 2, 2,168, 30, 30, - 30, 30, 2, 30, 30, 2,113,113,113,113,113,113,113,113,113,113, - 113,113,113, 2, 2,113,113,113,113,113,113,113,113, 2,132,132, - 132,132,132,132,132,132,132,132,132,132, 2, 2, 2, 2,132,132, - 2, 2, 2, 2,132,132, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, - 3, 2, 3, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 3, 3, 3, 3, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, - 3, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 3, 3, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 3, - 3, 3, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 0, 15, 0, 0, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 13, 2, - 2, 2, 2, 2, 2, 2, 13, 13, 13, 2, 2, 2, 2, 2, 2, 0, - 2, 2, 2, 2, 2, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 9, 9, 9, 10, 9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 17, 0, 2, 26, 26, 26, 26, 26, 26, 26, 2, 12, 12, 12, 12, 12, + 12, 2, 12, 12, 12, 0, 39, 39, 39, 39, 39, 2, 2, 2, 39, 39, + 39, 2, 86, 86, 86, 86, 77, 77, 77, 77, 79, 79, 79, 79, 2, 19, + 19, 19, 60, 60, 60, 60, 60, 2, 2, 2, 65, 65, 65, 65, 75, 75, + 75, 75, 75, 75, 2, 2, 2, 2, 75, 75, 69, 69, 69, 69, 69, 69, + 0, 69, 74, 74, 74, 74, 2, 2, 2, 74, 12, 2, 2, 2, 84, 84, + 84, 84, 84, 84, 2, 0, 84, 84, 2, 2, 2, 2, 84, 84, 33, 33, + 33, 2, 68, 68, 68, 68, 68, 68, 68, 2, 68, 68, 2, 2, 92, 92, + 92, 92, 92, 92, 92, 2, 2, 2, 2, 92, 87, 87, 87, 87, 87, 87, + 87, 2, 19, 9, 19, 19, 19, 19, 0, 0, 87, 87, 2, 2, 2, 2, + 2, 12, 19, 19, 19, 2, 2, 2, 2, 4, 14, 2, 14, 2, 14, 14, + 2, 14, 14, 2, 14, 14, 3, 3, 0, 0, 1, 1, 6, 6, 3, 2, + 3, 3, 3, 2, 2, 0, 2, 0, 0, 0, 0, 0, 17, 17, 17, 17, + 0, 0, 2, 2, 12, 12, 49, 49, 49, 49, 2, 49, 49, 49, 49, 49, + 49, 2, 49, 49, 2, 49, 49, 49, 2, 2, 0, 2, 2, 2, 9, 2, + 2, 2, 0, 1, 2, 2, 71, 71, 71, 71, 71, 2, 2, 2, 67, 67, + 67, 67, 67, 2, 2, 2, 42, 42, 42, 42, 2, 42, 42, 42, 41, 41, + 41, 41, 41, 41, 41, 2,118,118,118,118,118,118,118, 2, 53, 53, + 53, 53, 53, 53, 2, 53, 59, 59, 59, 59, 59, 59, 2, 2, 40, 40, + 40, 40, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 2, 2,135,135, + 135,135,106,106,106,106,104,104,104,104, 2, 2, 2,104,161,161, + 161,161,161,161,161, 2,161,161, 2,161,161, 2, 2, 2,170,170, + 170,170,110,110,110,110,110,110,110, 2,110,110, 2, 2, 19, 19, + 2, 19, 19, 2, 19, 19, 47, 47, 47, 47, 47, 47, 2, 2, 47, 2, + 47, 47, 47, 47, 2, 47, 47, 2, 2, 2, 47, 2, 2, 47, 81, 81, + 81, 81, 81, 81, 2, 81,120,120,120,120,116,116,116,116,116,116, + 116, 2, 2, 2, 2,116,128,128,128,128,128,128,128, 2,128,128, + 2, 2, 2, 2, 2,128, 66, 66, 66, 66, 2, 2, 2, 66, 72, 72, + 72, 72, 72, 72, 2, 2, 2, 2, 2, 72,173,173,173,173,173,173, + 2, 2, 98, 98, 98, 98, 97, 97, 97, 97, 2, 2, 97, 97, 57, 57, + 57, 57, 2, 57, 57, 2, 2, 57, 57, 57, 57, 57, 2, 2, 57, 57, + 57, 2, 2, 2, 2, 57, 57, 2, 2, 2, 88, 88, 88, 88,117,117, + 117,117,112,112,112,112,112,112,112, 2, 2, 2, 2,112, 78, 78, + 78, 78, 78, 78, 2, 2, 2, 78, 78, 78, 83, 83, 83, 83, 83, 83, + 2, 2, 82, 82, 82, 82, 82, 82, 82, 2,122,122,122,122,122,122, + 2, 2, 2,122,122,122,122, 2, 2, 2, 89, 89, 89, 89, 89, 2, + 2, 2,130,130,130,130,130,130,130, 2, 2, 2,130,130,144,144, + 144,144,144,144, 2, 2,165,165,165,165,165,165, 2, 2, 2,165, + 165,165, 2, 2,165,165, 3, 3, 3, 2,156,156,156,156,156,156, + 2,156,156,156, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2,147,147, + 147,147,148,148,148,148,148,148, 2, 2,158,158,158,158,158,158, + 2, 2,153,153,153,153,149,149,149,149,149,149,149, 2, 94, 94, + 94, 94, 94, 94, 2, 2, 2, 2, 94, 94, 2, 2, 2, 94, 85, 85, + 85, 85, 85, 85, 85, 2, 2, 85, 2, 2,101,101,101,101,101, 2, + 2, 2,101,101, 2, 2, 96, 96, 96, 96, 96, 2, 96, 96,111,111, + 111,111,111,111,111, 2,100,100,100,100,108,108,108,108,108,108, + 2,108,108,108, 2, 2,129,129,129,129,129,129,129, 2,129, 2, + 129,129,129,129, 2,129,129,129, 2, 2,109,109,109,109,109,109, + 109, 2,109,109, 2, 2,107,107,107,107, 2,107,107,107,107, 2, + 2,107,107, 2,107,107,107,107, 2, 1,107,107, 2, 2,107, 2, + 2, 2, 2, 2, 2,107, 2, 2,107,107,171,171,171,171,171,171, + 2,171, 2, 2,171, 2,171, 2,171, 2, 2,171, 2,171,171,171, + 171, 2,171, 2, 2, 2, 2,171,171, 2,137,137,137,137, 2,137, + 137,137,137,137, 2, 2,124,124,124,124,124,124, 2, 2,123,123, + 123,123,123,123, 2, 2,114,114,114,114,114, 2, 2, 2,114,114, + 2, 2,102,102,102,102,102,102, 2, 2,126,126,126,126,126,126, + 126, 2, 2,126,126,126,142,142,142,142,125,125,125,125,125,125, + 125, 2, 2, 2, 2,125,154,154,154,154,154,154,154, 2, 2,154, + 2, 2, 2,154,154, 2,154,154, 2,154,154, 2, 2,154,154,154, + 2, 2,150,150,150,150, 2, 2,150,150,150, 2, 2, 2,141,141, + 141,141,140,140,140,140,140,140,140, 2,121,121,121,121,121, 2, + 2, 2, 7, 7, 2, 2,169,169,169,169,169,169, 2, 2,133,133, + 133,133,133, 2,133,133,133,133,133, 2,133,133, 2, 2,133, 2, + 2, 2,134,134,134,134, 2, 2,134,134, 2,134,134,134,134,134, + 134, 2,138,138,138,138,138,138,138, 2,138,138, 2,138, 2, 2, + 138, 2,138,138, 2, 2,143,143,143,143,143,143, 2,143,143, 2, + 143,143,143,143,143, 2,143, 2, 2, 2,143,143, 2, 2,175,175, + 175,175,175,175, 2, 2,145,145,145,145,145, 2, 2, 2,163,163, + 163,163,163, 2,163,163,163,163,163, 2, 2, 2,163,163, 86, 2, + 2, 2, 63, 63, 63, 63, 63, 63, 2, 2, 63, 63, 63, 2, 63, 2, + 2, 2,157,157,157,157,157,157,157, 2, 80, 80, 80, 80, 80, 80, + 2, 2, 80, 80, 80, 2,127,127,127,127,127,127,127, 2,166,166, + 166,166,166,166, 2, 2, 79, 2, 2, 2,115,115,115,115,115,115, + 115, 2,115,115, 2, 2, 2, 2,115,115,159,159,159,159,159,159, + 159, 2,159,159, 2, 2,103,103,103,103,103,103, 2, 2,119,119, + 119,119,119,119, 2, 2,119,119, 2,119, 2,119,119,119,167,167, + 167,167,167,167, 2, 2,146,146,146,146,146,146,146, 2,172,172, + 172,172,172, 2, 2,172, 99, 99, 99, 99, 99, 99, 99, 2, 2, 2, + 2, 99,136,139, 13, 13,155, 2, 2, 2, 13, 13, 13, 2,136,136, + 136,136,155,155,155,155,155,155, 2, 2, 2, 2, 2,155,136,136, + 136, 2, 2, 17, 17, 17, 2, 17, 17, 2, 17, 15, 15, 15, 17, 17, + 17, 2, 2, 2, 15, 2, 2, 17, 2, 2,139,139,139,139,105,105, + 105,105,105,105,105, 2,105, 2, 2, 2,105,105, 2, 2, 1, 1, + 1, 2, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 2, 2, + 0, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2,131,131, + 131,131, 2, 2, 2,131, 2,131,131,131, 56, 56, 56, 2, 56, 2, + 2, 56, 56, 56, 2, 56, 56, 2, 56, 56, 6, 6, 2, 2, 2, 2, + 2, 6,151,151,151,151,151, 2, 2, 2,151,151, 2, 2, 2, 2, + 151,151,160,160,160,160,160,160,160, 2,152,152,152,152,152,152, + 2, 2, 2, 2, 2,152,164,164,164,164,164,164, 2, 2,168,168, + 168,168,168,168,168, 2, 2, 2, 2,168,174,174,174,174,174,174, + 174, 2,174,174, 2, 2, 2, 2,174,174, 2, 30, 30, 2,113,113, + 113,113,113, 2, 2,113,113,113,113, 2,132,132,132,132,132,132, + 2, 2, 2, 2,132,132, 2, 3, 3, 3, 2, 3, 3, 2, 3, 2, + 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, + 2, 3, 15, 0, 0, 2, 0, 2, 2, 0, 13, 2, 2, 2, 2, 0, + 2, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 10, + 9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 16, 17, 9, 9, 9, 9, 18, 9, 9, 9, 9, 9, 19, 20, - 21, 9, 22, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 23, 9, 9, 9, 9, 9, 24, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 25, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 16, 17, + 9, 9, 9, 9, 18, 9, 9, 9, 9, 9, 19, 20, 21, 9, 22, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 23, 9, 9, 9, 9, 9, 24, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 25, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, @@ -3934,66 +3605,65 @@ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 24, 25, 26, 27, 28, - 29, 30, 0, 0, 31, 32, 0, 33, 0, 34, 0, 35, 0, 0, 0, 0, - 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 43, 44, 0, 45, 0, 0, 0, 0, 0, 0, - 46, 47, 0, 0, 0, 0, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 52, 0, 0, - 53, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, - 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, 65, - 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67, 68, 0, 69, 70, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99,100,101,102,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,104, 0, 0, 0, 0, 0, 0,105,106, 0, - 107, 0, 0, 0,108, 0,109, 0,110, 0,111,112,113, 0,114, 0, - 0, 0,115, 0, 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,118,119,120,121, 0,122,123,124, - 125,126, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,128,129,130,131,132,133,134,135,136,137,138,139, - 140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155, - 156,157, 0, 0, 0,158,159,160,161, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 162, 0,163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164,165, 0, - 0, 0, 0, 0, 0, 0,166, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,167, 0, 0, 0,168,169, 0, 0, - 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,171, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,174, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,175, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,176,177, 0, 0, 0, 0,178, - 179, 0, 0, 0,180,181,182,183,184,185,186,187,188,189,190,191, - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, - 208,209,210,211,212,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 3, 4, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 26, 27, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 23, 0, 0, 24, 25, 26, 27, 28, 29, 30, 0, 0, + 31, 32, 0, 33, 0, 34, 0, 35, 0, 0, 0, 0, 36, 37, 38, 39, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 42, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 43, 44, 0, 45, 0, 0, 0, 0, 0, 0, 46, 47, 0, 0, + 0, 0, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 51, 0, 0, 0, 52, 0, 0, 53, 0, 0, 0, + 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, 0, + 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 67, 68, 0, 69, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102, + 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,104, 0, 0, 0, 0, 0, 0,105,106, 0,107, 0, 0, 0, + 108, 0,109, 0,110, 0,111,112,113, 0,114, 0, 0, 0,115, 0, + 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,118,119,120,121, 0,122,123,124,125,126, 0,127, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, + 144,145,146,147,148,149,150,151,152,153,154,155,156,157, 0, 0, + 0,158,159,160,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,162, 0,163, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,164,165, 0, 0, 0, 0, 0, + 0, 0,166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,167, 0, 0, 0,168,169, 0, 0,170, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,171, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,175, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,176,177, 0, 0, 0, 0,178,179, 0, 0, 0, + 180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195, + 196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211, + 212,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, }; -static const uint16_t -_hb_ucd_u16[9668] = +static const uint16_t _hb_ucd_u16[10904]= { 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12, 13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23, @@ -4020,23 +3690,23 @@ 48, 184, 48, 185, 48, 186, 187, 188, 48, 48, 48, 189, 190, 191, 192, 193, 194, 192, 48, 48, 195, 48, 48, 196, 197, 48, 198, 48, 48, 48, 48, 199, 48, 200, 201, 202, 203, 48, 204, 205, 48, 48, 206, 48, 207, 208, 209, 209, - 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 140, 140, 140, - 217, 48, 48, 218, 219, 160, 220, 221, 222, 48, 223, 64, 48, 48, 224, 225, - 48, 48, 226, 227, 228, 64, 48, 229, 230, 9, 9, 231, 232, 233, 234, 235, - 11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 32, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 240, 13, 13, 13, 13, 13, 13, - 241, 242, 241, 241, 242, 243, 241, 244, 245, 245, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 272, 273, 274, 275, 209, 276, 277, 209, 278, - 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, - 280, 209, 281, 209, 209, 209, 209, 282, 209, 283, 279, 284, 209, 285, 286, 209, - 209, 209, 176, 140, 287, 140, 271, 271, 271, 288, 209, 209, 209, 209, 289, 271, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 290, 291, 209, 209, 292, - 209, 209, 209, 209, 209, 209, 293, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 294, 295, 271, 296, 209, 209, 297, 279, 298, 279, + 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 32, 216, 217, 140, + 218, 48, 48, 219, 220, 160, 221, 222, 223, 48, 224, 64, 48, 48, 225, 226, + 48, 48, 227, 228, 229, 64, 48, 230, 231, 9, 9, 232, 233, 234, 235, 236, + 11, 11, 237, 27, 27, 27, 238, 239, 11, 240, 27, 27, 32, 32, 32, 32, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 241, 13, 13, 13, 13, 13, 13, + 242, 243, 242, 242, 243, 244, 242, 245, 246, 246, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 273, 274, 275, 276, 209, 277, 278, 209, 279, + 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, + 281, 209, 282, 209, 209, 209, 209, 283, 209, 284, 280, 285, 209, 286, 287, 209, + 209, 209, 176, 140, 288, 140, 272, 272, 272, 289, 209, 209, 209, 209, 290, 272, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 291, 292, 209, 209, 293, + 209, 209, 209, 209, 209, 209, 294, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 295, 296, 272, 297, 209, 209, 298, 280, 299, 280, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 279, 279, 279, 279, 279, 279, 279, 279, 299, 300, 279, 279, 279, 301, 279, 302, - 209, 209, 209, 279, 303, 209, 209, 304, 209, 305, 209, 209, 209, 209, 209, 209, + 280, 280, 280, 280, 280, 280, 280, 280, 300, 301, 280, 280, 280, 302, 280, 303, + 209, 209, 209, 280, 304, 209, 209, 305, 209, 209, 209, 209, 209, 209, 209, 209, 9, 9, 9, 11, 11, 11, 306, 307, 13, 13, 13, 13, 13, 13, 308, 309, 11, 11, 310, 48, 48, 48, 311, 312, 48, 313, 314, 314, 314, 314, 32, 32, 315, 316, 317, 318, 319, 320, 140, 140, 209, 321, 209, 209, 209, 209, 209, 322, @@ -4046,7 +3716,7 @@ 209, 333, 334, 209, 335, 336, 209, 209, 334, 209, 209, 336, 209, 209, 209, 209, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 209, 209, 209, 209, 48, 337, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 338, 48, 48, 229, + 48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 338, 48, 48, 230, 339, 48, 340, 140, 13, 13, 341, 342, 13, 343, 48, 48, 48, 48, 344, 345, 31, 346, 347, 348, 13, 13, 13, 349, 350, 351, 352, 353, 354, 355, 140, 356, 357, 48, 358, 359, 48, 48, 48, 360, 361, 48, 48, 362, 363, 192, 32, 364, @@ -4062,1560 +3732,407 @@ 32, 404, 32, 405, 406, 407, 408, 409, 48, 48, 48, 48, 48, 48, 48, 410, 411, 2, 3, 4, 5, 412, 413, 414, 48, 415, 48, 200, 416, 417, 418, 419, 420, 48, 172, 421, 204, 204, 140, 140, 48, 48, 48, 48, 48, 48, 48, 71, - 422, 271, 271, 423, 272, 272, 272, 424, 425, 426, 427, 140, 140, 209, 209, 428, + 422, 272, 272, 423, 273, 273, 273, 424, 425, 426, 427, 140, 140, 209, 209, 428, 140, 140, 140, 140, 140, 140, 140, 140, 48, 151, 48, 48, 48, 100, 429, 430, 48, 48, 431, 48, 432, 48, 48, 433, 48, 434, 48, 48, 435, 436, 140, 140, 9, 9, 437, 11, 11, 48, 48, 48, 48, 204, 192, 9, 9, 438, 11, 439, 48, 48, 440, 48, 48, 48, 441, 442, 442, 443, 444, 445, 48, 48, 48, 388, 48, 48, 48, 313, 48, 199, 440, 140, 446, 27, 27, 447, 140, 140, 140, 140, 448, 48, 48, 449, 48, 450, 48, 451, 48, 200, 452, 140, 140, 140, 48, 453, - 48, 454, 48, 455, 140, 140, 140, 140, 48, 48, 48, 456, 271, 457, 271, 271, + 48, 454, 48, 455, 48, 207, 140, 140, 48, 48, 48, 456, 272, 457, 272, 272, 458, 459, 48, 460, 461, 462, 48, 463, 48, 464, 140, 140, 465, 48, 466, 467, 48, 48, 48, 468, 48, 469, 48, 470, 48, 471, 472, 140, 140, 140, 140, 140, 48, 48, 48, 48, 196, 140, 140, 140, 9, 9, 9, 473, 11, 11, 11, 474, 48, 48, 475, 192, 476, 9, 477, 11, 478, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 271, 479, 48, 48, 480, 481, 482, 140, 140, 483, - 48, 464, 484, 48, 62, 485, 140, 48, 486, 140, 140, 48, 487, 140, 48, 313, - 488, 48, 48, 489, 490, 457, 491, 492, 222, 48, 48, 493, 494, 48, 196, 192, - 495, 48, 496, 497, 498, 48, 48, 499, 222, 48, 48, 500, 501, 502, 503, 504, - 48, 97, 505, 506, 507, 140, 140, 140, 508, 509, 510, 48, 48, 511, 512, 192, - 513, 83, 84, 514, 515, 516, 517, 518, 519, 48, 48, 520, 521, 522, 523, 140, - 48, 48, 48, 524, 525, 526, 481, 140, 48, 48, 48, 527, 528, 192, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 529, 530, 531, 532, 140, 140, - 48, 48, 48, 533, 534, 192, 535, 140, 48, 48, 536, 537, 192, 538, 539, 140, - 48, 540, 541, 542, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 48, 48, 505, 543, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 544, - 545, 546, 48, 547, 548, 192, 140, 140, 140, 140, 549, 48, 48, 550, 551, 140, - 552, 48, 48, 553, 554, 555, 48, 48, 556, 557, 558, 48, 48, 48, 48, 196, - 559, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 560, 192, - 84, 48, 529, 561, 562, 148, 175, 563, 48, 564, 565, 566, 140, 140, 140, 140, - 567, 48, 48, 568, 569, 192, 570, 48, 571, 572, 192, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 573, - 574, 115, 48, 575, 576, 577, 140, 140, 140, 140, 140, 100, 271, 578, 579, 580, + 140, 140, 140, 140, 140, 140, 272, 479, 48, 48, 480, 481, 482, 483, 140, 484, + 48, 464, 485, 48, 62, 486, 140, 48, 487, 140, 140, 48, 488, 140, 48, 313, + 489, 48, 48, 490, 491, 457, 492, 493, 223, 48, 48, 494, 495, 48, 196, 192, + 496, 48, 497, 498, 499, 48, 48, 500, 223, 48, 48, 501, 502, 503, 504, 505, + 48, 97, 506, 507, 508, 140, 140, 140, 509, 510, 511, 48, 48, 512, 513, 192, + 514, 83, 84, 515, 516, 517, 518, 519, 520, 48, 48, 521, 522, 523, 524, 140, + 48, 48, 48, 525, 526, 527, 481, 140, 48, 48, 48, 528, 529, 192, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 530, 531, 532, 533, 140, 140, + 48, 48, 48, 534, 535, 192, 536, 140, 48, 48, 537, 538, 192, 539, 540, 140, + 48, 541, 542, 543, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 506, 544, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 545, + 546, 547, 48, 548, 549, 192, 140, 140, 140, 140, 550, 48, 48, 551, 552, 140, + 553, 48, 48, 554, 555, 556, 48, 48, 557, 558, 559, 48, 48, 48, 48, 196, + 560, 140, 140, 140, 140, 140, 561, 140, 140, 140, 140, 140, 48, 48, 562, 192, + 84, 48, 530, 563, 564, 148, 175, 565, 48, 566, 567, 568, 140, 140, 140, 140, + 569, 48, 48, 570, 571, 192, 572, 48, 573, 574, 192, 48, 48, 575, 192, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 576, + 577, 115, 48, 578, 579, 580, 140, 140, 140, 140, 140, 100, 272, 581, 582, 583, 48, 48, 48, 48, 48, 48, 48, 48, 48, 207, 140, 140, 140, 140, 140, 140, - 272, 272, 272, 272, 272, 272, 581, 582, 48, 48, 48, 48, 48, 48, 48, 48, + 273, 273, 273, 273, 273, 273, 584, 585, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 388, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 583, - 48, 48, 48, 584, 585, 586, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 586, + 48, 48, 48, 587, 588, 589, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 71, 48, 48, 48, 48, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 48, 587, 588, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 589, - 48, 48, 48, 590, 591, 592, 593, 594, 48, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 595, 48, 596, 192, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 9, 9, 11, 11, 271, 597, 140, 140, 140, 140, 140, 140, - 48, 48, 48, 48, 598, 599, 600, 600, 601, 602, 140, 140, 140, 140, 603, 604, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 440, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 140, 605, - 196, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 606, - 48, 48, 607, 608, 140, 609, 610, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 590, 591, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 592, + 48, 48, 48, 593, 594, 595, 596, 597, 48, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 598, 48, 599, 192, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 9, 9, 11, 11, 272, 600, 9, 601, 11, 602, 140, 140, + 48, 48, 48, 48, 603, 604, 605, 605, 606, 607, 140, 140, 140, 140, 608, 609, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 140, 610, + 48, 200, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 48, 611, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 612, + 48, 48, 611, 613, 140, 614, 615, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 206, - 48, 48, 48, 48, 48, 48, 71, 151, 196, 611, 612, 140, 140, 140, 140, 140, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 192, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140, 140, - 32, 32, 613, 32, 614, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140, + 48, 48, 48, 48, 48, 48, 71, 151, 196, 616, 617, 140, 140, 140, 140, 140, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 618, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 619, 209, 427, 209, 620, + 32, 32, 216, 32, 621, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 323, - 209, 209, 615, 209, 209, 209, 616, 617, 618, 209, 619, 209, 209, 209, 287, 140, - 209, 209, 209, 209, 620, 140, 140, 140, 140, 140, 140, 140, 271, 621, 271, 621, - 209, 209, 209, 209, 209, 338, 271, 461, 140, 140, 140, 140, 140, 140, 140, 140, - 9, 622, 11, 623, 624, 625, 241, 9, 626, 627, 628, 629, 630, 9, 622, 11, - 631, 632, 11, 633, 634, 635, 636, 9, 637, 11, 9, 622, 11, 623, 624, 11, - 241, 9, 626, 636, 9, 637, 11, 9, 622, 11, 638, 9, 639, 640, 641, 642, - 11, 643, 9, 644, 645, 646, 647, 11, 648, 9, 649, 11, 650, 538, 538, 538, - 32, 32, 32, 651, 32, 32, 652, 653, 654, 655, 45, 140, 140, 140, 140, 140, - 656, 657, 658, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 659, 660, 661, 27, 27, 27, 662, 140, 663, 140, 140, 140, 140, 140, 140, 140, - 48, 48, 151, 664, 665, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 666, 140, 48, 48, 667, 668, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 669, 192, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 587, 670, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 671, 200, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 672, 614, 140, 140, - 9, 9, 626, 11, 673, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 503, 271, 271, 674, 675, 140, 140, 140, 140, - 503, 271, 676, 677, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 678, 48, 679, 680, 681, 682, 683, 684, 685, 206, 686, 206, 140, 140, 140, 687, - 209, 209, 688, 209, 209, 209, 209, 209, 209, 322, 333, 689, 689, 689, 209, 323, - 690, 209, 209, 209, 209, 209, 209, 209, 209, 209, 691, 140, 140, 140, 692, 209, - 693, 209, 209, 688, 694, 695, 323, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 696, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 697, 426, 426, - 209, 209, 209, 209, 209, 209, 209, 698, 209, 209, 209, 209, 209, 176, 688, 427, - 688, 209, 209, 209, 699, 176, 209, 209, 699, 209, 691, 688, 695, 140, 140, 140, - 209, 209, 209, 209, 209, 322, 691, 426, 700, 209, 209, 209, 701, 702, 176, 694, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 703, 209, 209, 209, 209, 209, 192, + 209, 209, 622, 209, 209, 209, 623, 624, 625, 209, 626, 209, 209, 209, 288, 140, + 209, 209, 209, 209, 627, 140, 140, 140, 140, 140, 140, 140, 272, 628, 272, 628, + 209, 209, 209, 209, 209, 338, 272, 461, 140, 140, 140, 140, 140, 140, 140, 140, + 9, 629, 11, 630, 631, 632, 242, 9, 633, 634, 635, 636, 637, 9, 629, 11, + 638, 639, 11, 640, 641, 642, 643, 9, 644, 11, 9, 629, 11, 630, 631, 11, + 242, 9, 633, 643, 9, 644, 11, 9, 629, 11, 645, 9, 646, 647, 648, 649, + 11, 650, 9, 651, 652, 653, 654, 11, 655, 9, 656, 11, 657, 539, 539, 539, + 32, 32, 32, 658, 32, 32, 659, 660, 661, 662, 45, 140, 140, 140, 140, 140, + 663, 664, 665, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 666, 667, 668, 27, 27, 27, 669, 140, 670, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 151, 671, 672, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 673, 140, 48, 48, 674, 675, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 676, 192, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 590, 677, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 200, 678, 679, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 680, 200, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 681, 621, 140, 140, + 9, 9, 633, 11, 682, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 504, 272, 272, 683, 684, 140, 140, 140, 140, + 504, 272, 685, 686, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 687, 48, 688, 689, 690, 691, 692, 693, 694, 206, 695, 206, 140, 140, 140, 696, + 209, 209, 697, 209, 209, 209, 209, 209, 209, 322, 333, 698, 698, 698, 209, 323, + 699, 209, 209, 209, 209, 209, 209, 209, 209, 209, 700, 140, 140, 140, 701, 209, + 702, 209, 209, 697, 703, 704, 323, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 705, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 706, 426, 426, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 176, 697, 427, + 697, 209, 209, 209, 707, 176, 209, 209, 707, 209, 700, 697, 704, 708, 140, 140, + 209, 209, 209, 209, 209, 707, 700, 426, 709, 209, 209, 209, 710, 711, 712, 703, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 713, 209, 209, 209, 209, 209, 714, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140, - 48, 48, 48, 207, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 481, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 100, 48, 48, 48, 48, 48, 48, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 71, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140, 140, 140, 140, - 704, 140, 584, 584, 584, 584, 584, 584, 140, 140, 140, 140, 140, 140, 140, 140, + 48, 48, 48, 48, 48, 48, 48, 207, 140, 140, 140, 140, 140, 140, 140, 140, + 715, 140, 587, 587, 587, 587, 587, 587, 140, 140, 140, 140, 140, 140, 140, 140, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 140, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 705, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 706, - 0, 0, 1, 1, 0, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 5, 0, 6, 7, 7, 7, 8, 9, 10, 11, 12, - 13, 13, 13, 13, 14, 13, 13, 13, 13, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 23, 23, 26, 23, 27, 28, 29, 23, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 23, 23, 39, 40, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 82, 86, 86, 87, 88, 89, 90, 91, 82, - 92, 92, 92, 92, 92, 93, 94, 95, 96, 96, 96, 96, 96, 96, 96, 96, - 97, 97, 98, 97, 99, 100, 101, 97, 102, 97, 103, 104, 105, 106, 106, 107, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 109, 110, 110, 111, - 112, 113, 114, 115, 116, 116, 117, 118, 119, 120, 120, 121, 120, 122, 108, 123, - 124, 125, 126, 127, 128, 129, 130, 116, 131, 132, 133, 134, 135, 136, 137, 82, - 138, 138, 139, 138, 140, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 4, 151, 152, 153, 4, 154, 7, 7, 155, 11, 156, 157, 11, 158, 159, 160, - 161, 0, 0, 162, 163, 0, 164, 165, 0, 166, 167, 4, 168, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 170, 0, 0, 0, 0, 0, - 171, 171, 171, 171, 171, 171, 171, 171, 0, 0, 0, 172, 173, 0, 0, 0, - 174, 174, 174, 4, 175, 175, 175, 176, 93, 177, 178, 179, 180, 181, 181, 13, - 0, 0, 182, 82, 183, 184, 184, 185, 184, 184, 184, 184, 184, 184, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 96, 96, 198, 199, 0, 200, - 201, 0, 0, 202, 0, 0, 203, 204, 194, 194, 205, 0, 0, 0, 0, 0, - 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 0, 0, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 207, 206, 208, 209, - 210, 210, 210, 210, 210, 210, 210, 210, 210, 211, 13, 13, 13, 212, 212, 213, - 0, 214, 4, 4, 215, 4, 216, 217, 218, 219, 220, 221, 222, 222, 223, 40, - 224, 225, 226, 227, 228, 228, 229, 230, 231, 232, 233, 92, 234, 234, 235, 236, - 237, 238, 239, 240, 106, 106, 241, 242, 96, 96, 96, 96, 96, 243, 244, 245, - 82, 82, 82, 82, 82, 82, 82, 82, 184, 184, 184, 246, 184, 184, 247, 82, - 248, 249, 250, 23, 23, 23, 251, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 252, 23, 23, 253, 23, 254, 255, 256, 257, 258, 259, 23, 23, 23, 260, - 261, 1, 1, 262, 263, 201, 264, 265, 266, 267, 268, 82, 269, 269, 269, 270, - 271, 272, 11, 11, 273, 274, 187, 275, 82, 82, 82, 82, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 82, 287, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 302, 302, 302, 302, 302, 302, 302, - 302, 303, 304, 305, 306, 307, 82, 82, 308, 309, 310, 311, 312, 313, 82, 314, - 315, 316, 82, 82, 317, 318, 319, 320, 321, 322, 323, 324, 325, 82, 326, 327, - 328, 329, 330, 331, 332, 333, 82, 82, 334, 334, 335, 82, 336, 337, 336, 338, - 339, 340, 341, 342, 343, 82, 82, 82, 82, 82, 82, 344, 345, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 357, 358, 359, 360, 360, 361, 362, - 363, 364, 365, 366, 367, 367, 367, 368, 369, 370, 371, 82, 372, 373, 374, 375, - 376, 377, 378, 379, 380, 381, 382, 383, 384, 384, 385, 386, 387, 387, 388, 82, - 82, 82, 82, 82, 389, 390, 391, 82, 392, 392, 393, 394, 395, 396, 397, 398, - 399, 400, 401, 82, 82, 82, 82, 82, 402, 403, 82, 82, 82, 404, 404, 405, - 406, 407, 408, 82, 82, 409, 410, 411, 412, 412, 413, 414, 414, 415, 416, 417, - 418, 82, 82, 82, 82, 82, 419, 420, 421, 422, 423, 424, 425, 426, 82, 82, - 427, 428, 429, 430, 431, 432, 82, 82, 82, 82, 82, 82, 82, 82, 82, 433, - 434, 435, 436, 82, 82, 437, 438, 439, 440, 440, 440, 440, 440, 440, 440, 440, - 440, 440, 440, 440, 441, 82, 82, 82, 440, 440, 440, 442, 440, 440, 440, 440, - 440, 440, 443, 82, 82, 82, 82, 82, 82, 82, 82, 82, 444, 445, 445, 446, - 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 448, 447, 447, 447, 447, 447, - 447, 447, 447, 447, 447, 447, 447, 449, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 450, 451, 82, 82, 82, 82, 82, 452, 453, 82, 82, 82, 82, 82, 82, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 454, 455, 456, 457, 458, 459, 460, - 461, 461, 462, 463, 464, 82, 82, 82, 82, 82, 465, 466, 82, 82, 82, 82, - 82, 82, 467, 467, 468, 82, 82, 82, 469, 469, 470, 469, 471, 82, 82, 472, - 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 474, - 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 476, 477, - 478, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 479, - 480, 191, 191, 191, 191, 191, 191, 191, 191, 481, 482, 483, 484, 484, 484, 484, - 484, 484, 484, 484, 484, 484, 484, 485, 486, 486, 486, 487, 488, 489, 82, 82, - 0, 0, 0, 0, 0, 0, 0, 490, 0, 0, 0, 0, 0, 491, 82, 82, - 7, 492, 493, 0, 0, 0, 489, 82, 0, 0, 0, 0, 0, 0, 0, 494, - 0, 495, 0, 496, 497, 498, 0, 170, 11, 11, 499, 82, 82, 82, 491, 491, - 0, 0, 500, 501, 82, 82, 82, 82, 0, 0, 502, 0, 503, 504, 505, 0, - 506, 507, 508, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 509, 0, 0, - 0, 0, 0, 0, 0, 0, 510, 0, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 512, 513, 82, 82, 514, 515, 82, 82, 82, 82, 82, 82, - 516, 517, 13, 518, 519, 82, 82, 82, 520, 521, 522, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 523, 524, 525, 526, 82, 82, 82, 82, 82, 82, 527, 528, - 82, 82, 82, 82, 82, 82, 529, 530, 82, 82, 82, 82, 82, 82, 82, 531, - 532, 532, 532, 532, 532, 532, 533, 82, 534, 534, 535, 82, 82, 82, 82, 82, - 82, 82, 82, 536, 0, 537, 82, 82, 261, 182, 82, 82, 82, 82, 82, 82, - 538, 539, 540, 541, 542, 543, 82, 544, 0, 545, 0, 0, 491, 546, 547, 494, - 0, 0, 0, 0, 0, 548, 82, 549, 550, 551, 552, 553, 82, 82, 82, 82, - 0, 0, 0, 0, 0, 0, 554, 555, 0, 0, 0, 556, 0, 0, 490, 557, - 545, 0, 558, 0, 559, 560, 561, 82, 0, 0, 491, 562, 563, 0, 564, 565, - 0, 0, 0, 0, 258, 0, 0, 490, 184, 184, 184, 184, 184, 184, 184, 82, - 184, 247, 184, 184, 184, 184, 184, 184, 566, 184, 184, 184, 184, 184, 184, 184, - 184, 184, 184, 184, 184, 567, 184, 184, 184, 184, 184, 184, 184, 184, 184, 568, - 184, 184, 566, 82, 82, 82, 82, 82, 566, 82, 82, 82, 82, 82, 82, 82, - 184, 184, 569, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 570, 82, 82, - 571, 0, 0, 0, 82, 82, 82, 82, 7, 7, 7, 7, 7, 7, 7, 572, - 0, 0, 0, 0, 1, 2, 2, 3, 0, 4, 0, 4, 2, 2, 5, 2, - 2, 2, 2, 2, 2, 2, 2, 6, 7, 8, 0, 0, 9, 9, 9, 9, - 9, 9, 10, 11, 12, 13, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, - 16, 17, 14, 14, 18, 18, 18, 18, 19, 18, 18, 18, 18, 18, 20, 21, - 21, 21, 22, 20, 21, 21, 21, 21, 21, 23, 24, 25, 25, 25, 25, 25, - 25, 26, 25, 25, 25, 27, 28, 26, 29, 30, 31, 32, 31, 31, 31, 31, - 33, 34, 35, 31, 31, 31, 36, 31, 31, 31, 31, 29, 37, 38, 37, 37, - 37, 37, 37, 37, 37, 39, 31, 31, 40, 40, 40, 40, 40, 40, 41, 26, - 42, 42, 42, 42, 42, 42, 42, 43, 44, 44, 44, 44, 44, 45, 44, 46, - 47, 47, 47, 48, 37, 49, 31, 31, 31, 50, 51, 31, 52, 31, 31, 31, - 53, 53, 53, 53, 53, 53, 54, 53, 55, 53, 53, 53, 56, 57, 58, 59, - 59, 60, 61, 62, 57, 63, 64, 65, 66, 59, 59, 67, 68, 69, 70, 71, - 71, 72, 73, 74, 69, 75, 76, 77, 78, 71, 79, 26, 80, 81, 82, 83, - 83, 84, 85, 86, 81, 87, 88, 26, 89, 83, 90, 91, 92, 93, 94, 95, - 95, 96, 97, 98, 93, 99, 100, 101, 102, 95, 95, 26, 103, 104, 105, 106, - 107, 104, 108, 109, 104, 105, 110, 26, 111, 108, 108, 112, 113, 114, 115, 113, - 113, 115, 113, 116, 114, 117, 118, 119, 120, 113, 121, 113, 122, 123, 124, 122, - 122, 124, 125, 126, 123, 127, 128, 128, 129, 122, 130, 26, 131, 132, 133, 131, - 131, 131, 131, 131, 132, 133, 134, 131, 135, 131, 131, 131, 136, 137, 138, 139, - 137, 137, 140, 141, 138, 142, 143, 137, 144, 137, 145, 26, 146, 147, 147, 147, - 147, 147, 147, 148, 147, 147, 147, 149, 26, 26, 26, 26, 150, 151, 152, 152, - 153, 152, 152, 154, 155, 156, 152, 157, 158, 158, 158, 158, 158, 159, 158, 158, - 158, 160, 159, 158, 158, 158, 158, 159, 158, 158, 158, 161, 158, 161, 162, 163, - 164, 164, 164, 164, 165, 165, 165, 165, 166, 167, 165, 165, 165, 165, 165, 168, - 169, 169, 169, 169, 170, 170, 170, 170, 170, 171, 172, 171, 170, 171, 170, 170, - 170, 170, 171, 172, 171, 170, 172, 170, 170, 170, 171, 170, 170, 170, 170, 173, - 170, 170, 170, 174, 170, 170, 170, 175, 176, 176, 176, 176, 176, 176, 177, 177, - 178, 178, 178, 178, 179, 179, 179, 180, 181, 181, 181, 181, 181, 182, 181, 183, - 184, 184, 185, 186, 187, 187, 188, 26, 189, 189, 190, 26, 191, 192, 193, 26, - 194, 194, 194, 194, 194, 194, 194, 195, 194, 196, 194, 196, 197, 198, 198, 199, - 198, 198, 198, 198, 198, 198, 198, 200, 198, 201, 178, 178, 178, 178, 202, 26, - 203, 203, 203, 204, 203, 205, 203, 205, 206, 203, 207, 207, 207, 208, 209, 26, - 210, 210, 210, 210, 210, 211, 210, 210, 210, 212, 210, 213, 214, 214, 214, 215, - 216, 216, 216, 216, 216, 216, 216, 217, 216, 216, 216, 218, 216, 219, 216, 219, - 216, 220, 9, 9, 9, 221, 26, 26, 222, 222, 222, 222, 222, 223, 222, 222, - 224, 224, 224, 224, 225, 225, 225, 225, 225, 225, 226, 227, 228, 228, 228, 228, - 228, 228, 228, 229, 228, 230, 231, 231, 231, 231, 231, 231, 18, 232, 165, 165, - 165, 165, 165, 233, 224, 26, 234, 9, 235, 236, 237, 238, 239, 240, 2, 2, - 2, 2, 2, 241, 242, 243, 2, 244, 2, 2, 2, 245, 14, 14, 246, 246, - 246, 246, 14, 247, 14, 14, 14, 246, 14, 14, 248, 14, 248, 14, 249, 250, - 14, 14, 251, 252, 0, 253, 0, 0, 254, 0, 255, 256, 0, 257, 2, 258, - 259, 26, 9, 9, 9, 9, 260, 26, 261, 262, 4, 0, 0, 263, 0, 0, - 2, 264, 0, 0, 0, 265, 26, 26, 0, 266, 26, 26, 267, 267, 267, 267, - 0, 0, 268, 0, 0, 0, 269, 0, 270, 270, 270, 270, 17, 17, 17, 17, - 17, 17, 271, 272, 166, 167, 273, 273, 273, 273, 273, 273, 273, 274, 275, 274, - 170, 170, 172, 26, 172, 172, 172, 172, 0, 0, 0, 276, 277, 277, 277, 278, - 277, 277, 277, 277, 277, 277, 279, 26, 277, 277, 280, 26, 26, 26, 0, 0, - 281, 0, 0, 0, 282, 283, 0, 284, 285, 286, 286, 286, 286, 286, 286, 286, - 286, 286, 287, 288, 289, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 291, - 292, 293, 293, 293, 293, 293, 294, 169, 169, 295, 0, 0, 293, 293, 293, 293, - 276, 296, 290, 290, 169, 169, 169, 295, 169, 169, 169, 297, 0, 0, 290, 290, - 290, 290, 290, 298, 290, 290, 290, 0, 299, 299, 299, 299, 299, 300, 299, 299, - 301, 26, 302, 302, 302, 302, 302, 302, 303, 303, 303, 303, 303, 304, 26, 26, - 305, 305, 305, 305, 305, 305, 305, 26, 306, 2, 2, 2, 2, 307, 2, 2, - 2, 308, 309, 258, 26, 26, 310, 2, 311, 311, 311, 311, 311, 312, 0, 265, - 313, 313, 313, 313, 313, 313, 313, 26, 314, 314, 314, 314, 315, 316, 314, 317, - 318, 318, 318, 318, 318, 319, 320, 320, 320, 320, 321, 322, 169, 169, 169, 323, - 324, 324, 324, 324, 324, 325, 324, 326, 164, 164, 164, 327, 328, 328, 328, 328, - 328, 328, 329, 26, 328, 330, 328, 331, 332, 332, 332, 332, 333, 26, 26, 334, - 335, 335, 336, 26, 337, 337, 337, 26, 172, 172, 2, 2, 2, 2, 2, 338, - 339, 340, 176, 176, 335, 335, 335, 335, 335, 341, 335, 342, 343, 26, 169, 169, - 295, 344, 169, 169, 169, 169, 169, 343, 277, 280, 277, 277, 277, 277, 277, 345, - 346, 26, 347, 348, 25, 25, 349, 350, 351, 25, 31, 31, 352, 26, 353, 31, - 31, 31, 31, 354, 31, 31, 355, 31, 31, 356, 26, 26, 26, 26, 31, 31, - 9, 9, 0, 265, 9, 357, 0, 0, 0, 0, 358, 0, 257, 359, 360, 31, - 31, 31, 31, 361, 362, 0, 0, 0, 363, 290, 289, 290, 290, 290, 290, 364, - 365, 365, 365, 366, 257, 257, 26, 367, 368, 369, 368, 368, 370, 368, 368, 371, - 368, 372, 368, 372, 368, 368, 368, 368, 368, 368, 368, 373, 374, 0, 0, 0, - 0, 0, 375, 0, 14, 252, 0, 376, 377, 26, 26, 26, 0, 0, 0, 378, - 379, 379, 379, 380, 381, 381, 381, 381, 381, 381, 382, 26, 383, 0, 0, 359, - 384, 384, 384, 384, 385, 386, 387, 387, 387, 388, 389, 389, 389, 389, 389, 390, - 391, 391, 391, 392, 393, 393, 393, 393, 394, 393, 395, 26, 396, 396, 396, 396, - 396, 396, 397, 397, 397, 397, 397, 397, 398, 398, 398, 399, 398, 400, 401, 401, - 401, 401, 402, 401, 401, 401, 401, 402, 403, 403, 403, 403, 403, 26, 404, 404, - 404, 404, 404, 404, 405, 406, 407, 408, 407, 408, 409, 407, 410, 407, 410, 411, - 412, 412, 412, 412, 412, 412, 413, 26, 414, 414, 414, 414, 414, 414, 415, 26, - 414, 414, 416, 26, 414, 26, 26, 26, 417, 2, 2, 2, 2, 2, 418, 419, - 420, 421, 422, 422, 422, 422, 423, 424, 425, 425, 426, 425, 427, 427, 427, 427, - 428, 428, 428, 429, 430, 428, 26, 26, 431, 431, 432, 433, 434, 434, 434, 435, - 436, 436, 436, 437, 438, 438, 438, 438, 439, 439, 439, 440, 439, 439, 441, 439, - 439, 439, 439, 439, 442, 443, 444, 445, 446, 446, 447, 448, 446, 449, 446, 449, - 450, 450, 450, 450, 451, 451, 451, 451, 452, 452, 452, 452, 453, 454, 453, 26, - 455, 455, 455, 455, 455, 455, 456, 457, 458, 458, 459, 458, 460, 460, 461, 460, - 462, 462, 463, 464, 26, 465, 26, 26, 466, 466, 466, 466, 466, 467, 26, 26, - 468, 468, 468, 468, 468, 468, 469, 26, 468, 468, 469, 470, 471, 471, 471, 471, - 471, 26, 471, 472, 473, 473, 473, 473, 474, 475, 473, 473, 474, 476, 26, 26, - 31, 31, 31, 50, 477, 477, 477, 477, 477, 478, 479, 26, 480, 26, 26, 26, - 26, 26, 26, 481, 482, 482, 482, 482, 482, 26, 483, 483, 483, 483, 483, 484, - 26, 26, 485, 485, 485, 486, 26, 26, 26, 26, 487, 487, 487, 488, 26, 26, - 489, 489, 490, 26, 491, 491, 491, 491, 491, 492, 493, 491, 491, 491, 492, 494, - 495, 495, 495, 495, 496, 497, 498, 498, 498, 499, 498, 500, 501, 501, 501, 501, - 501, 501, 502, 501, 501, 26, 503, 503, 503, 503, 504, 26, 505, 505, 505, 505, - 506, 137, 507, 26, 508, 508, 509, 508, 508, 508, 508, 508, 510, 26, 26, 26, - 511, 512, 513, 514, 513, 515, 516, 516, 516, 516, 516, 516, 516, 517, 516, 518, - 519, 520, 521, 522, 522, 523, 524, 525, 520, 526, 527, 528, 529, 530, 530, 26, - 531, 532, 531, 531, 531, 531, 533, 531, 534, 535, 533, 536, 537, 26, 26, 26, - 538, 538, 538, 538, 538, 538, 538, 539, 540, 26, 26, 26, 541, 541, 541, 541, - 541, 26, 541, 542, 543, 543, 543, 543, 543, 543, 544, 543, 543, 543, 543, 544, - 545, 545, 545, 545, 546, 26, 545, 547, 198, 548, 26, 26, 549, 549, 549, 549, - 549, 549, 549, 550, 549, 550, 164, 164, 551, 26, 26, 26, 552, 552, 552, 553, - 552, 554, 552, 552, 555, 26, 26, 26, 556, 556, 556, 556, 556, 556, 556, 557, - 558, 558, 558, 558, 558, 558, 559, 560, 561, 562, 563, 564, 564, 564, 565, 566, - 561, 26, 564, 567, 568, 569, 568, 568, 568, 568, 568, 569, 570, 26, 26, 26, - 571, 571, 571, 571, 571, 26, 572, 572, 572, 572, 572, 572, 573, 26, 178, 178, - 574, 574, 574, 574, 574, 574, 574, 575, 53, 576, 26, 26, 577, 577, 577, 577, - 578, 26, 577, 578, 579, 580, 579, 579, 579, 579, 581, 579, 582, 26, 579, 579, - 579, 583, 584, 584, 584, 584, 585, 584, 584, 586, 587, 26, 588, 589, 590, 590, - 590, 590, 588, 591, 590, 26, 590, 592, 593, 594, 595, 595, 595, 596, 597, 598, - 595, 599, 26, 26, 600, 600, 600, 601, 602, 602, 603, 602, 602, 602, 602, 604, - 602, 602, 602, 605, 26, 26, 606, 26, 108, 108, 108, 108, 108, 108, 607, 608, - 609, 609, 609, 609, 609, 609, 609, 610, 609, 611, 612, 26, 613, 26, 26, 26, - 26, 26, 614, 614, 614, 614, 614, 614, 614, 614, 615, 26, 616, 616, 616, 616, - 616, 616, 617, 26, 616, 616, 616, 618, 619, 619, 619, 619, 620, 26, 26, 26, - 621, 621, 621, 621, 621, 621, 621, 622, 305, 305, 305, 623, 624, 624, 624, 625, - 624, 626, 627, 627, 627, 627, 627, 627, 627, 627, 627, 628, 627, 629, 630, 630, - 630, 631, 631, 26, 632, 632, 632, 632, 633, 26, 632, 634, 634, 632, 632, 635, - 632, 632, 26, 26, 636, 636, 636, 636, 636, 636, 636, 637, 638, 638, 638, 638, - 638, 638, 638, 639, 640, 640, 640, 640, 640, 641, 640, 640, 640, 642, 640, 640, - 643, 26, 345, 26, 644, 644, 644, 644, 644, 644, 644, 26, 645, 645, 645, 645, - 645, 645, 646, 26, 26, 26, 26, 647, 644, 648, 26, 26, 26, 26, 649, 650, - 651, 286, 286, 286, 652, 26, 653, 26, 26, 26, 654, 26, 655, 26, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 657, 658, 658, 658, 658, 658, 659, 658, 660, - 658, 661, 658, 662, 359, 26, 26, 26, 0, 0, 0, 265, 0, 0, 359, 26, - 9, 663, 9, 9, 221, 26, 0, 0, 0, 0, 276, 26, 257, 362, 0, 0, - 664, 665, 0, 666, 667, 668, 0, 0, 0, 669, 0, 0, 246, 26, 26, 26, - 0, 0, 257, 26, 0, 0, 0, 259, 0, 0, 254, 0, 0, 0, 0, 254, - 670, 671, 0, 672, 673, 0, 0, 0, 269, 674, 254, 254, 0, 0, 0, 675, - 676, 677, 678, 0, 276, 0, 0, 0, 0, 268, 0, 0, 679, 679, 679, 679, - 679, 680, 26, 681, 682, 679, 26, 26, 2, 2, 2, 346, 683, 419, 26, 26, - 684, 270, 270, 685, 686, 687, 18, 18, 18, 688, 26, 26, 26, 689, 26, 26, - 690, 690, 690, 690, 690, 691, 690, 692, 690, 693, 26, 26, 26, 26, 694, 694, - 694, 695, 26, 26, 696, 696, 696, 696, 696, 696, 696, 697, 26, 26, 698, 698, - 698, 698, 698, 699, 26, 26, 700, 700, 700, 700, 700, 701, 172, 702, 170, 172, - 703, 703, 703, 703, 704, 703, 705, 26, 706, 706, 706, 706, 706, 707, 706, 708, - 26, 26, 362, 0, 0, 0, 376, 26, 709, 31, 31, 31, 710, 711, 712, 713, - 714, 715, 710, 716, 710, 712, 712, 717, 31, 718, 31, 719, 720, 718, 31, 719, - 26, 26, 721, 26, 0, 359, 0, 0, 0, 257, 362, 0, 362, 0, 362, 0, - 0, 276, 26, 26, 722, 0, 0, 0, 723, 26, 0, 0, 0, 0, 0, 359, - 0, 259, 265, 26, 276, 26, 26, 26, 0, 0, 0, 724, 0, 376, 0, 376, - 0, 0, 257, 725, 0, 359, 259, 26, 0, 26, 0, 265, 0, 26, 0, 0, - 0, 276, 0, 359, 265, 26, 26, 26, 0, 276, 0, 376, 0, 726, 0, 0, - 257, 722, 0, 727, 0, 265, 0, 259, 277, 277, 277, 280, 345, 26, 277, 277, - 728, 26, 277, 277, 277, 729, 277, 277, 277, 277, 26, 26, 730, 26, 26, 26, - 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 939, 940, 941, 942, 946, 948, 0, 962, 969, 970, 971, 976, - 1001,1002,1003,1008, 0,1033,1040,1041,1042,1043,1047, 0, 0,1080,1081,1082, - 1086,1110, 0, 0,1124,1125,1126,1127,1131,1133, 0,1147,1154,1155,1156,1161, - 1187,1188,1189,1193, 0,1219,1226,1227,1228,1229,1233, 0, 0,1267,1268,1269, - 1273,1298, 0,1303, 943,1128, 944,1129, 954,1139, 958,1143, 959,1144, 960,1145, - 961,1146, 964,1149, 0, 0, 973,1158, 974,1159, 975,1160, 983,1168, 978,1163, - 988,1173, 990,1175, 991,1176, 993,1178, 994,1179, 0, 0,1004,1190,1005,1191, - 1006,1192,1014,1199,1007, 0, 0, 0,1016,1201,1020,1206, 0,1022,1208,1025, - 1211,1023,1209, 0, 0, 0, 0,1032,1218,1037,1223,1035,1221, 0, 0, 0, - 1044,1230,1045,1231,1049,1235, 0, 0,1058,1244,1064,1250,1060,1246,1066,1252, - 1067,1253,1072,1258,1069,1255,1077,1264,1074,1261, 0, 0,1083,1270,1084,1271, - 1085,1272,1088,1275,1089,1276,1096,1283,1103,1290,1111,1299,1115,1118,1307,1120, - 1309,1121,1310, 0,1053,1239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,1093,1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 949,1134,1010,1195,1050,1236,1090,1277,1341,1368,1340,1367,1342,1369,1339, - 1366, 0,1320,1347,1418,1419,1323,1350, 0, 0, 992,1177,1018,1204,1055,1241, - 1416,1417,1415,1424,1202, 0, 0, 0, 987,1172, 0, 0,1031,1217,1321,1348, - 1322,1349,1338,1365, 950,1135, 951,1136, 979,1164, 980,1165,1011,1196,1012,1197, - 1051,1237,1052,1238,1061,1247,1062,1248,1091,1278,1092,1279,1071,1257,1076,1263, - 0, 0, 997,1182, 0, 0, 0, 0, 0, 0, 945,1130, 982,1167,1337,1364, - 1335,1362,1046,1232,1422,1423,1113,1301, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 9, 0, 10,1425, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 0, 0, 0,1314,1427, 5,1434,1438,1443, 0, - 1450, 0,1455,1461,1514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1446,1458, - 1468,1476,1480,1486,1517, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1489,1503, - 1494,1500,1508, 0, 0, 0, 0,1520,1521, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,1526,1528, 0,1525, 0, 0, 0,1522, 0, 0, 0, 0, - 1536,1532,1539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1534, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1556, 0, 0, - 0, 0, 0, 0,1548,1550, 0,1547, 0, 0, 0,1567, 0, 0, 0, 0, - 1558,1554,1561, 0, 0, 0, 0, 0, 0, 0,1568,1569, 0, 0, 0, 0, - 0, 0, 0, 0, 0,1529,1551, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,1523,1545,1524,1546, 0, 0,1527,1549, 0, 0,1570,1571, - 1530,1552,1531,1553, 0, 0,1533,1555,1535,1557,1537,1559, 0, 0,1572,1573, - 1544,1566,1538,1560,1540,1562,1541,1563,1542,1564, 0, 0,1543,1565, 0, 0, - 0, 0, 0, 0, 0, 0,1606,1607,1609,1608,1610, 0, 0, 0, 0, 0, - 0, 0, 0, 0,1613, 0,1611, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,1612, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1620, 0, 0, - 0, 0, 0, 0, 0,1623, 0, 0,1624, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1614,1615,1616,1617, - 1618,1619,1621,1622, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1628, - 1629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1625,1626, 0,1627, 0, 0, 0,1634, 0, 0,1635, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1630,1631,1632, - 0, 0,1633, 0, 0, 0, 0, 0, 0, 0, 0, 0,1639, 0, 0,1638, - 1640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1636,1637, 0, 0, 0, 0, 0, 0,1641, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1642,1644, - 1643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1645, 0, 0, 0, - 0, 0, 0, 0,1646, 0, 0, 0, 0, 0, 0,1648,1649, 0,1647,1650, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1651,1653, - 1652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1654, 0, - 1655,1657,1656, 0, 0, 0, 0,1659, 0, 0, 0, 0, 0, 0, 0, 0, - 0,1660, 0, 0, 0, 0,1661, 0, 0, 0, 0,1662, 0, 0, 0, 0, - 1663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1658, 0, 0, - 0, 0, 0, 0, 0, 0, 0,1664, 0,1665,1673, 0,1674, 0, 0, 0, - 0, 0, 0, 0, 0,1666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,1668, 0, 0, 0, 0, 0, 0, 0, 0, - 0,1669, 0, 0, 0, 0,1670, 0, 0, 0, 0,1671, 0, 0, 0, 0, - 1672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1667, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1675, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1676, 0,1677, 0,1678, 0, - 1679, 0,1680, 0, 0, 0,1681, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1682, - 0,1683, 0, 0,1684,1685, 0,1686, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 953,1138, 955,1140, 956,1141, 957,1142,1324,1351, 963,1148, - 965,1150, 968,1153, 966,1151, 967,1152,1378,1380,1379,1381, 984,1169, 985,1170, - 1420,1421, 986,1171, 989,1174, 995,1180, 998,1183, 996,1181, 999,1184,1000,1185, - 1015,1200,1329,1356,1017,1203,1019,1205,1021,1207,1024,1210,1687,1688,1027,1213, - 1026,1212,1028,1214,1029,1215,1030,1216,1034,1220,1036,1222,1039,1225,1038,1224, - 1334,1361,1336,1363,1382,1384,1383,1385,1056,1242,1057,1243,1059,1245,1063,1249, - 1689,1690,1065,1251,1068,1254,1070,1256,1386,1387,1388,1389,1691,1692,1073,1259, - 1075,1262,1079,1266,1078,1265,1095,1282,1098,1285,1097,1284,1390,1391,1392,1393, - 1099,1286,1100,1287,1101,1288,1102,1289,1105,1292,1104,1291,1106,1294,1107,1295, - 1108,1296,1114,1302,1119,1308,1122,1311,1123,1312,1186,1260,1293,1305, 0,1394, - 0, 0, 0, 0, 952,1137, 947,1132,1317,1344,1316,1343,1319,1346,1318,1345, - 1693,1695,1371,1375,1370,1374,1373,1377,1372,1376,1694,1696, 981,1166, 977,1162, - 972,1157,1326,1353,1325,1352,1328,1355,1327,1354,1697,1698,1009,1194,1013,1198, - 1054,1240,1048,1234,1331,1358,1330,1357,1333,1360,1332,1359,1699,1700,1396,1401, - 1395,1400,1398,1403,1397,1402,1399,1404,1094,1281,1087,1274,1406,1411,1405,1410, - 1408,1413,1407,1412,1409,1414,1109,1297,1117,1306,1116,1304,1112,1300, 0, 0, - 0, 0, 0, 0,1471,1472,1701,1705,1702,1706,1703,1707,1430,1431,1715,1719, - 1716,1720,1717,1721,1477,1478,1729,1731,1730,1732, 0, 0,1435,1436,1733,1735, - 1734,1736, 0, 0,1481,1482,1737,1741,1738,1742,1739,1743,1439,1440,1751,1755, - 1752,1756,1753,1757,1490,1491,1765,1768,1766,1769,1767,1770,1447,1448,1771,1774, - 1772,1775,1773,1776,1495,1496,1777,1779,1778,1780, 0, 0,1451,1452,1781,1783, - 1782,1784, 0, 0,1504,1505,1785,1788,1786,1789,1787,1790, 0,1459, 0,1791, - 0,1792, 0,1793,1509,1510,1794,1798,1795,1799,1796,1800,1462,1463,1808,1812, - 1809,1813,1810,1814,1467, 21,1475, 22,1479, 23,1485, 24,1493, 27,1499, 28, - 1507, 29, 0, 0,1704,1708,1709,1710,1711,1712,1713,1714,1718,1722,1723,1724, - 1725,1726,1727,1728,1740,1744,1745,1746,1747,1748,1749,1750,1754,1758,1759,1760, - 1761,1762,1763,1764,1797,1801,1802,1803,1804,1805,1806,1807,1811,1815,1816,1817, - 1818,1819,1820,1821,1470,1469,1822,1474,1465, 0,1473,1825,1429,1428,1426, 12, - 1432, 0, 26, 0, 0,1315,1823,1484,1466, 0,1483,1829,1433, 13,1437, 14, - 1441,1826,1827,1828,1488,1487,1513, 19, 0, 0,1492,1515,1445,1444,1442, 15, - 0,1831,1832,1833,1502,1501,1516, 25,1497,1498,1506,1518,1457,1456,1454, 17, - 1453,1313, 11, 3, 0, 0,1824,1512,1519, 0,1511,1830,1449, 16,1460, 18, - 1464, 4, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 6, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1834,1835, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,1836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,1837,1839,1838, 0, 0, 0, 0,1840, 0, 0, 0, 0,1841, 0, 0, - 1842, 0, 0, 0, 0, 0, 0, 0,1843, 0,1844, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,1845, 0, 0,1846, 0, 0,1847, 0,1848, 0, 0, - 0, 0, 0, 0, 937, 0,1850, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,1849, 936, 938,1851,1852, 0, 0,1853,1854, 0, 0,1855,1856, 0, 0, - 0, 0, 0, 0,1857,1858, 0, 0,1861,1862, 0, 0,1863,1864, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1867,1868,1869,1870,1859,1860,1865,1866, 0, 0, 0, 0, 0, 0,1871,1872, - 1873,1874, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1877, 0,1878, 0,1879, 0,1880, 0,1881, 0,1882, 0,1883, 0,1884, 0, - 1885, 0,1886, 0,1887, 0,1888, 0, 0,1889, 0,1890, 0,1891, 0, 0, - 0, 0, 0, 0,1892,1893, 0,1894,1895, 0,1896,1897, 0,1898,1899, 0, - 1900,1901, 0, 0, 0, 0, 0, 0,1876, 0, 0, 0, 0, 0, 0, 0, - 0, 0,1902, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1904, 0,1905, 0,1906, 0,1907, 0,1908, 0,1909, 0,1910, 0,1911, 0, - 1912, 0,1913, 0,1914, 0,1915, 0, 0,1916, 0,1917, 0,1918, 0, 0, - 0, 0, 0, 0,1919,1920, 0,1921,1922, 0,1923,1924, 0,1925,1926, 0, - 1927,1928, 0, 0, 0, 0, 0, 0,1903, 0, 0,1929,1930,1931,1932, 0, - 0, 0,1933, 0, 710, 385, 724, 715, 455, 103, 186, 825, 825, 242, 751, 205, - 241, 336, 524, 601, 663, 676, 688, 738, 411, 434, 474, 500, 649, 746, 799, 108, - 180, 416, 482, 662, 810, 275, 462, 658, 692, 344, 618, 679, 293, 388, 440, 492, - 740, 116, 146, 168, 368, 414, 481, 527, 606, 660, 665, 722, 781, 803, 809, 538, - 553, 588, 642, 758, 811, 701, 233, 299, 573, 612, 487, 540, 714, 779, 232, 267, - 412, 445, 457, 585, 594, 766, 167, 613, 149, 148, 560, 589, 648, 768, 708, 345, - 411, 704, 105, 259, 313, 496, 518, 174, 542, 120, 307, 101, 430, 372, 584, 183, - 228, 529, 650, 697, 424, 732, 428, 349, 632, 355, 517, 110, 135, 147, 403, 580, - 624, 700, 750, 170, 193, 245, 297, 374, 463, 543, 763, 801, 812, 815, 162, 384, - 420, 730, 287, 330, 337, 366, 459, 476, 509, 558, 591, 610, 726, 652, 734, 759, - 154, 163, 198, 473, 683, 697, 292, 311, 353, 423, 572, 494, 113, 217, 259, 280, - 314, 499, 506, 603, 608, 752, 778, 782, 788, 117, 557, 748, 774, 320, 109, 126, - 260, 265, 373, 411, 479, 523, 655, 737, 823, 380, 765, 161, 395, 398, 438, 451, - 502, 516, 537, 583, 791, 136, 340, 769, 122, 273, 446, 727, 305, 322, 400, 496, - 771, 155, 190, 269, 377, 391, 406, 432, 501, 519, 599, 684, 687, 749, 776, 175, - 452, 191, 480, 510, 659, 772, 805, 813, 397, 444, 619, 566, 568, 575, 491, 471, - 707, 111, 636, 156, 153, 288, 346, 578, 256, 435, 383, 729, 680, 767, 694, 295, - 128, 210, 0, 0, 227, 0, 379, 0, 0, 150, 493, 525, 544, 551, 552, 556, - 783, 576, 604, 0, 661, 0, 703, 0, 0, 735, 743, 0, 0, 0, 793, 794, - 795, 808, 741, 773, 118, 127, 130, 166, 169, 177, 207, 213, 215, 226, 229, 268, - 270, 317, 327, 329, 335, 369, 375, 381, 404, 441, 448, 458, 477, 484, 503, 539, - 545, 547, 546, 548, 549, 550, 554, 555, 561, 564, 569, 591, 593, 595, 598, 607, - 620, 625, 625, 651, 690, 695, 705, 706, 716, 717, 733, 735, 777, 786, 790, 315, - 869, 623, 0, 0, 102, 145, 134, 115, 129, 138, 165, 171, 207, 202, 206, 212, - 227, 231, 240, 243, 250, 254, 294, 296, 303, 308, 319, 325, 321, 329, 326, 335, - 341, 357, 360, 362, 370, 379, 388, 389, 393, 421, 424, 438, 456, 454, 458, 465, - 477, 535, 485, 490, 493, 507, 512, 514, 521, 522, 525, 526, 528, 533, 532, 541, - 565, 569, 574, 586, 591, 597, 607, 637, 647, 674, 691, 693, 695, 698, 703, 699, - 705, 704, 702, 706, 709, 717, 728, 736, 747, 754, 770, 777, 783, 784, 786, 787, - 790, 802, 825, 848, 847, 857, 55, 65, 66, 883, 892, 916, 822, 824, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,1586, 0,1605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1602,1603, - 1934,1935,1574,1575,1576,1577,1579,1580,1581,1583,1584, 0,1585,1587,1588,1589, - 1591, 0,1592, 0,1593,1594, 0,1595,1596, 0,1598,1599,1600,1601,1604,1582, - 1578,1590,1597, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1936, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,1937, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1938, 0, - 1939, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1940, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,1941,1942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1943, - 1944, 0, 0, 0, 0, 0, 0,1945, 0,1946, 0, 0, 0, 0, 0, 0, - 0, 0,1947, 0, 0,1948, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,1950, 0,1949,1951, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1953, - 1952, 0,1954, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1955,1956, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1957, 0, 0, 0, - 0, 0, 0, 0, 0,1958,1961,1959,1965,1960,1962,1964,1963, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1967,1966,1968, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,1969,1970,1971,1972,1973,1974,1975, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1976, - 1977,1978,1980,1979,1981, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 106, 104, 107, 826, 114, 118, 119, 121, 123, 124, 127, 125, - 34, 830, 130, 131, 132, 137, 827, 35, 133, 139, 829, 142, 143, 112, 144, 145, - 924, 151, 152, 37, 157, 158, 159, 160, 38, 165, 166, 169, 171, 172, 173, 174, - 176, 177, 178, 179, 181, 182, 182, 182, 833, 468, 184, 185, 834, 187, 188, 189, - 196, 192, 194, 195, 197, 199, 200, 201, 203, 204, 204, 206, 208, 209, 211, 218, - 213, 219, 214, 216, 153, 234, 221, 222, 223, 220, 225, 224, 230, 835, 235, 236, - 237, 238, 239, 244, 836, 837, 247, 248, 249, 246, 251, 39, 40, 253, 255, 255, - 838, 257, 258, 259, 261, 839, 262, 263, 301, 264, 41, 266, 270, 272, 271, 841, - 274, 842, 277, 276, 278, 281, 282, 42, 283, 284, 285, 286, 43, 843, 44, 289, - 290, 291, 293, 934, 298, 845, 845, 621, 300, 300, 45, 852, 894, 302, 304, 46, - 306, 309, 310, 312, 316, 48, 47, 317, 846, 318, 323, 324, 325, 324, 328, 329, - 333, 331, 332, 334, 335, 336, 338, 339, 342, 343, 347, 351, 849, 350, 348, 352, - 354, 359, 850, 361, 358, 356, 49, 363, 365, 367, 364, 50, 369, 371, 851, 376, - 386, 378, 53, 381, 52, 51, 140, 141, 387, 382, 614, 78, 388, 389, 390, 394, - 392, 856, 54, 399, 396, 402, 404, 858, 405, 401, 407, 55, 408, 409, 410, 413, - 859, 415, 56, 417, 860, 418, 57, 419, 422, 424, 425, 861, 840, 862, 426, 863, - 429, 431, 427, 433, 437, 441, 438, 439, 442, 443, 864, 436, 449, 450, 58, 454, - 453, 865, 447, 460, 866, 867, 461, 466, 465, 464, 59, 467, 470, 469, 472, 828, - 475, 868, 478, 870, 483, 485, 486, 871, 488, 489, 872, 873, 495, 497, 60, 498, - 61, 61, 504, 505, 507, 508, 511, 62, 513, 874, 515, 875, 518, 844, 520, 876, - 877, 878, 63, 64, 528, 880, 879, 881, 882, 530, 531, 531, 533, 66, 534, 67, - 68, 884, 536, 538, 541, 69, 885, 549, 886, 887, 556, 559, 70, 561, 562, 563, - 888, 889, 889, 567, 71, 890, 570, 571, 72, 891, 577, 73, 581, 579, 582, 893, - 587, 74, 590, 592, 596, 75, 895, 896, 76, 897, 600, 898, 602, 605, 607, 899, - 900, 609, 901, 611, 853, 77, 615, 616, 79, 617, 252, 902, 903, 854, 855, 621, - 622, 731, 80, 627, 626, 628, 164, 629, 630, 631, 633, 904, 632, 634, 639, 640, - 635, 641, 646, 651, 638, 643, 644, 645, 905, 907, 906, 81, 653, 654, 656, 911, - 657, 908, 82, 83, 909, 910, 84, 664, 665, 666, 667, 669, 668, 671, 670, 674, - 672, 673, 675, 85, 677, 678, 86, 681, 682, 912, 685, 686, 87, 689, 36, 913, - 914, 88, 89, 696, 702, 709, 711, 915, 712, 713, 718, 719, 917, 831, 721, 720, - 723, 832, 725, 728, 918, 919, 739, 742, 744, 920, 745, 753, 756, 757, 755, 760, - 761, 921, 762, 90, 764, 922, 91, 775, 279, 780, 923, 925, 92, 93, 785, 926, - 94, 927, 787, 787, 789, 928, 792, 95, 796, 797, 798, 800, 96, 929, 802, 804, - 806, 97, 98, 807, 930, 99, 931, 932, 933, 814, 100, 816, 817, 818, 819, 820, - 821, 935, 0, 0, -}; -static const int16_t -_hb_ucd_i16[92] = -{ - 0, 0, 1, -1, 2, 0, -2, 0, 0, 2, 0, -2, 0, 16, 0, -16, - 0, 1, -1, 0, 3, 3, 3, -3, -3, -3, 0, 2016, 0, 2527, 1923, 1914, - 1918, 0, 2250, 0, 0, 138, 0, 7, -7, 0, -1, 1, 1824, 0, 2104, 0, - 2108, 2106, 0, 2106, 1316, 0, -1, -138, 8, 8, 8, 0, 7, 7, -8, -8, - -8, -7,-1316, 1, -1, 3, -3, 1, 0,-1914,-1918, 0, 0,-1923,-1824, 0, - 0,-2016,-2104, 0, 0,-2106,-2108,-2106,-2250, 0,-2527, 0, -}; - -static inline uint_fast8_t -_hb_ucd_gc (unsigned u) -{ - return u<1114110u?_hb_ucd_u8[6472+(((_hb_ucd_u8[816+(((_hb_ucd_u16[((_hb_ucd_u8[272+(((_hb_ucd_u8[u>>1>>3>>4>>4])<<4)+((u>>1>>3>>4)&15u))])<<4)+((u>>1>>3)&15u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2; -} -static inline uint_fast8_t -_hb_ucd_ccc (unsigned u) -{ - return u<125259u?_hb_ucd_u8[8504+(((_hb_ucd_u8[7936+(((_hb_ucd_u8[7460+(((_hb_ucd_u8[7100+(((_hb_ucd_u8[6854+(u>>2>>2>>2>>3)])<<3)+((u>>2>>2>>2)&7u))])<<2)+((u>>2>>2)&3u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:0; -} -static inline unsigned -_hb_ucd_b4 (const uint8_t* a, unsigned i) -{ - return (a[i>>1]>>((i&1u)<<2))&15u; -} -static inline int_fast16_t -_hb_ucd_bmg (unsigned u) -{ - return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[9396+(((_hb_ucd_u8[9164+(((_hb_ucd_u8[9068+(((_hb_ucd_b4(9004+_hb_ucd_u8,u>>1>>2>>3>>3))<<3)+((u>>1>>2>>3)&7u))])<<3)+((u>>1>>2)&7u))])<<2)+((u>>1)&3u))])<<1)+((u)&1u)]:0; -} -static inline uint_fast8_t -_hb_ucd_sc (unsigned u) -{ - return u<918000u?_hb_ucd_u8[10398+(((_hb_ucd_u16[3952+(((_hb_ucd_u16[2624+(((_hb_ucd_u8[9870+(((_hb_ucd_u8[9644+(u>>3>>2>>3>>4)])<<4)+((u>>3>>2>>3)&15u))])<<3)+((u>>3>>2)&7u))])<<2)+((u>>3)&3u))])<<3)+((u)&7u))]:2; -} -static inline uint_fast16_t -_hb_ucd_dm (unsigned u) -{ - return u<195102u?_hb_ucd_u16[6244+(((_hb_ucd_u8[16628+(((_hb_ucd_u8[16246+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0; -} - - -#else - -static const uint8_t -_hb_ucd_u8[13730] = -{ - 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 9, 10, 7, 7, 7, 7, 7, 11, 12, 12, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 7, 21, 22, 22, 22, 23, 24, 7, 7, - 7, 25, 22, 22, 22, 26, 27, 28, 22, 29, 30, 31, 32, 33, 34, 35, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 22, 36, - 7, 7, 7, 7, 37, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 38, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 34, 34, 34, 35, 36, 37, 34, 34, 34, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 62, 63, 64, 65, 66, 67, 68, 69, 67, 70, 71, - 67, 67, 62, 72, 62, 62, 73, 67, 74, 75, 76, 77, 78, 67, 67, 67, - 79, 80, 34, 81, 82, 83, 67, 67, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 84, 34, 34, 34, 34, - 85, 34, 34, 34, 34, 34, 34, 34, 34, 86, 34, 34, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 34, 34, 34, 34, 34, 34, 34, 34, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100, 34, 34, 34, 34,101,102, 34, 34,103,104,105,106,107,108, - 34, 34,109,110,111,112,113,114,115,116,117,118, 34, 34, 34,119, - 120,121,122,123,124,125,126,127, 34,128,129,130,131,132,133,134, - 135,136,137,138,139,140,141,142,143,144,111,145,146,147,148,111, - 149,150,151,152,153,154,155,156,157,158,159,160,111,161,162,163, - 34, 34, 34, 34, 34, 34, 34, 34,164, 34, 34,111,111,111,111,111, - 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,165, - 34, 34, 34, 34, 34, 34, 34, 34,166, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111, - 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111, - 111,111,167,111,111,111,111,111,111,111,111,111,111,111,111,111, - 34, 34, 34, 34,168,169,170, 34,111,111,171,111,172,173,174,175, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111, - 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,119, - 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111, - 111,111,111,111,111,111,111,111, 34,176,111,111,111,111,111,111, - 111,111,111,111,111,111,111,111, 67,177, 67, 67, 67, 67,178, 67, - 67, 67,179,180,181,131, 65,111,182,183,184,185,186,187,188,189, - 67, 67, 67, 67,190,191,111,111,111,111,111,111,111,111,192,111, - 193,194,195,111,111,196,111,111,111,197,111,198,111,111,111, 34, - 34,199,200,111,111,111,111,111,131,201,202,111, 34,203,111,111, - 67, 67,204, 67, 67,111, 67,205, 67, 67, 67, 67, 67, 67, 67, 67, - 67, 67, 67, 67, 67, 67, 67,177,111,111,111,111,111,111,111,111, - 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111,111, - 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111, - 206,111,194,194,111,111,111,111,111,111,111,111,111,111,111,111, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2, - 7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 17, 18, 19, 1, 20, 20, 21, 22, 23, 24, 25, - 26, 27, 15, 2, 28, 29, 27, 30, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 31, 11, 11, 11, 32, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 33, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 34, 34, 34, 34, 34, 34, 34, 34, 16, 32, 32, 32, - 32, 32, 32, 32, 11, 34, 34, 16, 34, 32, 32, 11, 34, 11, 16, 11, - 11, 34, 32, 11, 32, 16, 11, 34, 32, 32, 32, 11, 34, 16, 32, 11, - 34, 11, 34, 34, 32, 35, 32, 16, 36, 36, 37, 34, 38, 37, 34, 34, - 34, 34, 34, 34, 34, 34, 16, 32, 34, 38, 32, 11, 32, 32, 32, 32, - 32, 32, 16, 16, 16, 11, 34, 32, 34, 34, 11, 32, 32, 32, 32, 32, - 16, 16, 39, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 41, 41, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, - 40, 40, 42, 41, 41, 41, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, - 43, 43, 43, 43, 43, 43, 43, 43, 32, 32, 42, 32, 16, 44, 16, 10, - 41, 41, 41, 45, 11, 11, 11, 11, 34, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, - 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 46, 34, 32, 34, 11, - 32, 47, 43, 43, 48, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16, - 11, 11, 11, 11, 49, 2, 2, 2, 16, 16, 16, 16, 50, 51, 52, 53, - 54, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 55, - 56, 57, 43, 56, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 58, 2, 2, 2, 2, 2, 2, 59, 59, 59, 8, 9, 60, 2, 61, - 43, 43, 43, 43, 43, 57, 62, 2, 63, 36, 36, 36, 36, 64, 43, 43, - 7, 7, 7, 7, 7, 2, 2, 36, 65, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 66, 43, 43, 43, 67, 47, 43, 43, 68, 69, 70, 43, 43, 36, - 7, 7, 7, 7, 7, 36, 71, 72, 2, 2, 2, 2, 2, 2, 2, 73, - 64, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 65, 36, - 36, 36, 36, 43, 43, 43, 43, 43, 7, 7, 7, 7, 7, 36, 36, 36, - 36, 36, 36, 36, 36, 64, 43, 43, 43, 43, 40, 21, 2, 40, 69, 20, - 36, 36, 36, 43, 43, 69, 43, 43, 43, 43, 69, 43, 69, 43, 43, 43, - 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 36, 36, 64, 43, 43, 2, - 36, 36, 36, 36, 74, 36, 36, 36, 59, 59, 59, 75, 43, 43, 43, 43, - 36, 36, 36, 36, 76, 43, 43, 43, 43, 75, 43, 43, 43, 43, 43, 43, - 43, 77, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 65, 78, - 79, 43, 43, 43, 77, 78, 79, 78, 64, 43, 43, 43, 36, 36, 36, 36, - 36, 43, 2, 7, 7, 7, 7, 7, 80, 36, 36, 36, 36, 36, 36, 36, - 64, 78, 81, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 65, 78, - 79, 43, 43, 77, 78, 78, 79, 36, 36, 36, 36, 82, 78, 78, 36, 36, - 36, 43, 43, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 53, 58, 43, - 43, 77, 81, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 78, - 79, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 65, 36, 36, 36, - 36, 36, 36, 7, 7, 7, 7, 7, 43, 36, 64, 2, 2, 2, 2, 2, - 79, 43, 43, 43, 77, 78, 79, 43, 60, 20, 20, 20, 83, 43, 43, 43, - 43, 78, 81, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 65, 79, - 79, 43, 43, 77, 78, 78, 79, 43, 43, 43, 43, 77, 78, 78, 36, 36, - 72, 27, 27, 27, 27, 27, 27, 27, 43, 65, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 78, 77, 78, 78, 78, 78, 78, 79, 43, - 36, 36, 36, 82, 78, 78, 78, 78, 78, 78, 78, 7, 7, 7, 7, 7, - 27, 84, 61, 61, 53, 61, 61, 61, 77, 78, 65, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 65, 43, 77, 78, 78, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 36, 36, 36, 36, 7, 7, 7, 85, 27, 27, 27, 84, - 64, 78, 66, 36, 36, 36, 36, 36, 78, 78, 78, 77, 78, 78, 43, 43, - 43, 43, 77, 78, 78, 78, 81, 36, 86, 82, 78, 78, 78, 78, 78, 78, - 43, 78, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 65, 78, - 79, 43, 43, 78, 78, 78, 79, 71, 61, 61, 36, 82, 27, 27, 27, 87, - 27, 27, 27, 27, 84, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 77, - 78, 43, 43, 43, 78, 78, 78, 78, 7, 78, 2, 2, 2, 2, 2, 2, - 64, 36, 43, 43, 43, 43, 43, 88, 36, 36, 36, 69, 43, 43, 43, 57, - 7, 7, 7, 7, 7, 2, 2, 2, 64, 36, 43, 43, 43, 43, 65, 36, - 36, 36, 36, 40, 43, 43, 43, 43, 7, 7, 7, 7, 7, 7, 36, 36, - 71, 61, 2, 2, 2, 2, 2, 2, 2, 89, 89, 61, 43, 61, 61, 61, - 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 47, 47, 47, 4, 4, 78, - 64, 43, 43, 43, 43, 43, 43, 77, 43, 43, 57, 43, 36, 36, 64, 43, - 43, 43, 43, 43, 43, 43, 43, 61, 61, 61, 61, 70, 61, 61, 61, 61, - 2, 2, 89, 61, 21, 2, 2, 2, 36, 36, 36, 36, 36, 82, 79, 43, - 77, 43, 43, 43, 79, 77, 79, 65, 36, 36, 36, 78, 43, 36, 36, 43, - 65, 78, 81, 82, 78, 78, 78, 36, 64, 43, 65, 36, 36, 36, 36, 36, - 36, 77, 79, 77, 78, 78, 79, 82, 7, 7, 7, 7, 7, 78, 79, 61, - 16, 16, 16, 16, 16, 50, 44, 16, 36, 36, 36, 36, 36, 36, 64, 43, - 2, 2, 2, 2, 90, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 61, 61, 61, 61, 61, 61, 61, 61, 11, 11, 11, 11, 16, 16, 16, 16, - 91, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 71, 66, - 92, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 93, 94, 94, - 36, 36, 36, 36, 36, 58, 2, 95, 96, 36, 36, 36, 36, 36, 36, 36, - 36, 43, 77, 78, 78, 78, 78, 81, 36, 43, 97, 2, 2, 2, 2, 2, - 36, 43, 43, 43, 43, 43, 43, 43, 36, 36, 43, 79, 43, 43, 43, 78, - 78, 78, 78, 77, 79, 43, 43, 43, 43, 43, 2, 80, 2, 60, 64, 43, - 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 98, 2, 56, 43, 75, - 36, 76, 36, 36, 36, 36, 36, 36, 36, 36, 64, 65, 36, 36, 36, 36, - 36, 36, 36, 36, 64, 36, 36, 36, 43, 77, 78, 79, 77, 78, 78, 78, - 78, 77, 78, 78, 79, 43, 43, 43, 61, 61, 2, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 27, 27, 61, 36, 36, 36, 64, 77, 79, 43, 2, - 36, 36, 82, 77, 43, 43, 43, 43, 77, 77, 79, 43, 43, 43, 77, 78, - 78, 79, 43, 43, 43, 43, 43, 43, 2, 2, 2, 80, 2, 2, 2, 2, - 43, 43, 43, 43, 43, 43, 43, 99, 43, 43, 81, 36, 36, 36, 36, 36, - 36, 36, 77, 43, 43, 77, 77, 78, 78, 77, 81, 36, 36, 36, 36, 2, - 89, 61, 61, 61, 61, 47, 43, 43, 43, 43, 61, 61, 61, 61, 21, 2, - 43, 81, 36, 36, 36, 36, 36, 36, 82, 43, 43, 78, 43, 79, 43, 36, - 36, 36, 36, 77, 43, 78, 79, 79, 43, 78, 78, 78, 78, 78, 2, 2, - 36, 36, 78, 78, 78, 78, 43, 43, 43, 43, 78, 43, 43, 57, 2, 2, - 7, 7, 7, 7, 7, 7, 86, 36, 36, 36, 36, 36, 40, 40, 40, 2, - 16, 16, 16, 16, 34, 16, 16, 16, 43, 57, 43, 43, 43, 43, 43, 43, - 77, 43, 43, 43, 65, 36, 64, 36, 36, 36, 65, 82, 43, 36, 36, 36, - 16, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 44, 16, 16, - 16, 16, 16, 16, 44, 16, 16, 16, 16, 16, 16, 16, 16,100, 40, 40, - 32, 32, 32, 16, 16, 16, 16, 32, 16, 16, 16, 16, 11, 11, 11, 11, - 16, 16, 16, 16, 34, 11, 11, 11, 16, 16, 16, 16,101,101,101,101, - 16, 16, 16, 16, 11, 11,102,103, 41, 16, 16, 16, 11, 11,102, 41, - 16, 16, 16, 16, 11, 11,104, 41,105,105,105,105,105,106, 59, 59, - 51, 51, 51, 2,107,108,107,108, 2, 2, 2, 2,109, 59, 59,110, - 2, 2, 2, 2,111,112, 2,113,114, 2,115,116, 2, 2, 2, 2, - 2, 9,114, 2, 2, 2, 2,117, 59, 59, 59, 59, 59, 59, 59, 59, - 118, 40, 27, 27, 27, 8,115,119, 27, 27, 27, 27, 27, 8,115, 94, - 20, 20, 20, 20, 20, 20, 20, 20, 43, 43, 43, 43, 43, 43,120, 48, - 99, 48, 99, 43, 43, 43, 43, 43, 61,121, 61,122, 61, 34, 11, 16, - 11, 32,122, 61, 46, 11, 11, 61, 61, 61,121,121,121, 11, 11,123, - 11, 11, 35, 36, 39, 61, 16, 11, 8, 8, 46, 16, 16, 26, 61,124, - 95, 95, 95, 95, 95, 95, 95, 95, 95,125,126, 95,127, 61, 61, 61, - 8, 8,128, 61, 61, 8, 61, 61,128, 26, 61,128, 61, 61, 61,128, - 61, 61, 61, 61, 61, 61, 61, 8, 61,128,128, 61, 61, 61, 61, 61, - 61, 61, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 61, 61, 61, 61, 4, 4, 61, 61, 8, 61, 61, 61,129,130, 61, 61, - 61, 61, 61, 61, 61, 61,128, 61, 61, 61, 61, 61, 61, 26, 8, 8, - 8, 8, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 8, 8, - 8, 61, 61, 61, 61, 61, 61, 61, 27, 27, 27, 27, 27, 27, 61, 61, - 61, 61, 61, 61, 61, 27, 27, 27, 61, 61, 61, 26, 61, 61, 61, 61, - 26, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 8, 8, 8, 8, - 61, 61, 61, 61, 61, 61, 61, 26, 61, 61, 61, 61, 4, 4, 4, 4, - 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 61, 61, 61, 61, 61, 61, - 8, 8,115,131, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, - 8,115,132,132,132,132,132,132,132,132,132,132,131, 8, 8, 8, - 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, - 8, 8,128, 26, 8, 8,128, 61, 32, 11, 32, 34, 34, 34, 34, 11, - 32, 32, 34, 16, 16, 16, 40, 11, 32, 32,124, 61, 61,122, 34,133, - 43, 32, 16, 16, 50, 2, 90, 2, 36, 36, 36, 36, 36, 36, 36, 76, - 2, 2, 2, 2, 2, 2, 2, 56, 2,107,107, 2,111,112,107, 2, - 2, 2, 2, 6, 2, 98,107, 2,107, 4, 4, 4, 4, 2, 2, 80, - 2, 2, 2, 2, 2, 51, 2, 2, 98,134, 2, 2, 2, 2, 2, 2, - 61, 2,135,132,132,132,136, 51, 51, 51, 51, 51, 51, 51, 51, 51, - 1, 2,137,138, 4, 4, 4, 4, 4, 61, 4, 4, 4, 4,139, 94, - 140, 95, 95, 95, 95, 43, 43, 78,141, 40, 40, 61, 95,142, 58, 61, - 72, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64,143,144, 63, - 36, 36, 36, 36, 36, 58, 40, 63, 61, 27, 27, 61, 61, 61, 61, 61, - 27, 27, 27, 27, 27, 61, 61, 61, 61, 61, 61, 61, 27, 27, 27, 27, - 145, 27, 27, 27, 27, 27, 27, 27, 36, 36, 76, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36,146, 2, 32, 32, 32, 32, 32, 32, 32, 64, - 48,147, 43, 43, 43, 43, 43, 80, 32, 32, 32, 32, 32, 32, 40, 43, - 36, 36, 36, 95, 95, 95, 95, 95, 43, 2, 2, 2, 2, 2, 2, 2, - 41, 41, 41,144, 40, 40, 40, 40, 41, 32, 32, 32, 32, 32, 32, 32, - 16, 32, 32, 32, 32, 32, 32, 32, 44, 16, 16, 16, 34, 34, 34, 32, - 32, 32, 32, 32, 42,148, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 11, 11, 32, 11, 11, 32, 32, 32, 32, 32, 32, - 32, 32, 11, 11, 34, 34, 32, 16, 32, 16, 16, 32, 32, 32, 11, 11, - 11, 40,149, 35, 40, 35, 36, 36, 36, 65, 36, 65, 36, 64, 36, 36, - 36, 82, 79, 77, 61, 61, 43, 43, 27, 27, 27, 61,150, 61, 61, 61, - 36, 36, 2, 2, 2, 2, 2, 2, 78, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 78, 78, 78, 78, 78, 78, 78, 78, 43, 43, 43, 43, 43, 2, - 43, 36, 36, 36, 2, 66, 66, 64, 36, 36, 36, 43, 43, 43, 43, 2, - 36, 36, 36, 64, 43, 43, 43, 43, 43, 78, 78, 78, 78, 78, 78, 97, - 36, 64, 78, 43, 43, 78, 43, 78, 97, 2, 2, 2, 2, 2, 2, 80, - 7, 7, 7, 7, 7, 7, 7, 2, 36, 36, 64, 63, 36, 36, 36, 36, - 36, 36, 36, 36, 64, 43, 43, 77, 79, 77, 79, 43, 43, 43, 43, 43, - 36, 64, 36, 36, 36, 36, 77, 78, 7, 7, 7, 7, 7, 7, 2, 2, - 63, 36, 36, 71, 61, 82, 77, 36, 65, 43, 65, 64, 65, 36, 36, 43, - 36, 36, 36, 36, 36, 36, 76, 2, 36, 36, 36, 36, 36, 82, 43, 78, - 2, 76,151, 43, 43, 43, 43, 43, 16, 16, 16, 16, 16,103, 40, 40, - 16, 16, 16, 16,100, 41, 41, 41, 36, 82, 79, 78, 77, 97, 79, 43, - 152,152,152,152,152,152,152,152,153,153,153,153,153,153,153,153, - 16, 16, 16, 16, 16, 16, 35, 65, 36, 36, 36, 36,154, 36, 36, 36, - 36, 41, 41, 41, 41, 41, 41, 41, 41, 74, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36,132, 36, 36, 36, 36, 36, 36, 36, 71, - 36, 36, 36, 36, 36, 36,150, 61, 2, 2, 2,135,116, 2, 2, 2, - 6,155,156,132,132,132,132,132,132,132,116,135,116, 2,113,157, - 2, 2, 2, 2,139,132,132,116, 2,158, 8, 8, 60, 2, 2, 2, - 36, 36, 36, 36, 36, 36, 36,159, 2, 2, 3, 2, 4, 5, 6, 2, - 16, 16, 16, 16, 16, 17, 18,115,116, 4, 2, 36, 36, 36, 36, 36, - 63, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40, - 20,160, 53, 20, 26, 8,128, 61, 61, 61, 61, 61,161, 59, 61, 61, - 2, 2, 2, 90, 27, 27, 27, 27, 27, 27, 27, 84, 61, 61, 61, 61, - 95, 95,127, 27, 84, 61, 61, 61, 61, 61, 61, 61, 61, 27, 61, 61, - 61, 61, 61, 61, 61, 61, 47, 43,162,162,162,162,162,162,162,162, - 163, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 87, 36, - 138, 36, 36, 36, 36, 95, 95, 95, 36, 36, 36, 36, 36, 36, 36, 58, - 164, 95, 95, 95, 95, 95, 95, 95, 11, 11, 11, 32, 16, 16, 16, 16, - 36, 36, 36, 58, 27, 27, 27, 27, 36, 36, 36, 71,145, 27, 27, 27, - 36, 36, 36,165, 27, 27, 27, 27, 36, 36, 36, 36, 36,165, 27, 27, - 36, 36, 36, 27, 27, 27, 27, 30, 36, 36, 36, 36, 36, 36, 27, 36, - 64, 43, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 43, 43, 43, 43, - 36, 36, 36, 36, 36, 36,165, 30, 36, 36, 36, 36, 36, 36,165, 27, - 36, 36, 36, 36, 72, 36, 36, 36, 36, 36, 64, 43, 43,163, 27, 27, - 36, 36, 36, 36, 58, 2, 2, 2, 36, 36, 36, 36, 27, 27, 27, 27, - 16, 16, 16, 16, 16, 27, 27, 27, 36, 36, 43, 43, 43, 43, 43, 43, - 7, 7, 7, 7, 7, 36, 36, 63, 11, 11, 11, 11,166, 43, 43,141, - 16, 16, 16, 16, 16, 16, 16, 8, 36, 36, 36, 36, 36, 64,167, 51, - 36, 36, 36, 36, 36, 36, 43, 43, 27, 27, 27, 87, 36, 36, 36, 36, - 163, 27, 30, 2, 2, 2, 2, 2, 36, 43, 43, 2, 2, 2, 2, 2, - 36, 36,165, 27, 27, 27, 27, 27, 79, 81, 36, 36, 36, 36, 36, 36, - 43, 43, 43, 57, 2, 2, 2, 2, 2, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 7, 7, 7, 7, 7, 65, 64, 65, 36, 36, 36, 36, 64, - 78, 79, 43, 77, 79, 57, 73, 2, 2, 43, 43, 43, 43, 43, 67, 59, - 36, 36, 36, 64, 43, 43, 79, 43, 43, 43, 43, 7, 7, 7, 7, 7, - 2, 2, 82, 81, 36, 36, 36, 36, 36, 64, 2, 36, 36, 36, 36, 36, - 36, 82, 78, 43, 43, 43, 43, 77, 81, 36, 58, 2, 56, 43, 57, 79, - 7, 7, 7, 7, 7, 58, 58, 2, 90, 27, 27, 27, 27, 27, 27, 27, - 36, 36, 36, 36, 36, 36, 78, 79, 43, 78, 77, 43, 2, 2, 2, 65, - 36, 36, 36, 36, 36, 36, 36, 64, 77, 78, 78, 78, 78, 78, 78, 78, - 36, 36, 36, 82, 78, 78, 81, 36, 36, 78, 78, 43, 43, 43, 43, 43, - 36, 36, 36, 36, 78, 79, 43, 43, 43, 78, 78, 78, 78, 78, 78, 77, - 65, 65, 2, 2, 2, 2, 2, 2, 56, 43, 43, 43, 43, 43, 43, 43, - 36, 36, 82, 78, 43, 43, 43, 43, 78, 43, 77, 65, 36, 58, 2, 2, - 7, 7, 7, 7, 7, 2, 2, 65, 78, 79, 43, 43, 77, 77, 78, 79, - 77, 43, 36, 66, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 82, - 78, 43, 43, 43, 78, 78, 43, 79, 57, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 36, 36, 43, 43, 78, 79, 43, 43, 43, 77, 79, 79, - 57, 2, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 79, 78, - 43, 43, 43, 79, 58, 2, 2, 2, 36, 36, 36, 36, 36, 36, 64, 79, - 78, 43, 43, 79, 43, 43, 43, 43, 7, 7, 7, 7, 7, 27, 2, 89, - 43, 43, 43, 43, 79, 57, 2, 2, 27, 27, 27, 27, 27, 27, 27, 87, - 78, 78, 78, 78, 78, 79, 77, 65, 81, 79, 2, 2, 2, 2, 2, 2, - 82, 78, 43, 43, 43, 43, 78, 78, 65, 66, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 64, 43, 43, 43, 43, 65, 36, 36, - 36, 64, 43, 43, 77, 64, 43, 57, 2, 2, 2, 56, 43, 43, 43, 43, - 64, 43, 43, 77, 79, 43, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, - 43, 43, 43, 77, 43, 2, 66, 2, 58, 2, 2, 2, 2, 2, 2, 2, - 43, 43, 43, 43, 43, 43, 43, 79, 2, 36, 36, 36, 36, 36, 36, 36, - 43, 43, 43, 43, 77, 43, 43, 43, 77, 43, 79, 43, 43, 43, 43, 43, - 43, 43, 43, 64, 43, 43, 43, 43, 36, 36, 36, 36, 36, 78, 78, 78, - 43, 77, 79, 79, 36, 36, 36, 36, 36, 64, 77, 97, 2, 2, 2, 2, - 43, 82, 36, 36, 36, 36, 36, 36, 36, 36, 78, 43, 43, 43, 43, 78, - 77, 57, 2, 2, 2, 2, 2, 2, 7, 7, 7, 7, 7, 43, 43, 43, - 27, 27, 84, 61, 61, 61, 53, 20,150, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 21, 65, 36, 36, 64, 43, 43, 43, 43, - 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 78, 79, 43, - 43, 43, 57, 2, 2, 2, 2, 2, 43, 43, 43, 57, 2, 2, 61, 61, - 40, 40, 89, 61, 61, 61, 61, 61, 7, 7, 7, 7, 7,168, 27, 27, - 27, 87, 36, 36, 36, 36, 36, 36, 40, 63, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 76,146, 2, 27, 27, 27, 30, 2, 2, 2, 2, - 82, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, - 43, 68, 40, 40, 40, 40, 40, 40, 40, 80, 43, 43, 43, 43, 43, 43, - 36, 36, 36, 36, 36, 36, 47, 57, 61, 61,169, 79, 43, 61,169, 78, - 78,170, 59, 59, 59, 75, 43, 43, 43, 70, 47, 43, 43, 43, 61, 61, - 61, 61, 61, 61, 61, 43, 43, 61, 61, 43, 70, 61, 61, 61, 61, 61, - 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 16, 11, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, - 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, - 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, - 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, - 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 32, 16, 7, - 43, 43, 43, 70, 61, 47, 43, 43, 43, 43, 43, 43, 43, 43, 70, 61, - 61, 61, 47, 61, 61, 61, 61, 61, 61, 61, 70, 21, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 56, 43, 43, 16, 16, 16, 16, 16, 39, 16, 16, - 43, 43, 43, 68, 40, 40, 40, 40, 7, 7, 7, 7, 7, 7, 7, 71, - 7, 7, 7, 7, 7, 7, 7,171, 36, 36, 36, 36, 36, 76, 43, 43, - 172, 7, 7, 7, 7, 7, 7, 85, 16, 16, 43, 43, 43, 68, 40, 40, - 27, 27, 27, 27, 27, 27,145, 27,173, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27,145, 27, 27, 27, 27, 27, 27, 84, 61, - 61, 61, 61, 61, 61, 25, 41, 41, 0, 0, 29, 21, 21, 21, 23, 21, - 22, 18, 21, 25, 21, 17, 13, 13, 25, 25, 25, 21, 21, 9, 9, 9, - 9, 22, 21, 18, 24, 16, 24, 5, 5, 5, 5, 22, 25, 18, 25, 0, - 23, 23, 26, 21, 24, 26, 7, 20, 25, 1, 26, 24, 26, 25, 15, 15, - 24, 15, 7, 19, 15, 21, 9, 25, 9, 5, 5, 25, 5, 9, 5, 7, - 7, 7, 9, 8, 8, 5, 7, 5, 6, 6, 24, 24, 6, 24, 12, 12, - 6, 5, 9, 21, 25, 9, 26, 12, 11, 11, 9, 6, 5, 21, 17, 17, - 17, 26, 26, 23, 23, 12, 17, 12, 21, 12, 12, 21, 7, 21, 1, 1, - 21, 23, 26, 26, 1, 21, 6, 7, 7, 12, 12, 7, 21, 7, 12, 1, - 12, 6, 6, 12, 12, 26, 7, 26, 26, 7, 21, 1, 24, 7, 1, 12, - 7, 6, 12, 10, 10, 10, 10, 12, 21, 6, 10, 7, 7, 10, 23, 7, - 15, 26, 13, 21, 13, 7, 15, 7, 12, 23, 21, 26, 21, 15, 17, 7, - 29, 7, 7, 22, 18, 18, 14, 14, 14, 7, 10, 21, 17, 21, 11, 12, - 5, 6, 8, 8, 8, 24, 5, 24, 9, 24, 29, 29, 29, 1, 20, 19, - 22, 20, 27, 28, 1, 29, 21, 20, 19, 21, 21, 16, 16, 21, 25, 22, - 18, 21, 21, 29, 15, 6, 18, 6, 12, 11, 9, 26, 26, 9, 26, 5, - 5, 26, 14, 9, 5, 14, 14, 15, 25, 26, 26, 22, 18, 26, 18, 25, - 18, 22, 5, 12, 22, 21, 21, 22, 18, 17, 26, 6, 7, 14, 17, 22, - 26, 14, 17, 6, 14, 6, 12, 24, 24, 6, 26, 15, 6, 21, 11, 21, - 24, 9, 6, 9, 23, 26, 6, 10, 4, 4, 3, 3, 7, 25, 17, 16, - 16, 22, 16, 16, 25, 17, 7, 1, 25, 24, 26, 1, 2, 2, 12, 15, - 21, 14, 7, 15, 9, 12, 12, 17, 13, 15, 26, 10, 10, 1, 13, 23, - 7, 13, 23, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, - 11, 12, 13, 0, 14, 0, 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 20, 0, 21, 22, 23, 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 0, 36, 0, 37, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 40, 0, 0, - 0, 0, 0, 0, 41, 42, 43, 0, 44, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 3, 0, 0, 0, - 4, 5, 6, 7, 0, 8, 9, 10, 0, 11, 12, 13, 14, 15, 16, 17, - 16, 18, 16, 19, 16, 19, 16, 19, 0, 19, 16, 20, 16, 19, 21, 19, - 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 34, 0, - 0, 35, 0, 0, 36, 0, 37, 0, 0, 0, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 49, 0, 0, - 0, 0, 0, 0, 0, 50, 0, 51, 0, 52, 53, 0, 54, 0, 0, 0, - 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, 58, 0, 0, 59, 60, 61, - 62, 63, 0, 0, 64, 65, 0, 0, 0, 66, 0, 0, 0, 0, 67, 0, - 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 72, 0, 0, 73, 0, 0, - 0, 0, 0, 0, 0, 0, 74, 75, 0, 0, 0, 0, 76, 77, 0, 78, - 79, 0, 0, 80, 81, 0, 82, 62, 0, 83, 84, 0, 0, 85, 86, 87, - 0, 88, 0, 89, 0, 90, 0, 0, 51, 91, 51, 0, 92, 0, 93, 0, - 0, 0, 81, 0, 0, 0, 94, 95, 0, 96, 97, 98, 99, 0, 0, 0, - 0, 0, 51, 0, 0, 0, 0,100,101, 0, 0, 0, 0, 0, 0,102, - 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 0,104,105, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,106, 0, 0,107, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,108,109, 0, 0,110, 0, 0, 0, 0, - 0, 0,111, 0,112, 0,105, 0, 0, 0, 0, 0,113,114, 0, 0, - 0, 0, 0, 0, 0,115, 0, 0, 0,116, 0, 0, 0,117, 0,118, - 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 0, - 0, 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, 13, 0, 0, 14, 15, - 0, 16, 0, 17, 18, 0, 0, 19, 0, 20, 21, 0, 0, 0, 0, 0, - 22, 23, 0, 24, 25, 0, 0, 26, 0, 0, 0, 27, 0, 0, 28, 29, - 30, 31, 0, 0, 0, 32, 33, 34, 0, 0, 33, 0, 0, 35, 33, 0, - 0, 0, 33, 36, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0, 0, - 0, 39, 40, 0, 0, 0, 0, 0, 0, 41, 42, 0, 0, 0, 0, 43, - 0, 44, 0, 0, 0, 45, 46, 0, 0, 0, 47, 0, 0, 0, 0, 0, - 0, 48, 49, 0, 0, 0, 0, 50, 0, 0, 0, 51, 0, 52, 0, 53, - 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 0, 56, 0, 0, 0, 0, - 57, 58, 0, 0, 0, 59, 60, 0, 0, 0, 0, 0, 0, 61, 52, 0, - 62, 63, 0, 0, 64, 0, 0, 0, 65, 66, 0, 0, 0, 67, 0, 68, - 69, 70, 71, 72, 1, 73, 0, 74, 75, 76, 0, 0, 77, 78, 0, 0, - 0, 79, 0, 0, 1, 1, 0, 0, 80, 0, 0, 81, 0, 0, 0, 0, - 77, 82, 0, 83, 0, 0, 0, 0, 0, 78, 84, 0, 85, 0, 52, 0, - 1, 78, 0, 0, 86, 0, 0, 87, 0, 0, 0, 0, 0, 88, 57, 0, - 0, 0, 0, 0, 0, 89, 90, 0, 0, 84, 0, 0, 33, 0, 0, 91, - 0, 0, 0, 0, 92, 0, 0, 0, 0, 49, 0, 0, 93, 0, 0, 0, - 0, 94, 95, 0, 0, 96, 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, - 99, 0, 0, 0,100, 0, 0, 0, 0,101,102, 93, 0, 0,103, 0, - 0, 0, 84, 0, 0,104, 0, 0, 0,105,106, 0, 0,107,108, 0, - 0, 0, 0, 0, 0,109, 0, 0,110, 0, 0, 0, 0,111, 33, 0, - 112,113,114, 57, 0, 0,115, 35, 0, 0,116, 0, 0, 0,117, 0, - 0, 0, 0, 0, 0,118, 0, 0,119, 0, 0, 0, 0,120, 88, 0, - 0, 0, 0, 0, 57, 0, 0, 0, 0, 52,121, 0, 0, 0, 0,122, - 0, 0,123, 0, 0, 0, 0,121, 0, 0,124, 0, 0, 0, 0, 0, - 79, 0, 0, 0, 0,125, 0, 0, 0,126, 0, 0, 0,127, 0,128, - 0, 0, 0, 0,129,130,131, 0,132, 0,133, 0, 0, 0,134,135, - 136, 0, 77, 0, 0, 0, 0, 0, 35, 0, 0, 0,137, 0, 0, 0, - 138, 0, 0, 0,139, 0, 0,140, 0, 0,141, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 4, 4, 8, - 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 1, 1, 1, 19, 1, - 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, 25, 26, 27, 28, 29, 30, - 0, 0, 1, 1, 31, 0, 0, 0, 32, 33, 34, 35, 1, 36, 37, 0, - 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, 42, 0, 0, 0, 43, 36, - 44, 45, 21, 45, 46, 0, 0, 0, 19, 1, 21, 0, 0, 47, 0, 38, - 48, 1, 1, 49, 49, 50, 0, 0, 51, 0, 0, 19, 52, 1, 0, 0, - 38, 14, 4, 1, 1, 1, 53, 21, 43, 52, 54, 21, 35, 1, 0, 0, - 0, 55, 0, 0, 0, 56, 57, 58, 0, 0, 0, 0, 0, 59, 0, 60, - 0, 0, 0, 0, 61, 62, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, - 65, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 69, - 70, 0, 71, 72, 73, 74, 75, 76, 0, 0, 0, 77, 0, 0, 0, 78, - 79, 0, 0, 0, 0, 47, 0, 0, 0, 49, 0, 80, 0, 0, 0, 62, - 0, 0, 63, 0, 0, 81, 0, 0, 82, 0, 0, 0, 83, 0, 0, 19, - 84, 0, 62, 0, 0, 0, 0, 49, 1, 85, 1, 52, 15, 86, 36, 10, - 21, 87, 0, 55, 0, 0, 0, 0, 19, 10, 1, 0, 0, 0, 0, 0, - 88, 0, 0, 89, 0, 0, 88, 0, 0, 0, 0, 78, 0, 0, 87, 9, - 12, 4, 90, 8, 91, 47, 0, 58, 50, 0, 21, 1, 21, 92, 93, 1, - 1, 1, 1, 94, 95, 96, 97, 1, 98, 58, 81, 99,100, 4, 58, 0, - 0, 0, 0, 0, 0, 19, 50, 0, 0, 0, 0, 0, 0, 61, 0, 0, - 101,102, 0, 0,103, 0, 0, 1, 1, 50, 0, 0, 0, 38, 0, 63, - 0, 0, 0, 0, 0, 62, 0, 0,104, 68, 61, 0, 0, 0, 78, 0, - 0, 0,105,106, 58, 38, 81, 0, 0, 0, 0, 0, 0,107, 1, 14, - 4, 12, 84, 0, 0, 0, 0, 38, 87, 0, 0, 0, 0,108, 0, 0, - 109, 61, 0,110, 0, 0, 0, 1, 0, 0, 0, 0, 49, 50, 0, 0, - 19, 58, 0, 0, 0, 51, 0,111, 14, 52,112, 41, 0, 0, 62, 0, - 0, 61, 0, 0,113, 0, 87, 0, 0, 0, 61, 62, 0, 0, 62, 0, - 89, 0, 0,113, 0, 0, 0, 0,114, 0, 0, 0, 78, 55, 0, 38, - 1, 58, 1, 58, 0, 0, 0, 0, 0, 88, 63, 89, 0, 0,115, 0, - 0, 0, 55, 0, 0, 0, 0,115, 0, 0, 0, 0, 61, 0, 0, 0, - 0, 79, 0, 61, 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, 79, 0, - 0, 0, 8, 91, 0, 0, 1, 87, 0, 0,116, 0, 0, 0, 0, 0, - 0,117, 0,118,119,120,121, 0,104, 4,122, 49, 23, 0, 0, 0, - 38, 50, 38, 58, 0, 0, 1, 87, 1, 1, 1, 1, 39, 1, 48,105, - 87, 0, 0, 0, 0, 1, 0, 0, 0,123, 0, 0, 0,112, 4,122, - 0, 0, 0, 1,124, 0, 0, 0, 0, 0,230,230,230,230,230,232, - 220,220,220,220,232,216,220,220,220,220,220,202,202,220,220,220, - 220,202,202,220,220,220, 1, 1, 1, 1, 1,220,220,220,220,230, - 230,230,230,240,230,220,220,220,230,230,230,220,220, 0,230,230, - 230,220,220,220,220,230,232,220,220,230,233,234,234,233,234,234, - 233,230, 0, 0, 0,230, 0,220,230,230,230,230,220,230,230,230, - 222,220,230,230,220,220,230,222,228,230, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, 25, 0,230,220, - 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, - 34,230,230,220,220,230,220,230,230,220, 35, 0, 0, 0, 0, 0, - 230,230,230, 0, 0,230,230, 0,220,230,230,220, 0, 0, 0, 36, - 0, 0,230,220,230,230,220,220,230,220,220,230,220,230,220,230, - 230, 0, 0,220, 0, 0,230,230, 0,230, 0,230,230,230,230,230, - 0, 0, 0,220,220,220,230,220,220,220,230,230, 0,220, 27, 28, - 29,230, 7, 0, 0, 0, 0, 9, 0, 0, 0,230,220,230,230, 0, - 0, 0, 0, 0,230, 0, 0, 84, 91, 0, 0, 0, 0, 9, 9, 0, - 0, 0, 0, 0, 9, 0,103,103, 9, 0,107,107,107,107,118,118, - 9, 0,122,122,122,122,220,220, 0, 0, 0,220, 0,220, 0,216, - 0, 0, 0,129,130, 0,132, 0, 0, 0, 0, 0,130,130,130,130, - 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0,220, 0, 0, 0, - 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, 0,230, 0, 0, 0,228, - 0, 0, 0,222,230,220,220, 0, 0, 0,230, 0, 0,220,230,220, - 0,220,230,230,230, 0, 0, 0, 9, 9, 0, 0, 7, 0,230, 0, - 1, 1, 1, 0, 0, 0,230,234,214,220,202,230,230,230,230,230, - 232,228,228,220,218,230,233,220,230,220,230,230, 1, 1, 1, 1, - 1,230, 0, 1, 1,230,220,230, 1, 1, 0, 0,218,228,232,222, - 224,224, 0, 8, 8, 0, 0, 0, 0,220,230, 0,230,230,220, 0, - 0,230, 0, 0, 26, 0, 0,220, 0,230,230, 1,220, 0, 0,230, - 220, 0, 0, 0,220,220, 0, 0,230,220, 0, 9, 7, 0, 0, 7, - 9, 0, 0, 0, 9, 7, 6, 6, 0, 0, 0, 0, 1, 0, 0,216, - 216, 1, 1, 1, 0, 0, 0,226,216,216,216,216,216, 0,220,220, - 220, 0,232,232,220,230,230,230, 7, 0, 16, 17, 17, 33, 17, 49, - 17, 17, 84, 97,135,145, 26, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17,177, 0, 1, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, - 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 6, 7, 8, 3, 3, 3, - 3, 3, 9, 10, 11, 12, 13, 3, 3, 3, 3, 3, 3, 3, 3, 14, - 3, 15, 3, 3, 3, 3, 3, 3, 16, 17, 18, 19, 20, 21, 3, 3, - 3, 22, 23, 24, 3, 3, 3, 3, 3, 3, 25, 3, 3, 3, 3, 3, - 3, 3, 3, 26, 3, 3, 27, 28, 0, 1, 0, 0, 0, 0, 0, 1, - 0, 2, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, - 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 9, 0, 0, 0, 0, 0, 0, 9, 0, 9, 0, 0, 0, 0, - 0, 0, 0, 10, 11, 12, 13, 0, 0, 14, 15, 16, 6, 0, 17, 18, - 19, 19, 19, 20, 21, 22, 23, 24, 19, 25, 0, 26, 27, 19, 19, 28, - 29, 30, 0, 31, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 19, - 28, 0, 32, 33, 9, 34, 35, 19, 0, 0, 36, 37, 38, 39, 40, 19, - 0, 41, 42, 43, 44, 31, 0, 1, 45, 42, 0, 0, 0, 0, 0, 32, - 14, 14, 0, 0, 0, 0, 14, 0, 0, 46, 47, 47, 47, 47, 48, 49, - 47, 47, 47, 47, 50, 51, 52, 53, 43, 21, 0, 0, 0, 0, 0, 0, - 0, 54, 6, 55, 0, 14, 19, 1, 0, 0, 0, 0, 56, 57, 0, 0, - 0, 0, 0, 19, 58, 31, 0, 0, 0, 0, 0, 0, 0, 59, 14, 0, - 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 60, 61, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 4, - 5, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 1, 1, 0, 0, 8, - 9, 0, 8, 9, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, 0, 0, - 13, 0, 0, 0, 0, 14, 15, 16, 17, 0, 0, 0, 1, 0, 0, 18, - 19, 0, 0, 0, 20, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 0, 8, 21, 9, 0, 0, 22, 0, 0, 0, 0, 1, - 0, 23, 24, 25, 0, 0, 26, 0, 0, 0, 8, 21, 27, 0, 1, 0, - 0, 1, 1, 1, 1, 0, 1, 28, 29, 30, 0, 31, 32, 20, 1, 1, - 0, 0, 0, 8, 21, 9, 1, 4, 5, 0, 0, 0, 33, 9, 0, 1, - 1, 1, 0, 8, 21, 21, 21, 21, 34, 1, 35, 21, 21, 21, 9, 36, - 0, 0, 37, 38, 1, 0, 39, 0, 0, 0, 1, 0, 1, 0, 0, 0, - 0, 8, 21, 9, 1, 0, 0, 0, 40, 0, 8, 21, 21, 21, 21, 21, - 21, 21, 21, 9, 0, 1, 1, 1, 1, 8, 21, 21, 21, 9, 0, 0, - 0, 41, 0, 42, 43, 0, 0, 0, 1, 44, 0, 0, 0, 45, 8, 9, - 1, 0, 0, 0, 8, 21, 21, 21, 9, 0, 1, 0, 1, 1, 8, 21, - 21, 9, 0, 4, 5, 8, 9, 1, 0, 0, 0, 1, 2, 3, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 3, 3, 3, 3, 3, 3, - 3, 15, 3, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 0, 0, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, - 18, 17, 19, 20, 21, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 26, 27, - 28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 52, 53, 31, - 31, 31, 31, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 57, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 58, 31, 31, 31, - 59, 60, 61, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 64, 65, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 66, 67, 68, 31, 31, 31, 31, 69, 31, 31, 31, 31, 31, - 31, 31, 17, 70, 71, 72, 17, 17, 73, 74, 31, 75, 76, 77, 78, 79, - 80, 31, 81, 82, 17, 83, 17, 17, 17, 17, 31, 31, 23, 23, 23, 23, - 23, 23, 23, 84, 31, 31, 31, 31, 23, 84, 31, 31, 23, 23, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 85, 0, 0, 1, - 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, - 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 11, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 19, 27, - 28, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, - 37, 37, 38, 38, 39, 40, 41, 41, 42, 42, 42, 43, 44, 44, 45, 46, - 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 49, 50, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 51, - 60, 61, 62, 63, 64, 65, 66, 7, 67, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 7, 4, 4, 4, 4, 77, 77, 77, 77, 78, 79, 80, 81, - 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 85, 85, 85, - 0, 0, 0, 0, 86, 87, 88, 88, 89, 90, 48, 91, 0, 0, 92, 92, - 92, 92, 92, 93, 94, 95, 96, 97, 98, 47, 99,100,101,102, 0,103, - 104,105, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 0,106,106,106,106,106,106,106,106,106,106,106,107, - 108,108,108,108,108, 11,109,110,111, 4,112, 4,113,114,115,116, - 117,118,119,120,121,122,123,124,125,126, 50,127, 47, 47, 47, 47, - 47, 47, 47, 47,128,128,128,128,128,128,128,128,128,128,128,128, - 92, 92, 92, 92, 92, 92, 92, 92,129,130, 19, 19, 19, 19, 19, 19, - 131, 19, 19, 19,132,133, 19,134,135,136,137,101,138,138,138,138, - 0, 77,139,140,128,128,141,142,143,144,145,146,147,148,149,150, - 151,152,153,154,155,155,155,155,155,155, 4, 4,156,157,158,159, - 160,161,162,163,164,165,166,167,168,169,170,170,171,171,172,172, - 173,174,174,174, 19, 19,175,176,177,178,179,180,181,181,182,183, - 184,185,186,187,188,188,189,190,191,192,193,193,194,194,195,195, - 128,128,196,196,197,198,199,200,201,201,128,128,202,202,203,203, - 204,204,205,205,206,207,208,209, 28, 28,210,210,211,212,213,213, - 214,215,216,216,128,128,217,217,218,218,219, 34,220,220,220,220, - 220,220,220,220,220,220,220,220,220,220,128,128,128,128,128,128, - 128,128,221,221,222,222,222,222,222,222,222,222,223,223,223,223, - 223,223,223,223,223,223,128,128,128,128,128,128,128,128,128,128, - 224,224,128,128,110,110,110,110,110,110,110,110,110,225,226,227, - 228,228,228,228,128,128,128,128,229,229,128,128,230,230,230,230, - 231,231,231,232,233,233,233,233,233,233,233,233,233,233,233,233, - 234,234,234,234,234,234,234,234,233,233,128,128,128,128,128,128, - 128,128,104,104,235,236,236,236,237,238,239,239,239,239,239,239, - 128,128,128,128,240,240,241, 0,128,128,128,128, 0, 0, 0, 0, - 7,242, 0, 0, 0, 0, 0, 0, 0,243,244, 0, 77, 77, 0, 0, - 0, 0,128,128,245,245,245,245,245,245,245,245,245,245,245,245, - 128,128,128,128,128,128,128,128, 4, 4,128,128,246, 11, 11, 11, - 247,247,128,128,128,128,248,249,128,128,128,128,128,128,250,250, - 128,128,251,251,128,128,128,128,128,128, 48, 48,252,252,252,252, - 253,253,128,128, 0, 0, 0, 0, 0, 0,128,128, 19, 19, 19, 19, - 128,128,128,128,254, 0,128,128, 0, 0, 0, 0, 92, 92,128,128, - 128,128,128,128, 0, 0,128,128, 7, 7, 7, 7, 0, 0, 0, 0, - 1, 2, 1, 2, 0, 0, 3, 3, 4, 5, 4, 5, 4, 4, 4, 4, - 4, 4, 4, 6, 0, 0, 7, 0, 8, 8, 8, 8, 8, 8, 8, 9, - 10, 11, 11, 11, 11, 11, 12, 11, 13, 13, 13, 13, 14, 13, 13, 13, - 13, 13, 13, 15, 16, 16, 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, - 19, 20, 21, 21, 22, 23, 21, 24, 21, 21, 21, 21, 21, 25, 21, 21, - 26, 26, 26, 26, 26, 21, 21, 21, 27, 27, 27, 27, 28, 28, 28, 28, - 29, 29, 29, 29, 30, 30, 26, 21, 21, 21, 31, 21, 32, 32, 32, 32, - 32, 33, 34, 32, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37, - 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 41, 41, 41, 41, - 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 44, 45, 44, 44, 44, 44, - 46, 46, 46, 46, 47, 47, 47, 47, 47, 48, 47, 47, 49, 49, 49, 49, - 49, 49, 50, 50, 50, 50, 50, 51, 52, 52, 52, 52, 53, 53, 53, 53, - 53, 53, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 56, 56, 57, 57, - 57, 57, 58, 57, 59, 59, 60, 61, 62, 62, 63, 63, 64, 64, 64, 64, - 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 55, 67, 67, 67, 67, - 67, 68, 68, 68, 69, 69, 69, 69, 69, 69, 64, 64, 70, 70, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 8, 72, 72, 72, 72, 73, 73, 73, 73, - 74, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 13, 50, 50, 50, - 73, 77, 78, 79, 4, 4, 80, 4, 4, 81, 82, 83, 4, 4, 4, 84, - 11, 11, 11, 11, 85, 0, 0, 0, 0, 0, 0, 86, 0, 4, 0, 0, - 0, 8, 8, 8, 0, 0, 87, 88, 89, 0, 4, 4, 6, 0, 0, 0, - 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 4, 4, 92, 92, 92, 92, - 50, 50, 50, 93, 93, 93, 93, 93, 53, 53, 13, 13, 94, 94, 94, 94, - 94, 94, 94, 0, 95, 0, 96, 97, 98, 99, 99, 99, 99,100,101,102, - 102,102,102,103,104,104,104,105, 52, 0,104,104, 0, 0, 0,102, - 52, 52, 0, 0, 0, 0, 52,106, 0,102,102,107,102,102,102,102, - 102,108, 0, 0,109,109,109,109,109,110,110,110,111,111,111,111, - 13, 13,112,112,112,112,112,112, 0, 0,113, 4,114, 4, 4, 4, - 115,115,115, 0,116,116,116,116,117,117,117,117,117,117, 32, 32, - 118,118,119,120,120,120, 52, 52,121,121,121,121,122,121, 49, 49, - 123,123,123,123,123,123, 49, 49,124,124,124,124,124,124,125,125, - 53, 53, 53, 4, 4,126,127, 54,125,125,125,125,128,128,128,128, - 4,129, 18, 18, 18, 21, 21, 21, 21, 21, 21,130, 8, 0,131, 0, - 0, 0, 0, 21, 21, 21, 21,132, 0, 0, 1, 2, 1, 2,133,101, - 102,134, 52, 52,135,135,135,135, 11, 0, 11, 11, 11, 0, 0,136, - 137,137,138,138,138,138,139, 0,140,140,140,141,141,142,142,142, - 143,143,144,144,144,144,144,144,145,145,145,145,145,146,146,146, - 147,147,147,148,148,148,148,148,149,149,149,150,150,150,150,151, - 151,151,151,151,152,152,152,152,153,153,153,153,154,154,154,154, - 155,155,156,156,157,157,157,157,157,157,158,158,159,159,160,160, - 160,160,160,160,161,161,162,162,162,162,162,162,163,163,163,163, - 163,163,164,164,165,165,165,165,166,166,166,166,167,167,167,167, - 168,168,169,169,170,170,170,170,171,171,171,171,172,172,172,172, - 173,173,173,173,174,174,174,174,175,175,175,175,176, 21, 21, 21, - 177,177,177,178,178,178,178,179,179,179,179,180,180,180,181,181, - 182,182,182,182,183,183,183,183,183,184,184,184,185,185,185,185, - 185,186,186,186,187,187,187,187,187,187,188, 43,189,189,189,189, - 190,190,190,191,191,191,191,191,192,192,192,193,192,192,192,192, - 194,194,194,194,195,195,195,195,196,196,196,196,197,197,197,197, - 198,198,198,198,198,198, 66, 66,199,199,199,199,199, 49, 49, 49, - 200,200,200,200,201,201,201,201,202,202,202,202,203,203,203,203, - 204,204,204,204,205,205,205,205,205,206,206,206,206,206,206, 55, - 207,207,207,207,208,208,208,208,209,209,209,209,209,209,209,210, - 210,210,210,210,211,211,211,211,211,211,212,212,212,212,212,212, - 213,213,213,213,214,214,214,214,110,110,110,110,215,215,215,215, - 216,216,216,216,217,217,217,217,218,218,218,218,219,219,219,219, - 220,220,220,221,221,221,221,221,221,222,222,222,223,223,223,223, - 224,224,224,224,225,225,225,225,226,226,226,226,226,226,227, 94, - 228,228,228,228,229,229,229,229,230, 99, 99, 99, 99, 99, 99, 99, - 99, 99,102,231, 99,232,102,233,233,233,233,233,234,234,234,234, - 234,234, 0, 0, 8, 0, 0, 0, 0, 0,235,236,237, 0,238, 0, - 239,239,239,239, 91, 91, 91, 13,240,240,240,240,241,241,241,241, - 242,242,242,242,243,243,243,243,244,244,244,244,245,245,245,245, - 246,246,246,246,247, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, - 2, 2, 3, 0, 0, 0, 4, 0, 2, 2, 2, 2, 2, 3, 2, 2, - 2, 2, 5, 0, 2, 5, 6, 0, 7, 7, 7, 7, 8, 9, 8, 10, - 8, 11, 8, 8, 8, 8, 8, 8, 12, 13, 13, 13, 14, 14, 14, 14, - 14, 15, 14, 14, 16, 17, 17, 17, 17, 17, 17, 17, 18, 19, 19, 19, - 19, 19, 19, 19, 20, 21, 20, 22, 20, 20, 23, 23, 20, 20, 20, 20, - 22, 20, 24, 7, 7, 25, 20, 20, 26, 20, 20, 20, 20, 20, 20, 21, - 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, - 31, 31, 31, 31, 32, 20, 20, 20, 33, 33, 33, 33, 34, 35, 33, 33, - 33, 36, 33, 33, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, - 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, - 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 47, - 48, 48, 48, 48, 49, 49, 49, 49, 49, 50, 51, 49, 52, 52, 52, 52, - 53, 53, 53, 53, 53, 53, 54, 53, 55, 55, 55, 55, 56, 56, 56, 56, - 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 60, - 60, 60, 61, 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 0, 0, - 66, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 68, 69, 70, 71, 71, - 71, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 74, - 75, 75, 75, 75, 76, 76, 76, 76, 77, 77, 77, 77, 78, 78, 78, 78, - 79, 79, 79, 79, 80, 80, 80, 80, 81, 81, 81, 81, 82, 7, 7, 7, - 83, 7, 84, 85, 0, 84, 86, 0, 2, 87, 88, 2, 2, 2, 2, 89, - 90, 87, 91, 2, 2, 2, 92, 2, 2, 2, 2, 93, 0, 0, 0, 86, - 1, 0, 0, 94, 0, 95, 96, 0, 4, 0, 0, 0, 0, 0, 0, 4, - 97, 97, 97, 97, 98, 98, 98, 98, 13, 13, 13, 13, 99, 99, 99, 99, - 100,100,100,100, 0,101, 0, 0,102,100,103,104, 0, 0,100, 0, - 105,106,106,106,106,106,106,106,106,106,107,105,108,109,109,109, - 109,109,109,109,109,109,110,108,111,111,111,111,112, 55, 55, 55, - 55, 55, 55,113,109,109,109,110,109,109, 0, 0,114,114,114,114, - 115,115,115,115,116,116,116,116,117,117,117,117, 96, 2, 2, 2, - 2, 2, 94, 2,118,118,118,118,119,119,119,119,120,120,120,120, - 121,121,121,121,121,121,121,122,123,123,123,123,124,124,124,124, - 124,124,124,125,126,126,126,126,127,127,127,127,128,128,128,128, - 2, 2, 3, 2, 2,129,130, 0,131,131,131,131,132, 17, 17, 18, - 20, 20, 20,133, 7, 7, 7,134, 20, 20, 20, 23, 0,135,109,109, - 109,109,109,136,137,137,137,137, 0, 0, 0,138,139,139,139,139, - 140,140,140,140, 84, 0, 0, 0,141,141,141,141,142,142,142,142, - 143,143,143,143,144,144,144,144,145,145,145,145,146,146,146,146, - 147,147,147,147,148,148,148,148,149,149,149,149,150,150,150,150, - 151,151,151,151,152,152,152,152,153,153,153,153,154,154,154,154, - 155,155,155,155,156,156,156,156,157,157,157,157,158,158,158,158, - 159,159,159,159,160,160,160,160,161,161,161,161,162,162,162,162, - 163,163,163,163,164,164,164,164,165,165,165,165,166,166,166,166, - 167,167,167,167,168,168,168,168,169,169,169,169,170,170,170,170, - 171,171,171,171,172,172,172,172,173,173,173,173,174,174,174,174, - 175,175,175,175,176,176,176,176,177, 20, 20, 20,178,178,178,178, - 179,179,179,179,180,180,180,180,181,181,181,181,182,182,182,182, - 183,183,183,183,184,184,184,184,185,185,185,185,186,186,186,186, - 187,187,187,187,188,188,188,188,189, 45, 45, 45,190,190,190,190, - 191,191,191,191,192,192,192,192,193,193,193,193,193,193,194,193, - 195,195,195,195,196,196,196,196,197,197,197,197,198,198,198,198, - 199,199,199,199,200,200,200,200,201,201,201,201,202,202,202,202, - 203,203,203,203,204,204,204,204,205,205,205,205,206,206,206,206, - 207,207,207,207,208,208,208,208,209,209,209,209,210,210,210,210, - 211,211,211,211,212,212,212,212,213,213,213,213,214,214,214,214, - 215,215,215,215,216,216,216,216,217,217,217,217,218,218,218,218, - 219,219,219,219,220,220,220,220,221,221,221,221,222,222,222,222, - 223,223,223,223,224,224,224,224,225,225,225,225,226,226,226,226, - 227,227,227,227,228,229,229,229,230,230,230,230,229,229,229,229, - 231,106,106,106,232,106,106,106,106,233,109,109,234,234,234,234, - 235,235,235,235, 0,236, 86, 0, 0, 0,236, 7, 82,138, 7, 0, - 0, 0,237, 86,238,238,238,238,239,239,239,239,240,240,240,240, - 241,241,241,241,242,242,242,242,243,243,243,243,244,244,244,244, - 245,245,245,245,246, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 19, 0, 19, 0, 0, 0, - 0, 0, 26, 26, 1, 1, 1, 1, 9, 9, 9, 9, 0, 9, 9, 9, - 9, 9, 0, 9, 9, 0, 9, 0, 9, 9, 55, 55, 55, 55, 55, 55, - 6, 6, 6, 6, 6, 1, 1, 6, 6, 4, 4, 4, 4, 4, 4, 4, - 4, 14, 14, 14, 14, 14, 14, 14, 3, 3, 3, 3, 3, 0, 3, 3, - 0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 1, 1, 1, 3, 3, - 1, 3, 3, 3, 37, 37, 37, 37, 38, 38, 38, 38, 64, 64, 64, 64, - 90, 90, 90, 90, 95, 95, 95, 95, 3, 3, 0, 3, 7, 7, 7, 7, - 7, 1, 1, 1, 1, 7, 7, 7, 0, 0, 7, 7, 5, 5, 5, 5, - 11, 11, 11, 11, 10, 10, 10, 10, 21, 21, 21, 21, 22, 22, 22, 22, - 23, 23, 23, 23, 16, 16, 16, 16, 20, 20, 20, 20, 36, 36, 36, 36, - 24, 24, 24, 24, 24, 24, 24, 0, 18, 18, 18, 18, 25, 25, 25, 25, - 25, 0, 0, 0, 0, 25, 25, 25, 33, 33, 33, 33, 8, 8, 8, 8, - 8, 8, 8, 0, 12, 12, 12, 12, 30, 30, 30, 30, 29, 29, 29, 29, - 28, 28, 28, 28, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 0, - 0, 0, 35, 35, 45, 45, 45, 45, 44, 44, 44, 44, 44, 0, 0, 0, - 43, 43, 43, 43, 46, 46, 46, 46, 31, 31, 31, 31, 32, 32, 0, 0, - 32, 0, 32, 32, 32, 32, 32, 32, 48, 48, 48, 48, 52, 52, 52, 52, - 58, 58, 58, 58, 54, 54, 54, 54, 91, 91, 91, 91, 62, 62, 62, 62, - 76, 76, 76, 76, 93, 93, 93, 93, 70, 70, 70, 70, 73, 73, 73, 73, - 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, - 1, 1, 0, 0, 19, 19, 9, 9, 9, 9, 9, 6, 19, 9, 9, 9, - 9, 9, 19, 19, 9, 9, 9, 19, 6, 19, 19, 19, 19, 19, 19, 9, - 0, 0, 0, 19, 0, 0, 9, 0, 0, 0, 19, 19, 27, 27, 27, 27, - 56, 56, 56, 56, 61, 61, 61, 61, 13, 13, 13, 13, 0, 13, 0, 13, - 0, 13, 13, 13, 13, 13, 1, 1, 1, 1, 12, 12, 0, 15, 15, 15, - 15, 15, 15, 15, 15, 1, 1, 0, 0, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 0, 26, 26, 26, 26, 26, 12, 12, 12, 12, 12, 12, 0, - 39, 39, 39, 39, 86, 86, 86, 86, 77, 77, 77, 77, 79, 79, 79, 79, - 60, 60, 60, 60, 65, 65, 65, 65, 75, 75, 75, 75, 69, 69, 69, 69, - 69, 69, 0, 69, 74, 74, 74, 74, 84, 84, 84, 84, 84, 84, 84, 0, - 68, 68, 68, 68, 92, 92, 92, 92, 87, 87, 87, 87, 19, 9, 19, 19, - 19, 19, 0, 0, 2, 2, 2, 2, 19, 19, 19, 4, 3, 3, 0, 0, - 1, 1, 6, 6, 0, 0, 17, 17, 17, 17, 0, 0, 49, 49, 49, 49, - 0, 1, 1, 1, 71, 71, 71, 71, 67, 67, 67, 67, 42, 42, 42, 42, - 41, 41, 41, 41,118,118,118,118, 53, 53, 53, 53, 59, 59, 59, 59, - 40, 40, 40, 40, 51, 51, 51, 51, 50, 50, 50, 50,135,135,135,135, - 106,106,106,106,104,104,104,104,161,161,161,161,170,170,170,170, - 110,110,110,110, 47, 47, 47, 47, 81, 81, 81, 81,120,120,120,120, - 116,116,116,116,128,128,128,128, 66, 66, 66, 66, 72, 72, 72, 72, - 98, 98, 98, 98, 97, 97, 97, 97, 57, 57, 57, 57, 88, 88, 88, 88, - 117,117,117,117,112,112,112,112, 78, 78, 78, 78, 83, 83, 83, 83, - 82, 82, 82, 82,122,122,122,122, 89, 89, 89, 89,130,130,130,130, - 144,144,144,144,165,165,165,165,156,156,156,156,156,156, 3, 3, - 147,147,147,147,148,148,148,148,158,158,158,158,153,153,153,153, - 149,149,149,149, 94, 94, 94, 94, 85, 85, 85, 85,101,101,101,101, - 96, 96, 96, 96,111,111,111,111,100,100,100,100,100, 36, 36, 36, - 108,108,108,108,129,129,129,129,109,109,109,109,107,107,107,107, - 107,107,107, 1,171,171,171,171,137,137,137,137,124,124,124,124, - 123,123,123,123,114,114,114,114,102,102,102,102,126,126,126,126, - 142,142,142,142,125,125,125,125,154,154,154,154,150,150,150,150, - 141,141,141,141,140,140,140,140,121,121,121,121,169,169,169,169, - 133,133,133,133,134,134,134,134,138,138,138,138,143,143,143,143, - 145,145,145,145,163,163,163,163, 63, 63, 63, 63,157,157,157,157, - 80, 80, 80, 80,127,127,127,127,166,166,166,166,115,115,115,115, - 159,159,159,159,103,103,103,103,119,119,119,119,167,167,167,167, - 146,146,146,146, 99, 99, 99, 99,136,139, 13, 13,155,155,155,155, - 136,136,136,136, 17, 15, 15, 15, 17, 17, 15, 15, 15, 17, 17, 17, - 139,139,139,139,105,105,105,105, 0, 0, 0, 1, 0, 0, 1, 1, - 131,131,131,131,151,151,151,151,160,160,160,160,152,152,152,152, - 164,164,164,164,168,168,168,168,113,113,113,113,132,132,132,132, - 15, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, - 9, 10, 9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 16, 17, 9, 9, 9, 9, 18, 9, 9, 9, 9, 9, 19, 20, 21, 9, - 22, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 23, 9, 9, 9, 9, 9, 24, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 25, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 23, 0, 0, 24, 25, 26, 27, 28, 29, 30, - 0, 0, 31, 32, 0, 33, 0, 34, 0, 35, 0, 0, 0, 0, 36, 37, - 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 42, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 43, 44, 0, 45, 0, 0, 0, 0, 0, 0, 46, 47, - 0, 0, 0, 0, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 52, 0, 0, 53, 0, - 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, - 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 67, 68, 0, 69, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100, - 101,102,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,104, 0, 0, 0, 0, 0, 0,105,106, 0,107, 0, - 0, 0,108, 0,109, 0,110, 0,111,112,113, 0,114, 0, 0, 0, - 115, 0, 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,118,119,120,121, 0,122,123,124,125,126, - 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128,129,130,131,132,133,134,135,136,137,138,139,140,141, - 142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157, - 0, 0, 0,158,159,160,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,162, 0, - 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164,165, 0, 0, 0, - 0, 0, 0, 0,166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,167, 0, 0, 0,168,169, 0, 0,170, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,171, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,175, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,176,177, 0, 0, 0, 0,178,179, 0, - 0, 0,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, - 3, 4, -}; -static const uint16_t -_hb_ucd_u16[5080] = -{ - 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12, - 13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23, - 13, 13, 13, 24, 25, 11, 11, 11, 11, 26, 11, 27, 28, 29, 30, 31, - 32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 11, 37, 38, 13, 39, - 9, 9, 9, 11, 11, 11, 13, 13, 40, 13, 13, 13, 41, 13, 13, 13, - 13, 13, 13, 35, 9, 42, 11, 11, 43, 44, 32, 45, 46, 47, 47, 48, - 49, 50, 47, 47, 51, 32, 52, 53, 47, 47, 47, 47, 47, 54, 55, 56, - 57, 58, 47, 32, 59, 47, 47, 47, 47, 47, 60, 53, 61, 47, 62, 63, - 47, 64, 65, 66, 47, 67, 47, 47, 68, 69, 47, 47, 70, 32, 71, 32, - 72, 47, 47, 73, 74, 75, 76, 77, 78, 47, 47, 79, 80, 81, 82, 83, - 84, 47, 47, 85, 86, 87, 88, 89, 84, 47, 47, 79, 90, 47, 82, 91, - 92, 47, 47, 93, 94, 95, 82, 96, 97, 47, 47, 98, 99, 100, 101, 102, - 103, 47, 47, 104, 105, 106, 82, 107, 108, 47, 47, 93, 109, 110, 82, 111, - 112, 47, 47, 113, 114, 115, 82, 116, 92, 47, 47, 47, 117, 118, 101, 119, - 47, 47, 47, 120, 121, 122, 66, 66, 47, 47, 47, 123, 124, 125, 47, 47, - 126, 127, 128, 129, 47, 47, 47, 130, 131, 32, 32, 132, 133, 134, 66, 66, - 47, 47, 135, 136, 122, 137, 138, 139, 140, 141, 9, 9, 9, 11, 11, 142, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 143, 144, 145, - 47, 146, 9, 9, 9, 9, 9, 147, 148, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 149, 47, 150, 151, 47, 47, 47, 47, 152, 153, - 47, 154, 47, 155, 47, 156, 47, 156, 47, 47, 47, 157, 158, 159, 160, 145, - 161, 160, 47, 47, 162, 47, 47, 47, 163, 47, 164, 47, 47, 47, 47, 47, - 47, 47, 165, 166, 167, 47, 47, 47, 47, 47, 47, 47, 47, 168, 146, 146, - 47, 169, 47, 47, 47, 170, 171, 172, 160, 160, 173, 174, 32, 32, 32, 32, - 175, 47, 47, 176, 177, 122, 178, 179, 180, 47, 181, 61, 47, 47, 182, 183, - 47, 47, 184, 185, 186, 61, 47, 187, 188, 9, 9, 9, 66, 189, 190, 191, - 11, 11, 192, 27, 27, 27, 193, 194, 11, 195, 27, 27, 32, 32, 32, 32, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 196, 13, 13, 13, 13, 13, 13, - 197, 197, 197, 197, 197, 198, 197, 11, 199, 199, 199, 200, 201, 202, 202, 201, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 27, 212, 212, 212, 213, 214, 32, - 215, 216, 217, 218, 219, 145, 220, 220, 221, 222, 223, 146, 224, 225, 146, 226, - 227, 227, 227, 227, 227, 227, 227, 227, 228, 146, 229, 146, 146, 146, 146, 230, - 146, 231, 227, 232, 146, 233, 234, 146, 146, 146, 146, 146, 146, 146, 145, 145, - 145, 235, 146, 146, 146, 146, 236, 145, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 237, 238, 146, 146, 239, 146, 146, 146, 146, 146, 146, 240, 146, - 146, 146, 146, 146, 146, 146, 241, 242, 145, 243, 146, 146, 244, 227, 245, 227, - 246, 247, 227, 227, 227, 248, 227, 249, 146, 146, 146, 227, 250, 146, 146, 146, - 9, 9, 9, 11, 11, 11, 251, 252, 13, 13, 13, 13, 13, 13, 253, 254, - 11, 11, 11, 47, 47, 47, 255, 256, 47, 47, 47, 47, 47, 47, 32, 32, - 257, 258, 259, 260, 261, 262, 263, 263, 264, 265, 266, 267, 268, 47, 47, 47, - 47, 269, 148, 47, 47, 47, 47, 270, 47, 271, 47, 47, 146, 146, 146, 47, - 146, 146, 272, 146, 273, 274, 146, 146, 272, 146, 146, 274, 146, 146, 146, 146, - 47, 47, 47, 47, 146, 146, 146, 146, 47, 275, 47, 47, 47, 47, 47, 47, - 47, 146, 146, 146, 146, 47, 47, 187, 276, 47, 61, 47, 13, 13, 277, 278, - 13, 279, 47, 47, 47, 47, 280, 281, 31, 282, 283, 284, 13, 13, 13, 285, - 286, 287, 288, 289, 290, 291, 9, 292, 293, 47, 294, 295, 47, 47, 47, 296, - 297, 47, 47, 298, 299, 160, 32, 300, 61, 47, 301, 47, 302, 303, 47, 47, - 72, 47, 47, 304, 305, 306, 307, 61, 47, 47, 308, 309, 310, 311, 47, 312, - 47, 47, 47, 313, 58, 314, 315, 316, 47, 47, 47, 11, 11, 317, 318, 11, - 11, 11, 11, 11, 47, 47, 319, 160, 320, 320, 320, 320, 320, 320, 320, 320, - 321, 321, 321, 321, 321, 321, 321, 321, 11, 322, 323, 47, 47, 47, 47, 47, - 47, 47, 47, 324, 31, 325, 47, 47, 47, 47, 47, 326, 146, 47, 47, 47, - 47, 47, 47, 47, 327, 146, 146, 328, 32, 329, 32, 330, 331, 332, 333, 47, - 47, 47, 47, 47, 47, 47, 47, 334, 335, 2, 3, 4, 5, 336, 337, 338, - 47, 339, 47, 47, 47, 47, 340, 341, 342, 145, 145, 343, 220, 220, 220, 344, - 345, 146, 146, 146, 146, 146, 146, 346, 347, 347, 347, 347, 347, 347, 347, 347, - 47, 47, 47, 47, 47, 47, 348, 145, 47, 47, 349, 47, 350, 47, 47, 60, - 47, 351, 47, 47, 47, 352, 220, 220, 9, 9, 147, 11, 11, 47, 47, 47, - 47, 47, 160, 9, 9, 147, 11, 11, 47, 47, 47, 47, 47, 47, 351, 9, - 9, 353, 11, 11, 47, 47, 47, 47, 27, 27, 27, 27, 27, 27, 27, 27, - 47, 47, 47, 47, 47, 354, 47, 355, 47, 47, 356, 145, 145, 145, 47, 357, - 47, 358, 47, 351, 66, 66, 66, 66, 47, 47, 47, 359, 145, 145, 145, 145, - 360, 47, 47, 361, 145, 66, 47, 362, 47, 363, 145, 145, 364, 47, 365, 66, - 47, 47, 47, 366, 47, 367, 47, 367, 47, 366, 144, 145, 145, 145, 145, 145, - 9, 9, 9, 9, 11, 11, 11, 368, 47, 47, 369, 160, 370, 9, 371, 11, - 372, 227, 227, 227, 227, 227, 227, 227, 145, 145, 145, 145, 145, 145, 145, 145, - 47, 47, 373, 47, 47, 47, 47, 374, 47, 363, 375, 47, 60, 376, 66, 47, - 377, 66, 66, 47, 378, 145, 47, 47, 379, 47, 47, 361, 380, 381, 382, 383, - 180, 47, 47, 384, 385, 47, 47, 160, 97, 47, 386, 387, 388, 47, 47, 389, - 180, 47, 47, 390, 391, 392, 393, 145, 47, 47, 394, 395, 360, 32, 32, 32, - 47, 47, 366, 47, 47, 396, 172, 160, 92, 47, 47, 113, 397, 398, 399, 32, - 47, 47, 47, 400, 401, 402, 403, 32, 47, 47, 47, 404, 405, 406, 47, 47, - 47, 47, 47, 407, 408, 160, 160, 160, 47, 47, 409, 410, 411, 412, 32, 32, - 47, 47, 47, 413, 414, 160, 66, 66, 47, 47, 415, 416, 160, 160, 160, 160, - 47, 417, 418, 419, 47, 47, 47, 47, 47, 47, 394, 420, 66, 66, 66, 66, - 9, 9, 9, 9, 11, 11, 128, 421, 47, 47, 47, 422, 423, 160, 160, 160, - 47, 47, 47, 47, 47, 424, 425, 426, 427, 47, 47, 428, 429, 430, 47, 47, - 431, 432, 66, 47, 47, 47, 47, 47, 66, 66, 66, 66, 66, 66, 66, 66, - 47, 47, 47, 47, 47, 47, 433, 160, 47, 47, 409, 434, 433, 128, 145, 435, - 47, 156, 436, 437, 32, 32, 32, 32, 47, 47, 47, 360, 438, 160, 47, 47, - 439, 440, 160, 160, 160, 160, 160, 160, 47, 47, 47, 47, 47, 47, 47, 441, - 442, 47, 47, 443, 444, 445, 32, 32, 47, 47, 47, 47, 145, 446, 447, 448, - 220, 220, 220, 220, 220, 220, 220, 66, 47, 47, 47, 47, 47, 47, 47, 433, - 47, 47, 47, 209, 449, 32, 47, 47, 47, 450, 451, 160, 160, 160, 160, 160, - 47, 47, 47, 47, 47, 47, 306, 47, 47, 47, 47, 47, 160, 47, 47, 452, - 47, 47, 47, 453, 454, 455, 456, 47, 27, 27, 27, 27, 457, 47, 458, 160, - 9, 9, 9, 9, 9, 9, 11, 11, 145, 459, 66, 66, 66, 66, 66, 66, - 47, 47, 47, 47, 396, 460, 426, 426, 461, 462, 27, 27, 27, 27, 463, 426, - 47, 464, 209, 209, 209, 209, 209, 209, 146, 146, 146, 146, 146, 146, 146, 160, - 32, 32, 32, 32, 32, 146, 146, 146, 146, 146, 146, 146, 146, 146, 465, 466, - 467, 146, 468, 146, 146, 146, 146, 146, 146, 146, 146, 146, 469, 146, 146, 146, - 9, 470, 11, 471, 472, 11, 197, 9, 473, 474, 9, 475, 11, 9, 470, 11, - 471, 472, 11, 197, 9, 473, 474, 9, 475, 11, 9, 470, 11, 471, 472, 11, - 197, 9, 473, 474, 9, 475, 11, 9, 470, 11, 197, 9, 476, 477, 478, 479, - 11, 480, 9, 481, 482, 483, 484, 11, 485, 9, 486, 11, 487, 160, 160, 160, - 32, 32, 32, 488, 32, 32, 489, 490, 491, 492, 32, 32, 32, 32, 32, 32, - 493, 11, 11, 11, 11, 11, 11, 11, 32, 32, 32, 27, 27, 27, 27, 27, - 32, 32, 32, 32, 32, 32, 32, 32, 47, 47, 47, 494, 495, 146, 146, 146, - 47, 47, 450, 32, 47, 47, 374, 496, 47, 47, 47, 47, 47, 47, 497, 160, - 47, 47, 47, 47, 47, 47, 450, 498, 47, 47, 47, 47, 356, 32, 32, 32, - 9, 9, 473, 11, 499, 306, 66, 66, 145, 145, 500, 501, 145, 145, 145, 145, - 145, 145, 502, 145, 145, 145, 145, 145, 47, 47, 47, 47, 47, 47, 47, 227, - 503, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 504, - 209, 209, 209, 209, 209, 209, 209, 209, 0, 0, 0, 0, 0, 0, 0, 0, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 716, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 717, + 0, 0, 0, 0, 1, 2, 1, 2, 0, 0, 3, 3, 4, 5, 4, 5, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 0, 7, 0, + 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 11, 11, 11, 13, 11, + 14, 14, 14, 14, 14, 14, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 16, 17, 18, 17, 17, 19, 20, 21, 21, 22, 21, 23, 24, + 25, 26, 27, 27, 28, 29, 27, 30, 27, 27, 27, 27, 27, 31, 27, 27, + 32, 33, 33, 33, 34, 27, 27, 27, 35, 35, 35, 36, 37, 37, 37, 38, + 39, 39, 40, 41, 42, 43, 44, 27, 27, 45, 27, 27, 27, 27, 46, 27, + 47, 47, 47, 47, 47, 48, 49, 47, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 108, 109, 110, 111, 108, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 121, 122, 121, 123, 124, 124, 125, 126, 127, 128, 129, 130, 124, 124, + 131, 131, 131, 131, 132, 131, 133, 134, 131, 132, 131, 135, 135, 136, 124, 124, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 138, 138, 139, 138, 138, 140, + 141, 141, 141, 141, 141, 141, 141, 141, 142, 142, 142, 142, 143, 144, 142, 142, + 143, 142, 142, 145, 146, 147, 142, 142, 142, 146, 142, 142, 142, 148, 142, 149, + 142, 150, 151, 151, 151, 151, 151, 152, 153, 153, 153, 153, 153, 153, 153, 153, + 154, 155, 156, 156, 156, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 167, 167, 167, 167, 168, 169, 169, 170, 171, 172, 172, 172, 172, 172, 173, + 172, 172, 174, 153, 153, 153, 153, 175, 176, 177, 178, 178, 179, 180, 181, 182, + 183, 183, 184, 183, 185, 186, 167, 167, 187, 188, 189, 189, 189, 190, 189, 191, + 192, 192, 193, 8, 8, 194, 195, 124, 196, 196, 196, 196, 197, 196, 196, 196, + 198, 198, 198, 198, 199, 199, 199, 200, 201, 201, 201, 202, 203, 204, 204, 204, + 205, 138, 138, 206, 207, 208, 209, 210, 4, 4, 211, 4, 4, 212, 213, 214, + 4, 4, 4, 215, 8, 8, 8, 8, 11, 216, 11, 11, 216, 217, 11, 218, + 11, 11, 11, 219, 219, 220, 11, 221, 222, 0, 0, 0, 0, 0, 223, 224, + 225, 226, 0, 0, 227, 8, 8, 228, 0, 0, 229, 230, 231, 0, 4, 4, + 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 124, 234, 124, 0, 0, 235, 235, 235, 235, 235, 235, 235, 235, + 0, 0, 0, 0, 0, 0, 0, 236, 237, 237, 237, 237, 237, 237, 4, 4, + 238, 238, 238, 238, 238, 238, 238, 239, 138, 138, 139, 240, 240, 240, 241, 242, + 142, 243, 244, 244, 244, 244, 14, 14, 0, 0, 0, 0, 0, 245, 124, 124, + 246, 247, 246, 246, 246, 246, 246, 248, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 246, 246, 246, 249, 124, 0, 250, 0, 251, 252, 253, 254, 254, 254, + 254, 255, 256, 257, 257, 257, 257, 258, 259, 260, 260, 261, 141, 141, 141, 141, + 262, 0, 260, 260, 0, 0, 263, 257, 141, 262, 0, 0, 0, 0, 141, 264, + 0, 0, 0, 0, 0, 257, 257, 265, 257, 257, 257, 257, 257, 266, 0, 0, + 246, 246, 246, 246, 0, 0, 0, 0, 267, 267, 267, 267, 267, 267, 267, 267, + 268, 267, 267, 267, 269, 270, 270, 270, 271, 271, 271, 271, 271, 271, 271, 271, + 271, 271, 272, 124, 14, 14, 14, 14, 14, 14, 273, 273, 273, 273, 273, 274, + 0, 0, 275, 4, 4, 4, 4, 4, 276, 4, 4, 4, 4, 226, 124, 277, + 278, 278, 279, 233, 280, 280, 280, 281, 282, 282, 282, 282, 283, 284, 47, 47, + 285, 285, 286, 287, 287, 288, 141, 289, 290, 290, 290, 290, 291, 292, 137, 293, + 294, 294, 294, 295, 296, 297, 137, 137, 298, 298, 298, 298, 299, 300, 301, 302, + 303, 304, 244, 4, 4, 305, 306, 151, 151, 151, 151, 151, 301, 301, 307, 308, + 141, 141, 309, 141, 310, 141, 141, 311, 124, 124, 124, 124, 124, 124, 124, 124, + 246, 246, 246, 246, 246, 246, 312, 246, 246, 246, 246, 246, 246, 313, 124, 124, + 314, 315, 21, 316, 317, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 318, 27, 27, 27, 27, 27, 27, 27, 27, 27, 124, 124, 27, + 8, 233, 319, 0, 0, 320, 321, 322, 27, 27, 27, 27, 27, 27, 27, 323, + 324, 0, 1, 2, 1, 2, 325, 256, 257, 326, 141, 262, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 335, 124, 124, 332, 332, 332, 332, 332, 332, 332, 336, + 337, 0, 0, 338, 11, 11, 11, 11, 339, 340, 341, 124, 124, 0, 0, 342, + 343, 344, 345, 345, 345, 346, 347, 348, 349, 349, 350, 351, 352, 353, 353, 354, + 355, 356, 357, 357, 358, 359, 124, 124, 360, 360, 360, 360, 360, 361, 361, 361, + 362, 363, 364, 365, 365, 366, 365, 367, 368, 368, 369, 370, 370, 370, 371, 372, + 372, 373, 374, 375, 376, 376, 376, 377, 378, 378, 378, 378, 378, 378, 378, 378, + 378, 378, 378, 379, 378, 380, 381, 124, 382, 4, 4, 383, 124, 124, 124, 124, + 384, 385, 385, 386, 387, 388, 389, 389, 390, 391, 392, 124, 124, 124, 393, 394, + 395, 396, 397, 398, 399, 400, 124, 124, 401, 401, 402, 403, 402, 404, 402, 402, + 405, 406, 407, 408, 409, 409, 410, 410, 411, 411, 124, 124, 412, 412, 413, 414, + 415, 415, 415, 416, 417, 418, 419, 420, 421, 422, 423, 124, 124, 124, 124, 124, + 424, 424, 424, 424, 425, 124, 124, 124, 426, 426, 426, 427, 426, 426, 426, 428, + 429, 429, 430, 431, 432, 432, 433, 432, 434, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 27, 435, 436, 436, 437, 438, 439, 440, 124, 441, + 442, 442, 443, 444, 444, 445, 124, 446, 447, 124, 124, 448, 449, 124, 450, 451, + 452, 452, 452, 452, 453, 454, 452, 455, 456, 456, 456, 456, 457, 458, 459, 460, + 461, 461, 461, 462, 463, 464, 464, 465, 466, 466, 466, 466, 466, 466, 467, 468, + 469, 470, 469, 469, 471, 124, 124, 124, 472, 473, 474, 475, 475, 475, 476, 477, + 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 487, 488, 489, 490, 491, 124, + 492, 492, 492, 492, 492, 493, 494, 124, 495, 495, 495, 495, 496, 497, 124, 124, + 498, 498, 498, 499, 498, 500, 124, 124, 501, 501, 501, 501, 502, 503, 504, 124, + 505, 505, 505, 506, 506, 137, 507, 124, 508, 509, 510, 508, 511, 124, 124, 124, + 512, 512, 512, 513, 124, 124, 124, 124, 124, 124, 514, 514, 514, 514, 514, 515, + 516, 517, 518, 519, 520, 521, 124, 124, 124, 124, 522, 523, 523, 522, 524, 124, + 525, 525, 525, 525, 526, 527, 527, 527, 527, 527, 528, 153, 529, 529, 529, 530, + 531, 124, 124, 124, 124, 124, 532, 124, 124, 124, 124, 124, 533, 533, 534, 535, + 536, 537, 537, 538, 539, 537, 540, 541, 541, 542, 543, 544, 124, 124, 124, 124, + 545, 546, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 555, 556, 557, 124, + 124, 124, 124, 124, 124, 124, 558, 559, 560, 561, 560, 562, 560, 563, 124, 124, + 124, 124, 124, 564, 565, 565, 565, 566, 567, 567, 567, 567, 567, 567, 567, 567, + 567, 568, 124, 124, 124, 124, 124, 124, 567, 567, 567, 567, 567, 567, 569, 570, + 567, 567, 567, 567, 571, 124, 124, 124, 124, 572, 572, 572, 572, 572, 572, 573, + 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 575, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 576, 577, 577, 577, 577, 577, 577, 577, 577, + 577, 577, 577, 577, 578, 124, 124, 124, 579, 579, 579, 580, 124, 124, 124, 124, + 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 581, 582, 583, 584, 585, + 585, 585, 585, 586, 587, 588, 589, 590, 591, 591, 591, 591, 592, 593, 594, 595, + 591, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 596, 596, 596, 597, + 124, 124, 124, 124, 598, 598, 598, 598, 598, 599, 600, 601, 600, 602, 124, 124, + 603, 603, 603, 603, 604, 603, 603, 603, 605, 603, 124, 124, 124, 124, 606, 607, + 608, 608, 608, 608, 608, 608, 608, 608, 609, 609, 609, 609, 609, 609, 609, 609, + 609, 609, 609, 609, 609, 610, 124, 611, 608, 612, 124, 124, 124, 124, 124, 124, + 608, 608, 608, 608, 608, 608, 608, 613, 124, 124, 124, 124, 124, 124, 124, 614, + 615, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 616, 617, 124, 618, 619, 620, 620, 620, 620, 620, 620, 620, 620, 620, + 620, 620, 620, 620, 620, 620, 620, 621, 622, 622, 622, 622, 622, 622, 623, 624, + 625, 626, 627, 124, 124, 124, 124, 124, 0, 0, 0, 0, 0, 0, 0, 340, + 0, 0, 0, 628, 0, 629, 0, 629, 8, 8, 194, 8, 630, 0, 0, 0, + 0, 0, 0, 0, 627, 124, 124, 124, 0, 0, 0, 0, 0, 0, 0, 631, + 0, 0, 632, 0, 0, 0, 633, 634, 635, 0, 636, 0, 0, 0, 234, 124, + 11, 11, 11, 11, 637, 124, 124, 124, 124, 124, 124, 124, 0, 627, 0, 627, + 0, 0, 0, 0, 0, 638, 0, 639, 0, 0, 0, 0, 0, 223, 0, 0, + 0, 640, 641, 642, 643, 0, 0, 0, 644, 645, 0, 646, 647, 648, 0, 0, + 0, 0, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 650, 0, 0, 0, + 651, 651, 651, 651, 651, 651, 651, 651, 652, 653, 654, 124, 124, 124, 124, 124, + 4, 655, 656, 124, 124, 124, 124, 124, 657, 658, 659, 14, 14, 14, 660, 124, + 661, 124, 124, 124, 124, 124, 124, 124, 662, 662, 663, 664, 665, 124, 124, 124, + 124, 666, 667, 124, 668, 668, 668, 669, 124, 124, 124, 124, 124, 670, 670, 671, + 124, 124, 124, 124, 124, 672, 672, 673, 124, 124, 124, 124, 674, 675, 674, 676, + 124, 124, 124, 124, 124, 124, 677, 678, 679, 679, 679, 679, 679, 679, 679, 679, + 679, 679, 679, 679, 680, 681, 124, 124, 682, 682, 682, 682, 683, 684, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 324, 0, 0, 0, 685, 124, 124, 124, 124, + 324, 0, 0, 245, 124, 124, 124, 124, 686, 27, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 694, 124, 124, 124, 696, 0, 0, 348, 0, 0, 0, 0, 0, + 0, 627, 225, 324, 324, 324, 0, 631, 0, 0, 245, 124, 124, 124, 697, 0, + 698, 0, 0, 348, 639, 227, 631, 124, 0, 0, 0, 0, 0, 699, 340, 340, + 0, 0, 0, 0, 0, 233, 348, 629, 348, 0, 0, 0, 700, 233, 0, 0, + 700, 0, 245, 348, 227, 639, 124, 124, 0, 0, 0, 0, 0, 700, 245, 340, + 701, 0, 0, 0, 702, 703, 704, 639, 0, 320, 0, 0, 0, 0, 0, 234, + 246, 246, 246, 246, 246, 246, 124, 124, 246, 312, 246, 246, 246, 246, 246, 246, + 246, 246, 312, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 705, 246, + 246, 246, 246, 246, 246, 312, 124, 124, 246, 312, 124, 124, 124, 124, 124, 124, + 246, 246, 246, 246, 706, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 313, + 707, 124, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 1, 2, 2, 2, + 2, 2, 3, 0, 0, 0, 4, 0, 2, 2, 2, 2, 2, 3, 2, 2, + 2, 2, 5, 0, 2, 5, 6, 0, 7, 7, 7, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 8, 8, 8, 8, 16, 8, 8, 8, 17, 18, 18, 18, + 19, 19, 19, 19, 19, 20, 19, 19, 21, 22, 22, 22, 22, 22, 22, 22, + 22, 23, 21, 22, 22, 22, 23, 21, 24, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 12, 12, 25, 25, 26, 27, 25, 28, 12, 12, 29, 30, 29, 31, + 29, 29, 32, 32, 29, 29, 29, 29, 31, 29, 33, 7, 7, 34, 29, 29, + 35, 29, 29, 29, 29, 29, 29, 30, 36, 36, 36, 37, 36, 36, 36, 36, + 36, 36, 38, 39, 40, 40, 40, 40, 41, 12, 12, 12, 42, 42, 42, 42, + 42, 42, 43, 44, 45, 45, 45, 45, 45, 45, 45, 46, 45, 45, 45, 47, + 48, 48, 48, 48, 48, 48, 48, 49, 36, 36, 38, 12, 50, 51, 29, 29, + 52, 29, 29, 29, 53, 53, 53, 53, 54, 55, 53, 53, 53, 56, 53, 53, + 57, 58, 57, 59, 59, 57, 57, 57, 57, 57, 60, 57, 61, 62, 63, 57, + 57, 59, 59, 64, 12, 65, 12, 66, 57, 62, 57, 57, 57, 57, 57, 64, + 67, 67, 68, 69, 70, 71, 71, 71, 71, 71, 72, 71, 72, 73, 74, 72, + 68, 69, 70, 74, 75, 12, 67, 76, 12, 77, 71, 71, 71, 68, 12, 12, + 78, 78, 79, 80, 80, 79, 79, 79, 79, 79, 81, 79, 81, 78, 82, 79, + 79, 80, 80, 82, 83, 12, 12, 12, 79, 84, 79, 79, 82, 12, 78, 79, + 85, 85, 86, 87, 87, 86, 86, 86, 86, 86, 88, 86, 88, 85, 89, 86, + 86, 87, 87, 89, 12, 85, 12, 90, 86, 91, 86, 86, 86, 86, 12, 12, + 92, 93, 94, 92, 95, 96, 97, 95, 98, 99, 94, 92, 100, 100, 96, 92, + 94, 92, 95, 96, 99, 98, 12, 12, 12, 92, 100, 100, 100, 100, 94, 12, + 101, 101, 101, 102, 102, 101, 101, 101, 101, 101, 102, 101, 101, 101, 103, 101, + 101, 102, 102, 103, 12, 104, 105, 103, 101, 106, 101, 101, 12, 107, 101, 101, + 108, 108, 108, 109, 109, 108, 108, 108, 108, 108, 109, 108, 108, 110, 111, 108, + 108, 109, 109, 111, 12, 112, 12, 113, 108, 114, 108, 108, 110, 12, 12, 12, + 115, 115, 115, 116, 116, 115, 115, 115, 115, 115, 115, 115, 115, 116, 116, 115, + 12, 115, 115, 115, 115, 117, 115, 115, 118, 118, 119, 119, 119, 120, 121, 119, + 119, 119, 119, 119, 122, 119, 119, 123, 119, 120, 124, 125, 119, 126, 119, 119, + 12, 121, 119, 119, 121, 127, 12, 12, 128, 129, 129, 129, 129, 129, 129, 129, + 129, 129, 130, 131, 129, 129, 129, 12, 12, 12, 12, 12, 132, 133, 134, 135, + 135, 135, 135, 135, 135, 136, 135, 135, 135, 135, 135, 137, 135, 138, 135, 134, + 135, 135, 137, 135, 139, 139, 139, 139, 139, 139, 140, 139, 139, 139, 139, 141, + 140, 139, 139, 139, 139, 139, 139, 142, 139, 143, 144, 12, 145, 145, 145, 145, + 146, 146, 146, 146, 146, 147, 12, 148, 146, 146, 149, 146, 150, 150, 150, 150, + 151, 151, 151, 151, 151, 151, 152, 153, 151, 154, 152, 153, 152, 153, 151, 154, + 152, 153, 151, 151, 151, 154, 151, 151, 151, 151, 154, 155, 151, 151, 151, 156, + 151, 151, 153, 12, 157, 157, 157, 157, 157, 158, 157, 158, 159, 159, 159, 159, + 160, 160, 160, 160, 160, 160, 160, 161, 162, 162, 162, 162, 162, 162, 163, 164, + 162, 162, 165, 12, 166, 166, 166, 166, 166, 167, 12, 168, 169, 169, 169, 169, + 169, 170, 12, 12, 171, 171, 171, 171, 171, 12, 12, 12, 172, 172, 172, 173, + 173, 12, 12, 12, 174, 174, 174, 174, 174, 174, 174, 175, 174, 174, 175, 12, + 176, 177, 178, 178, 178, 178, 179, 12, 178, 178, 178, 178, 178, 178, 180, 12, + 178, 178, 181, 12, 159, 182, 12, 12, 183, 183, 183, 183, 183, 183, 183, 184, + 183, 183, 183, 12, 185, 183, 183, 183, 186, 186, 186, 186, 186, 186, 186, 187, + 186, 188, 12, 12, 189, 189, 189, 189, 189, 189, 189, 12, 189, 189, 190, 12, + 189, 189, 191, 192, 193, 193, 193, 193, 193, 193, 193, 194, 195, 195, 195, 195, + 195, 195, 195, 196, 195, 195, 195, 197, 195, 195, 198, 12, 195, 195, 195, 198, + 7, 7, 7, 199, 7, 7, 7, 12, 200, 200, 200, 200, 200, 200, 200, 201, + 202, 202, 202, 202, 203, 203, 203, 203, 203, 12, 12, 203, 204, 204, 204, 204, + 204, 204, 205, 204, 204, 204, 206, 207, 208, 208, 208, 208, 19, 19, 209, 12, + 146, 146, 210, 211, 202, 202, 12, 12, 212, 7, 7, 7, 213, 7, 214, 215, + 0, 214, 216, 12, 2, 217, 218, 2, 2, 2, 2, 219, 220, 217, 221, 2, + 2, 2, 222, 2, 2, 2, 2, 223, 8, 224, 8, 224, 8, 8, 225, 225, + 8, 8, 8, 224, 8, 15, 8, 8, 8, 10, 8, 226, 10, 15, 8, 14, + 0, 0, 0, 227, 0, 228, 0, 0, 229, 0, 0, 230, 0, 0, 0, 231, + 2, 2, 2, 232, 233, 12, 12, 12, 234, 12, 12, 12, 0, 235, 236, 0, + 4, 0, 0, 0, 0, 0, 0, 4, 2, 2, 5, 12, 0, 0, 233, 12, + 0, 0, 231, 12, 237, 237, 237, 237, 0, 238, 0, 0, 239, 239, 239, 239, + 18, 18, 18, 18, 18, 12, 240, 18, 241, 241, 241, 241, 241, 241, 12, 242, + 243, 12, 12, 242, 151, 154, 12, 12, 151, 154, 151, 154, 0, 0, 0, 233, + 244, 244, 244, 244, 244, 244, 245, 244, 244, 12, 12, 12, 244, 246, 12, 12, + 0, 247, 0, 0, 248, 244, 249, 250, 0, 0, 244, 0, 251, 252, 252, 252, + 252, 252, 252, 252, 252, 253, 254, 255, 256, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 258, 256, 12, 259, 260, 260, 260, 260, 260, 260, 261, 150, 150, 150, + 150, 150, 150, 262, 0, 233, 12, 131, 150, 150, 150, 263, 257, 257, 257, 258, + 257, 257, 0, 0, 264, 264, 264, 264, 264, 264, 264, 265, 264, 266, 12, 12, + 267, 267, 267, 267, 268, 268, 268, 268, 268, 268, 268, 12, 269, 269, 269, 269, + 269, 269, 12, 12, 236, 2, 2, 2, 2, 2, 230, 2, 270, 2, 2, 2, + 271, 271, 271, 271, 271, 271, 271, 272, 273, 273, 273, 273, 273, 273, 12, 12, + 274, 274, 274, 274, 274, 275, 12, 276, 274, 274, 275, 12, 277, 277, 277, 277, + 277, 277, 277, 278, 279, 279, 279, 279, 279, 12, 12, 280, 150, 150, 150, 281, + 282, 282, 282, 282, 282, 282, 282, 283, 282, 282, 284, 285, 145, 145, 145, 286, + 287, 287, 287, 287, 287, 288, 12, 12, 287, 287, 287, 289, 287, 287, 289, 287, + 290, 290, 290, 290, 291, 12, 12, 12, 12, 12, 292, 290, 293, 293, 293, 293, + 293, 294, 12, 12, 155, 154, 155, 154, 155, 154, 12, 12, 2, 2, 3, 2, + 2, 295, 296, 12, 293, 293, 293, 297, 293, 293, 297, 12, 150, 12, 12, 12, + 150, 262, 298, 150, 150, 150, 150, 12, 244, 244, 244, 246, 244, 244, 246, 12, + 2, 299, 12, 12, 300, 22, 12, 24, 25, 26, 25, 301, 302, 303, 25, 25, + 29, 29, 29, 304, 7, 7, 7, 305, 231, 0, 0, 0, 0, 231, 0, 12, + 29, 306, 29, 29, 29, 29, 29, 307, 308, 0, 0, 0, 0, 309, 257, 257, + 257, 257, 257, 310, 311, 150, 311, 150, 311, 150, 311, 281, 0, 231, 0, 231, + 12, 12, 308, 233, 312, 312, 312, 313, 312, 312, 312, 312, 312, 314, 312, 312, + 312, 312, 314, 315, 312, 312, 312, 316, 312, 312, 314, 12, 231, 131, 0, 0, + 0, 131, 0, 0, 8, 8, 8, 14, 0, 0, 0, 317, 318, 12, 12, 12, + 0, 0, 0, 319, 320, 320, 320, 320, 320, 320, 320, 321, 322, 322, 322, 322, + 323, 12, 12, 12, 214, 0, 0, 0, 0, 0, 0, 12, 324, 324, 324, 324, + 324, 12, 12, 325, 326, 326, 326, 326, 326, 326, 327, 12, 328, 328, 328, 328, + 328, 328, 329, 12, 330, 330, 330, 330, 330, 330, 330, 331, 332, 332, 332, 332, + 332, 12, 332, 332, 332, 333, 12, 12, 334, 334, 334, 334, 335, 335, 335, 335, + 336, 336, 336, 336, 336, 336, 336, 337, 336, 336, 337, 12, 338, 338, 338, 338, + 338, 12, 338, 338, 338, 338, 338, 12, 339, 339, 339, 339, 339, 339, 12, 12, + 340, 340, 340, 340, 340, 12, 12, 341, 342, 342, 343, 342, 343, 344, 342, 342, + 344, 342, 342, 342, 344, 342, 344, 345, 346, 346, 346, 346, 346, 12, 12, 12, + 347, 347, 347, 347, 347, 348, 12, 12, 347, 349, 12, 12, 347, 347, 12, 12, + 2, 350, 2, 2, 351, 2, 299, 12, 352, 353, 354, 352, 352, 352, 352, 352, + 352, 355, 356, 357, 358, 358, 358, 358, 358, 359, 358, 358, 360, 360, 360, 360, + 361, 361, 361, 361, 361, 361, 361, 362, 12, 363, 361, 361, 364, 364, 364, 364, + 365, 366, 367, 364, 368, 368, 368, 368, 368, 368, 368, 369, 370, 370, 370, 370, + 370, 370, 371, 372, 373, 373, 373, 373, 373, 373, 374, 12, 375, 375, 375, 375, + 376, 376, 376, 376, 376, 376, 12, 376, 377, 376, 376, 376, 378, 379, 12, 378, + 378, 380, 380, 378, 378, 378, 378, 378, 378, 381, 382, 383, 378, 378, 384, 12, + 385, 385, 385, 385, 386, 386, 386, 386, 387, 387, 387, 387, 387, 388, 389, 387, + 387, 388, 12, 12, 390, 390, 390, 390, 390, 391, 392, 390, 393, 393, 393, 393, + 393, 394, 393, 393, 395, 395, 395, 395, 396, 12, 395, 395, 397, 397, 397, 397, + 398, 12, 399, 400, 12, 12, 399, 397, 401, 401, 401, 401, 401, 401, 402, 12, + 403, 403, 403, 403, 404, 12, 12, 12, 404, 12, 405, 403, 406, 406, 406, 406, + 406, 406, 12, 12, 406, 406, 407, 12, 408, 408, 408, 408, 408, 409, 410, 408, + 408, 409, 12, 411, 29, 29, 29, 412, 413, 413, 413, 413, 413, 413, 414, 415, + 415, 12, 12, 12, 416, 29, 12, 12, 29, 29, 417, 12, 12, 12, 416, 29, + 418, 418, 418, 418, 418, 418, 12, 12, 419, 419, 419, 419, 419, 419, 420, 12, + 421, 421, 421, 421, 421, 421, 422, 12, 423, 423, 423, 423, 423, 423, 423, 12, + 424, 424, 424, 424, 424, 425, 12, 12, 426, 426, 426, 426, 426, 426, 426, 427, + 428, 426, 426, 426, 426, 427, 12, 429, 430, 430, 430, 430, 431, 12, 12, 432, + 433, 433, 433, 433, 433, 433, 434, 12, 433, 433, 435, 12, 436, 436, 436, 436, + 436, 437, 436, 436, 436, 436, 12, 12, 438, 438, 438, 438, 438, 439, 12, 12, + 440, 440, 440, 440, 118, 119, 119, 119, 119, 127, 12, 12, 441, 441, 441, 441, + 442, 441, 441, 441, 443, 12, 12, 12, 444, 445, 446, 447, 444, 444, 444, 447, + 444, 444, 448, 12, 449, 449, 449, 449, 449, 449, 450, 12, 449, 449, 451, 12, + 452, 453, 452, 454, 454, 452, 452, 452, 452, 452, 455, 452, 455, 453, 456, 452, + 452, 454, 454, 457, 458, 459, 12, 453, 452, 460, 452, 458, 452, 458, 12, 12, + 461, 461, 462, 463, 461, 461, 461, 461, 461, 462, 461, 461, 464, 465, 466, 461, + 461, 462, 467, 12, 468, 12, 12, 12, 469, 469, 469, 469, 469, 469, 469, 470, + 471, 12, 12, 12, 472, 472, 472, 472, 472, 472, 12, 12, 472, 472, 473, 12, + 474, 474, 474, 474, 474, 475, 474, 474, 474, 474, 474, 475, 476, 476, 476, 476, + 476, 477, 12, 12, 476, 476, 478, 12, 178, 178, 178, 180, 479, 479, 479, 479, + 479, 479, 480, 12, 145, 12, 12, 12, 481, 481, 481, 481, 481, 481, 482, 483, + 481, 481, 481, 12, 481, 482, 12, 12, 484, 484, 484, 484, 484, 484, 484, 12, + 485, 485, 485, 485, 486, 12, 12, 487, 488, 489, 490, 488, 488, 491, 488, 488, + 488, 488, 488, 488, 488, 492, 493, 488, 488, 489, 12, 12, 488, 488, 494, 12, + 495, 495, 496, 495, 495, 495, 495, 495, 495, 497, 12, 12, 498, 498, 498, 498, + 498, 498, 12, 12, 499, 499, 499, 499, 500, 12, 12, 12, 501, 501, 501, 501, + 501, 501, 502, 12, 53, 53, 503, 12, 440, 440, 12, 12, 504, 504, 504, 504, + 505, 12, 12, 12, 504, 504, 505, 12, 506, 506, 507, 506, 506, 506, 506, 506, + 506, 508, 506, 506, 506, 509, 12, 12, 506, 506, 506, 510, 511, 511, 511, 511, + 512, 511, 511, 511, 511, 511, 513, 511, 511, 514, 12, 12, 515, 516, 517, 515, + 515, 515, 515, 515, 515, 516, 518, 517, 515, 515, 12, 12, 515, 515, 519, 12, + 520, 521, 522, 520, 520, 520, 520, 520, 520, 520, 520, 523, 521, 520, 524, 12, + 520, 520, 525, 12, 526, 526, 526, 526, 526, 526, 526, 12, 526, 526, 527, 12, + 528, 528, 528, 528, 528, 528, 529, 12, 530, 530, 530, 530, 531, 530, 530, 530, + 530, 530, 532, 533, 530, 530, 532, 12, 534, 12, 12, 12, 100, 100, 100, 100, + 96, 12, 12, 98, 535, 535, 535, 535, 535, 535, 536, 12, 535, 535, 535, 537, + 535, 538, 12, 12, 535, 12, 12, 12, 539, 539, 539, 539, 540, 12, 12, 12, + 541, 541, 541, 541, 541, 542, 12, 12, 541, 541, 543, 12, 544, 544, 544, 544, + 544, 545, 12, 12, 546, 546, 546, 546, 546, 546, 547, 12, 269, 269, 548, 12, + 549, 549, 549, 549, 549, 549, 549, 550, 549, 549, 551, 552, 553, 553, 553, 553, + 553, 553, 553, 554, 553, 553, 555, 12, 556, 556, 556, 556, 556, 556, 556, 557, + 556, 557, 12, 12, 558, 558, 558, 558, 558, 559, 12, 12, 558, 558, 560, 558, + 560, 558, 558, 558, 558, 558, 12, 561, 562, 562, 562, 562, 562, 562, 563, 12, + 564, 564, 564, 564, 564, 564, 565, 12, 566, 566, 566, 566, 566, 566, 567, 566, + 566, 12, 12, 12, 568, 568, 568, 568, 568, 568, 569, 570, 568, 568, 12, 570, + 571, 572, 12, 12, 244, 573, 12, 12, 574, 574, 574, 574, 575, 575, 575, 575, + 575, 576, 12, 12, 12, 12, 12, 577, 574, 574, 574, 578, 578, 12, 12, 12, + 257, 579, 257, 580, 581, 252, 252, 252, 582, 12, 12, 12, 583, 12, 12, 12, + 253, 584, 12, 12, 12, 257, 12, 12, 585, 585, 585, 585, 585, 585, 585, 12, + 586, 586, 586, 586, 586, 586, 587, 12, 586, 586, 586, 588, 586, 586, 588, 12, + 586, 586, 589, 586, 0, 12, 12, 12, 0, 12, 238, 0, 317, 12, 12, 12, + 7, 590, 12, 12, 0, 233, 12, 12, 0, 231, 308, 0, 0, 591, 227, 0, + 0, 0, 591, 7, 212, 592, 7, 0, 0, 0, 593, 227, 8, 224, 12, 12, + 0, 231, 12, 12, 0, 0, 317, 12, 0, 0, 0, 228, 594, 595, 308, 228, + 0, 0, 596, 308, 0, 308, 0, 0, 0, 596, 231, 308, 0, 228, 0, 228, + 0, 0, 596, 231, 0, 597, 238, 0, 228, 0, 0, 0, 0, 233, 0, 0, + 0, 0, 0, 238, 598, 598, 598, 598, 598, 598, 598, 12, 12, 12, 599, 598, + 600, 598, 598, 598, 2, 2, 2, 299, 12, 270, 299, 12, 239, 601, 239, 239, + 239, 239, 602, 239, 603, 604, 601, 12, 19, 19, 19, 605, 12, 12, 12, 606, + 607, 607, 607, 607, 607, 607, 607, 608, 607, 607, 607, 609, 607, 607, 609, 610, + 611, 611, 611, 611, 611, 611, 611, 612, 613, 613, 613, 613, 613, 613, 614, 615, + 616, 616, 616, 616, 616, 616, 617, 12, 618, 618, 618, 618, 618, 618, 619, 620, + 621, 621, 621, 621, 621, 621, 621, 622, 621, 623, 12, 624, 151, 154, 151, 625, + 151, 151, 151, 154, 626, 626, 626, 626, 626, 627, 626, 626, 626, 628, 12, 12, + 629, 629, 629, 629, 629, 629, 629, 12, 629, 629, 630, 631, 0, 317, 12, 12, + 29, 632, 29, 29, 633, 634, 632, 29, 412, 29, 635, 12, 636, 51, 635, 632, + 633, 634, 635, 635, 633, 634, 412, 29, 412, 29, 632, 637, 29, 29, 638, 29, + 29, 29, 29, 12, 632, 632, 638, 29, 50, 12, 12, 12, 12, 238, 0, 0, + 639, 12, 12, 12, 0, 0, 317, 0, 0, 0, 12, 12, 0, 0, 231, 238, + 0, 231, 317, 308, 0, 0, 0, 640, 0, 0, 231, 131, 641, 12, 12, 12, + 244, 244, 573, 12, 642, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 939, 940, 941, 942, 946, 948, 0, 962, 969, 970, 971, 976,1001,1002,1003,1008, 0,1033,1040,1041,1042,1043,1047, 0, 0,1080,1081,1082,1086,1110, 0, 0,1124,1125,1126,1127,1131,1133, 0,1147, @@ -5831,8 +4348,7 @@ 96, 929, 802, 804, 806, 97, 98, 807, 930, 99, 931, 932, 933, 814, 100, 816, 817, 818, 819, 820, 821, 935, 0, 0, }; -static const int16_t -_hb_ucd_i16[92] = +static const int16_t _hb_ucd_i16[92]= { 0, 0, 1, -1, 2, 0, -2, 0, 0, 2, 0, -2, 0, 16, 0, -16, 0, 1, -1, 0, 3, 3, 3, -3, -3, -3, 0, 2016, 0, 2527, 1923, 1914, @@ -5842,39 +4358,1270 @@ 0,-2016,-2104, 0, 0,-2106,-2108,-2106,-2250, 0,-2527, 0, }; -static inline uint_fast8_t -_hb_ucd_gc (unsigned u) +static inline uint8_t _hb_ucd_gc (unsigned u) { - return u<1114112u?_hb_ucd_u8[5208+(((_hb_ucd_u8[1168+(((_hb_ucd_u16[((_hb_ucd_u8[544+(((_hb_ucd_u8[u>>1>>3>>3>>4])<<4)+((u>>1>>3>>3)&15u))])<<3)+((u>>1>>3)&7u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2; + return u<1114110 ? _hb_ucd_u8[6560u+((_hb_ucd_u8[816u+((_hb_ucd_u16[((_hb_ucd_u8[272u+((_hb_ucd_u8[((((((((u)>>1))>>3))>>4))>>4)])<<4)+((((((((u)>>1))>>3))>>4))&15)])<<4)+((((((u)>>1))>>3))&15)])<<3)+((((u)>>1))&7)])<<1)+((u)&1)] : 2; } -static inline uint_fast8_t -_hb_ucd_ccc (unsigned u) +static inline uint8_t _hb_ucd_ccc (unsigned u) { - return u<125259u?_hb_ucd_u8[7206+(((_hb_ucd_u8[6638+(((_hb_ucd_u8[6162+(((_hb_ucd_u8[5802+(((_hb_ucd_u8[5556+(u>>2>>2>>2>>3)])<<3)+((u>>2>>2>>2)&7u))])<<2)+((u>>2>>2)&3u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:0; + return u<125259 ? _hb_ucd_u8[8620u+((_hb_ucd_u8[8036u+((_hb_ucd_u8[7556u+((_hb_ucd_u8[7188u+((_hb_ucd_u8[6942u+((((((((u)>>2))>>2))>>2))>>3)])<<3)+((((((((u)>>2))>>2))>>2))&7)])<<2)+((((((u)>>2))>>2))&3)])<<2)+((((u)>>2))&3)])<<2)+((u)&3)] : 0; } -static inline unsigned -_hb_ucd_b4 (const uint8_t* a, unsigned i) +static inline uint8_t _hb_ucd_b4 (const uint8_t* a, unsigned i) { - return (a[i>>1]>>((i&1u)<<2))&15u; + return (a[i>>1]>>((i&1)<<2))&15; } -static inline int_fast16_t -_hb_ucd_bmg (unsigned u) +static inline int16_t _hb_ucd_bmg (unsigned u) { - return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[8098+(((_hb_ucd_u8[7866+(((_hb_ucd_u8[7770+(((_hb_ucd_b4(7706+_hb_ucd_u8,u>>1>>2>>3>>3))<<3)+((u>>1>>2>>3)&7u))])<<3)+((u>>1>>2)&7u))])<<2)+((u>>1)&3u))])<<1)+((u)&1u)]:0; + return u<65380 ? _hb_ucd_i16[((_hb_ucd_u8[9516u+((_hb_ucd_u8[9284u+((_hb_ucd_u8[9188u+((_hb_ucd_b4(_hb_ucd_u8+9124u,((((((((u)>>1))>>2))>>3))>>3)))<<3)+((((((((u)>>1))>>2))>>3))&7)])<<3)+((((((u)>>1))>>2))&7)])<<2)+((((u)>>1))&3)])<<1)+((u)&1)] : 0; } -static inline uint_fast8_t -_hb_ucd_sc (unsigned u) +static inline uint8_t _hb_ucd_sc (unsigned u) { - return u<918016u?_hb_ucd_u8[11464+(((_hb_ucd_u8[10472+(((_hb_ucd_u8[9452+(((_hb_ucd_u8[8764+(((_hb_ucd_u8[8460+(((_hb_ucd_u8[8346+(u>>2>>2>>2>>3>>4)])<<4)+((u>>2>>2>>2>>3)&15u))])<<3)+((u>>2>>2>>2)&7u))])<<2)+((u>>2>>2)&3u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:2; + return u<918000 ? _hb_ucd_u8[10950u+((_hb_ucd_u16[4648u+((_hb_ucd_u16[2608u+((_hb_ucd_u8[10214u+((_hb_ucd_u8[9764u+((((((((u)>>2))>>2))>>3))>>4)])<<4)+((((((((u)>>2))>>2))>>3))&15)])<<3)+((((((u)>>2))>>2))&7)])<<2)+((((u)>>2))&3)])<<2)+((u)&3)] : 2; } -static inline uint_fast16_t -_hb_ucd_dm (unsigned u) +static inline uint16_t _hb_ucd_dm (unsigned u) { - return u<195102u?_hb_ucd_u16[1656+(((_hb_ucd_u8[12834+(((_hb_ucd_u8[12452+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0; + return u<195102 ? _hb_ucd_u16[7480u+((_hb_ucd_u8[13904u+((_hb_ucd_u8[13522u+((((u)>>4))>>5)])<<5)+((((u)>>4))&31)])<<4)+((u)&15)] : 0; } -#endif +#else + +#include <stdint.h> + +static const uint8_t _hb_ucd_u8[13937]= +{ + 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 9, 10, 7, 7, 7, 7, 7, 11, 12, 12, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 7, 21, 22, 22, 22, 23, 24, 7, 7, + 7, 25, 22, 22, 22, 26, 27, 28, 22, 29, 30, 31, 32, 33, 34, 35, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 22, 36, + 7, 7, 7, 7, 7, 7, 37, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 38, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 34, 34, 34, 35, 36, 37, 34, 34, 34, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 62, 63, 64, 65, 66, 67, 68, 69, 67, 70, 71, + 67, 67, 62, 72, 62, 62, 73, 67, 74, 75, 76, 77, 78, 67, 67, 67, + 79, 80, 34, 81, 82, 83, 67, 67, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 84, 34, 34, 34, 34, + 85, 34, 34, 34, 34, 34, 34, 34, 34, 86, 34, 34, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 34, 34, 34, 34, 34, 34, 34, 34, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, + 100,100, 34, 34, 34, 34,101,102, 34, 34,103,104,105,106,107,108, + 34, 34,109,110,111,112,113,114,115,116,117,118, 34, 34, 34,119, + 120,121,122,123,124,125,126,127, 34,128,129,130,131,132,133,134, + 135,136,137,138,139,140,141,142,143,144,111,145,146,147,148,111, + 149,150,151,152,153,154,155,156,157,158,159,160,111,161,162,163, + 34, 34, 34, 34, 34, 34, 34, 34,164, 34, 34,111,111,111,111,111, + 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,165, + 34, 34, 34, 34, 34, 34, 34, 34,166, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111, + 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111, + 111,111,167,111,111,111,111,111,111,111,111,111,111,111,111,111, + 34, 34, 34, 34,168,169,170, 34,111,111,171,111,172,173,174,175, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111, + 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,119, + 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111, + 111,111,111,111,111,111,111,111, 34,176,111,111,111,111,111,111, + 111,111,111,111,111,111,111,111, 67,177, 67, 67, 67,178,179, 67, + 67, 67,180,181,182,131, 65,111,183,184,185,186,187,188,189,190, + 67, 67, 67, 67,191,192,111,111,111,111,111,111,111,111,193,111, + 194,195,196,111,111,197,111,111,111,198,111,199,111,200,111, 34, + 34,201,202,111,111,111,111,111,131,203,204,111, 34,205,111,111, + 67, 67,206, 67, 67,111, 67,207, 67, 67, 67, 67, 67, 67, 67, 67, + 67,208, 67, 67, 67, 67, 67,177,111,111,111,111,111,111,111,111, + 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111,111, + 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111, + 209,111,195,195,111,111,111,111,111,111,111,111,111,111,111,111, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2, + 7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 17, 18, 19, 1, 20, 20, 21, 22, 23, 24, 25, + 26, 27, 15, 2, 28, 29, 27, 30, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 31, 11, 11, 11, 32, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 33, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 34, 34, 34, 34, 34, 34, 34, 34, 16, 32, 32, 32, + 32, 32, 32, 32, 11, 34, 34, 16, 34, 32, 32, 11, 34, 11, 16, 11, + 11, 34, 32, 11, 32, 16, 11, 34, 32, 32, 32, 11, 34, 16, 32, 11, + 34, 11, 34, 34, 32, 35, 32, 16, 36, 36, 37, 34, 38, 37, 34, 34, + 34, 34, 34, 34, 34, 34, 16, 32, 34, 38, 32, 11, 32, 32, 32, 32, + 32, 32, 16, 16, 16, 11, 34, 32, 34, 34, 11, 32, 32, 32, 32, 32, + 16, 16, 36, 16, 16, 16, 16, 16, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 40, 40, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, + 39, 39, 41, 40, 40, 40, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, + 42, 42, 42, 42, 42, 42, 42, 42, 32, 32, 41, 32, 16, 43, 16, 10, + 40, 40, 40, 44, 11, 11, 11, 11, 34, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34, + 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 45, 34, 32, 34, 11, + 32, 46, 42, 42, 47, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16, + 11, 11, 11, 11, 48, 2, 2, 2, 16, 16, 16, 16, 49, 50, 51, 52, + 53, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 54, + 55, 56, 42, 55, 42, 42, 42, 42, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 57, 2, 2, 2, 2, 2, 2, 58, 58, 58, 8, 9, 59, 2, 60, + 42, 42, 42, 42, 42, 56, 61, 2, 62, 36, 36, 36, 36, 63, 42, 42, + 7, 7, 7, 7, 7, 2, 2, 36, 64, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 65, 42, 42, 42, 66, 46, 42, 42, 67, 68, 69, 42, 42, 36, + 7, 7, 7, 7, 7, 36, 70, 71, 2, 2, 2, 2, 2, 2, 2, 72, + 63, 36, 36, 36, 36, 36, 36, 36, 42, 42, 42, 42, 42, 42, 64, 36, + 36, 36, 36, 42, 42, 42, 42, 42, 7, 7, 7, 7, 7, 36, 36, 36, + 36, 36, 36, 36, 36, 63, 42, 42, 42, 42, 39, 21, 2, 39, 68, 20, + 36, 36, 36, 42, 42, 68, 42, 42, 42, 42, 68, 42, 68, 42, 42, 42, + 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 36, 36, 63, 42, 42, 2, + 36, 36, 36, 36, 73, 36, 36, 36, 58, 58, 58, 74, 42, 42, 42, 42, + 36, 36, 36, 36, 75, 42, 42, 42, 42, 74, 42, 42, 42, 42, 42, 42, + 42, 76, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 76, 64, 77, + 78, 42, 42, 42, 76, 77, 78, 77, 63, 42, 42, 42, 36, 36, 36, 36, + 36, 42, 2, 7, 7, 7, 7, 7, 79, 36, 36, 36, 36, 36, 36, 36, + 63, 77, 80, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 77, + 78, 42, 42, 76, 77, 77, 78, 36, 36, 36, 36, 81, 77, 77, 36, 36, + 36, 42, 42, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 52, 57, 42, + 42, 76, 80, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 42, 77, + 78, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 64, 36, 36, 36, + 36, 36, 36, 7, 7, 7, 7, 7, 42, 36, 63, 2, 2, 2, 2, 2, + 78, 42, 42, 42, 76, 77, 78, 42, 59, 20, 20, 20, 82, 42, 42, 42, + 42, 77, 80, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 78, + 78, 42, 42, 76, 77, 77, 78, 42, 42, 42, 42, 76, 77, 77, 36, 36, + 71, 27, 27, 27, 27, 27, 27, 27, 42, 64, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 77, 76, 77, 77, 77, 77, 77, 78, 42, + 36, 36, 36, 81, 77, 77, 77, 77, 77, 77, 77, 7, 7, 7, 7, 7, + 27, 83, 60, 60, 52, 60, 60, 60, 76, 77, 64, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 64, 42, 76, 77, 77, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 36, 36, 36, 36, 7, 7, 7, 84, 27, 27, 27, 83, + 63, 77, 65, 36, 36, 36, 36, 36, 77, 77, 77, 76, 77, 77, 42, 42, + 42, 42, 76, 77, 77, 77, 36, 36, 85, 81, 77, 77, 77, 77, 77, 77, + 42, 77, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 63, 64, 77, + 78, 42, 42, 77, 77, 77, 78, 70, 60, 60, 36, 81, 27, 27, 27, 86, + 27, 27, 27, 27, 83, 36, 36, 36, 36, 36, 36, 36, 36, 42, 42, 76, + 77, 42, 42, 42, 77, 77, 77, 77, 7, 77, 2, 2, 2, 2, 2, 2, + 63, 36, 42, 42, 42, 42, 42, 87, 36, 36, 36, 68, 42, 42, 42, 56, + 7, 7, 7, 7, 7, 2, 2, 2, 63, 36, 42, 42, 42, 42, 64, 36, + 36, 36, 36, 39, 42, 42, 42, 42, 7, 7, 7, 7, 7, 7, 36, 36, + 70, 60, 2, 2, 2, 2, 2, 2, 2, 88, 88, 60, 42, 60, 60, 60, + 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 46, 46, 46, 4, 4, 77, + 63, 42, 42, 42, 42, 42, 42, 76, 42, 42, 56, 42, 36, 36, 63, 42, + 42, 42, 42, 42, 42, 42, 42, 60, 60, 60, 60, 69, 60, 60, 60, 60, + 2, 2, 88, 60, 21, 2, 2, 2, 36, 36, 36, 36, 36, 81, 78, 42, + 76, 42, 42, 42, 78, 76, 78, 64, 36, 36, 36, 77, 42, 36, 36, 42, + 64, 77, 80, 81, 77, 77, 77, 36, 63, 42, 64, 36, 36, 36, 36, 36, + 36, 76, 78, 76, 77, 77, 78, 81, 7, 7, 7, 7, 7, 77, 78, 60, + 16, 16, 16, 16, 16, 49, 43, 16, 36, 36, 36, 36, 36, 36, 63, 42, + 2, 2, 2, 2, 89, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 60, 60, 60, 60, 60, 60, 60, 60, 11, 11, 11, 11, 16, 16, 16, 16, + 90, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 70, 65, + 91, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 92, 93, 93, + 36, 36, 36, 36, 36, 57, 2, 94, 95, 36, 36, 36, 36, 36, 36, 36, + 36, 42, 76, 77, 77, 77, 77, 80, 36, 42, 96, 2, 2, 2, 2, 2, + 36, 42, 42, 42, 42, 42, 42, 42, 36, 36, 42, 78, 42, 42, 42, 77, + 77, 77, 77, 76, 78, 42, 42, 42, 42, 42, 2, 79, 2, 59, 63, 42, + 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 97, 2, 55, 42, 74, + 36, 75, 36, 36, 36, 36, 36, 36, 36, 36, 63, 64, 36, 36, 36, 36, + 36, 36, 36, 36, 63, 36, 36, 36, 42, 76, 77, 78, 76, 77, 77, 77, + 77, 76, 77, 77, 78, 42, 42, 42, 60, 60, 2, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 27, 27, 60, 36, 36, 36, 63, 76, 78, 42, 2, + 36, 36, 81, 76, 42, 42, 42, 42, 76, 76, 78, 42, 42, 42, 76, 77, + 77, 78, 42, 42, 42, 42, 42, 42, 2, 2, 2, 79, 2, 2, 2, 2, + 42, 42, 42, 42, 42, 42, 42, 98, 42, 42, 80, 36, 36, 36, 36, 36, + 36, 36, 76, 42, 42, 76, 76, 77, 77, 76, 80, 36, 36, 36, 36, 2, + 88, 60, 60, 60, 60, 46, 42, 42, 42, 42, 60, 60, 60, 60, 21, 2, + 42, 80, 36, 36, 36, 36, 36, 36, 81, 42, 42, 77, 42, 78, 42, 36, + 36, 36, 36, 76, 42, 77, 78, 78, 42, 77, 77, 77, 77, 77, 2, 2, + 36, 36, 77, 77, 77, 77, 42, 42, 42, 42, 77, 42, 42, 56, 2, 2, + 7, 7, 7, 7, 7, 7, 85, 36, 36, 36, 36, 36, 39, 39, 39, 2, + 16, 16, 16, 16, 34, 16, 16, 16, 42, 56, 42, 42, 42, 42, 42, 42, + 76, 42, 42, 42, 64, 36, 63, 36, 36, 36, 64, 81, 42, 36, 36, 36, + 16, 16, 16, 16, 16, 16, 39, 39, 39, 39, 39, 39, 39, 43, 16, 16, + 16, 16, 16, 16, 43, 16, 16, 16, 16, 16, 16, 16, 16, 99, 39, 39, + 32, 32, 32, 16, 16, 16, 16, 32, 16, 16, 16, 16, 11, 11, 11, 11, + 16, 16, 16, 16, 34, 11, 11, 11, 16, 16, 16, 16,100,100,100,100, + 16, 16, 16, 16, 11, 11,101,102, 40, 16, 16, 16, 11, 11,101, 40, + 16, 16, 16, 16, 11, 11,103, 40,104,104,104,104,104,105, 58, 58, + 50, 50, 50, 2,106,107,106,107, 2, 2, 2, 2,108, 58, 58,109, + 2, 2, 2, 2,110,111, 2,112,113, 2,114,115, 2, 2, 2, 2, + 2, 9,113, 2, 2, 2, 2,116, 58, 58, 58, 58, 58, 58, 58, 58, + 117, 39, 27, 27, 27, 8,114,118, 27, 27, 27, 27, 27, 8,114, 93, + 20, 20, 20, 20, 20, 20, 20, 20, 42, 42, 42, 42, 42, 42,119, 47, + 98, 47, 98, 42, 42, 42, 42, 42, 60,120, 60,121, 60, 34, 11, 16, + 11, 32,121, 60, 45, 11, 11, 60, 60, 60,120,120,120, 11, 11,122, + 11, 11, 35, 36,123, 60, 16, 11, 8, 8, 45, 16, 16, 26, 60,124, + 94, 94, 94, 94, 94, 94, 94, 94, 94,125,126, 94,127, 60, 60, 60, + 8, 8,128, 60, 60, 8, 60, 60,128, 26, 60,128, 60, 60, 60,128, + 60, 60, 60, 60, 60, 60, 60, 8, 60,128,128, 60, 60, 60, 60, 60, + 60, 60, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 60, 60, 60, 60, 4, 4, 60, 60, 8, 60, 60, 60,129,130, 60, 60, + 60, 60, 60, 60, 60, 60,128, 60, 60, 60, 60, 60, 60, 26, 8, 8, + 8, 8, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 8, 8, + 8, 60, 60, 60, 60, 60, 60, 60, 27, 27, 27, 27, 27, 27, 60, 60, + 60, 60, 60, 60, 60, 27, 27, 27, 60, 60, 60, 26, 60, 60, 60, 60, + 26, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 8, 8, 8, 8, + 60, 60, 60, 60, 60, 60, 60, 26, 60, 60, 60, 60, 4, 4, 4, 4, + 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 60, 60, 60, 60, 60, 60, + 8, 8,114,131, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, + 8,114,132,132,132,132,132,132,132,132,132,132,131, 8, 8, 8, + 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, + 8, 8,128, 26, 8, 8,128, 60, 32, 11, 32, 34, 34, 34, 34, 11, + 32, 32, 34, 16, 16, 16, 39, 11, 32, 32,124, 60, 60,121, 34,133, + 42, 32, 16, 16, 49, 2, 89, 2, 36, 36, 36, 36, 36, 36, 36, 75, + 2, 2, 2, 2, 2, 2, 2, 55, 2,106,106, 2,110,111,106, 2, + 2, 2, 2, 6, 2, 97,106, 2,106, 4, 4, 4, 4, 2, 2, 79, + 2, 2, 2, 2, 2, 50, 2, 2, 97,134, 2, 2, 2, 2, 2, 2, + 60, 2,135,132,132,132,136, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 1, 2,137,138, 4, 4, 4, 4, 4, 60, 4, 4, 4, 4,139, 93, + 140, 94, 94, 94, 94, 42, 42, 77,141, 39, 39, 60, 94,142, 57, 60, + 71, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 63,143,144, 62, + 36, 36, 36, 36, 36, 57, 39, 62, 60, 27, 27, 60, 60, 60, 60, 60, + 27, 27, 27, 27, 27, 60, 60, 60, 60, 60, 60, 60, 27, 27, 27, 27, + 145, 27, 27, 27, 27, 27, 27, 27, 36, 36, 75, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36,146, 2, 32, 32, 32, 32, 32, 32, 32, 63, + 47,147, 42, 42, 42, 42, 42, 79, 32, 32, 32, 32, 32, 32, 39, 42, + 36, 36, 36, 94, 94, 94, 94, 94, 42, 2, 2, 2, 2, 2, 2, 2, + 40, 40, 40,144, 39, 39, 39, 39, 40, 32, 32, 32, 32, 32, 32, 32, + 16, 32, 32, 32, 32, 32, 32, 32, 43, 16, 16, 16, 34, 34, 34, 32, + 32, 32, 32, 32, 41,148, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 11, 11, 32, 11, 11, 32, 32, 32, 32, 32, 32, + 32, 32, 11, 11, 34, 34, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, + 48, 39,149, 35, 39, 35, 36, 36, 36, 64, 36, 64, 36, 63, 36, 36, + 36, 81, 78, 76, 60, 60, 42, 42, 27, 27, 27, 60,150, 60, 60, 60, + 36, 36, 2, 2, 2, 2, 2, 2, 77, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 77, 77, 77, 77, 77, 77, 77, 77, 42, 42, 42, 42, 42, 2, + 42, 36, 36, 36, 2, 65, 65, 63, 36, 36, 36, 42, 42, 42, 42, 2, + 36, 36, 36, 63, 42, 42, 42, 42, 42, 77, 77, 77, 77, 77, 77, 96, + 36, 63, 77, 42, 42, 77, 42, 77, 96, 2, 2, 2, 2, 2, 2, 79, + 7, 7, 7, 7, 7, 7, 7, 2, 36, 36, 63, 62, 36, 36, 36, 36, + 36, 36, 36, 36, 63, 42, 42, 76, 78, 76, 78, 42, 42, 42, 42, 42, + 36, 63, 36, 36, 36, 36, 76, 77, 7, 7, 7, 7, 7, 7, 2, 2, + 62, 36, 36, 70, 60, 81, 76, 36, 64, 42, 64, 63, 64, 36, 36, 42, + 36, 36, 36, 36, 36, 36, 75, 2, 36, 36, 36, 36, 36, 81, 42, 77, + 2, 75,151, 42, 42, 42, 42, 42, 16, 16, 16, 16, 16,102, 39, 39, + 16, 16, 16, 16, 99, 40, 40, 40, 36, 81, 78, 77, 76, 96, 78, 42, + 152,152,152,152,152,152,152,152,153,153,153,153,153,153,153,153, + 16, 16, 16, 16, 16, 16, 35, 64, 36, 36, 36, 36,154, 36, 36, 36, + 36, 40, 40, 40, 40, 40, 40, 40, 40, 22, 60, 60, 60, 60, 60, 60, + 60, 71, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,132, + 60, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 60, 60, 60, 60, + 36, 36, 36, 36, 36, 36,150, 60, 2, 2, 2,135,115, 2, 2, 2, + 6,155,156,132,132,132,132,132,132,132,115,135,115, 2,112,157, + 2, 2, 2, 2,139,132,132,115, 2,158, 8, 8, 59, 2, 2, 2, + 36, 36, 36, 36, 36, 36, 36,159, 2, 2, 3, 2, 4, 5, 6, 2, + 16, 16, 16, 16, 16, 17, 18,114,115, 4, 2, 36, 36, 36, 36, 36, + 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 39, + 20,160, 52, 20, 26, 8,128, 60, 60, 60, 60, 60,161, 58, 60, 60, + 2, 2, 2, 89, 27, 27, 27, 27, 27, 27, 27, 83, 60, 60, 60, 60, + 94, 94,127, 27, 83, 60, 60, 60, 60, 60, 60, 60, 60, 27, 60, 60, + 60, 60, 60, 60, 60, 60, 46, 42,162,162,162,162,162,162,162,162, + 163, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 86, 36, + 138, 36, 36, 36, 36, 94, 94, 94, 36, 36, 36, 36, 36, 36, 36, 57, + 164, 94, 94, 94, 94, 94, 94, 94, 11, 11, 11, 32, 16, 16, 16, 16, + 36, 36, 36, 57, 27, 27, 27, 27, 36, 36, 36, 70,145, 27, 27, 27, + 36, 36, 36,165, 27, 27, 27, 27, 36, 36, 36, 36, 36,165, 27, 27, + 36, 36, 36, 27, 27, 27, 27, 30, 36, 36, 36, 36, 36, 36, 27, 36, + 63, 42, 42, 42, 42, 42, 42, 42, 36, 36, 36, 36, 42, 42, 42, 42, + 36, 36, 36, 36, 36, 36,165, 30, 36, 36, 36, 36, 36, 36,165, 27, + 36, 36, 36, 36, 71, 36, 36, 36, 36, 36, 63, 42, 42,163, 27, 27, + 36, 36, 36, 36, 57, 2, 2, 2, 36, 36, 36, 36, 27, 27, 27, 27, + 16, 16, 16, 16, 16, 27, 27, 27, 36, 36, 42, 42, 42, 42, 42, 42, + 7, 7, 7, 7, 7, 36, 36, 62, 11, 11, 11, 11,166, 42, 42,141, + 16, 16, 16, 16, 16, 16, 16, 8, 36, 36, 36, 36, 36, 63,167, 50, + 88, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 42, 42, 42, + 27, 27, 27, 86, 36, 36, 36, 36,163, 27, 30, 2, 2, 2, 2, 2, + 36, 42, 42, 2, 2, 2, 2, 2, 36, 36,165, 27, 27, 27, 27, 27, + 78, 80, 36, 36, 36, 36, 36, 36, 42, 42, 42, 56, 2, 2, 2, 2, + 2, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 7, 7, 7, 7, 7, + 64, 63, 64, 36, 36, 36, 36, 63, 77, 78, 42, 76, 78, 56, 72, 2, + 2, 42, 42, 42, 42, 42, 66, 58, 36, 36, 36, 63, 42, 42, 78, 42, + 42, 42, 42, 7, 7, 7, 7, 7, 2, 2, 81, 80, 36, 36, 36, 36, + 36, 63, 2, 36, 36, 36, 36, 36, 36, 81, 77, 42, 42, 42, 42, 76, + 80, 36, 57, 2, 55, 42, 56, 78, 7, 7, 7, 7, 7, 57, 57, 2, + 89, 27, 27, 27, 27, 27, 27, 27, 36, 36, 36, 36, 36, 36, 77, 78, + 42, 77, 76, 42, 2, 2, 2, 64, 36, 36, 36, 36, 36, 36, 36, 63, + 76, 77, 77, 77, 77, 77, 77, 77, 36, 36, 36, 81, 77, 77, 80, 36, + 36, 77, 77, 42, 42, 42, 42, 42, 36, 36, 36, 36, 77, 78, 42, 42, + 42, 77, 77, 77, 77, 77, 77, 76, 64, 64, 2, 2, 2, 2, 2, 2, + 55, 42, 42, 42, 42, 42, 42, 42, 36, 36, 81, 77, 42, 42, 42, 42, + 77, 42, 76, 64, 36, 57, 2, 2, 7, 7, 7, 7, 7, 2, 2, 64, + 77, 78, 42, 42, 76, 76, 77, 78, 76, 42, 36, 65, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 81, 77, 42, 42, 42, 77, 77, 42, 78, + 56, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 42, 42, + 77, 78, 42, 42, 42, 76, 78, 78, 56, 2, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 63, 78, 77, 42, 42, 42, 78, 57, 2, 2, 2, + 36, 36, 36, 36, 36, 36, 63, 78, 77, 42, 42, 78, 42, 42, 42, 42, + 7, 7, 7, 7, 7, 27, 2, 88, 42, 42, 42, 42, 78, 56, 2, 2, + 27, 27, 27, 27, 27, 27, 27, 86, 77, 77, 77, 77, 77, 78, 76, 64, + 80, 78, 2, 2, 2, 2, 2, 2, 81, 77, 42, 42, 42, 42, 77, 77, + 64, 65, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 63, 42, 42, 42, 42, 64, 36, 36, 36, 63, 42, 42, 76, 63, 42, 56, + 2, 2, 2, 55, 42, 42, 42, 42, 63, 42, 42, 76, 78, 42, 36, 36, + 36, 36, 36, 36, 36, 42, 42, 42, 42, 42, 42, 76, 42, 2, 65, 2, + 76, 42, 76, 76, 77, 77, 77, 77, 57, 2, 2, 2, 2, 2, 2, 2, + 42, 42, 42, 42, 42, 42, 42, 78, 2, 36, 36, 36, 36, 36, 36, 36, + 42, 42, 42, 42, 76, 42, 42, 42, 76, 42, 78, 42, 42, 42, 42, 42, + 42, 42, 42, 63, 42, 42, 42, 42, 36, 36, 36, 36, 36, 77, 77, 77, + 42, 76, 78, 78, 36, 36, 36, 36, 36, 36, 36, 36, 75, 36, 36, 36, + 36, 63, 76, 96, 2, 2, 2, 2, 42, 81, 36, 36, 36, 36, 36, 36, + 36, 36, 77, 42, 42, 42, 42, 77, 76, 56, 2, 2, 2, 2, 2, 2, + 7, 7, 7, 7, 7, 42, 42, 42, 27, 27, 83, 60, 60, 60, 52, 20, + 150, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 21, + 64, 36, 36, 63, 42, 42, 42, 42, 36, 36, 36, 36, 36, 36, 36, 42, + 42, 42, 42, 42, 42, 77, 78, 42, 42, 42, 56, 2, 2, 2, 2, 2, + 42, 42, 42, 56, 2, 2, 60, 60, 39, 39, 88, 60, 60, 60, 60, 60, + 7, 7, 7, 7, 7,168, 27, 27, 27, 86, 36, 36, 36, 36, 36, 36, + 39, 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 75,146, 2, + 27, 27, 27, 30, 2, 2, 2, 2, 11, 11, 11, 11, 11, 32, 16, 16, + 81, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 78, + 42, 67, 39, 39, 39, 39, 39, 39, 39, 79, 42, 42, 42, 42, 42, 42, + 77, 39, 94, 94, 94, 94, 94, 94, 36, 36, 36, 36, 36, 36, 46, 56, + 7, 7, 7, 7, 7, 60, 60, 60, 60, 60,169, 78, 42, 60,169, 77, + 77,170, 58, 58, 58, 74, 42, 42, 42, 69, 46, 42, 42, 42, 60, 60, + 60, 60, 60, 60, 60, 42, 42, 60, 60, 42, 69, 60, 60, 60, 60, 60, + 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, + 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, + 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, + 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, + 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 32, 16, 7, + 42, 42, 42, 69, 60, 46, 42, 42, 42, 42, 42, 42, 42, 42, 69, 60, + 60, 60, 46, 60, 60, 60, 60, 60, 60, 60, 69, 21, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 55, 42, 42, 16, 16, 16, 16, 16,123, 16, 16, + 42, 42, 42, 67, 39, 39, 39, 39, 7, 7, 7, 7, 7, 7, 7, 70, + 36, 36, 36, 36, 36, 36, 42, 42, 7, 7, 7, 7, 7, 7, 7,171, + 36, 36, 36, 36, 36, 75, 42, 42,172, 7, 7, 7, 7, 7, 7, 84, + 36, 63, 36, 64, 36, 36, 36, 42, 36, 36, 63, 42, 42, 42, 42, 75, + 16, 16, 42, 42, 42, 67, 39, 39, 27, 27, 27, 27, 27, 27,145, 27, + 173, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,145, + 27, 27, 27, 27, 27, 27, 83, 60, 60, 60, 60, 60, 60, 25, 40, 40, + 0, 0, 29, 21, 21, 21, 23, 21, 22, 18, 21, 25, 21, 17, 13, 13, + 25, 25, 25, 21, 21, 9, 9, 9, 9, 22, 21, 18, 24, 16, 24, 5, + 5, 5, 5, 22, 25, 18, 25, 0, 23, 23, 26, 21, 24, 26, 7, 20, + 25, 1, 26, 24, 26, 25, 15, 15, 24, 15, 7, 19, 15, 21, 9, 25, + 9, 5, 5, 25, 5, 9, 5, 7, 7, 7, 9, 8, 8, 5, 6, 6, + 24, 24, 6, 24, 12, 12, 6, 5, 9, 21, 25, 9, 26, 12, 11, 11, + 9, 6, 5, 21, 17, 17, 17, 26, 26, 23, 23, 12, 17, 12, 21, 12, + 12, 21, 7, 21, 1, 1, 21, 23, 26, 26, 1, 21, 6, 7, 7, 12, + 12, 7, 21, 7, 12, 1, 12, 6, 6, 12, 12, 26, 7, 26, 26, 7, + 21, 1, 24, 7, 1, 12, 7, 6, 12, 10, 10, 10, 10, 12, 21, 6, + 10, 7, 7, 10, 23, 7, 15, 26, 13, 21, 13, 7, 15, 7, 12, 23, + 21, 26, 21, 15, 17, 7, 29, 7, 7, 22, 18, 18, 14, 14, 14, 7, + 10, 21, 17, 21, 11, 12, 5, 6, 8, 8, 8, 24, 5, 24, 9, 24, + 29, 29, 29, 1, 20, 19, 22, 20, 27, 28, 1, 29, 21, 20, 19, 21, + 21, 16, 16, 21, 25, 22, 18, 21, 21, 29, 15, 6, 18, 6, 12, 11, + 9, 26, 26, 9, 26, 5, 7, 5, 5, 26, 14, 9, 5, 14, 14, 15, + 25, 26, 26, 22, 18, 26, 18, 25, 18, 22, 5, 12, 22, 21, 21, 22, + 18, 17, 26, 6, 7, 14, 17, 22, 26, 14, 17, 6, 14, 6, 12, 24, + 24, 6, 26, 15, 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, 6, 10, + 4, 4, 3, 3, 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, 7, 1, + 25, 24, 26, 1, 2, 2, 12, 15, 21, 14, 7, 15, 9, 12, 12, 17, + 13, 15, 26, 10, 10, 1, 13, 23, 7, 13, 23, 15, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 13, 0, 14, 0, 0, 0, + 0, 0, 15, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, 0, 0, + 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 0, 36, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 39, 40, 0, 0, 0, 0, 0, 0, 41, 42, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, + 0, 0, 0, 0, 3, 0, 0, 0, 4, 5, 6, 7, 0, 8, 9, 10, + 0, 11, 12, 13, 14, 15, 16, 17, 16, 18, 16, 19, 16, 19, 16, 19, + 0, 19, 16, 20, 16, 19, 21, 19, 0, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 0, 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, 37, 0, + 0, 0, 38, 39, 40, 41, 42, 43, 44, 45, 46, 0, 0, 47, 0, 0, + 0, 48, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 50, 0, 51, + 0, 52, 53, 0, 54, 0, 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 0, 58, 0, 0, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, + 0, 66, 0, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 70, 0, 71, + 0, 0, 72, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 74, 75, + 0, 0, 0, 0, 76, 77, 0, 78, 79, 0, 0, 80, 81, 0, 82, 62, + 0, 83, 84, 0, 0, 85, 86, 87, 0, 88, 0, 89, 0, 90, 0, 0, + 51, 91, 51, 0, 92, 0, 93, 0, 0, 0, 81, 0, 0, 0, 94, 95, + 0, 96, 97, 98, 99, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0,100, + 101, 0, 0, 0, 0, 0, 0,102, 0, 0, 0, 0, 0, 0,103, 0, + 0, 0, 0, 0, 0,104,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,106, 0, 0,107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,108, + 109, 0, 0,110, 0, 0, 0, 0, 0, 0,111, 0,112, 0,105, 0, + 0, 0, 0, 0,113,114, 0, 0, 0, 0, 0, 0, 0,115, 0, 0, + 0,116, 0, 0, 0,117, 0, 0, 0, 0, 0, 0, 0,118, 0,119, + 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 0, + 0, 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, 13, 0, 0, 14, 15, + 0, 16, 0, 17, 18, 0, 0, 19, 0, 20, 21, 0, 0, 0, 0, 0, + 22, 23, 0, 24, 25, 0, 0, 26, 0, 0, 0, 27, 0, 0, 28, 29, + 30, 31, 0, 0, 0, 32, 33, 34, 0, 0, 33, 0, 0, 35, 33, 0, + 0, 0, 33, 36, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0, 0, + 0, 39, 40, 0, 0, 0, 0, 0, 0, 41, 42, 0, 0, 0, 0, 43, + 0, 44, 0, 0, 0, 45, 46, 0, 0, 0, 47, 0, 0, 0, 0, 0, + 0, 48, 49, 0, 0, 0, 0, 50, 0, 0, 0, 51, 0, 52, 0, 53, + 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 0, 56, 0, 0, 0, 0, + 57, 58, 0, 0, 0, 59, 60, 61, 62, 0, 0, 0, 0, 63, 52, 0, + 64, 65, 0, 0, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, 0, 70, + 71, 72, 73, 74, 1, 75, 0, 76, 77, 78, 0, 0, 79, 80, 0, 0, + 0, 81, 0, 0, 1, 1, 0, 0, 82, 0, 0, 83, 0, 0, 0, 0, + 79, 84, 0, 85, 0, 0, 0, 0, 0, 80, 86, 0, 87, 0, 52, 0, + 1, 80, 0, 0, 88, 0, 0, 89, 0, 0, 0, 0, 0, 90, 57, 0, + 0, 0, 0, 0, 0, 91, 92, 0, 0, 86, 0, 0, 33, 0, 0, 93, + 0, 0, 0, 0, 94, 0, 0, 0, 0, 49, 0, 0, 95, 0, 0, 0, + 0, 96, 97, 0, 0, 98, 0, 0, 99, 0, 0, 0,100, 0, 0, 0, + 101, 0, 0, 0,102, 0, 0, 0, 0,103,104, 95, 0, 0,105, 0, + 0, 0, 86, 0, 0,106, 0, 0, 0,107,108, 0, 0,109,110, 0, + 0, 0, 0, 0, 0,111, 0, 0,112, 0, 0, 0, 0,113, 33, 0, + 114,115,116, 57, 0, 0,117, 35, 0, 0,118, 0, 0, 0,119, 0, + 0, 0, 0, 0, 0,120, 0, 0,121, 0, 0, 0, 0,122, 90, 0, + 0, 0, 0, 0, 57, 0, 0, 0, 0, 52,123, 0, 0, 0, 0,124, + 0, 0,125, 0, 0, 0, 0,123, 0, 0,126, 0, 0, 0, 0, 0, + 81, 0, 0, 0, 0,127, 0, 0, 0,128, 0, 0, 0,129, 0,130, + 0, 0, 0, 0,131,132,133, 0,134, 0,135, 0, 0, 0,136,137, + 138, 0, 79, 0, 0, 0, 0, 0, 35, 0, 0, 0,139, 0, 0, 0, + 140, 0, 0, 0,141, 0, 0, 0,142,143, 0,144, 0, 0,145, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, + 7, 4, 4, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 1, + 1, 1, 19, 1, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, 25, 26, + 27, 28, 29, 30, 0, 0, 1, 1, 31, 0, 0, 0, 32, 33, 34, 35, + 1, 36, 37, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, 42, 0, + 0, 0, 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 19, 1, 21, 0, + 0, 47, 0, 38, 48, 1, 1, 49, 49, 50, 0, 0, 51, 0, 0, 19, + 52, 1, 0, 0, 38, 14, 4, 1, 1, 1, 53, 21, 43, 52, 54, 21, + 35, 1, 0, 0, 0, 55, 0, 0, 0, 56, 57, 58, 0, 0, 0, 0, + 0, 59, 0, 60, 0, 0, 0, 0, 61, 62, 0, 0, 63, 0, 0, 0, + 64, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, + 68, 0, 0, 69, 70, 0, 71, 72, 73, 74, 75, 76, 0, 0, 0, 77, + 0, 0, 0, 78, 79, 0, 0, 0, 0, 47, 0, 0, 0, 49, 0, 80, + 0, 0, 0, 62, 0, 0, 63, 0, 0, 81, 0, 0, 82, 0, 0, 0, + 83, 0, 0, 19, 84, 0, 62, 0, 0, 0, 0, 49, 1, 85, 1, 52, + 15, 86, 36, 10, 21, 1, 1, 1, 1, 41, 1, 21, 87, 0, 0, 55, + 0, 0, 0, 0, 19, 10, 1, 0, 0, 0, 0, 0, 88, 0, 0, 89, + 0, 0, 88, 0, 0, 0, 0, 78, 0, 0, 90, 9, 12, 4, 91, 8, + 92, 47, 0, 58, 50, 0, 21, 1, 21, 93, 94, 1, 1, 1, 1, 95, + 96, 97, 98, 1, 99, 58, 81,100,101, 4, 58, 0, 0, 0, 0, 0, + 0, 19, 50, 0, 0, 0, 0, 0, 0, 61, 0, 0,102,103, 0, 0, + 104, 0, 0, 1, 1, 50, 0, 0, 0, 38, 0, 63, 0, 0, 0, 0, + 0, 62, 0, 0,105, 68, 61, 0, 0, 0, 78, 0, 0, 0,106,107, + 58, 38, 81, 0, 0, 0, 0, 0, 0,108, 1, 14, 4, 12, 84, 0, + 0, 0, 0, 38, 90, 0, 0, 0, 0,109, 0, 0,110, 61, 0,111, + 0, 0, 0, 1, 0, 0, 0, 0, 49, 50, 0, 0, 19, 58, 0, 0, + 112, 51, 0,112, 14, 52,113, 41, 0, 0, 62, 0, 0, 61, 0, 0, + 114, 0, 90, 0, 0, 0, 61, 62, 0, 0, 62, 0, 89, 0, 0,114, + 0, 0, 0, 0,115, 0, 0, 0, 78, 55, 0, 38, 1, 58, 1, 58, + 0, 0, 0, 0, 0, 88, 63, 89, 0, 0,116, 0, 0, 0, 55, 0, + 0, 0, 0,116, 0, 0, 0, 0, 61, 0, 0, 0, 0, 79, 0, 61, + 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, 79, 0, 0, 0, 8, 92, + 0, 0, 1, 90, 0, 0,117, 0, 0, 0, 0, 0, 0,118, 0,119, + 120,121,122, 0,105, 4,123, 49, 23, 0, 0, 0, 38, 50, 38, 58, + 0, 0, 1, 90, 1, 1, 1, 1, 39, 1, 48,106, 90, 0, 0, 0, + 0, 1, 0, 0, 0,124, 0, 0, 0,113, 19, 59, 0, 38, 0, 81, + 0, 0, 4,123, 0, 0, 0, 1,125, 0, 0, 0, 0, 0,230,230, + 230,230,230,232,220,220,220,220,232,216,220,220,220,220,220,202, + 202,220,220,220,220,202,202,220,220,220, 1, 1, 1, 1, 1,220, + 220,220,220,230,230,230,230,240,230,220,220,220,230,230,230,220, + 220, 0,230,230,230,220,220,220,220,230,232,220,220,230,233,234, + 234,233,234,234,233,230, 0, 0, 0,230, 0,220,230,230,230,230, + 220,230,230,230,222,220,230,230,220,220,230,222,228,230, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, + 25, 0,230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, 28, 29, + 30, 31, 32, 33, 34,230,230,220,220,230,220,230,230,220, 35, 0, + 0, 0, 0, 0,230,230,230, 0, 0,230,230, 0,220,230,230,220, + 0, 0, 0, 36, 0, 0,230,220,230,230,220,220,230,220,220,230, + 220,230,220,230,230, 0, 0,220, 0, 0,230,230, 0,230, 0,230, + 230,230,230,230, 0, 0, 0,220,220,220,230,220,220,220,230,230, + 0,220, 27, 28, 29,230, 7, 0, 0, 0, 0, 9, 0, 0, 0,230, + 220,230,230, 0, 0, 0, 0, 0,230, 0, 0, 84, 91, 0, 0, 0, + 0, 9, 9, 0, 0, 0, 0, 0, 9, 0,103,103, 9, 0,107,107, + 107,107,118,118, 9, 0,122,122,122,122,220,220, 0, 0, 0,220, + 0,220, 0,216, 0, 0, 0,129,130, 0,132, 0, 0, 0, 0, 0, + 130,130,130,130, 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0, + 220, 0, 0, 0, 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, 0,230, + 0, 0, 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0,230, 0, + 0,220,230,220, 0,220,230,230,230,234, 0, 0, 9, 9, 0, 0, + 7, 0,230,230,230, 0,230, 0, 1, 1, 1, 0, 0, 0,230,234, + 214,220,202,230,230,230,230,230,232,228,228,220,218,230,233,220, + 230,220,230,230, 1, 1, 1, 1, 1,230, 0, 1, 1,230,220,230, + 1, 1, 0, 0,218,228,232,222,224,224, 0, 8, 8, 0, 0, 0, + 0,220,230, 0,230,230,220, 0, 0,230, 0, 0, 26, 0, 0,220, + 0,230,230, 1,220, 0, 0,230,220, 0, 0, 0,220,220, 0, 0, + 230,220, 0, 9, 7, 0, 0, 7, 9, 0, 0, 0, 9, 7, 6, 6, + 0, 0, 0, 0, 1, 0, 0,216,216, 1, 1, 1, 0, 0, 0,226, + 216,216,216,216,216, 0,220,220,220, 0,232,232,220,230,230,230, + 7, 0, 16, 17, 17, 33, 17, 49, 17, 17, 84, 97,135,145, 26, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17,177, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 5, 3, 3, 3, + 3, 3, 6, 7, 8, 3, 3, 3, 3, 3, 9, 10, 11, 12, 13, 3, + 3, 3, 3, 3, 3, 3, 3, 14, 3, 15, 3, 3, 3, 3, 3, 3, + 16, 17, 18, 19, 20, 21, 3, 3, 3, 22, 23, 24, 3, 3, 3, 3, + 3, 3, 25, 3, 3, 3, 3, 3, 3, 3, 3, 26, 3, 3, 27, 28, + 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, + 0, 9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 0, + 0, 14, 15, 16, 6, 0, 17, 18, 19, 19, 19, 20, 21, 22, 23, 24, + 19, 25, 0, 26, 27, 19, 19, 28, 29, 30, 0, 31, 0, 0, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 19, 28, 0, 32, 33, 9, 34, 35, 19, + 0, 0, 36, 37, 38, 39, 40, 19, 0, 41, 42, 43, 44, 31, 0, 1, + 45, 42, 0, 0, 0, 0, 0, 32, 14, 14, 0, 0, 0, 0, 14, 0, + 0, 46, 47, 47, 47, 47, 48, 49, 47, 47, 47, 47, 50, 51, 52, 53, + 43, 21, 0, 0, 0, 0, 0, 0, 0, 54, 6, 55, 0, 14, 19, 1, + 0, 0, 0, 0, 56, 57, 0, 0, 0, 0, 0, 19, 58, 31, 0, 0, + 0, 0, 0, 0, 0, 59, 14, 0, 0, 0, 0, 1, 0, 2, 0, 0, + 0, 3, 0, 0, 0, 60, 61, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 2, 3, 0, 4, 5, 0, 0, 6, 0, 0, 0, 7, + 0, 0, 0, 1, 1, 0, 0, 8, 9, 0, 8, 9, 0, 0, 0, 0, + 8, 9, 10, 11, 12, 0, 0, 0, 13, 0, 0, 0, 0, 14, 15, 16, + 17, 0, 0, 0, 1, 0, 0, 18, 19, 0, 0, 0, 20, 0, 0, 0, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 8, 21, 9, + 0, 0, 22, 0, 0, 0, 0, 1, 0, 23, 24, 25, 0, 0, 26, 0, + 0, 0, 8, 21, 27, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 28, + 29, 30, 0, 31, 32, 20, 1, 1, 0, 0, 0, 8, 21, 9, 1, 4, + 5, 0, 0, 0, 33, 9, 0, 1, 1, 1, 0, 8, 21, 21, 21, 21, + 34, 1, 35, 21, 21, 21, 9, 36, 0, 0, 37, 38, 1, 0, 39, 0, + 0, 0, 1, 0, 1, 0, 0, 0, 0, 8, 21, 9, 1, 0, 0, 0, + 40, 0, 8, 21, 21, 21, 21, 21, 21, 21, 21, 9, 0, 1, 1, 1, + 1, 8, 21, 21, 21, 9, 0, 0, 0, 41, 0, 42, 43, 0, 0, 0, + 1, 44, 0, 0, 0, 45, 8, 9, 1, 0, 0, 0, 8, 21, 21, 21, + 9, 0, 1, 0, 1, 1, 8, 21, 21, 9, 0, 4, 5, 8, 9, 1, + 0, 0, 16, 50, 84,118,136,152,186,187,187,187,187,187,187,187, + 187,187,187,187,187,187,187,187,187,187,187,187,187,187, 12, 0, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 13, 13, 13, + 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 15, 16, 17, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 19, 32, 33, 33, 33, 33, 33, + 34, 19, 19, 19, 19, 19, 19, 35, 19, 36, 37, 38, 38, 38, 38, 38, + 38, 39, 40, 19, 19, 19, 19, 19, 19, 19, 41, 42, 19, 19, 43, 19, + 19, 19, 44, 45, 9, 46, 47, 48, 49, 50, 51, 52, 9, 9, 19, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 53, 19, 19, 53, 19, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 54, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 55, + 0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 0, + 1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 32, 33, 33, 33, 34, 35, 35, 35, 35, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 2, 2, 51, 51, 52, + 53, 54, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, + 57, 56, 56, 56, 56, 56, 56, 58, 59, 60, 61, 56, 62, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 56, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 71, 62, 62, 62, 62, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 73, 74, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 32, + 32, 32, 32, 32, 32, 32, 32, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 62, 62, 62, 62, 88, 89, 89, 89, 90, 89, 91, 92, 93, 94, 95, + 95, 96, 97, 87, 98, 99,100,101,102,103,104,105,105,105, 2,106, + 107,108,109,110,111,112,113,114,115,116,117, 89,118,119,120,121, + 122,123,124,125,126,127,128,129,130, 87,131,132,133,134, 87,135, + 136,137,138,139,140,141,142,143,144,145,146, 87,147,148,149,150, + 150,150,150,150,150,150,150,150,150,150, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87,151,152,152,152,152,152,152,152,152,153, + 153,153,153,153, 87, 87, 87, 87, 87,154, 87, 87, 87, 87, 87,155, + 155,155,155,156,157,158,158, 87, 87,159, 87,160,161,162,163,164, + 164,164,164,164,164,164,164,164,164,164,164,164,164,165,165,165, + 165,164,164, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,166,167, + 168,169,170,170,170, 87, 87,171,172, 87, 87, 87, 87, 87, 87, 56, + 56, 56, 56, 56, 56,173, 56, 56, 56,174,175, 51, 56, 56, 87,176, + 176,176,176,176,176, 87, 87, 87, 87, 87, 87, 87, 87, 2, 87,177, + 6,178, 87, 87,179, 87, 87, 87,180, 87,181, 87,182, 87, 33,183, + 183,184, 87, 87, 87, 87, 87, 56, 56, 56, 87, 89, 89, 87, 87, 56, + 56, 56, 56,185, 87, 56, 56, 62, 62, 62, 62, 62, 87, 87, 87, 62, + 87, 87, 87, 87, 87, 87, 87, 56, 87,186,186, 0, 1, 2, 2, 0, + 0, 0, 0, 1, 2, 1, 2, 0, 0, 3, 3, 4, 5, 4, 5, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 0, 7, 0, 8, + 8, 8, 8, 8, 8, 8, 9, 10, 11, 11, 11, 11, 11, 12, 11, 13, + 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 15, 16, 16, 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, 19, + 20, 21, 21, 22, 23, 21, 24, 21, 21, 21, 21, 21, 25, 21, 21, 26, + 26, 26, 26, 26, 21, 21, 21, 27, 27, 27, 27, 28, 28, 28, 28, 29, + 29, 29, 29, 30, 30, 26, 21, 21, 21, 21, 21, 21, 21, 31, 21, 32, + 32, 32, 32, 32, 33, 34, 32, 35, 35, 35, 35, 35, 35, 35, 35, 36, + 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 38, + 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 40, + 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, + 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 44, + 44, 44, 45, 44, 44, 44, 44, 46, 46, 46, 46, 46, 46, 46, 46, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 47, 47, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 51, 52, + 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 56, + 56, 57, 57, 57, 57, 58, 57, 59, 59, 60, 61, 62, 62, 63, 63, 64, + 64, 64, 64, 64, 64, 64, 64, 65, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 55, 55, 55, 55, 55, 67, 67, 67, 67, 67, 68, 68, 68, 69, + 69, 69, 69, 69, 69, 64, 64, 70, 70, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 8, 8, 8, 8, 8, 72, 72, 72, 72, 72, 72, 72, 72, 73, + 73, 73, 73, 74, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 13, + 50, 50, 50, 73, 77, 78, 79, 4, 4, 80, 4, 4, 81, 82, 83, 4, + 4, 4, 84, 8, 8, 8, 8, 11, 11, 11, 11, 11, 11, 11, 11, 85, + 0, 0, 0, 0, 0, 0, 86, 0, 4, 0, 0, 0, 8, 8, 8, 0, + 0, 87, 88, 89, 0, 4, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 90, 90, 90, 90, 90, 91, + 91, 91, 91, 91, 91, 4, 4, 92, 92, 92, 92, 92, 92, 92, 92, 50, + 50, 50, 93, 93, 93, 93, 93, 53, 53, 53, 53, 53, 53, 13, 13, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 0, 95, + 0, 96, 97, 98, 99, 99, 99, 99,100,101,102,102,102,102,103,104, + 104,104,105, 52, 52, 52, 52, 52, 0,104,104, 0, 0, 0,102, 52, + 52, 0, 0, 0, 0, 52,106, 0, 0, 0, 0, 0,102,102,107,102, + 102,102,102,102,108, 0, 0, 94, 94, 94, 94, 0, 0, 0, 0,109, + 109,109,109,109,109,109,109,109,109,109,109,109,110,110,110,111, + 111,111,111,111,111,111,111,111,111,111,111, 13, 13, 13, 13, 13, + 13,112,112,112,112,112,112, 0, 0,113, 4, 4, 4, 4, 4,114, + 4, 4, 4, 4, 4, 4, 4,115,115,115, 0,116,116,116,116,117, + 117,117,117,117,117, 32, 32,118,118,119,120,120,120, 52, 52,121, + 121,121,121,122,121, 49, 49,123,123,123,123,123,123, 49, 49,124, + 124,124,124,124,124,125,125, 53, 53, 53, 4, 4,126,127, 54, 54, + 54, 54, 54,125,125,125,125,128,128,128,128,128,128,128,128, 4, + 129, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21,130, 21, 21, 21, 21, 8, 0,131, 0, 0, 0, 0, 21, 21, + 21, 21, 21, 21, 21, 21,132, 0, 0, 1, 2, 1, 2,133,101,102, + 134, 52, 52, 52, 52, 0, 0,135,135,135,135,135,135,135,135, 0, + 0, 0, 0, 11, 11, 11, 11, 11, 0, 11, 11, 11, 0, 0,136,137, + 137,138,138,138,138,139, 0,140,140,140,141,141,142,142,142,143, + 143,144,144,144,144,144,144,145,145,145,145,145,146,146,146,147, + 147,147,148,148,148,148,148,149,149,149,150,150,150,150,151,151, + 151,151,151,152,152,152,152,153,153,153,153,153,153,153,153,154, + 154,154,154,155,155,156,156,157,157,157,157,157,157,158,158,159, + 159,160,160,161,161,161,161,162,162,163,163,163,163,163,163,164, + 164,164,164,164,164,165,165,166,166,166,166,167,167,167,167,168, + 168,168,168,169,169,170,170,171,171,171,171,171,171,171,171,172, + 172,172,172,172,172,172,172,173,173,173,173,173,173,173,173,174, + 174,174,174,175,175,175,175,175,175,175,175,175,175,175,175,176, + 176,176,176,177, 21, 21, 21,178,178,178,179,179,179,179,180,180, + 180,180,181,181,181,182,182,183,183,183,183,183,183,183,183,184, + 184,184,184,184,185,185,185,186,186,186,186,186,187,187,187,188, + 188,188,188,188,188,189, 43,190,190,190,190,190,190,190,190,191, + 191,191,192,192,192,192,192,193,193,193,194,193,193,193,193,195, + 195,195,195,195,195,195,195,196,196,196,196,196,196,196,196,197, + 197,197,197,197,197,197,197,198,198,198,198,198,198,198,198,199, + 199,199,199,199,199, 66, 66,200,200,200,200,200, 49, 49, 49,201, + 201,201,201,201,201,201,201,202,202,202,202,202,202,202,202,203, + 203,203,203,203,203,203,203,204,204,204,204,204,204,204,204,205, + 205,205,205,205,205,205,205,206,206,206,206,206,207,207,207,207, + 207,207, 55,208,208,208,208, 32, 32, 32, 32, 32, 32,188,188,209, + 209,209,209,209,209,209,209,210,210,210,210,210,210,210,211,211, + 211,211,211,211,211,211,211,212,212,212,212,212,212,213,213,213, + 213,213,214,214,214,214,214,215,215,215,215,215,215,215,215,216, + 216,216,216,216,216,216,216,110,110,110,110, 39, 39, 39, 39,217, + 217,217,217,217,217,217,217,218,218,218,218,218,218,218,218,219, + 219,219,219,219,219,219,219,220,220,220,220,220,220,220,220,221, + 221,221,221,221,221,221,221,112,112,112,112,112,112,112,112,112, + 112,112,112,222,222,222,223,223,223,223,223,223,224,224,224,225, + 225,225,225,225,225,225,225,226,226,226,226,226,226,226,226,227, + 227,227,227,227,227,227,227,227,227,228,228,228,228,228,228,229, + 229,229,229,229,229,229,229,229,229,229,229,229,229,230, 94,231, + 231,231,231,231,231,231,231,232,232,232,232,232,232,232,232,102, + 102,102,102,102,102,102,102,233, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99,102,234, 99,235,102,236,236, + 236,236,236,236,236,236,236,237,237,237,237,237,237,237,237,237, + 237, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, + 0, 0, 0, 0, 0,238,239,240, 0,241, 0, 0, 0, 0, 0,242, + 242,242,242,242,242,242,242, 91, 91, 91, 13, 13, 13, 13, 13,243, + 243,243,243,243,243,243,243,244,244,244,244,245,245,245,245,246, + 246,246,246,246,246,246,246,247,247,247,247,247,247,247,247,248, + 248,248,248,248,248,248,248,249,249,249,249,249,249,249,249,250, + 250,250,250,250,250,250,250,251, 0, 0, 0, 0, 0, 0, 0, 8, + 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 1, 2, 2, 2, 2, + 2, 3, 0, 0, 0, 4, 0, 2, 2, 2, 2, 2, 3, 2, 2, 2, + 2, 5, 0, 2, 5, 6, 0, 7, 7, 7, 7, 8, 9, 8, 10, 8, + 11, 8, 8, 8, 8, 8, 8, 12, 13, 13, 13, 14, 14, 14, 14, 14, + 15, 14, 14, 16, 17, 17, 17, 17, 17, 17, 17, 18, 19, 19, 19, 19, + 19, 19, 19, 20, 21, 20, 22, 20, 20, 23, 23, 20, 20, 20, 20, 22, + 20, 24, 7, 7, 25, 20, 20, 26, 20, 20, 20, 20, 20, 20, 21, 27, + 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, + 31, 31, 31, 32, 20, 20, 20, 33, 33, 33, 33, 34, 35, 33, 33, 33, + 36, 33, 33, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 40, + 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, + 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 47, 48, + 48, 48, 48, 49, 49, 49, 49, 49, 50, 51, 49, 52, 52, 52, 52, 53, + 53, 53, 53, 53, 53, 54, 53, 55, 55, 55, 55, 56, 56, 56, 56, 57, + 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 60, 60, + 60, 61, 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 0, 0, 66, + 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 68, 69, 70, 71, 71, 71, + 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 74, 75, + 75, 75, 75, 76, 76, 76, 76, 77, 77, 77, 77, 78, 78, 78, 78, 79, + 79, 79, 79, 80, 80, 80, 80, 81, 81, 81, 81, 82, 7, 7, 7, 83, + 7, 84, 85, 0, 84, 86, 0, 2, 87, 88, 2, 2, 2, 2, 89, 90, + 87, 91, 2, 2, 2, 92, 2, 2, 2, 2, 93, 0, 0, 0, 86, 1, + 0, 0, 94, 0, 95, 96, 0, 4, 0, 0, 0, 0, 0, 0, 4, 97, + 97, 97, 97, 98, 98, 98, 98, 13, 13, 13, 13, 99, 99, 99, 99,100, + 100,100,100, 0,101, 0, 0,102,100,103,104, 0, 0,100, 0,105, + 106,106,106,106,106,106,106,106,106,107,105,108,109,109,109,109, + 109,109,109,109,109,110,108,111,111,111,111,112, 55, 55, 55, 55, + 55, 55,113,109,109,109,110,109,109, 0, 0,114,114,114,114,115, + 115,115,115,116,116,116,116,117,117,117,117, 96, 2, 2, 2, 2, + 2, 94, 2,118,118,118,118,119,119,119,119,120,120,120,120,121, + 121,121,121,121,121,121,122,123,123,123,123,124,124,124,124,124, + 124,124,125,126,126,126,126,127,127,127,127,128,128,128,128, 2, + 2, 3, 2, 2,129,130, 0,131,131,131,131,132, 17, 17, 18, 20, + 20, 20,133, 7, 7, 7,134, 20, 20, 20, 23, 0,135,109,109,109, + 109,109,136,137,137,137,137, 0, 0, 0,138,139,139,139,139,140, + 140,140,140, 84, 0, 0, 0,141,141,141,141,142,142,142,142,143, + 143,143,143,144,144,144,144,145,145,145,145,146,146,146,146,147, + 147,147,147,148,148,148,148,149,149,149,149,150,150,150,150,151, + 151,151,151,152,152,152,152,153,153,153,153,154,154,154,154,155, + 155,155,155,156,156,156,156,157,157,157,157,158,158,158,158,159, + 159,159,159,160,160,160,160,161,161,161,161,162,162,162,162,163, + 163,163,163,164,164,164,164,165,165,165,165,166,166,166,166,167, + 167,167,167,168,168,168,168,169,169,169,169,170,170,170,170,171, + 171,171,171,172,172,172,172,173,173,173,173,174,174,174,174,175, + 175,175,175,176,176,176,176,177,177,177,177,178, 20, 20, 20,179, + 179,179,179,180,180,180,180,181,181,181,181,182,182,182,182,183, + 183,183,183,184,184,184,184,185,185,185,185,186,186,186,186,187, + 187,187,187,188,188,188,188,189,189,189,189,190, 45, 45, 45,191, + 191,191,191,192,192,192,192,193,193,193,193,194,194,194,194,194, + 194,195,194,196,196,196,196,197,197,197,197,198,198,198,198,199, + 199,199,199,200,200,200,200,201,201,201,201,202,202,202,202,203, + 203,203,203,204,204,204,204,205,205,205,205,206,206,206,206,207, + 207,207,207,208,208,208,208,209,209,209,209,210,210,210,210,211, + 211,211,211,212,212,212,212,213,213,213,213,214,214,214,214,215, + 215,215,215,216,216,216,216,217,217,217,217,218,218,218,218,219, + 219,219,219,220,220,220,220,221,221,221,221,222,222,222,222,223, + 223,223,223,224,224,224,224,225,225,225,225,226,226,226,226,227, + 227,227,227,228,228,228,228,229,229,229,229,230,230,230,230,231, + 232,232,232,233,233,233,233,232,232,232,232,234,106,106,106,235, + 106,106,106,106,236,109,109,237,237,237,237,238,238,238,238, 0, + 239, 86, 0, 0, 0,239, 7, 82,138, 7, 0, 0, 0,240, 86,241, + 241,241,241,242,242,242,242,243,243,243,243,244,244,244,244,245, + 245,245,245,246,246,246,246,247,247,247,247,248,248,248,248,249, + 249,249,249,250, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 0, 0, 0, 19, 0, 19, 0, 0, 0, 0, + 0, 26, 26, 1, 1, 1, 1, 9, 9, 9, 9, 0, 9, 9, 9, 9, + 9, 0, 9, 9, 0, 9, 0, 9, 9, 55, 55, 55, 55, 55, 55, 6, + 6, 6, 6, 6, 1, 1, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, + 14, 14, 14, 14, 14, 14, 14, 3, 3, 3, 3, 3, 0, 3, 3, 0, + 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 1, 1, 1, 3, 3, 1, + 3, 3, 3, 37, 37, 37, 37, 38, 38, 38, 38, 64, 64, 64, 64, 90, + 90, 90, 90, 95, 95, 95, 95, 3, 3, 0, 3, 7, 7, 7, 7, 7, + 1, 1, 1, 1, 7, 7, 7, 0, 0, 7, 7, 5, 5, 5, 5, 11, + 11, 11, 11, 10, 10, 10, 10, 21, 21, 21, 21, 22, 22, 22, 22, 23, + 23, 23, 23, 16, 16, 16, 16, 20, 20, 20, 20, 36, 36, 36, 36, 24, + 24, 24, 24, 24, 24, 24, 0, 18, 18, 18, 18, 25, 25, 25, 25, 25, + 0, 0, 0, 0, 25, 25, 25, 33, 33, 33, 33, 8, 8, 8, 8, 8, + 8, 8, 0, 12, 12, 12, 12, 30, 30, 30, 30, 29, 29, 29, 29, 28, + 28, 28, 28, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 0, 0, + 0, 35, 35, 45, 45, 45, 45, 44, 44, 44, 44, 44, 0, 0, 0, 43, + 43, 43, 43, 46, 46, 46, 46, 31, 31, 31, 31, 32, 32, 0, 0, 32, + 0, 32, 32, 32, 32, 32, 32, 48, 48, 48, 48, 52, 52, 52, 52, 58, + 58, 58, 58, 54, 54, 54, 54, 91, 91, 91, 91, 62, 62, 62, 62, 76, + 76, 76, 76, 93, 93, 93, 93, 70, 70, 70, 70, 73, 73, 73, 73, 1, + 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, + 1, 0, 0, 19, 19, 9, 9, 9, 9, 9, 6, 19, 9, 9, 9, 9, + 9, 19, 19, 9, 9, 9, 19, 6, 19, 19, 19, 19, 19, 19, 9, 0, + 0, 0, 19, 0, 0, 9, 0, 0, 0, 19, 19, 27, 27, 27, 27, 56, + 56, 56, 56, 61, 61, 61, 61, 13, 13, 13, 13, 0, 13, 0, 13, 0, + 13, 13, 13, 13, 13, 1, 1, 1, 1, 12, 12, 0, 15, 15, 15, 15, + 15, 15, 15, 15, 1, 1, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 0, 26, 26, 26, 26, 26, 12, 12, 12, 12, 12, 12, 0, 39, + 39, 39, 39, 86, 86, 86, 86, 77, 77, 77, 77, 79, 79, 79, 79, 60, + 60, 60, 60, 65, 65, 65, 65, 75, 75, 75, 75, 69, 69, 69, 69, 69, + 69, 0, 69, 74, 74, 74, 74, 84, 84, 84, 84, 84, 84, 84, 0, 68, + 68, 68, 68, 92, 92, 92, 92, 87, 87, 87, 87, 19, 9, 19, 19, 19, + 19, 0, 0, 2, 2, 2, 2, 19, 19, 19, 4, 3, 3, 0, 0, 1, + 1, 6, 6, 0, 0, 17, 17, 17, 17, 0, 0, 49, 49, 49, 49, 0, + 1, 1, 1, 71, 71, 71, 71, 67, 67, 67, 67, 42, 42, 42, 42, 41, + 41, 41, 41,118,118,118,118, 53, 53, 53, 53, 59, 59, 59, 59, 40, + 40, 40, 40, 51, 51, 51, 51, 50, 50, 50, 50,135,135,135,135,106, + 106,106,106,104,104,104,104,161,161,161,161,170,170,170,170,110, + 110,110,110, 47, 47, 47, 47, 81, 81, 81, 81,120,120,120,120,116, + 116,116,116,128,128,128,128, 66, 66, 66, 66, 72, 72, 72, 72,173, + 173,173,173, 98, 98, 98, 98, 97, 97, 97, 97, 57, 57, 57, 57, 88, + 88, 88, 88,117,117,117,117,112,112,112,112, 78, 78, 78, 78, 83, + 83, 83, 83, 82, 82, 82, 82,122,122,122,122, 89, 89, 89, 89,130, + 130,130,130,144,144,144,144,165,165,165,165,156,156,156,156,156, + 156, 3, 3,147,147,147,147,148,148,148,148,158,158,158,158,153, + 153,153,153,149,149,149,149, 94, 94, 94, 94, 85, 85, 85, 85,101, + 101,101,101, 96, 96, 96, 96,111,111,111,111,100,100,100,100,100, + 36, 36, 36,108,108,108,108,129,129,129,129,109,109,109,109,107, + 107,107,107,107,107,107, 1,171,171,171,171,137,137,137,137,124, + 124,124,124,123,123,123,123,114,114,114,114,102,102,102,102,126, + 126,126,126,142,142,142,142,125,125,125,125,154,154,154,154,150, + 150,150,150,141,141,141,141,140,140,140,140,121,121,121,121,169, + 169,169,169,133,133,133,133,134,134,134,134,138,138,138,138,143, + 143,143,143,175,175,175,175,145,145,145,145,163,163,163,163, 63, + 63, 63, 63,157,157,157,157, 80, 80, 80, 80,127,127,127,127,166, + 166,166,166,115,115,115,115,159,159,159,159,103,103,103,103,119, + 119,119,119,167,167,167,167,146,146,146,146,172,172,172,172, 99, + 99, 99, 99,136,139, 13, 13,155,155,155,155,136,136,136,136, 17, + 15, 15, 15, 17, 17, 15, 15, 15, 17, 17, 17,139,139,139,139,105, + 105,105,105, 0, 0, 0, 1, 0, 0, 1, 1,131,131,131,131,151, + 151,151,151,160,160,160,160,152,152,152,152,164,164,164,164,168, + 168,168,168,174,174,174,174,113,113,113,113,132,132,132,132, 15, + 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, + 10, 9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 16, + 17, 9, 9, 9, 9, 18, 9, 9, 9, 9, 9, 19, 20, 21, 9, 22, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 23, 9, 9, 9, 9, 9, 24, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 25, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 26, + 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 0, 0, 24, 25, 26, 27, 28, 29, 30, 0, + 0, 31, 32, 0, 33, 0, 34, 0, 35, 0, 0, 0, 0, 36, 37, 38, + 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 42, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 43, 44, 0, 45, 0, 0, 0, 0, 0, 0, 46, 47, 0, + 0, 0, 0, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 52, 0, 0, 53, 0, 0, + 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, + 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, + 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 67, 68, 0, 69, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101, + 102,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,104, 0, 0, 0, 0, 0, 0,105,106, 0,107, 0, 0, + 0,108, 0,109, 0,110, 0,111,112,113, 0,114, 0, 0, 0,115, + 0, 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,118,119,120,121, 0,122,123,124,125,126, 0, + 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142, + 143,144,145,146,147,148,149,150,151,152,153,154,155,156,157, 0, + 0, 0,158,159,160,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,162, 0,163, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,164,165, 0, 0, 0, 0, + 0, 0, 0,166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,167, 0, 0, 0,168,169, 0, 0,170, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,171, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,172, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,175, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,176,177, 0, 0, 0, 0,178,179, 0, 0, + 0,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194, + 195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210, + 211,212,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, + 4, +}; +static const uint16_t _hb_ucd_u16[5104]= +{ + 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12, + 13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23, + 13, 13, 13, 24, 25, 11, 11, 11, 11, 26, 11, 27, 28, 29, 30, 31, + 32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 11, 37, 38, 13, 39, + 9, 9, 9, 11, 11, 11, 13, 13, 40, 13, 13, 13, 41, 13, 13, 13, + 13, 13, 13, 35, 9, 42, 11, 11, 43, 44, 32, 45, 46, 47, 47, 48, + 49, 50, 47, 47, 51, 32, 52, 53, 47, 47, 47, 47, 47, 54, 55, 56, + 57, 58, 47, 32, 59, 47, 47, 47, 47, 47, 60, 53, 61, 47, 62, 63, + 47, 64, 65, 66, 47, 67, 47, 47, 68, 69, 47, 47, 70, 32, 71, 32, + 72, 47, 47, 73, 74, 75, 76, 77, 78, 47, 47, 79, 80, 81, 82, 83, + 84, 47, 47, 85, 86, 87, 88, 89, 84, 47, 47, 79, 90, 47, 82, 91, + 92, 47, 47, 93, 94, 95, 82, 96, 97, 47, 47, 98, 99, 100, 101, 102, + 103, 47, 47, 104, 105, 106, 82, 107, 108, 47, 47, 93, 109, 110, 82, 111, + 112, 47, 47, 113, 114, 115, 82, 116, 92, 47, 47, 47, 117, 118, 101, 119, + 47, 47, 47, 120, 121, 122, 66, 66, 47, 47, 47, 123, 124, 125, 47, 47, + 126, 127, 128, 129, 47, 47, 47, 130, 131, 32, 32, 132, 133, 134, 66, 66, + 47, 47, 135, 136, 122, 137, 138, 139, 140, 141, 9, 9, 9, 11, 11, 142, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 143, 144, 145, + 47, 146, 9, 9, 9, 9, 9, 147, 148, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 149, 47, 150, 151, 47, 47, 47, 47, 152, 153, + 47, 154, 47, 155, 47, 156, 47, 156, 47, 47, 47, 157, 158, 159, 160, 145, + 161, 160, 47, 47, 162, 47, 47, 47, 163, 47, 164, 47, 47, 47, 47, 47, + 47, 47, 165, 166, 167, 47, 47, 47, 47, 47, 47, 47, 47, 168, 146, 146, + 47, 169, 47, 47, 47, 170, 171, 172, 160, 160, 173, 174, 32, 32, 32, 32, + 175, 47, 47, 176, 177, 122, 178, 179, 180, 47, 181, 61, 47, 47, 182, 183, + 47, 47, 184, 185, 186, 61, 47, 187, 188, 9, 9, 9, 66, 189, 190, 191, + 11, 11, 192, 27, 27, 27, 193, 194, 11, 195, 27, 27, 32, 32, 32, 32, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 196, 13, 13, 13, 13, 13, 13, + 197, 197, 197, 197, 197, 198, 197, 11, 199, 199, 199, 200, 201, 202, 202, 201, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 27, 212, 212, 212, 213, 214, 32, + 215, 216, 217, 218, 219, 145, 220, 220, 221, 222, 223, 146, 224, 225, 146, 226, + 227, 227, 227, 227, 227, 227, 227, 227, 228, 146, 229, 146, 146, 146, 146, 230, + 146, 231, 227, 232, 146, 233, 234, 146, 146, 146, 146, 146, 146, 146, 145, 145, + 145, 235, 146, 146, 146, 146, 236, 145, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 237, 238, 146, 146, 239, 146, 146, 146, 146, 146, 146, 240, 146, + 146, 146, 146, 146, 146, 146, 241, 242, 145, 243, 146, 146, 244, 227, 245, 227, + 246, 247, 227, 227, 227, 248, 227, 249, 146, 146, 146, 227, 250, 146, 146, 146, + 9, 9, 9, 11, 11, 11, 251, 252, 13, 13, 13, 13, 13, 13, 253, 254, + 11, 11, 11, 47, 47, 47, 255, 256, 47, 47, 47, 47, 47, 47, 32, 32, + 257, 258, 259, 260, 261, 262, 263, 263, 264, 265, 266, 267, 268, 47, 47, 47, + 47, 269, 148, 47, 47, 47, 47, 270, 47, 271, 47, 47, 146, 146, 146, 47, + 146, 146, 272, 146, 273, 274, 146, 146, 272, 146, 146, 274, 146, 146, 146, 146, + 47, 47, 47, 47, 146, 146, 146, 146, 47, 275, 47, 47, 47, 47, 47, 47, + 47, 146, 146, 146, 146, 47, 47, 187, 276, 47, 61, 47, 13, 13, 277, 278, + 13, 279, 47, 47, 47, 47, 280, 281, 31, 282, 283, 284, 13, 13, 13, 285, + 286, 287, 288, 289, 290, 291, 9, 292, 293, 47, 294, 295, 47, 47, 47, 296, + 297, 47, 47, 298, 299, 160, 32, 300, 61, 47, 301, 47, 302, 303, 47, 47, + 72, 47, 47, 304, 305, 306, 307, 61, 47, 47, 308, 309, 310, 311, 47, 312, + 47, 47, 47, 313, 58, 314, 315, 316, 47, 47, 47, 11, 11, 317, 318, 11, + 11, 11, 11, 11, 47, 47, 319, 160, 320, 320, 320, 320, 320, 320, 320, 320, + 321, 321, 321, 321, 321, 321, 321, 321, 11, 322, 323, 47, 47, 47, 47, 47, + 47, 47, 47, 324, 325, 326, 47, 47, 47, 47, 47, 327, 146, 47, 47, 47, + 47, 328, 47, 47, 329, 146, 146, 330, 32, 331, 32, 332, 333, 334, 335, 47, + 47, 47, 47, 47, 47, 47, 47, 336, 337, 2, 3, 4, 5, 338, 339, 340, + 47, 341, 47, 47, 47, 47, 342, 343, 344, 145, 145, 345, 220, 220, 220, 346, + 347, 146, 146, 146, 146, 146, 146, 348, 349, 349, 349, 349, 349, 349, 349, 349, + 47, 47, 47, 47, 47, 47, 350, 145, 47, 47, 351, 47, 352, 47, 47, 60, + 47, 353, 47, 47, 47, 354, 220, 220, 9, 9, 147, 11, 11, 47, 47, 47, + 47, 47, 160, 9, 9, 147, 11, 11, 47, 47, 47, 47, 47, 47, 353, 9, + 9, 355, 11, 11, 47, 47, 47, 47, 27, 27, 27, 27, 27, 27, 27, 27, + 47, 47, 47, 47, 47, 356, 47, 357, 47, 47, 358, 145, 145, 145, 47, 359, + 47, 360, 47, 353, 47, 47, 47, 47, 47, 47, 47, 361, 145, 145, 145, 145, + 362, 47, 47, 363, 145, 66, 47, 364, 47, 365, 145, 145, 366, 47, 367, 66, + 47, 47, 47, 368, 47, 369, 47, 369, 47, 368, 144, 145, 145, 145, 145, 145, + 9, 9, 9, 9, 11, 11, 11, 370, 47, 47, 371, 160, 372, 9, 373, 11, + 374, 227, 227, 227, 227, 227, 227, 227, 145, 145, 145, 145, 145, 145, 145, 145, + 47, 47, 375, 47, 275, 376, 146, 377, 47, 365, 378, 47, 60, 379, 66, 47, + 380, 66, 66, 47, 381, 145, 47, 47, 382, 47, 47, 363, 383, 384, 385, 386, + 180, 47, 47, 387, 388, 47, 47, 160, 97, 47, 389, 390, 391, 47, 47, 392, + 180, 47, 47, 393, 394, 395, 396, 145, 47, 47, 397, 398, 362, 32, 32, 32, + 47, 47, 368, 47, 47, 399, 172, 160, 92, 47, 47, 113, 400, 401, 402, 32, + 47, 47, 47, 403, 404, 405, 406, 32, 47, 47, 47, 407, 408, 409, 47, 47, + 47, 47, 47, 410, 411, 160, 160, 160, 47, 47, 412, 413, 414, 415, 32, 32, + 47, 47, 47, 416, 417, 160, 66, 66, 47, 47, 418, 419, 160, 160, 160, 160, + 47, 420, 421, 422, 47, 47, 47, 47, 47, 47, 397, 423, 66, 66, 66, 66, + 9, 9, 9, 9, 11, 11, 128, 424, 47, 47, 47, 425, 426, 160, 160, 160, + 47, 47, 47, 47, 47, 427, 428, 429, 430, 47, 47, 431, 432, 433, 47, 47, + 434, 435, 66, 47, 47, 47, 47, 47, 66, 66, 66, 66, 66, 66, 436, 429, + 47, 47, 47, 47, 47, 47, 437, 160, 47, 47, 412, 438, 437, 128, 145, 439, + 47, 156, 440, 441, 32, 32, 32, 32, 47, 47, 47, 362, 442, 160, 47, 47, + 443, 444, 160, 47, 47, 445, 160, 160, 47, 47, 47, 47, 47, 47, 47, 446, + 447, 47, 47, 448, 449, 450, 32, 32, 47, 47, 47, 47, 145, 451, 452, 453, + 220, 220, 220, 220, 220, 220, 220, 66, 47, 47, 47, 47, 47, 47, 47, 437, + 47, 47, 47, 209, 454, 32, 47, 47, 47, 455, 456, 160, 160, 160, 160, 160, + 47, 47, 47, 47, 47, 47, 306, 47, 47, 47, 47, 47, 160, 47, 47, 457, + 47, 47, 47, 458, 459, 460, 461, 47, 27, 27, 27, 27, 462, 47, 463, 160, + 9, 9, 9, 9, 9, 9, 11, 11, 145, 464, 9, 465, 11, 11, 11, 11, + 47, 47, 47, 47, 399, 466, 429, 429, 467, 468, 27, 27, 27, 27, 469, 470, + 47, 471, 209, 209, 209, 209, 209, 209, 146, 146, 146, 146, 146, 146, 146, 472, + 146, 146, 146, 146, 146, 146, 146, 227, 32, 32, 32, 32, 32, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 473, 474, 475, 146, 476, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 477, 146, 146, 146, 9, 478, 11, 479, 480, 11, 197, 9, + 481, 482, 9, 483, 11, 9, 478, 11, 479, 480, 11, 197, 9, 481, 482, 9, + 483, 11, 9, 478, 11, 479, 480, 11, 197, 9, 481, 482, 9, 483, 11, 9, + 478, 11, 197, 9, 484, 485, 486, 487, 11, 488, 9, 489, 490, 491, 492, 11, + 493, 9, 494, 11, 495, 160, 160, 160, 32, 32, 32, 496, 32, 32, 497, 498, + 499, 500, 32, 32, 32, 32, 32, 32, 501, 11, 11, 11, 11, 11, 11, 11, + 32, 32, 32, 27, 27, 27, 27, 27, 32, 32, 32, 32, 32, 32, 32, 32, + 47, 47, 47, 502, 503, 146, 146, 146, 47, 47, 455, 32, 47, 47, 504, 505, + 47, 47, 47, 47, 47, 47, 506, 160, 47, 47, 47, 47, 47, 47, 455, 507, + 47, 47, 47, 47, 47, 47, 508, 509, 47, 47, 47, 47, 358, 32, 32, 32, + 9, 9, 481, 11, 510, 306, 66, 66, 145, 145, 511, 512, 145, 145, 145, 145, + 145, 145, 513, 145, 145, 145, 145, 145, 47, 47, 47, 47, 47, 47, 47, 227, + 514, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 515, + 146, 146, 146, 146, 146, 227, 227, 227, 209, 209, 209, 209, 209, 209, 209, 209, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 939, 940, 941, 942, 946, 948, 0, 962, 969, 970, 971, 976,1001,1002,1003,1008, + 0,1033,1040,1041,1042,1043,1047, 0, 0,1080,1081,1082,1086,1110, 0, 0, + 1124,1125,1126,1127,1131,1133, 0,1147,1154,1155,1156,1161,1187,1188,1189,1193, + 0,1219,1226,1227,1228,1229,1233, 0, 0,1267,1268,1269,1273,1298, 0,1303, + 943,1128, 944,1129, 954,1139, 958,1143, 959,1144, 960,1145, 961,1146, 964,1149, + 0, 0, 973,1158, 974,1159, 975,1160, 983,1168, 978,1163, 988,1173, 990,1175, + 991,1176, 993,1178, 994,1179, 0, 0,1004,1190,1005,1191,1006,1192,1014,1199, + 1007, 0, 0, 0,1016,1201,1020,1206, 0,1022,1208,1025,1211,1023,1209, 0, + 0, 0, 0,1032,1218,1037,1223,1035,1221, 0, 0, 0,1044,1230,1045,1231, + 1049,1235, 0, 0,1058,1244,1064,1250,1060,1246,1066,1252,1067,1253,1072,1258, + 1069,1255,1077,1264,1074,1261, 0, 0,1083,1270,1084,1271,1085,1272,1088,1275, + 1089,1276,1096,1283,1103,1290,1111,1299,1115,1118,1307,1120,1309,1121,1310, 0, + 1053,1239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1093, + 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 949,1134,1010, + 1195,1050,1236,1090,1277,1341,1368,1340,1367,1342,1369,1339,1366, 0,1320,1347, + 1418,1419,1323,1350, 0, 0, 992,1177,1018,1204,1055,1241,1416,1417,1415,1424, + 1202, 0, 0, 0, 987,1172, 0, 0,1031,1217,1321,1348,1322,1349,1338,1365, + 950,1135, 951,1136, 979,1164, 980,1165,1011,1196,1012,1197,1051,1237,1052,1238, + 1061,1247,1062,1248,1091,1278,1092,1279,1071,1257,1076,1263, 0, 0, 997,1182, + 0, 0, 0, 0, 0, 0, 945,1130, 982,1167,1337,1364,1335,1362,1046,1232, + 1422,1423,1113,1301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 9, 0, 10,1425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0,1314,1427, 5,1434,1438,1443, 0,1450, 0,1455,1461, + 1514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1446,1458,1468,1476,1480,1486, + 1517, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1489,1503,1494,1500,1508, 0, + 0, 0, 0,1520,1521, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1526,1528, 0,1525, 0, 0, 0,1522, 0, 0, 0, 0,1536,1532,1539, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1534, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1556, 0, 0, 0, 0, 0, 0, + 1548,1550, 0,1547, 0, 0, 0,1567, 0, 0, 0, 0,1558,1554,1561, 0, + 0, 0, 0, 0, 0, 0,1568,1569, 0, 0, 0, 0, 0, 0, 0, 0, + 0,1529,1551, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1523,1545,1524,1546, 0, 0,1527,1549, 0, 0,1570,1571,1530,1552,1531,1553, + 0, 0,1533,1555,1535,1557,1537,1559, 0, 0,1572,1573,1544,1566,1538,1560, + 1540,1562,1541,1563,1542,1564, 0, 0,1543,1565, 0, 0, 0, 0, 0, 0, + 0, 0,1606,1607,1609,1608,1610, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1613, 0,1611, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,1612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1620, 0, 0, 0, 0, 0, 0, + 0,1623, 0, 0,1624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,1614,1615,1616,1617,1618,1619,1621,1622, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1628,1629, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1625,1626, 0,1627, + 0, 0, 0,1634, 0, 0,1635, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1630,1631,1632, 0, 0,1633, 0, + 0, 0, 0, 0, 0, 0, 0, 0,1639, 0, 0,1638,1640, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1636,1637, 0, 0, + 0, 0, 0, 0,1641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1642,1644,1643, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,1645, 0, 0, 0, 0, 0, 0, 0, + 1646, 0, 0, 0, 0, 0, 0,1648,1649, 0,1647,1650, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1651,1653,1652, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1654, 0,1655,1657,1656, 0, + 0, 0, 0,1659, 0, 0, 0, 0, 0, 0, 0, 0, 0,1660, 0, 0, + 0, 0,1661, 0, 0, 0, 0,1662, 0, 0, 0, 0,1663, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1658, 0, 0, 0, 0, 0, 0, + 0, 0, 0,1664, 0,1665,1673, 0,1674, 0, 0, 0, 0, 0, 0, 0, + 0,1666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,1668, 0, 0, 0, 0, 0, 0, 0, 0, 0,1669, 0, 0, + 0, 0,1670, 0, 0, 0, 0,1671, 0, 0, 0, 0,1672, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1667, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,1675, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,1676, 0,1677, 0,1678, 0,1679, 0,1680, 0, + 0, 0,1681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1682, 0,1683, 0, 0, + 1684,1685, 0,1686, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 953,1138, 955,1140, 956,1141, 957,1142,1324,1351, 963,1148, 965,1150, 968,1153, + 966,1151, 967,1152,1378,1380,1379,1381, 984,1169, 985,1170,1420,1421, 986,1171, + 989,1174, 995,1180, 998,1183, 996,1181, 999,1184,1000,1185,1015,1200,1329,1356, + 1017,1203,1019,1205,1021,1207,1024,1210,1687,1688,1027,1213,1026,1212,1028,1214, + 1029,1215,1030,1216,1034,1220,1036,1222,1039,1225,1038,1224,1334,1361,1336,1363, + 1382,1384,1383,1385,1056,1242,1057,1243,1059,1245,1063,1249,1689,1690,1065,1251, + 1068,1254,1070,1256,1386,1387,1388,1389,1691,1692,1073,1259,1075,1262,1079,1266, + 1078,1265,1095,1282,1098,1285,1097,1284,1390,1391,1392,1393,1099,1286,1100,1287, + 1101,1288,1102,1289,1105,1292,1104,1291,1106,1294,1107,1295,1108,1296,1114,1302, + 1119,1308,1122,1311,1123,1312,1186,1260,1293,1305, 0,1394, 0, 0, 0, 0, + 952,1137, 947,1132,1317,1344,1316,1343,1319,1346,1318,1345,1693,1695,1371,1375, + 1370,1374,1373,1377,1372,1376,1694,1696, 981,1166, 977,1162, 972,1157,1326,1353, + 1325,1352,1328,1355,1327,1354,1697,1698,1009,1194,1013,1198,1054,1240,1048,1234, + 1331,1358,1330,1357,1333,1360,1332,1359,1699,1700,1396,1401,1395,1400,1398,1403, + 1397,1402,1399,1404,1094,1281,1087,1274,1406,1411,1405,1410,1408,1413,1407,1412, + 1409,1414,1109,1297,1117,1306,1116,1304,1112,1300, 0, 0, 0, 0, 0, 0, + 1471,1472,1701,1705,1702,1706,1703,1707,1430,1431,1715,1719,1716,1720,1717,1721, + 1477,1478,1729,1731,1730,1732, 0, 0,1435,1436,1733,1735,1734,1736, 0, 0, + 1481,1482,1737,1741,1738,1742,1739,1743,1439,1440,1751,1755,1752,1756,1753,1757, + 1490,1491,1765,1768,1766,1769,1767,1770,1447,1448,1771,1774,1772,1775,1773,1776, + 1495,1496,1777,1779,1778,1780, 0, 0,1451,1452,1781,1783,1782,1784, 0, 0, + 1504,1505,1785,1788,1786,1789,1787,1790, 0,1459, 0,1791, 0,1792, 0,1793, + 1509,1510,1794,1798,1795,1799,1796,1800,1462,1463,1808,1812,1809,1813,1810,1814, + 1467, 21,1475, 22,1479, 23,1485, 24,1493, 27,1499, 28,1507, 29, 0, 0, + 1704,1708,1709,1710,1711,1712,1713,1714,1718,1722,1723,1724,1725,1726,1727,1728, + 1740,1744,1745,1746,1747,1748,1749,1750,1754,1758,1759,1760,1761,1762,1763,1764, + 1797,1801,1802,1803,1804,1805,1806,1807,1811,1815,1816,1817,1818,1819,1820,1821, + 1470,1469,1822,1474,1465, 0,1473,1825,1429,1428,1426, 12,1432, 0, 26, 0, + 0,1315,1823,1484,1466, 0,1483,1829,1433, 13,1437, 14,1441,1826,1827,1828, + 1488,1487,1513, 19, 0, 0,1492,1515,1445,1444,1442, 15, 0,1831,1832,1833, + 1502,1501,1516, 25,1497,1498,1506,1518,1457,1456,1454, 17,1453,1313, 11, 3, + 0, 0,1824,1512,1519, 0,1511,1830,1449, 16,1460, 18,1464, 4, 0, 0, + 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 6, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1834,1835, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1836, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1837,1839,1838, + 0, 0, 0, 0,1840, 0, 0, 0, 0,1841, 0, 0,1842, 0, 0, 0, + 0, 0, 0, 0,1843, 0,1844, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,1845, 0, 0,1846, 0, 0,1847, 0,1848, 0, 0, 0, 0, 0, 0, + 937, 0,1850, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1849, 936, 938, + 1851,1852, 0, 0,1853,1854, 0, 0,1855,1856, 0, 0, 0, 0, 0, 0, + 1857,1858, 0, 0,1861,1862, 0, 0,1863,1864, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1867,1868,1869,1870, + 1859,1860,1865,1866, 0, 0, 0, 0, 0, 0,1871,1872,1873,1874, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1875, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1877, 0,1878, 0, + 1879, 0,1880, 0,1881, 0,1882, 0,1883, 0,1884, 0,1885, 0,1886, 0, + 1887, 0,1888, 0, 0,1889, 0,1890, 0,1891, 0, 0, 0, 0, 0, 0, + 1892,1893, 0,1894,1895, 0,1896,1897, 0,1898,1899, 0,1900,1901, 0, 0, + 0, 0, 0, 0,1876, 0, 0, 0, 0, 0, 0, 0, 0, 0,1902, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1904, 0,1905, 0, + 1906, 0,1907, 0,1908, 0,1909, 0,1910, 0,1911, 0,1912, 0,1913, 0, + 1914, 0,1915, 0, 0,1916, 0,1917, 0,1918, 0, 0, 0, 0, 0, 0, + 1919,1920, 0,1921,1922, 0,1923,1924, 0,1925,1926, 0,1927,1928, 0, 0, + 0, 0, 0, 0,1903, 0, 0,1929,1930,1931,1932, 0, 0, 0,1933, 0, + 710, 385, 724, 715, 455, 103, 186, 825, 825, 242, 751, 205, 241, 336, 524, 601, + 663, 676, 688, 738, 411, 434, 474, 500, 649, 746, 799, 108, 180, 416, 482, 662, + 810, 275, 462, 658, 692, 344, 618, 679, 293, 388, 440, 492, 740, 116, 146, 168, + 368, 414, 481, 527, 606, 660, 665, 722, 781, 803, 809, 538, 553, 588, 642, 758, + 811, 701, 233, 299, 573, 612, 487, 540, 714, 779, 232, 267, 412, 445, 457, 585, + 594, 766, 167, 613, 149, 148, 560, 589, 648, 768, 708, 345, 411, 704, 105, 259, + 313, 496, 518, 174, 542, 120, 307, 101, 430, 372, 584, 183, 228, 529, 650, 697, + 424, 732, 428, 349, 632, 355, 517, 110, 135, 147, 403, 580, 624, 700, 750, 170, + 193, 245, 297, 374, 463, 543, 763, 801, 812, 815, 162, 384, 420, 730, 287, 330, + 337, 366, 459, 476, 509, 558, 591, 610, 726, 652, 734, 759, 154, 163, 198, 473, + 683, 697, 292, 311, 353, 423, 572, 494, 113, 217, 259, 280, 314, 499, 506, 603, + 608, 752, 778, 782, 788, 117, 557, 748, 774, 320, 109, 126, 260, 265, 373, 411, + 479, 523, 655, 737, 823, 380, 765, 161, 395, 398, 438, 451, 502, 516, 537, 583, + 791, 136, 340, 769, 122, 273, 446, 727, 305, 322, 400, 496, 771, 155, 190, 269, + 377, 391, 406, 432, 501, 519, 599, 684, 687, 749, 776, 175, 452, 191, 480, 510, + 659, 772, 805, 813, 397, 444, 619, 566, 568, 575, 491, 471, 707, 111, 636, 156, + 153, 288, 346, 578, 256, 435, 383, 729, 680, 767, 694, 295, 128, 210, 0, 0, + 227, 0, 379, 0, 0, 150, 493, 525, 544, 551, 552, 556, 783, 576, 604, 0, + 661, 0, 703, 0, 0, 735, 743, 0, 0, 0, 793, 794, 795, 808, 741, 773, + 118, 127, 130, 166, 169, 177, 207, 213, 215, 226, 229, 268, 270, 317, 327, 329, + 335, 369, 375, 381, 404, 441, 448, 458, 477, 484, 503, 539, 545, 547, 546, 548, + 549, 550, 554, 555, 561, 564, 569, 591, 593, 595, 598, 607, 620, 625, 625, 651, + 690, 695, 705, 706, 716, 717, 733, 735, 777, 786, 790, 315, 869, 623, 0, 0, + 102, 145, 134, 115, 129, 138, 165, 171, 207, 202, 206, 212, 227, 231, 240, 243, + 250, 254, 294, 296, 303, 308, 319, 325, 321, 329, 326, 335, 341, 357, 360, 362, + 370, 379, 388, 389, 393, 421, 424, 438, 456, 454, 458, 465, 477, 535, 485, 490, + 493, 507, 512, 514, 521, 522, 525, 526, 528, 533, 532, 541, 565, 569, 574, 586, + 591, 597, 607, 637, 647, 674, 691, 693, 695, 698, 703, 699, 705, 704, 702, 706, + 709, 717, 728, 736, 747, 754, 770, 777, 783, 784, 786, 787, 790, 802, 825, 848, + 847, 857, 55, 65, 66, 883, 892, 916, 822, 824, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1586, 0,1605, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1602,1603,1934,1935,1574,1575, + 1576,1577,1579,1580,1581,1583,1584, 0,1585,1587,1588,1589,1591, 0,1592, 0, + 1593,1594, 0,1595,1596, 0,1598,1599,1600,1601,1604,1582,1578,1590,1597, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,1936, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,1937, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1938, 0,1939, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1940, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1941,1942, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1943,1944, 0, 0, 0, + 0, 0, 0,1945, 0,1946, 0, 0, 0, 0, 0, 0, 0, 0,1947, 0, + 0,1948, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,1950, 0,1949,1951, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1953,1952, 0,1954, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1955,1956, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,1957, 0, 0, 0, 0, 0, 0, 0, + 0,1958,1961,1959,1965,1960,1962,1964,1963, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,1967,1966,1968, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1969,1970, + 1971,1972,1973,1974,1975, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1976,1977,1978,1980,1979, + 1981, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 106, 104, 107, 826, 114, 118, 119, 121, 123, 124, 127, 125, 34, 830, 130, 131, + 132, 137, 827, 35, 133, 139, 829, 142, 143, 112, 144, 145, 924, 151, 152, 37, + 157, 158, 159, 160, 38, 165, 166, 169, 171, 172, 173, 174, 176, 177, 178, 179, + 181, 182, 182, 182, 833, 468, 184, 185, 834, 187, 188, 189, 196, 192, 194, 195, + 197, 199, 200, 201, 203, 204, 204, 206, 208, 209, 211, 218, 213, 219, 214, 216, + 153, 234, 221, 222, 223, 220, 225, 224, 230, 835, 235, 236, 237, 238, 239, 244, + 836, 837, 247, 248, 249, 246, 251, 39, 40, 253, 255, 255, 838, 257, 258, 259, + 261, 839, 262, 263, 301, 264, 41, 266, 270, 272, 271, 841, 274, 842, 277, 276, + 278, 281, 282, 42, 283, 284, 285, 286, 43, 843, 44, 289, 290, 291, 293, 934, + 298, 845, 845, 621, 300, 300, 45, 852, 894, 302, 304, 46, 306, 309, 310, 312, + 316, 48, 47, 317, 846, 318, 323, 324, 325, 324, 328, 329, 333, 331, 332, 334, + 335, 336, 338, 339, 342, 343, 347, 351, 849, 350, 348, 352, 354, 359, 850, 361, + 358, 356, 49, 363, 365, 367, 364, 50, 369, 371, 851, 376, 386, 378, 53, 381, + 52, 51, 140, 141, 387, 382, 614, 78, 388, 389, 390, 394, 392, 856, 54, 399, + 396, 402, 404, 858, 405, 401, 407, 55, 408, 409, 410, 413, 859, 415, 56, 417, + 860, 418, 57, 419, 422, 424, 425, 861, 840, 862, 426, 863, 429, 431, 427, 433, + 437, 441, 438, 439, 442, 443, 864, 436, 449, 450, 58, 454, 453, 865, 447, 460, + 866, 867, 461, 466, 465, 464, 59, 467, 470, 469, 472, 828, 475, 868, 478, 870, + 483, 485, 486, 871, 488, 489, 872, 873, 495, 497, 60, 498, 61, 61, 504, 505, + 507, 508, 511, 62, 513, 874, 515, 875, 518, 844, 520, 876, 877, 878, 63, 64, + 528, 880, 879, 881, 882, 530, 531, 531, 533, 66, 534, 67, 68, 884, 536, 538, + 541, 69, 885, 549, 886, 887, 556, 559, 70, 561, 562, 563, 888, 889, 889, 567, + 71, 890, 570, 571, 72, 891, 577, 73, 581, 579, 582, 893, 587, 74, 590, 592, + 596, 75, 895, 896, 76, 897, 600, 898, 602, 605, 607, 899, 900, 609, 901, 611, + 853, 77, 615, 616, 79, 617, 252, 902, 903, 854, 855, 621, 622, 731, 80, 627, + 626, 628, 164, 629, 630, 631, 633, 904, 632, 634, 639, 640, 635, 641, 646, 651, + 638, 643, 644, 645, 905, 907, 906, 81, 653, 654, 656, 911, 657, 908, 82, 83, + 909, 910, 84, 664, 665, 666, 667, 669, 668, 671, 670, 674, 672, 673, 675, 85, + 677, 678, 86, 681, 682, 912, 685, 686, 87, 689, 36, 913, 914, 88, 89, 696, + 702, 709, 711, 915, 712, 713, 718, 719, 917, 831, 721, 720, 723, 832, 725, 728, + 918, 919, 739, 742, 744, 920, 745, 753, 756, 757, 755, 760, 761, 921, 762, 90, + 764, 922, 91, 775, 279, 780, 923, 925, 92, 93, 785, 926, 94, 927, 787, 787, + 789, 928, 792, 95, 796, 797, 798, 800, 96, 929, 802, 804, 806, 97, 98, 807, + 930, 99, 931, 932, 933, 814, 100, 816, 817, 818, 819, 820, 821, 935, 0, 0, +}; +static const int16_t _hb_ucd_i16[92]= +{ + 0, 0, 1, -1, 2, 0, -2, 0, 0, 2, 0, -2, 0, 16, 0, -16, + 0, 1, -1, 0, 3, 3, 3, -3, -3, -3, 0, 2016, 0, 2527, 1923, 1914, + 1918, 0, 2250, 0, 0, 138, 0, 7, -7, 0, -1, 1, 1824, 0, 2104, 0, + 2108, 2106, 0, 2106, 1316, 0, -1, -138, 8, 8, 8, 0, 7, 7, -8, -8, + -8, -7,-1316, 1, -1, 3, -3, 1, 0,-1914,-1918, 0, 0,-1923,-1824, 0, + 0,-2016,-2104, 0, 0,-2106,-2108,-2106,-2250, 0,-2527, 0, +}; + +static inline uint8_t _hb_ucd_gc (unsigned u) +{ + return u<1114112 ? _hb_ucd_u8[5296u+((_hb_ucd_u8[1168u+((_hb_ucd_u16[((_hb_ucd_u8[544u+((_hb_ucd_u8[((((((((u)>>1))>>3))>>3))>>4)])<<4)+((((((((u)>>1))>>3))>>3))&15)])<<3)+((((((u)>>1))>>3))&7)])<<3)+((((u)>>1))&7)])<<1)+((u)&1)] : 2; +} +static inline uint8_t _hb_ucd_ccc (unsigned u) +{ + return u<125259 ? _hb_ucd_u8[7322u+((_hb_ucd_u8[6738u+((_hb_ucd_u8[6258u+((_hb_ucd_u8[5890u+((_hb_ucd_u8[5644u+((((((((u)>>2))>>2))>>2))>>3)])<<3)+((((((((u)>>2))>>2))>>2))&7)])<<2)+((((((u)>>2))>>2))&3)])<<2)+((((u)>>2))&3)])<<2)+((u)&3)] : 0; +} +static inline uint8_t _hb_ucd_b4 (const uint8_t* a, unsigned i) +{ + return (a[i>>1]>>((i&1)<<2))&15; +} +static inline int16_t _hb_ucd_bmg (unsigned u) +{ + return u<65380 ? _hb_ucd_i16[((_hb_ucd_u8[8218u+((_hb_ucd_u8[7986u+((_hb_ucd_u8[7890u+((_hb_ucd_b4(_hb_ucd_u8+7826u,((((((((u)>>1))>>2))>>3))>>3)))<<3)+((((((((u)>>1))>>2))>>3))&7)])<<3)+((((((u)>>1))>>2))&7)])<<2)+((((u)>>1))&3)])<<1)+((u)&1)] : 0; +} +static inline uint8_t _hb_ucd_sc (unsigned u) +{ + return u<918016 ? _hb_ucd_u8[11655u+((_hb_ucd_u8[10647u+((_hb_ucd_u8[9151u+((_hb_ucd_u8[8703u+((_hb_ucd_u8[8495u+((_hb_ucd_b4(_hb_ucd_u8+8466u,((((((((((u)>>2))>>2))>>3))>>3))>>4)))<<4)+((((((((((u)>>2))>>2))>>3))>>3))&15)])<<3)+((((((((u)>>2))>>2))>>3))&7)])<<3)+((((((u)>>2))>>2))&7)])<<2)+((((u)>>2))&3)])<<2)+((u)&3)] : 2; +} +static inline uint16_t _hb_ucd_dm (unsigned u) +{ + return u<195102 ? _hb_ucd_u16[1680u+((_hb_ucd_u8[13041u+((_hb_ucd_u8[12659u+((((u)>>4))>>5)])<<5)+((((u)>>4))&31)])<<4)+((u)&15)] : 0; +} + + +#endif #endif /* HB_UCD_TABLE_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-unicode-emoji-table.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-unicode-emoji-table.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-unicode-emoji-table.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-unicode-emoji-table.hh 2026-04-17 19:08:13.000000000 +0000 @@ -7,13 +7,13 @@ * on file with this header: * * # emoji-data.txt - * # Date: 2024-05-01, 21:25:24 GMT - * # © 2024 Unicode®, Inc. + * # Date: 2025-07-25, 17:54:31 GMT + * # © 2025 Unicode®, Inc. * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. * # For terms of use and license, see https://www.unicode.org/terms_of_use.html * # * # Emoji Data for UTS #51 - * # Used with Emoji Version 16.0 and subsequent minor revisions (if any) + * # Version: 17.0 * # * # For documentation and usage, see https://www.unicode.org/reports/tr51 */ @@ -23,54 +23,62 @@ #include "hb-unicode.hh" -static const uint8_t -_hb_emoji_u8[464] = +#include <stdint.h> + +static const uint8_t _hb_emoji_u8[624]= { 16, 17, 17, 17, 50, 20, 21, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,118,152, - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 3, 4, 0, 0, 5, 6, 0, 7, 0, 8, 9, 10, 11, 12, - 0, 0, 13, 0, 0, 0, 14, 0, 15, 0, 0, 0, 0, 16, 0, 0, - 17, 17, 18, 19, 20, 17, 17, 21, 17, 17, 22, 17, 23, 17, 24, 25, - 26, 27, 28, 17, 17, 17, 0, 0, 17, 17, 17, 17, 17, 17, 17, 29, - 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 4, 0, 0, - 5, 6, 0, 0, 7, 8, 0, 0, 8, 0, 9, 10, 0, 0, 11, 0, - 0, 12, 13, 14, 15, 16, 16, 16, 17, 16, 16, 16, 18, 19, 20, 21, - 22, 23, 0, 0, 0, 24, 0, 0, 25, 0, 26, 0, 0, 27, 0, 0, - 28, 0, 0, 0, 16, 16, 16, 16, 29, 9, 0, 30, 31, 32, 16, 33, - 34, 35, 36, 16, 16, 16, 16, 37, 16, 38, 39, 16, 16, 16, 40, 0, - 0, 0, 0, 41, 0, 0, 42, 16, 43, 0, 44, 0, 45, 46, 16, 16, - 47, 48, 49, 16, 16, 16, 16, 38, 0, 0, 0, 0, 0, 66, 0, 0, - 0, 0, 0, 16, 0, 2, 0, 0, 4, 0, 0, 2, 0, 0,240, 3, - 0, 6, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0,128, 0, 0, - 0,254, 15, 7, 4, 0, 0, 0, 0, 12, 64, 0, 1, 0, 0, 0, - 0, 0, 0,120,191,255,247,255,255,255,255,255, 63, 0,255,255, - 63,255, 87, 32, 2, 1, 24, 0,144, 80,184, 0,248, 0, 0, 0, - 0, 0,224, 0, 2, 0, 1,128, 0, 0, 48, 0,224, 0, 0, 24, - 0, 0, 33, 0, 0, 0, 1, 32, 0, 0,128, 2, 0,224, 0, 0, - 0,240, 3,192, 0, 64,254, 7, 0,224,255,255, 63, 0, 0, 0, - 254,255, 0, 4, 0,128,252,247, 0,254,255,255,255,255,255, 7, - 255,255,255, 63,192,255,255,255,255,255, 0, 0, 0, 0,240,255, - 0, 0,224,255, 0,240, 0, 0, 0,255, 0,252, 0,255, 0, 0, - 0,192,255,255, 0,240,255,255,255,255,255,247,191,255,255,255, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 3, 0, 0, 4, 0, 5, 0, 0, 0, 0, 0, 6, 0, 0, 7, + 0, 0, 0, 8, 0, 0, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, + 23, 0, 24, 25, 0, 26, 27, 28, 29, 30, 31, 31, 32, 31, 33, 34, + 31, 31, 31, 35, 36, 37, 38, 39, 31, 40, 31, 41, 0, 0, 0, 42, + 43, 44, 45, 46, 47, 48, 31, 31, 0, 49, 31, 31, 0, 0, 0, 0, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 36, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 2, 0, 0,240, 3, 0, 6, 0, 0, + 0, 0, 0, 12, 0, 1, 0, 0, 0,128, 0, 0, 0,254, 15, 7, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 64, 0, + 1, 0, 0, 0, 0, 0, 0,120, 31, 64, 50, 33, 77,196, 0, 7, + 5,255, 15,128,105, 1, 0,200, 0, 0,252, 26,131, 12, 3, 96, + 48,193, 26, 0, 0, 6,191, 39, 36,191, 84, 32, 2, 1, 24, 0, + 144, 80,184, 0, 24, 0, 0, 0, 0, 0,224, 0, 2, 0, 1,128, + 0, 0, 0, 0, 0, 0, 48, 0,224, 0, 0, 24, 0, 0, 0, 0, + 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32, + 0, 0,128, 2, 0, 0, 0, 0, 16, 0, 0, 0, 0,240, 0, 0, + 0, 0,240,255, 0,128, 1, 0, 1,128, 1, 0, 0, 0,192,255, + 0, 0, 0, 0, 0, 0, 3,192, 0, 64,254, 7, 0,192,255,255, + 255,255,255,255, 63, 0, 0, 0,254,255, 0, 4, 0,128,252,247, + 0,254,255,255,192,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,243,255,255,255,255,255,207,206,255,255,255,255, + 255,255,255,255,255,255,185, 7,255,255,255,255,255,255,255,191, + 255,255,255,255,255,255,255, 63, 0,126,255,255,255,128,249, 7, + 128, 60, 97, 0, 48, 1, 6, 16, 28, 0, 14,112, 10,129, 8,252, + 255,255, 0, 0, 0, 0, 0, 0, 63,248,231,255, 63,250,249,255, + 0, 0, 0,252,255,255,255,255, 0,240, 0, 0, 0, 0, 0, 0, + 0,255, 0,252, 0, 0, 0, 0, 0,255, 0, 0, 0,192, 0,240, + 252,255, 0,254,255,255,255,255, 0,240,255,255,255,255,255,247, + 191,255,255,255,255,255,255,255, 0, 0, 0,255, 0,192,255,255, }; -static inline unsigned -_hb_emoji_b4 (const uint8_t* a, unsigned i) +static inline uint8_t _hb_emoji_b4 (const uint8_t* a, unsigned i) { - return (a[i>>1]>>((i&1u)<<2))&15u; + return (a[i>>1]>>((i&1)<<2))&15; } -static inline unsigned -_hb_emoji_b1 (const uint8_t* a, unsigned i) +static inline uint8_t _hb_emoji_b1 (const uint8_t* a, unsigned i) { - return (a[i>>3]>>((i&7u)<<0))&1u; + return (a[i>>3]>>((i&7)<<0))&1; } -static inline uint_fast8_t -_hb_emoji_is_Extended_Pictographic (unsigned u) +static inline uint8_t _hb_emoji_is_Extended_Pictographic (unsigned u) { - return u<131070u?_hb_emoji_b1(264+_hb_emoji_u8,((_hb_emoji_u8[144+(((_hb_emoji_u8[64+(((_hb_emoji_b4(_hb_emoji_u8,u>>5>>2>>3))<<3)+((u>>5>>2)&7u))])<<2)+((u>>5)&3u))])<<5)+((u)&31u)):0; + return u<131070 ? _hb_emoji_b1(_hb_emoji_u8+224u,((_hb_emoji_u8[64u+((_hb_emoji_b4(_hb_emoji_u8,((((u)>>6))>>4)))<<4)+((((u)>>6))&15)])<<6)+((u)&63)) : 0; } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-unicode.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-unicode.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-unicode.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-unicode.hh 2026-04-17 19:08:13.000000000 +0000 @@ -241,6 +241,57 @@ } } + static hb_codepoint_t + vertical_char_for (hb_codepoint_t u) + { + switch (u >> 8) + { + case 0x20: switch (u) { + case 0x2013u: return 0xfe32u; // EN DASH + case 0x2014u: return 0xfe31u; // EM DASH + case 0x2025u: return 0xfe30u; // TWO DOT LEADER + case 0x2026u: return 0xfe19u; // HORIZONTAL ELLIPSIS + } break; + case 0x30: switch (u) { + case 0x3001u: return 0xfe11u; // IDEOGRAPHIC COMMA + case 0x3002u: return 0xfe12u; // IDEOGRAPHIC FULL STOP + case 0x3008u: return 0xfe3fu; // LEFT ANGLE BRACKET + case 0x3009u: return 0xfe40u; // RIGHT ANGLE BRACKET + case 0x300au: return 0xfe3du; // LEFT DOUBLE ANGLE BRACKET + case 0x300bu: return 0xfe3eu; // RIGHT DOUBLE ANGLE BRACKET + case 0x300cu: return 0xfe41u; // LEFT CORNER BRACKET + case 0x300du: return 0xfe42u; // RIGHT CORNER BRACKET + case 0x300eu: return 0xfe43u; // LEFT WHITE CORNER BRACKET + case 0x300fu: return 0xfe44u; // RIGHT WHITE CORNER BRACKET + case 0x3010u: return 0xfe3bu; // LEFT BLACK LENTICULAR BRACKET + case 0x3011u: return 0xfe3cu; // RIGHT BLACK LENTICULAR BRACKET + case 0x3014u: return 0xfe39u; // LEFT TORTOISE SHELL BRACKET + case 0x3015u: return 0xfe3au; // RIGHT TORTOISE SHELL BRACKET + case 0x3016u: return 0xfe17u; // LEFT WHITE LENTICULAR BRACKET + case 0x3017u: return 0xfe18u; // RIGHT WHITE LENTICULAR BRACKET + } break; + case 0xfe: switch (u) { + case 0xfe4fu: return 0xfe34u; // WAVY LOW LINE + } break; + case 0xff: switch (u) { + case 0xff01u: return 0xfe15u; // FULLWIDTH EXCLAMATION MARK + case 0xff08u: return 0xfe35u; // FULLWIDTH LEFT PARENTHESIS + case 0xff09u: return 0xfe36u; // FULLWIDTH RIGHT PARENTHESIS + case 0xff0cu: return 0xfe10u; // FULLWIDTH COMMA + case 0xff1au: return 0xfe13u; // FULLWIDTH COLON + case 0xff1bu: return 0xfe14u; // FULLWIDTH SEMICOLON + case 0xff1fu: return 0xfe16u; // FULLWIDTH QUESTION MARK + case 0xff3bu: return 0xfe47u; // FULLWIDTH LEFT SQUARE BRACKET + case 0xff3du: return 0xfe48u; // FULLWIDTH RIGHT SQUARE BRACKET + case 0xff3fu: return 0xfe33u; // FULLWIDTH LOW LINE + case 0xff5bu: return 0xfe37u; // FULLWIDTH LEFT CURLY BRACKET + case 0xff5du: return 0xfe38u; // FULLWIDTH RIGHT CURLY BRACKET + } break; + } + + return u; + } + struct { #define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_func_t name; HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-utf.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-utf.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-utf.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-utf.hh 2026-04-17 19:08:13.000000000 +0000 @@ -37,7 +37,7 @@ typedef uint8_t codepoint_t; static constexpr unsigned max_len = 4; - static const codepoint_t * + static inline const codepoint_t * next (const codepoint_t *text, const codepoint_t *end, hb_codepoint_t *unicode, @@ -106,7 +106,7 @@ return text; } - static const codepoint_t * + static inline const codepoint_t * prev (const codepoint_t *text, const codepoint_t *start, hb_codepoint_t *unicode, @@ -185,7 +185,7 @@ typedef TCodepoint codepoint_t; static constexpr unsigned max_len = 2; - static const codepoint_t * + static inline const codepoint_t * next (const codepoint_t *text, const codepoint_t *end, hb_codepoint_t *unicode, @@ -217,7 +217,7 @@ return text; } - static const codepoint_t * + static inline const codepoint_t * prev (const codepoint_t *text, const codepoint_t *start, hb_codepoint_t *unicode, @@ -294,7 +294,7 @@ typedef TCodepoint codepoint_t; static constexpr unsigned max_len = 1; - static const TCodepoint * + static inline const TCodepoint * next (const TCodepoint *text, const TCodepoint *end HB_UNUSED, hb_codepoint_t *unicode, @@ -306,7 +306,7 @@ return text; } - static const TCodepoint * + static inline const TCodepoint * prev (const TCodepoint *text, const TCodepoint *start HB_UNUSED, hb_codepoint_t *unicode, @@ -353,7 +353,7 @@ typedef uint8_t codepoint_t; static constexpr unsigned max_len = 1; - static const codepoint_t * + static inline const codepoint_t * next (const codepoint_t *text, const codepoint_t *end HB_UNUSED, hb_codepoint_t *unicode, @@ -363,7 +363,7 @@ return text; } - static const codepoint_t * + static inline const codepoint_t * prev (const codepoint_t *text, const codepoint_t *start HB_UNUSED, hb_codepoint_t *unicode, @@ -405,7 +405,7 @@ typedef uint8_t codepoint_t; static constexpr unsigned max_len = 1; - static const codepoint_t * + static inline const codepoint_t * next (const codepoint_t *text, const codepoint_t *end HB_UNUSED, hb_codepoint_t *unicode, @@ -417,7 +417,7 @@ return text; } - static const codepoint_t * + static inline const codepoint_t * prev (const codepoint_t *text, const codepoint_t *start HB_UNUSED, hb_codepoint_t *unicode, diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-vector.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-vector.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-vector.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-vector.hh 2026-04-17 19:08:13.000000000 +0000 @@ -32,6 +32,12 @@ #include "hb-meta.hh" #include "hb-null.hh" +// Change to 1 to force inline vector allocs, to see callsite in malloc-stats tool. +#if 0 +#define HB_ALWAYS_INLINE_VECTOR_ALLOCS HB_ALWAYS_INLINE +#else +#define HB_ALWAYS_INLINE_VECTOR_ALLOCS +#endif template <typename Type, bool sorted=false> @@ -45,6 +51,7 @@ using c_array_t = typename std::conditional<sorted, hb_sorted_array_t<const Type>, hb_array_t<const Type>>::type; hb_vector_t () = default; + HB_ALWAYS_INLINE_VECTOR_ALLOCS hb_vector_t (std::initializer_list<Type> lst) : hb_vector_t () { alloc (lst.size (), true); @@ -57,18 +64,21 @@ { extend (o); } + HB_ALWAYS_INLINE_VECTOR_ALLOCS hb_vector_t (const hb_vector_t &o) : hb_vector_t () { alloc_exact (o.length); if (unlikely (in_error ())) return; copy_array (o.as_array ()); } + HB_ALWAYS_INLINE_VECTOR_ALLOCS hb_vector_t (array_t o) : hb_vector_t () { alloc_exact (o.length); if (unlikely (in_error ())) return; copy_array (o); } + HB_ALWAYS_INLINE_VECTOR_ALLOCS hb_vector_t (c_array_t o) : hb_vector_t () { alloc_exact (o.length); @@ -84,8 +94,29 @@ } ~hb_vector_t () { fini (); } + template <unsigned n> + void + set_storage (Type (&array)[n]) + { set_storage (array, n); } + void + set_storage (hb_array_t<Type> array) + { set_storage (array.arrayZ, array.length); } + template <typename T = Type, + hb_enable_if (hb_is_trivially_constructible(T) && + hb_is_trivially_destructible(T))> + void + set_storage (Type *array, unsigned n) + { + assert (allocated == 0); + assert (length == 0); + + arrayZ = array; + length = n; + } + template <typename Iterable, hb_requires (hb_is_iterable (Iterable))> + HB_ALWAYS_INLINE_VECTOR_ALLOCS void extend (const Iterable &o) { auto iter = hb_iter (o); @@ -106,12 +137,14 @@ push_has_room (*iter++); } } + HB_ALWAYS_INLINE_VECTOR_ALLOCS void extend (array_t o) { alloc (length + o.length); if (unlikely (in_error ())) return; copy_array (o); } + HB_ALWAYS_INLINE_VECTOR_ALLOCS void extend (c_array_t o) { alloc (length + o.length); @@ -136,10 +169,7 @@ void fini () { - /* We allow a hack to make the vector point to a foreign array - * by the user. In that case length/arrayZ are non-zero but - * allocated is zero. Don't free anything. */ - if (allocated) + if (is_owned ()) { shrink_vector (0); hb_free (arrayZ); @@ -147,11 +177,13 @@ init (); } - void reset () + HB_ALWAYS_INLINE_VECTOR_ALLOCS + hb_vector_t &reset () { if (unlikely (in_error ())) reset_error (); resize (0); + return *this; } friend void swap (hb_vector_t& a, hb_vector_t& b) noexcept @@ -237,13 +269,16 @@ Type * operator + (unsigned int i) { return arrayZ + i; } const Type * operator + (unsigned int i) const { return arrayZ + i; } + HB_ALWAYS_INLINE_VECTOR_ALLOCS Type *push () { if (unlikely (!resize (length + 1))) return std::addressof (Crap (Type)); return std::addressof (arrayZ[length - 1]); } - template <typename... Args> Type *push (Args&&... args) + template <typename... Args> + HB_ALWAYS_INLINE_VECTOR_ALLOCS + Type *push (Args&&... args) { if (unlikely ((int) length >= allocated && !alloc (length + 1))) // If push failed to allocate then don't copy v, since this may cause @@ -253,13 +288,20 @@ return push_has_room (std::forward<Args> (args)...); } - template <typename... Args> Type *push_has_room (Args&&... args) + template <typename... Args> + HB_ALWAYS_INLINE_VECTOR_ALLOCS + Type *push_has_room (Args&&... args) { /* Emplace. */ Type *p = std::addressof (arrayZ[length++]); return new (p) Type (std::forward<Args> (args)...); } + bool is_owned () const + { + return allocated != 0 && allocated != -1; + } + bool in_error () const { return allocated < 0; } void set_error () { @@ -271,27 +313,40 @@ assert (allocated < 0); allocated = -(allocated + 1); } + void ensure_error () + { + if (!in_error ()) + set_error (); + } - template <typename T = Type, - hb_enable_if (hb_is_trivially_copy_assignable(T))> Type * - realloc_vector (unsigned new_allocated, hb_priority<0>) + _realloc (unsigned new_allocated) { if (!new_allocated) { - hb_free (arrayZ); + if (is_owned ()) + hb_free (arrayZ); return nullptr; } + if (!allocated && arrayZ) + { + /* If we have a non-null arrayZ but allocated is 0, then we are + * reallocating from a foreign array. */ + Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); + if (unlikely (!new_array)) + return nullptr; + hb_memcpy ((void *) new_array, (const void *) arrayZ, length * sizeof (Type)); + return new_array; + } return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); } - template <typename T = Type, - hb_enable_if (!hb_is_trivially_copy_assignable(T))> Type * - realloc_vector (unsigned new_allocated, hb_priority<0>) + _malloc_move (unsigned new_allocated) { if (!new_allocated) { - hb_free (arrayZ); + if (is_owned ()) + hb_free (arrayZ); return nullptr; } Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); @@ -303,22 +358,33 @@ new_array[i] = std::move (arrayZ[i]); arrayZ[i].~Type (); } - hb_free (arrayZ); + if (is_owned ()) + hb_free (arrayZ); } return new_array; } + + template <typename T = Type, + hb_enable_if (hb_is_trivially_copy_assignable(T))> + Type * + realloc_vector (unsigned new_allocated, hb_priority<0>) + { + return _realloc (new_allocated); + } + template <typename T = Type, + hb_enable_if (!hb_is_trivially_copy_assignable(T))> + Type * + realloc_vector (unsigned new_allocated, hb_priority<0>) + { + return _malloc_move (new_allocated); + } /* Specialization for types that can be moved using realloc(). */ template <typename T = Type, hb_enable_if (T::realloc_move)> Type * realloc_vector (unsigned new_allocated, hb_priority<1>) { - if (!new_allocated) - { - hb_free (arrayZ); - return nullptr; - } - return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); + return _realloc (new_allocated); } template <typename T = Type, @@ -353,7 +419,6 @@ void copy_array (hb_array_t<Type> other) { - assert ((int) (length + other.length) <= allocated); hb_memcpy ((void *) (arrayZ + length), (const void *) other.arrayZ, other.length * item_size); length += other.length; } @@ -362,7 +427,6 @@ void copy_array (hb_array_t<const Type> other) { - assert ((int) (length + other.length) <= allocated); hb_memcpy ((void *) (arrayZ + length), (const void *) other.arrayZ, other.length * item_size); length += other.length; } @@ -372,7 +436,6 @@ void copy_array (hb_array_t<const Type> other) { - assert ((int) (length + other.length) <= allocated); for (unsigned i = 0; i < other.length; i++) new (std::addressof (arrayZ[length + i])) Type (other.arrayZ[i]); length += other.length; @@ -385,7 +448,6 @@ void copy_array (hb_array_t<const Type> other) { - assert ((int) (length + other.length) <= allocated); for (unsigned i = 0; i < other.length; i++) { new (std::addressof (arrayZ[length + i])) Type (); @@ -398,12 +460,12 @@ shrink_vector (unsigned size) { assert (size <= length); - if (!std::is_trivially_destructible<Type>::value) + if (!hb_is_trivially_destructible(Type)) { unsigned count = length - size; - Type *p = arrayZ + length - 1; + Type *p = arrayZ + length; while (count--) - p--->~Type (); + (--p)->~Type (); } length = size; } @@ -416,6 +478,7 @@ } /* Allocate for size but don't adjust length. */ + HB_ALWAYS_INLINE_VECTOR_ALLOCS bool alloc (unsigned int size, bool exact=false) { if (unlikely (in_error ())) @@ -471,17 +534,64 @@ return true; } + HB_ALWAYS_INLINE_VECTOR_ALLOCS bool alloc_exact (unsigned int size) { return alloc (size, true); } + HB_ALWAYS_INLINE_VECTOR_ALLOCS void clear () { resize (0); } - bool resize (int size_, bool initialize = true, bool exact = false) + template <typename allocator_t> + HB_ALWAYS_INLINE_VECTOR_ALLOCS + bool allocate_from_pool (allocator_t *allocator, unsigned size, unsigned int initialize = true) + { + if (allocator) + { + assert (!length && !allocated); + arrayZ = (Type *) allocator->alloc (size * sizeof (Type), alignof (Type)); + if (unlikely (!arrayZ)) + { + set_error (); + return false; + } + if (initialize) + grow_vector (size, hb_prioritize); + else + length = size; + return true; + } + return resize_full ((int) size, initialize, true); + } + + template <typename allocator_t> + HB_ALWAYS_INLINE_VECTOR_ALLOCS + bool duplicate_vector_from_pool (allocator_t *allocator, const hb_vector_t &other) + { + if (unlikely (!allocate_from_pool (allocator, other.length, false))) + return false; + length = 0; + copy_array (other.as_array ()); + return true; + } + + template <typename allocator_t> + void shrink_back_to_pool (allocator_t *allocator, int size) + { + unsigned orig_length = length; + + shrink (size, false); + + if (allocator && !is_owned ()) + allocator->discard (arrayZ + length, (orig_length - length) * sizeof (Type)); + } + + HB_ALWAYS_INLINE_VECTOR_ALLOCS + bool resize_full (int size_, bool initialize, bool exact) { unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; if (!alloc (size, exact)) @@ -501,9 +611,20 @@ length = size; return true; } - bool resize_exact (int size_, bool initialize = true) + HB_ALWAYS_INLINE_VECTOR_ALLOCS + bool resize (int size_) + { + return resize_full (size_, true, false); + } + HB_ALWAYS_INLINE_VECTOR_ALLOCS + bool resize_dirty (int size_) + { + return resize_full (size_, false, false); + } + HB_ALWAYS_INLINE_VECTOR_ALLOCS + bool resize_exact (int size_) { - return resize (size_, initialize, true); + return resize_full (size_, true, true); } Type pop () @@ -544,7 +665,7 @@ shrink_vector (size); - if (shrink_memory) + if (is_owned () && shrink_memory) alloc_exact (size); /* To force shrinking memory if needed. */ } diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-version.h openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-version.h --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb-version.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb-version.h 2026-04-17 19:08:13.000000000 +0000 @@ -41,26 +41,26 @@ * * The major component of the library version available at compile-time. */ -#define HB_VERSION_MAJOR 11 +#define HB_VERSION_MAJOR 12 /** * HB_VERSION_MINOR: * * The minor component of the library version available at compile-time. */ -#define HB_VERSION_MINOR 2 +#define HB_VERSION_MINOR 3 /** * HB_VERSION_MICRO: * * The micro component of the library version available at compile-time. */ -#define HB_VERSION_MICRO 0 +#define HB_VERSION_MICRO 2 /** * HB_VERSION_STRING: * * A string literal containing the library version available at compile-time. */ -#define HB_VERSION_STRING "11.2.0" +#define HB_VERSION_STRING "12.3.2" /** * HB_VERSION_ATLEAST: diff -Nru openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb.hh openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb.hh --- openjdk-25-25.0.2+10/src/java.desktop/share/native/libharfbuzz/hb.hh 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/share/native/libharfbuzz/hb.hh 2026-04-17 19:08:13.000000000 +0000 @@ -89,7 +89,6 @@ #pragma GCC diagnostic error "-Wstring-conversion" #pragma GCC diagnostic error "-Wswitch-enum" #pragma GCC diagnostic error "-Wtautological-overlap-compare" -#pragma GCC diagnostic error "-Wuninitialized" #pragma GCC diagnostic error "-Wunneeded-internal-declaration" #pragma GCC diagnostic error "-Wunused" #pragma GCC diagnostic error "-Wunused-local-typedefs" @@ -110,11 +109,21 @@ #pragma GCC diagnostic warning "-Wformat-signedness" #pragma GCC diagnostic warning "-Wignored-pragma-optimize" #pragma GCC diagnostic warning "-Wlogical-op" -#pragma GCC diagnostic warning "-Wmaybe-uninitialized" #pragma GCC diagnostic warning "-Wmissing-format-attribute" +#pragma GCC diagnostic warning "-Wpessimizing-move" #pragma GCC diagnostic warning "-Wundef" #pragma GCC diagnostic warning "-Wunsafe-loop-optimizations" #pragma GCC diagnostic warning "-Wunused-but-set-variable" +#ifdef __clang__ +// The following are too buggy on gcc +// https://github.com/harfbuzz/harfbuzz/issues/5589 +// https://github.com/harfbuzz/harfbuzz/pull/5367 +#pragma GCC diagnostic warning "-Wmaybe-uninitialized" +#pragma GCC diagnostic warning "-Wuninitialized" +#else +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#pragma GCC diagnostic ignored "-Wuninitialized" +#endif #endif /* Ignored currently, but should be fixed at some point. */ @@ -136,6 +145,7 @@ #pragma GCC diagnostic ignored "-Wformat-nonliteral" #pragma GCC diagnostic ignored "-Wformat-zero-length" #pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wpacked" // Erratic impl in clang #pragma GCC diagnostic ignored "-Wrange-loop-analysis" // https://github.com/harfbuzz/harfbuzz/issues/2834 #pragma GCC diagnostic ignored "-Wstrict-aliasing" @@ -239,6 +249,8 @@ // clang defines it so no need. #ifdef __has_builtin #define hb_has_builtin __has_builtin +#elif defined(_MSC_VER) +#define hb_has_builtin(x) 0 #else #define hb_has_builtin(x) ((defined(__GNUC__) && __GNUC__ >= 5)) #endif @@ -314,6 +326,10 @@ #endif #endif +#ifndef HB_HOT +#define HB_HOT __attribute__((hot)) +#endif + /* * Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411 * HB_FALLTHROUGH is an annotation to suppress compiler warnings about switch @@ -553,4 +569,13 @@ #include "hb-vector.hh" // Requires: hb-array hb-null #include "hb-object.hh" // Requires: hb-atomic hb-mutex hb-vector + +/* Our src/test-*.cc use hb_assert(), such that it's not compiled out under NDEBUG. + * https://github.com/harfbuzz/harfbuzz/issues/5418 */ +#define hb_always_assert(x) \ + HB_STMT_START { \ + if (!(x)) { fprintf(stderr, "Assertion failed: %s, at %s:%d\n", #x, __FILE__, __LINE__); abort(); } \ + } HB_STMT_END + + #endif /* HB_HH */ diff -Nru openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java --- openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java 2026-04-17 19:08:13.000000000 +0000 @@ -138,8 +138,6 @@ import sun.awt.X11GraphicsEnvironment; import sun.awt.XSettings; import sun.awt.datatransfer.DataTransferer; -import sun.awt.screencast.ScreencastHelper; -import sun.awt.screencast.XdgDesktopPortal; import sun.awt.util.PerformanceLogger; import sun.awt.util.ThreadGroupUtils; import sun.font.FontConfigManager; @@ -1523,21 +1521,16 @@ awtLock(); try { if (numberOfButtons == 0) { - if (XdgDesktopPortal.isRemoteDesktop() - && ScreencastHelper.isAvailable()) { + numberOfButtons = getNumberOfButtonsImpl(); + numberOfButtons = (numberOfButtons > MAX_BUTTONS_SUPPORTED) ? MAX_BUTTONS_SUPPORTED : numberOfButtons; + //4th and 5th buttons are for wheel and shouldn't be reported as buttons. + //If we have more than 3 physical buttons and a wheel, we report N-2 buttons. + //If we have 3 physical buttons and a wheel, we report 3 buttons. + //If we have 1,2,3 physical buttons, we report it as is i.e. 1,2 or 3 respectively. + if (numberOfButtons >= 5) { + numberOfButtons -= 2; + } else if (numberOfButtons == 4 || numberOfButtons == 5) { numberOfButtons = 3; - } else { - numberOfButtons = getNumberOfButtonsImpl(); - numberOfButtons = (numberOfButtons > MAX_BUTTONS_SUPPORTED) ? MAX_BUTTONS_SUPPORTED : numberOfButtons; - //4th and 5th buttons are for wheel and shouldn't be reported as buttons. - //If we have more than 3 physical buttons and a wheel, we report N-2 buttons. - //If we have 3 physical buttons and a wheel, we report 3 buttons. - //If we have 1,2,3 physical buttons, we report it as is i.e. 1,2 or 3 respectively. - if (numberOfButtons >= 5) { - numberOfButtons -= 2; - } else if (numberOfButtons == 4 || numberOfButtons == 5) { - numberOfButtons = 3; - } } } //Assume don't have to re-query the number again and again. diff -Nru openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java --- openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java 2026-04-17 19:08:13.000000000 +0000 @@ -1098,9 +1098,11 @@ suppressWmTakeFocus(true); } } - updateFocusability(); - promoteDefaultPosition(); boolean refreshChildsTransientFor = isVisible() != vis; + if (refreshChildsTransientFor) { + updateFocusability(); + } + promoteDefaultPosition(); super.setVisible(vis); if (refreshChildsTransientFor) { for (Window child : ((Window) target).getOwnedWindows()) { diff -Nru openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java --- openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java 2026-04-17 19:08:13.000000000 +0000 @@ -63,9 +63,11 @@ private static final int DELAY_BEFORE_SESSION_CLOSE = 2000; private static volatile TimerTask timerTask = null; - private static final Timer timerCloseSession - = new Timer("auto-close screencast session", true); + private static class TimerHolder { + private static final Timer timerCloseSession = + new Timer("auto-close screencast session", true); + } private ScreencastHelper() {} @@ -143,7 +145,7 @@ } }; - timerCloseSession.schedule(timerTask, DELAY_BEFORE_SESSION_CLOSE); + TimerHolder.timerCloseSession.schedule(timerTask, DELAY_BEFORE_SESSION_CLOSE); } public static synchronized void getRGBPixels( diff -Nru openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java --- openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java 2026-04-17 19:08:13.000000000 +0000 @@ -238,6 +238,7 @@ } private static WatchService watchService; + private static volatile boolean isWatcherThreadStarted = false; private static void setupWatch() { try { @@ -257,10 +258,6 @@ "file watch %s\n", e); } } - - if (watchService != null) { - new WatcherThread(watchService).start(); - } } // called from native @@ -337,7 +334,27 @@ return true; } + private static void startWatcherThreadIfNeeded() { + if (!isWatcherThreadStarted) { + // not sure if the double-checked locking is actually needed here + // the getTokens is only called from ScreencastHelper#getRGBPixels + // and ScreencastHelper#remoteDesktop* methods (which are synchronized), + // but it may change later. + synchronized (TokenStorage.class) { + if (!isWatcherThreadStarted) { + readTokens(PROPS_PATH); + if (watchService != null) { + new WatcherThread(watchService).start(); + } + isWatcherThreadStarted = true; + } + } + } + } + static Set<TokenItem> getTokens(List<Rectangle> affectedScreenBounds) { + startWatcherThreadIfNeeded(); + // We need an ordered set to store tokens // with exact matches at the beginning. LinkedHashSet<TokenItem> result = new LinkedHashSet<>(); diff -Nru openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c openjdk-25-25.0.3+9/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c --- openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c 2026-04-17 19:08:13.000000000 +0000 @@ -42,7 +42,6 @@ #include "debug_assert.h" static void *gtk3_libhandle = NULL; -static void *gthread_libhandle = NULL; static void transform_detail_string (const gchar *detail, GtkStyleContext *context); @@ -79,15 +78,6 @@ return result; } -static void* dl_symbol_gthread(const char* name) -{ - void* result = dlsym(gthread_libhandle, name); - if (!result) - longjmp(j, NO_SYMBOL_EXCEPTION); - - return result; -} - gboolean gtk3_check(const char* lib_name, gboolean load) { if (gtk3_libhandle != NULL) { @@ -264,13 +254,6 @@ return FALSE; } - gthread_libhandle = dlopen(GTHREAD_LIB_VERSIONED, RTLD_LAZY | RTLD_LOCAL); - if (gthread_libhandle == NULL) { - gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL); - if (gthread_libhandle == NULL) - return FALSE; - } - if (setjmp(j) == 0) { fp_gtk_check_version = dl_symbol("gtk_check_version"); @@ -637,9 +620,6 @@ dlclose(gtk3_libhandle); gtk3_libhandle = NULL; - dlclose(gthread_libhandle); - gthread_libhandle = NULL; - return NULL; } @@ -738,7 +718,6 @@ dlerror(); dlclose(gtk3_libhandle); - dlclose(gthread_libhandle); if ((gtk3_error = dlerror()) != NULL) { return FALSE; diff -Nru openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.h openjdk-25-25.0.3+9/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.h --- openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.h 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.desktop/unix/native/libawt_xawt/awt/gtk_interface.h 2026-04-17 19:08:13.000000000 +0000 @@ -38,9 +38,6 @@ #define TRUE (!FALSE) #endif -#define GTHREAD_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gthread-2.0", "0") -#define GTHREAD_LIB JNI_LIB_NAME("gthread-2.0") - #define _G_TYPE_CIC(ip, gt, ct) ((ct*) ip) #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) \ (_G_TYPE_CIC ((instance), (g_type), c_type)) @@ -850,9 +847,6 @@ gboolean gtk_load(JNIEnv *env, GtkVersion version, gboolean verbose); gboolean gtk_check_version(GtkVersion version); -typedef struct _GThreadFunctions GThreadFunctions; -static gboolean (*fp_g_thread_get_initialized)(void); -static void (*fp_g_thread_init)(GThreadFunctions *vtable); static void (*fp_gdk_threads_init)(void); static void (*fp_gdk_threads_enter)(void); static void (*fp_gdk_threads_leave)(void); diff -Nru openjdk-25-25.0.2+10/src/java.management/share/classes/sun/management/ThreadImpl.java openjdk-25-25.0.3+9/src/java.management/share/classes/sun/management/ThreadImpl.java --- openjdk-25-25.0.2+10/src/java.management/share/classes/sun/management/ThreadImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.management/share/classes/sun/management/ThreadImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -308,7 +308,7 @@ long id = ids[0]; Thread thread = Thread.currentThread(); if (id == thread.threadId()) { - times[0] = thread.isVirtual() ? -1L : getThreadTotalCpuTime0(0); + times[0] = thread.isVirtual() ? -1L : getThreadUserCpuTime0(0); } else { times[0] = getThreadUserCpuTime0(id); } diff -Nru openjdk-25-25.0.2+10/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java openjdk-25-25.0.3+9/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java --- openjdk-25-25.0.2+10/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.net.http/share/classes/jdk/internal/net/http/common/SSLFlowDelegate.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -273,7 +273,7 @@ final SequentialScheduler scheduler; volatile ByteBuffer readBuf; - volatile boolean completing; + boolean completing; final ReentrantLock readBufferLock = new ReentrantLock(); final Logger debugr = Utils.getDebugLogger(this::dbgString, Utils.DEBUG); @@ -301,6 +301,11 @@ return enterReadScheduling(); } + @Override + public boolean closing() { + return closeNotifyReceived(); + } + public final String dbgString() { return "SSL Reader(" + tubeName + ")"; } @@ -505,7 +510,7 @@ if (result.handshaking()) { handshaking = true; if (debugr.on()) debugr.log("handshaking"); - if (doHandshake(result, READER)) continue; // need unwrap + if (doHandshake(result.handshakeStatus(), READER)) continue; // need unwrap else break; // doHandshake will have triggered the write scheduler if necessary } else { if (trySetALPN()) { @@ -550,6 +555,7 @@ private volatile Status lastUnwrapStatus; EngineResult unwrapBuffer(ByteBuffer src) throws IOException { + assert readBufferLock.isHeldByCurrentThread(); ByteBuffer dst = getAppBuffer(); int len = src.remaining(); while (true) { @@ -573,6 +579,8 @@ break; case CLOSED: assert dst.position() == 0; + src.position(src.limit()); + completing = true; return doClosure(new EngineResult(sslResult)); case BUFFER_UNDERFLOW: // handled implicitly by compaction/reallocation of readBuf @@ -834,7 +842,7 @@ boolean handshaking = false; if (result.handshaking()) { if (debugw.on()) debugw.log("handshaking"); - doHandshake(result, WRITER); // ok to ignore return + doHandshake(result.handshakeStatus(), WRITER); // ok to ignore return handshaking = true; } else { if (trySetALPN()) { @@ -1090,14 +1098,14 @@ return (current & HANDSHAKING); }; - private boolean doHandshake(EngineResult r, int caller) { + private boolean doHandshake(HandshakeStatus handshakeStatus, int caller) { // unconditionally sets the HANDSHAKING bit, while preserving task bits handshakeState.getAndAccumulate(0, (current, unused) -> HANDSHAKING | (current & TASK_BITS)); if (stateList != null && debug.on()) { - stateList.add(r.handshakeStatus().toString()); + stateList.add(handshakeStatus.toString()); stateList.add(Integer.toString(caller)); } - switch (r.handshakeStatus()) { + switch (handshakeStatus) { case NEED_TASK: int s = handshakeState.accumulateAndGet(0, REQUEST_OR_DO_TASKS); if ((s & REQUESTING_TASKS) > 0) { // someone else is or will do tasks @@ -1125,7 +1133,7 @@ break; default: throw new InternalError("Unexpected handshake status:" - + r.handshakeStatus()); + + handshakeStatus); } return true; } @@ -1182,34 +1190,20 @@ return false; } - // FIXME: acknowledge a received CLOSE request from peer EngineResult doClosure(EngineResult r) throws IOException { if (debug.on()) debug.log("doClosure(%s): %s [isOutboundDone: %s, isInboundDone: %s]", r.result, engine.getHandshakeStatus(), engine.isOutboundDone(), engine.isInboundDone()); + if (debug.on()) debug.log("doClosure: close_notify received"); + close_notify_received = true; + engine.closeOutbound(); if (engine.getHandshakeStatus() == HandshakeStatus.NEED_WRAP) { // we have received TLS close_notify and need to send // an acknowledgement back. We're calling doHandshake // to finish the close handshake. - if (engine.isInboundDone() && !engine.isOutboundDone()) { - if (debug.on()) debug.log("doClosure: close_notify received"); - close_notify_received = true; - if (!writer.scheduler.isStopped()) { - doHandshake(r, READER); - } else { - // We have received closed notify, but we - // won't be able to send the acknowledgement. - // Nothing more will come from the socket either, - // so mark the reader as completed. - var readerLock = reader.readBufferLock; - readerLock.lock(); - try { - reader.completing = true; - } finally { - readerLock.unlock(); - } - } + if (!writer.scheduler.isStopped()) { + doHandshake(HandshakeStatus.NEED_WRAP, READER); } } return r; diff -Nru openjdk-25-25.0.2+10/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java openjdk-25-25.0.3+9/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java --- openjdk-25-25.0.2+10/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -459,7 +459,7 @@ } void checkCompletion() { - if (downstreamCompleted || !upstreamCompleted) { + if (downstreamCompleted || (!upstreamCompleted && !completionAcknowledged)) { return; } if (!outputQ.isEmpty()) { diff -Nru openjdk-25-25.0.2+10/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java openjdk-25-25.0.3+9/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java --- openjdk-25-25.0.2+10/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -118,14 +118,7 @@ private byte[] stringToKey(char[] secret, byte[] salt, byte[] params) throws GeneralSecurityException { - int iter_count = DEFAULT_ITERATION_COUNT; - if (params != null) { - if (params.length != 4) { - throw new RuntimeException("Invalid parameter to stringToKey"); - } - iter_count = readBigEndian(params, 0, 4); - } - + int iter_count = DkCrypto.iterationCount(params, DEFAULT_ITERATION_COUNT); byte[] tmpKey = randomToKey(PBKDF2(secret, salt, iter_count, getKeySeedLength())); byte[] result = dk(tmpKey, KERBEROS_CONSTANT); @@ -485,17 +478,4 @@ return result; } - - public static final int readBigEndian(byte[] data, int pos, int size) { - int retVal = 0; - int shifter = (size-1)*8; - while (size > 0) { - retVal += (data[pos] & 0xff) << shifter; - shifter -= 8; - pos++; - size--; - } - return retVal; - } - } diff -Nru openjdk-25-25.0.2+10/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java openjdk-25-25.0.3+9/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java --- openjdk-25-25.0.2+10/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/AesSha2DkCrypto.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,14 +122,7 @@ private byte[] stringToKey(char[] secret, byte[] salt, byte[] params) throws GeneralSecurityException { - int iter_count = DEFAULT_ITERATION_COUNT; - if (params != null) { - if (params.length != 4) { - throw new RuntimeException("Invalid parameter to stringToKey"); - } - iter_count = readBigEndian(params, 0, 4); - } - + int iter_count = DkCrypto.iterationCount(params, DEFAULT_ITERATION_COUNT); byte[] saltp = new byte[26 + 1 + salt.length]; if (keyLength == 128) { System.arraycopy(ETYPE_NAME_128, 0, saltp, 0, 26); @@ -525,17 +518,4 @@ return result; } - - public static final int readBigEndian(byte[] data, int pos, int size) { - int retVal = 0; - int shifter = (size-1)*8; - while (size > 0) { - retVal += (data[pos] & 0xff) << shifter; - shifter -= 8; - pos++; - size--; - } - return retVal; - } - } diff -Nru openjdk-25-25.0.2+10/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java openjdk-25-25.0.3+9/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java --- openjdk-25-25.0.2+10/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. */ /* @@ -31,8 +31,8 @@ package sun.security.krb5.internal.crypto.dk; import javax.crypto.Cipher; -import javax.crypto.Mac; import java.security.GeneralSecurityException; +import java.security.InvalidAlgorithmParameterException; import java.util.Arrays; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -692,4 +692,41 @@ bb.get(answer, 0, len); return answer; } + + static int iterationCount(byte[] params, int defaultValue) + throws InvalidAlgorithmParameterException { + if (params == null) { + return defaultValue; + } + if (params.length != 4) { + throw new InvalidAlgorithmParameterException("Invalid params"); + } + if (params[0] != 0 || ((params[1] & 0xff) >= 80)) { + // IC should be less than 80 * 2^16. This is roughly + // the same as PKCS12KeyStore's 5_000_000 limit. + throw new InvalidAlgorithmParameterException( + "Incoming iteration count is too big"); + } + int iter_count = readBigEndian(params, 0, 4); + if (!ALLOW_WEAK_PBKDF2_ITERATION_COUNT && iter_count < defaultValue) { + throw new InvalidAlgorithmParameterException( + "Incoming iteration count is too small"); + } + return iter_count; + } + + public static final int readBigEndian(byte[] data, int pos, int size) { + int retVal = 0; + int shifter = (size-1)*8; + while (size > 0) { + retVal += (data[pos] & 0xff) << shifter; + shifter -= 8; + pos++; + size--; + } + return retVal; + } + + // Only used by test + public static boolean ALLOW_WEAK_PBKDF2_ITERATION_COUNT = false; } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Const.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -26,12 +26,12 @@ * Constants for the project, mostly defined in the JVM specification. * * @since 6.0 (intended to replace the Constants interface) - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class Const { /** - * Java class file format Magic number (0xCAFEBABE) + * Java class file format Magic number: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-A"> The ClassFile Structure * in The Java Virtual Machine Specification</a> @@ -39,201 +39,201 @@ public static final int JVM_CLASSFILE_MAGIC = 0xCAFEBABE; /** - * Major version number of class files for Java 1.1. + * Major version number of class files for Java 1.1: {@value}. * * @see #MINOR_1_1 */ public static final short MAJOR_1_1 = 45; /** - * Minor version number of class files for Java 1.1. + * Minor version number of class files for Java 1.1: {@value}. * * @see #MAJOR_1_1 */ public static final short MINOR_1_1 = 3; /** - * Major version number of class files for Java 1.2. + * Major version number of class files for Java 1.2: {@value}. * * @see #MINOR_1_2 */ public static final short MAJOR_1_2 = 46; /** - * Minor version number of class files for Java 1.2. + * Minor version number of class files for Java 1.2: {@value}. * * @see #MAJOR_1_2 */ public static final short MINOR_1_2 = 0; /** - * Major version number of class files for Java 1.2. + * Major version number of class files for Java 1.2: {@value}. * * @see #MINOR_1_2 */ public static final short MAJOR_1_3 = 47; /** - * Minor version number of class files for Java 1.3. + * Minor version number of class files for Java 1.3: {@value}. * * @see #MAJOR_1_3 */ public static final short MINOR_1_3 = 0; /** - * Major version number of class files for Java 1.3. + * Major version number of class files for Java 1.3: {@value}. * * @see #MINOR_1_3 */ public static final short MAJOR_1_4 = 48; /** - * Minor version number of class files for Java 1.4. + * Minor version number of class files for Java 1.4: {@value}. * * @see #MAJOR_1_4 */ public static final short MINOR_1_4 = 0; /** - * Major version number of class files for Java 1.4. + * Major version number of class files for Java 1.4: {@value}. * * @see #MINOR_1_4 */ public static final short MAJOR_1_5 = 49; /** - * Minor version number of class files for Java 1.5. + * Minor version number of class files for Java 1.5: {@value}. * * @see #MAJOR_1_5 */ public static final short MINOR_1_5 = 0; /** - * Major version number of class files for Java 1.6. + * Major version number of class files for Java 1.6: {@value}. * * @see #MINOR_1_6 */ public static final short MAJOR_1_6 = 50; /** - * Minor version number of class files for Java 1.6. + * Minor version number of class files for Java 1.6: {@value}. * * @see #MAJOR_1_6 */ public static final short MINOR_1_6 = 0; /** - * Major version number of class files for Java 1.7. + * Major version number of class files for Java 1.7: {@value}. * * @see #MINOR_1_7 */ public static final short MAJOR_1_7 = 51; /** - * Minor version number of class files for Java 1.7. + * Minor version number of class files for Java 1.7: {@value}. * * @see #MAJOR_1_7 */ public static final short MINOR_1_7 = 0; /** - * Major version number of class files for Java 1.8. + * Major version number of class files for Java 1.8: {@value}. * * @see #MINOR_1_8 */ public static final short MAJOR_1_8 = 52; /** - * Minor version number of class files for Java 1.8. + * Minor version number of class files for Java 1.8: {@value}. * * @see #MAJOR_1_8 */ public static final short MINOR_1_8 = 0; /** - * Major version number of class files for Java 9. + * Major version number of class files for Java 9: {@value}. * * @see #MINOR_9 */ public static final short MAJOR_9 = 53; /** - * Minor version number of class files for Java 9. + * Minor version number of class files for Java 9: {@value}. * * @see #MAJOR_9 */ public static final short MINOR_9 = 0; /** - * @deprecated Use {@link #MAJOR_9} instead + * @deprecated Use {@link #MAJOR_9} ({@value}) instead. */ @Deprecated public static final short MAJOR_1_9 = MAJOR_9; /** - * @deprecated Use {@link #MINOR_9} instead + * @deprecated Use {@link #MINOR_9} ({@value}) instead. */ @Deprecated public static final short MINOR_1_9 = MINOR_9; /** - * Major version number of class files for Java 10. + * Major version number of class files for Java 10: {@value}. * * @see #MINOR_10 */ public static final short MAJOR_10 = 54; /** - * Minor version number of class files for Java 10. + * Minor version number of class files for Java 10: {@value}. * * @see #MAJOR_10 */ public static final short MINOR_10 = 0; /** - * Major version number of class files for Java 11. + * Major version number of class files for Java 11: {@value}. * * @see #MINOR_11 */ public static final short MAJOR_11 = 55; /** - * Minor version number of class files for Java 11. + * Minor version number of class files for Java 11: {@value}. * * @see #MAJOR_11 */ public static final short MINOR_11 = 0; /** - * Major version number of class files for Java 12. + * Major version number of class files for Java 12: {@value}. * * @see #MINOR_12 */ public static final short MAJOR_12 = 56; /** - * Minor version number of class files for Java 12. + * Minor version number of class files for Java 12: {@value}. * * @see #MAJOR_12 */ public static final short MINOR_12 = 0; /** - * Major version number of class files for Java 13. + * Major version number of class files for Java 13: {@value}. * * @see #MINOR_13 */ public static final short MAJOR_13 = 57; /** - * Minor version number of class files for Java 13. + * Minor version number of class files for Java 13: {@value}. * * @see #MAJOR_13 */ public static final short MINOR_13 = 0; /** - * Minor version number of class files for Java 14. + * Minor version number of class files for Java 14: {@value}. * * @see #MAJOR_14 * @since 6.4.0 @@ -241,7 +241,7 @@ public static final short MINOR_14 = 0; /** - * Minor version number of class files for Java 15. + * Minor version number of class files for Java 15: {@value}. * * @see #MAJOR_15 * @since 6.6.0 @@ -249,7 +249,7 @@ public static final short MINOR_15 = 0; /** - * Minor version number of class files for Java 16. + * Minor version number of class files for Java 16: {@value}. * * @see #MAJOR_16 * @since 6.6.0 @@ -257,7 +257,7 @@ public static final short MINOR_16 = 0; /** - * Minor version number of class files for Java 17. + * Minor version number of class files for Java 17: {@value}. * * @see #MAJOR_17 * @since 6.6.0 @@ -265,7 +265,7 @@ public static final short MINOR_17 = 0; /** - * Minor version number of class files for Java 18. + * Minor version number of class files for Java 18: {@value}. * * @see #MAJOR_18 * @since 6.6.0 @@ -273,7 +273,7 @@ public static final short MINOR_18 = 0; /** - * Minor version number of class files for Java 19. + * Minor version number of class files for Java 19: {@value}. * * @see #MAJOR_19 * @since 6.6.0 @@ -281,7 +281,47 @@ public static final short MINOR_19 = 0; /** - * Major version number of class files for Java 14. + * Minor version number of class files for Java 20: {@value}. + * + * @see #MAJOR_20 + * @since 6.8.0 + */ + public static final short MINOR_20 = 0; + + /** + * Minor version number of class files for Java 21: {@value}. + * + * @see #MAJOR_21 + * @since 6.8.0 + */ + public static final short MINOR_21 = 0; + + /** + * Minor version number of class files for Java 22: {@value}. + * + * @see #MAJOR_22 + * @since 6.10.0 + */ + public static final short MINOR_22 = 0; + + /** + * Minor version number of class files for Java 23: {@value}. + * + * @see #MAJOR_23 + * @since 6.10.0 + */ + public static final short MINOR_23 = 0; + + /** + * Minor version number of class files for Java 24: {@value}. + * + * @see #MAJOR_24 + * @since 6.10.0 + */ + public static final short MINOR_24 = 0; + + /** + * Major version number of class files for Java 14: {@value}. * * @see #MINOR_14 * @since 6.4.0 @@ -289,7 +329,7 @@ public static final short MAJOR_14 = 58; /** - * Major version number of class files for Java 15. + * Major version number of class files for Java 15: {@value}. * * @see #MINOR_15 * @since 6.6.0 @@ -297,7 +337,7 @@ public static final short MAJOR_15 = 59; /** - * Major version number of class files for Java 16. + * Major version number of class files for Java 16: {@value}. * * @see #MINOR_16 * @since 6.6.0 @@ -305,7 +345,7 @@ public static final short MAJOR_16 = 60; /** - * Major version number of class files for Java 17. + * Major version number of class files for Java 17: {@value}. * * @see #MINOR_17 * @since 6.6.0 @@ -313,7 +353,7 @@ public static final short MAJOR_17 = 61; /** - * Major version number of class files for Java 18. + * Major version number of class files for Java 18: {@value}. * * @see #MINOR_18 * @since 6.6.0 @@ -321,7 +361,7 @@ public static final short MAJOR_18 = 62; /** - * Major version number of class files for Java 19. + * Major version number of class files for Java 19: {@value}. * * @see #MINOR_19 * @since 6.6.0 @@ -329,31 +369,71 @@ public static final short MAJOR_19 = 63; /** - * Default major version number. Class file is for Java 1.1. + * Major version number of class files for Java 20: {@value}. + * + * @see #MINOR_20 + * @since 6.8.0 + */ + public static final short MAJOR_20 = 64; + + /** + * Major version number of class files for Java 21: {@value}. + * + * @see #MINOR_21 + * @since 6.8.0 + */ + public static final short MAJOR_21 = 65; + + /** + * Major version number of class files for Java 22: {@value}. + * + * @see #MINOR_22 + * @since 6.10.0 + */ + public static final short MAJOR_22 = 66; + + /** + * Major version number of class files for Java 23: {@value}. + * + * @see #MINOR_23 + * @since 6.10.0 + */ + public static final short MAJOR_23 = 67; + + /** + * Major version number of class files for Java 24: {@value}. + * + * @see #MINOR_24 + * @since 6.10.0 + */ + public static final short MAJOR_24 = 68; + + /** + * Default major version number. Class file is for Java 1.1: {@value}. * * @see #MAJOR_1_1 */ public static final short MAJOR = MAJOR_1_1; /** - * Default major version number. Class file is for Java 1.1. + * Default major version number. Class file is for Java 1.1: {@value}. * * @see #MAJOR_1_1 */ public static final short MINOR = MINOR_1_1; /** - * Maximum value for an unsigned short. + * Maximum value for an unsigned short: {@value}. */ public static final int MAX_SHORT = 65535; // 2^16 - 1 /** - * Maximum value for an unsigned byte. + * Maximum value for an unsigned byte: {@value}. */ public static final int MAX_BYTE = 255; // 2^8 - 1 /** - * One of the access flags for fields, methods, or classes. + * One of the access flags for fields, methods, or classes: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1"> Flag definitions for * Classes in the Java Virtual Machine Specification (Java SE 9 Edition).</a> @@ -367,140 +447,140 @@ public static final short ACC_PUBLIC = 0x0001; /** - * One of the access flags for fields, methods, or classes. + * One of the access flags for fields, methods, or classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_PRIVATE = 0x0002; /** - * One of the access flags for fields, methods, or classes. + * One of the access flags for fields, methods, or classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_PROTECTED = 0x0004; /** - * One of the access flags for fields, methods, or classes. + * One of the access flags for fields, methods, or classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_STATIC = 0x0008; /** - * One of the access flags for fields, methods, or classes. + * One of the access flags for fields, methods, or classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_FINAL = 0x0010; /** - * One of the access flags for the Module attribute. + * One of the access flags for the Module attribute: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_OPEN = 0x0020; /** - * One of the access flags for classes. + * One of the access flags for classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_SUPER = 0x0020; /** - * One of the access flags for methods. + * One of the access flags for methods: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_SYNCHRONIZED = 0x0020; /** - * One of the access flags for the Module attribute. + * One of the access flags for the Module attribute: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_TRANSITIVE = 0x0020; /** - * One of the access flags for methods. + * One of the access flags for methods: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_BRIDGE = 0x0040; /** - * One of the access flags for the Module attribute. + * One of the access flags for the Module attribute: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_STATIC_PHASE = 0x0040; /** - * One of the access flags for fields. + * One of the access flags for fields: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_VOLATILE = 0x0040; /** - * One of the access flags for fields. + * One of the access flags for fields: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_TRANSIENT = 0x0080; /** - * One of the access flags for methods. + * One of the access flags for methods: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_VARARGS = 0x0080; /** - * One of the access flags for methods. + * One of the access flags for methods: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_NATIVE = 0x0100; /** - * One of the access flags for classes. + * One of the access flags for classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_INTERFACE = 0x0200; /** - * One of the access flags for methods or classes. + * One of the access flags for methods or classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_ABSTRACT = 0x0400; /** - * One of the access flags for methods. + * One of the access flags for methods: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_STRICT = 0x0800; /** - * One of the access flags for fields, methods, classes, MethodParameter attribute, or Module attribute. + * One of the access flags for fields, methods, classes, MethodParameter attribute, or Module attribute: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_SYNTHETIC = 0x1000; /** - * One of the access flags for classes. + * One of the access flags for classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_ANNOTATION = 0x2000; /** - * One of the access flags for fields or classes. + * One of the access flags for fields or classes: {@value}. * * @see #ACC_PUBLIC */ @@ -508,21 +588,21 @@ // Applies to classes compiled by new compilers only /** - * One of the access flags for MethodParameter or Module attributes. + * One of the access flags for MethodParameter or Module attributes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_MANDATED = (short) 0x8000; /** - * One of the access flags for classes. + * One of the access flags for classes: {@value}. * * @see #ACC_PUBLIC */ public static final short ACC_MODULE = (short) 0x8000; /** - * One of the access flags for fields, methods, or classes. + * One of the access flags for fields, methods, or classes: {@value}. * * @see #ACC_PUBLIC * @deprecated Use {@link #MAX_ACC_FLAG_I} @@ -531,7 +611,7 @@ public static final short MAX_ACC_FLAG = ACC_ENUM; /** - * One of the access flags for fields, methods, or classes. ACC_MODULE is negative as a short. + * One of the access flags for fields, methods, or classes. ACC_MODULE is negative as a short: {@value}. * * @see #ACC_PUBLIC * @since 6.4.0 @@ -553,7 +633,7 @@ public static final int ACCESS_NAMES_LENGTH = ACCESS_NAMES.length; /** - * Marks a constant pool entry as type UTF-8. + * Marks a constant pool entry as type UTF-8: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.7"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -566,7 +646,7 @@ */ /** - * Marks a constant pool entry as type Integer. + * Marks a constant pool entry as type Integer: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -574,7 +654,7 @@ public static final byte CONSTANT_Integer = 3; /** - * Marks a constant pool entry as type Float. + * Marks a constant pool entry as type Float: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.4"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -582,7 +662,7 @@ public static final byte CONSTANT_Float = 4; /** - * Marks a constant pool entry as type Long. + * Marks a constant pool entry as type Long: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.5"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -590,7 +670,7 @@ public static final byte CONSTANT_Long = 5; /** - * Marks a constant pool entry as type Double. + * Marks a constant pool entry as type Double: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.5"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -598,7 +678,7 @@ public static final byte CONSTANT_Double = 6; /** - * Marks a constant pool entry as a Class + * Marks a constant pool entry as a Class: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.1"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -606,7 +686,7 @@ public static final byte CONSTANT_Class = 7; /** - * Marks a constant pool entry as a Field Reference. + * Marks a constant pool entry as a Field Reference: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.2"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -614,7 +694,7 @@ public static final byte CONSTANT_Fieldref = 9; /** - * Marks a constant pool entry as type String + * Marks a constant pool entry as type String: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.3"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -622,7 +702,7 @@ public static final byte CONSTANT_String = 8; /** - * Marks a constant pool entry as a Method Reference. + * Marks a constant pool entry as a Method Reference: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.2"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -630,7 +710,7 @@ public static final byte CONSTANT_Methodref = 10; /** - * Marks a constant pool entry as an Interface Method Reference. + * Marks a constant pool entry as an Interface Method Reference: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.2"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -638,7 +718,7 @@ public static final byte CONSTANT_InterfaceMethodref = 11; /** - * Marks a constant pool entry as a name and type. + * Marks a constant pool entry as a name and type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.6"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -646,7 +726,7 @@ public static final byte CONSTANT_NameAndType = 12; /** - * Marks a constant pool entry as a Method Handle. + * Marks a constant pool entry as a Method Handle: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.8"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -654,7 +734,7 @@ public static final byte CONSTANT_MethodHandle = 15; /** - * Marks a constant pool entry as a Method Type. + * Marks a constant pool entry as a Method Type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.9"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -662,16 +742,16 @@ public static final byte CONSTANT_MethodType = 16; /** - * Marks a constant pool entry as dynamically computed. + * Marks a constant pool entry as dynamically computed: {@value}. * - * @see <a href="https://bugs.openjdk.java.net/secure/attachment/74618/constant-dynamic.html"> Change request for JEP - * 309</a> + * @see <a href="https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.4.10"> The Constant Pool in The + * Java Virtual Machine Specification</a> * @since 6.3 */ public static final byte CONSTANT_Dynamic = 17; /** - * Marks a constant pool entry as an Invoke Dynamic + * Marks a constant pool entry as an Invoke Dynamic: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.10"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -679,7 +759,7 @@ public static final byte CONSTANT_InvokeDynamic = 18; /** - * Marks a constant pool entry as a Module Reference. + * Marks a constant pool entry as a Module Reference: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4.11"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -688,7 +768,7 @@ public static final byte CONSTANT_Module = 19; /** - * Marks a constant pool entry as a Package Reference. + * Marks a constant pool entry as a Package Reference: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4.12"> The Constant Pool in The * Java Virtual Machine Specification</a> @@ -705,23 +785,23 @@ /** * The name of the static initializer, also called "class initialization method" or "interface - * initialization method". This is "<clinit>". + * initialization method". This is {@value}. */ public static final String STATIC_INITIALIZER_NAME = "<clinit>"; /** * The name of every constructor method in a class, also called "instance initialization method". This is - * "<init>". + * {@value}. */ public static final String CONSTRUCTOR_NAME = "<init>"; /** - * The names of the interfaces implemented by arrays + * The names of the interfaces implemented by arrays. */ private static final String[] INTERFACES_IMPLEMENTED_BY_ARRAYS = {"java.lang.Cloneable", "java.io.Serializable"}; /** - * Maximum Constant Pool entries. One of the limitations of the Java Virtual Machine. + * Maximum Constant Pool entries: {@value}. One of the limitations of the Java Virtual Machine. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11-100-A"> The Java Virtual * Machine Specification, Java SE 8 Edition, page 330, chapter 4.11.</a> @@ -729,21 +809,25 @@ public static final int MAX_CP_ENTRIES = 65535; /** - * Maximum code size (plus one; the code size must be LESS than this) One of the limitations of the Java Virtual - * Machine. Note vmspec2 page 152 ("Limitations") says: "The amount of code per non-native, non-abstract method is - * limited to 65536 bytes by the sizes of the indices in the exception_table of the Code attribute (4.7.3), in the - * LineNumberTable attribute (4.7.8), and in the LocalVariableTable attribute (4.7.9)." However this should be taken - * as an upper limit rather than the defined maximum. On page 134 (4.8.1 Static Constants) of the same spec, it says: - * "The value of the code_length item must be less than 65536." The entry in the Limitations section has been removed - * from later versions of the spec; it is not present in the Java SE 8 edition. + * Maximum code size (plus one; the code size must be LESS than this): {@value}. + * <p> + * One of the limitations of the Java Virtual Machine. Note vmspec2 page 152 ("Limitations") says: + * </p> + * <pre>"The amount of code per non-native, non-abstract method is limited to 65536 bytes by the sizes of the indices in the exception_table of the Code + * attribute (4.7.3), in the LineNumberTable attribute (4.7.8), and in the LocalVariableTable attribute (4.7.9)." However this should be taken as an + * upper limit rather than the defined maximum. On page 134 (4.8.1 Static Constants) of the same spec, it says: "The value of the code_length item must be + * less than 65536."</pre> + * <p> + * The entry in the Limitations section has been removed from later versions of the specification; it is not present in the Java SE 8 edition. + * </p> * - * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3-300-E"> The Java Virtual - * Machine Specification, Java SE 8 Edition, page 104, chapter 4.7.</a> + * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3-300-E"> The Java Virtual Machine Specification, Java SE 8 + * Edition, page 104, chapter 4.7.</a> */ public static final int MAX_CODE_SIZE = 65536; // bytes /** - * The maximum number of dimensions in an array ({@value}). One of the limitations of the Java Virtual Machine. + * The maximum number of dimensions in an array: {@value}. One of the limitations of the Java Virtual Machine. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.3.2-150"> Field Descriptors in * The Java Virtual Machine Specification</a> @@ -751,7 +835,7 @@ public static final int MAX_ARRAY_DIMENSIONS = 255; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.nop"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -759,7 +843,7 @@ public static final short NOP = 0; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aconst_null"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -767,7 +851,7 @@ public static final short ACONST_NULL = 1; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -775,7 +859,7 @@ public static final short ICONST_M1 = 2; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -783,7 +867,7 @@ public static final short ICONST_0 = 3; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -791,7 +875,7 @@ public static final short ICONST_1 = 4; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -799,7 +883,7 @@ public static final short ICONST_2 = 5; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -807,7 +891,7 @@ public static final short ICONST_3 = 6; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -815,7 +899,7 @@ public static final short ICONST_4 = 7; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iconst_i"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -823,7 +907,7 @@ public static final short ICONST_5 = 8; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lconst_l"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -831,7 +915,7 @@ public static final short LCONST_0 = 9; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lconst_l"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -839,7 +923,7 @@ public static final short LCONST_1 = 10; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fconst_f"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -847,7 +931,7 @@ public static final short FCONST_0 = 11; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fconst_f"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -855,7 +939,7 @@ public static final short FCONST_1 = 12; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fconst_f"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -863,7 +947,7 @@ public static final short FCONST_2 = 13; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dconst_d"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -871,7 +955,7 @@ public static final short DCONST_0 = 14; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dconst_d"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -879,7 +963,7 @@ public static final short DCONST_1 = 15; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.bipush"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -887,7 +971,7 @@ public static final short BIPUSH = 16; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.sipush"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -895,7 +979,7 @@ public static final short SIPUSH = 17; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ldc"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -903,7 +987,7 @@ public static final short LDC = 18; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ldc_w"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -911,7 +995,7 @@ public static final short LDC_W = 19; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ldc2_w"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -919,7 +1003,7 @@ public static final short LDC2_W = 20; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -927,7 +1011,7 @@ public static final short ILOAD = 21; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -935,7 +1019,7 @@ public static final short LLOAD = 22; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -943,7 +1027,7 @@ public static final short FLOAD = 23; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -951,7 +1035,7 @@ public static final short DLOAD = 24; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -959,7 +1043,7 @@ public static final short ALOAD = 25; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -967,7 +1051,7 @@ public static final short ILOAD_0 = 26; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -975,7 +1059,7 @@ public static final short ILOAD_1 = 27; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -983,7 +1067,7 @@ public static final short ILOAD_2 = 28; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -991,7 +1075,7 @@ public static final short ILOAD_3 = 29; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -999,7 +1083,7 @@ public static final short LLOAD_0 = 30; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1007,7 +1091,7 @@ public static final short LLOAD_1 = 31; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1015,7 +1099,7 @@ public static final short LLOAD_2 = 32; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1023,7 +1107,7 @@ public static final short LLOAD_3 = 33; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1031,7 +1115,7 @@ public static final short FLOAD_0 = 34; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1039,7 +1123,7 @@ public static final short FLOAD_1 = 35; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1047,7 +1131,7 @@ public static final short FLOAD_2 = 36; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1055,7 +1139,7 @@ public static final short FLOAD_3 = 37; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1063,7 +1147,7 @@ public static final short DLOAD_0 = 38; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1071,7 +1155,7 @@ public static final short DLOAD_1 = 39; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1079,7 +1163,7 @@ public static final short DLOAD_2 = 40; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1087,7 +1171,7 @@ public static final short DLOAD_3 = 41; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1095,7 +1179,7 @@ public static final short ALOAD_0 = 42; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1103,7 +1187,7 @@ public static final short ALOAD_1 = 43; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1111,7 +1195,7 @@ public static final short ALOAD_2 = 44; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aload_n"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1119,7 +1203,7 @@ public static final short ALOAD_3 = 45; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iaload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1127,7 +1211,7 @@ public static final short IALOAD = 46; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.laload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1135,7 +1219,7 @@ public static final short LALOAD = 47; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.faload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1143,7 +1227,7 @@ public static final short FALOAD = 48; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.daload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1151,7 +1235,7 @@ public static final short DALOAD = 49; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aaload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1159,7 +1243,7 @@ public static final short AALOAD = 50; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.baload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1167,7 +1251,7 @@ public static final short BALOAD = 51; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.caload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1175,7 +1259,7 @@ public static final short CALOAD = 52; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.saload"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1183,7 +1267,7 @@ public static final short SALOAD = 53; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.istore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1191,7 +1275,7 @@ public static final short ISTORE = 54; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lstore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1199,7 +1283,7 @@ public static final short LSTORE = 55; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fstore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1207,7 +1291,7 @@ public static final short FSTORE = 56; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dstore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1215,7 +1299,7 @@ public static final short DSTORE = 57; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.astore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1223,7 +1307,7 @@ public static final short ASTORE = 58; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.istore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1231,7 +1315,7 @@ public static final short ISTORE_0 = 59; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.istore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1239,7 +1323,7 @@ public static final short ISTORE_1 = 60; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.istore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1247,7 +1331,7 @@ public static final short ISTORE_2 = 61; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.istore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1255,7 +1339,7 @@ public static final short ISTORE_3 = 62; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1263,7 +1347,7 @@ public static final short LSTORE_0 = 63; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1271,7 +1355,7 @@ public static final short LSTORE_1 = 64; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1279,7 +1363,7 @@ public static final short LSTORE_2 = 65; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1287,7 +1371,7 @@ public static final short LSTORE_3 = 66; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1295,7 +1379,7 @@ public static final short FSTORE_0 = 67; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1303,7 +1387,7 @@ public static final short FSTORE_1 = 68; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1311,7 +1395,7 @@ public static final short FSTORE_2 = 69; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1319,7 +1403,7 @@ public static final short FSTORE_3 = 70; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1327,7 +1411,7 @@ public static final short DSTORE_0 = 71; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1335,7 +1419,7 @@ public static final short DSTORE_1 = 72; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1343,7 +1427,7 @@ public static final short DSTORE_2 = 73; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dstore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1351,7 +1435,7 @@ public static final short DSTORE_3 = 74; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.astore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1359,7 +1443,7 @@ public static final short ASTORE_0 = 75; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.astore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1367,7 +1451,7 @@ public static final short ASTORE_1 = 76; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.astore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1375,7 +1459,7 @@ public static final short ASTORE_2 = 77; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.astore_n"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -1383,7 +1467,7 @@ public static final short ASTORE_3 = 78; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1391,7 +1475,7 @@ public static final short IASTORE = 79; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1399,7 +1483,7 @@ public static final short LASTORE = 80; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1407,7 +1491,7 @@ public static final short FASTORE = 81; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1415,7 +1499,7 @@ public static final short DASTORE = 82; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.aastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1423,7 +1507,7 @@ public static final short AASTORE = 83; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.bastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1431,7 +1515,7 @@ public static final short BASTORE = 84; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.castore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1439,7 +1523,7 @@ public static final short CASTORE = 85; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.sastore"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1447,7 +1531,7 @@ public static final short SASTORE = 86; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.pop"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1455,7 +1539,7 @@ public static final short POP = 87; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.pop2"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1463,7 +1547,7 @@ public static final short POP2 = 88; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dup"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1471,7 +1555,7 @@ public static final short DUP = 89; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dup_x1"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1479,7 +1563,7 @@ public static final short DUP_X1 = 90; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dup_x2"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1487,7 +1571,7 @@ public static final short DUP_X2 = 91; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dup2"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1495,7 +1579,7 @@ public static final short DUP2 = 92; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dup2_x1"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1503,7 +1587,7 @@ public static final short DUP2_X1 = 93; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dup2_x2"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1511,7 +1595,7 @@ public static final short DUP2_X2 = 94; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.swap"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1519,7 +1603,7 @@ public static final short SWAP = 95; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iadd"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1527,7 +1611,7 @@ public static final short IADD = 96; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ladd"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1535,7 +1619,7 @@ public static final short LADD = 97; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fadd"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1543,7 +1627,7 @@ public static final short FADD = 98; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dadd"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1551,7 +1635,7 @@ public static final short DADD = 99; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.isub"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1559,7 +1643,7 @@ public static final short ISUB = 100; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lsub"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1567,7 +1651,7 @@ public static final short LSUB = 101; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fsub"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1575,7 +1659,7 @@ public static final short FSUB = 102; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dsub"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1583,7 +1667,7 @@ public static final short DSUB = 103; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.imul"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1591,7 +1675,7 @@ public static final short IMUL = 104; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lmul"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1599,7 +1683,7 @@ public static final short LMUL = 105; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fmul"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1607,7 +1691,7 @@ public static final short FMUL = 106; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dmul"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1615,7 +1699,7 @@ public static final short DMUL = 107; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.idiv"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1623,7 +1707,7 @@ public static final short IDIV = 108; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ldiv"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1631,7 +1715,7 @@ public static final short LDIV = 109; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fdiv"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1639,7 +1723,7 @@ public static final short FDIV = 110; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ddiv"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1647,7 +1731,7 @@ public static final short DDIV = 111; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.irem"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1655,7 +1739,7 @@ public static final short IREM = 112; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lrem"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1663,7 +1747,7 @@ public static final short LREM = 113; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.frem"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1671,7 +1755,7 @@ public static final short FREM = 114; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.drem"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1679,7 +1763,7 @@ public static final short DREM = 115; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ineg"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1687,7 +1771,7 @@ public static final short INEG = 116; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lneg"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1695,7 +1779,7 @@ public static final short LNEG = 117; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fneg"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1703,7 +1787,7 @@ public static final short FNEG = 118; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dneg"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1711,7 +1795,7 @@ public static final short DNEG = 119; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ishl"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1719,7 +1803,7 @@ public static final short ISHL = 120; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lshl"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1727,7 +1811,7 @@ public static final short LSHL = 121; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ishr"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1735,7 +1819,7 @@ public static final short ISHR = 122; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lshr"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1743,7 +1827,7 @@ public static final short LSHR = 123; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iushr"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1751,7 +1835,7 @@ public static final short IUSHR = 124; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lushr"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1759,7 +1843,7 @@ public static final short LUSHR = 125; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iand"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1767,7 +1851,7 @@ public static final short IAND = 126; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.land"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1775,7 +1859,7 @@ public static final short LAND = 127; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ior"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1783,7 +1867,7 @@ public static final short IOR = 128; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lor"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1791,7 +1875,7 @@ public static final short LOR = 129; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ixor"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1799,7 +1883,7 @@ public static final short IXOR = 130; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lxor"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1807,7 +1891,7 @@ public static final short LXOR = 131; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iinc"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1815,7 +1899,7 @@ public static final short IINC = 132; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.i2l"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1823,7 +1907,7 @@ public static final short I2L = 133; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.i2f"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1831,7 +1915,7 @@ public static final short I2F = 134; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.i2d"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1839,7 +1923,7 @@ public static final short I2D = 135; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.l2i"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1847,7 +1931,7 @@ public static final short L2I = 136; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.l2f"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1855,7 +1939,7 @@ public static final short L2F = 137; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.l2d"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1863,7 +1947,7 @@ public static final short L2D = 138; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.f2i"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1871,7 +1955,7 @@ public static final short F2I = 139; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.f2l"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1879,7 +1963,7 @@ public static final short F2L = 140; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.f2d"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1887,7 +1971,7 @@ public static final short F2D = 141; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.d2i"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1895,7 +1979,7 @@ public static final short D2I = 142; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.d2l"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1903,7 +1987,7 @@ public static final short D2L = 143; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.d2f"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1911,7 +1995,7 @@ public static final short D2F = 144; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.i2b"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1919,7 +2003,7 @@ public static final short I2B = 145; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1927,7 +2011,7 @@ public static final short INT2BYTE = 145; // Old notation /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.i2c"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1935,7 +2019,7 @@ public static final short I2C = 146; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1943,7 +2027,7 @@ public static final short INT2CHAR = 146; // Old notation /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.i2s"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1951,7 +2035,7 @@ public static final short I2S = 147; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -1959,7 +2043,7 @@ public static final short INT2SHORT = 147; // Old notation /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lcmp"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1967,7 +2051,7 @@ public static final short LCMP = 148; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fcmpl"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1975,7 +2059,7 @@ public static final short FCMPL = 149; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.fcmpg"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1983,7 +2067,7 @@ public static final short FCMPG = 150; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dcmpl"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1991,7 +2075,7 @@ public static final short DCMPL = 151; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dcmpg"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -1999,7 +2083,7 @@ public static final short DCMPG = 152; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifeq"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2007,7 +2091,7 @@ public static final short IFEQ = 153; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifne"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2015,7 +2099,7 @@ public static final short IFNE = 154; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iflt"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2023,7 +2107,7 @@ public static final short IFLT = 155; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifge"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2031,7 +2115,7 @@ public static final short IFGE = 156; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifgt"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2039,7 +2123,7 @@ public static final short IFGT = 157; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifle"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2047,7 +2131,7 @@ public static final short IFLE = 158; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_icmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2055,7 +2139,7 @@ public static final short IF_ICMPEQ = 159; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_icmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2063,7 +2147,7 @@ public static final short IF_ICMPNE = 160; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_icmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2071,7 +2155,7 @@ public static final short IF_ICMPLT = 161; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_icmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2079,7 +2163,7 @@ public static final short IF_ICMPGE = 162; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_icmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2087,7 +2171,7 @@ public static final short IF_ICMPGT = 163; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_icmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2095,7 +2179,7 @@ public static final short IF_ICMPLE = 164; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_acmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2103,7 +2187,7 @@ public static final short IF_ACMPEQ = 165; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.if_acmp_cond"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2111,7 +2195,7 @@ public static final short IF_ACMPNE = 166; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.goto"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2119,7 +2203,7 @@ public static final short GOTO = 167; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.jsr"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -2127,7 +2211,7 @@ public static final short JSR = 168; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ret"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -2135,7 +2219,7 @@ public static final short RET = 169; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.tableswitch"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2143,7 +2227,7 @@ public static final short TABLESWITCH = 170; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lookupswitch"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2151,7 +2235,7 @@ public static final short LOOKUPSWITCH = 171; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ireturn"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2159,7 +2243,7 @@ public static final short IRETURN = 172; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.lreturn"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2167,7 +2251,7 @@ public static final short LRETURN = 173; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.freturn"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2175,7 +2259,7 @@ public static final short FRETURN = 174; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.dreturn"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2183,7 +2267,7 @@ public static final short DRETURN = 175; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.areturn"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2191,7 +2275,7 @@ public static final short ARETURN = 176; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.return"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2199,7 +2283,7 @@ public static final short RETURN = 177; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.getstatic"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2207,7 +2291,7 @@ public static final short GETSTATIC = 178; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.putstatic"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2215,7 +2299,7 @@ public static final short PUTSTATIC = 179; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.getfield"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2223,7 +2307,7 @@ public static final short GETFIELD = 180; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.putfield"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2231,7 +2315,7 @@ public static final short PUTFIELD = 181; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokevirtual"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2239,7 +2323,7 @@ public static final short INVOKEVIRTUAL = 182; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokespecial"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2247,7 +2331,7 @@ public static final short INVOKESPECIAL = 183; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -2255,7 +2339,7 @@ public static final short INVOKENONVIRTUAL = 183; // Old name in JDK 1.0 /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokestatic"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2263,7 +2347,7 @@ public static final short INVOKESTATIC = 184; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokeinterface"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2271,7 +2355,7 @@ public static final short INVOKEINTERFACE = 185; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokedynamic"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2279,7 +2363,7 @@ public static final short INVOKEDYNAMIC = 186; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.new"> Opcode definitions in The * Java Virtual Machine Specification</a> @@ -2287,7 +2371,7 @@ public static final short NEW = 187; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.newarray"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2295,7 +2379,7 @@ public static final short NEWARRAY = 188; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.anewarray"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2303,7 +2387,7 @@ public static final short ANEWARRAY = 189; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.arraylength"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2311,7 +2395,7 @@ public static final short ARRAYLENGTH = 190; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.athrow"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2319,7 +2403,7 @@ public static final short ATHROW = 191; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.checkcast"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2327,7 +2411,7 @@ public static final short CHECKCAST = 192; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.instanceof"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2335,7 +2419,7 @@ public static final short INSTANCEOF = 193; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.monitorenter"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2343,7 +2427,7 @@ public static final short MONITORENTER = 194; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.monitorexit"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2351,7 +2435,7 @@ public static final short MONITOREXIT = 195; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.wide"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2359,7 +2443,7 @@ public static final short WIDE = 196; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.multianewarray"> Opcode * definitions in The Java Virtual Machine Specification</a> @@ -2367,7 +2451,7 @@ public static final short MULTIANEWARRAY = 197; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifnull"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2375,7 +2459,7 @@ public static final short IFNULL = 198; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.ifnonnull"> Opcode definitions * in The Java Virtual Machine Specification</a> @@ -2383,7 +2467,7 @@ public static final short IFNONNULL = 199; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.goto_w"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2391,7 +2475,7 @@ public static final short GOTO_W = 200; /** - * Java VM opcode. + * Java VM opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.jsr_w"> Opcode definitions in * The Java Virtual Machine Specification</a> @@ -2399,7 +2483,7 @@ public static final short JSR_W = 201; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2"> Reserved opcodes in the Java * Virtual Machine Specification</a> @@ -2407,7 +2491,7 @@ public static final short BREAKPOINT = 202; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2418,7 +2502,7 @@ public static final short LDC_QUICK = 203; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2429,7 +2513,7 @@ public static final short LDC_W_QUICK = 204; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2440,7 +2524,7 @@ public static final short LDC2_W_QUICK = 205; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2451,7 +2535,7 @@ public static final short GETFIELD_QUICK = 206; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2462,7 +2546,7 @@ public static final short PUTFIELD_QUICK = 207; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2473,7 +2557,7 @@ public static final short GETFIELD2_QUICK = 208; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2484,7 +2568,7 @@ public static final short PUTFIELD2_QUICK = 209; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2495,7 +2579,7 @@ public static final short GETSTATIC_QUICK = 210; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2506,7 +2590,7 @@ public static final short PUTSTATIC_QUICK = 211; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2517,7 +2601,7 @@ public static final short GETSTATIC2_QUICK = 212; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2528,7 +2612,7 @@ public static final short PUTSTATIC2_QUICK = 213; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2539,7 +2623,7 @@ public static final short INVOKEVIRTUAL_QUICK = 214; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2550,7 +2634,7 @@ public static final short INVOKENONVIRTUAL_QUICK = 215; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2561,7 +2645,7 @@ public static final short INVOKESUPER_QUICK = 216; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2572,7 +2656,7 @@ public static final short INVOKESTATIC_QUICK = 217; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2583,7 +2667,7 @@ public static final short INVOKEINTERFACE_QUICK = 218; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2594,7 +2678,7 @@ public static final short INVOKEVIRTUALOBJECT_QUICK = 219; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2605,7 +2689,7 @@ public static final short NEW_QUICK = 221; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2616,7 +2700,7 @@ public static final short ANEWARRAY_QUICK = 222; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2627,7 +2711,7 @@ public static final short MULTIANEWARRAY_QUICK = 223; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2638,7 +2722,7 @@ public static final short CHECKCAST_QUICK = 224; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2649,7 +2733,7 @@ public static final short INSTANCEOF_QUICK = 225; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2660,7 +2744,7 @@ public static final short INVOKEVIRTUAL_QUICK_W = 226; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2671,7 +2755,7 @@ public static final short GETFIELD_QUICK_W = 227; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href= * "https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html"> @@ -2682,7 +2766,7 @@ public static final short PUTFIELD_QUICK_W = 228; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2"> Reserved opcodes in the Java * Virtual Machine Specification</a> @@ -2690,7 +2774,7 @@ public static final short IMPDEP1 = 254; /** - * JVM internal opcode. + * JVM internal opcode {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2"> Reserved opcodes in the Java * Virtual Machine Specification</a> @@ -2698,34 +2782,44 @@ public static final short IMPDEP2 = 255; /** - * BCEL virtual instruction for pushing an arbitrary data type onto the stack. Will be converted to the appropriate JVM + * BCEL virtual instruction for pushing an arbitrary data type onto the stack: {@value}. Will be converted to the appropriate JVM * opcode when the class is dumped. */ public static final short PUSH = 4711; /** - * BCEL virtual instruction for either LOOKUPSWITCH or TABLESWITCH. Will be converted to the appropriate JVM opcode when + * BCEL virtual instruction for either LOOKUPSWITCH or TABLESWITCH: {@value}. Will be converted to the appropriate JVM opcode when * the class is dumped. */ public static final short SWITCH = 4712; - /** Illegal opcode. */ + /** + * Illegal opcode: {@value}. + */ public static final short UNDEFINED = -1; - /** Illegal opcode. */ + /** + * Illegal opcode: {@value}. + */ public static final short UNPREDICTABLE = -2; - /** Illegal opcode. */ + /** + * Illegal opcode: {@value}. + */ public static final short RESERVED = -3; - /** Mnemonic for an illegal opcode. */ + /** + * Mnemonic for an illegal opcode: {@value}. + */ public static final String ILLEGAL_OPCODE = "<illegal opcode>"; - /** Mnemonic for an illegal type. */ + /** + * Mnemonic for an illegal type: {@value}. + */ public static final String ILLEGAL_TYPE = "<illegal type>"; /** - * Boolean data type. + * Boolean data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2733,7 +2827,7 @@ public static final byte T_BOOLEAN = 4; /** - * Char data type. + * Char data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2741,7 +2835,7 @@ public static final byte T_CHAR = 5; /** - * Float data type. + * Float data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2749,7 +2843,7 @@ public static final byte T_FLOAT = 6; /** - * Double data type. + * Double data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2757,7 +2851,7 @@ public static final byte T_DOUBLE = 7; /** - * Byte data type. + * Byte data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2765,7 +2859,7 @@ public static final byte T_BYTE = 8; /** - * Short data type. + * Short data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2773,7 +2867,7 @@ public static final byte T_SHORT = 9; /** - * Int data type. + * Int data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2781,7 +2875,7 @@ public static final byte T_INT = 10; /** - * Long data type. + * Long data type: {@value}. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.9.1-120-P"> Static Constraints in * the Java Virtual Machine Specification</a> @@ -2827,7 +2921,7 @@ /** * The signature characters corresponding to primitive types, e.g., SHORT_TYPE_NAMES[T_INT] = "I" */ - private static final String[] SHORT_TYPE_NAMES = {ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, "Z", "C", "F", "D", "B", "S", "I", "J", "V", + public static final String[] SHORT_TYPE_NAMES = {ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, "Z", "C", "F", "D", "B", "S", "I", "J", "V", ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE}; /** @@ -3036,11 +3130,13 @@ public static final byte ATTR_MODULE_MAIN_CLASS = 24; public static final byte ATTR_NEST_HOST = 25; public static final byte ATTR_NEST_MEMBERS = 26; - public static final short KNOWN_ATTRIBUTES = 27; // count of attributes + public static final byte ATTR_RECORD = 27; + + public static final short KNOWN_ATTRIBUTES = 28; // count of attributes private static final String[] ATTRIBUTE_NAMES = {"SourceFile", "ConstantValue", "Code", "Exceptions", "LineNumberTable", "LocalVariableTable", "InnerClasses", "Synthetic", "Deprecated", "PMGClass", "Signature", "StackMap", "RuntimeVisibleAnnotations", "RuntimeInvisibleAnnotations", "RuntimeVisibleParameterAnnotations", "RuntimeInvisibleParameterAnnotations", "AnnotationDefault", "LocalVariableTypeTable", "EnclosingMethod", - "StackMapTable", "BootstrapMethods", "MethodParameters", "Module", "ModulePackages", "ModuleMainClass", "NestHost", "NestMembers"}; + "StackMapTable", "BootstrapMethods", "MethodParameters", "Module", "ModulePackages", "ModuleMainClass", "NestHost", "NestMembers", "Record"}; /** * Constants used in the StackMap attribute. */ @@ -3070,6 +3166,7 @@ public static final int SAME_FRAME_EXTENDED = 251; public static final int APPEND_FRAME = 252; public static final int FULL_FRAME = 255; + /** * Constants that define the maximum value of those constants which store ranges. */ @@ -3090,6 +3187,7 @@ public static final byte REF_invokeSpecial = 7; public static final byte REF_newInvokeSpecial = 8; public static final byte REF_invokeInterface = 9; + /** * The names of the reference_kinds of a CONSTANT_MethodHandle_info. */ @@ -3097,7 +3195,7 @@ "newInvokeSpecial", "invokeInterface"}; /** - * @param index + * @param index index into {@code ACCESS_NAMES}. * @return the ACCESS_NAMES entry at the given index * @since 6.0 */ @@ -3107,7 +3205,7 @@ /** * - * @param index + * @param index index into {@code ACCESS_NAMES}. * @return the attribute name * @since 6.0 */ @@ -3118,7 +3216,7 @@ /** * The primitive class names corresponding to the T_XX constants, e.g., CLASS_TYPE_NAMES[T_INT] = "java.lang.Integer" * - * @param index + * @param index index into {@code CLASS_TYPE_NAMES}. * @return the class name * @since 6.0 */ @@ -3128,7 +3226,7 @@ /** * - * @param index + * @param index index into {@code CONSTANT_NAMES}. * @return the CONSTANT_NAMES entry at the given index * @since 6.0 */ @@ -3140,7 +3238,7 @@ /** * - * @param index + * @param index index into {@code CONSUME_STACK}. * @return Number of words consumed on operand stack * @since 6.0 */ @@ -3157,7 +3255,7 @@ /** * - * @param index + * @param index index into {@code ITEM_NAMES}. * @return the item name * @since 6.0 */ @@ -3167,7 +3265,7 @@ /** * - * @param index + * @param index index into {@code METHODHANDLE_NAMES}. * @return the method handle name * @since 6.0 */ @@ -3177,7 +3275,7 @@ /** * - * @param index + * @param index index into {@code NO_OF_OPERANDS}. * @return Number of byte code operands * @since 6.0 */ diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -26,7 +26,7 @@ * Exception constants. * * @since 6.0 (intended to replace the InstructionConstant interface) - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class ExceptionConst { @@ -52,7 +52,6 @@ * Super class of any linking exception (aka Linkage Error) */ public static final Class<LinkageError> LINKING_EXCEPTION = LinkageError.class; - /** * Linking Exceptions */ @@ -67,10 +66,10 @@ public static final Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class; public static final Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class; public static final Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class; + public static final Class<VerifyError> VERIFY_ERROR = VerifyError.class; /* UnsupportedClassVersionError is new in JDK 1.2 */ // public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class; - /** * Run-Time Exceptions */ diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/Repository.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,7 +30,7 @@ * @see com.sun.org.apache.bcel.internal.util.Repository * @see SyntheticRepository * - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public abstract class Repository { @@ -174,7 +174,7 @@ } /** - * Lookups class somewhere found on your CLASSPATH, or wherever the repository instance looks for it. + * Lookups class somewhere found on your CLASSPATH, or whereever the repository instance looks for it. * * @return class object for given fully qualified class name * @throws ClassNotFoundException if the class could not be found or parsed correctly diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AccessFlags.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,27 +25,36 @@ * Super class for all objects that have modifiers like private, final, ... I.e. * classes, fields, and methods. * - * @LastModified: Jan 2020 + * @LastModified: Sept 2025 */ public abstract class AccessFlags { /** - * @deprecated (since 6.0) will be made private; do not access directly, use getter/setter + * Access flags. + * + * @deprecated (since 6.0) will be made private; do not access directly, use getter/setter. */ @java.lang.Deprecated protected int access_flags; // TODO not used externally at present + /** + * Constructs a new instance. + */ public AccessFlags() { } /** - * @param a initial access flags + * Constructs a new instance. + * + * @param accessFlags initial access flags. */ - public AccessFlags(final int a) { - access_flags = a; + public AccessFlags(final int accessFlags) { + access_flags = accessFlags; } /** + * Gets access flags. + * * @return Access flags of the object aka. "modifiers". */ public final int getAccessFlags() { @@ -53,142 +62,303 @@ } /** - * @return Access flags of the object aka. "modifiers". + * Gets access flags. + * + * @return Access flags of the object also known as modifiers. */ public final int getModifiers() { return access_flags; } + /** + * Tests whether the abstract bit is on. + * + * @return whether the abstract bit is on. + */ public final boolean isAbstract() { - return (access_flags & Const.ACC_ABSTRACT) != 0; + return test(Const.ACC_ABSTRACT); } + /** + * Sets the abstract bit. + * + * @param flag The new value. + */ public final void isAbstract(final boolean flag) { setFlag(Const.ACC_ABSTRACT, flag); } + /** + * Tests whether the annotation bit is on. + * + * @return whether the annotation bit is on. + */ public final boolean isAnnotation() { - return (access_flags & Const.ACC_ANNOTATION) != 0; + return test(Const.ACC_ANNOTATION); } + /** + * Sets the annotation bit. + * + * @param flag The new value. + */ public final void isAnnotation(final boolean flag) { setFlag(Const.ACC_ANNOTATION, flag); } - + /** + * Tests whether the enum bit is on. + * + * @return whether the enum bit is on. + */ public final boolean isEnum() { - return (access_flags & Const.ACC_ENUM) != 0; + return test(Const.ACC_ENUM); } + /** + * Sets the enum bit. + * + * @param flag The new value. + */ public final void isEnum(final boolean flag) { setFlag(Const.ACC_ENUM, flag); } + /** + * Tests whether the final bit is on. + * + * @return whether the final bit is on. + */ public final boolean isFinal() { - return (access_flags & Const.ACC_FINAL) != 0; + return test(Const.ACC_FINAL); } + /** + * Sets the final bit. + * + * @param flag The new value. + */ public final void isFinal(final boolean flag) { setFlag(Const.ACC_FINAL, flag); } + /** + * Tests whether the interface bit is on. + * + * @return whether the interface bit is on. + */ public final boolean isInterface() { - return (access_flags & Const.ACC_INTERFACE) != 0; + return test(Const.ACC_INTERFACE); } + /** + * Sets the interface bit. + * + * @param flag The new value. + */ public final void isInterface(final boolean flag) { setFlag(Const.ACC_INTERFACE, flag); } + /** + * Tests whether the native bit is on. + * + * @return whether the native bit is on. + */ public final boolean isNative() { - return (access_flags & Const.ACC_NATIVE) != 0; + return test(Const.ACC_NATIVE); } + /** + * Sets the native bit. + * + * @param flag The new value. + */ public final void isNative(final boolean flag) { setFlag(Const.ACC_NATIVE, flag); } + /** + * Tests whether the private bit is on. + * + * @return whether the private bit is on. + */ public final boolean isPrivate() { - return (access_flags & Const.ACC_PRIVATE) != 0; + return test(Const.ACC_PRIVATE); } + /** + * Sets the private bit. + * + * @param flag The new value. + */ public final void isPrivate(final boolean flag) { setFlag(Const.ACC_PRIVATE, flag); } + /** + * Tests whether the protected bit is on. + * + * @return whether the protected bit is on. + */ public final boolean isProtected() { - return (access_flags & Const.ACC_PROTECTED) != 0; + return test(Const.ACC_PROTECTED); } + /** + * Sets the protected bit. + * + * @param flag The new value. + */ public final void isProtected(final boolean flag) { setFlag(Const.ACC_PROTECTED, flag); } + /** + * Tests whether the public bit is on. + * + * @return whether the public bit is on. + */ public final boolean isPublic() { - return (access_flags & Const.ACC_PUBLIC) != 0; + return test(Const.ACC_PUBLIC); } + /** + * Sets the public bit. + * + * @param flag The new value. + */ public final void isPublic(final boolean flag) { setFlag(Const.ACC_PUBLIC, flag); } + /** + * Tests whether the static bit is on. + * + * @return whether the static bit is on. + */ public final boolean isStatic() { - return (access_flags & Const.ACC_STATIC) != 0; + return test(Const.ACC_STATIC); } + /** + * Sets the static bit. + * + * @param flag The new value. + */ public final void isStatic(final boolean flag) { setFlag(Const.ACC_STATIC, flag); } + /** + * Tests whether the strict bit is on. + * + * @return whether the strict bit is on. + */ public final boolean isStrictfp() { - return (access_flags & Const.ACC_STRICT) != 0; + return test(Const.ACC_STRICT); } + /** + * Sets the strict bit. + * + * @param flag The new value. + */ public final void isStrictfp(final boolean flag) { setFlag(Const.ACC_STRICT, flag); } + /** + * Tests whether the synchronized bit is on. + * + * @return whether the synchronized bit is on. + */ public final boolean isSynchronized() { - return (access_flags & Const.ACC_SYNCHRONIZED) != 0; + return test(Const.ACC_SYNCHRONIZED); } + /** + * Sets the synchronized bit. + * + * @param flag The new value. + */ public final void isSynchronized(final boolean flag) { setFlag(Const.ACC_SYNCHRONIZED, flag); } + /** + * Tests whether the synthetic bit is on. + * + * @return whether the synthetic bit is on. + */ public final boolean isSynthetic() { - return (access_flags & Const.ACC_SYNTHETIC) != 0; + return test(Const.ACC_SYNTHETIC); } + /** + * Sets the synthetic bit. + * + * @param flag The new value. + */ public final void isSynthetic(final boolean flag) { setFlag(Const.ACC_SYNTHETIC, flag); } + /** + * Tests whether the transient bit is on. + * + * @return whether the varargs bit is on. + */ public final boolean isTransient() { - return (access_flags & Const.ACC_TRANSIENT) != 0; + return test(Const.ACC_TRANSIENT); } + /** + * Sets the varargs bit. + * + * @param flag The new value. + */ public final void isTransient(final boolean flag) { setFlag(Const.ACC_TRANSIENT, flag); } + /** + * Tests whether the varargs bit is on. + * + * @return whether the varargs bit is on. + */ public final boolean isVarArgs() { - return (access_flags & Const.ACC_VARARGS) != 0; + return test(Const.ACC_VARARGS); } + /** + * Sets the varargs bit. + * + * @param flag The new value. + */ public final void isVarArgs(final boolean flag) { setFlag(Const.ACC_VARARGS, flag); } + /** + * Tests whether the volatile bit is on. + * + * @return whether the volatile bit is on. + */ public final boolean isVolatile() { - return (access_flags & Const.ACC_VOLATILE) != 0; + return test(Const.ACC_VOLATILE); } + /** + * Sets the volatile bit. + * + * @param flag The new value. + */ public final void isVolatile(final boolean flag) { setFlag(Const.ACC_VOLATILE, flag); } /** - * Set access flags aka "modifiers". + * Sets access flags also known as modifiers. * * @param accessFlags Access flags of the object. */ @@ -207,11 +377,21 @@ } /** - * Set access flags aka "modifiers". + * Sets access flags aka "modifiers". * * @param accessFlags Access flags of the object. */ public final void setModifiers(final int accessFlags) { setAccessFlags(accessFlags); } + + /** + * Tests whether the bit is on. + * + * @param test the bit to test. + * @return whether the bit is on. + */ + private boolean test(final short test) { + return (access_flags & test) != 0; + } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/AnnotationEntry.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,5 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,20 +26,22 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; +import jdk.xml.internal.Utils; /** * Represents one annotation in the annotation table * * @since 6.0 + * @LastModified: Sept 2025 */ public class AnnotationEntry implements Node { public static final AnnotationEntry[] EMPTY_ARRAY = {}; - public static AnnotationEntry[] createAnnotationEntries(final Attribute[] attrs) { + public static AnnotationEntry[] createAnnotationEntries(final Attribute[] attributes) { // Find attributes that contain annotation data - return Stream.of(attrs).filter(Annotations.class::isInstance).flatMap(e -> Stream.of(((Annotations) e).getAnnotationEntries())) - .toArray(AnnotationEntry[]::new); + return Utils.streamOfIfNonNull(attributes).filter(Annotations.class::isInstance).flatMap(e -> Stream.of(((Annotations) e).getAnnotationEntries())) + .toArray(AnnotationEntry[]::new); } /** @@ -55,7 +56,6 @@ public static AnnotationEntry read(final DataInput input, final ConstantPool constantPool, final boolean isRuntimeVisible) throws IOException { final AnnotationEntry annotationEntry = new AnnotationEntry(input.readUnsignedShort(), constantPool, isRuntimeVisible); final int numElementValuePairs = input.readUnsignedShort(); - annotationEntry.elementValuePairs = new ArrayList<>(); for (int i = 0; i < numElementValuePairs; i++) { annotationEntry.elementValuePairs .add(new ElementValuePair(input.readUnsignedShort(), ElementValue.readElementValue(input, constantPool), constantPool)); @@ -69,12 +69,13 @@ private final boolean isRuntimeVisible; - private List<ElementValuePair> elementValuePairs; + private final List<ElementValuePair> elementValuePairs; public AnnotationEntry(final int typeIndex, final ConstantPool constantPool, final boolean isRuntimeVisible) { this.typeIndex = typeIndex; this.constantPool = constantPool; this.isRuntimeVisible = isRuntimeVisible; + this.elementValuePairs = new ArrayList<>(); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Annotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -52,7 +52,7 @@ public Annotations(final byte annotationType, final int nameIndex, final int length, final AnnotationEntry[] annotationTable, final ConstantPool constantPool, final boolean isRuntimeVisible) { super(annotationType, nameIndex, length, constantPool); - this.annotationTable = annotationTable; + setAnnotationTable(annotationTable); this.isRuntimeVisible = isRuntimeVisible; } @@ -108,9 +108,6 @@ * @return the number of annotation entries in this annotation */ public final int getNumAnnotations() { - if (annotationTable == null) { - return 0; - } return annotationTable.length; } @@ -129,7 +126,7 @@ * @param annotationTable the entries to set in this annotation */ public final void setAnnotationTable(final AnnotationEntry[] annotationTable) { - this.annotationTable = annotationTable; + this.annotationTable = annotationTable != null ? annotationTable : AnnotationEntry.EMPTY_ARRAY; } /** @@ -151,9 +148,6 @@ } protected void writeAnnotations(final DataOutputStream dos) throws IOException { - if (annotationTable == null) { - return; - } dos.writeShort(annotationTable.length); for (final AnnotationEntry element : annotationTable) { element.dump(dos); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ArrayElementValue.java 2026-04-17 19:08:13.000000000 +0000 @@ -31,12 +31,12 @@ // For array types, this is the array private final ElementValue[] elementValues; - public ArrayElementValue(final int type, final ElementValue[] datums, final ConstantPool cpool) { + public ArrayElementValue(final int type, final ElementValue[] elementValues, final ConstantPool cpool) { super(type, cpool); if (type != ARRAY) { throw new ClassFormatException("Only element values of type array can be built with this ctor - type specified: " + type); } - this.elementValues = datums; + this.elementValues = elementValues != null ? elementValues : EMPTY_ARRAY; } @Override diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Attribute.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -53,7 +53,7 @@ * @see Synthetic * @see Deprecated * @see Signature - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public abstract class Attribute implements Cloneable, Node { private static final boolean debug = false; @@ -181,6 +181,8 @@ return new NestHost(nameIndex, length, dataInput, constantPool); case Const.ATTR_NEST_MEMBERS: return new NestMembers(nameIndex, length, dataInput, constantPool); + case Const.ATTR_RECORD: + return new Record(nameIndex, length, dataInput, constantPool); default: // Never reached throw new IllegalStateException("Unrecognized attribute type tag parsed: " + tag); @@ -279,7 +281,7 @@ try { attr = (Attribute) super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } return attr; } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethod.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,5 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +26,7 @@ import java.util.Arrays; import com.sun.org.apache.bcel.internal.Const; +import jdk.xml.internal.Utils; /** * This class represents a bootstrap method attribute, i.e., the bootstrap method ref, the number of bootstrap arguments @@ -35,9 +35,12 @@ * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.23"> The class File Format : * The BootstrapMethods Attribute</a> * @since 6.0 + * @LastModified: Sept 2025 */ public class BootstrapMethod implements Cloneable { + static final BootstrapMethod[] EMPTY_ARRAY = {}; + /** Index of the CONSTANT_MethodHandle_info structure in the constant_pool table */ private int bootstrapMethodRef; @@ -54,7 +57,7 @@ } /** - * Construct object from input stream. + * Constructs object from input stream. * * @param input Input stream * @throws IOException if an I/O error occurs. @@ -78,7 +81,7 @@ */ public BootstrapMethod(final int bootstrapMethodRef, final int[] bootstrapArguments) { this.bootstrapMethodRef = bootstrapMethodRef; - this.bootstrapArguments = bootstrapArguments; + setBootstrapArguments(bootstrapArguments); } /** @@ -87,7 +90,7 @@ public BootstrapMethod copy() { try { return (BootstrapMethod) clone(); - } catch (final CloneNotSupportedException e) { + } catch (final CloneNotSupportedException ignore) { // TODO should this throw? } return null; @@ -132,7 +135,7 @@ * @param bootstrapArguments int[] indices into constant_pool of CONSTANT_[type]_info */ public void setBootstrapArguments(final int[] bootstrapArguments) { - this.bootstrapArguments = bootstrapArguments; + this.bootstrapArguments = Utils.createEmptyArrayIfNull(bootstrapArguments); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java 2026-04-17 19:08:13.000000000 +0000 @@ -58,11 +58,11 @@ */ public BootstrapMethods(final int nameIndex, final int length, final BootstrapMethod[] bootstrapMethods, final ConstantPool constantPool) { super(Const.ATTR_BOOTSTRAP_METHODS, nameIndex, length, constantPool); - this.bootstrapMethods = bootstrapMethods; + setBootstrapMethods(bootstrapMethods); } /** - * Construct object from Input stream. + * Constructs object from Input stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes @@ -135,7 +135,7 @@ * @param bootstrapMethods the array of bootstrap methods */ public final void setBootstrapMethods(final BootstrapMethod[] bootstrapMethods) { - this.bootstrapMethods = bootstrapMethods; + this.bootstrapMethods = bootstrapMethods != null ? bootstrapMethods : BootstrapMethod.EMPTY_ARRAY; } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassFormatException.java 2026-04-17 19:08:13.000000000 +0000 @@ -47,12 +47,10 @@ /** * Constructs a new instance with the specified detail message and cause. - * <p> - * Note that the detail message associated with {@code cause} is <i>not</i> automatically incorporated in this runtime exception's detail message. * * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method). - * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method). (A {@code null} value is permitted, and indicates that - * the cause is nonexistent or unknown.) + * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method). A {@code null} value is permitted, and indicates that + * the cause is nonexistent or unknown. * @since 6.0 */ public ClassFormatException(final String message, final Throwable cause) { @@ -63,8 +61,8 @@ * Constructs a new instance with the specified cause and a detail message of {@code (cause==null ? null : cause.toString())} (which typically contains the * class and detail message of {@code cause}). This constructor is useful for runtime exceptions that are little more than wrappers for other throwables. * - * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method). (A {@code null} value is permitted, and indicates that the - * cause is nonexistent or unknown.) + * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method). A {@code null} value is permitted, and indicates that the + * cause is nonexistent or unknown. * @since 6.7.0 */ public ClassFormatException(final Throwable cause) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ClassParser.java 2026-04-17 19:08:13.000000000 +0000 @@ -37,7 +37,7 @@ * appropriate exception is propagated back to the caller. * * The structure and the names comply, except for a few conveniences, exactly with the - * <a href="http://docs.oracle.com/javase/specs/"> JVM specification 1.0</a>. See this paper for further details about + * <a href="https://docs.oracle.com/javase/specs/"> JVM specification 1.0</a>. See this paper for further details about * the structure of a bytecode file. */ public final class ClassParser { @@ -57,7 +57,7 @@ private Field[] fields; // class fields, i.e., its variables private Method[] methods; // methods defined in the class private Attribute[] attributes; // attributes defined in the class - private final boolean isZip; // Loaded from zip file + private final boolean isZip; // Loaded from ZIP file /** * Parses class from the given stream. @@ -91,7 +91,7 @@ /** * Parses class from given .class file in a ZIP-archive * - * @param zipFile zip file name + * @param zipFile ZIP file name * @param fileName file name */ public ClassParser(final String zipFile, final String fileName) { @@ -104,7 +104,7 @@ /** * Parses the given Java class file and return an object that represents the contained data, i.e., constants, methods, * fields and commands. A <em>ClassFormatException</em> is raised, if the file is not a valid .class file. (This does - * not include verification of the byte code as it is performed by the java interpreter). + * not include verification of the byte code as it is performed by the Java interpreter). * * @return Class object representing the parsed class file * @throws IOException if an I/O error occurs. @@ -151,11 +151,11 @@ // for (int i=0; i < u.length; i++) // System.err.println("WARNING: " + u[i]); // Everything should have been read now - // if(file.available() > 0) { + // if (file.available() > 0) { // int bytes = file.available(); // byte[] buf = new byte[bytes]; // file.read(buf); - // if(!(isZip && (buf.length == 1))) { + // if (!(isZip && (buf.length == 1))) { // System.err.println("WARNING: Trailing garbage at end of " + fileName); // System.err.println(bytes + " extra bytes: " + Utility.toHexString(buf)); // } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Code.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +27,7 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.util.Args; +import jdk.xml.internal.Utils; /** * This class represents a chunk of Java byte code contained in a method. It is instantiated by the @@ -59,7 +60,7 @@ * @see CodeException * @see LineNumberTable * @see LocalVariableTable - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class Code extends Attribute { @@ -93,7 +94,7 @@ code = new byte[codeLength]; // Read byte code file.readFully(code); /* - * Read exception table that contains all regions where an exception handler is active, i.e., a try { ... } catch() + * Read exception table that contains all regions where an exception handler is active, i.e., a try { ... } catch () * block. */ final int exceptionTableLength = file.readUnsignedShort(); @@ -107,7 +108,7 @@ final int attributesCount = file.readUnsignedShort(); attributes = new Attribute[attributesCount]; for (int i = 0; i < attributesCount; i++) { - attributes[i] = Attribute.readAttribute(file, constantPool); + attributes[i] = readAttribute(file, constantPool); } /* * Adjust length, because of setAttributes in this(), s.b. length is incorrect, because it didn't take the internal @@ -131,8 +132,8 @@ super(Const.ATTR_CODE, nameIndex, length, constantPool); this.maxStack = Args.requireU2(maxStack, "maxStack"); this.maxLocals = Args.requireU2(maxLocals, "maxLocals"); - this.code = code != null ? code : Const.EMPTY_BYTE_ARRAY; - this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_CODE_EXCEPTION_ARRAY; + this.code = Utils.createEmptyArrayIfNull(code); + this.exceptionTable = Utils.createEmptyArrayIfNull(exceptionTable, CodeException[].class); Args.requireU2(this.exceptionTable.length, "exceptionTable.length"); this.attributes = attributes != null ? attributes : EMPTY_ARRAY; super.setLength(calculateLength()); // Adjust length @@ -264,6 +265,20 @@ } /** + * Gets the local variable type table attribute {@link LocalVariableTypeTable}. + * @return LocalVariableTypeTable of Code, if it has one, null otherwise. + * @since 6.10.0 + */ + public LocalVariableTypeTable getLocalVariableTypeTable() { + for (final Attribute attribute : attributes) { + if (attribute instanceof LocalVariableTypeTable) { + return (LocalVariableTypeTable) attribute; + } + } + return null; + } + + /** * @return Number of local variables. */ public int getMaxLocals() { @@ -278,6 +293,20 @@ } /** + * Finds the attribute of {@link StackMap} instance. + * @return StackMap of Code, if it has one, else null. + * @since 6.8.0 + */ + public StackMap getStackMap() { + for (final Attribute attribute : attributes) { + if (attribute instanceof StackMap) { + return (StackMap) attribute; + } + } + return null; + } + + /** * @param attributes the attributes to set for this Code */ public void setAttributes(final Attribute[] attributes) { @@ -289,7 +318,7 @@ * @param code byte code */ public void setCode(final byte[] code) { - this.code = code != null ? code : Const.EMPTY_BYTE_ARRAY; + this.code = Utils.createEmptyArrayIfNull(code); super.setLength(calculateLength()); // Adjust length } @@ -297,7 +326,7 @@ * @param exceptionTable exception table */ public void setExceptionTable(final CodeException[] exceptionTable) { - this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_CODE_EXCEPTION_ARRAY; + this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_ARRAY; super.setLength(calculateLength()); // Adjust length } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/CodeException.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -52,19 +52,19 @@ * </pre> * * @see Code - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class CodeException implements Cloneable, Node { /** * Empty array. */ - static final CodeException[] EMPTY_CODE_EXCEPTION_ARRAY = {}; + static final CodeException[] EMPTY_ARRAY = {}; /** Range in the code the exception handler. */ private int startPc; - /** active. startPc is inclusive, endPc exclusive. */ + /** Active. startPc is inclusive, endPc exclusive. */ private int endPc; /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Constant.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,30 +32,29 @@ * in the constant pool of a class file. The classes keep closely to * the JVM specification. * - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public abstract class Constant implements Cloneable, Node { - private static BCELComparator bcelComparator = new BCELComparator() { + static final Constant[] EMPTY_ARRAY = {}; + + private static BCELComparator<Constant> bcelComparator = new BCELComparator<Constant>() { @Override - public boolean equals(final Object o1, final Object o2) { - final Constant THIS = (Constant) o1; - final Constant THAT = (Constant) o2; - return Objects.equals(THIS.toString(), THAT.toString()); + public boolean equals(final Constant a, final Constant b) { + return a == b || a != null && b != null && Objects.equals(a.toString(), b.toString()); } @Override - public int hashCode(final Object o) { - final Constant THIS = (Constant) o; - return THIS.toString().hashCode(); + public int hashCode(final Constant o) { + return o != null ? Objects.hashCode(o.toString()) : 0; } }; /** - * @return Comparison strategy object + * @return Comparison strategy object. */ - public static BCELComparator getComparator() { + public static BCELComparator<Constant> getComparator() { return bcelComparator; } @@ -113,7 +112,7 @@ /** * @param comparator Comparison strategy object */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<Constant> comparator) { bcelComparator = comparator; } @@ -148,7 +147,7 @@ try { return super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } } @@ -174,7 +173,7 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof Constant && bcelComparator.equals(this, (Constant) obj); } /** @@ -185,7 +184,7 @@ } /** - * Returns value as defined by given BCELComparator strategy. By default return the hashcode of the result of + * Returns value as defined by given BCELComparator strategy. By default return the hash code of the result of * toString(). * * @see Object#hashCode() diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantCP.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,11 +28,11 @@ /** * Abstract super class for Fieldref, Methodref, InterfaceMethodref and InvokeDynamic constants. * - * @see ConstantFieldref - * @see ConstantMethodref - * @see ConstantInterfaceMethodref - * @see ConstantInvokeDynamic - * @LastModified: Jun 2019 + * @see ConstantFieldref + * @see ConstantMethodref + * @see ConstantInterfaceMethodref + * @see ConstantInvokeDynamic + * @LastModified: Sept 2025 */ public abstract class ConstantCP extends Constant { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantDouble.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,8 +29,8 @@ /** * This class is derived from the abstract {@link Constant} and represents a reference to a Double object. * - * @see Constant - * @LastModified: Jun 2019 + * @see Constant + * @LastModified: Sept 2025 */ public final class ConstantDouble extends Constant implements ConstantObject { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantFloat.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,8 +29,8 @@ /** * This class is derived from the abstract {@link Constant} and represents a reference to a float object. * - * @see Constant - * @LastModified: Jun 2019 + * @see Constant + * @LastModified: Sept 2025 */ public final class ConstantFloat extends Constant implements ConstantObject { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantInteger.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,8 +29,8 @@ /** * This class is derived from the abstract {@link Constant} and represents a reference to an int object. * - * @see Constant - * @LastModified: Jun 2019 + * @see Constant + * @LastModified: Sept 2025 */ public final class ConstantInteger extends Constant implements ConstantObject { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantLong.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,8 +29,8 @@ /** * This class is derived from the abstract {@link Constant} and represents a reference to a long object. * - * @see Constant - * @LastModified: Jan 2020 + * @see Constant + * @LastModified: Sept 2025 */ public final class ConstantLong extends Constant implements ConstantObject { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantObject.java 2026-04-17 19:08:13.000000000 +0000 @@ -29,7 +29,10 @@ public interface ConstantObject { /** - * @return object representing the constant, e.g., Long for ConstantLong + * Gets the object representing the constant, e.g., Long for ConstantLong. + * + * @param constantPool the constant. + * @return object representing the constant, e.g., Long for ConstantLong. */ - Object getConstantValue(ConstantPool cp); + Object getConstantValue(ConstantPool constantPool); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantPool.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,7 +35,7 @@ * * @see Constant * @see com.sun.org.apache.bcel.internal.generic.ConstantPoolGen - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class ConstantPool implements Cloneable, Node, Iterable<Constant> { @@ -73,7 +73,7 @@ * @param constantPool Array of constants */ public ConstantPool(final Constant[] constantPool) { - this.constantPool = constantPool; + setConstantPool(constantPool); } /** @@ -88,6 +88,7 @@ constantPool = new Constant[constantPoolCount]; /* * constantPool[0] is unused by the compiler and may be used freely by the implementation. + * constantPool[0] is currently unused by the implementation. */ for (int i = 1; i < constantPoolCount; i++) { constantPool[i] = Constant.readConstant(input); @@ -288,7 +289,7 @@ */ public <T extends Constant> T getConstant(final int index, final byte tag, final Class<T> castTo) throws ClassFormatException { final T c = getConstant(index); - if (c.getTag() != tag) { + if (c == null || c.getTag() != tag) { throw new ClassFormatException("Expected class '" + Const.getConstantName(tag) + "' at index " + index + " and got " + c); } return c; @@ -313,16 +314,18 @@ throw new ClassFormatException("Invalid constant pool reference at index: " + index + ". Expected " + castTo + " but was " + constantPool[index].getClass()); } - // Previous check ensures this won't throw a ClassCastException - final T c = castTo.cast(constantPool[index]); - if (c == null - // the 0th element is always null - && index != 0) { + if (index > 1) { final Constant prev = constantPool[index - 1]; - if (prev == null || prev.getTag() != Const.CONSTANT_Double && prev.getTag() != Const.CONSTANT_Long) { - throw new ClassFormatException("Constant pool at index " + index + " is null."); + if (prev != null && (prev.getTag() == Const.CONSTANT_Double || prev.getTag() == Const.CONSTANT_Long)) { + throw new ClassFormatException("Constant pool at index " + index + " is invalid. The index is unused due to the preceeding " + + Const.getConstantName(prev.getTag()) + "."); } } + // Previous check ensures this won't throw a ClassCastException + final T c = castTo.cast(constantPool[index]); + if (c == null) { + throw new ClassFormatException("Constant pool at index " + index + " is null."); + } return c; } @@ -402,7 +405,7 @@ * @return Length of constant pool. */ public int getLength() { - return constantPool == null ? 0 : constantPool.length; + return constantPool.length; } @Override @@ -421,7 +424,7 @@ * @param constantPool */ public void setConstantPool(final Constant[] constantPool) { - this.constantPool = constantPool; + this.constantPool = constantPool != null ? constantPool : Constant.EMPTY_ARRAY; } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantUtf8.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,11 +36,11 @@ * The following system properties govern caching this class performs. * </p> * <ul> - * <li>{@value #SYS_PROP_CACHE_MAX_ENTRIES} (since 6.4): The size of the cache, by default 0, meaning caching is + * <li>{@link #SYS_PROP_CACHE_MAX_ENTRIES} (since 6.4): The size of the cache, by default 0, meaning caching is * disabled.</li> - * <li>{@value #SYS_PROP_CACHE_MAX_ENTRY_SIZE} (since 6.0): The maximum size of the values to cache, by default 200, 0 + * <li>{@link #SYS_PROP_CACHE_MAX_ENTRY_SIZE} (since 6.0): The maximum size of the values to cache, by default 200, 0 * disables caching. Values larger than this are <em>not</em> cached.</li> - * <li>{@value #SYS_PROP_STATISTICS} (since 6.0): Prints statistics on the console when the JVM exits.</li> + * <li>{@link #SYS_PROP_STATISTICS} (since 6.0): Prints statistics on the console when the JVM exits.</li> * </ul> * <p> * Here is a sample Maven invocation with caching disabled: @@ -58,11 +58,11 @@ * </pre> * * @see Constant - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class ConstantUtf8 extends Constant { - private static class Cache { + private static final class Cache { private static final boolean BCEL_STATISTICS = false; private static final int MAX_ENTRIES = 20000; @@ -82,7 +82,7 @@ private static final int MAX_ENTRY_SIZE = 200; static boolean isEnabled() { - return Cache.MAX_ENTRIES > 0 && MAX_ENTRY_SIZE > 0; + return MAX_ENTRIES > 0 && MAX_ENTRY_SIZE > 0; } } @@ -117,6 +117,11 @@ hits = considered = skipped = created = 0; } + // Avoid Spotbugs complaint about Write to static field + private static void countCreated() { + created++; + } + /** * Gets a new or cached instance of the given value. * <p> @@ -203,7 +208,7 @@ ConstantUtf8(final DataInput dataInput) throws IOException { super(Const.CONSTANT_Utf8); value = dataInput.readUTF(); - created++; + countCreated(); } /** @@ -212,7 +217,7 @@ public ConstantUtf8(final String value) { super(Const.CONSTANT_Utf8); this.value = Objects.requireNonNull(value, "value"); - created++; + countCreated(); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ConstantValue.java 2026-04-17 19:08:13.000000000 +0000 @@ -56,7 +56,7 @@ } /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Name index in constant pool * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Deprecated.java 2026-04-17 19:08:13.000000000 +0000 @@ -59,7 +59,7 @@ } /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -22,12 +22,13 @@ import java.util.Objects; import java.util.Stack; import java.util.stream.Stream; +import jdk.xml.internal.Utils; /** - * Traverses a JavaClass with another Visitor object 'piggy-backed' that is - * applied to all components of a JavaClass object. I.e. this class supplies the - * traversal strategy, other classes can make use of it. + * Traverses a JavaClass with another Visitor object 'piggy-backed' that is applied to all components of a JavaClass + * object. I.e. this class supplies the traversal strategy, other classes can make use of it. * + * @LastModified: Sept 2025 */ public class DescendingVisitor implements Visitor { private final JavaClass clazz; @@ -46,7 +47,7 @@ } private <E extends Node> void accept(final E[] node) { - Stream.of(node).forEach(e -> e.accept(this)); + Utils.streamOfIfNonNull(node).forEach(e -> e.accept(this)); } /** @@ -508,6 +509,21 @@ } @Override + public void visitRecord(final Record record) { + stack.push(record); + record.accept(visitor); + accept(record.getComponents()); + stack.pop(); + } + + @Override + public void visitRecordComponent(final RecordComponentInfo recordComponentInfo) { + stack.push(recordComponentInfo); + recordComponentInfo.accept(visitor); + stack.pop(); + } + + @Override public void visitSignature(final Signature attribute) { stack.push(attribute); attribute.accept(visitor); @@ -533,6 +549,20 @@ public void visitStackMapEntry(final StackMapEntry var) { stack.push(var); var.accept(visitor); + accept(var.getTypesOfLocals()); + accept(var.getTypesOfStackItems()); + stack.pop(); + } + + /** + * Visits a {@link StackMapType} object. + * @param var object to visit + * @since 6.8.0 + */ + @Override + public void visitStackMapType(final StackMapType var) { + stack.push(var); + var.accept(visitor); stack.pop(); } @@ -549,4 +579,5 @@ attribute.accept(visitor); stack.pop(); } + } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ElementValue.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -50,7 +50,7 @@ *} *</pre> * @since 6.0 - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public abstract class ElementValue { @@ -67,6 +67,7 @@ public static final byte PRIMITIVE_LONG = 'J'; public static final byte PRIMITIVE_SHORT = 'S'; public static final byte PRIMITIVE_BOOLEAN = 'Z'; + static final ElementValue[] EMPTY_ARRAY = {}; /** * Reads an {@code element_value} as an {@code ElementValue}. @@ -124,7 +125,7 @@ final int numArrayVals = input.readUnsignedShort(); final ElementValue[] evalues = new ElementValue[numArrayVals]; for (int j = 0; j < numArrayVals; j++) { - evalues[j] = ElementValue.readElementValue(input, cpool, arrayNesting); + evalues[j] = readElementValue(input, cpool, arrayNesting); } return new ArrayElementValue(ARRAY, evalues, cpool); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/EmptyVisitor.java 2026-04-17 19:08:13.000000000 +0000 @@ -315,6 +315,15 @@ public void visitStackMapEntry(final StackMapEntry obj) { } + /** + * Visits a {@link StackMapType} object. + * @param obj object to visit + * @since 6.8.0 + */ + @Override + public void visitStackMapType(final StackMapType obj) { + } + @Override public void visitSynthetic(final Synthetic obj) { } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ExceptionTable.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +27,7 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.util.Args; +import jdk.xml.internal.Utils; /** * This class represents the table of exceptions that are thrown by a method. This attribute may be used once per @@ -43,7 +44,7 @@ * } * </pre> * @see Code - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class ExceptionTable extends Attribute { @@ -60,7 +61,7 @@ } /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool * @param length Content length in bytes @@ -85,7 +86,7 @@ */ public ExceptionTable(final int nameIndex, final int length, final int[] exceptionIndexTable, final ConstantPool constantPool) { super(Const.ATTR_EXCEPTIONS, nameIndex, length, constantPool); - this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : Const.EMPTY_INT_ARRAY; + this.exceptionIndexTable = Utils.createEmptyArrayIfNull(exceptionIndexTable); Args.requireU2(this.exceptionIndexTable.length, "exceptionIndexTable.length"); } @@ -156,7 +157,7 @@ * length. */ public void setExceptionIndexTable(final int[] exceptionIndexTable) { - this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : Const.EMPTY_INT_ARRAY; + this.exceptionIndexTable = Utils.createEmptyArrayIfNull(exceptionIndexTable); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Field.java 2026-04-17 19:08:13.000000000 +0000 @@ -42,45 +42,37 @@ */ public static final Field[] EMPTY_ARRAY = {}; - private static BCELComparator bcelComparator = new BCELComparator() { + private static BCELComparator<Field> bcelComparator = new BCELComparator<Field>() { @Override - public boolean equals(final Object o1, final Object o2) { - final Field THIS = (Field) o1; - final Field THAT = (Field) o2; - return Objects.equals(THIS.getName(), THAT.getName()) && Objects.equals(THIS.getSignature(), THAT.getSignature()); + public boolean equals(final Field a, final Field b) { + return a == b || a != null && b != null && Objects.equals(a.getName(), b.getName()) && Objects.equals(a.getSignature(), b.getSignature()); } @Override - public int hashCode(final Object o) { - final Field THIS = (Field) o; - return THIS.getSignature().hashCode() ^ THIS.getName().hashCode(); + public int hashCode(final Field o) { + return o != null ? Objects.hash(o.getSignature(), o.getName()) : 0; } }; /** - * Empty array. + * @return Comparison strategy object. */ - static final Field[] EMPTY_FIELD_ARRAY = {}; - - /** - * @return Comparison strategy object - */ - public static BCELComparator getComparator() { + public static BCELComparator<Field> getComparator() { return bcelComparator; } /** - * @param comparator Comparison strategy object + * @param comparator Comparison strategy object. */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<Field> comparator) { bcelComparator = comparator; } /** - * Construct object from file stream. + * Constructs object from file stream. * - * @param file Input stream + * @param file Input stream. */ Field(final DataInput file, final ConstantPool constantPool) throws IOException, ClassFormatException { super(file, constantPool); @@ -133,7 +125,7 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof Field && bcelComparator.equals(this, (Field) obj); } /** @@ -149,14 +141,16 @@ } /** + * See https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.2.2 + * * @return type of field */ public Type getType() { - return Type.getReturnType(getSignature()); + return Type.getType(getSignature()); } /** - * Return value as defined by given BCELComparator strategy. By default return the hashcode of the field's name XOR + * Return value as defined by given BCELComparator strategy. By default return the hash code of the field's name XOR * signature. * * @see Object#hashCode() diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/FieldOrMethod.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,7 +28,7 @@ /** * Abstract super class for fields and methods. * - * @LastModified: Jan 2020 + * @LastModified: Sept 2025 */ public abstract class FieldOrMethod extends AccessFlags implements Cloneable, Node { @@ -72,7 +72,7 @@ } /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O error occurs. @@ -88,7 +88,7 @@ } /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O error occurs. @@ -137,7 +137,7 @@ Arrays.setAll(c.attributes, i -> attributes[i].copy(constantPool)); return c; } catch (final CloneNotSupportedException e) { - throw new IllegalStateException(e); + throw new UnsupportedOperationException(e); } } @@ -152,10 +152,8 @@ file.writeShort(name_index); file.writeShort(signature_index); file.writeShort(attributes_count); - if (attributes != null) { - for (final Attribute attribute : attributes) { - attribute.dump(file); - } + for (final Attribute attribute : attributes) { + attribute.dump(file); } } @@ -172,6 +170,22 @@ } /** + * Gets attribute for given tag. + * @return Attribute for given tag, null if not found. + * Refer to {@link com.sun.org.apache.bcel.internal.Const#ATTR_UNKNOWN} constants named ATTR_* for possible values. + * @since 6.10.0 + */ + @SuppressWarnings("unchecked") + public final <T extends Attribute> T getAttribute(final byte tag) { + for (final Attribute attribute : getAttributes()) { + if (attribute.getTag() == tag) { + return (T) attribute; + } + } + return null; + } + + /** * @return Collection of object attributes. */ public final Attribute[] getAttributes() { @@ -221,7 +235,7 @@ } /** - * @return String representation of object's type signature (java style) + * @return String representation of object's type signature (Java style) */ public final String getSignature() { return constant_pool.getConstantUtf8(signature_index).getBytes(); @@ -238,8 +252,8 @@ * @param attributes Collection of object attributes. */ public final void setAttributes(final Attribute[] attributes) { - this.attributes = attributes; - this.attributes_count = attributes != null ? attributes.length : 0; // init deprecated field + this.attributes = attributes != null ? attributes : Attribute.EMPTY_ARRAY; + this.attributes_count = this.attributes.length; // init deprecated field } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -41,7 +41,7 @@ private int innerAccessFlags; /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O error occurs. diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InnerClasses.java 2026-04-17 19:08:13.000000000 +0000 @@ -42,7 +42,7 @@ /** * Empty array. */ - private static final InnerClass[] EMPTY_INNER_CLASSE_ARRAY = {}; + private static final InnerClass[] EMPTY_ARRAY = {}; private InnerClass[] innerClasses; @@ -57,7 +57,7 @@ } /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes @@ -82,7 +82,7 @@ */ public InnerClasses(final int nameIndex, final int length, final InnerClass[] innerClasses, final ConstantPool constantPool) { super(Const.ATTR_INNER_CLASSES, nameIndex, length, constantPool); - this.innerClasses = innerClasses != null ? innerClasses : EMPTY_INNER_CLASSE_ARRAY; + this.innerClasses = innerClasses != null ? innerClasses : EMPTY_ARRAY; Args.requireU2(this.innerClasses.length, "innerClasses.length"); } @@ -141,7 +141,7 @@ * @param innerClasses the array of inner classes */ public void setInnerClasses(final InnerClass[] innerClasses) { - this.innerClasses = innerClasses != null ? innerClasses : EMPTY_INNER_CLASSE_ARRAY; + this.innerClasses = innerClasses != null ? innerClasses : EMPTY_ARRAY; } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InvalidMethodSignatureException.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InvalidMethodSignatureException.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InvalidMethodSignatureException.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/InvalidMethodSignatureException.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package com.sun.org.apache.bcel.internal.classfile; + +/** + * Thrown when the BCEL attempts to read a class file and determines that a class is malformed or otherwise cannot be interpreted as a class file. + * + * @since 6.8.0 + */ +public class InvalidMethodSignatureException extends ClassFormatException { + + private static final long serialVersionUID = 1L; + + /** + * Constructs a new instance with the specified invalid signature as the message. + * + * @param signature The invalid signature is saved for later retrieval by the {@link #getMessage()} method. + */ + public InvalidMethodSignatureException(final String signature) { + super(signature); + } + + /** + * Constructs a new instance with the specified invalid signature as the message and a cause. + * + * @param signature The invalid signature is saved for later retrieval by the {@link #getMessage()} method. + * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method). A {@code null} value is permitted, and indicates that + * the cause is nonexistent or unknown. + */ + public InvalidMethodSignatureException(final String signature, final Throwable cause) { + super(signature, cause); + } + +} diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/JavaClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +38,7 @@ import com.sun.org.apache.bcel.internal.util.BCELComparator; import com.sun.org.apache.bcel.internal.util.ClassQueue; import com.sun.org.apache.bcel.internal.util.SyntheticRepository; +import jdk.xml.internal.Utils; /** * Represents a Java class, i.e., the data structures, constant pool, fields, methods and commands contained in a Java @@ -46,7 +47,7 @@ * classes should see the <a href="../generic/ClassGen.html">ClassGen</a> class. * * @see com.sun.org.apache.bcel.internal.generic.ClassGen - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable<JavaClass> { @@ -67,26 +68,23 @@ public static final byte HEAP = 1; public static final byte FILE = 2; public static final byte ZIP = 3; - private static BCELComparator bcelComparator = new BCELComparator() { + private static BCELComparator<JavaClass> bcelComparator = new BCELComparator<JavaClass>() { @Override - public boolean equals(final Object o1, final Object o2) { - final JavaClass THIS = (JavaClass) o1; - final JavaClass THAT = (JavaClass) o2; - return Objects.equals(THIS.getClassName(), THAT.getClassName()); + public boolean equals(final JavaClass a, final JavaClass b) { + return a == b || a != null && b != null && Objects.equals(a.getClassName(), b.getClassName()); } @Override - public int hashCode(final Object o) { - final JavaClass THIS = (JavaClass) o; - return THIS.getClassName().hashCode(); + public int hashCode(final JavaClass o) { + return o != null ? Objects.hashCode(o.getClassName()) : 0; } }; /** - * @return Comparison strategy object + * @return Comparison strategy object. */ - public static BCELComparator getComparator() { + public static BCELComparator<JavaClass> getComparator() { return bcelComparator; } @@ -100,9 +98,9 @@ } /** - * @param comparator Comparison strategy object + * @param comparator Comparison strategy object. */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<JavaClass> comparator) { bcelComparator = comparator; } @@ -128,8 +126,10 @@ private boolean isAnonymous; private boolean isNested; + private boolean isRecord; private boolean computedNestedTypeStatus; + private boolean computedRecord; /** * In cases where we go ahead and create something, use the default SyntheticRepository, because we don't know any @@ -177,17 +177,15 @@ public JavaClass(final int classNameIndex, final int superclassNameIndex, final String fileName, final int major, final int minor, final int accessFlags, final ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes, final byte source) { super(accessFlags); - if (interfaces == null) { - interfaces = Const.EMPTY_INT_ARRAY; - } + interfaces = Utils.createEmptyArrayIfNull(interfaces); if (attributes == null) { attributes = Attribute.EMPTY_ARRAY; } if (fields == null) { - fields = Field.EMPTY_FIELD_ARRAY; + fields = Field.EMPTY_ARRAY; } if (methods == null) { - methods = Method.EMPTY_METHOD_ARRAY; + methods = Method.EMPTY_ARRAY; } this.classNameIndex = classNameIndex; this.superclassNameIndex = superclassNameIndex; @@ -254,6 +252,19 @@ return getClassName().compareTo(obj.getClassName()); } + private void computeIsRecord() { + if (computedRecord) { + return; + } + for (final Attribute attribute : this.attributes) { + if (attribute instanceof Record) { + isRecord = true; + break; + } + } + this.computedRecord = true; + } + private void computeNestedTypeStatus() { if (computedNestedTypeStatus) { return; @@ -384,11 +395,51 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof JavaClass && bcelComparator.equals(this, (JavaClass) obj); } /** - * Get all interfaces implemented by this JavaClass (transitively). + * Finds a visible field by name and type in this class and its super classes. + * @param fieldName the field name to find + * @param fieldType the field type to find + * @return field matching given name and type, null if field is not found or not accessible from this class. + * @throws ClassNotFoundException + * @since 6.8.0 + */ + public Field findField(final String fieldName, final Type fieldType) throws ClassNotFoundException { + for (final Field field : fields) { + if (field.getName().equals(fieldName)) { + final Type fType = Type.getType(field.getSignature()); + /* + * TODO: Check if assignment compatibility is sufficient. What does Sun do? + */ + if (fType.equals(fieldType)) { + return field; + } + } + } + + final JavaClass superclass = getSuperClass(); + if (superclass != null && !"java.lang.Object".equals(superclass.getClassName())) { + final Field f = superclass.findField(fieldName, fieldType); + if (f != null && (f.isPublic() || f.isProtected() || !f.isPrivate() && packageName.equals(superclass.getPackageName()))) { + return f; + } + } + final JavaClass[] implementedInterfaces = getInterfaces(); + if (implementedInterfaces != null) { + for (final JavaClass implementedInterface : implementedInterfaces) { + final Field f = implementedInterface.findField(fieldName, fieldType); + if (f != null) { + return f; + } + } + } + return null; + } + + /** + * Gets all interfaces implemented by this JavaClass (transitively). * * @throws ClassNotFoundException if any of the class's superclasses or interfaces can't be found. */ @@ -409,7 +460,7 @@ queue.enqueue(iface); } } - return allInterfaces.toArray(JavaClass.EMPTY_ARRAY); + return allInterfaces.toArray(EMPTY_ARRAY); } /** @@ -425,6 +476,22 @@ } /** + * Gets attribute for given tag. + * @return Attribute for given tag, null if not found. + * Refer to {@link com.sun.org.apache.bcel.internal.Const#ATTR_UNKNOWN} constants named ATTR_* for possible values. + * @since 6.10.0 + */ + @SuppressWarnings("unchecked") + public final <T extends Attribute> T getAttribute(final byte tag) { + for (final Attribute attribute : getAttributes()) { + if (attribute.getTag() == tag) { + return (T) attribute; + } + } + return null; + } + + /** * @return Attributes of the class. */ public Attribute[] getAttributes() { @@ -495,7 +562,7 @@ } /** - * Get interfaces directly implemented by this JavaClass. + * Gets interfaces directly implemented by this JavaClass. * * @throws ClassNotFoundException if any of the class's interfaces can't be found. */ @@ -587,7 +654,7 @@ } /** - * @return the superclass for this JavaClass object, or null if this is java.lang.Object + * @return the superclass for this JavaClass object, or null if this is {@link Object} * @throws ClassNotFoundException if the superclass can't be found */ public JavaClass getSuperClass() throws ClassNotFoundException { @@ -607,12 +674,12 @@ for (clazz = clazz.getSuperClass(); clazz != null; clazz = clazz.getSuperClass()) { allSuperClasses.add(clazz); } - return allSuperClasses.toArray(JavaClass.EMPTY_ARRAY); + return allSuperClasses.toArray(EMPTY_ARRAY); } /** - * returns the super class name of this class. In the case that this class is java.lang.Object, it will return itself - * (java.lang.Object). This is probably incorrect but isn't fixed at this time to not break existing clients. + * returns the super class name of this class. In the case that this class is {@link Object}, it will return itself + * ({@link Object}). This is probably incorrect but isn't fixed at this time to not break existing clients. * * @return Superclass name. */ @@ -628,7 +695,7 @@ } /** - * Return value as defined by given BCELComparator strategy. By default return the hashcode of the class name. + * Return value as defined by given BCELComparator strategy. By default return the hash code of the class name. * * @see Object#hashCode() */ @@ -645,7 +712,7 @@ if (!inter.isInterface()) { throw new IllegalArgumentException(inter.getClassName() + " is no interface"); } - if (this.equals(inter)) { + if (equals(inter)) { return true; } final JavaClass[] superInterfaces = getAllInterfaces(); @@ -664,7 +731,7 @@ * @throws ClassNotFoundException if superclasses or superinterfaces of this object can't be found */ public final boolean instanceOf(final JavaClass superclass) throws ClassNotFoundException { - if (this.equals(superclass)) { + if (equals(superclass)) { return true; } for (final JavaClass clazz : getSuperClasses()) { @@ -698,6 +765,17 @@ return this.isNested; } + /** + * Tests whether this class was declared as a record + * + * @return true if a record attribute is present, false otherwise. + * @since 6.9.0 + */ + public boolean isRecord() { + computeIsRecord(); + return this.isRecord; + } + public final boolean isSuper() { return (super.getAccessFlags() & Const.ACC_SUPER) != 0; } @@ -706,7 +784,7 @@ * @param attributes . */ public void setAttributes(final Attribute[] attributes) { - this.attributes = attributes; + this.attributes = attributes != null ? attributes : Attribute.EMPTY_ARRAY; } /** @@ -734,11 +812,11 @@ * @param fields . */ public void setFields(final Field[] fields) { - this.fields = fields; + this.fields = fields != null ? fields : Field.EMPTY_ARRAY; } /** - * Set File name of class, aka SourceFile attribute value + * Sets File name of class, aka SourceFile attribute value */ public void setFileName(final String fileName) { this.fileName = fileName; @@ -748,14 +826,14 @@ * @param interfaceNames . */ public void setInterfaceNames(final String[] interfaceNames) { - this.interfaceNames = interfaceNames; + this.interfaceNames = Utils.createEmptyArrayIfNull(interfaceNames, String[].class); } /** * @param interfaces . */ public void setInterfaces(final int[] interfaces) { - this.interfaces = interfaces; + this.interfaces = Utils.createEmptyArrayIfNull(interfaces); } /** @@ -769,7 +847,7 @@ * @param methods . */ public void setMethods(final Method[] methods) { - this.methods = methods; + this.methods = methods != null ? methods : Method.EMPTY_ARRAY; } /** @@ -787,7 +865,7 @@ } /** - * Set absolute path to file this class was read from. + * Sets absolute path to file this class was read from. */ public void setSourceFileName(final String sourceFileName) { this.sourceFileName = sourceFileName; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumber.java 2026-04-17 19:08:13.000000000 +0000 @@ -40,11 +40,11 @@ /** Program Counter (PC) corresponds to line */ private int startPc; - /** number in source file */ + /** Number in source file */ private int lineNumber; /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O Exception occurs in readUnsignedShort diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LineNumberTable.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,7 +36,7 @@ * * @see Code * @see LineNumber - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public final class LineNumberTable extends Attribute implements Iterable<LineNumber> { @@ -44,7 +44,7 @@ private LineNumber[] lineNumberTable; // Table of line/numbers pairs /** - * Construct object from input stream. + * Constructs a new instance from a data input stream. * * @param nameIndex Index of name * @param length Content length in bytes @@ -61,13 +61,12 @@ } } - /* - * @param nameIndex Index of name + /** + * Constructs a new instance. * + * @param nameIndex Index of name * @param length Content length in bytes - * * @param lineNumberTable Table of line/numbers pairs - * * @param constantPool Array of constants */ public LineNumberTable(final int nameIndex, final int length, final LineNumber[] lineNumberTable, final ConstantPool constantPool) { @@ -76,9 +75,11 @@ Args.requireU2(this.lineNumberTable.length, "lineNumberTable.length"); } - /* - * Initialize from another object. Note that both objects use the same references (shallow copy). Use copy() for a - * physical copy. + /** + * Constructs a new instance from another. + * <p> + * Note that both objects use the same references (shallow copy). Use copy() for a physical copy. + * </p> */ public LineNumberTable(final LineNumberTable c) { this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool()); @@ -190,7 +191,7 @@ * @param lineNumberTable the line number entries for this table */ public void setLineNumberTable(final LineNumber[] lineNumberTable) { - this.lineNumberTable = lineNumberTable; + this.lineNumberTable = lineNumberTable != null ? lineNumberTable : LineNumber.EMPTY_ARRAY; } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTable.java 2026-04-17 19:08:13.000000000 +0000 @@ -40,10 +40,12 @@ */ public class LocalVariableTable extends Attribute implements Iterable<LocalVariable> { + private static final LocalVariable[] EMPTY_ARRAY = {}; + private LocalVariable[] localVariableTable; // variables /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool * @param length Content length in bytes @@ -68,7 +70,7 @@ */ public LocalVariableTable(final int nameIndex, final int length, final LocalVariable[] localVariableTable, final ConstantPool constantPool) { super(Const.ATTR_LOCAL_VARIABLE_TABLE, nameIndex, length, constantPool); - this.localVariableTable = localVariableTable != null ? localVariableTable : LocalVariable.EMPTY_ARRAY; + this.localVariableTable = localVariableTable != null ? localVariableTable : EMPTY_ARRAY; Args.requireU2(this.localVariableTable.length, "localVariableTable.length"); } @@ -167,7 +169,7 @@ } public final int getTableLength() { - return localVariableTable == null ? 0 : localVariableTable.length; + return localVariableTable.length; } @Override @@ -176,7 +178,7 @@ } public final void setLocalVariableTable(final LocalVariable[] localVariableTable) { - this.localVariableTable = localVariableTable; + this.localVariableTable = localVariableTable != null ? localVariableTable : EMPTY_ARRAY; } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/LocalVariableTypeTable.java 2026-04-17 19:08:13.000000000 +0000 @@ -63,14 +63,14 @@ */ public class LocalVariableTypeTable extends Attribute implements Iterable<LocalVariable> { + private static final LocalVariable[] EMPTY_ARRAY = {}; + private LocalVariable[] localVariableTypeTable; // variables LocalVariableTypeTable(final int nameIdx, final int len, final DataInput input, final ConstantPool cpool) throws IOException { this(nameIdx, len, (LocalVariable[]) null, cpool); - final int localVariableTypeTableLength = input.readUnsignedShort(); localVariableTypeTable = new LocalVariable[localVariableTypeTableLength]; - for (int i = 0; i < localVariableTypeTableLength; i++) { localVariableTypeTable[i] = new LocalVariable(input, cpool); } @@ -97,7 +97,6 @@ @Override public Attribute copy(final ConstantPool constantPool) { final LocalVariableTypeTable c = (LocalVariableTypeTable) clone(); - c.localVariableTypeTable = new LocalVariable[localVariableTypeTable.length]; Arrays.setAll(c.localVariableTypeTable, i -> localVariableTypeTable[i].copy()); c.setConstantPool(constantPool); @@ -119,7 +118,6 @@ return variable; } } - return null; } @@ -137,7 +135,7 @@ } public final void setLocalVariableTable(final LocalVariable[] localVariableTable) { - this.localVariableTypeTable = localVariableTable; + this.localVariableTypeTable = localVariableTable != null ? localVariableTable : EMPTY_ARRAY; } /** @@ -146,15 +144,12 @@ @Override public final String toString() { final StringBuilder buf = new StringBuilder(); - for (int i = 0; i < localVariableTypeTable.length; i++) { buf.append(localVariableTypeTable[i].toStringShared(true)); - if (i < localVariableTypeTable.length - 1) { buf.append('\n'); } } - return buf.toString(); } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Method.java 2026-04-17 19:08:13.000000000 +0000 @@ -40,42 +40,34 @@ */ public static final Method[] EMPTY_ARRAY = {}; - private static BCELComparator bcelComparator = new BCELComparator() { + private static BCELComparator<Method> bcelComparator = new BCELComparator<Method>() { @Override - public boolean equals(final Object o1, final Object o2) { - final Method THIS = (Method) o1; - final Method THAT = (Method) o2; - return Objects.equals(THIS.getName(), THAT.getName()) && Objects.equals(THIS.getSignature(), THAT.getSignature()); + public boolean equals(final Method a, final Method b) { + return a == b || a != null && b != null && Objects.equals(a.getName(), b.getName()) && Objects.equals(a.getSignature(), b.getSignature()); } @Override - public int hashCode(final Object o) { - final Method THIS = (Method) o; - return THIS.getSignature().hashCode() ^ THIS.getName().hashCode(); + public int hashCode(final Method o) { + return o != null ? Objects.hash(o.getSignature(), o.getName()) : 0; } }; /** - * Empty array. + * @return Comparison strategy object. */ - static final Method[] EMPTY_METHOD_ARRAY = {}; - - /** - * @return Comparison strategy object - */ - public static BCELComparator getComparator() { + public static BCELComparator<Method> getComparator() { return bcelComparator; } /** - * @param comparator Comparison strategy object + * @param comparator Comparison strategy object. */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<Method> comparator) { bcelComparator = comparator; } - // annotations defined on the parameters of a method + /** Annotations defined on the parameters of a method. */ private ParameterAnnotationEntry[] parameterAnnotationEntries; /** @@ -85,7 +77,7 @@ } /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O error occurs. @@ -142,7 +134,7 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof Method && bcelComparator.equals(this, (Method) obj); } /** @@ -189,7 +181,7 @@ } /** - * @return LocalVariableTable of code attribute if any, i.e. the call is forwarded to the Code atribute. + * @return LocalVariableTable of code attribute if any, i.e. the call is forwarded to the Code attribute. */ public LocalVariableTable getLocalVariableTable() { final Code code = getCode(); @@ -200,6 +192,19 @@ } /** + * Gets the local variable type table attribute {@link LocalVariableTypeTable}. + * @return LocalVariableTypeTable of code attribute if any, i.e. the call is forwarded to the Code attribute. + * @since 6.10.0 + */ + public LocalVariableTypeTable getLocalVariableTypeTable() { + final Code code = getCode(); + if (code == null) { + return null; + } + return code.getLocalVariableTypeTable(); + } + + /** * @return Annotations on the parameters of a method * @since 6.0 */ @@ -218,7 +223,7 @@ } /** - * Return value as defined by given BCELComparator strategy. By default return the hashcode of the method's name XOR + * Return value as defined by given BCELComparator strategy. By default return the hash code of the method's name XOR * signature. * * @see Object#hashCode() diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameter.java 2026-04-17 19:08:13.000000000 +0000 @@ -29,6 +29,9 @@ /** * Entry of the parameters table. + * <p> + * Implements {@link Node} as of 6.7.0. + * </p> * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24"> The class File Format : * The MethodParameters Attribute</a> @@ -46,7 +49,7 @@ } /** - * Construct object from input stream. + * Constructs an instance from a DataInput. * * @param input Input stream * @throws IOException if an I/O error occurs. @@ -75,7 +78,7 @@ } /** - * Dump object to file stream on binary format. + * Dumps object to file stream on binary format. * * @param file Output file stream * @throws IOException if an I/O error occurs. @@ -94,7 +97,10 @@ } /** - * Returns the name of the parameter. + * Gets the name of the parameter. + * + * @param constantPool The pool to query. + * @return Constant from the given pool. */ public String getParameterName(final ConstantPool constantPool) { if (nameIndex == 0) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/MethodParameters.java 2026-04-17 19:08:13.000000000 +0000 @@ -42,13 +42,12 @@ /** * Empty array. */ - private static final MethodParameter[] EMPTY_METHOD_PARAMETER_ARRAY = {}; + private static final MethodParameter[] EMPTY_ARRAY = {}; - private MethodParameter[] parameters = EMPTY_METHOD_PARAMETER_ARRAY; + private MethodParameter[] parameters = EMPTY_ARRAY; MethodParameters(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException { super(Const.ATTR_METHOD_PARAMETERS, nameIndex, length, constantPool); - final int parameterCount = input.readUnsignedByte(); parameters = new MethodParameter[parameterCount]; for (int i = 0; i < parameterCount; i++) { @@ -65,7 +64,6 @@ public Attribute copy(final ConstantPool constantPool) { final MethodParameters c = (MethodParameters) clone(); c.parameters = new MethodParameter[parameters.length]; - Arrays.setAll(c.parameters, i -> parameters[i].copy()); c.setConstantPool(constantPool); return c; @@ -96,6 +94,6 @@ } public void setParameters(final MethodParameter[] parameters) { - this.parameters = parameters; + this.parameters = parameters != null ? parameters : EMPTY_ARRAY; } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Module.java 2026-04-17 19:08:13.000000000 +0000 @@ -44,19 +44,27 @@ */ public static final String EXTENSION = ".jmod"; + private static String getClassNameAtIndex(final ConstantPool cp, final int index, final boolean compactClassName) { + final String className = cp.getConstantString(index, Const.CONSTANT_Class); + if (compactClassName) { + return Utility.compactClassName(className, false); + } + return className; + } private final int moduleNameIndex; private final int moduleFlags; - private final int moduleVersionIndex; + private final int moduleVersionIndex; private ModuleRequires[] requiresTable; private ModuleExports[] exportsTable; private ModuleOpens[] opensTable; private final int usesCount; private final int[] usesIndex; + private ModuleProvides[] providesTable; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool * @param length Content length in bytes @@ -113,8 +121,6 @@ v.visitModule(this); } - // TODO add more getters and setters? - /** * @return deep copy of this attribute */ @@ -187,6 +193,25 @@ } /** + * Gets flags for this module. + * @return module flags + * @since 6.10.0 + */ + public int getModuleFlags() { + return moduleFlags; + } + + /** + * Gets module name. + * @param cp Array of constants + * @return module name + * @since 6.10.0 + */ + public String getModuleName(final ConstantPool cp) { + return cp.getConstantString(moduleNameIndex, Const.CONSTANT_Module); + } + + /** * @return table of provided interfaces * @see ModuleOpens */ @@ -211,6 +236,31 @@ } /** + * Gets the array of class names for this module's uses. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @param compactClassName false for original constant pool value, true to replace '/' with '.' + * @return array of used class names + * @since 6.10.0 + */ + public String[] getUsedClassNames(final ConstantPool constantPool, final boolean compactClassName) { + final String[] usedClassNames = new String[usesCount]; + for (int i = 0; i < usesCount; i++) { + usedClassNames[i] = getClassNameAtIndex(constantPool, usesIndex[i], compactClassName); + } + return usedClassNames; + } + + /** + * Gets version for this module. + * @param cp Array of constants + * @return version from constant pool, "0" if version index is 0 + * @since 6.10.0 + */ + public String getVersion(final ConstantPool cp) { + return moduleVersionIndex == 0 ? "0" : cp.getConstantString(moduleVersionIndex, Const.CONSTANT_Utf8); + } + + /** * @return String representation, i.e., a list of packages. */ @Override @@ -218,9 +268,9 @@ final ConstantPool cp = super.getConstantPool(); final StringBuilder buf = new StringBuilder(); buf.append("Module:\n"); - buf.append(" name: ").append(Utility.pathToPackage(cp.getConstantString(moduleNameIndex, Const.CONSTANT_Module))).append("\n"); + buf.append(" name: ").append(Utility.pathToPackage(getModuleName(cp))).append("\n"); buf.append(" flags: ").append(String.format("%04x", moduleFlags)).append("\n"); - final String version = moduleVersionIndex == 0 ? "0" : cp.getConstantString(moduleVersionIndex, Const.CONSTANT_Utf8); + final String version = getVersion(cp); buf.append(" version: ").append(version).append("\n"); buf.append(" requires(").append(requiresTable.length).append("):\n"); @@ -240,8 +290,8 @@ buf.append(" uses(").append(usesIndex.length).append("):\n"); for (final int index : usesIndex) { - final String className = cp.getConstantString(index, Const.CONSTANT_Class); - buf.append(" ").append(Utility.compactClassName(className, false)).append("\n"); + final String className = getClassNameAtIndex(cp, index, true); + buf.append(" ").append(className).append("\n"); } buf.append(" provides(").append(providesTable.length).append("):\n"); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleExports.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,13 +36,17 @@ */ public final class ModuleExports implements Cloneable, Node { + private static String getToModuleNameAtIndex(final ConstantPool constantPool, final int index) { + return constantPool.getConstantString(index, Const.CONSTANT_Module); + } private final int exportsIndex; // points to CONSTANT_Package_info private final int exportsFlags; private final int exportsToCount; + private final int[] exportsToIndex; // points to CONSTANT_Module_info /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O Exception occurs in readUnsignedShort @@ -68,8 +72,6 @@ v.visitModuleExports(this); } - // TODO add more getters and setters? - /** * @return deep copy of this object */ @@ -98,6 +100,39 @@ } /** + * Gets the flags for this ModuleExports. + * @return the exportsFlags + * @since 6.10.0 + */ + public int getExportsFlags() { + return exportsFlags; + } + + /** + * Gets the exported package name. + * @param constantPool the constant pool from the ClassFile + * @return the exported package name + * @since 6.10.0 + */ + public String getPackageName(final ConstantPool constantPool) { + return constantPool.constantToString(exportsIndex, Const.CONSTANT_Package); + } + + /** + * Gets an array of module names for this ModuleExports. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @return array of module names following 'exports to' + * @since 6.10.0 + */ + public String[] getToModuleNames(final ConstantPool constantPool) { + final String[] toModuleNames = new String[exportsToCount]; + for (int i = 0; i < exportsToCount; i++) { + toModuleNames[i] = getToModuleNameAtIndex(constantPool, exportsToIndex[i]); + } + return toModuleNames; + } + + /** * @return String representation */ @Override @@ -110,13 +145,13 @@ */ public String toString(final ConstantPool constantPool) { final StringBuilder buf = new StringBuilder(); - final String packageName = constantPool.constantToString(exportsIndex, Const.CONSTANT_Package); - buf.append(Utility.compactClassName(packageName, false)); + final String packageName = getPackageName(constantPool); + buf.append(packageName); buf.append(", ").append(String.format("%04x", exportsFlags)); buf.append(", to(").append(exportsToCount).append("):\n"); for (final int index : exportsToIndex) { - final String moduleName = constantPool.getConstantString(index, Const.CONSTANT_Module); - buf.append(" ").append(Utility.compactClassName(moduleName, false)).append("\n"); + final String moduleName = getToModuleNameAtIndex(constantPool, index); + buf.append(" ").append(moduleName).append("\n"); } return buf.substring(0, buf.length() - 1); // remove the last newline } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleMainClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -39,7 +39,7 @@ private int mainClassIndex; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleOpens.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,13 +36,17 @@ */ public final class ModuleOpens implements Cloneable, Node { + private static String getToModuleNameAtIndex(final ConstantPool constantPool, final int index) { + return constantPool.getConstantString(index, Const.CONSTANT_Module); + } private final int opensIndex; // points to CONSTANT_Package_info private final int opensFlags; private final int opensToCount; + private final int[] opensToIndex; // points to CONSTANT_Module_info /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O Exception occurs in readUnsignedShort @@ -68,8 +72,6 @@ v.visitModuleOpens(this); } - // TODO add more getters and setters? - /** * @return deep copy of this object */ @@ -98,6 +100,39 @@ } /** + * Gets the flags for this ModuleOpens. + * @return the opensFlags + * @since 6.10.0 + */ + public int getOpensFlags() { + return opensFlags; + } + + /** + * Gets the opened package name. + * @param constantPool the constant pool from the ClassFile + * @return the opened package name + * @since 6.10.0 + */ + public String getPackageName(final ConstantPool constantPool) { + return constantPool.constantToString(opensIndex, Const.CONSTANT_Package); + } + + /** + * Gets an array of module names for this ModuleOpens. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @return array of module names following 'opens to' + * @since 6.10.0 + */ + public String[] getToModuleNames(final ConstantPool constantPool) { + final String[] toModuleNames = new String[opensToCount]; + for (int i = 0; i < opensToCount; i++) { + toModuleNames[i] = getToModuleNameAtIndex(constantPool, opensToIndex[i]); + } + return toModuleNames; + } + + /** * @return String representation */ @Override @@ -110,13 +145,13 @@ */ public String toString(final ConstantPool constantPool) { final StringBuilder buf = new StringBuilder(); - final String packageName = constantPool.constantToString(opensIndex, Const.CONSTANT_Package); - buf.append(Utility.compactClassName(packageName, false)); + final String packageName = getPackageName(constantPool); + buf.append(packageName); buf.append(", ").append(String.format("%04x", opensFlags)); buf.append(", to(").append(opensToCount).append("):\n"); for (final int index : opensToIndex) { - final String moduleName = constantPool.getConstantString(index, Const.CONSTANT_Module); - buf.append(" ").append(Utility.compactClassName(moduleName, false)).append("\n"); + final String moduleName = getToModuleNameAtIndex(constantPool, index); + buf.append(" ").append(moduleName).append("\n"); } return buf.substring(0, buf.length() - 1); // remove the last newline } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModulePackages.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,20 +27,21 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.util.Args; +import jdk.xml.internal.Utils; /** * This class is derived from <em>Attribute</em> and represents the list of packages that are exported or opened by the * Module attribute. There may be at most one ModulePackages attribute in a ClassFile structure. * * @see Attribute - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class ModulePackages extends Attribute { private int[] packageIndexTable; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool * @param length Content length in bytes @@ -65,7 +66,7 @@ */ public ModulePackages(final int nameIndex, final int length, final int[] packageIndexTable, final ConstantPool constantPool) { super(Const.ATTR_MODULE_PACKAGES, nameIndex, length, constantPool); - this.packageIndexTable = packageIndexTable != null ? packageIndexTable : Const.EMPTY_INT_ARRAY; + this.packageIndexTable = Utils.createEmptyArrayIfNull(packageIndexTable); Args.requireU2(this.packageIndexTable.length, "packageIndexTable.length"); } @@ -145,7 +146,7 @@ * @param packageIndexTable the list of package indexes Also redefines number_of_packages according to table length. */ public void setPackageIndexTable(final int[] packageIndexTable) { - this.packageIndexTable = packageIndexTable != null ? packageIndexTable : Const.EMPTY_INT_ARRAY; + this.packageIndexTable = Utils.createEmptyArrayIfNull(packageIndexTable); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleProvides.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,12 +36,20 @@ */ public final class ModuleProvides implements Cloneable, Node { + private static String getImplementationClassNameAtIndex(final ConstantPool constantPool, final int index, final boolean compactClassName) { + final String className = constantPool.getConstantString(index, Const.CONSTANT_Class); + if (compactClassName) { + return Utility.compactClassName(className, false); + } + return className; + } private final int providesIndex; // points to CONSTANT_Class_info private final int providesWithCount; + private final int[] providesWithIndex; // points to CONSTANT_Class_info /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O Exception occurs in readUnsignedShort @@ -66,8 +74,6 @@ v.visitModuleProvides(this); } - // TODO add more getters and setters? - /** * @return deep copy of this object */ @@ -95,6 +101,31 @@ } /** + * Gets the array of implementation class names for this ModuleProvides. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @param compactClassName false for original constant pool value, true to replace '/' with '.' + * @return array of implementation class names + * @since 6.10.0 + */ + public String[] getImplementationClassNames(final ConstantPool constantPool, final boolean compactClassName) { + final String[] implementationClassNames = new String[providesWithCount]; + for (int i = 0; i < providesWithCount; i++) { + implementationClassNames[i] = getImplementationClassNameAtIndex(constantPool, providesWithIndex[i], compactClassName); + } + return implementationClassNames; + } + + /** + * Gets the interface name for this ModuleProvides. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @return interface name + * @since 6.10.0 + */ + public String getInterfaceName(final ConstantPool constantPool) { + return constantPool.constantToString(providesIndex, Const.CONSTANT_Class); + } + + /** * @return String representation */ @Override @@ -107,12 +138,12 @@ */ public String toString(final ConstantPool constantPool) { final StringBuilder buf = new StringBuilder(); - final String interfaceName = constantPool.constantToString(providesIndex, Const.CONSTANT_Class); - buf.append(Utility.compactClassName(interfaceName, false)); + final String interfaceName = getInterfaceName(constantPool); + buf.append(interfaceName); buf.append(", with(").append(providesWithCount).append("):\n"); for (final int index : providesWithIndex) { - final String className = constantPool.getConstantString(index, Const.CONSTANT_Class); - buf.append(" ").append(Utility.compactClassName(className, false)).append("\n"); + final String className = getImplementationClassNameAtIndex(constantPool, index, true); + buf.append(" ").append(className).append("\n"); } return buf.substring(0, buf.length() - 1); // remove the last newline } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ModuleRequires.java 2026-04-17 19:08:13.000000000 +0000 @@ -41,7 +41,7 @@ private final int requiresVersionIndex; // either 0 or points to CONSTANT_Utf8_info /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O Exception occurs in readUnsignedShort @@ -63,8 +63,6 @@ v.visitModuleRequires(this); } - // TODO add more getters and setters? - /** * @return deep copy of this object */ @@ -90,6 +88,35 @@ } /** + * Gets the module name from the constant pool. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @return module name + * @since 6.10.0 + */ + public String getModuleName(final ConstantPool constantPool) { + return constantPool.constantToString(requiresIndex, Const.CONSTANT_Module); + } + + /** + * Gets the flags for this ModuleRequires. + * @return the requiresFlags + * @since 6.10.0 + */ + public int getRequiresFlags() { + return requiresFlags; + } + + /** + * Gets the required version from the constant pool. + * @param constantPool Array of constants usually obtained from the ClassFile object + * @return required version, "0" if version index is 0. + * @since 6.10.0 + */ + public String getVersion(final ConstantPool constantPool) { + return requiresVersionIndex == 0 ? "0" : constantPool.getConstantString(requiresVersionIndex, Const.CONSTANT_Utf8); + } + + /** * @return String representation */ @Override @@ -102,10 +129,10 @@ */ public String toString(final ConstantPool constantPool) { final StringBuilder buf = new StringBuilder(); - final String moduleName = constantPool.constantToString(requiresIndex, Const.CONSTANT_Module); - buf.append(Utility.compactClassName(moduleName, false)); + final String moduleName = getModuleName(constantPool); + buf.append(moduleName); buf.append(", ").append(String.format("%04x", requiresFlags)); - final String version = requiresVersionIndex == 0 ? "0" : constantPool.getConstantString(requiresVersionIndex, Const.CONSTANT_Utf8); + final String version = getVersion(constantPool); buf.append(", ").append(version); return buf.toString(); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestMembers.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestMembers.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestMembers.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/NestMembers.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +27,7 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.util.Args; +import jdk.xml.internal.Utils; /** * This class is derived from <em>Attribute</em> and records the classes and interfaces that are authorized to claim @@ -34,14 +35,14 @@ * ClassFile structure. * * @see Attribute - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class NestMembers extends Attribute { private int[] classes; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool * @param length Content length in bytes @@ -66,7 +67,7 @@ */ public NestMembers(final int nameIndex, final int length, final int[] classes, final ConstantPool constantPool) { super(Const.ATTR_NEST_MEMBERS, nameIndex, length, constantPool); - this.classes = classes != null ? classes : Const.EMPTY_INT_ARRAY; + this.classes = Utils.createEmptyArrayIfNull(classes); Args.requireU2(this.classes.length, "classes.length"); } @@ -146,7 +147,7 @@ * @param classes the list of class indexes Also redefines number_of_classes according to table length. */ public void setClasses(final int[] classes) { - this.classes = classes != null ? classes : Const.EMPTY_INT_ARRAY; + this.classes = Utils.createEmptyArrayIfNull(classes); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Node.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,5 +26,5 @@ */ public interface Node { - void accept(Visitor obj); + void accept(Visitor visitor); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/PMGClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -38,7 +38,7 @@ private int pmgIndex; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotationEntry.java 2026-04-17 19:08:13.000000000 +0000 @@ -37,22 +37,28 @@ static final ParameterAnnotationEntry[] EMPTY_ARRAY = {}; - public static ParameterAnnotationEntry[] createParameterAnnotationEntries(final Attribute[] attrs) { + public static ParameterAnnotationEntry[] createParameterAnnotationEntries(final Attribute[] attributes) { + if (attributes == null) { + return EMPTY_ARRAY; + } // Find attributes that contain parameter annotation data - final List<ParameterAnnotationEntry> accumulatedAnnotations = new ArrayList<>(attrs.length); - for (final Attribute attribute : attrs) { + final List<ParameterAnnotationEntry> accumulatedAnnotations = new ArrayList<>(attributes.length); + for (final Attribute attribute : attributes) { if (attribute instanceof ParameterAnnotations) { final ParameterAnnotations runtimeAnnotations = (ParameterAnnotations) attribute; - Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getParameterAnnotationEntries()); + final ParameterAnnotationEntry[] parameterAnnotationEntries = runtimeAnnotations.getParameterAnnotationEntries(); + if (parameterAnnotationEntries != null) { + Collections.addAll(accumulatedAnnotations, parameterAnnotationEntries); + } } } - return accumulatedAnnotations.toArray(ParameterAnnotationEntry.EMPTY_ARRAY); + return accumulatedAnnotations.toArray(EMPTY_ARRAY); } private final AnnotationEntry[] annotationTable; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param input Input stream * @throws IOException if an I/O error occurs. diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/ParameterAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -34,10 +34,14 @@ */ public abstract class ParameterAnnotations extends Attribute implements Iterable<ParameterAnnotationEntry> { + private static final ParameterAnnotationEntry[] EMPTY_ARRAY = {}; + /** Table of parameter annotations */ private ParameterAnnotationEntry[] parameterAnnotationTable; /** + * Constructs a new instance. + * * @param parameterAnnotationType the subclass type of the parameter annotation * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes @@ -55,6 +59,8 @@ } /** + * Constructs a new instance. + * * @param parameterAnnotationType the subclass type of the parameter annotation * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes @@ -120,6 +126,6 @@ * @param parameterAnnotationTable the entries to set in this parameter annotation */ public final void setParameterAnnotationTable(final ParameterAnnotationEntry[] parameterAnnotationTable) { - this.parameterAnnotationTable = parameterAnnotationTable; + this.parameterAnnotationTable = parameterAnnotationTable != null ? parameterAnnotationTable : EMPTY_ARRAY; } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Record.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Record.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Record.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Record.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,153 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package com.sun.org.apache.bcel.internal.classfile; + +import java.io.DataInput; +import java.io.DataOutputStream; +import java.io.IOException; + +import com.sun.org.apache.bcel.internal.Const; +import com.sun.org.apache.bcel.internal.util.Args; + +/** + * Extends {@link Attribute} and records the classes and + * interfaces that are authorized to claim membership in the nest hosted by the + * current class or interface. There may be at most one Record attribute in a + * ClassFile structure. + * + * @see Attribute + * @since 6.9.0 + */ +public final class Record extends Attribute { + + private static final RecordComponentInfo[] EMPTY_RCI_ARRAY = {}; + + private static RecordComponentInfo[] readComponents(final DataInput input, final ConstantPool constantPool) + throws IOException { + final int classCount = input.readUnsignedShort(); + final RecordComponentInfo[] components = new RecordComponentInfo[classCount]; + for (int i = 0; i < classCount; i++) { + components[i] = new RecordComponentInfo(input, constantPool); + } + return components; + } + + private RecordComponentInfo[] components; + + /** + * Constructs object from input stream. + * + * @param nameIndex Index in constant pool + * @param length Content length in bytes + * @param input Input stream + * @param constantPool Array of constants + * @throws IOException if an I/O error occurs. + */ + Record(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) + throws IOException { + this(nameIndex, length, readComponents(input, constantPool), constantPool); + } + + /** + * Constructs a new instance using components. + * + * @param nameIndex Index in constant pool + * @param length Content length in bytes + * @param classes Array of Record Component Info elements + * @param constantPool Array of constants + */ + public Record(final int nameIndex, final int length, final RecordComponentInfo[] classes, + final ConstantPool constantPool) { + super(Const.ATTR_RECORD, nameIndex, length, constantPool); + this.components = classes != null ? classes : EMPTY_RCI_ARRAY; + Args.requireU2(this.components.length, "attributes.length"); + } + + /** + * Called by objects that are traversing the nodes of the tree implicitly + * defined by the contents of a Java class. For example, the hierarchy of methods, + * fields, attributes, etc. spawns a tree of objects. + * + * @param v Visitor object + */ + @Override + public void accept(final Visitor v) { + v.visitRecord(this); + } + + /** + * Copies this instance and its components. + * + * @return a deep copy of this instance and its components. + */ + @Override + public Attribute copy(final ConstantPool constantPool) { + final Record c = (Record) clone(); + if (components.length > 0) { + c.components = components.clone(); + } + c.setConstantPool(constantPool); + return c; + } + + /** + * Dumps this instance into a file stream in binary format. + * + * @param file output stream. + * @throws IOException if an I/O error occurs. + */ + @Override + public void dump(final DataOutputStream file) throws IOException { + super.dump(file); + file.writeShort(components.length); + for (final RecordComponentInfo component : components) { + component.dump(file); + } + } + + /** + * Gets all the record components. + * + * @return array of Record Component Info elements. + */ + public RecordComponentInfo[] getComponents() { + return components; + } + + /** + * Converts this instance to a String suitable for debugging. + * + * @return String a String suitable for debugging. + */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder(); + buf.append("Record("); + buf.append(components.length); + buf.append("):\n"); + for (final RecordComponentInfo component : components) { + buf.append(" ").append(component.toString()).append("\n"); + } + return buf.substring(0, buf.length() - 1); // remove the last newline + } + +} diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RecordComponentInfo.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RecordComponentInfo.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RecordComponentInfo.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RecordComponentInfo.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +package com.sun.org.apache.bcel.internal.classfile; + +import java.io.DataInput; +import java.io.DataOutputStream; +import java.io.IOException; + +import com.sun.org.apache.bcel.internal.Const; + +/** + * Record component info from a record. Instances from this class maps + * every component from a given record. + * + * @see <a href="https://docs.oracle.com/javase/specs/jvms/se14/preview/specs/records-jvms.html#jvms-4.7.30"> + * The Java Virtual Machine Specification, Java SE 14 Edition, Records (preview)</a> + * @since 6.9.0 + */ +public class RecordComponentInfo implements Node { + + private final int index; + private final int descriptorIndex; + private final Attribute[] attributes; + private final ConstantPool constantPool; + + /** + * Constructs a new instance from an input stream. + * + * @param input Input stream + * @param constantPool Array of constants + * @throws IOException if an I/O error occurs. + */ + public RecordComponentInfo(final DataInput input, final ConstantPool constantPool) throws IOException { + this.index = input.readUnsignedShort(); + this.descriptorIndex = input.readUnsignedShort(); + final int attributesCount = input.readUnsignedShort(); + this.attributes = new Attribute[attributesCount]; + for (int j = 0; j < attributesCount; j++) { + attributes[j] = Attribute.readAttribute(input, constantPool); + } + this.constantPool = constantPool; + } + + @Override + public void accept(final Visitor v) { + v.visitRecordComponent(this); + } + + /** + * Dumps contents into a file stream in binary format. + * + * @param file Output file stream + * @throws IOException if an I/O error occurs. + */ + public void dump(final DataOutputStream file) throws IOException { + file.writeShort(index); + file.writeShort(descriptorIndex); + file.writeShort(attributes.length); + for (final Attribute attribute : attributes) { + attribute.dump(file); + } + } + + /** + * Gets all attributes. + * + * @return all attributes. + */ + public Attribute[] getAttributes() { + return attributes; + } + + /** + * Gets the constant pool. + * + * @return Constant pool. + */ + public ConstantPool getConstantPool() { + return constantPool; + } + + /** + * Gets the description index. + * + * @return index in constant pool of this record component descriptor. + */ + public int getDescriptorIndex() { + return descriptorIndex; + } + + /** + * Gets the name index. + * + * @return index in constant pool of this record component name. + */ + public int getIndex() { + return index; + } + + /** + * Converts this instance to a String suitable for debugging. + * + * @return a String suitable for debugging. + */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder(); + buf.append("RecordComponentInfo("); + buf.append(constantPool.getConstantString(index, Const.CONSTANT_Utf8)); + buf.append(","); + buf.append(constantPool.getConstantString(descriptorIndex, Const.CONSTANT_Utf8)); + buf.append(","); + buf.append(attributes.length); + buf.append("):\n"); + for (final Attribute attribute : attributes) { + buf.append(" ").append(attribute.toString()).append("\n"); + } + return buf.substring(0, buf.length() - 1); // remove the last newline + } + +} diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleAnnotations.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleAnnotations.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,13 +28,15 @@ import com.sun.org.apache.bcel.internal.Const; /** - * represents an annotation that is represented in the class file but is not provided to the JVM. + * An annotation that is represented in the class file but is not provided to the JVM. * * @since 6.0 */ public class RuntimeInvisibleAnnotations extends Annotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param input Input stream @@ -46,7 +48,9 @@ } /** - * @return deep copy of this attribute + * Creates a deep copy of this attribute. + * + * @return deep copy of this attribute. */ @Override public Attribute copy(final ConstantPool constantPool) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleParameterAnnotations.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleParameterAnnotations.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleParameterAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeInvisibleParameterAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -34,6 +34,8 @@ public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param input Input stream diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleAnnotations.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleAnnotations.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,13 +28,15 @@ import com.sun.org.apache.bcel.internal.Const; /** - * represents an annotation that is represented in the class file and is provided to the JVM. + * An annotation that is represented in the class file and is provided to the JVM. * * @since 6.0 */ public class RuntimeVisibleAnnotations extends Annotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param input Input stream @@ -46,7 +48,9 @@ } /** - * @return deep copy of this attribute + * Creates a deep copy of this attribute. + * + * @return deep copy of this attribute. */ @Override public Attribute copy(final ConstantPool constantPool) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleParameterAnnotations.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleParameterAnnotations.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleParameterAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/RuntimeVisibleParameterAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -34,6 +34,8 @@ public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name <em>Code</em> * @param length Content length in bytes * @param input Input stream diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Signature.java 2026-04-17 19:08:13.000000000 +0000 @@ -110,7 +110,7 @@ if ((ch = in.read()) == -1) { throw new IllegalArgumentException("Illegal signature: " + in.getData() + " no ident, reaching EOF"); } - // System.out.println("return from ident:" + (char)ch); + // System.out.println("return from ident:" + (char) ch); if (!identStart(ch)) { final StringBuilder buf2 = new StringBuilder(); int count = 1; @@ -128,7 +128,7 @@ buf.append(buf2); ch = in.read(); in.unread(); - // System.out.println("so far:" + buf2 + ":next:" +(char)ch); + // System.out.println("so far:" + buf2 + ":next:" +(char) ch); } else { for (int i = 0; i < count; i++) { in.unread(); @@ -141,10 +141,10 @@ do { buf2.append((char) ch); ch = in.read(); - // System.out.println("within ident:"+ (char)ch); + // System.out.println("within ident:"+ (char) ch); } while (ch != -1 && (Character.isJavaIdentifierPart((char) ch) || ch == '/')); buf.append(Utility.pathToPackage(buf2.toString())); - // System.out.println("regular return ident:"+ (char)ch + ":" + buf2); + // System.out.println("regular return ident:"+ (char) ch + ":" + buf2); if (ch != -1) { in.unread(); } @@ -160,7 +160,7 @@ private int signatureIndex; /** - * Construct object from file stream. + * Constructs object from file stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SimpleElementValue.java 2026-04-17 19:08:13.000000000 +0000 @@ -54,7 +54,7 @@ dos.writeShort(getIndex()); break; default: - throw new ClassFormatException("SimpleElementValue doesnt know how to write out type " + type); + throw new ClassFormatException("SimpleElementValue doesn't know how to write out type " + type); } } @@ -67,7 +67,7 @@ public boolean getValueBoolean() { if (super.getType() != PRIMITIVE_BOOLEAN) { - throw new IllegalStateException("Dont call getValueBoolean() on a non BOOLEAN ElementValue"); + throw new IllegalStateException("Don't call getValueBoolean() on a non BOOLEAN ElementValue"); } final ConstantInteger bo = (ConstantInteger) super.getConstantPool().getConstant(getIndex()); return bo.getBytes() != 0; @@ -75,21 +75,21 @@ public byte getValueByte() { if (super.getType() != PRIMITIVE_BYTE) { - throw new IllegalStateException("Dont call getValueByte() on a non BYTE ElementValue"); + throw new IllegalStateException("Don't call getValueByte() on a non BYTE ElementValue"); } return (byte) super.getConstantPool().getConstantInteger(getIndex()).getBytes(); } public char getValueChar() { if (super.getType() != PRIMITIVE_CHAR) { - throw new IllegalStateException("Dont call getValueChar() on a non CHAR ElementValue"); + throw new IllegalStateException("Don't call getValueChar() on a non CHAR ElementValue"); } return (char) super.getConstantPool().getConstantInteger(getIndex()).getBytes(); } public double getValueDouble() { if (super.getType() != PRIMITIVE_DOUBLE) { - throw new IllegalStateException("Dont call getValueDouble() on a non DOUBLE ElementValue"); + throw new IllegalStateException("Don't call getValueDouble() on a non DOUBLE ElementValue"); } final ConstantDouble d = (ConstantDouble) super.getConstantPool().getConstant(getIndex()); return d.getBytes(); @@ -97,7 +97,7 @@ public float getValueFloat() { if (super.getType() != PRIMITIVE_FLOAT) { - throw new IllegalStateException("Dont call getValueFloat() on a non FLOAT ElementValue"); + throw new IllegalStateException("Don't call getValueFloat() on a non FLOAT ElementValue"); } final ConstantFloat f = (ConstantFloat) super.getConstantPool().getConstant(getIndex()); return f.getBytes(); @@ -105,14 +105,14 @@ public int getValueInt() { if (super.getType() != PRIMITIVE_INT) { - throw new IllegalStateException("Dont call getValueInt() on a non INT ElementValue"); + throw new IllegalStateException("Don't call getValueInt() on a non INT ElementValue"); } return super.getConstantPool().getConstantInteger(getIndex()).getBytes(); } public long getValueLong() { if (super.getType() != PRIMITIVE_LONG) { - throw new IllegalStateException("Dont call getValueLong() on a non LONG ElementValue"); + throw new IllegalStateException("Don't call getValueLong() on a non LONG ElementValue"); } final ConstantLong j = (ConstantLong) super.getConstantPool().getConstant(getIndex()); return j.getBytes(); @@ -120,7 +120,7 @@ public short getValueShort() { if (super.getType() != PRIMITIVE_SHORT) { - throw new IllegalStateException("Dont call getValueShort() on a non SHORT ElementValue"); + throw new IllegalStateException("Don't call getValueShort() on a non SHORT ElementValue"); } final ConstantInteger s = (ConstantInteger) super.getConstantPool().getConstant(getIndex()); return (short) s.getBytes(); @@ -128,7 +128,7 @@ public String getValueString() { if (super.getType() != STRING) { - throw new IllegalStateException("Dont call getValueString() on a non STRING ElementValue"); + throw new IllegalStateException("Don't call getValueString() on a non STRING ElementValue"); } return super.getConstantPool().getConstantUtf8(getIndex()).getBytes(); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/SourceFile.java 2026-04-17 19:08:13.000000000 +0000 @@ -40,7 +40,7 @@ private int sourceFileIndex; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMap.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,8 +30,8 @@ /** * This class represents a stack map attribute used for preverification of Java classes for the - * <a href="http://java.sun.com/j2me/"> Java 2 Micro Edition</a> (J2ME). This attribute is used by the - * <a href="http://java.sun.com/products/cldc/">KVM</a> and contained within the Code attribute of a method. See CLDC + * <a href="https://java.sun.com/j2me/"> Java 2 Micro Edition</a> (J2ME). This attribute is used by the + * <a href="https://java.sun.com/products/cldc/">KVM</a> and contained within the Code attribute of a method. See CLDC * specification 5.3.1.2 * * <pre> @@ -46,14 +46,14 @@ * @see Code * @see StackMapEntry * @see StackMapType - * @LastModified: Oct 2020 + * @LastModified: Sept 2025 */ public final class StackMap extends Attribute { private StackMapEntry[] table; // Table of stack map entries /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index of name * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapEntry.java 2026-04-17 19:08:13.000000000 +0000 @@ -59,7 +59,7 @@ private ConstantPool constantPool; /** - * Construct object from input stream. + * Constructs object from input stream. * * @param dataInput Input stream * @throws IOException if an I/O error occurs. @@ -75,9 +75,7 @@ } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) { byteCodeOffset = dataInput.readUnsignedShort(); typesOfStackItems = new StackMapType[] { new StackMapType(dataInput, constantPool) }; - } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) { - byteCodeOffset = dataInput.readUnsignedShort(); - } else if (frameType == Const.SAME_FRAME_EXTENDED) { + } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX || frameType == Const.SAME_FRAME_EXTENDED) { byteCodeOffset = dataInput.readUnsignedShort(); } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) { byteCodeOffset = dataInput.readUnsignedShort(); @@ -167,7 +165,7 @@ try { e = (StackMapEntry) clone(); } catch (final CloneNotSupportedException ex) { - throw new Error("Clone Not Supported"); + throw new UnsupportedOperationException("Clone Not Supported", ex); } e.typesOfLocals = new StackMapType[typesOfLocals.length]; @@ -190,9 +188,7 @@ } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) { file.writeShort(byteCodeOffset); typesOfStackItems[0].dump(file); - } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) { - file.writeShort(byteCodeOffset); - } else if (frameType == Const.SAME_FRAME_EXTENDED) { + } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX || frameType == Const.SAME_FRAME_EXTENDED) { file.writeShort(byteCodeOffset); } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) { file.writeShort(byteCodeOffset); @@ -232,7 +228,6 @@ /** * Calculate stack map entry size - * */ int getMapEntrySize() { if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/StackMapType.java 2026-04-17 19:08:13.000000000 +0000 @@ -34,9 +34,9 @@ * @see StackMap * @see Const */ -public final class StackMapType implements Cloneable { +public final class StackMapType implements Node, Cloneable { - public static final StackMapType[] EMPTY_ARRAY = {}; // must be public because BCELifier code generator writes calls to it + public static final StackMapType[] EMPTY_ARRAY = {}; // BCELifier code generator writes calls to constructor translating null to EMPTY_ARRAY private byte type; private int index = -1; // Index to CONSTANT_Class or offset @@ -53,7 +53,7 @@ } /** - * Construct object from file stream. + * Constructs object from file stream. * * @param file Input stream * @throws IOException if an I/O error occurs. @@ -66,6 +66,18 @@ this.constantPool = constantPool; } + /** + * Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. + * I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. + * + * @param v Visitor object + * @since 6.8.0 + */ + @Override + public void accept(final Visitor v) { + v.visitStackMapType(this); + } + private byte checkType(final byte type) { if (type < Const.ITEM_Bogus || type > Const.ITEM_NewObject) { throw new ClassFormatException("Illegal type for StackMapType: " + type); @@ -99,6 +111,15 @@ } /** + * Gets the class name of this StackMapType from the constant pool at index position. + * @return the fully qualified name of the class for this StackMapType. + * @since 6.8.0 + */ + public String getClassName() { + return constantPool.constantToString(index, Const.CONSTANT_Class); + } + + /** * @return Constant pool used by this object. */ public ConstantPool getConstantPool() { @@ -129,7 +150,7 @@ if (index < 0) { return ", class=<unknown>"; } - return ", class=" + constantPool.constantToString(index, Const.CONSTANT_Class); + return ", class=" + getClassName(); } if (type == Const.ITEM_NewObject) { return ", offset=" + index; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Synthetic.java 2026-04-17 19:08:13.000000000 +0000 @@ -52,7 +52,7 @@ } /** - * Construct object from input stream. + * Constructs object from input stream. * * @param nameIndex Index in constant pool to CONSTANT_Utf8 * @param length Content length in bytes diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,7 +43,7 @@ /** * Utility functions that do not really belong to any class in particular. * - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ // @since 6.0 methods are no longer final public abstract class Utility { @@ -51,7 +51,7 @@ /** * Decode characters into bytes. Used by <a href="Utility.html#decode(java.lang.String, boolean)">decode()</a> */ - private static class JavaReader extends FilterReader { + private static final class JavaReader extends FilterReader { public JavaReader(final Reader in) { super(in); @@ -88,10 +88,10 @@ } /** - * Encode bytes into valid java identifier characters. Used by + * Encode bytes into valid Java identifier characters. Used by * <a href="Utility.html#encode(byte[], boolean)">encode()</a> */ - private static class JavaWriter extends FilterWriter { + private static final class JavaWriter extends FilterWriter { public JavaWriter(final Writer out) { super(out); @@ -437,7 +437,9 @@ case Const.NEW: case Const.CHECKCAST: buf.append("\t"); - //$FALL-THROUGH$ + index = bytes.readUnsignedShort(); + buf.append("\t<").append(constantPool.constantToString(index, Const.CONSTANT_Class)).append(">").append(verbose ? " (" + index + ")" : ""); + break; case Const.INSTANCEOF: index = bytes.readUnsignedShort(); buf.append("\t<").append(constantPool.constantToString(index, Const.CONSTANT_Class)).append(">").append(verbose ? " (" + index + ")" : ""); @@ -864,7 +866,7 @@ // Skip any type arguments to read argument declarations between '(' and ')' index = signature.indexOf('(') + 1; if (index <= 0) { - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } while (signature.charAt(index) != ')') { vec.add(typeSignatureToString(signature.substring(index), chopit)); @@ -872,7 +874,7 @@ index += unwrap(CONSUMER_CHARS); // update position } } catch (final StringIndexOutOfBoundsException e) { // Should never occur - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } return vec.toArray(Const.EMPTY_STRING_ARRAY); } @@ -903,11 +905,11 @@ // Read return type after ')' index = signature.lastIndexOf(')') + 1; if (index <= 0) { - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } type = typeSignatureToString(signature.substring(index), chopit); } catch (final StringIndexOutOfBoundsException e) { // Should never occur - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } return type; } @@ -959,7 +961,7 @@ // Skip any type arguments to read argument declarations between '(' and ')' index = signature.indexOf('(') + 1; if (index <= 0) { - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } while (signature.charAt(index) != ')') { final String paramType = typeSignatureToString(signature.substring(index), chopit); @@ -985,7 +987,7 @@ // Read return type after ')' type = typeSignatureToString(signature.substring(index), chopit); } catch (final StringIndexOutOfBoundsException e) { // Should never occur - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } // ignore any throws information in the signature if (buf.length() > 1) { @@ -1172,7 +1174,7 @@ type = typeParams + typeSignaturesToString(signature.substring(index), chopit, ')'); index += unwrap(CONSUMER_CHARS); // update position // add return type - type = type + typeSignatureToString(signature.substring(index), chopit); + type += typeSignatureToString(signature.substring(index), chopit); index += unwrap(CONSUMER_CHARS); // update position // ignore any throws information in the signature return type; @@ -1237,12 +1239,12 @@ int index; try { if (signature.charAt(0) != '(') { - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } index = signature.lastIndexOf(')') + 1; return typeOfSignature(signature.substring(index)); } catch (final StringIndexOutOfBoundsException e) { - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } } @@ -1286,10 +1288,10 @@ case '*': return typeOfSignature(signature.substring(1)); default: - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } } catch (final StringIndexOutOfBoundsException e) { - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } } @@ -1469,8 +1471,8 @@ } else { type.append(typeSignatureToString(signature.substring(consumedChars), chopit)); // update our consumed count by the number of characters the for type argument - consumedChars = unwrap(Utility.CONSUMER_CHARS) + consumedChars; - wrap(Utility.CONSUMER_CHARS, consumedChars); + consumedChars = unwrap(CONSUMER_CHARS) + consumedChars; + wrap(CONSUMER_CHARS, consumedChars); } // are there more TypeArguments? @@ -1490,8 +1492,8 @@ } else { type.append(typeSignatureToString(signature.substring(consumedChars), chopit)); // update our consumed count by the number of characters the for type argument - consumedChars = unwrap(Utility.CONSUMER_CHARS) + consumedChars; - wrap(Utility.CONSUMER_CHARS, consumedChars); + consumedChars = unwrap(CONSUMER_CHARS) + consumedChars; + wrap(CONSUMER_CHARS, consumedChars); } } @@ -1508,14 +1510,14 @@ // update our consumed count by the number of characters the for type argument // note that this count includes the "L" we added, but that is ok // as it accounts for the "." we didn't consume - consumedChars = unwrap(Utility.CONSUMER_CHARS) + consumedChars; - wrap(Utility.CONSUMER_CHARS, consumedChars); + consumedChars = unwrap(CONSUMER_CHARS) + consumedChars; + wrap(CONSUMER_CHARS, consumedChars); return type.toString(); } if (signature.charAt(consumedChars) != ';') { throw new ClassFormatException("Invalid signature: " + signature); } - wrap(Utility.CONSUMER_CHARS, consumedChars + 1); // remove final ";" + wrap(CONSUMER_CHARS, consumedChars + 1); // remove final ";" return type.toString(); } case 'S': @@ -1536,9 +1538,9 @@ // The rest of the string denotes a '<field_type>' type = typeSignatureToString(signature.substring(n), chopit); // corrected concurrent private static field acess - // Utility.consumed_chars += consumed_chars; is replaced by: - final int temp = unwrap(Utility.CONSUMER_CHARS) + consumedChars; - wrap(Utility.CONSUMER_CHARS, temp); + // consumed_chars += consumed_chars; is replaced by: + final int temp = unwrap(CONSUMER_CHARS) + consumedChars; + wrap(CONSUMER_CHARS, temp); return type + brackets.toString(); } case 'V': @@ -1552,11 +1554,11 @@ } private static int unwrap(final ThreadLocal<Integer> tl) { - return tl.get(); + return tl.get().intValue(); } private static void wrap(final ThreadLocal<Integer> tl, final int value) { - tl.set(value); + tl.set(Integer.valueOf(value)); } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Visitor.java 2026-04-17 19:08:13.000000000 +0000 @@ -217,11 +217,32 @@ */ void visitParameterAnnotation(ParameterAnnotations obj); + /** * @since 6.0 */ void visitParameterAnnotationEntry(ParameterAnnotationEntry obj); + /** + * Visits a {@link Record} object. + * + * @param obj Record to visit + * @since 6.9.0 + */ + default void visitRecord(final Record obj) { + // empty + } + + /** + * Visits a {@link RecordComponentInfo} object. + * + * @param record component to visit + * @since 6.9.0 + */ + default void visitRecordComponent(final RecordComponentInfo record) { + // noop + } + void visitSignature(Signature obj); void visitSourceFile(SourceFile obj); @@ -230,7 +251,18 @@ void visitStackMapEntry(StackMapEntry obj); + /** + * Visits a {@link StackMapType} object. + * + * @param obj object to visit + * @since 6.8.0 + */ + default void visitStackMapType(final StackMapType obj) { + // empty + } + void visitSynthetic(Synthetic obj); void visitUnknown(Unknown obj); + } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/package-info.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/package-info.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/package-info.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +/** + * Classes that describe the structure of a Java class file and a class file parser. + */ +package com.sun.org.apache.bcel.internal.classfile; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,12 +28,12 @@ * <PRE> * Stack: ..., arrayref -> ..., length * </PRE> - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class ARRAYLENGTH extends Instruction implements ExceptionThrower, StackProducer, StackConsumer /* since 6.0 */ { /** - * Get length of array + * Gets length of array */ public ARRAYLENGTH() { super(com.sun.org.apache.bcel.internal.Const.ARRAYLENGTH, (short) 1); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,8 +28,10 @@ * <PRE> * Stack: ..., objectref -> objectref * </PRE> + * + * @LastModified: Sept 2025 */ -public class ATHROW extends Instruction implements UnconditionalBranch, ExceptionThrower { +public class ATHROW extends Instruction implements UnconditionalBranch, ExceptionThrower, StackConsumer { /** * Throw exception @@ -48,6 +50,7 @@ public void accept(final Visitor v) { v.visitUnconditionalBranch(this); v.visitExceptionThrower(this); + v.visitStackConsumer(this); v.visitATHROW(this); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationEntryGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationEntryGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationEntryGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/AnnotationEntryGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +28,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; import com.sun.org.apache.bcel.internal.classfile.AnnotationEntry; import com.sun.org.apache.bcel.internal.classfile.Attribute; @@ -37,10 +38,11 @@ import com.sun.org.apache.bcel.internal.classfile.RuntimeInvisibleParameterAnnotations; import com.sun.org.apache.bcel.internal.classfile.RuntimeVisibleAnnotations; import com.sun.org.apache.bcel.internal.classfile.RuntimeVisibleParameterAnnotations; +import jdk.xml.internal.Utils; /** * @since 6.0 - * @LastModified: Jan 2020 + * @LastModified: Sept 2025 */ public class AnnotationEntryGen { @@ -53,7 +55,7 @@ * @param annotationEntryGens An array of AnnotationGen objects */ static Attribute[] getAnnotationAttributes(final ConstantPoolGen cp, final AnnotationEntryGen[] annotationEntryGens) { - if (annotationEntryGens.length == 0) { + if (annotationEntryGens == null && annotationEntryGens.length == 0) { return Attribute.EMPTY_ARRAY; } @@ -255,11 +257,7 @@ } private List<ElementValuePairGen> copyValues(final ElementValuePair[] in, final ConstantPoolGen cpool, final boolean copyPoolEntries) { - final List<ElementValuePairGen> out = new ArrayList<>(); - for (final ElementValuePair nvp : in) { - out.add(new ElementValuePairGen(nvp, cpool, copyPoolEntries)); - } - return out; + return Utils.streamOfIfNonNull(in).map(nvp -> new ElementValuePairGen(nvp, cpool, copyPoolEntries)).collect(Collectors.toList()); } public void dump(final DataOutputStream dos) throws IOException { @@ -286,18 +284,20 @@ } public final String getTypeName() { - return getTypeSignature();// BCELBUG: Should I use this instead? + return getTypeSignature(); // BCELBUG: Should I use this instead? // Utility.signatureToString(getTypeSignature()); } public final String getTypeSignature() { - // ConstantClass c = (ConstantClass)cpool.getConstant(typeIndex); + // ConstantClass c = (ConstantClass) cpool.getConstant(typeIndex); final ConstantUtf8 utf8 = (ConstantUtf8) cpool.getConstant(typeIndex/* c.getNameIndex() */); return utf8.getBytes(); } /** - * Returns list of ElementNameValuePair objects + * Returns list of ElementNameValuePair objects. + * + * @return list of ElementNameValuePair objects. */ public List<ElementValuePairGen> getValues() { return evs; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayElementValueGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,5 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,12 +24,15 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; import com.sun.org.apache.bcel.internal.classfile.ArrayElementValue; import com.sun.org.apache.bcel.internal.classfile.ElementValue; +import jdk.xml.internal.Utils; /** * @since 6.0 + * @LastModified: Sept 2025 */ public class ArrayElementValueGen extends ElementValueGen { // J5TODO: Should we make this an array or a list? A list would be easier to @@ -46,7 +48,7 @@ evalues = new ArrayList<>(); final ElementValue[] in = value.getElementValuesArray(); for (final ElementValue element : in) { - evalues.add(ElementValueGen.copy(element, cpool, copyPoolEntries)); + evalues.add(copy(element, cpool, copyPoolEntries)); } } @@ -55,15 +57,12 @@ evalues = new ArrayList<>(); } - public ArrayElementValueGen(final int type, final ElementValue[] datums, final ConstantPoolGen cpool) { + public ArrayElementValueGen(final int type, final ElementValue[] elementValues, final ConstantPoolGen cpool) { super(type, cpool); if (type != ARRAY) { throw new IllegalArgumentException("Only element values of type array can be built with this ctor - type specified: " + type); } - this.evalues = new ArrayList<>(); - for (final ElementValue datum : datums) { - evalues.add(ElementValueGen.copy(datum, cpool, true)); - } + this.evalues = Utils.streamOfIfNonNull(elementValues).map(e -> copy(e, cpool, true)).collect(Collectors.toList()); } public void addElement(final ElementValueGen gen) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ArrayType.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,5 @@ /* - * reserved comment block - * DO NOT REMOVE OR ALTER! + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -24,6 +23,8 @@ /** * Denotes array type, such as int[][] + * + * @LastModified: Sept 2025 */ public final class ArrayType extends ReferenceType { @@ -43,7 +44,7 @@ /** * Convenience constructor for reference array type, e.g. Object[] * - * @param className complete name of class (java.lang.String, e.g.) + * @param className complete name of class ({@link String}, for example) * @param dimensions array dimensions */ public ArrayType(final String className, final int dimensions) { @@ -56,6 +57,7 @@ * @param type type of array (may be an array itself) * @param dimensions array dimensions */ + @SuppressWarnings("deprecation") //signature public ArrayType(final Type type, final int dimensions) { super(Const.T_ARRAY, "<dummy>"); if (dimensions < 1 || dimensions > Const.MAX_BYTE) { @@ -79,7 +81,7 @@ buf.append('['); } buf.append(basicType.getSignature()); - super.setSignature(buf.toString()); + this.signature = buf.toString(); } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/BranchHandle.java 2026-04-17 19:08:13.000000000 +0000 @@ -63,7 +63,7 @@ } /** - * Set new contents. Old instruction is disposed and may not be used anymore. + * Sets new contents. Old instruction is disposed and may not be used anymore. */ @Override // This is only done in order to apply the additional type check; could be merged with super impl. public void setInstruction(final Instruction i) { // TODO could be package-protected? diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CPInstruction.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,7 +35,7 @@ * @see LDC * @see INVOKEVIRTUAL * - * @LastModified: Jan 2020 + * @LastModified: Sept 2025 */ public abstract class CPInstruction extends Instruction implements TypedInstruction, IndexedInstruction { @@ -104,7 +104,7 @@ } /** - * Set the index to constant pool. + * Sets the index to constant pool. * * @param index in constant pool. */ diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassElementValueGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassElementValueGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassElementValueGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassElementValueGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -48,12 +48,12 @@ } protected ClassElementValueGen(final int typeIdx, final ConstantPoolGen cpool) { - super(ElementValueGen.CLASS, cpool); + super(CLASS, cpool); this.idx = typeIdx; } public ClassElementValueGen(final ObjectType t, final ConstantPoolGen cpool) { - super(ElementValueGen.CLASS, cpool); + super(CLASS, cpool); // this.idx = cpool.addClass(t); idx = cpool.addUtf8(t.getSignature()); } @@ -67,9 +67,9 @@ public String getClassString() { final ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(idx); return cu8.getBytes(); - // ConstantClass c = (ConstantClass)getConstantPool().getConstant(idx); + // ConstantClass c = (ConstantClass) getConstantPool().getConstant(idx); // ConstantUtf8 utf8 = - // (ConstantUtf8)getConstantPool().getConstant(c.getNameIndex()); + // (ConstantUtf8) getConstantPool().getConstant(c.getNameIndex()); // return utf8.getBytes(); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ClassGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,40 +40,37 @@ import com.sun.org.apache.bcel.internal.util.BCELComparator; /** - * Template class for building up a java class. May be initialized with an existing java class (file). + * Template class for building up a java class. May be initialized with an existing Java class (file). * * @see JavaClass - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class ClassGen extends AccessFlags implements Cloneable { - private static BCELComparator bcelComparator = new BCELComparator() { + private static BCELComparator<ClassGen> bcelComparator = new BCELComparator<ClassGen>() { @Override - public boolean equals(final Object o1, final Object o2) { - final ClassGen THIS = (ClassGen) o1; - final ClassGen THAT = (ClassGen) o2; - return Objects.equals(THIS.getClassName(), THAT.getClassName()); + public boolean equals(final ClassGen a, final ClassGen b) { + return a == b || a != null && b != null && Objects.equals(a.getClassName(), b.getClassName()); } @Override - public int hashCode(final Object o) { - final ClassGen THIS = (ClassGen) o; - return THIS.getClassName().hashCode(); + public int hashCode(final ClassGen o) { + return o != null ? Objects.hashCode(o.getClassName()) : 0; } }; /** * @return Comparison strategy object */ - public static BCELComparator getComparator() { + public static BCELComparator<ClassGen> getComparator() { return bcelComparator; } /** * @param comparator Comparison strategy object */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<ClassGen> comparator) { bcelComparator = comparator; } @@ -101,7 +98,7 @@ private List<ClassObserver> observers; /** - * Initialize with existing class. + * Constructs a new instance from an existing class. * * @param clazz JavaClass object (e.g. read from file) */ @@ -118,15 +115,26 @@ final Attribute[] attributes = clazz.getAttributes(); // J5TODO: Could make unpacking lazy, done on first reference final AnnotationEntryGen[] annotations = unpackAnnotations(attributes); - Collections.addAll(interfaceList, clazz.getInterfaceNames()); - for (final Attribute attribute : attributes) { - if (!(attribute instanceof Annotations)) { - addAttribute(attribute); + final String[] interfaceNames = clazz.getInterfaceNames(); + if (interfaceNames != null) { + Collections.addAll(interfaceList, interfaceNames); + } + if (attributes != null) { + for (final Attribute attribute : attributes) { + if (!(attribute instanceof Annotations)) { + addAttribute(attribute); + } } } Collections.addAll(annotationList, annotations); - Collections.addAll(methodList, clazz.getMethods()); - Collections.addAll(fieldList, clazz.getFields()); + final Method[] methods = clazz.getMethods(); + if (methods != null) { + Collections.addAll(methodList, methods); + } + final Field[] fields = clazz.getFields(); + if (fields != null) { + Collections.addAll(fieldList, fields); + } } /** @@ -242,7 +250,7 @@ try { return super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } } @@ -282,7 +290,7 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof ClassGen && bcelComparator.equals(this, (ClassGen) obj); } // J5TODO: Should we make calling unpackAnnotations() lazy and put it in here? @@ -379,7 +387,7 @@ } /** - * Return value as defined by given BCELComparator strategy. By default return the hashcode of the class name. + * Return value as defined by given BCELComparator strategy. By default return the hash code of the class name. * * @see Object#hashCode() */ @@ -478,7 +486,7 @@ } /** - * Set major version number of class file, default value is 45 (JDK 1.1) + * Sets major version number of class file, default value is 45 (JDK 1.1) * * @param major major version number */ @@ -492,11 +500,13 @@ public void setMethods(final Method[] methods) { methodList.clear(); - Collections.addAll(methodList, methods); + if (methods != null) { + Collections.addAll(methodList, methods); + } } /** - * Set minor version number of class file, default value is 3 (JDK 1.1) + * Sets minor version number of class file, default value is 3 (JDK 1.1) * * @param minor minor version number */ @@ -515,17 +525,19 @@ } /** - * Look for attributes representing annotations and unpack them. + * Unpacks attributes representing annotations. */ - private AnnotationEntryGen[] unpackAnnotations(final Attribute[] attrs) { + private AnnotationEntryGen[] unpackAnnotations(final Attribute[] attributes) { final List<AnnotationEntryGen> annotationGenObjs = new ArrayList<>(); - for (final Attribute attr : attrs) { - if (attr instanceof RuntimeVisibleAnnotations) { - final RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr; - rva.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false))); - } else if (attr instanceof RuntimeInvisibleAnnotations) { - final RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr; - ria.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false))); + if (attributes != null) { + for (final Attribute attr : attributes) { + if (attr instanceof RuntimeVisibleAnnotations) { + final RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr; + rva.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false))); + } else if (attr instanceof RuntimeInvisibleAnnotations) { + final RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr; + ria.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false))); + } } } return annotationGenObjs.toArray(AnnotationEntryGen.EMPTY_ARRAY); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/CodeExceptionGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -63,7 +63,7 @@ try { return super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } } @@ -81,7 +81,7 @@ } /** - * Get CodeException object.<BR> + * Gets CodeException object.<BR> * * This relies on that the instruction list has already been dumped to byte code or that the 'setPositions' methods * has been called for the instruction list. @@ -120,7 +120,7 @@ } /* - * Set end of handler + * Sets end of handler * * @param endPc End of handled region (inclusive) */ @@ -130,7 +130,7 @@ } /* - * Set handler code + * Sets handler code * * @param handlerPc Start of handler */ @@ -140,7 +140,7 @@ } /* - * Set start of handler + * Sets start of handler * * @param startPc Start of handled region (inclusive) */ diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ElementValuePairGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -44,7 +44,7 @@ // Could assert nvp.getNameString() points to the same thing as // constantPoolGen.getConstant(nvp.getNameIndex()) // if - // (!nvp.getNameString().equals(((ConstantUtf8)constantPoolGen.getConstant(nvp.getNameIndex())).getBytes())) + // (!nvp.getNameString().equals(((ConstantUtf8) constantPoolGen.getConstant(nvp.getNameIndex())).getBytes())) // { // throw new IllegalArgumentException("envp buggered"); // } @@ -86,7 +86,7 @@ } public final String getNameString() { - // ConstantString cu8 = (ConstantString)constantPoolGen.getConstant(nameIdx); + // ConstantString cu8 = (ConstantString) constantPoolGen.getConstant(nameIdx); return ((ConstantUtf8) constantPoolGen.getConstant(nameIdx)).getBytes(); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/EnumElementValueGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -40,10 +40,8 @@ public EnumElementValueGen(final EnumElementValue value, final ConstantPoolGen cpool, final boolean copyPoolEntries) { super(ENUM_CONSTANT, cpool); if (copyPoolEntries) { - typeIdx = cpool.addUtf8(value.getEnumTypeString());// was - // addClass(value.getEnumTypeString()); - valueIdx = cpool.addUtf8(value.getEnumValueString()); // was - // addString(value.getEnumValueString()); + typeIdx = cpool.addUtf8(value.getEnumTypeString()); // was addClass(value.getEnumTypeString()); + valueIdx = cpool.addUtf8(value.getEnumValueString()); // was addString(value.getEnumValueString()); } else { typeIdx = value.getTypeIndex(); valueIdx = value.getValueIndex(); @@ -55,7 +53,7 @@ * This ctor is used for deserialization */ protected EnumElementValueGen(final int typeIdx, final int valueIdx, final ConstantPoolGen cpool) { - super(ElementValueGen.ENUM_CONSTANT, cpool); + super(ENUM_CONSTANT, cpool); if (super.getElementValueType() != ENUM_CONSTANT) { throw new IllegalArgumentException("Only element values of type enum can be built with this ctor - type specified: " + super.getElementValueType()); } @@ -64,9 +62,9 @@ } public EnumElementValueGen(final ObjectType t, final String value, final ConstantPoolGen cpool) { - super(ElementValueGen.ENUM_CONSTANT, cpool); - typeIdx = cpool.addUtf8(t.getSignature());// was addClass(t); - valueIdx = cpool.addUtf8(value);// was addString(value); + super(ENUM_CONSTANT, cpool); + typeIdx = cpool.addUtf8(t.getSignature()); // was addClass(t); + valueIdx = cpool.addUtf8(value); // was addString(value); } @Override @@ -90,9 +88,9 @@ public String getEnumTypeString() { // Constant cc = getConstantPool().getConstant(typeIdx); // ConstantClass cu8 = - // (ConstantClass)getConstantPool().getConstant(typeIdx); + // (ConstantClass) getConstantPool().getConstant(typeIdx); // return - // ((ConstantUtf8)getConstantPool().getConstant(cu8.getNameIndex())).getBytes(); + // ((ConstantUtf8) getConstantPool().getConstant(cu8.getNameIndex())).getBytes(); return ((ConstantUtf8) getConstantPool().getConstant(typeIdx)).getBytes(); // return Utility.signatureToString(cu8.getBytes()); } @@ -100,9 +98,9 @@ public String getEnumValueString() { return ((ConstantUtf8) getConstantPool().getConstant(valueIdx)).getBytes(); // ConstantString cu8 = - // (ConstantString)getConstantPool().getConstant(valueIdx); + // (ConstantString) getConstantPool().getConstant(valueIdx); // return - // ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes(); + // ((ConstantUtf8) getConstantPool().getConstant(cu8.getStringIndex())).getBytes(); } public int getTypeIndex() { @@ -118,8 +116,8 @@ final ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(valueIdx); return cu8.getBytes(); // ConstantString cu8 = - // (ConstantString)getConstantPool().getConstant(valueIdx); + // (ConstantString) getConstantPool().getConstant(valueIdx); // return - // ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes(); + // ((ConstantUtf8) getConstantPool().getConstant(cu8.getStringIndex())).getBytes(); } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ExceptionThrower.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,7 +23,7 @@ /** * Denote an instruction that may throw a run-time or a linking exception (or both) during execution. This is not quite - * the truth as such; because all instructions may throw an java.lang.VirtualMachineError. These exceptions are omitted. + * the truth as such; because all instructions may throw a {@link VirtualMachineError}. These exceptions are omitted. * * The Lava Language Specification specifies exactly which <i>RUN-TIME</i> and which <i>LINKING</i> exceptions each * instruction may throw which is reflected by the implementers. Due to the structure of the JVM specification, it may diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,37 +40,34 @@ * to a field (which must of course be compatible with to the declared type). * * @see Field - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public class FieldGen extends FieldGenOrMethodGen { - private static BCELComparator bcelComparator = new BCELComparator() { + private static BCELComparator<FieldGen> bcelComparator = new BCELComparator<FieldGen>() { @Override - public boolean equals(final Object o1, final Object o2) { - final FieldGen THIS = (FieldGen) o1; - final FieldGen THAT = (FieldGen) o2; - return Objects.equals(THIS.getName(), THAT.getName()) && Objects.equals(THIS.getSignature(), THAT.getSignature()); + public boolean equals(final FieldGen a, final FieldGen b) { + return a == b || a != null && b != null && Objects.equals(a.getName(), b.getName()) && Objects.equals(a.getSignature(), b.getSignature()); } @Override - public int hashCode(final Object o) { - final FieldGen THIS = (FieldGen) o; - return THIS.getSignature().hashCode() ^ THIS.getName().hashCode(); + public int hashCode(final FieldGen o) { + return o != null ? Objects.hash(o.getSignature(), o.getName()) : 0; } }; /** - * @return Comparison strategy object + * @return Comparison strategy object. */ - public static BCELComparator getComparator() { + public static BCELComparator<FieldGen> getComparator() { return bcelComparator; } /** - * @param comparator Comparison strategy object + * @param comparator Comparison strategy object. */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<FieldGen> comparator) { bcelComparator = comparator; } @@ -81,8 +78,8 @@ /** * Instantiate from existing field. * - * @param field Field object - * @param cp constant pool (must contain the same entries as the field's constant pool) + * @param field Field object. + * @param cp constant pool (must contain the same entries as the field's constant pool). */ public FieldGen(final Field field, final ConstantPoolGen cp) { this(field.getAccessFlags(), Type.getType(field.getSignature()), field.getName(), cp); @@ -187,11 +184,11 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof FieldGen && bcelComparator.equals(this, (FieldGen) obj); } /** - * Get field object after having set up all necessary values. + * Gets field object after having set up all necessary values. */ public Field getField() { final String signature = getSignature(); @@ -207,10 +204,7 @@ } public String getInitValue() { - if (value != null) { - return value.toString(); - } - return null; + return Objects.toString(value, null); } @Override @@ -219,7 +213,7 @@ } /** - * Return value as defined by given BCELComparator strategy. By default return the hashcode of the field's name XOR + * Return value as defined by given BCELComparator strategy. By default return the hash code of the field's name XOR * signature. * * @see Object#hashCode() @@ -295,7 +289,7 @@ } /** - * Set (optional) initial value of field, otherwise it will be set to null/0/false by the JVM automatically. + * Sets (optional) initial value of field, otherwise it will be set to null/0/false by the JVM automatically. */ public void setInitValue(final String str) { checkType(ObjectType.getInstance("java.lang.String")); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldGenOrMethodGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,7 +30,7 @@ /** * Super class for FieldGen and MethodGen objects, since they have some methods in common! * - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAndTyped, Cloneable { @@ -67,8 +67,10 @@ super(accessFlags); } - protected void addAll(final Attribute[] attrs) { - Collections.addAll(attributeList, attrs); + protected void addAll(final Attribute[] attributes) { + if (attributes != null) { + Collections.addAll(attributeList, attributes); + } } /** @@ -93,7 +95,7 @@ try { return super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/FieldOrMethod.java 2026-04-17 19:08:13.000000000 +0000 @@ -53,7 +53,6 @@ * generated by Java 1.5, this answer is sometimes wrong (e.g., if the "clone()" method is called on an * array). A better idea is to use the {@link #getReferenceType(ConstantPoolGen)} method, which correctly * distinguishes between class types and array types. - * */ @Deprecated public String getClassName(final ConstantPoolGen cpg) { @@ -89,6 +88,9 @@ if (rt instanceof ObjectType) { return (ObjectType) rt; } + if (rt instanceof ArrayType) { + return Type.OBJECT; + } throw new ClassGenException(rt.getClass().getCanonicalName() + " " + rt.getSignature() + " does not represent an ObjectType"); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ICONST.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,7 +25,6 @@ * <PRE> * Stack: ... -> ..., * </PRE> - * */ public class ICONST extends Instruction implements ConstantPushInstruction { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/INVOKEDYNAMIC.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,7 +37,7 @@ * @see <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokedynamic"> The * invokedynamic instruction in The Java Virtual Machine Specification</a> * @since 6.0 - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class INVOKEDYNAMIC extends InvokeInstruction { @@ -104,11 +104,11 @@ } /** - * Since InvokeDynamic doesn't refer to a reference type, just return java.lang.Object, as that is the only type we can + * Since InvokeDynamic doesn't refer to a reference type, just return {@link Object}, as that is the only type we can * say for sure the reference will be. * * @param cpg the ConstantPoolGen used to create the instruction - * @return an ObjectType for java.lang.Object + * @return an ObjectType for {@link Object} * @since 6.1 */ @Override diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Instruction.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,7 +29,7 @@ /** * Abstract super class for all Java byte codes. * - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public abstract class Instruction implements Cloneable { @@ -461,7 +461,7 @@ public Instruction copy() { Instruction i = null; // "Constant" instruction, no need to duplicate - if (InstructionConst.getInstruction(this.getOpcode()) != null) { + if (InstructionConst.getInstruction(getOpcode()) != null) { i = this; } else { try { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConst.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConst.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConst.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionConst.java 2026-04-17 19:08:13.000000000 +0000 @@ -170,7 +170,7 @@ public static final LocalVariableInstruction ISTORE_2 = new ISTORE(2); /** - * Get object via its opcode, for immutable instructions like branch instructions entries are set to null. + * Gets object via its opcode, for immutable instructions like branch instructions entries are set to null. */ static final Instruction[] INSTRUCTIONS = new Instruction[256]; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionFactory.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,11 +30,11 @@ * * @see Const * @see InstructionConst - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class InstructionFactory { - private static class MethodObject { + private static final class MethodObject { final Type[] argTypes; final Type resultType; @@ -53,10 +53,12 @@ private static final String FQCN_STRING_BUFFER = "java.lang.StringBuffer"; - // N.N. These must agree with the order of Constants.T_CHAR through T_LONG - private static final String[] shortNames = {"C", "F", "D", "B", "S", "I", "L"}; + /** + * These must agree with the order of Constants.T_CHAR through T_LONG. + */ + private static final String[] SHORT_NAMES = {"C", "F", "D", "B", "S", "I", "L"}; - private static final MethodObject[] appendMethodObjects = { + private static final MethodObject[] APPEND_METHOD_OBJECTS = { new MethodObject(FQCN_STRING_BUFFER, APPEND, Type.STRINGBUFFER, new Type[] { Type.STRING }), new MethodObject(FQCN_STRING_BUFFER, APPEND, Type.STRINGBUFFER, new Type[] { Type.OBJECT }), null, null, // indices 2, 3 new MethodObject(FQCN_STRING_BUFFER, APPEND, Type.STRINGBUFFER, new Type[] { Type.BOOLEAN }), @@ -484,7 +486,7 @@ public Instruction createAppend(final Type type) { final byte t = type.getType(); if (isString(type)) { - return createInvoke(appendMethodObjects[0], Const.INVOKEVIRTUAL); + return createInvoke(APPEND_METHOD_OBJECTS[0], Const.INVOKEVIRTUAL); } switch (t) { case Const.T_BOOLEAN: @@ -495,10 +497,10 @@ case Const.T_SHORT: case Const.T_INT: case Const.T_LONG: - return createInvoke(appendMethodObjects[t], Const.INVOKEVIRTUAL); + return createInvoke(APPEND_METHOD_OBJECTS[t], Const.INVOKEVIRTUAL); case Const.T_ARRAY: case Const.T_OBJECT: - return createInvoke(appendMethodObjects[1], Const.INVOKEVIRTUAL); + return createInvoke(APPEND_METHOD_OBJECTS[1], Const.INVOKEVIRTUAL); default: throw new IllegalArgumentException("No append for this type? " + type); } @@ -515,7 +517,7 @@ if (dest == Const.T_LONG && (src == Const.T_CHAR || src == Const.T_BYTE || src == Const.T_SHORT)) { src = Const.T_INT; } - final String name = "com.sun.org.apache.bcel.internal.generic." + shortNames[src - Const.T_CHAR] + "2" + shortNames[dest - Const.T_CHAR]; + final String name = "com.sun.org.apache.bcel.internal.generic." + SHORT_NAMES[src - Const.T_CHAR] + "2" + SHORT_NAMES[dest - Const.T_CHAR]; Instruction i = null; try { i = (Instruction) Class.forName(name).getDeclaredConstructor().newInstance();; @@ -642,8 +644,10 @@ int index; int nargs = 0; final String signature = Type.getMethodSignature(retType, argTypes); - for (final Type argType : argTypes) { - nargs += argType.getSize(); + if (argTypes != null) { + for (final Type argType : argTypes) { + nargs += argType.getSize(); + } } if (useInterface) { index = cp.addInterfaceMethodref(className, name, signature); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,7 +38,7 @@ * @see Instruction * @see BranchHandle * @see InstructionList - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public class InstructionHandle { @@ -118,7 +118,7 @@ if (targeters == null) { targeters = new HashSet<>(); } - // if(!targeters.contains(t)) + // if (!targeters.contains(t)) targeters.add(t); } @@ -135,15 +135,12 @@ } /** - * Get attribute of an instruction handle. + * Gets attribute of an instruction handle. * * @param key the key object to store/retrieve the attribute */ public Object getAttribute(final Object key) { - if (attributes != null) { - return attributes.get(key); - } - return null; + return attributes != null ? attributes.get(key) : null; } /** @@ -247,7 +244,7 @@ } /** - * Set the position, i.e., the byte code offset of the contained instruction. + * Sets the position, i.e., the byte code offset of the contained instruction. */ void setPosition(final int pos) { i_position = pos; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionList.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +33,7 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.classfile.Constant; import com.sun.org.apache.bcel.internal.util.ByteSequence; +import jdk.xml.internal.Utils; /** * This class is a container for a list of <a href="Instruction.html">Instruction</a> objects. Instructions can be @@ -46,7 +47,7 @@ * @see Instruction * @see InstructionHandle * @see BranchHandle - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class InstructionList implements Iterable<InstructionHandle> { @@ -60,23 +61,25 @@ * @return target position's instruction handle if available */ public static InstructionHandle findHandle(final InstructionHandle[] ihs, final int[] pos, final int count, final int target) { - int l = 0; - int r = count - 1; - /* - * Do a binary search since the pos array is orderd. - */ - do { - final int i = l + r >>> 1; - final int j = pos[i]; - if (j == target) { - return ihs[i]; - } - if (target < j) { - r = i - 1; - } else { - l = i + 1; - } - } while (l <= r); + if (ihs != null && pos != null) { + int l = 0; + int r = count - 1; + /* + * Do a binary search since the pos array is orderd. + */ + do { + final int i = l + r >>> 1; + final int j = pos[i]; + if (j == target) { + return ihs[i]; + } + if (target < j) { + r = i - 1; + } else { + l = i + 1; + } + } while (l <= r); + } return null; } @@ -513,7 +516,7 @@ } /** - * Get instruction handle for instruction at byte code position pos. This only works properly, if the list is freshly + * Gets instruction handle for instruction at byte code position pos. This only works properly, if the list is freshly * initialized from a byte array or setPositions() has been called before this method. * * @param pos byte code position to search for @@ -605,7 +608,7 @@ } /** - * Get positions (offsets) of all instructions in the list. This relies on that the list has been freshly created from + * Gets positions (offsets) of all instructions in the list. This relies on that the list has been freshly created from * an byte code array, or that setPositions() has been called. Otherwise this may be inaccurate. * * @return array containing all instruction's offset in byte code @@ -959,7 +962,7 @@ * @see MethodGen */ public void redirectExceptionHandlers(final CodeExceptionGen[] exceptions, final InstructionHandle oldTarget, final InstructionHandle newTarget) { - for (final CodeExceptionGen exception : exceptions) { + Utils.streamOfIfNonNull(exceptions).forEach(exception -> { if (exception.getStartPC() == oldTarget) { exception.setStartPC(newTarget); } @@ -969,7 +972,7 @@ if (exception.getHandlerPC() == oldTarget) { exception.setHandlerPC(newTarget); } - } + }); } /** @@ -981,16 +984,14 @@ * @see MethodGen */ public void redirectLocalVariables(final LocalVariableGen[] lg, final InstructionHandle oldTarget, final InstructionHandle newTarget) { - for (final LocalVariableGen element : lg) { - final InstructionHandle start = element.getStart(); - final InstructionHandle end = element.getEnd(); - if (start == oldTarget) { + Utils.streamOfIfNonNull(lg).forEach(element -> { + if (element.getStart() == oldTarget) { element.setStart(newTarget); } - if (end == oldTarget) { + if (element.getEnd() == oldTarget) { element.setEnd(newTarget); } - } + }); } /** @@ -1120,7 +1121,7 @@ ih.setPosition(index); pos[count++] = index; /* - * Get an estimate about how many additional bytes may be added, because BranchInstructions may have variable length + * Gets an estimate about how many additional bytes may be added, because BranchInstructions may have variable length * depending on the target offset (short vs. int) or alignment issues (TABLESWITCH and LOOKUPSWITCH). */ switch (i.getOpcode()) { @@ -1132,11 +1133,14 @@ case Const.LOOKUPSWITCH: maxAdditionalBytes += 3; break; + default: + // TODO should this be an error? + break; } index += i.getLength(); } /* - * Pass 2: Expand the variable-length (Branch)Instructions depending on the target offset (short or int) and ensure that + * Pass 2: Expand the variable-length (Branch) Instructions depending on the target offset (short or int) and ensure that * branch targets are within this list. */ for (InstructionHandle ih = start; ih != null; ih = ih.getNext()) { @@ -1152,8 +1156,7 @@ pos[count++] = index; index += i.getLength(); } - bytePositions = new int[count]; // Trim to proper size - System.arraycopy(pos, 0, bytePositions, 0, count); + bytePositions = Arrays.copyOfRange(pos, 0, count); // Trim to proper size } /** diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionTargeter.java 2026-04-17 19:08:13.000000000 +0000 @@ -22,7 +22,7 @@ package com.sun.org.apache.bcel.internal.generic; /** - * Denote that a class targets InstructionHandles within an InstructionList. Namely the following implementers: + * Denotes that a class targets InstructionHandles within an InstructionList. * * @see BranchHandle * @see LocalVariableGen @@ -33,9 +33,12 @@ // static final InstructionTargeter[] EMPTY_ARRAY = new InstructionTargeter[0]; /** - * Checks whether this targeter targets the specified instruction handle. + * Tests whether this targeter targets the specified instruction handle. + * + * @param instructionHandle the instruction handle to test. + * @return whether this targeter targets the specified instruction handle. */ - boolean containsTarget(InstructionHandle ih); + boolean containsTarget(InstructionHandle instructionHandle); /** * Replaces the target of this targeter from this old handle to the new handle. diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LCMP.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,7 +27,6 @@ * <PRE> * Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -> ..., result <= -1, 0, 1> * </PRE> - * */ public class LCMP extends Instruction implements TypedInstruction, StackProducer, StackConsumer { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDC.java 2026-04-17 19:08:13.000000000 +0000 @@ -94,6 +94,8 @@ return Type.INT; case com.sun.org.apache.bcel.internal.Const.CONSTANT_Class: return Type.CLASS; + case com.sun.org.apache.bcel.internal.Const.CONSTANT_Dynamic: + return Type.OBJECT; default: // Never reached throw new IllegalArgumentException("Unknown or invalid constant type at " + super.getIndex()); } @@ -113,7 +115,10 @@ case com.sun.org.apache.bcel.internal.Const.CONSTANT_Class: final int nameIndex = ((com.sun.org.apache.bcel.internal.classfile.ConstantClass) c).getNameIndex(); c = cpg.getConstantPool().getConstant(nameIndex); - return Type.getType(((com.sun.org.apache.bcel.internal.classfile.ConstantUtf8) c).getBytes()); + return Type.getType(Type.internalTypeNameToSignature(((com.sun.org.apache.bcel.internal.classfile.ConstantUtf8) c).getBytes())); + case com.sun.org.apache.bcel.internal.Const.CONSTANT_Dynamic: + // Really not sure what to return here, maybe a BootstrapMethod instance but how do we get it? + return c; default: // Never reached throw new IllegalArgumentException("Unknown or invalid constant type at " + super.getIndex()); } @@ -129,7 +134,7 @@ } /** - * Set the index to constant pool and adjust size. + * Sets the index to constant pool and adjust size. */ @Override public final void setIndex(final int index) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LineNumberGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -54,7 +54,7 @@ try { return super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } } @@ -71,7 +71,7 @@ } /** - * Get LineNumber attribute. + * Gets LineNumber attribute. * * This relies on that the instruction list has already been dumped to byte code or that the 'setPositions' methods * has been called for the instruction list. diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -85,7 +85,7 @@ try { return super.clone(); } catch (final CloneNotSupportedException e) { - throw new Error("Clone Not Supported"); // never happens + throw new UnsupportedOperationException("Clone Not Supported", e); // never happens } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LocalVariableInstruction.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,7 +28,7 @@ /** * Abstract super class for instructions dealing with local variables. * - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public abstract class LocalVariableInstruction extends Instruction implements TypedInstruction, IndexedInstruction { @@ -162,7 +162,7 @@ } /** - * Set the local variable index. also updates opcode and length TODO Why? + * Sets the local variable index. also updates opcode and length TODO Why? * * @see #setIndexOnly(int) */ diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +27,7 @@ import java.util.List; import java.util.Objects; import java.util.Stack; +import java.util.stream.Collectors; import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.classfile.AnnotationEntry; @@ -46,6 +47,7 @@ import com.sun.org.apache.bcel.internal.classfile.RuntimeVisibleParameterAnnotations; import com.sun.org.apache.bcel.internal.classfile.Utility; import com.sun.org.apache.bcel.internal.util.BCELComparator; +import jdk.xml.internal.Utils; /** * Template class for building up a method. This is done by defining exception handlers, adding thrown exceptions, local @@ -57,7 +59,7 @@ * * @see InstructionList * @see Method - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class MethodGen extends FieldGenOrMethodGen { @@ -102,19 +104,16 @@ } } - private static BCELComparator bcelComparator = new BCELComparator() { + private static BCELComparator<FieldGenOrMethodGen> bcelComparator = new BCELComparator<FieldGenOrMethodGen>() { @Override - public boolean equals(final Object o1, final Object o2) { - final FieldGenOrMethodGen THIS = (FieldGenOrMethodGen) o1; - final FieldGenOrMethodGen THAT = (FieldGenOrMethodGen) o2; - return Objects.equals(THIS.getName(), THAT.getName()) && Objects.equals(THIS.getSignature(), THAT.getSignature()); + public boolean equals(final FieldGenOrMethodGen a, final FieldGenOrMethodGen b) { + return a == b || a != null && b != null && Objects.equals(a.getName(), b.getName()) && Objects.equals(a.getSignature(), b.getSignature()); } @Override - public int hashCode(final Object o) { - final FieldGenOrMethodGen THIS = (FieldGenOrMethodGen) o; - return THIS.getSignature().hashCode() ^ THIS.getName().hashCode(); + public int hashCode(final FieldGenOrMethodGen o) { + return o != null ? Objects.hash(o.getSignature(), o.getName()) : 0; } }; @@ -127,9 +126,9 @@ } /** - * @return Comparison strategy object + * @return Comparison strategy object. */ - public static BCELComparator getComparator() { + public static BCELComparator<FieldGenOrMethodGen> getComparator() { return bcelComparator; } @@ -206,9 +205,9 @@ } /** - * @param comparator Comparison strategy object + * @param comparator Comparison strategy object. */ - public static void setComparator(final BCELComparator comparator) { + public static void setComparator(final BCELComparator<FieldGenOrMethodGen> comparator) { bcelComparator = comparator; } @@ -636,7 +635,7 @@ */ @Override public boolean equals(final Object obj) { - return bcelComparator.equals(this, obj); + return obj instanceof FieldGenOrMethodGen && bcelComparator.equals(this, (FieldGenOrMethodGen) obj); } // J5TODO: Should paramAnnotations be an array of arrays? Rather than an array of lists, this @@ -790,7 +789,7 @@ } /** - * Get method object. Never forget to call setMaxStack() or setMaxStack(max), respectively, before calling this method + * Gets method object. Never forget to call setMaxStack() or setMaxStack(max), respectively, before calling this method * (the same applies for max locals). * * @return method object @@ -888,7 +887,7 @@ } /** - * Return value as defined by given BCELComparator strategy. By default return the hashcode of the method's name XOR + * Return value as defined by given BCELComparator strategy. By default return the hash code of the method's name XOR * signature. * * @see Object#hashCode() @@ -899,11 +898,7 @@ } private List<AnnotationEntryGen> makeMutableVersion(final AnnotationEntry[] mutableArray) { - final List<AnnotationEntryGen> result = new ArrayList<>(); - for (final AnnotationEntry element : mutableArray) { - result.add(new AnnotationEntryGen(element, getConstantPool(), false)); - } - return result; + return Utils.streamOfIfNonNull(mutableArray).map(ae -> new AnnotationEntryGen(ae, getConstantPool(), false)).collect(Collectors.toList()); } /** @@ -1027,10 +1022,8 @@ * * @since 6.5.0 */ - public void removeRuntimeAttributes(final Attribute[] attrs) { - for (final Attribute attr : attrs) { - removeAttribute(attr); - } + public void removeRuntimeAttributes(final Attribute[] attributes) { + Utils.streamOfIfNonNull(attributes).forEach(this::removeAttribute); } public void setArgumentName(final int i, final String name) { @@ -1038,7 +1031,7 @@ } public void setArgumentNames(final String[] argNames) { - this.argNames = argNames; + this.argNames = Utils.createEmptyArrayIfNull(argNames, String[].class); } public void setArgumentType(final int i, final Type type) { @@ -1046,7 +1039,7 @@ } public void setArgumentTypes(final Type[] argTypes) { - this.argTypes = argTypes; + this.argTypes = argTypes != null ? argTypes : Type.NO_ARGS; } public void setClassName(final String className) { // TODO could be package-protected? @@ -1084,7 +1077,7 @@ } /** - * Set maximum number of local variables. + * Sets maximum number of local variables. */ public void setMaxLocals(final int m) { maxLocals = m; @@ -1102,7 +1095,7 @@ } /** - * Set maximum stack size for this method. + * Sets maximum stack size for this method. */ public void setMaxStack(final int m) { // TODO could be package-protected? maxStack = m; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ObjectType.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,7 +27,7 @@ import com.sun.org.apache.bcel.internal.classfile.Utility; /** - * Denotes reference such as java.lang.String. + * Denotes reference such as {@link String}. */ public class ObjectType extends ReferenceType { @@ -47,7 +47,7 @@ /** * Constructs a new instance. * - * @param className fully qualified class name, e.g. java.lang.String + * @param className fully qualified class name, e.g. {@link String} */ public ObjectType(final String className) { super(Const.T_REFERENCE, "L" + Utility.packageToPath(className) + ";"); @@ -151,7 +151,7 @@ * @throws ClassNotFoundException if any of this class's superclasses can't be found */ public boolean subclassOf(final ObjectType superclass) throws ClassNotFoundException { - if (this.referencesInterfaceExact() || superclass.referencesInterfaceExact()) { + if (referencesInterfaceExact() || superclass.referencesInterfaceExact()) { return false; } return Repository.instanceOf(this.className, superclass.className); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/RET.java 2026-04-17 19:08:13.000000000 +0000 @@ -110,7 +110,7 @@ } /** - * Set index of local variable containg the return address + * Sets index of local variable containg the return address */ @Override public final void setIndex(final int n) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java 2026-04-17 19:08:13.000000000 +0000 @@ -42,10 +42,10 @@ /** * This commutative operation returns the first common superclass (narrowest ReferenceType referencing a class, not an - * interface). If one of the types is a superclass of the other, the former is returned. If "this" is Type.NULL, then t - * is returned. If t is Type.NULL, then "this" is returned. If "this" equals t ['this.equals(t)'] "this" is returned. If - * "this" or t is an ArrayType, then Type.OBJECT is returned. If "this" or t is a ReferenceType referencing an - * interface, then Type.OBJECT is returned. If not all of the two classes' superclasses cannot be found, "null" is + * interface). If one of the types is a superclass of the other, the former is returned. If "this" is NULL, then t + * is returned. If t is NULL, then "this" is returned. If "this" equals t ['this.equals(t)'] "this" is returned. If + * "this" or t is an ArrayType, then {@link #OBJECT} is returned. If "this" or t is a ReferenceType referencing an + * interface, then {@link #OBJECT} is returned. If not all of the two classes' superclasses cannot be found, "null" is * returned. See the JVM specification edition 2, "4.9.2 The Bytecode Verifier". * * @deprecated use getFirstCommonSuperclass(ReferenceType t) which has slightly changed semantics. @@ -53,46 +53,46 @@ */ @Deprecated public ReferenceType firstCommonSuperclass(final ReferenceType t) throws ClassNotFoundException { - if (this.equals(Type.NULL)) { + if (equals(NULL)) { return t; } - if (t.equals(Type.NULL) || this.equals(t)) { + if (t.equals(NULL) || equals(t)) { return this; /* - * TODO: Above sounds a little arbitrary. On the other hand, there is no object referenced by Type.NULL so we can also - * say all the objects referenced by Type.NULL were derived from java.lang.Object. However, the Java Language's - * "instanceof" operator proves us wrong: "null" is not referring to an instance of java.lang.Object :) + * TODO: Above sounds a little arbitrary. On the other hand, there is no object referenced by {@link #NULL} so we can also + * say all the objects referenced by {@link #NULL} were derived from {@link Object}. However, the Java Language's + * "instanceof" operator proves us wrong: "null" is not referring to an instance of {@link Object} :) */ } if (this instanceof ArrayType || t instanceof ArrayType) { - return Type.OBJECT; - // TODO: Is there a proof of OBJECT being the direct ancestor of every ArrayType? + return OBJECT; + // TODO: Is there a proof of {@link #OBJECT} being the direct ancestor of every ArrayType? } return getFirstCommonSuperclassInternal(t); } /** * This commutative operation returns the first common superclass (narrowest ReferenceType referencing a class, not an - * interface). If one of the types is a superclass of the other, the former is returned. If "this" is Type.NULL, then t - * is returned. If t is Type.NULL, then "this" is returned. If "this" equals t ['this.equals(t)'] "this" is returned. If - * "this" or t is an ArrayType, then Type.OBJECT is returned; unless their dimensions match. Then an ArrayType of the + * interface). If one of the types is a superclass of the other, the former is returned. If "this" is NULL, then t + * is returned. If t is NULL, then "this" is returned. If "this" equals t ['this.equals(t)'] "this" is returned. If + * "this" or t is an ArrayType, then {@link #OBJECT} is returned; unless their dimensions match. Then an ArrayType of the * same number of dimensions is returned, with its basic type being the first common super class of the basic types of - * "this" and t. If "this" or t is a ReferenceType referencing an interface, then Type.OBJECT is returned. If not all of + * "this" and t. If "this" or t is a ReferenceType referencing an interface, then {@link #OBJECT} is returned. If not all of * the two classes' superclasses cannot be found, "null" is returned. See the JVM specification edition 2, "4.9.2 The * Bytecode Verifier". * * @throws ClassNotFoundException on failure to find superclasses of this type, or the type passed as a parameter */ public ReferenceType getFirstCommonSuperclass(final ReferenceType t) throws ClassNotFoundException { - if (this.equals(Type.NULL)) { + if (equals(NULL)) { return t; } - if (t.equals(Type.NULL) || this.equals(t)) { + if (t.equals(NULL) || equals(t)) { return this; /* - * TODO: Above sounds a little arbitrary. On the other hand, there is no object referenced by Type.NULL so we can also - * say all the objects referenced by Type.NULL were derived from java.lang.Object. However, the Java Language's - * "instanceof" operator proves us wrong: "null" is not referring to an instance of java.lang.Object :) + * TODO: Above sounds a little arbitrary. On the other hand, there is no object referenced by {@link #NULL} so we can also + * say all the objects referenced by {@link #NULL} were derived from {@link Object}. However, the Java Language's + * "instanceof" operator proves us wrong: "null" is not referring to an instance of {@link Object} :) */ } /* This code is from a bug report by Konstantin Shagin <konst@cs.technion.ac.il> */ @@ -106,8 +106,8 @@ } } if (this instanceof ArrayType || t instanceof ArrayType) { - return Type.OBJECT; - // TODO: Is there a proof of OBJECT being the direct ancestor of every ArrayType? + return OBJECT; + // TODO: Is there a proof of {@link #OBJECT} being the direct ancestor of every ArrayType? } return getFirstCommonSuperclassInternal(t); } @@ -115,7 +115,7 @@ private ReferenceType getFirstCommonSuperclassInternal(final ReferenceType t) throws ClassNotFoundException { if (this instanceof ObjectType && ((ObjectType) this).referencesInterfaceExact() || t instanceof ObjectType && ((ObjectType) t).referencesInterfaceExact()) { - return Type.OBJECT; + return OBJECT; // TODO: The above line is correct comparing to the vmspec2. But one could // make class file verification a bit stronger here by using the notion of // superinterfaces or even castability or assignment compatibility. @@ -142,7 +142,7 @@ } } } - // Huh? Did you ask for Type.OBJECT's superclass?? + // Huh? Did you ask for OBJECT's superclass?? return null; } @@ -158,7 +158,7 @@ return false; } final ReferenceType T = (ReferenceType) t; - if (this.equals(Type.NULL)) { + if (equals(NULL)) { return true; // This is not explicitly stated, but clear. Isn't it? } /* @@ -169,7 +169,7 @@ * If T is a class type, then this must be the same class as T, or this must be a subclass of T; */ if (T instanceof ObjectType && ((ObjectType) T).referencesClassExact() - && (this.equals(T) || Repository.instanceOf(((ObjectType) this).getClassName(), ((ObjectType) T).getClassName()))) { + && (equals(T) || Repository.instanceOf(((ObjectType) this).getClassName(), ((ObjectType) T).getClassName()))) { return true; } /* @@ -187,14 +187,14 @@ /* * If T is a class type, then T must be Object (2.4.7). */ - if (T instanceof ObjectType && ((ObjectType) T).referencesClassExact() && T.equals(Type.OBJECT)) { + if (T instanceof ObjectType && ((ObjectType) T).referencesClassExact() && T.equals(OBJECT)) { return true; } /* * If T is an interface type, then T must be the same interface as this or a superinterface of this (2.13.2). */ if (T instanceof ObjectType && ((ObjectType) T).referencesInterfaceExact() - && (this.equals(T) || Repository.implementationOf(((ObjectType) this).getClassName(), ((ObjectType) T).getClassName()))) { + && (equals(T) || Repository.implementationOf(((ObjectType) this).getClassName(), ((ObjectType) T).getClassName()))) { return true; } } @@ -205,7 +205,7 @@ /* * If T is a class type, then T must be Object (2.4.7). */ - if (T instanceof ObjectType && ((ObjectType) T).referencesClassExact() && T.equals(Type.OBJECT)) { + if (T instanceof ObjectType && ((ObjectType) T).referencesClassExact() && T.equals(OBJECT)) { return true; } /* @@ -246,14 +246,14 @@ /** * Return true iff this type is castable to another type t as defined in the JVM specification. The case where this is - * Type.NULL is not defined (see the CHECKCAST definition in the JVM specification). However, because e.g. CHECKCAST + * {@link #NULL} is not defined (see the CHECKCAST definition in the JVM specification). However, because e.g. CHECKCAST * doesn't throw a ClassCastException when casting a null reference to any Object, true is returned in this case. * * @throws ClassNotFoundException if any classes or interfaces required to determine assignment compatibility can't be * found */ public boolean isCastableTo(final Type t) throws ClassNotFoundException { - if (this.equals(Type.NULL)) { + if (equals(NULL)) { return t instanceof ReferenceType; // If this is ever changed in isAssignmentCompatible() } return isAssignmentCompatibleWith(t); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SWITCH.java 2026-04-17 19:08:13.000000000 +0000 @@ -95,7 +95,7 @@ * @param maxGap maximum gap that may between case branches */ public SWITCH(final int[] match, final InstructionHandle[] targets, final InstructionHandle target, final int maxGap) { - int[] matchClone = match.clone(); + final int[] matchClone = match.clone(); final InstructionHandle[] targetsClone = targets.clone(); final int matchLength = match.length; if (matchLength < 2) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Select.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,7 +33,7 @@ * @see LOOKUPSWITCH * @see TABLESWITCH * @see InstructionList - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public abstract class Select extends BranchInstruction implements VariableLengthInstruction, StackConsumer /* @since 6.0 */, StackProducer { @@ -87,7 +87,7 @@ * @param defaultTarget default instruction target */ Select(final short opcode, final int[] match, final InstructionHandle[] targets, final InstructionHandle defaultTarget) { - // don't set default target before instuction is built + // don't set default target before instruction is built super(opcode, null); this.match = match; this.targets = targets; @@ -288,7 +288,7 @@ } /** - * Set branch target for 'i'th case + * Sets branch target for 'i'th case */ public void setTarget(final int i, final InstructionHandle target) { // TODO could be package-protected? notifyTarget(targets[i], target, this); @@ -314,7 +314,11 @@ for (int i = 0; i < match_length; i++) { String s = "null"; if (targets[i] != null) { - s = targets[i].getInstruction().toString(); + if (targets[i].getInstruction() == this) { + s = "<points to itself>"; + } else { + s = targets[i].getInstruction().toString(); + } } buf.append("(").append(match[i]).append(", ").append(s).append(" = {").append(indices[i]).append("})"); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SimpleElementValueGen.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SimpleElementValueGen.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SimpleElementValueGen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/SimpleElementValueGen.java 2026-04-17 19:08:13.000000000 +0000 @@ -166,7 +166,7 @@ dos.writeShort(idx); break; default: - throw new IllegalStateException("SimpleElementValueGen doesnt know how to write out type " + super.getElementValueType()); + throw new IllegalStateException("SimpleElementValueGen doesn't know how to write out type " + super.getElementValueType()); } } @@ -184,7 +184,7 @@ public int getValueInt() { if (super.getElementValueType() != PRIMITIVE_INT) { - throw new IllegalStateException("Dont call getValueString() on a non STRING ElementValue"); + throw new IllegalStateException("Don't call getValueString() on a non STRING ElementValue"); } final ConstantInteger c = (ConstantInteger) getConstantPool().getConstant(idx); return c.getBytes(); @@ -192,7 +192,7 @@ public String getValueString() { if (super.getElementValueType() != STRING) { - throw new IllegalStateException("Dont call getValueString() on a non STRING ElementValue"); + throw new IllegalStateException("Don't call getValueString() on a non STRING ElementValue"); } final ConstantUtf8 c = (ConstantUtf8) getConstantPool().getConstant(idx); return c.getBytes(); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TargetLostException.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -21,32 +21,32 @@ package com.sun.org.apache.bcel.internal.generic; /** - * Thrown by InstructionList.remove() when one or multiple disposed instructions are still being referenced by an - * InstructionTargeter object. I.e. the InstructionTargeter has to be notified that (one of) the InstructionHandle it is - * referencing is being removed from the InstructionList and thus not valid anymore. + * Thrown by {@link InstructionList} when one or multiple disposed instructions are still being referenced by an {@link InstructionTargeter} object. I.e. the + * {@link InstructionTargeter} has to be notified that (one of) the {@link InstructionHandle} it is referencing is being removed from the + * {@link InstructionList} and thus not valid anymore. * * <p> - * Making this an exception instead of a return value forces the user to handle these case explicitly in a try { ... } - * catch. The following code illustrates how this may be done: + * Making this an exception instead of a return value forces the user to handle these case explicitly in a try { ... } catch. The following code illustrates how + * this may be done: * </p> * - * <PRE> + * <pre> * ... * try { * il.delete(start_ih, end_ih); - * } catch(TargetLostException e) { + * } catch (TargetLostException e) { * for (InstructionHandle target : e.getTargets()) { * for (InstructionTargeter targeter : target.getTargeters()) { * targeter.updateTarget(target, new_target); * } * } * } - * </PRE> + * </pre> * * @see InstructionHandle * @see InstructionList * @see InstructionTargeter - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public final class TargetLostException extends Exception { @@ -54,12 +54,14 @@ @SuppressWarnings("serial") // Array component type is not Serializable private final InstructionHandle[] targets; - TargetLostException(final InstructionHandle[] t, final String mesg) { - super(mesg); - targets = t; + TargetLostException(final InstructionHandle[] targets, final String message) { + super(message); + this.targets = targets; } /** + * Gets the list of instructions still being targeted. + * * @return list of instructions still being targeted. */ public InstructionHandle[] getTargets() { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/Type.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -26,12 +26,14 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.classfile.ClassFormatException; +import com.sun.org.apache.bcel.internal.classfile.InvalidMethodSignatureException; import com.sun.org.apache.bcel.internal.classfile.Utility; +import jdk.xml.internal.Utils; /** - * Abstract super class for all possible java types, namely basic types such as int, object types like String and array + * Abstract super class for all possible Java types, namely basic types such as int, object types like String and array * types, e.g. int[] - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public abstract class Type { @@ -88,15 +90,15 @@ // Skip any type arguments to read argument declarations between '(' and ')' index = signature.indexOf('(') + 1; if (index <= 0) { - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } while (signature.charAt(index) != ')') { vec.add(getType(signature.substring(index))); - // corrected concurrent private static field acess + // corrected concurrent private static field access index += unwrap(CONSUMED_CHARS); // update position } } catch (final StringIndexOutOfBoundsException e) { // Should never occur - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } final Type[] types = new Type[vec.size()]; vec.toArray(types); @@ -110,7 +112,7 @@ // Skip any type arguments to read argument declarations between '(' and ')' index = signature.indexOf('(') + 1; if (index <= 0) { - throw new ClassFormatException("Invalid method signature: " + signature); + throw new InvalidMethodSignatureException(signature); } while (signature.charAt(index) != ')') { final int coded = getTypeSize(signature.substring(index)); @@ -118,7 +120,7 @@ index += consumed(coded); } } catch (final StringIndexOutOfBoundsException e) { // Should never occur - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } return res; } @@ -154,13 +156,13 @@ final int index = signature.lastIndexOf(')') + 1; return getType(signature.substring(index)); } catch (final StringIndexOutOfBoundsException e) { // Should never occur - throw new ClassFormatException("Invalid method signature: " + signature, e); + throw new InvalidMethodSignatureException(signature, e); } } static int getReturnTypeSize(final String signature) { final int index = signature.lastIndexOf(')') + 1; - return Type.size(getTypeSize(signature.substring(index))); + return size(getTypeSize(signature.substring(index))); } public static String getSignature(final java.lang.reflect.Method meth) { @@ -175,7 +177,7 @@ } /** - * Convert runtime java.lang.Class to BCEL Type object. + * Convert runtime {@link Class} to BCEL Type object. * * @param cls Java class * @return corresponding Type object @@ -183,7 +185,7 @@ public static Type getType(final Class<?> cls) { Objects.requireNonNull(cls, "cls"); /* - * That's an amzingly easy case, because getName() returns the signature. That's what we would have liked anyway. + * That's an amazingly easy case, because getName() returns the signature. That's what we would have liked anyway. */ if (cls.isArray()) { return getType(cls.getName()); @@ -230,7 +232,7 @@ public static Type getType(final String signature) throws StringIndexOutOfBoundsException { final byte type = Utility.typeOfSignature(signature); if (type <= Const.T_VOID) { - // corrected concurrent private static field acess + // corrected concurrent private static field access wrap(CONSUMED_CHARS, 1); return BasicType.getType(type); } @@ -246,7 +248,7 @@ } while (signature.charAt(dim) == '['); // Recurse, but just once, if the signature is ok final Type t = getType(signature.substring(dim)); - // corrected concurrent private static field acess + // corrected concurrent private static field access // consumed_chars += dim; // update counter - is replaced by final int temp = unwrap(CONSUMED_CHARS) + dim; wrap(CONSUMED_CHARS, temp); @@ -254,7 +256,7 @@ } /** - * Convert runtime java.lang.Class[] to BCEL Type objects. + * Convert runtime {@code java.lang.Class[]} to BCEL Type objects. * * @param classes an array of runtime class objects * @return array of corresponding Type objects @@ -286,6 +288,24 @@ return encode(1, index + 1); } + static String internalTypeNameToSignature(final String internalTypeName) { + if (Utils.isEmpty(internalTypeName) || Arrays.asList(Const.SHORT_TYPE_NAMES).contains(internalTypeName)) { + return internalTypeName; + } + switch (internalTypeName.charAt(0)) { + case '[': + return internalTypeName; + case 'L': + case 'T': + if (internalTypeName.charAt(internalTypeName.length() - 1) == ';') { + return internalTypeName; + } + return 'L' + internalTypeName + ';'; + default: + return 'L' + internalTypeName + ';'; + } + } + static int size(final int coded) { return coded & 3; } @@ -361,7 +381,7 @@ } /** - * @return hashcode of Type + * @return hash code of Type */ @Override public int hashCode() { @@ -369,31 +389,23 @@ } /** - * boolean, short and char variable are considered as int in the stack or local variable area. Returns {@link Type#INT} - * for {@link Type#BOOLEAN}, {@link Type#SHORT} or {@link Type#CHAR}, otherwise returns the given type. + * boolean, short and char variable are considered as int in the stack or local variable area. Returns {@link #INT} + * for {@link #BOOLEAN}, {@link #SHORT} or {@link #CHAR}, otherwise returns the given type. * * @since 6.0 */ public Type normalizeForStackOrLocal() { - if (this == Type.BOOLEAN || this == Type.BYTE || this == Type.SHORT || this == Type.CHAR) { - return Type.INT; + if (this == BOOLEAN || this == BYTE || this == SHORT || this == CHAR) { + return INT; } return this; } - /* - * Currently only used by the ArrayType constructor. The signature has a complicated dependency on other parameter so - * it's tricky to do it in a call to the super ctor. - */ - void setSignature(final String signature) { - this.signature = signature; - } - /** * @return Type string, e.g. 'int[]' */ @Override public String toString() { - return this.equals(Type.NULL) || type >= Const.T_UNKNOWN ? signature : Utility.signatureToString(signature, false); + return equals(NULL) || type >= Const.T_UNKNOWN ? signature : Utility.signatureToString(signature, false); } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/TypedInstruction.java 2026-04-17 19:08:13.000000000 +0000 @@ -22,7 +22,7 @@ package com.sun.org.apache.bcel.internal.generic; /** - * Get the type associated with an instruction, int for ILOAD, or the type of the field of a PUTFIELD instruction, e.g.. + * Gets the type associated with an instruction, int for ILOAD, or the type of the field of a PUTFIELD instruction, e.g.. */ public interface TypedInstruction { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/package-info.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/package-info.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/package-info.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,26 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +/** + * Generic part of the <a href="https://commons.apache.org/bcel/">Apache Byte Code Engineering Library (BCEL)</a>, classes to dynamically modify class objects + * and byte code instructions. + */ +package com.sun.org.apache.bcel.internal.generic; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/package-info.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/package-info.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/package-info.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,26 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +/** + * Basic classes for the <a href="https://commons.apache.org/bcel/">Apache Byte Code Engineering Library (BCEL)</a> and constants defined by the + * <a href="https://docs.oracle.com/javase/specs/"> JVM specification</a>. + */ +package com.sun.org.apache.bcel.internal; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELComparator.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELComparator.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELComparator.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELComparator.java 2026-04-17 19:08:13.000000000 +0000 @@ -22,26 +22,27 @@ package com.sun.org.apache.bcel.internal.util; /** - * Used for BCEL comparison strategy + * Used for BCEL comparison strategy. * + * @param <T> What type we are comparing. * @since 5.2 */ -public interface BCELComparator { +public interface BCELComparator<T> { /** - * Compare two objects and return what THIS.equals(THAT) should return + * Compares two objects and return what a.equals(b) should return. * - * @param THIS - * @param THAT - * @return true if and only if THIS equals THAT + * @param a an object. + * @param b an object to be compared with {@code a} for equality. + * @return {@code true} if the arguments are equal to each other and {@code false} otherwise. */ - boolean equals(Object THIS, Object THAT); + boolean equals(T a, T b); /** - * Return hashcode for THIS.hashCode() + * Gets the hash code for o.hashCode() * - * @param THIS - * @return hashcode for THIS.hashCode() + * @param o + * @return hash code for o.hashCode() */ - int hashCode(Object THIS); + int hashCode(T o); } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,9 +63,9 @@ * Factory creates il.append() statements, and sets instruction targets. A helper class for BCELifier. * * @see BCELifier - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ -class BCELFactory extends EmptyVisitor { +final class BCELFactory extends EmptyVisitor { private static final String CONSTANT_PREFIX = Const.class.getSimpleName() + "."; private final MethodGen methodGen; @@ -88,7 +88,7 @@ if (value instanceof String) { embed = '"' + Utility.convertString(embed) + '"'; } else if (value instanceof Character) { - embed = "(char)0x" + Integer.toHexString(((Character) value).charValue()); + embed = "(char) 0x" + Integer.toHexString(((Character) value).charValue()); } else if (value instanceof Float) { final Float f = (Float) value; if (Float.isNaN(f)) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELifier.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,11 +30,15 @@ import com.sun.org.apache.bcel.internal.Const; import com.sun.org.apache.bcel.internal.Repository; import com.sun.org.apache.bcel.internal.classfile.ClassParser; +import com.sun.org.apache.bcel.internal.classfile.Code; import com.sun.org.apache.bcel.internal.classfile.ConstantValue; import com.sun.org.apache.bcel.internal.classfile.ExceptionTable; import com.sun.org.apache.bcel.internal.classfile.Field; import com.sun.org.apache.bcel.internal.classfile.JavaClass; import com.sun.org.apache.bcel.internal.classfile.Method; +import com.sun.org.apache.bcel.internal.classfile.StackMap; +import com.sun.org.apache.bcel.internal.classfile.StackMapEntry; +import com.sun.org.apache.bcel.internal.classfile.StackMapType; import com.sun.org.apache.bcel.internal.classfile.Utility; import com.sun.org.apache.bcel.internal.generic.ArrayType; import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; @@ -46,7 +50,7 @@ * This gives new users of BCEL a useful example showing how things are done with BCEL. It does not cover all features * of BCEL, but tries to mimic hand-written code as close as possible. * - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class BCELifier extends com.sun.org.apache.bcel.internal.classfile.EmptyVisitor { @@ -74,7 +78,7 @@ /** * Default main method */ - public static void _main(final String[] argv) throws Exception { + public static void main(final String[] argv) throws Exception { if (argv.length != 1) { System.out.println("Usage: BCELifier className"); System.out.println("\tThe class must exist on the classpath"); @@ -311,6 +315,13 @@ printWriter.println("\");"); } } + final Code code = method.getCode(); + if (code != null) { + final StackMap stackMap = code.getStackMap(); + if (stackMap != null) { + stackMap.accept(this); + } + } printWriter.println(); final BCELFactory factory = new BCELFactory(mg, printWriter); factory.start(); @@ -319,4 +330,78 @@ printWriter.println(" _cg.addMethod(method.getMethod());"); printWriter.println(" il.dispose();"); } + + @Override + public void visitStackMap(final StackMap stackMap) { + super.visitStackMap(stackMap); + printWriter.print(" method.addCodeAttribute("); + printWriter.print("new StackMap(_cp.addUtf8(\""); + printWriter.print(stackMap.getName()); + printWriter.print("\"), "); + printWriter.print(stackMap.getLength()); + printWriter.print(", "); + printWriter.print("new StackMapEntry[] {"); + final StackMapEntry[] table = stackMap.getStackMap(); + for (int i = 0; i < table.length; i++) { + table[i].accept(this); + if (i < table.length - 1) { + printWriter.print(", "); + } else { + printWriter.print(" }"); + } + } + printWriter.print(", _cp.getConstantPool())"); + printWriter.println(");"); + } + + @Override + public void visitStackMapEntry(final StackMapEntry stackMapEntry) { + super.visitStackMapEntry(stackMapEntry); + printWriter.print("new StackMapEntry("); + printWriter.print(stackMapEntry.getFrameType()); + printWriter.print(", "); + printWriter.print(stackMapEntry.getByteCodeOffset()); + printWriter.print(", "); + visitStackMapTypeArray(stackMapEntry.getTypesOfLocals()); + printWriter.print(", "); + visitStackMapTypeArray(stackMapEntry.getTypesOfStackItems()); + printWriter.print(", _cp.getConstantPool())"); + } + + /** + * Visits a {@link StackMapType} object. + * @param stackMapType object to visit + * @since 6.7.1 + */ + @Override + public void visitStackMapType(final StackMapType stackMapType) { + super.visitStackMapType(stackMapType); + printWriter.print("new StackMapType((byte)"); + printWriter.print(stackMapType.getType()); + printWriter.print(", "); + if (stackMapType.hasIndex()) { + printWriter.print("_cp.addClass(\""); + printWriter.print(stackMapType.getClassName()); + printWriter.print("\")"); + } else { + printWriter.print("-1"); + } + printWriter.print(", _cp.getConstantPool())"); + } + + private void visitStackMapTypeArray(final StackMapType[] types) { + if (types == null || types.length == 0) { + printWriter.print("null"); // null translates to StackMapType.EMPTY_ARRAY + } else { + printWriter.print("new StackMapType[] {"); + for (int i = 0; i < types.length; i++) { + types[i].accept(this); + if (i < types.length - 1) { + printWriter.print(", "); + } else { + printWriter.print(" }"); + } + } + } + } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Class2HTML.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -53,7 +53,7 @@ * All subfiles reference each other appropriately, e.g. clicking on a method in the Method's frame will jump to the * appropriate method in the Code frame. * - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class Class2HTML { @@ -73,7 +73,7 @@ basicTypes.add("float"); } - public static void _main(final String[] argv) throws IOException { + public static void main(final String[] argv) throws IOException { final String[] fileName = new String[argv.length]; int files = 0; ClassParser parser = null; @@ -89,7 +89,7 @@ if (argv[i].equals("-d")) { // Specify target directory, default '.' dir = argv[++i]; if (!dir.endsWith("" + sep)) { - dir = dir + sep; + dir += sep; } final File store = new File(dir); if (!store.isDirectory()) { @@ -115,7 +115,7 @@ if (zipFile == null) { parser = new ClassParser(fileName[i]); // Create parser object from file } else { - parser = new ClassParser(zipFile, fileName[i]); // Create parser object from zip file + parser = new ClassParser(zipFile, fileName[i]); // Create parser object from ZIP file } javaClass = parser.parse(); new Class2HTML(javaClass, dir); diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/ClassSet.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,7 +30,7 @@ * Utility class implementing a (type-safe) set of JavaClass objects. Since JavaClass has no equals() method, the name of the class is used for comparison. * * @see ClassStack - * @LastModified: Feb 2023 + * @LastModified: Sept 2025 */ public class ClassSet { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/CodeHTML.java 2026-04-17 19:08:13.000000000 +0000 @@ -542,7 +542,7 @@ final String str = codeToHTML(stream, methodNumber); String anchor = ""; /* - * Set an anchor mark if this line is targetted by a goto, jsr, etc. Defining an anchor for every line is very + * Sets an anchor mark if this line is targetted by a goto, jsr, etc. Defining an anchor for every line is very * inefficient! */ if (gotoSet.get(offset)) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,14 +63,13 @@ * * @see com.sun.org.apache.bcel.internal.generic.Instruction * @see InstructionList - * @LastModified: May 2021 + * @LastModified: Sept 2025 */ public class InstructionFinder { /** * Code patterns found may be checked using an additional user-defined constraint object whether they really match the * needed criterion. I.e., check constraints that can not expressed with regular expressions. - * */ public interface CodeConstraint { @@ -374,7 +373,7 @@ // } // private static final String pattern2string( String pattern, boolean make_string ) { -// StringBuffer buf = new StringBuffer(); +// StringBuilder buf = new StringBuilder(); // for (int i = 0; i < pattern.length(); i++) { // char ch = pattern.charAt(i); // if (ch >= OFFSET) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/Repository.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,8 +25,8 @@ * Abstract definition of a class repository. Instances may be used to load classes from different sources and may be * used in the Repository.setRepository method. * - * @see org.apache.bcel.Repository - * @LastModified: Feb 2023 + * @see com.sun.org.apache.bcel.internal.Repository + * @LastModified: Sept 2025 */ public interface Repository { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/package-info.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/package-info.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/package-info.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +/** + * Utility classes for the <a href="https://commons.apache.org/bcel/">Apache Byte Code Engineering Library (BCEL)</a>, namely: + * <ul> + * <li>Collection classes for JavaClass objects</li> + * <li>A converter for class files to HTML</li> + * <li>A tool to find instructions patterns via regular expressions</li> + * <li>A class to find classes as defined in the CLASSPATH</li> + * <li>A class loader that allows to create classes at run time</li> + * </ul> + */ +package com.sun.org.apache.bcel.internal.util; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -34,6 +34,8 @@ import jdk.xml.internal.JdkXmlConfig; import jdk.xml.internal.JdkXmlFeatures; +import jdk.xml.internal.XMLSecurityManager; +import jdk.xml.internal.XMLSecurityPropertyManager; import org.w3c.dom.Document; import org.xml.sax.InputSource; @@ -41,7 +43,7 @@ * The XPathExpression interface encapsulates a (compiled) XPath expression. * * @author Ramesh Mandava - * @LastModified: May 2025 + * @LastModified: Nov 2025 */ public class XPathExpressionImpl extends XPathImplUtil implements XPathExpression { @@ -51,7 +53,9 @@ * from the context. */ protected XPathExpressionImpl() { - this(null, null, null, null, false, JdkXmlConfig.getInstance(false).getXMLFeatures(true)); + this(null, null, null, null, false, JdkXmlConfig.getInstance(false).getXMLFeatures(true), + JdkXmlConfig.getInstance(false).getXMLSecurityManager(false), + JdkXmlConfig.getInstance(false).getXMLSecurityPropertyManager(false)); }; protected XPathExpressionImpl(com.sun.org.apache.xpath.internal.XPath xpath, @@ -59,13 +63,16 @@ XPathFunctionResolver functionResolver, XPathVariableResolver variableResolver) { this(xpath, prefixResolver, functionResolver, variableResolver, - false, JdkXmlConfig.getInstance(false).getXMLFeatures(true)); + false, JdkXmlConfig.getInstance(false).getXMLFeatures(true), + JdkXmlConfig.getInstance(false).getXMLSecurityManager(false), + JdkXmlConfig.getInstance(false).getXMLSecurityPropertyManager(false)); }; protected XPathExpressionImpl(com.sun.org.apache.xpath.internal.XPath xpath, JAXPPrefixResolver prefixResolver,XPathFunctionResolver functionResolver, XPathVariableResolver variableResolver, boolean featureSecureProcessing, - JdkXmlFeatures featureManager) { + JdkXmlFeatures featureManager, XMLSecurityManager xmlSecMgr, + XMLSecurityPropertyManager xmlSecPropMgr) { this.xpath = xpath; this.prefixResolver = prefixResolver; this.functionResolver = functionResolver; @@ -74,6 +81,8 @@ this.overrideDefaultParser = featureManager.getFeature( JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER); this.featureManager = featureManager; + this.xmlSecMgr = xmlSecMgr; + this.xmlSecPropMgr = xmlSecPropMgr; }; public void setXPath (com.sun.org.apache.xpath.internal.XPath xpath) { diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -51,7 +51,7 @@ * New methods: evaluateExpression * Refactored to share code with XPathExpressionImpl. * - * @LastModified: June 2025 + * @LastModified: Nov 2025 */ public class XPathImpl extends XPathImplUtil implements javax.xml.xpath.XPath { @@ -175,7 +175,8 @@ // Can have errorListener XPathExpressionImpl ximpl = new XPathExpressionImpl (xpath, prefixResolver, functionResolver, variableResolver, - featureSecureProcessing, featureManager); + featureSecureProcessing, featureManager, + xmlSecMgr, xmlSecPropMgr); return ximpl; } catch (TransformerException te) { throw new XPathExpressionException (te) ; diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/classes/jdk/xml/internal/Utils.java openjdk-25-25.0.3+9/src/java.xml/share/classes/jdk/xml/internal/Utils.java --- openjdk-25-25.0.2+10/src/java.xml/share/classes/jdk/xml/internal/Utils.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/classes/jdk/xml/internal/Utils.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 @@ package jdk.xml.internal; +import java.lang.reflect.Array; import java.util.Arrays; +import java.util.Objects; import java.util.function.Supplier; +import java.util.stream.Stream; /** * General utility. Use JdkXmlUtils for XML processing related functions. @@ -76,4 +79,59 @@ System.arraycopy(items, 0, result, original.length, items.length); return result; } + + /** + * Returns the original array, or an empty array if it is {@code null}. + * @param array the specified array + * @return the original array, or an empty array if it is {@code null} + */ + public static byte[] createEmptyArrayIfNull(byte[] array) { + return (array != null) ? array : new byte[0]; + } + + /** + * Returns the original array, or an empty array if it is {@code null}. + * @param array the specified array + * @return the original array, or an empty array if it is {@code null} + */ + public static int[] createEmptyArrayIfNull(int[] array) { + return (array != null) ? array : new int[0]; + } + + /** + * Returns the original array, or an empty array if it is {@code null}. + * @param <T> the class type + * @param array the specified array + * @param type the type of the array + * @return the original array, or an empty array if it is {@code null} + */ + public static <T> T[] createEmptyArrayIfNull(final T[] array, final Class<T[]> type) { + Objects.requireNonNull(type, "The type argument should not be null."); + + return (array != null) ? array : type.cast(Array.newInstance(type.getComponentType(), 0)); + } + + /** + * Returns the new stream created by {@code Stream.of(values)} or an empty + * sequential stream created by {@code Stream.empty()} if values is null. + * + * @param <T> the type of stream elements + * @param values the elements of the new stream + * @return the new stream created by {@code Stream.of(values)} or an empty + * sequential stream created by {@code Stream.empty()} if values is null. + */ + @SafeVarargs + @SuppressWarnings("varargs") // Creating a stream from an array is safe + public static <T> Stream<T> streamOfIfNonNull(final T... values) { + return values == null ? Stream.empty() : Stream.of(values); + } + + /** + * Checks if a CharSequence is empty ("") or null. + * @param cs the CharSequence to check, may be null + * @return {@code true} if the CharSequence is empty or null + */ + public static boolean isEmpty(final CharSequence cs) { + return cs == null || cs.length() == 0; + } } diff -Nru openjdk-25-25.0.2+10/src/java.xml/share/legal/bcel.md openjdk-25-25.0.3+9/src/java.xml/share/legal/bcel.md --- openjdk-25-25.0.2+10/src/java.xml/share/legal/bcel.md 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/java.xml/share/legal/bcel.md 2026-04-17 19:08:13.000000000 +0000 @@ -1,4 +1,4 @@ -## Apache Commons Byte Code Engineering Library (BCEL) Version 6.7.0 +## Apache Commons Byte Code Engineering Library (BCEL) Version 6.10.0 ### Apache Commons BCEL Notice <pre> diff -Nru openjdk-25-25.0.2+10/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java openjdk-25-25.0.3+9/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java --- openjdk-25-25.0.2+10/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java 2026-04-17 19:08:13.000000000 +0000 @@ -756,6 +756,11 @@ } CondItem result = genCond(tree.expr, markBranches); code.endScopes(limit); + //make sure variables defined in the let expression are not included + //in the defined variables for jumps that go outside of this let + //expression: + undefineVariablesInChain(result.falseJumps, limit); + undefineVariablesInChain(result.trueJumps, limit); return result; } else { CondItem result = genExpr(_tree, syms.booleanType).mkCond(); @@ -763,6 +768,13 @@ return result; } } + //where: + private void undefineVariablesInChain(Chain toClear, int limit) { + while (toClear != null) { + toClear.state.defined.excludeFrom(limit); + toClear = toClear.next; + } + } public Code getCode() { return code; diff -Nru openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/RSACipherAdaptor.java openjdk-25-25.0.3+9/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/RSACipherAdaptor.java --- openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/RSACipherAdaptor.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/RSACipherAdaptor.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 sun.security.pkcs11; + +import java.io.ByteArrayOutputStream; +import java.security.MessageDigest; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.SignatureSpi; +import java.security.InvalidKeyException; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidParameterException; +import java.security.ProviderException; +import java.security.SignatureException; +import java.security.spec.AlgorithmParameterSpec; +import javax.crypto.Cipher; +import javax.crypto.BadPaddingException; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import sun.security.pkcs11.wrapper.PKCS11Exception; + +/** + * NONEwithRSA Signature implementation using the RSA/ECB/PKCS1Padding Cipher + * implementation from SunPKCS11. + */ +public final class RSACipherAdaptor extends SignatureSpi { + + private final P11RSACipher c; + private ByteArrayOutputStream verifyBuf; + + public RSACipherAdaptor(Token token, long mechanism) { + try { + c = new P11RSACipher(token, "", mechanism); + c.engineSetPadding("pkcs1padding"); + } catch (PKCS11Exception | NoSuchPaddingException e) { + // should not happen, but wrap and re-throw if it were to happen + throw new ProviderException(e); + } + } + + @Override + protected void engineInitVerify(PublicKey publicKey) + throws InvalidKeyException { + c.engineInit(Cipher.DECRYPT_MODE, publicKey, null); + if (verifyBuf == null) { + verifyBuf = new ByteArrayOutputStream(128); + } else { + verifyBuf.reset(); + } + } + + @Override + protected void engineInitSign(PrivateKey privateKey) + throws InvalidKeyException { + c.engineInit(Cipher.ENCRYPT_MODE, privateKey, null); + verifyBuf = null; + } + + @Override + protected void engineInitSign(PrivateKey privateKey, SecureRandom random) + throws InvalidKeyException { + c.engineInit(Cipher.ENCRYPT_MODE, privateKey, random); + verifyBuf = null; + } + + @Override + protected void engineUpdate(byte b) throws SignatureException { + engineUpdate(new byte[] {b}, 0, 1); + } + + @Override + protected void engineUpdate(byte[] b, int off, int len) + throws SignatureException { + if (verifyBuf != null) { + verifyBuf.write(b, off, len); + } else { + byte[] out = c.engineUpdate(b, off, len); + if ((out != null) && (out.length != 0)) { + throw new SignatureException + ("Cipher unexpectedly returned data"); + } + } + } + + @Override + protected byte[] engineSign() throws SignatureException { + try { + return c.engineDoFinal(null, 0, 0); + } catch (IllegalBlockSizeException | BadPaddingException e) { + throw new SignatureException("doFinal() failed", e); + } + } + + @Override + protected boolean engineVerify(byte[] sigBytes) throws SignatureException { + try { + byte[] out = c.engineDoFinal(sigBytes, 0, sigBytes.length); + byte[] data = verifyBuf.toByteArray(); + verifyBuf.reset(); + return MessageDigest.isEqual(out, data); + } catch (BadPaddingException e) { + // e.g. wrong public key used + // return false rather than throwing exception + return false; + } catch (IllegalBlockSizeException e) { + throw new SignatureException("doFinal() failed", e); + } + } + + @Override + protected void engineSetParameter(AlgorithmParameterSpec params) + throws InvalidAlgorithmParameterException { + if (params != null) { + throw new InvalidParameterException("Parameters not supported"); + } + } + + @Override + @SuppressWarnings("deprecation") + protected void engineSetParameter(String param, Object value) + throws InvalidParameterException { + throw new InvalidParameterException("Parameters not supported"); + } + + @Override + @SuppressWarnings("deprecation") + protected Object engineGetParameter(String param) + throws InvalidParameterException { + throw new InvalidParameterException("Parameters not supported"); + } +} diff -Nru openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java openjdk-25-25.0.3+9/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java --- openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java 2026-04-17 19:08:13.000000000 +0000 @@ -974,6 +974,8 @@ d(SIG, "SHA3-512withECDSAinP1363Format", P11Signature, m(CKM_ECDSA_SHA3_512, CKM_ECDSA)); + d(SIG, "NONEwithRSA", "sun.security.pkcs11.RSACipherAdaptor", + m(CKM_RSA_PKCS)); dA(SIG, "MD2withRSA", P11Signature, m(CKM_MD2_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509)); dA(SIG, "MD5withRSA", P11Signature, @@ -1425,6 +1427,8 @@ } else if (type == SIG) { if (algorithm.contains("RSASSA-PSS")) { return new P11PSSSignature(token, algorithm, mechanism); + } else if (algorithm.equals("NONEwithRSA")) { + return new RSACipherAdaptor(token, mechanism); } else { return new P11Signature(token, algorithm, mechanism); } diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java 2026-04-17 19:08:13.000000000 +0000 @@ -180,6 +180,11 @@ public boolean isUpcallStub() { return getKind() == UpcallKind; } + public boolean isContinuationStub() { + // NOTE: In newer versions this is renamed to "continuation stubs" by JDK-8360707. + return getName().equals("StubRoutines (continuationstubs)"); + } + public boolean isJavaMethod() { return false; } public boolean isNativeMethod() { return false; } diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ContinuationEntry.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ContinuationEntry.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ContinuationEntry.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ContinuationEntry.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, NTT DATA. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 sun.jvm.hotspot.runtime; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.runtime.*; +import sun.jvm.hotspot.types.*; + + +public class ContinuationEntry extends VMObject { + private static long size; + private static Address returnPC; + + static { + VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase())); + } + + private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { + Type type = db.lookupType("ContinuationEntry"); + size = type.getSize(); + returnPC = type.getAddressField("_return_pc").getValue(); + } + + public ContinuationEntry(Address addr) { + super(addr); + } + + public Address getEntryPC() { + return returnPC; + } + + public Address getEntrySP(){ + return this.getAddress(); + } + + public Address getEntryFP(){ + return this.getAddress().addOffsetTo(size); + } + +} diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java 2026-04-17 19:08:13.000000000 +0000 @@ -47,6 +47,7 @@ private static AddressField stackBaseField; private static CIntegerField stackSizeField; private static CIntegerField terminatedField; + private static AddressField contEntryField; private static AddressField activeHandlesField; private static CIntegerField monitorOwnerIDField; private static long oopPtrSize; @@ -95,6 +96,7 @@ stackBaseField = type.getAddressField("_stack_base"); stackSizeField = type.getCIntegerField("_stack_size"); terminatedField = type.getCIntegerField("_terminated"); + contEntryField = type.getAddressField("_cont_entry"); activeHandlesField = type.getAddressField("_active_handles"); monitorOwnerIDField = type.getCIntegerField("_monitor_owner_id"); @@ -340,6 +342,10 @@ return (int) terminatedField.getValue(addr); } + public ContinuationEntry getContEntry() { + return VMObjectFactory.newObject(ContinuationEntry.class, contEntryField.getValue(addr)); + } + /** Gets the Java-side thread object for this JavaThread */ public Oop getThreadObj() { Oop obj = null; diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/aarch64/AARCH64Frame.java 2026-04-17 19:08:13.000000000 +0000 @@ -292,7 +292,13 @@ } if (cb != null) { - return cb.isUpcallStub() ? senderForUpcallStub(map, (UpcallStub)cb) : senderForCompiledFrame(map, cb); + if (cb.isUpcallStub()) { + return senderForUpcallStub(map, (UpcallStub)cb); + } else if (cb.isContinuationStub()) { + return senderForContinuationStub(map, cb); + } else { + return senderForCompiledFrame(map, cb); + } } // Must be native-compiled frame, i.e. the marshaling code for native @@ -396,6 +402,16 @@ map.setLocation(fp, savedFPAddr); } + private Frame senderForContinuationStub(AARCH64RegisterMap map, CodeBlob cb) { + var contEntry = map.getThread().getContEntry(); + + Address senderSP = contEntry.getEntrySP(); + Address senderPC = contEntry.getEntryPC(); + Address senderFP = contEntry.getEntryFP(); + + return new AARCH64Frame(senderSP, senderFP, senderPC); + } + private Frame senderForCompiledFrame(AARCH64RegisterMap map, CodeBlob cb) { if (DEBUG) { System.out.println("senderForCompiledFrame"); diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java 2026-04-17 19:08:13.000000000 +0000 @@ -279,7 +279,13 @@ } if (cb != null) { - return cb.isUpcallStub() ? senderForUpcallStub(map, (UpcallStub)cb) : senderForCompiledFrame(map, cb); + if (cb.isUpcallStub()) { + return senderForUpcallStub(map, (UpcallStub)cb); + } else if (cb.isContinuationStub()) { + return senderForContinuationStub(map, cb); + } else { + return senderForCompiledFrame(map, cb); + } } // Must be native-compiled frame, i.e. the marshaling code for native @@ -358,6 +364,15 @@ return new PPC64Frame(sp, unextendedSP, getLink(), getSenderPC()); } + private Frame senderForContinuationStub(PPC64RegisterMap map, CodeBlob cb) { + var contEntry = map.getThread().getContEntry(); + + Address sp = contEntry.getEntrySP(); + Address pc = contEntry.getEntryPC(); + Address fp = contEntry.getEntryFP(); + + return new PPC64Frame(sp, fp, pc); + } private Frame senderForCompiledFrame(PPC64RegisterMap map, CodeBlob cb) { if (DEBUG) { diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/riscv64/RISCV64Frame.java 2026-04-17 19:08:13.000000000 +0000 @@ -284,7 +284,13 @@ } if (cb != null) { - return cb.isUpcallStub() ? senderForUpcallStub(map, (UpcallStub)cb) : senderForCompiledFrame(map, cb); + if (cb.isUpcallStub()) { + return senderForUpcallStub(map, (UpcallStub)cb); + } else if (cb.isContinuationStub()) { + return senderForContinuationStub(map, cb); + } else { + return senderForCompiledFrame(map, cb); + } } // Must be native-compiled frame, i.e. the marshaling code for native @@ -388,6 +394,16 @@ map.setLocation(fp, savedFPAddr); } + private Frame senderForContinuationStub(RISCV64RegisterMap map, CodeBlob cb) { + var contEntry = map.getThread().getContEntry(); + + Address senderSP = contEntry.getEntrySP(); + Address senderPC = contEntry.getEntryPC(); + Address senderFP = contEntry.getEntryFP(); + + return new RISCV64Frame(senderSP, senderFP, senderPC); + } + private Frame senderForCompiledFrame(RISCV64RegisterMap map, CodeBlob cb) { if (DEBUG) { System.out.println("senderForCompiledFrame"); diff -Nru openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java --- openjdk-25-25.0.2+10/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java 2026-04-17 19:08:13.000000000 +0000 @@ -289,7 +289,13 @@ } if (cb != null) { - return cb.isUpcallStub() ? senderForUpcallStub(map, (UpcallStub)cb) : senderForCompiledFrame(map, cb); + if (cb.isUpcallStub()) { + return senderForUpcallStub(map, (UpcallStub)cb); + } else if (cb.isContinuationStub()) { + return senderForContinuationStub(map, cb); + } else { + return senderForCompiledFrame(map, cb); + } } // Must be native-compiled frame, i.e. the marshaling code for native @@ -393,6 +399,16 @@ map.setLocation(rbp, savedFPAddr); } + private Frame senderForContinuationStub(X86RegisterMap map, CodeBlob cb) { + var contEntry = map.getThread().getContEntry(); + + Address senderSP = contEntry.getEntrySP(); + Address senderPC = contEntry.getEntryPC(); + Address senderFP = contEntry.getEntryFP(); + + return new X86Frame(senderSP, senderFP, senderPC); + } + private Frame senderForCompiledFrame(X86RegisterMap map, CodeBlob cb) { if (DEBUG) { System.out.println("senderForCompiledFrame"); diff -Nru openjdk-25-25.0.2+10/src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java openjdk-25-25.0.3+9/src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java --- openjdk-25-25.0.2+10/src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java 2026-04-17 19:08:13.000000000 +0000 @@ -50,7 +50,7 @@ */ @Override public JdkConsole console(boolean isTTY, Charset inCharset, Charset outCharset) { - return new LazyDelegatingJdkConsoleImpl(inCharset, outCharset); + return isTTY ? new LazyDelegatingJdkConsoleImpl(inCharset, outCharset) : null; } private static class LazyDelegatingJdkConsoleImpl implements JdkConsole { diff -Nru openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java openjdk-25-25.0.3+9/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java --- openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/CompilerToVM.java 2026-04-17 19:08:13.000000000 +0000 @@ -654,6 +654,8 @@ long failedSpeculationsAddress, byte[] speculations); + native String getInvalidationReasonDescription(int invalidationReason); + /** * Gets flags specifying optional parts of code info. Only if a flag is set, will the * corresponding code info being included in the {@linkplain HotSpotCompiledCodeStream @@ -842,7 +844,7 @@ * {@code nmethod} associated with {@code nmethodMirror} is also made non-entrant and if * {@code deoptimize == true} any current activations of the {@code nmethod} are deoptimized. */ - native void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror, boolean deoptimize); + native void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror, boolean deoptimize, int invalidationReason); /** * Collects the current values of all JVMCI benchmark counters, summed up over all threads. diff -Nru openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java openjdk-25-25.0.3+9/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java --- openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java 2026-04-17 19:08:13.000000000 +0000 @@ -154,17 +154,21 @@ return logOrDump(resultInstalledCode, compiledCode); } - @Override - public void invalidateInstalledCode(InstalledCode installedCode) { + public void invalidateInstalledCode(InstalledCode installedCode, int invalidationReason) { if (installedCode instanceof HotSpotNmethod) { HotSpotNmethod nmethod = (HotSpotNmethod) installedCode; - nmethod.invalidate(true); + nmethod.invalidate(true, invalidationReason); } else { throw new IllegalArgumentException("Cannot invalidate a " + Objects.requireNonNull(installedCode).getClass().getName()); } } @Override + public void invalidateInstalledCode(InstalledCode installedCode) { + invalidateInstalledCode(installedCode, jvmciInvalidationReason()); + } + + @Override public TargetDescription getTarget() { return target; } @@ -201,4 +205,8 @@ public void resetCompilationStatistics() { runtime.getCompilerToVM().resetCompilationStatistics(); } + + private static int jvmciInvalidationReason() { + return HotSpotJVMCIRuntime.runtime().config.getConstant("nmethod::InvalidationReason::JVMCI_INVALIDATE", Integer.class); + } } diff -Nru openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java openjdk-25-25.0.3+9/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java --- openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotNmethod.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,6 +27,7 @@ import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.code.InvalidInstalledCodeException; +import jdk.vm.ci.common.JVMCIError; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.JavaType; import jdk.vm.ci.meta.ResolvedJavaMethod; @@ -76,12 +77,19 @@ */ private final long compileIdSnapshot; + /** + * Identify the reason that caused this nmethod to be invalidated. + * A value of -1 means that the nmethod was not invalidated. + */ + private int invalidationReason; + HotSpotNmethod(HotSpotResolvedJavaMethodImpl method, String name, boolean isDefault, long compileId) { super(name); this.method = method; this.isDefault = isDefault; boolean inOopsTable = !IS_IN_NATIVE_IMAGE && !isDefault; this.compileIdSnapshot = inOopsTable ? 0L : compileId; + this.invalidationReason = -1; assert inOopsTable || compileId != 0L : this; } @@ -122,9 +130,19 @@ return method; } + /** + * Invalidate this nmethod using the reason specified in {@code invalidationReason} and + * optionally deoptimize the method if {@code deoptimize} is set. + * @param deoptimize whether or not to deoptimize the method. + * @param invalidationReason invalidation reason code. + */ + public void invalidate(boolean deoptimize, int invalidationReason) { + compilerToVM().invalidateHotSpotNmethod(this, deoptimize, invalidationReason); + } + @Override public void invalidate(boolean deoptimize) { - compilerToVM().invalidateHotSpotNmethod(this, deoptimize); + invalidate(deoptimize, jvmciInvalidationReason()); } @Override @@ -188,4 +206,22 @@ public long getStart() { return isValid() ? super.getStart() : 0; } + + /** + * @return an integer representing the reason why this nmethod was invalidated. + */ + public int getInvalidationReason() { + return invalidationReason; + } + + /** + * @return a String describing the reason why this nmethod was invalidated. + */ + public String getInvalidationReasonDescription() { + return compilerToVM().getInvalidationReasonDescription(this.getInvalidationReason()); + } + + private static int jvmciInvalidationReason() { + return HotSpotJVMCIRuntime.runtime().config.getConstant("nmethod::InvalidationReason::JVMCI_INVALIDATE", Integer.class); + } } diff -Nru openjdk-25-25.0.2+10/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchWriter.java openjdk-25-25.0.3+9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchWriter.java --- openjdk-25-25.0.2+10/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchWriter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchWriter.java 2026-04-17 19:08:13.000000000 +0000 @@ -108,6 +108,7 @@ var select = HtmlTree.of(HtmlTag.SELECT) .setId(HtmlId.of("search-modules")) + .put(HtmlAttr.ARIA_LABEL, resources.getText("doclet.selectModule")) .add(HtmlTree.of(HtmlTag.OPTION) .put(HtmlAttr.VALUE, "") .add(contents.getContent("doclet.search.all_modules"))); diff -Nru openjdk-25-25.0.2+10/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties openjdk-25-25.0.3+9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties --- openjdk-25-25.0.2+10/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties 2026-04-17 19:08:13.000000000 +0000 @@ -783,3 +783,6 @@ doclet.footer_specified=\ The -footer option is no longer supported and will be ignored.\n\ It may be removed in a future release. + +doclet.selectModule=\ + Select the module to search in. diff -Nru openjdk-25-25.0.2+10/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java openjdk-25-25.0.3+9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java --- openjdk-25-25.0.2+10/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java 2026-04-17 19:08:13.000000000 +0000 @@ -586,8 +586,7 @@ * @return the element */ public static HtmlTree FOOTER() { - return new HtmlTree(HtmlTag.FOOTER) - .setRole(HtmlAttr.Role.CONTENTINFO); + return new HtmlTree(HtmlTag.FOOTER); } /** diff -Nru openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java --- openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java 2026-04-17 19:08:13.000000000 +0000 @@ -49,6 +49,7 @@ private final boolean isJDK; private final boolean isMethodSampling; private final boolean isCPUTimeMethodSampling; + private final boolean isBackToBackSensitive; private final List<SettingDescriptor> settings = new ArrayList<>(5); private final boolean dynamicSettings; private final int stackTraceOffset; @@ -82,10 +83,25 @@ this.isJVM = Type.isDefinedByJVM(id); this.isMethodSampling = determineMethodSampling(); this.isCPUTimeMethodSampling = isJVM && name.equals(Type.EVENT_NAME_PREFIX + "CPUTimeSample"); + this.isBackToBackSensitive = determineBackToBackSensitive(); this.isJDK = isJDK; this.stackTraceOffset = determineStackTraceOffset(); } + private boolean determineBackToBackSensitive() { + if (getName().equals(Type.EVENT_NAME_PREFIX + "ThreadDump")) { + return true; + } + if (getName().equals(Type.EVENT_NAME_PREFIX + "ClassLoaderStatistics")) { + return true; + } + return false; + } + + public boolean isBackToBackSensitive() { + return isBackToBackSensitive; + } + private boolean isExceptionEvent() { switch (getName()) { case Type.EVENT_NAME_PREFIX + "JavaErrorThrow" : diff -Nru openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java --- openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java 2026-04-17 19:08:13.000000000 +0000 @@ -263,7 +263,7 @@ if (toDisk) { PeriodicEvents.setFlushInterval(streamInterval); } - PeriodicEvents.doChunkBegin(); + PeriodicEvents.doChunkBegin(true); Duration duration = recording.getDuration(); if (duration != null) { recording.setStopTime(startTime.plus(duration)); @@ -335,7 +335,7 @@ finishChunk(currentChunk, stopTime, null); } currentChunk = newChunk; - PeriodicEvents.doChunkBegin(); + PeriodicEvents.doChunkBegin(false); } if (toDisk) { @@ -390,7 +390,7 @@ finishChunk(currentChunk, timestamp, null); } currentChunk = newChunk; - PeriodicEvents.doChunkBegin(); + PeriodicEvents.doChunkBegin(false); } private List<PlatformRecording> getRunningRecordings() { diff -Nru openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java --- openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventDirectoryStream.java 2026-04-17 19:08:13.000000000 +0000 @@ -257,6 +257,11 @@ } for (int i = 0; i < index; i++) { c.dispatch(sortedCache[i]); + sortedCache[i] = null; + } + // Shrink array + if (index > 100_000 && 4 * index < sortedCache.length) { + sortedCache = new RecordedEvent[2 * index]; } onFlush(); return; diff -Nru openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventFileStream.java openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventFileStream.java --- openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventFileStream.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/EventFileStream.java 2026-04-17 19:08:13.000000000 +0000 @@ -127,6 +127,10 @@ cacheSorted[index++] = event; } dispatchOrdered(c, index); + if (index > 100_000 && 4 * index < cacheSorted.length) { + cacheSorted = new RecordedEvent[2 * index]; + } + onFlush(); index = 0; } } @@ -136,8 +140,8 @@ Arrays.sort(cacheSorted, 0, index, EVENT_COMPARATOR); for (int i = 0; i < index; i++) { c.dispatch(cacheSorted[i]); + cacheSorted[i] = null; } - onFlush(); } private void processUnordered(Dispatcher c) throws IOException { diff -Nru openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/periodic/PeriodicEvents.java openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/periodic/PeriodicEvents.java --- openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/periodic/PeriodicEvents.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.jfr/share/classes/jdk/jfr/internal/periodic/PeriodicEvents.java 2026-04-17 19:08:13.000000000 +0000 @@ -69,12 +69,14 @@ return taskRepository.removeTask(runnable); } - public static void doChunkBegin() { + public static void doChunkBegin(boolean startRecording) { long timestamp = JVM.counterTime(); for (EventTask task : taskRepository.getTasks()) { var eventType = task.getEventType(); if (eventType.isEnabled() && eventType.isBeginChunk()) { - task.run(timestamp, PeriodicType.BEGIN_CHUNK); + if (!eventType.isBackToBackSensitive() || startRecording) { + task.run(timestamp, PeriodicType.BEGIN_CHUNK); + } } } } diff -Nru openjdk-25-25.0.2+10/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c openjdk-25-25.0.3+9/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c --- openjdk-25-25.0.2+10/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015, 2020 SAP SE. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025 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 @@ -28,20 +28,111 @@ /* Implement and update https://bugs.openjdk.org/browse/JDK-8030957 */ #include <jni.h> +#include <libperfstat.h> +#include <pthread.h> +#include <stdlib.h> +#include <time.h> #include "com_sun_management_internal_OperatingSystemImpl.h" +static struct perfMetrics{ + unsigned long long timebase; + perfstat_process_t stats; + perfstat_cpu_total_t cpu_total; +} counters; + +static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; + +int perfInit() { + static int initialized = 0; + if (!initialized) { + + perfstat_id_t id; + counters.stats = (perfstat_process_t){0}; + counters.timebase = 0; + int rc = perfstat_cpu_total(NULL, &counters.cpu_total, sizeof(perfstat_cpu_total_t), 1); + if (rc < 0) { + return -1; + } + rc = perfstat_process(&id, &counters.stats, sizeof(perfstat_process_t), 1); + if (rc < 0) { + return -1; + } + counters.timebase = counters.stats.last_timebase; + initialized = 1; + } + return initialized ? 0 : -1; +} + JNIEXPORT jdouble JNICALL Java_com_sun_management_internal_OperatingSystemImpl_getCpuLoad0 (JNIEnv *env, jobject dummy) { - return -1.0; + double load = -1.0; + pthread_mutex_lock(&lock); + if (perfInit() == 0) { + int ret; + perfstat_cpu_total_t cpu_total; + ret = perfstat_cpu_total(NULL, &cpu_total, sizeof(perfstat_cpu_total_t), 1); + if (ret < 0) { + return -1.0; + } + long long user_diff = cpu_total.user - counters.cpu_total.user; + long long sys_diff = cpu_total.sys - counters.cpu_total.sys; + long long idle_diff = cpu_total.idle - counters.cpu_total.idle; + long long wait_diff = cpu_total.wait - counters.cpu_total.wait; + long long total = user_diff + sys_diff + idle_diff + wait_diff; + if (total < (user_diff + sys_diff)) { + total = user_diff + sys_diff; + } + if (total == 0) { + load = 0.0; + } else { + load = (double)(user_diff + sys_diff) / total; + load = MAX(load, 0.0); + load = MIN(load, 1.0); + } + counters.cpu_total = cpu_total; + } + pthread_mutex_unlock(&lock); + return load; } JNIEXPORT jdouble JNICALL Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuLoad0 (JNIEnv *env, jobject dummy) { - return -1.0; + perfstat_process_t curr_stats; + perfstat_id_t id; + unsigned long long curr_timebase, timebase_diff; + double user_diff, sys_diff, delta_time; + double cpu_load = -1.0; + pthread_mutex_lock(&lock); + if (perfInit() == 0) { + int ret; + ret = perfstat_process(&id, &curr_stats, sizeof(perfstat_process_t), 1); + if (ret < 0) { + return -1.0; + } + curr_timebase = curr_stats.last_timebase; + timebase_diff = curr_timebase - counters.timebase; + if ((long long)timebase_diff < 0 || XINTFRAC == 0) { + return -1.0; + } + delta_time = HTIC2NANOSEC(timebase_diff) / 1000000000.0; + user_diff = (double)(curr_stats.ucpu_time - counters.stats.ucpu_time); + sys_diff = (double)(curr_stats.scpu_time - counters.stats.scpu_time); + counters.stats = curr_stats; + counters.timebase = curr_timebase; + if (delta_time == 0) { + cpu_load = 0.0; + } else { + cpu_load = (user_diff + sys_diff) / delta_time; + cpu_load = MAX(cpu_load, 0.0); + cpu_load = MIN(cpu_load, 1.0); + } + } + pthread_mutex_unlock(&lock); + return (jdouble)cpu_load; } JNIEXPORT jdouble JNICALL diff -Nru openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp openjdk-25-25.0.3+9/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp --- openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/gtest/gc/shenandoah/test_shenandoahMarkBitMap.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,571 @@ +/* + * 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. + */ + + +#include "gc/shenandoah/shenandoahHeap.inline.hpp" +#include "gc/shenandoah/shenandoahMarkBitMap.hpp" +#include "gc/shenandoah/shenandoahMarkBitMap.inline.hpp" + +BEGIN_ALLOW_FORBIDDEN_FUNCTIONS +#include <iostream> +END_ALLOW_FORBIDDEN_FUNCTIONS + +#include "memory/memRegion.hpp" +#include "unittest.hpp" + +#include "utilities/ostream.hpp" +#include "utilities/vmassert_reinstall.hpp" +#include "utilities/vmassert_uninstall.hpp" + +// These tests will all be skipped (unless Shenandoah becomes the default +// collector). To execute these tests, you must enable Shenandoah, which +// is done with: +// +// % make exploded-test TEST="gtest:ShenandoahOld*" CONF=release TEST_OPTS="JAVA_OPTIONS=-XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCMode=generational" +// +// Please note that these 'unit' tests are really integration tests and rely +// on the JVM being initialized. These tests manipulate the state of the +// collector in ways that are not compatible with a normal collection run. +// If these tests take longer than the minimum time between gc intervals - +// or, more likely, if you have them paused in a debugger longer than this +// interval - you can expect trouble. These tests will also not run in a build +// with asserts enabled because they use APIs that expect to run on a safepoint. + +#ifdef ASSERT +#define SKIP_IF_NOT_SHENANDOAH() \ + std::cout << "skipped (debug build)\n"; \ + return; +#else +#define SKIP_IF_NOT_SHENANDOAH() \ + if (!UseShenandoahGC) { \ + std::cout << "skipped\n"; \ + return; \ + } +#endif + +static bool _success; +static size_t _assertion_failures; + +#define MarkBitMapAssertEqual(a, b) EXPECT_EQ((a), (b)); if ((a) != (b)) { _assertion_failures++; } +#define MarkBitMapAssertTrue(a) EXPECT_TRUE((a)); if ((a) == 0) { _assertion_failures++; } + + +class ShenandoahMarkBitMapTest: public ::testing::Test { +protected: + + static void verify_bitmap_is_empty(HeapWord *start, size_t words_in_heap, ShenandoahMarkBitMap* mbm) { + MarkBitMapAssertTrue(mbm->is_bitmap_clear_range(start, start + words_in_heap)); + while (words_in_heap-- > 0) { + MarkBitMapAssertTrue(!mbm->is_marked(start)); + MarkBitMapAssertTrue(!mbm->is_marked_weak(start)); + MarkBitMapAssertTrue(!mbm->is_marked_strong(start)); + start++; + } + } + + static void verify_bitmap_is_weakly_marked(ShenandoahMarkBitMap* mbm, + HeapWord* weakly_marked_addresses[], size_t weakly_marked_objects) { + for (size_t i = 0; i < weakly_marked_objects; i++) { + HeapWord* obj_addr = weakly_marked_addresses[i]; + MarkBitMapAssertTrue(mbm->is_marked(obj_addr)); + MarkBitMapAssertTrue(mbm->is_marked_weak(obj_addr)); + } + } + + static void verify_bitmap_is_strongly_marked(ShenandoahMarkBitMap* mbm, + HeapWord* strongly_marked_addresses[], size_t strongly_marked_objects) { + for (size_t i = 0; i < strongly_marked_objects; i++) { + HeapWord* obj_addr = strongly_marked_addresses[i]; + MarkBitMapAssertTrue(mbm->is_marked(obj_addr)); + MarkBitMapAssertTrue(mbm->is_marked_strong(obj_addr)); + } + } + + static void verify_bitmap_all(ShenandoahMarkBitMap* mbm, HeapWord* all_marked_addresses[], + bool is_weakly_marked_object[], bool is_strongly_marked_object[], size_t all_marked_objects, + HeapWord* heap_memory, HeapWord* end_of_heap_memory) { + HeapWord* last_marked_addr = &heap_memory[-1]; + for (size_t i = 0; i < all_marked_objects; i++) { + HeapWord* obj_addr = all_marked_addresses[i]; + if (is_strongly_marked_object[i]) { + MarkBitMapAssertTrue(mbm->is_marked(obj_addr)); + MarkBitMapAssertTrue(mbm->is_marked_strong(obj_addr)); + } + if (is_weakly_marked_object[i]) { + MarkBitMapAssertTrue(mbm->is_marked(obj_addr)); + MarkBitMapAssertTrue(mbm->is_marked_weak(obj_addr)); + } + while (++last_marked_addr < obj_addr) { + MarkBitMapAssertTrue(!mbm->is_marked(last_marked_addr)); + MarkBitMapAssertTrue(!mbm->is_marked_strong(last_marked_addr)); + MarkBitMapAssertTrue(!mbm->is_marked_weak(last_marked_addr)); + } + last_marked_addr = obj_addr; + } + while (++last_marked_addr < end_of_heap_memory) { + MarkBitMapAssertTrue(!mbm->is_marked(last_marked_addr)); + MarkBitMapAssertTrue(!mbm->is_marked_strong(last_marked_addr)); + MarkBitMapAssertTrue(!mbm->is_marked_weak(last_marked_addr)); + } + + HeapWord* next_marked = (HeapWord*) &heap_memory[0] - 1; + for (size_t i = 0; i < all_marked_objects; i++) { + next_marked = mbm->get_next_marked_addr(next_marked + 1, end_of_heap_memory); + MarkBitMapAssertTrue(mbm->is_marked(next_marked)); + MarkBitMapAssertEqual(next_marked, all_marked_addresses[i]); + if (is_strongly_marked_object[i]) { + MarkBitMapAssertTrue(mbm->is_marked_strong(next_marked)); + } + if (is_weakly_marked_object[i]) { + MarkBitMapAssertTrue(mbm->is_marked_weak(next_marked)); + } + } + // We expect no more marked addresses to be found. Should return limit. + HeapWord* sentinel = mbm->get_next_marked_addr(next_marked + 1, end_of_heap_memory); + MarkBitMapAssertEqual(sentinel, end_of_heap_memory); + + HeapWord* prev_marked = end_of_heap_memory + 1; + for (int i = (int) all_marked_objects - 1; i >= 0; i--) { + prev_marked = mbm->get_prev_marked_addr(&heap_memory[0], prev_marked - 1); + MarkBitMapAssertEqual(prev_marked, all_marked_addresses[i]); + MarkBitMapAssertTrue(mbm->is_marked(prev_marked)); + if (is_strongly_marked_object[i]) { + MarkBitMapAssertTrue(mbm->is_marked_strong(prev_marked)); + } + if (is_weakly_marked_object[i]) { + MarkBitMapAssertTrue(mbm->is_marked_weak(prev_marked)); + } + } + // We expect no more marked addresses to be found. should return prev_marked. + sentinel = mbm->get_prev_marked_addr(&heap_memory[0], prev_marked - 1); + MarkBitMapAssertEqual(sentinel, prev_marked); + } + +public: + + static bool run_test() { + ShenandoahHeap* heap = ShenandoahHeap::heap(); + size_t heap_size = heap->max_capacity(); + size_t heap_size_words = heap_size / HeapWordSize; + HeapWord* my_heap_memory = heap->base(); + HeapWord* end_of_my_heap = my_heap_memory + heap_size_words; + MemRegion heap_descriptor(my_heap_memory, heap_size_words); + + _success = false; + _assertion_failures = 0; + + size_t bitmap_page_size = UseLargePages ? os::large_page_size() : os::vm_page_size(); + size_t bitmap_size_orig = ShenandoahMarkBitMap::compute_size(heap_size); + size_t bitmap_size = align_up(bitmap_size_orig, bitmap_page_size); + size_t bitmap_word_size = (bitmap_size + HeapWordSize - 1) / HeapWordSize; + + HeapWord* my_bitmap_memory = NEW_C_HEAP_ARRAY(HeapWord, bitmap_word_size, mtGC); + + MarkBitMapAssertTrue(my_bitmap_memory != nullptr); + if (my_bitmap_memory == nullptr) { + std::cout <<"Cannot run test because failed to allocate bitmap memory\n" << std::flush; + return false; + } + MemRegion bitmap_descriptor(my_bitmap_memory, bitmap_size / HeapWordSize); + ShenandoahMarkBitMap mbm(heap_descriptor, bitmap_descriptor); + + mbm.clear_range_large(heap_descriptor); + verify_bitmap_is_empty((HeapWord*) my_heap_memory, heap_size_words, &mbm); + + HeapWord* weakly_marked_addresses[] = { + (HeapWord*) &my_heap_memory[13], + (HeapWord*) &my_heap_memory[14], + (HeapWord*) &my_heap_memory[15], + (HeapWord*) &my_heap_memory[16], + (HeapWord*) &my_heap_memory[176], + (HeapWord*) &my_heap_memory[240], + (HeapWord*) &my_heap_memory[480], + (HeapWord*) &my_heap_memory[1360], + (HeapWord*) &my_heap_memory[1488], + (HeapWord*) &my_heap_memory[2416], + (HeapWord*) &my_heap_memory[5968], + (HeapWord*) &my_heap_memory[8191], + (HeapWord*) &my_heap_memory[8192], + (HeapWord*) &my_heap_memory[8193] + }; + size_t weakly_marked_objects = sizeof(weakly_marked_addresses) / sizeof(HeapWord*); + for (size_t i = 0; i < weakly_marked_objects; i++) { + mbm.mark_weak(weakly_marked_addresses[i]); + } + HeapWord* next_marked = (HeapWord*) &my_heap_memory[0] - 1; + for (size_t i = 0; i < weakly_marked_objects; i++) { + next_marked = mbm.get_next_marked_addr(next_marked + 1, end_of_my_heap); + MarkBitMapAssertEqual(next_marked, weakly_marked_addresses[i]); + MarkBitMapAssertTrue(mbm.is_marked(next_marked)); + MarkBitMapAssertTrue(mbm.is_marked_weak(next_marked)); + MarkBitMapAssertTrue(!mbm.is_marked_strong(next_marked)); + } + // We expect no more marked addresses to be found. Should return limit. + HeapWord* sentinel = mbm.get_next_marked_addr(next_marked + 1, end_of_my_heap); + HeapWord* heap_limit = end_of_my_heap; + MarkBitMapAssertEqual(sentinel, heap_limit); + HeapWord* prev_marked = end_of_my_heap + 1;; + for (int i = (int) weakly_marked_objects - 1; i >= 0; i--) { + // to be renamed get_prev_marked_addr() + prev_marked = mbm.get_prev_marked_addr(&my_heap_memory[0], prev_marked - 1); + MarkBitMapAssertEqual(prev_marked, weakly_marked_addresses[i]); + MarkBitMapAssertTrue(mbm.is_marked(prev_marked)); + MarkBitMapAssertTrue(mbm.is_marked_weak(prev_marked)); + MarkBitMapAssertTrue(!mbm.is_marked_strong(prev_marked)); + } + // We expect no more marked addresses to be found. should return prev_marked. + sentinel = mbm.get_prev_marked_addr(&my_heap_memory[0], prev_marked - 1); + // MarkBitMapAssertEqual(sentinel, prev_marked); + MarkBitMapAssertEqual(sentinel, prev_marked); + verify_bitmap_is_weakly_marked(&mbm, weakly_marked_addresses, weakly_marked_objects); + + HeapWord* strongly_marked_addresses[] = { + (HeapWord*) &my_heap_memory[8], + (HeapWord*) &my_heap_memory[24], + (HeapWord*) &my_heap_memory[32], + (HeapWord*) &my_heap_memory[56], + (HeapWord*) &my_heap_memory[64], + (HeapWord*) &my_heap_memory[168], + (HeapWord*) &my_heap_memory[232], + (HeapWord*) &my_heap_memory[248], + (HeapWord*) &my_heap_memory[256], + (HeapWord*) &my_heap_memory[257], + (HeapWord*) &my_heap_memory[258], + (HeapWord*) &my_heap_memory[259], + (HeapWord*) &my_heap_memory[488], + (HeapWord*) &my_heap_memory[1352], + (HeapWord*) &my_heap_memory[1496], + (HeapWord*) &my_heap_memory[2432], + (HeapWord*) &my_heap_memory[5960] + }; + size_t strongly_marked_objects = sizeof(strongly_marked_addresses) / sizeof(HeapWord*); + for (size_t i = 0; i < strongly_marked_objects; i++) { + bool upgraded = false; + mbm.mark_strong(strongly_marked_addresses[i], upgraded); + MarkBitMapAssertTrue(!upgraded); + } + verify_bitmap_is_strongly_marked(&mbm, strongly_marked_addresses, strongly_marked_objects); + HeapWord* upgraded_weakly_marked_addresses[] = { + (HeapWord*) &my_heap_memory[240], + (HeapWord*) &my_heap_memory[1360], + }; + size_t upgraded_weakly_marked_objects = sizeof(upgraded_weakly_marked_addresses) / sizeof(HeapWord *); + for (size_t i = 0; i < upgraded_weakly_marked_objects; i++) { + bool upgraded = false; + mbm.mark_strong(upgraded_weakly_marked_addresses[i], upgraded); + MarkBitMapAssertTrue(upgraded); + } + verify_bitmap_is_strongly_marked(&mbm, upgraded_weakly_marked_addresses, upgraded_weakly_marked_objects); + + HeapWord* all_marked_addresses[] = { + (HeapWord*) &my_heap_memory[8], /* strongly marked */ + (HeapWord*) &my_heap_memory[13], /* weakly marked */ + (HeapWord*) &my_heap_memory[14], /* weakly marked */ + (HeapWord*) &my_heap_memory[15], /* weakly marked */ + (HeapWord*) &my_heap_memory[16], /* weakly marked */ + (HeapWord*) &my_heap_memory[24], /* strongly marked */ + (HeapWord*) &my_heap_memory[32], /* strongly marked */ + (HeapWord*) &my_heap_memory[56], /* strongly marked */ + (HeapWord*) &my_heap_memory[64], /* strongly marked */ + (HeapWord*) &my_heap_memory[168], /* strongly marked */ + (HeapWord*) &my_heap_memory[176], /* weakly marked */ + (HeapWord*) &my_heap_memory[232], /* strongly marked */ + (HeapWord*) &my_heap_memory[240], /* weakly marked upgraded to strongly marked */ + (HeapWord*) &my_heap_memory[248], /* strongly marked */ + (HeapWord*) &my_heap_memory[256], /* strongly marked */ + (HeapWord*) &my_heap_memory[257], /* strongly marked */ + (HeapWord*) &my_heap_memory[258], /* strongly marked */ + (HeapWord*) &my_heap_memory[259], /* strongly marked */ + (HeapWord*) &my_heap_memory[480], /* weakly marked */ + (HeapWord*) &my_heap_memory[488], /* strongly marked */ + (HeapWord*) &my_heap_memory[1352], /* strongly marked */ + (HeapWord*) &my_heap_memory[1360], /* weakly marked upgraded to strongly marked */ + (HeapWord*) &my_heap_memory[1488], /* weakly marked */ + (HeapWord*) &my_heap_memory[1496], /* strongly marked */ + (HeapWord*) &my_heap_memory[2416], /* weakly marked */ + (HeapWord*) &my_heap_memory[2432], /* strongly marked */ + (HeapWord*) &my_heap_memory[5960], /* strongly marked */ + (HeapWord*) &my_heap_memory[5968], /* weakly marked */ + (HeapWord*) &my_heap_memory[8191], /* weakly marked */ + (HeapWord*) &my_heap_memory[8192], /* weakly marked */ + (HeapWord*) &my_heap_memory[8193] /* weakly marked */ + }; + size_t all_marked_objects = sizeof(all_marked_addresses) / sizeof(HeapWord*); + bool is_weakly_marked_object[] = { + false, + true, + true, + true, + true, + false, + false, + false, + false, + false, + true, + false, + true, + false, + false, + false, + false, + false, + true, + false, + false, + true, + true, + false, + true, + false, + false, + true, + true, + true, + true + }; + bool is_strongly_marked_object[] = { + true, + false, + false, + false, + false, + true, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + true, + true, + false, + true, + true, + true, + false, + true, + false, + true, + true, + false, + false, + false, + false + }; + verify_bitmap_all(&mbm, all_marked_addresses, is_weakly_marked_object, is_strongly_marked_object, all_marked_objects, + my_heap_memory, end_of_my_heap); + + MemRegion first_clear_region(&my_heap_memory[168], &my_heap_memory[256]); + mbm.clear_range_large(first_clear_region); + // Five objects are no longer marked + HeapWord* all_marked_addresses_after_first_clear[] = { + (HeapWord*) &my_heap_memory[8], /* strongly marked */ + (HeapWord*) &my_heap_memory[13], /* weakly marked */ + (HeapWord*) &my_heap_memory[14], /* weakly marked */ + (HeapWord*) &my_heap_memory[15], /* weakly marked */ + (HeapWord*) &my_heap_memory[16], /* weakly marked */ + (HeapWord*) &my_heap_memory[24], /* strongly marked */ + (HeapWord*) &my_heap_memory[32], /* strongly marked */ + (HeapWord*) &my_heap_memory[56], /* strongly marked */ + (HeapWord*) &my_heap_memory[64], /* strongly marked */ + (HeapWord*) &my_heap_memory[256], /* strongly marked */ + (HeapWord*) &my_heap_memory[257], /* strongly marked */ + (HeapWord*) &my_heap_memory[258], /* strongly marked */ + (HeapWord*) &my_heap_memory[259], /* strongly marked */ + (HeapWord*) &my_heap_memory[480], /* weakly marked */ + (HeapWord*) &my_heap_memory[488], /* strongly marked */ + (HeapWord*) &my_heap_memory[1352], /* strongly marked */ + (HeapWord*) &my_heap_memory[1360], /* weakly marked upgraded to strongly marked */ + (HeapWord*) &my_heap_memory[1488], /* weakly marked */ + (HeapWord*) &my_heap_memory[1496], /* strongly marked */ + (HeapWord*) &my_heap_memory[2416], /* weakly marked */ + (HeapWord*) &my_heap_memory[2432], /* strongly marked */ + (HeapWord*) &my_heap_memory[5960], /* strongly marked */ + (HeapWord*) &my_heap_memory[5968], /* weakly marked */ + (HeapWord*) &my_heap_memory[8191], /* weakly marked */ + (HeapWord*) &my_heap_memory[8192], /* weakly marked */ + (HeapWord*) &my_heap_memory[8193] /* weakly marked */ + }; + size_t all_marked_objects_after_first_clear = sizeof(all_marked_addresses_after_first_clear) / sizeof(HeapWord*); + bool is_weakly_marked_object_after_first_clear[] = { + false, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + true, + true, + false, + true, + false, + false, + true, + true, + true, + true + }; + bool is_strongly_marked_object_after_first_clear[] = { + true, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + false, + true, + true, + true, + false, + true, + false, + true, + true, + false, + false, + false, + false + }; + verify_bitmap_all(&mbm, all_marked_addresses_after_first_clear, + is_weakly_marked_object_after_first_clear, is_strongly_marked_object_after_first_clear, + all_marked_objects_after_first_clear, my_heap_memory, end_of_my_heap); + + MemRegion second_clear_region(&my_heap_memory[1360], &my_heap_memory[2416]); + mbm.clear_range_large(second_clear_region); + // Five objects are no longer marked + HeapWord* all_marked_addresses_after_2nd_clear[] = { + (HeapWord*) &my_heap_memory[8], /* strongly marked */ + (HeapWord*) &my_heap_memory[13], /* weakly marked */ + (HeapWord*) &my_heap_memory[14], /* weakly marked */ + (HeapWord*) &my_heap_memory[15], /* weakly marked */ + (HeapWord*) &my_heap_memory[16], /* weakly marked */ + (HeapWord*) &my_heap_memory[24], /* strongly marked */ + (HeapWord*) &my_heap_memory[32], /* strongly marked */ + (HeapWord*) &my_heap_memory[56], /* strongly marked */ + (HeapWord*) &my_heap_memory[64], /* strongly marked */ + (HeapWord*) &my_heap_memory[256], /* strongly marked */ + (HeapWord*) &my_heap_memory[257], /* strongly marked */ + (HeapWord*) &my_heap_memory[258], /* strongly marked */ + (HeapWord*) &my_heap_memory[259], /* strongly marked */ + (HeapWord*) &my_heap_memory[480], /* weakly marked */ + (HeapWord*) &my_heap_memory[488], /* strongly marked */ + (HeapWord*) &my_heap_memory[1352], /* strongly marked */ + (HeapWord*) &my_heap_memory[2416], /* weakly marked */ + (HeapWord*) &my_heap_memory[2432], /* strongly marked */ + (HeapWord*) &my_heap_memory[5960], /* strongly marked */ + (HeapWord*) &my_heap_memory[5968], /* weakly marked */ + (HeapWord*) &my_heap_memory[8191], /* weakly marked */ + (HeapWord*) &my_heap_memory[8192], /* weakly marked */ + (HeapWord*) &my_heap_memory[8193] /* weakly marked */ + }; + size_t all_marked_objects_after_2nd_clear = sizeof(all_marked_addresses_after_2nd_clear) / sizeof(HeapWord*); + bool is_weakly_marked_object_after_2nd_clear[] = { + false, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + true, + false, + false, + true, + true, + true, + true + }; + bool is_strongly_marked_object_after_2nd_clear[] = { + true, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + false, + true, + true, + false, + true, + true, + false, + false, + false, + false + }; + verify_bitmap_all(&mbm, all_marked_addresses_after_2nd_clear, + is_weakly_marked_object_after_2nd_clear, is_strongly_marked_object_after_2nd_clear, + all_marked_objects_after_2nd_clear, my_heap_memory, end_of_my_heap); + + FREE_C_HEAP_ARRAY(HeapWord, my_bitmap_memory); + _success = true; + return true; + } +}; + +TEST_VM_F(ShenandoahMarkBitMapTest, minimum_test) { + SKIP_IF_NOT_SHENANDOAH(); + + bool result = ShenandoahMarkBitMapTest::run_test(); + ASSERT_EQ(result, true); + ASSERT_EQ(_success, true); + ASSERT_EQ(_assertion_failures, (size_t) 0); +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldGeneration.cpp openjdk-25-25.0.3+9/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldGeneration.cpp --- openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldGeneration.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldGeneration.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -52,7 +52,7 @@ ShenandoahHeap::heap()->lock()->lock(false); - old = new ShenandoahOldGeneration(8, 1024 * 1024, 1024); + old = new ShenandoahOldGeneration(8, 1024 * 1024); old->set_promoted_reserve(512 * HeapWordSize); old->expend_promoted(256 * HeapWordSize); old->set_evacuation_reserve(512 * HeapWordSize); diff -Nru openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldHeuristic.cpp openjdk-25-25.0.3+9/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldHeuristic.cpp --- openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldHeuristic.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/gtest/gc/shenandoah/test_shenandoahOldHeuristic.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -49,7 +49,7 @@ #else #define SKIP_IF_NOT_SHENANDOAH() \ if (!UseShenandoahGC) { \ - tty->print_cr("skipped"); \ + std::cout << "skipped\n"; \ return; \ } #endif diff -Nru openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_os_reserve_between.cpp openjdk-25-25.0.3+9/test/hotspot/gtest/runtime/test_os_reserve_between.cpp --- openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_os_reserve_between.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/gtest/runtime/test_os_reserve_between.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -335,6 +335,8 @@ // Test that, regardless where the hole is in the [min, max) range, if we probe nonrandomly, we will fill that hole // as long as the range size is smaller than the number of probe attempts +// On AIX, the allocation granularity is too large and not well suited for 'small' holes, so we avoid the test +#if !defined(_AIX) TEST_VM(os, attempt_reserve_memory_between_small_range_fill_hole) { const size_t ps = os::vm_page_size(); const size_t ag = allocation_granularity(); @@ -348,3 +350,4 @@ } } } +#endif diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList-Xcomp.txt openjdk-25-25.0.3+9/test/hotspot/jtreg/ProblemList-Xcomp.txt --- openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList-Xcomp.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/ProblemList-Xcomp.txt 2026-04-17 19:08:13.000000000 +0000 @@ -52,6 +52,4 @@ vmTestbase/nsk/stress/thread/thread006.java 8321476 linux-all -compiler/cha/TypeProfileFinalMethod.java 8341039 generic-all - gc/arguments/TestNewSizeFlags.java 8299116 macosx-aarch64 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList.txt openjdk-25-25.0.3+9/test/hotspot/jtreg/ProblemList.txt --- openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/ProblemList.txt 2026-04-17 19:08:13.000000000 +0000 @@ -66,6 +66,7 @@ compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java 8331704 linux-riscv64 compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java 8331704 linux-riscv64 compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java 8331704 linux-riscv64 +compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInvalidationReasonTest.java 8360168 linux-riscv64 compiler/floatingpoint/TestSubnormalFloat.java 8317810 generic-i586 compiler/floatingpoint/TestSubnormalDouble.java 8317810 generic-i586 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestBit.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/TestBit.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestBit.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/TestBit.java 2026-04-17 19:08:13.000000000 +0000 @@ -33,7 +33,7 @@ * @library /test/lib / * * @requires vm.flagless - * @requires os.arch=="aarch64" | os.arch=="amd64" | os.arch == "ppc64" | os.arch == "ppc64le" | os.arch == "riscv64" + * @requires os.arch == "aarch64" | os.arch == "amd64" | os.arch == "x86_64" | os.arch == "ppc64" | os.arch == "ppc64le" | os.arch == "riscv64" * @requires vm.debug == true & vm.compiler2.enabled * * @run driver compiler.c2.TestBit diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestMergeStoresAndAllocationElimination.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/TestMergeStoresAndAllocationElimination.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestMergeStoresAndAllocationElimination.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/TestMergeStoresAndAllocationElimination.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 compiler.c2; + +/* + * @test + * @bug 8370405 + * @summary Test case where we had escape analysis tell us that we can possibly eliminate + * the array allocation, then MergeStores introduces a mismatched store, which + * the actual elimination does not verify for. That led to wrong results. + * @run main/othervm -XX:CompileCommand=compileonly,compiler.c2.TestMergeStoresAndAllocationElimination::test + * -XX:CompileCommand=exclude,compiler.c2.TestMergeStoresAndAllocationElimination::dontinline + * -XX:-TieredCompilation -Xbatch + * -XX:+IgnoreUnrecognizedVMOptions -XX:-CICompileOSR + * compiler.c2.TestMergeStoresAndAllocationElimination + * @run main compiler.c2.TestMergeStoresAndAllocationElimination + */ + +public class TestMergeStoresAndAllocationElimination { + static void dontinline() {} + + static int test(boolean flag) { + int[] arr = new int[4]; + // The values below will be caputured as "raw stores" in the Initialize + // of the array allocation above. + // These stores are for cosmetics only, we set the "1" bits so that it is + // simple to track where values are coming from. + arr[0] = 0x0001_0000; + arr[1] = 0x0010_0000; + arr[2] = 0x0000_0100; + arr[3] = 0x0100_0000; + // So far, the result should be: + // 0x421_0300 + + // The call below prevents further assignments from being captured into + // the Initialize above. + dontinline(); + // The follwoing stores are eventually optimized by MergeStores, and create + // a mismatched StoreL. + arr[0] = 0x0000_0001; + arr[1] = 0x0000_0010; + // Now, the result should be: + // 0x400_0321 + + // We create an uncommon trap because of an "unstable if". + // If Escape Analysis were to work, it would try to capture the values + // from the StoreL above. But because it is mismatched, it should fail. + // What happened before that verification: we would take the ConL, and + // insert it in a list of ConI. That meant that we eventually applied + // that value wrong if the deopt was taken (flag = true). + // + // What happened when the deopt got the wrong values: It got these values: + // [0]=68719476737 = 0x10_0000_0001 -> long value, not correct + // [1]=1048576 = 0x10_0000 -> this entry is not updated! + // [2]=256 = 0x100 + // [3]=16777216 = 0x100_0000 + // + // This is serialized as a long and 3 ints, and that looks like 5 ints. + // This creates an array of 5 elements (and not 4): + // [0] = 0x1 + // [1] = 0x10 + // [2] = 0x10_0000 -> this entry is "inserted" + // [3] = 0x100 + // [4] = 0x100_0000 + // + // This creates the wrong state: + // 0x30_0421 + // And we can actually read that the arr.length is 5, below. + if (flag) { System.out.println("unstable if: " + arr.length); } + + // Delay the allocation elimination until after loop opts, so that it + // happens after MergeStores. Without this, we would immediately + // eliminate the allocation during Escape Analysis, and then MergeStores + // would not find the stores that would be removed with the allocation. + for (int i = 0; i < 10_000; i++) { + arr[3] = 0x0000_1000; + } + // Coming from the correct value, we should have transition of state: + // 0x400_0321 -> 0x4321 + // But coming from the bad (rematerialized) state, we transition: + // 0x30_0421 -> 0x30_4021 + + // Tag each entry with an index number + // We expect: 0x4321 + return 1 * arr[0] + 2 * arr[1] + 3 * arr[2] + 4 * arr[3]; + } + + public static void main(String[] args) { + // Capture interpreter result. + int gold = test(false); + // Repeat until we get compilation. + for (int i = 0; i < 10_000; i++) { + test(false); + } + // Capture compiled results. + int res0 = test(false); + int res1 = test(true); + if (res0 != gold || res1 != gold) { + throw new RuntimeException("Unexpected result: " + Integer.toHexString(res0) + " and " + Integer.toHexString(res1) + ", should be: " + Integer.toHexString(gold)); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeIntIdealizationTests.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeIntIdealizationTests.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeIntIdealizationTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeIntIdealizationTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @summary Test that Ideal transformations of RotateLeftNode* are being performed as expected. * @library /test/lib / * @run driver compiler.c2.irTests.RotateLeftNodeIntIdealizationTests - * @requires os.arch == "x86_64" | os.arch == "aarch64" | (os.arch == "riscv64" & vm.cpu.features ~= ".*zbb.*") + * @requires os.arch == "amd64" | os.arch == "x86_64" | os.arch == "aarch64" | (os.arch == "riscv64" & vm.cpu.features ~= ".*zbb.*") */ public class RotateLeftNodeIntIdealizationTests { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeLongIdealizationTests.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeLongIdealizationTests.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeLongIdealizationTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/c2/irTests/RotateLeftNodeLongIdealizationTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @summary Test that Ideal transformations of RotateLeftNode* are being performed as expected. * @library /test/lib / * @run driver compiler.c2.irTests.RotateLeftNodeLongIdealizationTests - * @requires os.arch == "x86_64" | os.arch == "aarch64" | (os.arch == "riscv64" & vm.cpu.features ~= ".*zbb.*") + * @requires os.arch == "amd64" | os.arch == "x86_64" | os.arch == "aarch64" | (os.arch == "riscv64" & vm.cpu.features ~= ".*zbb.*") */ public class RotateLeftNodeLongIdealizationTests { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/common/InvokeDynamicPatcher.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/common/InvokeDynamicPatcher.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/common/InvokeDynamicPatcher.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/common/InvokeDynamicPatcher.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,150 +23,121 @@ package compiler.calls.common; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Handle; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; - -import java.io.FileInputStream; import java.io.IOException; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassTransform; +import java.lang.classfile.CodeBuilder; +import java.lang.classfile.CodeElement; +import java.lang.classfile.CodeTransform; +import java.lang.classfile.Label; +import java.lang.constant.ClassDesc; +import java.lang.constant.DirectMethodHandleDesc; +import java.lang.constant.DynamicCallSiteDesc; +import java.lang.constant.MethodHandleDesc; +import java.lang.constant.MethodTypeDesc; import java.lang.invoke.CallSite; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.nio.file.StandardOpenOption; +import static java.lang.constant.ConstantDescs.*; + /** * A class which patch InvokeDynamic class bytecode with invokydynamic instruction, rewriting "caller" method to call "callee" method using invokedynamic */ -public class InvokeDynamicPatcher extends ClassVisitor { +public final class InvokeDynamicPatcher { - private static final String CLASS = InvokeDynamic.class.getName() - .replace('.', '/'); + private static final ClassDesc CLASS = InvokeDynamic.class.describeConstable().orElseThrow(); private static final String CALLER_METHOD_NAME = "caller"; private static final String CALLEE_METHOD_NAME = "callee"; private static final String NATIVE_CALLEE_METHOD_NAME = "calleeNative"; private static final String BOOTSTRAP_METHOD_NAME = "bootstrapMethod"; private static final String CALL_NATIVE_FIELD = "nativeCallee"; - private static final String CALL_NATIVE_FIELD_DESC = "Z"; - private static final String CALLEE_METHOD_DESC - = "(L" + CLASS + ";IJFDLjava/lang/String;)Z"; - private static final String ASSERTTRUE_METHOD_DESC - = "(ZLjava/lang/String;)V"; - private static final String ASSERTS_CLASS = "jdk/test/lib/Asserts"; + private static final ClassDesc CALL_NATIVE_FIELD_DESC = CD_boolean; + private static final MethodTypeDesc CALLEE_METHOD_DESC = MethodTypeDesc.of( + CD_boolean, CLASS, CD_int, CD_long, CD_float, CD_double, CD_String); + private static final MethodTypeDesc ASSERTTRUE_METHOD_DESC = MethodTypeDesc.of( + CD_void, CD_boolean, CD_String); + private static final ClassDesc ASSERTS_CLASS = ClassDesc.ofInternalName("jdk/test/lib/Asserts"); private static final String ASSERTTRUE_METHOD_NAME = "assertTrue"; - public static void main(String args[]) { - ClassReader cr; - Path filePath; - try { - filePath = Paths.get(InvokeDynamic.class.getProtectionDomain().getCodeSource() - .getLocation().toURI()).resolve(CLASS + ".class"); - } catch (URISyntaxException ex) { - throw new Error("TESTBUG: Can't get code source" + ex, ex); - } - try (FileInputStream fis = new FileInputStream(filePath.toFile())) { - cr = new ClassReader(fis); - } catch (IOException e) { - throw new Error("Error reading file", e); - } - ClassWriter cw = new ClassWriter(cr, - ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); - cr.accept(new InvokeDynamicPatcher(Opcodes.ASM5, cw), 0); - try { - Files.write(filePath, cw.toByteArray(), - StandardOpenOption.WRITE); - } catch (IOException e) { - throw new Error(e); - } - } - - public InvokeDynamicPatcher(int api, ClassWriter cw) { - super(api, cw); - } - - @Override - public MethodVisitor visitMethod(final int access, final String name, - final String desc, final String signature, - final String[] exceptions) { - /* a code generate looks like - * 0: aload_0 - * 1: ldc #125 // int 1 - * 3: ldc2_w #126 // long 2l - * 6: ldc #128 // float 3.0f - * 8: ldc2_w #129 // double 4.0d - * 11: ldc #132 // String 5 - * 13: aload_0 - * 14: getfield #135 // Field nativeCallee:Z - * 17: ifeq 28 - * 20: invokedynamic #181, 0 // InvokeDynamic #1:calleeNative:(Lcompiler/calls/common/InvokeDynamic;IJFDLjava/lang/String;)Z - * 25: goto 33 - * 28: invokedynamic #183, 0 // InvokeDynamic #1:callee:(Lcompiler/calls/common/InvokeDynamic;IJFDLjava/lang/String;)Z - * 33: ldc #185 // String Call insuccessfull - * 35: invokestatic #191 // Method jdk/test/lib/Asserts.assertTrue:(ZLjava/lang/String;)V - * 38: return - * - * or, using java-like pseudo-code - * if (this.nativeCallee == false) { - * invokedynamic-call-return-value = invokedynamic-of-callee - * } else { - * invokedynamic-call-return-value = invokedynamic-of-nativeCallee - * } - * Asserts.assertTrue(invokedynamic-call-return-value, error-message); - * return; - */ - if (name.equals(CALLER_METHOD_NAME)) { - MethodVisitor mv = cv.visitMethod(access, name, desc, - signature, exceptions); - Label nonNativeLabel = new Label(); - Label checkLabel = new Label(); - MethodType mtype = MethodType.methodType(CallSite.class, - MethodHandles.Lookup.class, String.class, MethodType.class); - Handle bootstrap = new Handle(Opcodes.H_INVOKESTATIC, CLASS, - BOOTSTRAP_METHOD_NAME, mtype.toMethodDescriptorString()); - mv.visitCode(); - // push callee parameters onto stack - mv.visitVarInsn(Opcodes.ALOAD, 0);//push "this" - mv.visitLdcInsn(1); - mv.visitLdcInsn(2L); - mv.visitLdcInsn(3.0f); - mv.visitLdcInsn(4.0d); - mv.visitLdcInsn("5"); - // params loaded. let's decide what method to call - mv.visitVarInsn(Opcodes.ALOAD, 0); // push "this" - // get nativeCallee field - mv.visitFieldInsn(Opcodes.GETFIELD, CLASS, CALL_NATIVE_FIELD, - CALL_NATIVE_FIELD_DESC); - // if nativeCallee == false goto nonNativeLabel - mv.visitJumpInsn(Opcodes.IFEQ, nonNativeLabel); - // invokedynamic nativeCalleeMethod using bootstrap method - mv.visitInvokeDynamicInsn(NATIVE_CALLEE_METHOD_NAME, - CALLEE_METHOD_DESC, bootstrap); - // goto checkLabel - mv.visitJumpInsn(Opcodes.GOTO, checkLabel); - // label: nonNativeLabel - mv.visitLabel(nonNativeLabel); - // invokedynamic calleeMethod using bootstrap method - mv.visitInvokeDynamicInsn(CALLEE_METHOD_NAME, CALLEE_METHOD_DESC, - bootstrap); - mv.visitLabel(checkLabel); - mv.visitLdcInsn(CallsBase.CALL_ERR_MSG); - mv.visitMethodInsn(Opcodes.INVOKESTATIC, ASSERTS_CLASS, - ASSERTTRUE_METHOD_NAME, ASSERTTRUE_METHOD_DESC, false); - // label: return - mv.visitInsn(Opcodes.RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - return null; - } - return super.visitMethod(access, name, desc, signature, exceptions); + public static void main(String args[]) throws IOException, URISyntaxException { + Path filePath = Path.of(InvokeDynamic.class.getProtectionDomain().getCodeSource() + .getLocation().toURI()).resolve(InvokeDynamic.class.getName().replace('.', '/') +".class"); + var bytes = ClassFile.of().transformClass(ClassFile.of().parse(filePath), + ClassTransform.transformingMethodBodies(m -> m.methodName().equalsString(CALLER_METHOD_NAME), new CodeTransform() { + @Override + public void accept(CodeBuilder builder, CodeElement element) { + // discard + } + + /* the code generated looks like + * 0: aload_0 + * 1: ldc #125 // int 1 + * 3: ldc2_w #126 // long 2l + * 6: ldc #128 // float 3.0f + * 8: ldc2_w #129 // double 4.0d + * 11: ldc #132 // String 5 + * 13: aload_0 + * 14: getfield #135 // Field nativeCallee:Z + * 17: ifeq 28 + * 20: invokedynamic #181, 0 // InvokeDynamic #1:calleeNative:(Lcompiler/calls/common/InvokeDynamic;IJFDLjava/lang/String;)Z + * 25: goto 33 + * 28: invokedynamic #183, 0 // InvokeDynamic #1:callee:(Lcompiler/calls/common/InvokeDynamic;IJFDLjava/lang/String;)Z + * 33: ldc #185 // String Call insuccessfull + * 35: invokestatic #191 // Method jdk/test/lib/Asserts.assertTrue:(ZLjava/lang/String;)V + * 38: return + * + * or, using java-like pseudo-code + * if (this.nativeCallee == false) { + * invokedynamic-call-return-value = invokedynamic-of-callee + * } else { + * invokedynamic-call-return-value = invokedynamic-of-nativeCallee + * } + * Asserts.assertTrue(invokedynamic-call-return-value, error-message); + * return; + */ + @Override + public void atEnd(CodeBuilder builder) { + Label nonNativeLabel = builder.newLabel(); + Label checkLabel = builder.newLabel(); + MethodType mtype = MethodType.methodType(CallSite.class, + MethodHandles.Lookup.class, String.class, MethodType.class); + DirectMethodHandleDesc dmh = MethodHandleDesc.of(DirectMethodHandleDesc.Kind.STATIC, + CLASS, BOOTSTRAP_METHOD_NAME, mtype.descriptorString()); + // push callee parameters onto stack + builder.aload(builder.receiverSlot()) + .ldc(1) + .ldc(2L) + .ldc(3.0f) + .ldc(4.0d) + .ldc("5") + // params loaded. let's decide what method to call + .aload(builder.receiverSlot()) + // get nativeCallee field + .getfield(CLASS, CALL_NATIVE_FIELD, CALL_NATIVE_FIELD_DESC) + // if nativeCallee == false goto nonNativeLabel + .ifeq(nonNativeLabel) + // invokedynamic nativeCalleeMethod using bootstrap method + .invokedynamic(DynamicCallSiteDesc.of(dmh, NATIVE_CALLEE_METHOD_NAME, CALLEE_METHOD_DESC)) + // goto checkLabel + .goto_(checkLabel) + // label: nonNativeLabel + .labelBinding(nonNativeLabel) + // invokedynamic calleeMethod using bootstrap method + .invokedynamic(DynamicCallSiteDesc.of(dmh, CALLEE_METHOD_NAME, CALLEE_METHOD_DESC)) + .labelBinding(checkLabel) + .ldc(CallsBase.CALL_ERR_MSG) + .invokestatic(ASSERTS_CLASS, ASSERTTRUE_METHOD_NAME, ASSERTTRUE_METHOD_DESC) + // label: return + .return_(); + } + })); + Files.write(filePath, bytes, StandardOpenOption.WRITE); } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,10 +25,10 @@ * @test * @summary check calls from compiled to compiled using InvokeDynamic * @library /test/lib / - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * * @build jdk.test.whitebox.WhiteBox + * @build compiler.calls.common.InvokeDynamic * @run driver compiler.calls.common.InvokeDynamicPatcher * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,10 +25,10 @@ * @test * @summary check calls from compiled to interpreted using InvokeDynamic * @library /test/lib / - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * * @build jdk.test.whitebox.WhiteBox + * @build compiler.calls.common.InvokeDynamic * @run driver compiler.calls.common.InvokeDynamicPatcher * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,10 +25,10 @@ * @test * @summary check calls from compiled to native using InvokeDynamic * @library /test/lib / - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * * @build jdk.test.whitebox.WhiteBox + * @build compiler.calls.common.InvokeDynamic * @run driver compiler.calls.common.InvokeDynamicPatcher * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,10 +25,10 @@ * @test * @summary check calls from interpreted to compiled using InvokeDynamic * @library /test/lib / - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * * @build jdk.test.whitebox.WhiteBox + * @build compiler.calls.common.InvokeDynamic * @run driver compiler.calls.common.InvokeDynamicPatcher * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,10 +25,10 @@ * @test * @summary check calls from interpreted to interpreted using InvokeDynamic * @library /test/lib / - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * * @build jdk.test.whitebox.WhiteBox + * @build compiler.calls.common.InvokeDynamic * @run driver compiler.calls.common.InvokeDynamicPatcher * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,10 +25,10 @@ * @test * @summary check calls from interpreted to native using InvokeDynamic * @library /test/lib / - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * * @build jdk.test.whitebox.WhiteBox + * @build compiler.calls.common.InvokeDynamic * @run driver compiler.calls.common.InvokeDynamicPatcher * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/cha/TypeProfileFinalMethod.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/cha/TypeProfileFinalMethod.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/cha/TypeProfileFinalMethod.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/cha/TypeProfileFinalMethod.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2024, Alibaba Group Holding Limited. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -25,7 +25,7 @@ /* * @test * @summary test c1 to record type profile with CHA optimization - * @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @requires vm.flavor == "server" & vm.flagless * @library /test/lib * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox @@ -48,6 +48,7 @@ "-Xbatch", "-XX:-UseOnStackReplacement", "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:Tier3InvocationThreshold=200", "-XX:Tier4InvocationThreshold=5000", + "-XX:CompileCommand=CompileOnly," + Launcher.class.getName() + "::test*", Launcher.class.getName()); OutputAnalyzer output = ProcessTools.executeProcess(pb); System.out.println("debug output"); @@ -61,7 +62,7 @@ while (matcher.find()) { matchCnt++; } - Asserts.assertEquals(matchCnt, 2); // inline Child1::m() twice + Asserts.assertEquals(2, matchCnt); // inline Child1::m() twice } static class Launcher { @@ -86,23 +87,23 @@ static void addCompilerDirectives() { WhiteBox WB = WhiteBox.getWhiteBox(); - // do not inline getInstance() for test1() and test2() + // Directive for test1 String directive = "[{ match: [\"" + Launcher.class.getName() + "::test1\"]," + - "inline:[\"-" + Launcher.class.getName()+"::getInstance()\"] }]"; + // Do not inline getInstance + "inline:[\"-" + Launcher.class.getName()+"::getInstance\"] }]"; WB.addCompilerDirective(directive); + // Directive for test2 directive = "[{ match: [\"" + Launcher.class.getName() + "::test2\"]," + - "inline:[\"-" + Launcher.class.getName()+"::getInstance()\"] }]"; - WB.addCompilerDirective(directive); - - // do not inline test1() for test2() in c1 compilation - directive = "[{ match: [\"" + Launcher.class.getName() + "::test2\"]," + - "c1: { inline:[\"-" + Launcher.class.getName()+"::test1()\"] } }]"; - WB.addCompilerDirective(directive); - - // print inline tree for checking - directive = "[{ match: [\"" + Launcher.class.getName() + "::test2\"]," + - "c2: { PrintInlining: true } }]"; + // Do not inline getInstance + "inline:[\"-" + Launcher.class.getName()+"::getInstance\"]," + + // Do not inline test1 in C1 compilation + "c1: { inline:[\"-" + Launcher.class.getName()+"::test1\"] }," + + // Make sure to inline test1 in C2 compilation + "c2: { inline:[\"+" + Launcher.class.getName()+"::test1\"]," + + // Print the inline tree for checking + " PrintInlining:true }" + + "}]"; WB.addCompilerDirective(directive); } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2026, Oracle and/or its affiliates. All rights reserved. * 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 CheckSegmentedCodeCache - * @bug 8015774 + * @bug 8015774 8375598 * @summary Checks VM options related to the segmented code cache * @library /test/lib * @requires vm.flagless @@ -247,5 +247,12 @@ "-XX:+PrintFlagsFinal", "-version"); verifyCodeHeapSize(pb, "NonNMethodCodeHeapSize", 83886080); + + // A large NonNMethodCodeHeapSize can make the total code cache exceed the platform limit. + // The VM should fail fast during initialization. + pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache", + "-XX:NonNMethodCodeHeapSize=3G", + "-version"); + failsWith(pb, "Code cache size exceeds platform limit"); } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * 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,26 +31,26 @@ * * @build jdk.test.whitebox.WhiteBox compiler.codecache.stress.Helper compiler.codecache.stress.TestCaseImpl * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * @run main/othervm/timeout=240 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom * -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method * -XX:-SegmentedCodeCache * compiler.codecache.stress.UnexpectedDeoptimizationTest - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * @run main/othervm/timeout=240 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom * -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method * -XX:+SegmentedCodeCache * compiler.codecache.stress.UnexpectedDeoptimizationTest - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * @run main/othervm/timeout=240 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom * -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method * -XX:-SegmentedCodeCache * -DhelperVirtualThread=true * compiler.codecache.stress.UnexpectedDeoptimizationTest - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * @run main/othervm/timeout=240 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom * -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method @@ -75,7 +75,7 @@ public void run() { Helper.WHITE_BOX.deoptimizeFrames(rng.nextBoolean()); // Sleep a short while to allow the stacks to grow - otherwise - // we end up running almost all code in the interpreter + // we end up running almost all code in the interpreter try { Thread.sleep(10); } catch (Exception e) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/escapeAnalysis/TestRematerializeObjects.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/escapeAnalysis/TestRematerializeObjects.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/escapeAnalysis/TestRematerializeObjects.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/escapeAnalysis/TestRematerializeObjects.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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=yEA + * @bug 8370405 + * @summary Test elimination of array allocation, and the rematerialization. + * @library /test/lib / + * @run driver compiler.escapeAnalysis.TestRematerializeObjects yEA + */ + +/* + * @test id=nEA + * @library /test/lib / + * @run driver compiler.escapeAnalysis.TestRematerializeObjects nEA + */ + +package compiler.escapeAnalysis; + +import jdk.test.lib.Utils; + +import compiler.lib.ir_framework.*; +import compiler.lib.verify.*; + +public class TestRematerializeObjects { + + public static void main(String[] args) { + TestFramework framework = new TestFramework(TestRematerializeObjects.class); + switch (args[0]) { + case "yEA" -> { framework.addFlags("-XX:+EliminateAllocations"); } + case "nEA" -> { framework.addFlags("-XX:-EliminateAllocations"); } + default -> { throw new RuntimeException("Test argument not recognized: " + args[0]); } + }; + framework.start(); + } + + @DontInline + static void dontinline() {} + + @Run(test = "test1", mode = RunMode.STANDALONE) + public void runTest1() { + // Capture interpreter result. + int gold = test1(false); + // Repeat until we get compilation. + for (int i = 0; i < 10_000; i++) { + test1(false); + } + // Capture compiled results. + int res0 = test1(false); + int res1 = test1(true); + if (res0 != gold || res1 != gold) { + throw new RuntimeException("Unexpected result: " + Integer.toHexString(res0) + " and " + + Integer.toHexString(res1) + ", should be: " + Integer.toHexString(gold)); + } + } + + @Test + @IR(counts = {IRNode.ALLOC_ARRAY, "1", + IRNode.UNSTABLE_IF_TRAP, "1", + IRNode.STORE_L_OF_CLASS, "int\\[int:4\\]", "1", + IRNode.SAFEPOINT_SCALAROBJECT_OF, "fields@\\[0..3\\]", "0"}, + applyIfAnd = {"EliminateAllocations", "false", "UseUnalignedAccesses", "true"}) + @IR(counts = {IRNode.ALLOC_ARRAY, "0", + IRNode.UNSTABLE_IF_TRAP, "1", + IRNode.STORE_L_OF_CLASS, "int\\[int:4\\]", "0", + IRNode.SAFEPOINT_SCALAROBJECT_OF, "fields@\\[0..3\\]", "2"}, + applyIfAnd = {"EliminateAllocations", "true", "UseUnalignedAccesses", "true"}) + static int test1(boolean flag) { + int[] arr = new int[4]; + arr[0] = 0x0001_0000; // these slip into Initialize + arr[1] = 0x0010_0000; + arr[2] = 0x0000_0100; + arr[3] = 0x0100_0000; + dontinline(); + arr[0] = 0x0000_0001; // MergeStores -> StoreL + arr[1] = 0x0000_0010; + if (flag) { + // unstable if -> deopt -> rematerialized array (if was eliminated) + System.out.println("unstable if: " + arr.length); + } + arr[3] = 0x0000_1000; + return 1 * arr[0] + 2 * arr[1] + 3 * arr[2] + 4 * arr[3]; + } + + @Run(test = "test2", mode = RunMode.STANDALONE) + public void runTest2() { + // Capture interpreter result. + int gold = test2(false); + // Repeat until we get compilation. + for (int i = 0; i < 10_000; i++) { + test2(false); + } + // Capture compiled results. + int res0 = test2(false); + int res1 = test2(true); + if (res0 != gold || res1 != gold) { + throw new RuntimeException("Unexpected result: " + Integer.toHexString(res0) + " and " + + Integer.toHexString(res1) + ", should be: " + Integer.toHexString(gold)); + } + } + + @Test + @IR(counts = {IRNode.ALLOC_ARRAY, "1", + IRNode.UNSTABLE_IF_TRAP, "1", + IRNode.STORE_I_OF_CLASS, "short\\[int:4\\]", "1", + IRNode.SAFEPOINT_SCALAROBJECT_OF, "fields@\\[0..3\\]", "0"}, + applyIfAnd = {"EliminateAllocations", "false", "UseUnalignedAccesses", "true"}) + @IR(counts = {IRNode.ALLOC_ARRAY, "0", + IRNode.UNSTABLE_IF_TRAP, "1", + IRNode.STORE_I_OF_CLASS, "short\\[int:4\\]", "0", + IRNode.SAFEPOINT_SCALAROBJECT_OF, "fields@\\[0..3\\]", "2"}, + applyIfAnd = {"EliminateAllocations", "true", "UseUnalignedAccesses", "true"}) + static int test2(boolean flag) { + short[] arr = new short[4]; + arr[0] = 1; + arr[1] = 2; + arr[2] = 4; + arr[3] = 8; + dontinline(); + // Seems we detect that this is a short value passed into the short field. + arr[0] = 16; + arr[1] = 32; + if (flag) { + // unstable if -> deopt -> rematerialized array (if was eliminated) + System.out.println("unstable if: " + arr.length); + } + arr[3] = 64; + return 0x1 * arr[0] + 0x100 * arr[1] + 0x1_0000 * arr[2] + 0x100_0000 * arr[3]; + } + + @Run(test = "test3", mode = RunMode.STANDALONE) + public void runTest3() { + // Capture interpreter result. + int gold = test3(false, 42); + // Repeat until we get compilation. + for (int i = 0; i < 10_000; i++) { + test3(false, 42); + } + // Capture compiled results. + int res0 = test3(false, 42); + int res1 = test3(true, 42); + if (res0 != gold || res1 != gold) { + throw new RuntimeException("Unexpected result: " + Integer.toHexString(res0) + " and " + + Integer.toHexString(res1) + ", should be: " + Integer.toHexString(gold)); + } + } + + @Test + @IR(counts = {IRNode.ALLOC_ARRAY, "1", + IRNode.UNSTABLE_IF_TRAP, "1", + IRNode.SAFEPOINT_SCALAROBJECT_OF, "fields@\\[0..3\\]", "0"}, + applyIf = {"EliminateAllocations", "false"}) + @IR(counts = {IRNode.ALLOC_ARRAY, "0", + IRNode.UNSTABLE_IF_TRAP, "1", + IRNode.SAFEPOINT_SCALAROBJECT_OF, "fields@\\[0..3\\]", "2"}, + applyIf = {"EliminateAllocations", "true"}) + static int test3(boolean flag, int x) { + short[] arr = new short[4]; + arr[0] = 1; + arr[1] = 2; + arr[2] = 4; + arr[3] = 8; + dontinline(); + // Here, we don't get ConI, but instead AddI, which means we are + // serializing an int value, for a short slot. + arr[0] = (short)(x + 1); + arr[1] = (short)(x + 2); + if (flag) { + // unstable if -> deopt -> rematerialized array (if was eliminated) + System.out.println("unstable if: " + arr.length); + } + arr[3] = 64; + return 0x1 * arr[0] + 0x100 * arr[1] + 0x1_0000 * arr[2] + 0x100_0000 * arr[3]; + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java 2026-04-17 19:08:13.000000000 +0000 @@ -38,7 +38,13 @@ public class TestSubNodeFloatDoubleNegation { public static void main(String[] args) { - TestFramework.runWithFlags("--add-modules=jdk.incubator.vector", "-XX:CompileCommand=inline,jdk.incubator.vector.Float16::*"); + // Disable inlining for java.lang.Float::float16ToFloat and java.lang.Float::floatToFloat16. + // Otherwise, they could be inlined into testHalfFloat on platforms where there is no support + // for fp16, which causes unexpected IR graph. + TestFramework.runWithFlags("--add-modules=jdk.incubator.vector", + "-XX:CompileCommand=inline,jdk.incubator.vector.Float16::*", + "-XX:CompileCommand=dontinline,java.lang.Float::float16ToFloat", + "-XX:CompileCommand=dontinline,java.lang.Float::floatToFloat16"); } @Run(test = { "testHalfFloat", "testFloat", "testDouble" }) diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/DigestOptionsBase.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/intrinsics/sha/cli/DigestOptionsBase.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/DigestOptionsBase.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/intrinsics/sha/cli/DigestOptionsBase.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -120,7 +120,7 @@ case DigestOptionsBase.USE_SHA256_INTRINSICS_OPTION: return IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE; case DigestOptionsBase.USE_SHA512_INTRINSICS_OPTION: - return IntrinsicPredicates.SHA512_INSTRUCTION_AVAILABLE; + return IntrinsicPredicates.isSHA512IntrinsicAvailable(); case DigestOptionsBase.USE_SHA3_INTRINSICS_OPTION: return IntrinsicPredicates.SHA3_INSTRUCTION_AVAILABLE; default: diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 8035968 * @summary Verify UseSHA512Intrinsics option processing on supported CPU. - * @requires os.arch!="x86" & os.arch!="i386" * @library /test/lib / * @requires vm.flagless * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java 2026-04-17 19:08:13.000000000 +0000 @@ -21,12 +21,11 @@ * questions. */ -/** +/* * @test * @bug 8042235 * @summary redefining method used by multiple MethodHandles crashes VM * @library / - * @library /testlibrary/asm * @modules java.compiler * java.instrument * jdk.attach @@ -37,15 +36,13 @@ package compiler.jsr292; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; - import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassHierarchyResolver; +import java.lang.classfile.ClassTransform; +import java.lang.classfile.instruction.ConstantInstruction; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; import java.lang.instrument.Instrumentation; @@ -159,28 +156,15 @@ public byte[] transform(ClassLoader cl, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { if (Foo.class.equals(classBeingRedefined)) { System.out.println("redefining " + classBeingRedefined); - ClassReader cr = new ClassReader(classfileBuffer); - ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_FRAMES); - ClassVisitor adapter = new ClassVisitor(Opcodes.ASM5, cw) { - @Override - public MethodVisitor visitMethod(int access, String base, String desc, String signature, String[] exceptions) { - MethodVisitor mv = cv.visitMethod(access, base, desc, signature, exceptions); - if (mv != null) { - mv = new MethodVisitor(Opcodes.ASM5, mv) { - @Override - public void visitLdcInsn(Object cst) { - System.out.println("replacing \"" + cst + "\" with \"bar\""); - mv.visitLdcInsn("bar"); - } - }; - } - return mv; + var context = ClassFile.of(ClassFile.ClassHierarchyResolverOption.of(ClassHierarchyResolver.ofResourceParsing(cl))); + return context.transformClass(context.parse(classfileBuffer), ClassTransform.transformingMethodBodies((codeBuilder, codeElement) -> { + if (codeElement instanceof ConstantInstruction.LoadConstantInstruction ldc) { + System.out.println("replacing \"" + ldc.constantEntry().constantValue() + "\" with \"bar\""); + codeBuilder.ldc("bar"); + } else { + codeBuilder.with(codeElement); } - }; - - cr.accept(adapter, ClassReader.SKIP_FRAMES); - cw.visitEnd(); - return cw.toByteArray(); + })); } return classfileBuffer; } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/common/CTVMUtilities.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/common/CTVMUtilities.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/common/CTVMUtilities.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/common/CTVMUtilities.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,28 +23,26 @@ package compiler.jvmci.common; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.tree.ClassNode; -import jdk.test.lib.Utils; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.hotspot.CompilerToVMHelper; -import jdk.vm.ci.hotspot.HotSpotNmethod; import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod; import java.io.IOException; +import java.lang.classfile.Attributes; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassModel; +import java.lang.classfile.MethodModel; +import java.lang.constant.ClassDesc; +import java.lang.constant.ConstantDescs; +import java.lang.constant.MethodTypeDesc; +import java.lang.invoke.MethodType; import java.lang.reflect.Constructor; import java.lang.reflect.Executable; -import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.lang.reflect.Parameter; -import java.util.HashMap; +import java.util.Arrays; +import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -71,76 +69,55 @@ } public static Map<Integer, Integer> getBciToLineNumber(Executable method) { - Map<Integer, Integer> lineNumbers = new TreeMap<>(); - Class<?> aClass = method.getDeclaringClass(); - ClassReader cr; - try { - Module aModule = aClass.getModule(); - String name = aClass.getName(); - cr = new ClassReader(aModule.getResourceAsStream( - name.replace('.', '/') + ".class")); - } catch (IOException e) { - throw new Error("TEST BUG: can read " + aClass.getName() + " : " + e, e); + ClassModel classModel = findClassBytes(method.getDeclaringClass()); + MethodModel methodModel = findMethod(classModel, method); + if (methodModel == null) + return Map.of(); + + var foundLineNumberTable = methodModel.code().flatMap(code -> + code.findAttribute(Attributes.lineNumberTable())); + if (foundLineNumberTable.isEmpty()) { + boolean isEmptyMethod = Modifier.isAbstract(method.getModifiers()) + || Modifier.isNative(method.getModifiers()); + if (!isEmptyMethod) { + throw new Error(method + " doesn't contains the line numbers table " + + "(the method marked neither abstract nor native)"); + } + return Map.of(); } - ClassNode cn = new ClassNode(); - cr.accept(cn, ClassReader.EXPAND_FRAMES); - Map<Label, Integer> labels = new HashMap<>(); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); - ClassVisitor cv = new ClassVisitorForLabels(cw, labels, method); - cr.accept(cv, ClassReader.EXPAND_FRAMES); - labels.forEach((k, v) -> lineNumbers.put(k.getOffset(), v)); - boolean isEmptyMethod = Modifier.isAbstract(method.getModifiers()) - || Modifier.isNative(method.getModifiers()); - if (lineNumbers.isEmpty() && !isEmptyMethod) { - throw new Error(method + " doesn't contains the line numbers table " - +"(the method marked neither abstract nor native)"); - } + Map<Integer, Integer> lineNumbers = new TreeMap<>(); + foundLineNumberTable.get().lineNumbers().forEach(ln -> + lineNumbers.put(ln.startPc(), ln.lineNumber())); return lineNumbers; } - private static class ClassVisitorForLabels extends ClassVisitor { - private final Map<Label, Integer> lineNumbers; - private final String targetName; - private final String targetDesc; - - public ClassVisitorForLabels(ClassWriter cw, Map<Label, Integer> lines, - Executable target) { - super(Opcodes.ASM7, cw); - this.lineNumbers = lines; - - StringBuilder builder = new StringBuilder("("); - for (Parameter parameter : target.getParameters()) { - builder.append(Utils.toJVMTypeSignature(parameter.getType())); - } - builder.append(")"); - if (target instanceof Constructor) { - targetName = "<init>"; - builder.append("V"); - } else { - targetName = target.getName(); - builder.append(Utils.toJVMTypeSignature( - ((Method) target).getReturnType())); - } - targetDesc = builder.toString(); + // Finds the ClassFile API model of a given class, or fail with an Error. + public static ClassModel findClassBytes(Class<?> clazz) { + String binaryName = clazz.getName(); + byte[] fileBytes; + try (var inputStream = clazz.getModule().getResourceAsStream( + binaryName.replace('.', '/') + ".class")) { + fileBytes = inputStream.readAllBytes(); + } catch (IOException e) { + throw new Error("TEST BUG: cannot read " + binaryName, e); } + return ClassFile.of().parse(fileBytes); + } - @Override - public final MethodVisitor visitMethod(int access, String name, - String desc, String signature, - String[] exceptions) { - MethodVisitor mv = cv.visitMethod(access, name, desc, signature, - exceptions); - if (targetDesc.equals(desc) && targetName.equals(name)) { - return new MethodVisitor(Opcodes.ASM7, mv) { - @Override - public void visitLineNumber(int i, Label label) { - super.visitLineNumber(i, label); - lineNumbers.put(label, i); - } - }; + // Finds a matching method in a class model, or null if none match. + public static MethodModel findMethod(ClassModel classModel, Executable method) { + MethodTypeDesc methodType = MethodType.methodType( + method instanceof Method m ? m.getReturnType() : void.class, + method.getParameterTypes()).describeConstable().orElseThrow(); + String methodName = method instanceof Method m ? m.getName() : ConstantDescs.INIT_NAME; + + for (var methodModel : classModel.methods()) { + if (methodModel.methodName().equalsString(methodName) + && methodModel.methodType().isMethodType(methodType)) { + return methodModel; } - return mv; } + return null; } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java 2026-04-17 19:08:13.000000000 +0000 @@ -229,8 +229,8 @@ CTVM.reprofile((HotSpotResolvedJavaMethodImpl)method); } - public static void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror, boolean deoptimize) { - CTVM.invalidateHotSpotNmethod(nmethodMirror, deoptimize); + public static void invalidateHotSpotNmethod(HotSpotNmethod nmethodMirror, boolean deoptimize, int invalidationReason) { + CTVM.invalidateHotSpotNmethod(nmethodMirror, deoptimize, invalidationReason); } public static long[] collectCounters() { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInvalidationReasonTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInvalidationReasonTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInvalidationReasonTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInvalidationReasonTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @requires vm.jvmci + * @requires vm.simpleArch == "x64" | vm.simpleArch == "aarch64" | vm.simpleArch == "riscv64" + * @library /test/lib / + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.aarch64 + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.riscv64 + * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java aarch64/AArch64TestAssembler.java riscv64/RISCV64TestAssembler.java + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.code.test.CodeInvalidationReasonTest + */ + +package jdk.vm.ci.code.test; + +import jdk.test.lib.Asserts; +import jdk.vm.ci.code.Register; +import jdk.vm.ci.hotspot.HotSpotNmethod; + +import org.junit.Test; + +import java.lang.reflect.Method; + +/** + * Test if setting HotSpotNmethod invalidation reason around works. + */ +public class CodeInvalidationReasonTest extends CodeInstallationTest { + + public static int add(int a, int b) { + return a + b; + } + + private static void compileAdd(TestAssembler asm) { + Register arg0 = asm.emitIntArg0(); + Register arg1 = asm.emitIntArg1(); + Register ret = asm.emitIntAdd(arg0, arg1); + asm.emitIntRet(ret); + } + + @Test + public void test() { + Method method = getMethod("add", int.class, int.class); + + HotSpotNmethod nmethod = test(CodeInvalidationReasonTest::compileAdd, method, 5, 7); + Asserts.assertEquals(-1 /* since it was not invalidated yet. */, nmethod.getInvalidationReason()); + + nmethod.invalidate(true, config.NMETHOD_INVALIDATION_REASON_JVMCI_INVALIDATE); + Asserts.assertEquals(config.NMETHOD_INVALIDATION_REASON_JVMCI_INVALIDATE, nmethod.getInvalidationReason()); + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,13 +71,13 @@ Asserts.assertNotEquals(nmethod.getStart(), 0L); // Make nmethod non-entrant but still alive - nmethod.invalidate(false); + nmethod.invalidate(false, config.NMETHOD_INVALIDATION_REASON_JVMCI_INVALIDATE); Asserts.assertFalse(nmethod.isValid(), "code is valid, i = " + nmethod); Asserts.assertTrue(nmethod.isAlive(), "code is not alive, i = " + nmethod); Asserts.assertEquals(nmethod.getStart(), 0L); // Deoptimize the nmethod and cut the link to it from the HotSpotNmethod - nmethod.invalidate(true); + nmethod.invalidate(true, config.NMETHOD_INVALIDATION_REASON_JVMCI_INVALIDATE); Asserts.assertFalse(nmethod.isValid(), "code is valid, i = " + nmethod); Asserts.assertFalse(nmethod.isAlive(), "code is alive, i = " + nmethod); Asserts.assertEquals(nmethod.getStart(), 0L); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestHotSpotVMConfig.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestHotSpotVMConfig.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestHotSpotVMConfig.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/TestHotSpotVMConfig.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +55,8 @@ public final int maxOopMapStackOffset = getFieldValue("CompilerToVM::Data::_max_oop_map_stack_offset", Integer.class, "int"); public final int heapWordSize = getConstant("HeapWordSize", Integer.class); + public final int NMETHOD_INVALIDATION_REASON_JVMCI_INVALIDATE = getConstant("nmethod::InvalidationReason::JVMCI_INVALIDATE", Integer.class); + public final boolean ropProtection; private Boolean initNmethodEntryBarrierConcurrentPatch(Architecture arch) { @@ -65,7 +67,7 @@ // There currently only 2 variants in use that differ only by the presence of a // dmb instruction int stw = getConstant("NMethodPatchingType::stw_instruction_and_data_patch", Integer.class); - int conc = getConstant("NMethodPatchingType::conc_data_patch", Integer.class); + int conc = getConstant("NMethodPatchingType::conc_instruction_and_data_patch", Integer.class); if (patchingType == stw) { patchConcurrent = false; } else if (patchingType == conc) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/generators/UniformDoubleGenerator.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/lib/generators/UniformDoubleGenerator.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/generators/UniformDoubleGenerator.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/lib/generators/UniformDoubleGenerator.java 2026-04-17 19:08:13.000000000 +0000 @@ -35,6 +35,9 @@ */ public UniformDoubleGenerator(Generators g, double lo, double hi) { super(g, lo, hi); + if (Double.compare(lo, hi) >= 0) { + throw new EmptyGeneratorException(); + } } @Override diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/generators/UniformFloatGenerator.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/lib/generators/UniformFloatGenerator.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/generators/UniformFloatGenerator.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/lib/generators/UniformFloatGenerator.java 2026-04-17 19:08:13.000000000 +0000 @@ -35,6 +35,9 @@ */ public UniformFloatGenerator(Generators g, float lo, float hi) { super(g, lo, hi); + if (Float.compare(lo, hi) >= 0) { + throw new EmptyGeneratorException(); + } } @Override diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java 2026-04-17 19:08:13.000000000 +0000 @@ -102,8 +102,6 @@ private static final String START = "(\\d+(\\s){2}("; private static final String MID = ".*)+(\\s){2}===.*"; private static final String END = ")"; - private static final String STORE_OF_CLASS_POSTFIX = "(:|\\+)\\S* \\*" + END; - private static final String LOAD_OF_CLASS_POSTFIX = "(:|\\+)\\S* \\*" + END; public static final String IS_REPLACED = "#IS_REPLACED#"; // Is replaced by an additional user-defined string. @@ -587,6 +585,21 @@ beforeMatchingNameRegex(CMP_P, "CmpP"); } + public static final String CMP_LT_MASK = PREFIX + "CMP_LT_MASK" + POSTFIX; + static { + beforeMatchingNameRegex(CMP_LT_MASK, "CmpLTMask"); + } + + public static final String ROUND_F = PREFIX + "ROUND_F" + POSTFIX; + static { + beforeMatchingNameRegex(ROUND_F, "RoundF"); + } + + public static final String ROUND_D = PREFIX + "ROUND_D" + POSTFIX; + static { + beforeMatchingNameRegex(ROUND_D, "RoundD"); + } + public static final String COMPRESS_BITS = PREFIX + "COMPRESS_BITS" + POSTFIX; static { beforeMatchingNameRegex(COMPRESS_BITS, "CompressBits"); @@ -1820,6 +1833,11 @@ optoOnly(SCOPE_OBJECT, regex); } + public static final String SAFEPOINT_SCALAROBJECT_OF = COMPOSITE_PREFIX + "SAFEPOINT_SCALAROBJECT_OF" + POSTFIX; + static { + safepointScalarobjectOfNodes(SAFEPOINT_SCALAROBJECT_OF, "SafePointScalarObject"); + } + public static final String SIGNUM_VD = VECTOR_PREFIX + "SIGNUM_VD" + POSTFIX; static { vectorNode(SIGNUM_VD, "SignumVD", TYPE_DOUBLE); @@ -2938,13 +2956,30 @@ CompilePhase.AFTER_LOOP_OPTS)); } + // Typename in load/store have the structure: + // @fully/qualified/package/name/to/TheClass+12 * + // And variation: + // - after @, we can have "stable:" or other labels, with optional space after ':' + // - the class can actually be a subclass, with $ separator (and it must be ok to give only the deepest one + // - after the class name, we can have a comma-separated list of implemented interfaces enclosed in parentheses + // - before the offset, we can have something like ":NotNull", either way, seeing "+" or ":" means the end of the type + // Worst case, it can be something like: + // @bla: bli:a/b/c$d$e (f/g,h/i/j):NotNull+24 * + private static final String LOAD_STORE_PREFIX = "@(\\w+: ?)*[\\w/\\$]*\\b"; + private static final String LOAD_STORE_SUFFIX = "( \\([^\\)]+\\))?(:|\\+)\\S* \\*"; + private static void loadOfNodes(String irNodePlaceholder, String irNodeRegex) { - String regex = START + irNodeRegex + MID + "@\\S*" + IS_REPLACED + LOAD_OF_CLASS_POSTFIX; + String regex = START + irNodeRegex + MID + LOAD_STORE_PREFIX + IS_REPLACED + LOAD_STORE_SUFFIX + END; beforeMatching(irNodePlaceholder, regex); } private static void storeOfNodes(String irNodePlaceholder, String irNodeRegex) { - String regex = START + irNodeRegex + MID + "@\\S*" + IS_REPLACED + STORE_OF_CLASS_POSTFIX; + String regex = START + irNodeRegex + MID + LOAD_STORE_PREFIX + IS_REPLACED + LOAD_STORE_SUFFIX + END; + beforeMatching(irNodePlaceholder, regex); + } + + private static void safepointScalarobjectOfNodes(String irNodePlaceholder, String irNodeRegex) { + String regex = START + irNodeRegex + MID + ".*" + IS_REPLACED + ".*" + END; beforeMatching(irNodePlaceholder, regex); } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8373525 + * @summary Test for the check of a valid type (long) for the input variable of overflow protection + * @run main/othervm -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,compiler.loopopts.TestValidTypeInOverflowProtection::test + * ${test.main.class} + * @run main ${test.main.class} + */ + +package compiler.loopopts; + +import java.util.Vector; + +class TestVector extends Vector { + TestVector(int initialCapacity) { + super(initialCapacity); + } + + Object getElementData() { + return elementData; + } +} + +public class TestValidTypeInOverflowProtection { + int cntr; + int mode; + int value = 533; + int one = 1; + + public static void main(String[] args) { + TestValidTypeInOverflowProtection test = new TestValidTypeInOverflowProtection(); + for (int i = 0; i < 1000; i++) { + test.test(); + } + } + + TestVector nextVector() { + if (cntr == one) { + return null; + } + TestVector vect = new TestVector(value); + if (mode == 2) { + int cap = vect.capacity(); + for (int i = 0; i < cap; i++) { + vect.addElement(new Object()); + } + } + if (++mode == 3) { + mode = cntr++; + } + return vect; + } + + String test() { + cntr = 0; + TestVector vect = nextVector(); + while (vect != null) { + Object backup_array = new Object[vect.size()]; + System.arraycopy(vect.getElementData(), 0, backup_array, 0, vect.size()); + int old_size = vect.size(); + int old_cap = vect.capacity(); + vect.setSize(vect.capacity() + 1); + for (int i = old_size; i < old_cap; i++) { + if (vect.elementAt(i) != null) { + } + } + for (int i = 0; i < new MyInteger(old_size).v; i++) { + } + vect = nextVector(); + } + return null; + } + + class MyInteger { + int v; + + MyInteger(int v) { + int M452 = 4; + int N452 = 8; + for (int i452 = 0; i452 < M452; i452++) { + for (int j452 = 0; j452 < N452; j452++) { + switch (i452) { + case -2: + case 0: + this.v = v; + } + } + } + } + } +} \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Long.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Long.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Long.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopopts/superword/MinMaxRed_Long.java 2026-04-17 19:08:13.000000000 +0000 @@ -31,16 +31,21 @@ package compiler.loopopts.superword; -import compiler.lib.ir_framework.*; -import jdk.test.lib.Utils; +import compiler.lib.generators.Generator; +import compiler.lib.generators.Generators; +import compiler.lib.ir_framework.IR; +import compiler.lib.ir_framework.IRNode; +import compiler.lib.ir_framework.Run; +import compiler.lib.ir_framework.RunMode; +import compiler.lib.ir_framework.Test; +import compiler.lib.ir_framework.TestFramework; import java.util.Arrays; -import java.util.Random; -import java.util.stream.LongStream; public class MinMaxRed_Long { - private static final Random random = Utils.getRandomInstance(); + private static final int SIZE = 1024; + private static final Generator<Long> GEN_LONG = Generators.G.longs(); public static void main(String[] args) throws Exception { TestFramework framework = new TestFramework(); @@ -53,97 +58,41 @@ @Run(test = {"maxReductionImplement"}, mode = RunMode.STANDALONE) public void runMaxTest() { - runMaxTest(50); - runMaxTest(80); - runMaxTest(100); - } + long[] longs = new long[SIZE]; + Generators.G.fill(GEN_LONG, longs); - private static void runMaxTest(int probability) { - long[] longs = reductionInit(probability); long res = 0; for (int j = 0; j < 2000; j++) { res = maxReductionImplement(longs, res); } - if (res == 11 * Arrays.stream(longs).max().getAsLong()) { + + final long expected = Arrays.stream(longs).map(l -> l * 11).max().getAsLong(); + if (res == expected) { System.out.println("Success"); } else { - throw new AssertionError("Failed"); + throw new AssertionError("Failed, got result " + res + " but expected " + expected); } } @Run(test = {"minReductionImplement"}, mode = RunMode.STANDALONE) public void runMinTest() { - runMinTest(50); - runMinTest(80); - runMinTest(100); - } + long[] longs = new long[SIZE]; + Generators.G.fill(GEN_LONG, longs); - private static void runMinTest(int probability) { - long[] longs = reductionInit(probability); - // Negating the values generated for controlling max branching - // allows same logic to be used for min tests. - longs = negate(longs); long res = 0; for (int j = 0; j < 2000; j++) { res = minReductionImplement(longs, res); } - if (res == 11 * Arrays.stream(longs).min().getAsLong()) { + + final long expected = Arrays.stream(longs).map(l -> l * 11).min().getAsLong(); + if (res == expected) { System.out.println("Success"); } else { - throw new AssertionError("Failed"); + throw new AssertionError("Failed, got result " + res + " but expected " + expected); } } - static long[] negate(long[] nums) { - return LongStream.of(nums).map(l -> -l).toArray(); - } - - public static long[] reductionInit(int probability) { - int aboveCount, abovePercent; - long[] longs = new long[1024]; - - // Generates an array of numbers such that as the array is iterated - // there is P probability of finding a new max value, - // and 100-P probability of not finding a new max value. - // The algorithm loops around if the distribution does not match the probability, - // but it approximates the probability as the array sizes increase. - // The worst case of this algorithm is when the desired array size is 100 - // and the aim is to get 50% of probability, which can only be satisfied - // with 50 elements being a new max. This situation can take 15 rounds. - // As sizes increase, say 10'000 elements, - // the number of elements that have to satisfy 50% increases, - // so the algorithm will stop as an example when 5027 elements are a new max values. - // Also, probability values in the edges will achieve their objective quicker, - // with 0% or 100% probability doing it in a single loop. - // To support the same algorithm for min calculations, - // negating the array elements achieves the same objective. - do { - long max = random.nextLong(10); - longs[0] = max; - - aboveCount = 0; - for (int i = 1; i < longs.length; i++) { - long value; - if (random.nextLong(101) <= probability) { - long increment = random.nextLong(10); - value = max + increment; - aboveCount++; - } else { - // Decrement by at least 1 - long diffToMax = random.nextLong(10) + 1; - value = max - diffToMax; - } - longs[i] = value; - max = Math.max(max, value); - } - - abovePercent = ((aboveCount + 1) * 100) / longs.length; - } while (abovePercent != probability); - - return longs; - } - @Test @IR(applyIfAnd = {"SuperWordReductions", "true", "MaxVectorSize", ">=32"}, applyIfCPUFeatureOr = {"avx512", "true", "asimd" , "true"}, diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVectorFuzzer.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVectorFuzzer.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVectorFuzzer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVectorFuzzer.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +30,19 @@ * @key randomness * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions * -XX:LoopUnrollLimit=250 - * -XX:CompileCommand=printcompilation,compiler.loopopts.superword.TestAlignVectorFuzzer::* + * compiler.loopopts.superword.TestAlignVectorFuzzer + */ + +/* + * @test id=CompileOnly + * @bug 8253191 + * @summary Fuzzing loops with different (random) init, limit, stride, scale etc. Do not force alignment. + * @modules java.base/jdk.internal.misc + * @library /test/lib + * @key randomness + * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions + * -XX:LoopUnrollLimit=250 + * -XX:CompileCommand=compileonly,compiler.loopopts.superword.TestAlignVectorFuzzer::* * compiler.loopopts.superword.TestAlignVectorFuzzer */ @@ -44,7 +56,6 @@ * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions * -XX:+AlignVector -XX:+VerifyAlignVector * -XX:LoopUnrollLimit=250 - * -XX:CompileCommand=printcompilation,compiler.loopopts.superword.TestAlignVectorFuzzer::* * compiler.loopopts.superword.TestAlignVectorFuzzer */ @@ -58,7 +69,6 @@ * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions * -XX:+AlignVector -XX:+VerifyAlignVector * -XX:LoopUnrollLimit=250 - * -XX:CompileCommand=printcompilation,compiler.loopopts.superword.TestAlignVectorFuzzer::* * -XX:ObjectAlignmentInBytes=16 * compiler.loopopts.superword.TestAlignVectorFuzzer */ @@ -73,7 +83,6 @@ * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions * -XX:+AlignVector -XX:+VerifyAlignVector * -XX:LoopUnrollLimit=250 - * -XX:CompileCommand=printcompilation,compiler.loopopts.superword.TestAlignVectorFuzzer::* * -XX:-TieredCompilation -Xbatch * compiler.loopopts.superword.TestAlignVectorFuzzer */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopstripmining/CheckLoopStripMining.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopstripmining/CheckLoopStripMining.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopstripmining/CheckLoopStripMining.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/loopstripmining/CheckLoopStripMining.java 2026-04-17 19:08:13.000000000 +0000 @@ -42,8 +42,8 @@ "-XX:+SafepointTimeout", "-XX:+SafepointALot", "-XX:+AbortVMOnSafepointTimeout", - "-XX:SafepointTimeoutDelay=" + Utils.adjustTimeout(300), - "-XX:GuaranteedSafepointInterval=" + Utils.adjustTimeout(300), + "-XX:SafepointTimeoutDelay=" + Utils.adjustTimeout(1200), + "-XX:GuaranteedSafepointInterval=" + Utils.adjustTimeout(1200), "-XX:-TieredCompilation", "-XX:+UseCountedLoopSafepoints", "-XX:LoopStripMiningIter=1000", @@ -58,8 +58,8 @@ "-XX:+SafepointTimeout", "-XX:+SafepointALot", "-XX:+AbortVMOnSafepointTimeout", - "-XX:SafepointTimeoutDelay=" + Utils.adjustTimeout(300), - "-XX:GuaranteedSafepointInterval=" + Utils.adjustTimeout(300), + "-XX:SafepointTimeoutDelay=" + Utils.adjustTimeout(1200), + "-XX:GuaranteedSafepointInterval=" + Utils.adjustTimeout(1200), "-XX:-TieredCompilation", "-XX:+UseCountedLoopSafepoints", "-XX:LoopStripMiningIter=1000", diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/startup/StartupOutput.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/startup/StartupOutput.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/startup/StartupOutput.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/startup/StartupOutput.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,6 +36,7 @@ package compiler.startup; +import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.Utils; @@ -60,8 +61,11 @@ throw new Exception("VM crashed with exit code " + exitCode); } - for (int i = 0; i < 200; i++) { - int initialCodeCacheSizeInKb = 800 + rand.nextInt(400); + // On s390x, generated code is ~6x larger in fastdebug and ~1.4x in release builds vs. other archs, + // hence we require slightly more minimum space. + int minInitialSize = 800 + (Platform.isS390x() ? 800 : 0); + for (int i = 0; i < 50; i++) { + int initialCodeCacheSizeInKb = minInitialSize + rand.nextInt(400); int reservedCodeCacheSizeInKb = initialCodeCacheSizeInKb + rand.nextInt(200); pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:InitialCodeCacheSize=" + initialCodeCacheSizeInKb + "K", "-XX:ReservedCodeCacheSize=" + reservedCodeCacheSizeInKb + "k", "-version"); out = new OutputAnalyzer(pb.start()); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/TestSubwordTruncation.java openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/vectorization/TestSubwordTruncation.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/TestSubwordTruncation.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/compiler/vectorization/TestSubwordTruncation.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ /* * @test - * @bug 8350177 8362171 + * @bug 8350177 8362171 8369881 * @summary Ensure that truncation of subword vectors produces correct results * @library /test/lib / * @run driver compiler.vectorization.TestSubwordTruncation @@ -354,6 +354,57 @@ @Test @IR(counts = { IRNode.STORE_VECTOR, "=0" }) @Arguments(setup = "setupByteArray") + public Object[] testByteReverseBytesS(byte[] in) { + byte[] res = new byte[SIZE]; + for (int i = 0; i < SIZE; i++) { + res[i] = (byte)Short.reverseBytes(in[i]); + } + + return new Object[] { in, res }; + } + + @Check(test = "testByteReverseBytesS") + public void checkTestByteReverseBytesS(Object[] vals) { + byte[] in = (byte[]) vals[0]; + byte[] res = (byte[]) vals[1]; + + for (int i = 0; i < SIZE; i++) { + byte val = (byte)Short.reverseBytes(in[i]); + if (res[i] != val) { + throw new IllegalStateException("Expected " + val + " but got " + res[i] + " for " + in[i]); + } + } + } + + @Test + @IR(counts = { IRNode.STORE_VECTOR, "=0" }) + @Arguments(setup = "setupByteArray") + public Object[] testByteReverseBytesUS(byte[] in) { + byte[] res = new byte[SIZE]; + for (int i = 0; i < SIZE; i++) { + res[i] = (byte)Character.reverseBytes((char)in[i]); + } + + return new Object[] { in, res }; + } + + @Check(test = "testByteReverseBytesUS") + public void checkTestByteReverseBytesUS(Object[] vals) { + byte[] in = (byte[]) vals[0]; + byte[] res = (byte[]) vals[1]; + + for (int i = 0; i < SIZE; i++) { + byte val = (byte)Character.reverseBytes((char)in[i]); + if (res[i] != val) { + throw new IllegalStateException("Expected " + val + " but got " + res[i] + " for " + in[i]); + } + } + } + + + @Test + @IR(counts = { IRNode.STORE_VECTOR, "=0" }) + @Arguments(setup = "setupByteArray") public Object[] testByteBitCount(byte[] in) { byte[] res = new byte[SIZE]; for (int i = 0; i < SIZE; i++) { @@ -389,6 +440,71 @@ } } + @Test + @IR(counts = { IRNode.CMP_LT_MASK, ">0" }) + @Arguments(setup = "setupByteArray") + public Object[] testCmpLTMask(byte[] in) { + char[] res = new char[SIZE]; + + for (int i = 0; i < SIZE; i++) { + res[i] = (char) (in[i] >= 0 ? in[i] : 256 + in[i]); + } + + return new Object[] { in, res }; + } + + @Test + @IR(applyIfPlatformOr = {"x64", "true", "aarch64", "true", "riscv64", "true"}, counts = { IRNode.ROUND_F, ">0" }) + @Arguments(setup = "setupByteArray") + public Object[] testRoundF(byte[] in) { + short[] res = new short[SIZE]; + + for (int i = 0; i < SIZE; i++) { + res[i] = (short) Math.round(in[i] * 10.F); + } + + return new Object[] { in, res }; + } + + @Test + @IR(applyIfPlatformOr = {"x64", "true", "aarch64", "true", "riscv64", "true"}, counts = { IRNode.ROUND_D, ">0" }) + @Arguments(setup = "setupByteArray") + public Object[] testRoundD(byte[] in) { + short[] res = new short[SIZE]; + + for (int i = 0; i < SIZE; i++) { + res[i] = (short) Math.round(in[i] * 10.0); + } + + return new Object[] { in, res }; + } + + @Test + @IR(counts = { IRNode.CAST_II, ">0" }) + @Warmup(0) + public Object[] testCastII() { + byte[] bytes = new byte[400]; + intField = 6; + int i = 0; + int j = 1; + + do { + bytes[j] = (byte) i; + int k = 1; + + do { + i <<= intField; + i += (k ^ i); + i -= j; + + for (int u = 1; 1 > u; u++) { + } + } while (++k < 8); + } while (++j < 191); + + return new Object[] { bytes }; + } + public static void main(String[] args) { TestFramework.run(); } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java 2026-04-17 19:08:13.000000000 +0000 @@ -77,7 +77,7 @@ throw new SkippedException("Docker is not supported on this host"); } - if (isPodman() & !Platform.isRoot()) { + if (DockerTestUtils.isPodman() & !Platform.isRoot()) { throw new SkippedException("test cannot be run under rootless podman configuration"); } @@ -222,10 +222,4 @@ } } - static boolean isPodman() { - String[] parts = Container.ENGINE_COMMAND - .toLowerCase() - .split(File.pathSeparator); - return "podman".equals(parts[parts.length - 1]); - } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJcmd.java openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestJcmd.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJcmd.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestJcmd.java 2026-04-17 19:08:13.000000000 +0000 @@ -57,7 +57,7 @@ private static final String IMAGE_NAME = Common.imageName("jcmd"); private static final int TIME_TO_RUN_CONTAINER_PROCESS = (int) (10 * Utils.TIMEOUT_FACTOR); // seconds private static final String CONTAINER_NAME = "test-container"; - private static final boolean IS_PODMAN = Container.ENGINE_COMMAND.contains("podman"); + private static final boolean IS_PODMAN = DockerTestUtils.isPodman(); private static final String ROOT_UID = "0"; diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryInvisibleParent.java openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestMemoryInvisibleParent.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryInvisibleParent.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestMemoryInvisibleParent.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2025, IBM Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.Container; +import jdk.test.lib.containers.docker.Common; +import jdk.test.lib.containers.docker.DockerTestUtils; +import jdk.test.lib.containers.docker.ContainerRuntimeVersionTestUtils; +import jdk.test.lib.containers.docker.DockerRunOptions; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.internal.platform.Metrics; + +import java.nio.file.Path; +import java.nio.file.Files; +import java.util.ArrayList; + +import jdk.test.lib.Platform; +import jtreg.SkippedException; + +/* + * @test + * @bug 8370966 + * @requires os.family == "linux" + * @requires !vm.asan + * @modules java.base/jdk.internal.platform + * @library /test/lib + * @run main TestMemoryInvisibleParent + */ +public class TestMemoryInvisibleParent { + private static final String UNLIMITED = "-1"; + private static final String imageName = Common.imageName("invisible-parent"); + + public static void main(String[] args) throws Exception { + Metrics metrics = Metrics.systemMetrics(); + if (metrics == null) { + System.out.println("Cgroup not configured."); + return; + } + if (!DockerTestUtils.canTestDocker()) { + System.out.println("Unable to run docker tests."); + return; + } + + ContainerRuntimeVersionTestUtils.checkContainerVersionSupported(); + + if (DockerTestUtils.isRootless()) { + throw new SkippedException("Test skipped in rootless mode"); + } + if (!Platform.isRoot()) { + throw new SkippedException("Test should be run as root"); + } + DockerTestUtils.buildJdkContainerImage(imageName); + + if ("cgroupv1".equals(metrics.getProvider())) { + try { + testMemoryLimitHiddenParent("104857600", "104857600"); + testMemoryLimitHiddenParent("209715200", "209715200"); + } finally { + DockerTestUtils.removeDockerImage(imageName); + } + } else { + throw new SkippedException("cgroup v1 - only test! This is " + metrics.getProvider()); + } + } + + private static void testMemoryLimitHiddenParent(String valueToSet, String expectedValue) + throws Exception { + + Common.logNewTestCase("Cgroup V1 hidden parent memory limit: " + valueToSet); + + try { + String cgroupParent = setParentWithLimit(valueToSet); + DockerRunOptions opts = new DockerRunOptions(imageName, "/jdk/bin/java", "-version", "-Xlog:os+container=trace"); + opts.appendTestJavaOptions = false; + if (DockerTestUtils.isPodman()) { + // Podman needs to run this test with engine option --cgroup-manager=cgroupfs + opts.addEngineOpts("--cgroup-manager", "cgroupfs"); + } + opts.addDockerOpts("--cgroup-parent=/" + cgroupParent); + Common.run(opts) + .shouldContain("Hierarchical Memory Limit is: " + expectedValue); + } finally { + // Reset the parent memory limit to unlimited (-1) + setParentWithLimit(UNLIMITED); + } + } + + private static String setParentWithLimit(String memLimit) throws Exception { + String cgroupParent = "hidden-parent-" + TestMemoryInvisibleParent.class.getSimpleName() + Runtime.version().feature(); + Path sysFsMemory = Path.of("/", "sys", "fs", "cgroup", "memory"); + Path cgroupParentPath = sysFsMemory.resolve(cgroupParent); + ProcessBuilder pb = new ProcessBuilder("mkdir", "-p", cgroupParentPath.toString()); + OutputAnalyzer out = new OutputAnalyzer(pb.start()) + .shouldHaveExitValue(0); + Path memoryLimitsFile = cgroupParentPath.resolve("memory.limit_in_bytes"); + Files.writeString(memoryLimitsFile, memLimit); + System.out.println("Cgroup parent is: /" + cgroupParentPath.getFileName() + + " at " + sysFsMemory.toString()); + return cgroupParent; + } + +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java 2026-04-17 19:08:13.000000000 +0000 @@ -46,19 +46,6 @@ public class TestMemoryWithSubgroups { private static final String imageName = Common.imageName("subgroup"); - static String getEngineInfo(String format) throws Exception { - return DockerTestUtils.execute(Container.ENGINE_COMMAND, "info", "-f", format) - .getStdout(); - } - - static boolean isRootless() throws Exception { - // Docker and Podman have different INFO structures. - // The node path for Podman is .Host.Security.Rootless, that also holds for - // Podman emulating Docker CLI. The node path for Docker is .SecurityOptions. - return (getEngineInfo("{{.Host.Security.Rootless}}").contains("true") || - getEngineInfo("{{.SecurityOptions}}").contains("name=rootless")); - } - public static void main(String[] args) throws Exception { Metrics metrics = Metrics.systemMetrics(); if (metrics == null) { @@ -72,7 +59,7 @@ ContainerRuntimeVersionTestUtils.checkContainerVersionSupported(); - if (isRootless()) { + if (DockerTestUtils.isRootless()) { throw new SkippedException("Test skipped in rootless mode"); } Common.prepareWhiteBox(); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMisc.java openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestMisc.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMisc.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestMisc.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,20 +29,24 @@ * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.platform * java.management * jdk.jartool/sun.tools.jar * @build CheckContainerized jdk.test.whitebox.WhiteBox PrintContainerInfo * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar jdk.test.whitebox.WhiteBox * @run driver TestMisc */ +import jdk.internal.platform.Metrics; import jdk.test.lib.containers.docker.Common; import jdk.test.lib.containers.docker.DockerTestUtils; import jdk.test.lib.containers.docker.DockerRunOptions; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jtreg.SkippedException; public class TestMisc { + private static final Metrics metrics = Metrics.systemMetrics(); private static final String imageName = Common.imageName("misc"); public static void main(String[] args) throws Exception { @@ -58,6 +62,7 @@ testIsContainerized(); testPrintContainerInfo(); testPrintContainerInfoActiveProcessorCount(); + testPrintContainerInfoCPUShares(); } finally { DockerTestUtils.removeDockerImage(imageName); } @@ -94,8 +99,53 @@ checkContainerInfo(Common.run(opts)); } + // Test the mapping function on cgroups v2. Should also pass on cgroups v1 as it's + // a direct mapping there. + private static void testPrintContainerInfoCPUShares() throws Exception { + // Test won't work on cgv1 rootless podman since resource limits don't + // work there. + if ("cgroupv1".equals(metrics.getProvider()) && + DockerTestUtils.isPodman() && + DockerTestUtils.isRootless()) { + throw new SkippedException("Resource limits required for testPrintContainerInfoCPUShares(). " + + "This is cgv1 with podman in rootless mode. Test skipped."); + } + // Anything less than 1024 should return the back-mapped cpu-shares value without + // rounding to next multiple of 1024 (on cg v2). Only ensure that we get + // 'cpu_shares: <back-mapped-value>' over 'cpu_shares: no shares'. + printContainerInfo(512, 1024, false); + // Don't use 1024 exactly so as to avoid mapping to the unlimited/uset case. + // Use a value > 100 post-mapping so as to hit the non-default branch: 1052 => 103 + printContainerInfo(1052, 1024, true); + // need at least 2 CPU cores for this test to work + if (Runtime.getRuntime().availableProcessors() >= 2) { + printContainerInfo(2048, 2048, true); + } + } + + private static void printContainerInfo(int cpuShares, int expected, boolean numberMatch) throws Exception { + Common.logNewTestCase("Test print_container_info() - cpu shares - given: " + cpuShares + ", expected: " + expected); + + DockerRunOptions opts = Common.newOpts(imageName, "PrintContainerInfo"); + Common.addWhiteBoxOpts(opts); + opts.addDockerOpts("--cpu-shares", Integer.valueOf(cpuShares).toString()); + + OutputAnalyzer out = Common.run(opts); + String str = out.getOutput(); + boolean isCgroupV2 = str.contains("cgroupv2"); + // cg v1 maps cpu shares values verbatim. Only cg v2 uses the + // mapping function. + if (numberMatch) { + int valueExpected = isCgroupV2 ? expected : cpuShares; + out.shouldContain("cpu_shares: " + valueExpected); + } else { + // must not print "no shares" + out.shouldNotContain("cpu_shares: no shares"); + } + } + private static void testPrintContainerInfoActiveProcessorCount() throws Exception { - Common.logNewTestCase("Test print_container_info()"); + Common.logNewTestCase("Test print_container_info() - ActiveProcessorCount"); DockerRunOptions opts = Common.newOpts(imageName, "PrintContainerInfo").addJavaOpts("-XX:ActiveProcessorCount=2"); Common.addWhiteBoxOpts(opts); @@ -111,9 +161,11 @@ "CPU Shares", "CPU Quota", "CPU Period", + "CPU Usage", "OSContainer::active_processor_count", "Memory Limit", "Memory Soft Limit", + "Memory Throttle Limit", "Memory Usage", "Maximum Memory Usage", "memory_max_usage_in_bytes", diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestPids.java openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestPids.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestPids.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/containers/docker/TestPids.java 2026-04-17 19:08:13.000000000 +0000 @@ -47,7 +47,7 @@ public class TestPids { private static final String imageName = Common.imageName("pids"); - private static final boolean IS_PODMAN = Container.ENGINE_COMMAND.contains("podman"); + private static final boolean IS_PODMAN = DockerTestUtils.isPodman(); private static final int UNLIMITED_PIDS_PODMAN = 0; private static final int UNLIMITED_PIDS_DOCKER = -1; diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java 2026-04-17 19:08:13.000000000 +0000 @@ -133,13 +133,8 @@ // public static void main(String [] args) { - long rss = WhiteBox.getWhiteBox().rss(); - System.out.println("RSS: " + rss); - long available = WhiteBox.getWhiteBox().hostAvailableMemory(); - System.out.println("Host available memory: " + available); - + int maxIter = 20; long heapSize = 256 * 1024 * 1024; - // On Linux, a JVM that runs with 256M pre-committed heap will use about 60MB (release JVM) RSS. Barring // memory pressure that causes us to lose RSS, pretouching should increase RSS to >256MB. So there should be a // clear distinction between non-pretouched and pretouched. @@ -150,12 +145,28 @@ // on the side of disregarding true errors than to produce false positives (if pretouching is broken, at least // some of the runs of this test will run on beefy enough machines and show the test as failed). long requiredAvailable = 1024 * 1024 * 1024; - if (rss == 0) { - throw new SkippedException("cannot get RSS?"); - } - if (available > requiredAvailable) { - Asserts.assertGreaterThan(rss, minRequiredRss, "RSS of this process(" + rss + "b) should be bigger " + - "than or equal to heap size(" + heapSize + "b) (available memory: " + available + "). On Linux Kernel < 4.14 RSS can be inaccurate"); + + // RSS values we get are sometimes somewhat delayed or inaccurate + for (int iter=0; iter < maxIter; iter++) { + long rss = WhiteBox.getWhiteBox().rss(); + System.out.println("RSS: " + rss); + long available = WhiteBox.getWhiteBox().hostAvailableMemory(); + System.out.println("Host available memory: " + available); + + if (rss == 0) { + throw new SkippedException("cannot get RSS?"); + } + if (available <= requiredAvailable) { + throw new SkippedException("Available memory on host " + available + " is too small, not larger than required available memory " + requiredAvailable); + } + + if ((rss < minRequiredRss) && iter < maxIter-1) { + System.out.println("We got only an RSS value of " + rss + " but require " + minRequiredRss + ", let's retry!"); + } else { + Asserts.assertGreaterThan(rss, minRequiredRss, "RSS of this process(" + rss + "b) should be bigger " + + "than or equal to heap size(" + heapSize + "b) (available memory: " + available + "). On Linux Kernel < 4.14 RSS can be inaccurate"); + break; + } } } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestObjectAlignmentCardSize.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/TestObjectAlignmentCardSize.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestObjectAlignmentCardSize.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/TestObjectAlignmentCardSize.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ /* @test TestObjectAlignmentCardSize.java * @summary Test to check correct handling of ObjectAlignmentInBytes and GCCardSizeInBytes combinations * @requires vm.gc != "Z" + * @requires vm.bits == "64" * @library /test/lib * @modules java.base/jdk.internal.misc * @run driver gc.TestObjectAlignmentCardSize diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestUseGCOverheadLimit.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/TestUseGCOverheadLimit.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestUseGCOverheadLimit.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/TestUseGCOverheadLimit.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 gc; + +/* + * @test id=Parallel + * @requires vm.gc.Parallel & false + * @requires !vm.debug + * @summary Verifies that the UseGCOverheadLimit functionality works in Parallel GC. + * @library /test/lib + * @run driver gc.TestUseGCOverheadLimit Parallel + */ + +/* + * @test id=G1 + * @requires vm.gc.G1 + * @requires !vm.debug + * @summary Verifies that the UseGCOverheadLimit functionality works in G1 GC. + * @library /test/lib + * @run driver gc.TestUseGCOverheadLimit G1 + */ + +import java.util.Arrays; +import java.util.stream.Stream; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +public class TestUseGCOverheadLimit { + public static void main(String args[]) throws Exception { + String[] parallelArgs = { + "-XX:+UseParallelGC", + "-XX:NewSize=122m", + "-XX:SurvivorRatio=99", + "-XX:GCHeapFreeLimit=10" + }; + String[] g1Args = { + "-XX:+UseG1GC", + "-XX:GCHeapFreeLimit=5" + }; + + String[] selectedArgs = args[0].equals("G1") ? g1Args : parallelArgs; + + final String[] commonArgs = { + "-XX:-UseCompactObjectHeaders", // Object sizes are calculated such that the heap is tight. + "-XX:ParallelGCThreads=1", // Make GCs take longer. + "-XX:+UseGCOverheadLimit", + "-Xlog:gc=debug", + "-XX:GCTimeLimit=80", // Ease the CPU requirement. + "-Xmx128m", + Allocating.class.getName() + }; + + String[] vmArgs = Stream.concat(Arrays.stream(selectedArgs), Arrays.stream(commonArgs)).toArray(String[]::new); + OutputAnalyzer output = ProcessTools.executeLimitedTestJava(vmArgs); + output.shouldNotHaveExitValue(0); + + System.out.println(output.getStdout()); + + output.stdoutShouldContain("GC Overhead Limit exceeded too often (5)."); + } + + static class Allocating { + public static void main(String[] args) { + Object[] cache = new Object[1024 * 1024 * 2]; + + // Allocate random objects, keeping around data, causing garbage + // collections. + for (int i = 0; i < 1024* 1024 * 30; i++) { + Object[] obj = new Object[10]; + cache[i % cache.length] = obj; + } + + System.out.println(cache); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/arguments/TestParallelGCErgo.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/arguments/TestParallelGCErgo.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/arguments/TestParallelGCErgo.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/arguments/TestParallelGCErgo.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,7 +27,7 @@ * @test TestParallelGCErgo * @bug 8272364 * @requires vm.gc.Parallel - * @requires vm.opt.UseLargePages == null | !vm.opt.UseLargePages + * @requires !vm.opt.final.UseLargePages * @summary Verify ParallelGC minimum young and old ergonomics are setup correctly * @modules java.base/jdk.internal.misc * @library /test/lib diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java 2026-04-17 19:08:13.000000000 +0000 @@ -53,9 +53,9 @@ 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; -import static jdk.test.lib.Asserts.*; import jdk.test.whitebox.WhiteBox; public class TestCodeCacheUnloadDuringConcCycle { @@ -70,9 +70,10 @@ "-Xbootclasspath/a:.", "-Xlog:gc=trace,codecache", "-XX:+WhiteBoxAPI", - "-XX:ReservedCodeCacheSize=8M", + "-XX:ReservedCodeCacheSize=" + (Platform.is32bit() ? "4M" : "8M"), "-XX:StartAggressiveSweepingAt=50", "-XX:CompileCommand=compileonly,gc.g1.SomeClass::*", + "-XX:CompileCommand=compileonly,gc.g1.Foo*::*", TestCodeCacheUnloadDuringConcCycleRunner.class.getName(), concPhase); return output; diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/TestDynamicSoftMaxHeapSize.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/shenandoah/TestDynamicSoftMaxHeapSize.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/TestDynamicSoftMaxHeapSize.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/shenandoah/TestDynamicSoftMaxHeapSize.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,105 +23,175 @@ * */ -/* - * @test id=passive +/** + * @test id=satb-adaptive * @requires vm.gc.Shenandoah * @library /test/lib * - * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive + * @run main/othervm -Xms100m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -Xlog:gc=info -Dtarget=10000 + * -XX:ShenandoahGCMode=satb * -XX:+ShenandoahDegeneratedGC - * -Dtarget=10000 + * -XX:ShenandoahGCHeuristics=adaptive * TestDynamicSoftMaxHeapSize * - * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive - * -XX:-ShenandoahDegeneratedGC - * -Dtarget=10000 - * TestDynamicSoftMaxHeapSize */ -/* - * @test id=aggressive +/** + * @test id=satb-aggressive * @requires vm.gc.Shenandoah * @library /test/lib * - * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive - * -Dtarget=1000 + * @run main/othervm -Xms100m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -Xlog:gc=info -Dtarget=10000 + * -XX:ShenandoahGCMode=satb + * -XX:+ShenandoahDegeneratedGC + * -XX:ShenandoahGCHeuristics=aggressive * TestDynamicSoftMaxHeapSize + * */ -/* - * @test id=adaptive +/** + * @test id=satb-compact * @requires vm.gc.Shenandoah * @library /test/lib * - * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive - * -Dtarget=10000 + * @run main/othervm -Xms100m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -Xlog:gc=info -Dtarget=10000 + * -XX:ShenandoahGCMode=satb + * -XX:+ShenandoahDegeneratedGC + * -XX:ShenandoahGCHeuristics=compact * TestDynamicSoftMaxHeapSize + * */ -/* - * @test id=generational +/** + * @test id=satb-static * @requires vm.gc.Shenandoah * @library /test/lib * - * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:ShenandoahGCMode=generational - * -Dtarget=10000 + * @run main/othervm -Xms100m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -Xlog:gc=info -Dtarget=10000 + * -XX:ShenandoahGCMode=satb + * -XX:+ShenandoahDegeneratedGC + * -XX:ShenandoahGCHeuristics=static * TestDynamicSoftMaxHeapSize + * */ -/* - * @test id=static +/** + * @test id=passive * @requires vm.gc.Shenandoah * @library /test/lib * * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive + * -XX:+ShenandoahDegeneratedGC + * -Dtarget=10000 + * TestDynamicSoftMaxHeapSize + * + * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive + * -XX:-ShenandoahDegeneratedGC * -Dtarget=10000 * TestDynamicSoftMaxHeapSize */ -/* - * @test id=compact +/** + * @test id=generational * @requires vm.gc.Shenandoah * @library /test/lib * - * @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact - * -Dtarget=1000 - * TestDynamicSoftMaxHeapSize + * @run main/othervm -Xms100m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -Xlog:gc=info -Dtarget=10000 + * -XX:ShenandoahGCMode=generational + * -XX:ShenandoahGCHeuristics=adaptive + * TestDynamicSoftMaxHeapSize + * */ -import java.util.Random; +/** + * @test id=generational-softMaxHeapSizeValidation + * @requires vm.gc.Shenandoah + * @library /test/lib + * + * @run main/othervm -DvalidateSoftMaxHeap=true + * TestDynamicSoftMaxHeapSize + * -Xms100m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions + * -XX:+UseShenandoahGC -Xlog:gc=info -Dtarget=10000 -DverifySoftMaxHeapValue=true + * -XX:ShenandoahGCMode=generational + * -XX:ShenandoahGCHeuristics=adaptive + */ import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.dcmd.PidJcmdExecutor; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; + public class TestDynamicSoftMaxHeapSize { + static final int K = 1024; + static final int XMS_MB = 100; + static final int XMX_MB = 512; - static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation - static final long STRIDE = 10_000_000; + public static void main(String[] args) throws Exception { + if ("true".equals(System.getProperty("validateSoftMaxHeap"))) { + List<String> flagArgs = new ArrayList<>(Arrays.asList(args)); - static volatile Object sink; + int softMaxInMb = Utils.getRandomInstance().nextInt(XMS_MB, XMX_MB); + flagArgs.add("-DsoftMaxCapacity=" + softMaxInMb * K * K); + flagArgs.add("-Dtest.jdk=" + System.getProperty("test.jdk")); + flagArgs.add("-Dcompile.jdk=" + System.getProperty("compile.jdk")); + + flagArgs.add(SoftMaxWithExpectationTest.class.getName()); + + ProcessBuilder genShenPbValidateFlag = ProcessTools.createLimitedTestJavaProcessBuilder(flagArgs); + OutputAnalyzer output = new OutputAnalyzer(genShenPbValidateFlag.start()); + output.shouldHaveExitValue(0); + output.shouldContain(String.format("Soft Max Heap Size: %dM -> %dM", XMX_MB, softMaxInMb)); // By default, the soft max heap size is Xmx + } else { + SoftMaxSetFlagOnlyTest.test(); + } + } - public static void main(String[] args) throws Exception { - long count = TARGET_MB * 1024 * 1024 / 16; - Random r = Utils.getRandomInstance(); - PidJcmdExecutor jcmd = new PidJcmdExecutor(); - - for (long c = 0; c < count; c += STRIDE) { - // Sizes specifically include heaps below Xms and above Xmx to test saturation code. - jcmd.execute("VM.set_flag SoftMaxHeapSize " + r.nextInt(768*1024*1024), true); - for (long s = 0; s < STRIDE; s++) { - sink = new Object(); + public static class SoftMaxSetFlagOnlyTest { + static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation + static final long STRIDE = 10_000_000; + + static volatile Object sink; + + public static void test() throws Exception { + long count = TARGET_MB * 1024 * 1024 / 16; + Random r = Utils.getRandomInstance(); + PidJcmdExecutor jcmd = new PidJcmdExecutor(); + + for (long c = 0; c < count; c += STRIDE) { + // Sizes specifically include heaps below Xms and above Xmx to test saturation code. + jcmd.execute("VM.set_flag SoftMaxHeapSize " + r.nextInt(768*1024*1024), true); + for (long s = 0; s < STRIDE; s++) { + sink = new Object(); + } + Thread.sleep(1); } - Thread.sleep(1); } } + public static class SoftMaxWithExpectationTest { + static final long TOTAL = 100_000_000; + + static volatile Object sink; + + public static void main(String[] args) throws Exception { + int expectedSoftMaxHeapSize = Integer.getInteger("softMaxCapacity", 0); + PidJcmdExecutor jcmd = new PidJcmdExecutor(); + jcmd.execute("VM.set_flag SoftMaxHeapSize " + expectedSoftMaxHeapSize, false); + + for (long s = 0; s < TOTAL; s++) { + sink = new Object(); + } + } + } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/shenandoah/compiler/TestClone.java 2026-04-17 19:08:13.000000000 +0000 @@ -357,6 +357,7 @@ * -XX:TieredStopAtLevel=4 * TestClone */ + public class TestClone { public static void main(String[] args) throws Exception { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/gc/shenandoah/generational/TestOldGrowthTriggers.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,6 +25,7 @@ /* * @test id=generational * @summary Test that growth of old-gen triggers old-gen marking + * @key intermittent * @requires vm.gc.Shenandoah * @library /test/lib * @run driver TestOldGrowthTriggers diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * 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,16 +29,25 @@ * cause, even if we can't create the ExceptionInInitializerError * @comment This test could easily be perturbed so don't allow flag settings. * @requires vm.flagless + * @library /test/lib * @comment Run with the smallest stack possible to limit the execution time. * This is the smallest stack that is supported by all platforms. - * @run main/othervm -Xss384K -Xint TestStackOverflowDuringInit + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestStackOverflowDuringInit */ import java.io.ByteArrayOutputStream; import java.io.PrintStream; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.whitebox.WhiteBox; public class TestStackOverflowDuringInit { + static String expected = "java.lang.NoClassDefFoundError: Could not initialize class TestStackOverflowDuringInit$LongCache"; + static String cause = "Caused by: java.lang.StackOverflowError"; + // The setup for this is somewhat intricate. We need to trigger a // StackOverflowError during execution of the static initializer // for a class, but we need there to be insufficient stack left @@ -88,34 +97,47 @@ } } - public static void main(String[] args) throws Exception { - String expected = "java.lang.NoClassDefFoundError: Could not initialize class TestStackOverflowDuringInit$LongCache"; - String cause = "Caused by: java.lang.StackOverflowError"; + static class Launcher { + public static void main(String[] args) throws Exception { - // Pre-load, but not initialize, LongCache, else we will - // hit SOE during class loading. - System.out.println("Pre-loading ..."); - Class<?> c = Class.forName("TestStackOverflowDuringInit$LongCache", - false, - TestStackOverflowDuringInit.class.getClassLoader()); - try { - recurse(); - } catch (Throwable ex) { - // ex.printStackTrace(); - verify_stack(ex, expected, cause); + // Pre-load, but not initialize, LongCache, else we will + // hit SOE during class loading. + System.out.println("Pre-loading ..."); + Class<?> c = Class.forName("TestStackOverflowDuringInit$LongCache", + false, + TestStackOverflowDuringInit.class.getClassLoader()); + try { + recurse(); + } catch (Throwable ex) { + // ex.printStackTrace(); + verify_stack(ex, expected, cause); + } } - } - private static void verify_stack(Throwable e, String expected, String cause) throws Exception { - ByteArrayOutputStream byteOS = new ByteArrayOutputStream(); - try (PrintStream printStream = new PrintStream(byteOS)) { - e.printStackTrace(printStream); - } - String stackTrace = byteOS.toString("ASCII"); - System.out.println(stackTrace); - if (!stackTrace.contains(expected) || - (cause != null && !stackTrace.contains(cause))) { - throw new RuntimeException(expected + " and/or " + cause + " missing from stacktrace"); + private static void verify_stack(Throwable e, String expected, String cause) throws Exception { + ByteArrayOutputStream byteOS = new ByteArrayOutputStream(); + try (PrintStream printStream = new PrintStream(byteOS)) { + e.printStackTrace(printStream); + } + String stackTrace = byteOS.toString("ASCII"); + System.out.println(stackTrace); + if (!stackTrace.contains(expected) || + (cause != null && !stackTrace.contains(cause))) { + throw new RuntimeException(expected + " and/or " + cause + " missing from stacktrace"); + } } } + + public static void main(String[] args) throws Exception { + WhiteBox wb = WhiteBox.getWhiteBox(); + long minimumJavaStackSize = wb.getMinimumJavaStackSize(); + ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder( + "-Xss" + Long.toString(minimumJavaStackSize), "-Xint", + Launcher.class.getName()); + + OutputAnalyzer analyzer = new OutputAnalyzer(pb.start()); + analyzer.shouldHaveExitValue(0); + analyzer.shouldContain(expected); + analyzer.shouldContain(cause); + } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java 2026-04-17 19:08:13.000000000 +0000 @@ -116,7 +116,7 @@ default: throw new Error("Expected only \"int\", \"intx\", \"size_t\", " + "\"uint\", \"uintx\", \"uint64_t\", or \"double\" " - + "option types! Got " + type + " type!"); + + "option types! Got " + type + " type for option " + name + "!"); } return parameter; diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,14 +27,18 @@ * @test * @summary Test PrintVMInfoAtExit * @library /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @modules java.base/jdk.internal.misc * @requires vm.flagless * @requires vm.bits == "64" - * @run driver PrintVMInfoAtExitTest + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI PrintVMInfoAtExitTest */ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jdk.test.whitebox.WhiteBox; + public class PrintVMInfoAtExitTest { @@ -53,7 +57,14 @@ output_detail.shouldContain("-- S U M M A R Y --"); output_detail.shouldContain("Command Line: -Xmx64M -Xms64M -XX:-CreateCoredumpOnCrash -XX:+UnlockDiagnosticVMOptions -XX:+PrintVMInfoAtExit -XX:NativeMemoryTracking=summary -XX:CompressedClassSpaceSize=256m"); output_detail.shouldContain("Native Memory Tracking:"); - output_detail.shouldContain("Java Heap (reserved=65536KB, committed=65536KB)"); + WhiteBox wb = WhiteBox.getWhiteBox(); + if (wb.isAsanEnabled()) { + // the reserved value can be influenced by asan + output_detail.shouldContain("Java Heap (reserved="); + output_detail.shouldContain(", committed=65536KB)"); + } else { + output_detail.shouldContain("Java Heap (reserved=65536KB, committed=65536KB)"); + } } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,8 +72,8 @@ # # JRE version: OpenJDK Runtime Environment (9.0) (build 1.9.0-internal-debug-cheleswer_2015_10_20_14_32-b00) # Java VM: OpenJDK 64-Bit Server VM (1.9.0-internal-debug-cheleswer_2015_10_20_14_32-b00, mixed mode, tiered, compressed oops, serial gc, linux-amd64) - # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to - /home/cheleswer/Desktop/core.6212) + # Core dump will be written. Default location: Determined by the following: + "/usr/share/apport/apport %p %s %c %P" (alternatively, falling back to /home/cheleswer/Desktop/core.6212) # # An error report file with more information is saved as: # /home/cheleswer/Desktop/hs_err_pid6212.log diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/MirrorFrame/Asmator.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/MirrorFrame/Asmator.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/MirrorFrame/Asmator.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/MirrorFrame/Asmator.java 2026-04-17 19:08:13.000000000 +0000 @@ -21,35 +21,28 @@ * questions. */ -import org.objectweb.asm.*; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassTransform; +import java.lang.classfile.CodeBuilder; +import java.lang.classfile.CodeElement; +import java.lang.classfile.CodeTransform; class Asmator { - static byte[] fixup(byte[] buf) throws java.io.IOException { - ClassReader cr = new ClassReader(buf); - ClassWriter cw = new ClassWriter(0); - ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) { - public MethodVisitor visitMethod( - final int access, - final String name, - final String desc, - final String signature, - final String[] exceptions) - { - MethodVisitor mv = super.visitMethod(access, - name, - desc, - signature, - exceptions); - if (mv == null) return null; - if (name.equals("callme")) { - // make receiver go dead! - mv.visitInsn(Opcodes.ACONST_NULL); - mv.visitVarInsn(Opcodes.ASTORE, 0); + static byte[] fixup(byte[] buf) { + return ClassFile.of().transformClass(ClassFile.of().parse(buf), ClassTransform.transformingMethodBodies( + m -> m.methodName().equalsString("callme"), + new CodeTransform() { + @Override + public void atStart(CodeBuilder builder) { + // make receiver go dead! + builder.aconst_null().astore(0); + } + + @Override + public void accept(CodeBuilder builder, CodeElement element) { + builder.with(element); // pass through + } } - return mv; - } - }; - cr.accept(cv, 0); - return cw.toByteArray(); + )); } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/MirrorFrame/Test8003720.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/MirrorFrame/Test8003720.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/MirrorFrame/Test8003720.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/MirrorFrame/Test8003720.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,7 +25,6 @@ * @test * @bug 8003720 * @summary Method in interpreter stack frame can be deallocated - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * @compile -XDignore.symbol.file Victim.java * @run main/othervm -Xverify:all -Xint Test8003720 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 +26,14 @@ * @bug 8133747 8218458 * @summary Running with NMT detail should produce expected stack traces. * @library /test/lib + * @library / * @modules java.base/jdk.internal.misc * java.management * @requires vm.debug + * @build jdk.test.whitebox.WhiteBox * @compile ../modules/CompilerUtils.java - * @run driver CheckForProperDetailStackTrace + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckForProperDetailStackTrace */ import jdk.test.lib.Platform; @@ -40,6 +43,7 @@ import java.nio.file.Paths; import java.util.regex.Matcher; import java.util.regex.Pattern; +import jdk.test.whitebox.WhiteBox; /** * We are checking for details that should be seen with NMT detail enabled. @@ -59,7 +63,10 @@ private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get(TEST_CLASSES, "mods"); - private static final boolean expectSourceInformation = Platform.isLinux() || Platform.isWindows(); + // Windows has source information only in full pdbs, not in stripped pdbs + private static boolean expectSourceInformation = Platform.isLinux() || Platform.isWindows(); + + static WhiteBox wb = WhiteBox.getWhiteBox(); /* The stack trace we look for by default. Note that :: has been replaced by .* to make sure it matches even if the symbol is not unmangled. @@ -138,6 +145,10 @@ throw new RuntimeException("Expected stack trace missing from output"); } + if (wb.hasExternalSymbolsStripped()) { + expectSourceInformation = false; + } + System.out.println("Looking for source information:"); if (expectSourceInformation) { if (!stackTraceMatches(".*moduleEntry.cpp.*", output)) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/NMT/CommandLineDetail.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/NMT/CommandLineDetail.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/NMT/CommandLineDetail.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/NMT/CommandLineDetail.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,13 +35,14 @@ public class CommandLineDetail { - public static void main(String args[]) throws Exception { - - ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( - "-XX:NativeMemoryTracking=detail", - "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldNotContain("error"); - output.shouldHaveExitValue(0); - } + public static void main(String args[]) throws Exception { + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( + "-Xlog:nmt=warning", + "-XX:NativeMemoryTracking=detail", + "-version"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldNotContain("NMT initialization failed"); + output.shouldNotContain("Could not create the Java Virtual Machine."); + output.shouldHaveExitValue(0); + } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/NMT/CommandLineSummary.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/NMT/CommandLineSummary.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/NMT/CommandLineSummary.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/NMT/CommandLineSummary.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,13 +35,14 @@ public class CommandLineSummary { - public static void main(String args[]) throws Exception { - - ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( - "-XX:NativeMemoryTracking=summary", - "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldNotContain("error"); - output.shouldHaveExitValue(0); - } + public static void main(String args[]) throws Exception { + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( + "-Xlog:nmt=warning", + "-XX:NativeMemoryTracking=summary", + "-version"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldNotContain("NMT initialization failed"); + output.shouldNotContain("Could not create the Java Virtual Machine."); + output.shouldHaveExitValue(0); + } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java 2026-04-17 19:08:13.000000000 +0000 @@ -44,9 +44,13 @@ public static native int exitRawMonitor(); public static native void destroyRawMonitor(); + // Avoid using CountDownLatch or similar objects that require unparking the + // main thread. Otherwise, if the main thread is run as a virtual thread, the + // async exception could be sent while the target is still executing FJP logic. + public volatile boolean started = false; + public volatile boolean gotMonitor = false; + private static Object o1 = new Object(); - private static boolean firstWorker = true; - private static Semaphore sem = new Semaphore(0); @Override public void run() { @@ -59,11 +63,9 @@ public void testWithJavaMonitor() { try { + started = true; synchronized (o1) { - if (firstWorker) { - firstWorker = false; - sem.release(); - } + gotMonitor = true; Thread.sleep(1000); } } catch (ThreadDeath td) { @@ -74,20 +76,16 @@ public void testWithJVMTIRawMonitor() { - boolean savedFirst = false; try { + started = true; int retCode = enterRawMonitor(); - if (retCode != 0 && firstWorker) { + if (retCode != 0) { throw new RuntimeException("error in JVMTI RawMonitorEnter: retCode=" + retCode); } - if (firstWorker) { - firstWorker = false; - savedFirst = true; - sem.release(); - } - Thread.sleep(1000); + gotMonitor = true; + Thread.sleep(500); retCode = exitRawMonitor(); - if (retCode != 0 && savedFirst) { + if (retCode != 0) { throw new RuntimeException("error in JVMTI RawMonitorExit: retCode=" + retCode); } } catch (ThreadDeath td) { @@ -133,15 +131,18 @@ AsyncExceptionOnMonitorEnter worker2 = new AsyncExceptionOnMonitorEnter(); try { - // Start firstWorker worker and wait until monitor is acquired - firstWorker = true; + // Start first worker and wait until monitor is acquired worker1.start(); - sem.acquire(); + while (!worker1.gotMonitor) { + Thread.sleep(1); + } // Start second worker and allow some time for target to block on monitorenter // before executing Thread.stop() worker2.start(); - Thread.sleep(300); + while (!worker2.started) { + Thread.sleep(10); + } while (true) { JVMTIUtils.stopThread(worker2); @@ -150,6 +151,8 @@ // not released worker2 will deadlock on enter JVMTIUtils.stopThread(worker1); } + // Give time to throw exception + Thread.sleep(10); if (!worker1.isAlive() && !worker2.isAlive()) { // Done with Thread.stop() calls since diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -49,9 +49,11 @@ private final static int DEF_TIME_MAX = 30; // default max # secs to test private final static String PROG_NAME = "AsyncExceptionTest"; - public CountDownLatch startSyncObj = new CountDownLatch(1); + // Avoid using CountDownLatch or similar objects that require unparking the + // main thread. Otherwise, if the main thread is run as a virtual thread, the + // async exception could be sent while the target is still executing FJP logic. + public volatile boolean started = false; - private boolean firstEntry = true; private boolean receivedThreadDeathinInternal1 = false; private boolean receivedThreadDeathinInternal2 = false; private volatile RuntimeException error = null; @@ -77,6 +79,7 @@ public void internalRun1() { try { + started = true; while (!receivedThreadDeathinInternal2) { internalRun2(); } @@ -87,16 +90,10 @@ public void internalRun2() { try { - Integer myLocalCount = 1; - Integer myLocalCount2 = 1; + int myLocalCount = 1; + int myLocalCount2 = 1; - if (firstEntry) { - // Tell main thread we have started. - startSyncObj.countDown(); - firstEntry = false; - } - - while(myLocalCount > 0) { + while (myLocalCount > 0) { myLocalCount2 = (myLocalCount % 3) / 2; myLocalCount -= 1; } @@ -128,7 +125,9 @@ thread.start(); try { // Wait for the worker thread to get going. - thread.startSyncObj.await(); + while (!thread.started) { + Thread.sleep(1); + } // Send async exception and wait until it is thrown JVMTIUtils.stopThread(thread); thread.join(); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/LambdaWithUseImplMethodHandle.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary CDS cannot archive lambda proxy with useImplMethodHandle * @requires vm.cds * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build pkg1.BaseWithProtectedMethod * @build pkg2.Child diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java 2026-04-17 19:08:13.000000000 +0000 @@ -50,8 +50,8 @@ String skipMsg = "Skipping Hello: Signed JAR"; String lambdaInArchive = "klasses.*=.*app.*Hello[$][$]Lambda.*hidden"; - String loadFromJar = ".class,load. Hello source: file:.*signed_hello.jar"; - String lambdaLoadFromHello = ".class.load. Hello[$][$]Lambda.*/0x.*source.*Hello"; + String loadFromJar = ".class,load\s*. Hello source: file:.*signed_hello.jar"; + String lambdaLoadFromHello = ".class.load\s*. Hello[$][$]Lambda.*/0x.*source.*Hello"; for (String mainArg : mainArgs) { output = TestCommon.dump(signedJar, TestCommon.list(mainClass), diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java 2026-04-17 19:08:13.000000000 +0000 @@ -121,34 +121,23 @@ out.shouldNotContain(errMsg); out.shouldHaveExitValue(0); - int n = 2; if (!dumpWithParallel && execWithParallel) { // We dumped with G1, so we have an archived heap. At exec time, try to load them into // a small ParallelGC heap that may be too small. - String[] sizes = { - "4m", // usually this will success load the archived heap - "2m", // usually this will fail to load the archived heap, but app can launch - // or fail with "GC triggered before VM initialization completed" - "1m" // usually this will cause VM launch to fail with "Too small maximum heap" - }; - for (String sz : sizes) { - String xmx = "-Xmx" + sz; - System.out.println("=======\n" + n + ". Exec with " + execGC + " " + xmx); - out = TestCommon.exec(helloJar, - execGC, - small1, - small2, - xmx, - coops, - "-Xlog:cds", - "Hello"); - if (out.getExitValue() == 0) { - out.shouldContain(HELLO); - out.shouldNotContain(errMsg); - } else { - out.shouldNotHaveFatalError(); - } - n++; + System.out.println("2. Exec with " + execGC); + out = TestCommon.exec(helloJar, + execGC, + small1, + small2, + "-Xmx4m", + coops, + "-Xlog:cds", + "Hello"); + if (out.getExitValue() == 0) { + out.shouldContain(HELLO); + out.shouldNotContain(errMsg); + } else { + out.shouldNotHaveFatalError(); } } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheSupportForCustomLoaders.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheSupportForCustomLoaders.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheSupportForCustomLoaders.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTCacheSupportForCustomLoaders.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @summary Test AOT cache support for array classes in custom class loaders. * @bug 8353298 8356838 * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build ReturnIntegerAsString * @build AOTCacheSupportForCustomLoaders diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/CloseSystemOut.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/CloseSystemOut.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/CloseSystemOut.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/CloseSystemOut.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test + * @summary AOT configuration should not be corrupted even if the app closes System.out in the training run + * @bug 8371944 + * @library /test/jdk/lib/testlibrary /test/lib + * @build CloseSystemOut + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar CloseSystemOutApp + * @run driver CloseSystemOut + */ + +import java.io.PrintWriter; +import jdk.test.lib.cds.CDSAppTester; +import jdk.test.lib.helpers.ClassFileInstaller; +import jdk.test.lib.process.OutputAnalyzer; + +public class CloseSystemOut { + static final String appJar = ClassFileInstaller.getJarPath("app.jar"); + static final String mainClass = "CloseSystemOutApp"; + + public static void main(String[] args) throws Exception { + Tester tester = new Tester(); + tester.run(new String[] {"AOT", "--two-step-training"} ); + } + + static class Tester extends CDSAppTester { + public Tester() { + super(mainClass); + } + + @Override + public String classpath(RunMode runMode) { + return appJar; + } + + @Override + public String[] appCommandLine(RunMode runMode) { + return new String[] {mainClass}; + } + + @Override + public void checkExecution(OutputAnalyzer out, RunMode runMode) { + if (runMode != RunMode.ASSEMBLY) { + out.shouldContain("Hello Confused World"); + } + } + } +} + +class CloseSystemOutApp { + public static void main(String args[]) { + // Naive code that ends up closing System.out/err when we + // leave the "try" block + try (var err = new PrintWriter(System.err); + var out = new PrintWriter(System.out)) { + out.println("Hello Confused World"); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/DiagnosticCommandMBeanTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/DiagnosticCommandMBeanTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/DiagnosticCommandMBeanTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/DiagnosticCommandMBeanTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2025, Microsoft, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + + +/* + * @test + * @requires vm.cds.supports.aot.class.linking + * @requires vm.cds.write.archived.java.heap + * @summary Sanity test for DiagnosticCommand MBean ability to invoke AOT.end_recording + * @library /test/jdk/lib/testlibrary /test/lib + * /test/hotspot/jtreg/runtime/cds/appcds/aotCache/test-classes + * @build DiagnosticCommandMBeanTest + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar DiagnosticCommandMBeanApp + * @run driver DiagnosticCommandMBeanTest + */ + +import java.lang.management.ManagementFactory; +import javax.management.MBeanServer; +import javax.management.ObjectName; +import javax.management.InstanceNotFoundException; +import javax.management.MBeanException; +import javax.management.ReflectionException; +import javax.management.MalformedObjectNameException; + +import jdk.test.lib.cds.CDSAppTester; +import jdk.test.lib.helpers.ClassFileInstaller; +import jdk.test.lib.process.OutputAnalyzer; + +public class DiagnosticCommandMBeanTest { + static final String appJar = ClassFileInstaller.getJarPath("app.jar"); + static final String mainClass = "DiagnosticCommandMBeanApp"; + public static void main(String[] args) throws Exception { + Tester tester = new Tester(); + tester.runAOTWorkflow(); + } + + static class Tester extends CDSAppTester { + public Tester() { + super(mainClass); + } + + @Override + public String classpath(RunMode runMode) { + return appJar; + } + + @Override + public String[] vmArgs(RunMode runMode) { + return new String[] { + "-Xlog:cds+class=trace", + "--add-modules=jdk.management" + }; + } + + @Override + public String[] appCommandLine(RunMode runMode) { + return new String[] { + mainClass, runMode.name() + }; + } + + @Override + public void checkExecution(OutputAnalyzer out, RunMode runMode) { + var name = runMode.name(); + if (runMode.isApplicationExecuted()) { + if(runMode == RunMode.TRAINING) { + out.shouldContain("Hello Leyden " + name); + out.shouldContain("AOT.end_recording invoked successfully"); + out.shouldContain("Successfully stopped recording"); + } else if (runMode == RunMode.ASSEMBLY) { + out.shouldNotContain("Hello Leyden "); + } else if (runMode == RunMode.PRODUCTION) { + out.shouldContain("Hello Leyden " + name); + out.shouldContain("AOT.end_recording invoked successfully"); + out.shouldContain("Failed to stop recording"); + } + out.shouldNotContain("Exception occurred!"); + out.shouldHaveExitValue(0); + } + } + } +} + +class DiagnosticCommandMBeanApp { + public static void main(String[] args) { + System.out.println("Hello Leyden " + args[0]); + /* + * The following code is based on: docs/api/jdk.management/com/sun/management/DiagnosticCommandMBean.html + * + * Copied from the documentation for reference: + * + * ... The DiagnosticCommandMBean is generated at runtime and is subject to modifications during the lifetime of + * the Java virtual machine. A diagnostic command is represented as an operation of the DiagnosticCommandMBean + * interface. Each diagnostic command has: + * + * - the diagnostic command name which is the name being referenced in the HotSpot Virtual Machine + * - the MBean operation name which is the name generated for the diagnostic command operation invocation. The + * MBean operation name is implementation dependent + * + * The recommended way to transform a diagnostic command name into a MBean operation name is as follows: + * + * - All characters from the first one to the first dot are set to be lower-case characters + * - Every dot or underline character is removed and the following character is set to be an upper-case character + * - All other characters are copied without modification + * + * A diagnostic command may or may not support options or arguments. All the operations return String and + * either take no parameter for operations that do not support any option or argument, or take a String[] + * parameter for operations that support at least one option or argument. Each option or argument must be stored in + * a single String. + */ + try { + MBeanServer server = ManagementFactory.getPlatformMBeanServer(); + ObjectName diagName = new ObjectName("com.sun.management:type=DiagnosticCommand"); + + // The DiagnosticCommand MBean operations expect a String array parameter for command arguments + // Even though AOT.end_recording doesn't need any arguments, you still need to pass an empty String array + // The MBean framework requires you to specify both the parameters and their types (signatures) + Object[] params = { new String[0] }; + String[] signature = { "[Ljava.lang.String;" }; + + // The JCmd AOT.end_recording is invoked using 'aotEndRecording' + String result = (String) server.invoke(diagName, "aotEndRecording", params, signature); + + // The result is the string output from the command + System.out.println("AOT.end_recording invoked successfully"); + if (result.contains("Recording ended successfully")) { + System.out.println("Successfully stopped recording"); + } else { + System.out.println("Failed to stop recording"); + } + } catch (MBeanException e) { + System.out.println("MBeanException occurred!"); + } catch (ReflectionException e) { + System.out.println("ReflectionException occurred!"); + } catch (MalformedObjectNameException e) { + System.out.println("MalformedObjectNameException occurred!"); + } catch (InstanceNotFoundException e) { + System.out.println("InstanceNotFoundException occurred!"); + } + } +} \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,8 +26,6 @@ * @test * @summary Test how various AOT optimizations handle classes that are excluded from the AOT cache. * @requires vm.cds.write.archived.java.heap - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * /test/hotspot/jtreg/runtime/cds/appcds/aotCache/test-classes * @build ExcludedClasses CustyWithLoop diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/HelloAOTCache.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/HelloAOTCache.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/HelloAOTCache.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/HelloAOTCache.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @test * @summary Sanity test for AOTCache * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build HelloAOTCache * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar HelloAOTCacheApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JNIDefineClass.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JNIDefineClass.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JNIDefineClass.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JNIDefineClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary classes defined with JNI DefineClass should be excluded from the AOT config file and AOT cache. + * @bug 8368182 + * @requires vm.cds + * @requires vm.cds.supports.aot.class.linking + * @library /test/lib + * @build JNIDefineClass + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar + * JNIDefineClassApp ExcludedDummy ExcludedDummy2 + * @run main/native JNIDefineClass + */ + +import java.io.InputStream; +import jdk.test.lib.cds.CDSAppTester; +import jdk.test.lib.helpers.ClassFileInstaller; +import jdk.test.lib.process.OutputAnalyzer; + +public class JNIDefineClass { + static final String appJar = ClassFileInstaller.getJarPath("app.jar"); + static final String mainClass = "JNIDefineClassApp"; + + public static void main(String[] args) throws Exception { + Tester tester = new Tester(); + tester.run(new String[] {"AOT", "--two-step-training"} ); + } + + static class Tester extends CDSAppTester { + public Tester() { + super(mainClass); + } + + @Override + public String classpath(RunMode runMode) { + return appJar; + } + + @Override + public String[] vmArgs(RunMode runMode) { + return new String[] { + "--enable-native-access=ALL-UNNAMED", + "-Xlog:aot,aot+class=debug", + "-Djava.library.path=" + System.getProperty("java.library.path"), + }; + } + + @Override + public String[] appCommandLine(RunMode runMode) { + return new String[] {mainClass}; + } + + @Override + public void checkExecution(OutputAnalyzer out, RunMode runMode) { + if (runMode.isApplicationExecuted()) { + out.shouldContain("@@loader = null"); + out.shouldContain("@@name = ExcludedDummy"); + + out.shouldMatch("@@loader2 = .*AppClassLoader"); + out.shouldContain("@@name2 = ExcludedDummy2"); + } + if (runMode == RunMode.TRAINING) { + out.shouldContain("Skipping ExcludedDummy: Unsupported location"); + } + + // Must not have a log like this + /// [0.378s][debug ][aot,class] klasses[ 65] = 0x0000000800160490 boot ExcludedDummy + /// [0.378s][debug ][aot,class] klasses[ 66] = 0x0000000800160490 app ExcludedDummy2 + out.shouldNotContain("aot,class.* klasses.*ExcludedDummy"); + out.shouldNotContain("aot,class.* klasses.*ExcludedDummy2"); + } + } +} + +class JNIDefineClassApp { + + static native Class<?> nativeDefineClass(String name, ClassLoader ldr, byte[] class_bytes); + + static { + System.loadLibrary("JNIDefineClassApp"); + } + + public static void main(java.lang.String[] unused) throws Exception { + ClassLoader appLoader = JNIDefineClassApp.class.getClassLoader(); + + try (InputStream in = appLoader.getResourceAsStream("ExcludedDummy.class")) { + byte[] b = in.readAllBytes(); + System.out.println(b.length); + Class<?> c = nativeDefineClass("ExcludedDummy", null, b); + System.out.println("@@loader = " + c.getClassLoader()); + System.out.println("@@name = " + c.getName()); + } + + try (InputStream in = appLoader.getResourceAsStream("ExcludedDummy2.class")) { + byte[] b = in.readAllBytes(); + System.out.println(b.length); + Class<?> c = nativeDefineClass("ExcludedDummy2", appLoader, b); + System.out.println("@@loader2 = " + c.getClassLoader()); + System.out.println("@@name2 = " + c.getName()); + } + + System.out.println("TEST PASSED"); + } +} + +// This class is loaded into the bootstrap loader using JNI DefineClass() with a null code source, +// so it should be excluded from the AOT configuration (and hence excluded from AOT cache) +class ExcludedDummy { + +} + +// This class is loaded into the app loader using JNI DefineClass() with a null code source, +// so it should be excluded from the AOT configuration (and hence excluded from AOT cache) +class ExcludedDummy2 { + +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JavaAgent.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JavaAgent.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JavaAgent.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JavaAgent.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary -javaagent should be allowed in AOT workflow. However, classes transformed/redefined by agents will not * be cached. * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build JavaAgent JavaAgentTransformer Util * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar JavaAgentApp JavaAgentApp$ShouldBeTransformed diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdAOTEndRecordingTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdAOTEndRecordingTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdAOTEndRecordingTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/JcmdAOTEndRecordingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2025, Microsoft, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test + * @requires vm.cds.supports.aot.class.linking + * @requires vm.cds.write.archived.java.heap + * @summary Sanity test for Jcmd AOT.end_recording command + * @library /test/lib + * @build JcmdAOTEndRecordingTest + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar LingeredApp.jar + * jdk/test/lib/apps/LingeredApp + * jdk/test/lib/apps/LingeredApp$1 + * jdk/test/lib/apps/LingeredApp$SteadyStateLock + * jdk/test/lib/process/OutputBuffer + * @run driver JcmdAOTEndRecordingTest + */ + +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.dcmd.PidJcmdExecutor; +import jdk.test.lib.process.OutputAnalyzer; +import java.io.IOException; + +public class JcmdAOTEndRecordingTest { + public static void main(String[] args) throws Exception { + test(false); + test(true); + } + + static void test(boolean isTraining) throws Exception { + LingeredApp theApp = null; + try { + theApp = new LingeredApp(); + theApp.setUseDefaultClasspath(false); + if (isTraining) { + LingeredApp.startApp(theApp, + "-cp", "LingeredApp.jar", + "-XX:AOTMode=record", + "-XX:AOTConfiguration=LingeredApp.aotconfig"); + } else { + LingeredApp.startApp(theApp, + "-cp", "LingeredApp.jar"); + } + long pid = theApp.getPid(); + + JDKToolLauncher jcmd = JDKToolLauncher.createUsingTestJDK("jcmd"); + jcmd.addToolArg(String.valueOf(pid)); + jcmd.addToolArg("AOT.end_recording"); + + try { + OutputAnalyzer output = ProcessTools.executeProcess(jcmd.getCommand()); + if (isTraining) { + output.shouldContain("Recording ended successfully"); + } else { + // this message is output when the VM is not recording AOT data + output.shouldContain("AOT.end_recording is unsupported"); + } + output.shouldHaveExitValue(0); + } catch (Exception e) { + throw new RuntimeException("Test failed: " + e); + } + } + catch (IOException e) { + throw new RuntimeException("Test failed: " + e); + } + finally { + LingeredApp.stopApp(theApp); + } + } +} \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ManagementAgent.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ManagementAgent.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ManagementAgent.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ManagementAgent.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @bug 8352187 * @summary ManagementAgent will not be started during AOT cache creation. * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build HelloAOTCache * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar HelloAOTCacheApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/PackageInfoClass.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/PackageInfoClass.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/PackageInfoClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/PackageInfoClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @summary AOT cache handling for package-info class loaded by jdk/internal/loader/ClassLoaders$BootClassLoader * @bug 8354558 * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/jdk/java/lang/Package/bootclasspath/boot * @build PackageInfoClass foo.Foo foo.MyAnnotation foo.package-info * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar boot.jar foo.Foo foo.package-info foo.MyAnnotation diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/SpecialCacheNames.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/SpecialCacheNames.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/SpecialCacheNames.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/SpecialCacheNames.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @summary Use special characters in the name of the cache file specified by -XX:AOTCacheOutput * Make sure these characters are passed to the child JVM process that assembles the cache. * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build SpecialCacheNames * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar MyTestApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/VerifierFailOver.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/VerifierFailOver.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/VerifierFailOver.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/VerifierFailOver.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,8 +26,6 @@ * @test * @summary Sanity test for AOTCache * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build VerifierFailOver_Helper * @build VerifierFailOver diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/libJNIDefineClassApp.c openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/libJNIDefineClassApp.c --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/libJNIDefineClassApp.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotCache/libJNIDefineClassApp.c 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 <jni.h> + +JNIEXPORT jclass JNICALL +Java_JNIDefineClassApp_nativeDefineClass(JNIEnv* env, jclass clazz /*unused*/, + jstring className, jobject classLoader, jbyteArray bytecode) { + const char* classNameChar = (*env)->GetStringUTFChars(env, className, NULL); + jbyte* arrayContent = (*env)->GetByteArrayElements(env, bytecode, NULL); + jsize bytecodeLength = (*env)->GetArrayLength(env, bytecode); + jclass returnValue = (*env)->DefineClass(env, classNameChar, classLoader, arrayContent, bytecodeLength); + (*env)->ReleaseByteArrayElements(env, bytecode, arrayContent, JNI_ABORT); + (*env)->ReleaseStringUTFChars(env, className, classNameChar); + return returnValue; +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTCacheWithZGC.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTCacheWithZGC.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTCacheWithZGC.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTCacheWithZGC.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @bug 8352775 * @requires vm.cds * @requires vm.gc.Z - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build AOTCacheWithZGC * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar AOTCacheWithZGCApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTLoaderConstraintsTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTLoaderConstraintsTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTLoaderConstraintsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTLoaderConstraintsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,8 +26,6 @@ * @test Make sure loader constraints are passed from AOT preimage to final image. * @bug 8348426 * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * @build AOTLoaderConstraintsTest BootClass * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar boot.jar BootClass diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddExports.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddExports.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddExports.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddExports.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @bug 8352437 * @requires vm.cds * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @run driver AddExports */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddOpens.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddOpens.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddOpens.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddOpens.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,8 +26,6 @@ * @test * @requires vm.cds * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @run driver AddOpens * @summary sanity test the --add-opens option diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddReads.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddReads.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddReads.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AddReads.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @bug 8354083 * @requires vm.cds * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @run driver AddReads * @summary sanity test the --add-reads option diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -29,8 +29,6 @@ /* * @test id=static * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build InitiatingLoaderTester BadOldClassA BadOldClassB * @build jdk.test.whitebox.WhiteBox BulkLoaderTest SimpleCusty @@ -45,8 +43,6 @@ /* * @test id=dynamic * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build InitiatingLoaderTester BadOldClassA BadOldClassB * @build jdk.test.whitebox.WhiteBox BulkLoaderTest SimpleCusty @@ -61,8 +57,6 @@ /* * @test id=aot * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @build jdk.test.whitebox.WhiteBox InitiatingLoaderTester BadOldClassA BadOldClassB * @build BulkLoaderTest SimpleCusty diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/FakeCodeLocation.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/FakeCodeLocation.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/FakeCodeLocation.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/FakeCodeLocation.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,8 +26,6 @@ * @test Do not cache classes that are loaded from a fake location. * @bug 8352001 * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * @build FakeCodeLocation * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar FakeCodeLocationApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/GeneratedInternedString.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/GeneratedInternedString.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/GeneratedInternedString.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/GeneratedInternedString.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @requires vm.cds.write.archived.java.heap * @requires vm.cds.supports.aot.class.linking * @requires vm.debug - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @build GeneratedInternedString * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar GeneratedInternedStringApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/LambdaInExcludedClass.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/LambdaInExcludedClass.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/LambdaInExcludedClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/LambdaInExcludedClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @bug 8349888 * @requires vm.cds.supports.aot.class.linking * @requires vm.gc.Epsilon - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * @build LambdaInExcludedClass * @run driver jdk.test.lib.helpers.ClassFileInstaller LambdaInExcludedClassApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/MethodHandleTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/MethodHandleTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/MethodHandleTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/MethodHandleTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @requires vm.cds.write.archived.java.heap * @requires vm.cds.supports.aot.class.linking * @requires vm.debug - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @build MethodHandleTest * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar mh.jar diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/NonFinalStaticWithInitVal.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/NonFinalStaticWithInitVal.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/NonFinalStaticWithInitVal.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/NonFinalStaticWithInitVal.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @summary Handling of non-final static string that has an initial value * @bug 8356125 * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build NonFinalStaticWithInitVal_Helper * @build NonFinalStaticWithInitVal diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/StringConcatStress.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/StringConcatStress.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/StringConcatStress.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/StringConcatStress.java 2026-04-17 19:08:13.000000000 +0000 @@ -34,8 +34,6 @@ /* * @test id=aot * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build StringConcatStress * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar StringConcatStressApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TestSetupAOTTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TestSetupAOTTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TestSetupAOTTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TestSetupAOTTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * is used for running HotSpot tests in the "AOT mode" * (E.g., make test JTREG=AOT_JDK=true TEST=open/test/hotspot/jtreg/runtime/invokedynamic) * @requires vm.cds - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/setup_aot * @build TestSetupAOTTest JavacBenchApp TestSetupAOT * @run driver jdk.test.lib.helpers.ClassFileInstaller diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TrainingRun.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TrainingRun.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TrainingRun.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/TrainingRun.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @summary -XX:AOTMode=record should not interfere with app execution: (1) thread creation; (2) exit code * @bug 8351327 * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib * @build TrainingRun * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar MyTestApp diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/WeakReferenceTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/WeakReferenceTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/WeakReferenceTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/WeakReferenceTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @requires vm.cds.write.archived.java.heap * @requires vm.cds.supports.aot.class.linking * @requires vm.debug - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @build WeakReferenceTest * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar weakref.jar diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/aotProfile/AOTProfileFlags.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,8 +26,6 @@ * @test * @summary Sanity test of combinations of the diagnostic flags [+-]AOTRecordTraining and [+-]AOTReplayTraining * @requires vm.cds - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @requires vm.cds.supports.aot.class.linking * @requires vm.flagless * @library /test/lib /test/setup_aot /test/hotspot/jtreg/runtime/cds/appcds/test-classes diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Test for the -XX:ArchiveHeapTestClass flag * @requires vm.debug == true & vm.cds.write.archived.java.heap * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @modules java.logging * @library /test/jdk/lib/testlibrary /test/lib * /test/hotspot/jtreg/runtime/cds/appcds diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Run the MethodHandlesAsCollectorTest.java test in CDSAppTester::AOT workflow. * @requires vm.cds & vm.compMode != "Xcomp" * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @comment Some of the tests run excessively slowly with -Xcomp. The original * tests aren't executed with -Xcomp in the CI pipeline, so let's exclude * the generated tests from -Xcomp execution as well. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Run the MethodHandlesCastFailureTest.java test in CDSAppTester::AOT workflow. * @requires vm.cds & vm.compMode != "Xcomp" * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @comment Some of the tests run excessively slowly with -Xcomp. The original * tests aren't executed with -Xcomp in the CI pipeline, so let's exclude * the generated tests from -Xcomp execution as well. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Run the MethodHandlesGeneralTest.java test in CDSAppTester::AOT workflow. * @requires vm.cds & vm.compMode != "Xcomp" * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @comment Some of the tests run excessively slowly with -Xcomp. The original * tests aren't executed with -Xcomp in the CI pipeline, so let's exclude * the generated tests from -Xcomp execution as well. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Run the MethodHandlesInvokersTest.java test in CDSAppTester::AOT workflow. * @requires vm.cds & vm.compMode != "Xcomp" * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @comment Some of the tests run excessively slowly with -Xcomp. The original * tests aren't executed with -Xcomp in the CI pipeline, so let's exclude * the generated tests from -Xcomp execution as well. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Run the MethodHandlesPermuteArgumentsTest.java test in CDSAppTester::AOT workflow. * @requires vm.cds & vm.compMode != "Xcomp" * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @comment Some of the tests run excessively slowly with -Xcomp. The original * tests aren't executed with -Xcomp in the CI pipeline, so let's exclude * the generated tests from -Xcomp execution as well. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @summary Run the MethodHandlesSpreadArgumentsTest.java test in CDSAppTester::AOT workflow. * @requires vm.cds & vm.compMode != "Xcomp" * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @comment Some of the tests run excessively slowly with -Xcomp. The original * tests aren't executed with -Xcomp in the CI pipeline, so let's exclude * the generated tests from -Xcomp execution as well. diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @bug 8340836 * @requires vm.cds * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes/ * @build AOTLinkedLambdas * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/AOTLinkedVarHandles.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,8 +28,6 @@ * @bug 8343245 * @requires vm.cds * @requires vm.cds.supports.aot.class.linking - * @comment work around JDK-8345635 - * @requires !vm.jvmci.enabled * @library /test/lib * @build AOTLinkedVarHandles * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/InternSharedString.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/InternSharedString.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/InternSharedString.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/InternSharedString.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,8 +27,6 @@ * @summary Test shared strings together with string intern operation * @requires vm.cds.write.archived.java.heap * @requires vm.gc == null - * @comment CDS archive heap mapping is not supported with large pages - * @requires vm.opt.UseLargePages == null | !vm.opt.UseLargePages * @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib * @compile InternStringTest.java * @build jdk.test.whitebox.WhiteBox diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE78_A.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE78_A.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE78_A.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE78_A.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 by SAP AG, Walldorf, Germany. + * Copyright (c) 2018, 2026 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 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE_Loader2.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE_Loader2.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE_Loader2.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/exceptionMsgs/IllegalAccessError/IAE_Loader2.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 by SAP AG, Walldorf, Germany. + * Copyright (c) 2018, 2026 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 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/Test.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/Test.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/Test.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/Test.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 SAP AG. All Rights Reserved. + * Copyright (c) 2011, 2026 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 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/TestMT.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/TestMT.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/TestMT.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/TestMT.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 SAP AG. All Rights Reserved. + * Copyright (c) 2011, 2026 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 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/libtest-rw.c openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/libtest-rw.c --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/libtest-rw.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/libtest-rw.c 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 SAP AG. All Rights Reserved. + * Copyright (c) 2011, 2026 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 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/libtest-rwx.c openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/libtest-rwx.c --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/execstack/libtest-rwx.c 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/execstack/libtest-rwx.c 2026-04-17 19:08:13.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 SAP AG. All Rights Reserved. + * Copyright (c) 2011, 2026 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 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +36,7 @@ * @library /testlibrary /test/lib * @build HandshakeTimeoutTest * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run driver HandshakeTimeoutTest + * @run driver/timeout=480 HandshakeTimeoutTest */ public class HandshakeTimeoutTest { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,6 +25,7 @@ * @bug 8328877 * @summary Test warning for GetStringUTFLength and functionality of GetStringUTFLengthAsLong * @requires vm.bits == 64 + * @requires os.maxMemory > 15g * @library /test/lib * @modules java.management * @run main/native TestLargeUTF8Length launch diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/logging/StressAsyncUL.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/logging/StressAsyncUL.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/logging/StressAsyncUL.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/logging/StressAsyncUL.java 2026-04-17 19:08:13.000000000 +0000 @@ -45,12 +45,12 @@ } } public static void main(String[] args) throws Exception { - analyze_output(false, "-Xlog:async:drop", "-Xlog:all=trace", InnerClass.class.getName()); - analyze_output(true, "-Xlog:async:stall", "-Xlog:all=trace", InnerClass.class.getName()); + analyze_output(false, "-Xlog:async:drop", "-Xlog:all=debug", InnerClass.class.getName()); + analyze_output(true, "-Xlog:async:stall", "-Xlog:all=debug", InnerClass.class.getName()); // Stress test with a very small buffer. Note: Any valid buffer size must be able to hold a flush token. // Therefore the size of the buffer cannot be zero. - analyze_output(false, "-Xlog:async:drop", "-Xlog:all=trace", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); - analyze_output(true, "-Xlog:async:stall", "-Xlog:all=trace", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); + analyze_output(false, "-Xlog:async:drop", "-Xlog:all=debug", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); + analyze_output(true, "-Xlog:async:stall", "-Xlog:all=debug", "-XX:AsyncLogBufferSize=192", InnerClass.class.getName()); } public static class InnerClass { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java 2026-04-17 19:08:13.000000000 +0000 @@ -39,7 +39,6 @@ */ import java.lang.invoke.MethodHandles; -import java.time.Duration; import java.lang.classfile.ClassFile; import java.lang.classfile.ClassTransform; import java.lang.classfile.MethodTransform; @@ -61,7 +60,7 @@ public class TestVerify { - private static final String CLASS_TO_BREAK = "java.time.Duration"; + private static final String CLASS_TO_BREAK = "java.util.Date"; private static final String INTERNAL_CLASS_TO_BREAK = CLASS_TO_BREAK.replace('.', '/'); private static final boolean DEBUG = false; @@ -91,7 +90,7 @@ } builder.with(element); }); - var classTransform = ClassTransform.transformingMethods(mm -> mm.methodName().stringValue().equals("getSeconds"), methodTransform); + var classTransform = ClassTransform.transformingMethods(mm -> mm.methodName().equalsString("parse"), methodTransform); byte[] bytes; try { @@ -164,7 +163,7 @@ } else { // Load the class instrumented with CFLH for the VerifyError. inst.addTransformer(new BadTransformer()); - System.out.println("1 hour is " + Duration.ofHours(1).getSeconds() + " seconds"); + Class<?> cls = Class.forName(CLASS_TO_BREAK); } throw new RuntimeException("Failed: Did not throw VerifyError"); } catch (VerifyError e) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/EarlyDynamicLoad.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/EarlyDynamicLoad.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/EarlyDynamicLoad.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/EarlyDynamicLoad.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.tools.attach.VirtualMachine; +import com.sun.tools.attach.AgentLoadException; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.AfterAll; + +import java.io.File; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.concurrent.TimeUnit; +import jdk.test.lib.dcmd.PidJcmdExecutor; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.Utils; + +/* + * @test EarlyDynamicLoad + * @summary Test that dynamic attach fails gracefully when the JVM is not in live phase. + * @requires vm.jvmti + * @library /test/lib + * @run junit EarlyDynamicLoad + */ +public class EarlyDynamicLoad { + private static final String EXPECTED_MESSAGE = "Dynamic agent loading is only permitted in the live phase"; + + private static Process child; + + @BeforeAll + static void startAndWaitChild() throws Exception { + child = ProcessTools.createTestJavaProcessBuilder( + "-XX:+StartAttachListener", + "-agentpath:" + Utils.TEST_NATIVE_PATH + File.separator + System.mapLibraryName("EarlyDynamicLoad"), + "--version").start(); + + // Wait until the process enters VMStartCallback + try (InputStream is = child.getInputStream()) { + is.read(); + } + } + + @AfterAll + static void stopChild() throws Exception { + try (OutputStream os = child.getOutputStream()) { + os.write(0); + } + + if (!child.waitFor(5, TimeUnit.SECONDS)) { + child.destroyForcibly(); + throw new AssertionError("Timed out while waiting child process to complete"); + } + + OutputAnalyzer analyzer = new OutputAnalyzer(child); + analyzer.shouldHaveExitValue(0); + } + + @Test + public void virtualMachine() throws Exception { + try { + VirtualMachine vm = VirtualMachine.attach(String.valueOf(child.pid())); + vm.loadAgent("some.jar"); + vm.detach(); + throw new AssertionError("Should have failed with AgentLoadException"); + } catch(AgentLoadException exception) { + if (!exception.getMessage().contains(EXPECTED_MESSAGE)) { + throw new AssertionError("Unexpected error message", exception); + } + } + } + + @Test + public void jcmd() throws Exception { + PidJcmdExecutor executor = new PidJcmdExecutor(String.valueOf(child.pid())); + OutputAnalyzer out = executor.execute("JVMTI.agent_load some.jar"); + + out.shouldHaveExitValue(0); + out.stdoutShouldContain(EXPECTED_MESSAGE); + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/libEarlyDynamicLoad.cpp openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/libEarlyDynamicLoad.cpp --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/libEarlyDynamicLoad.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/libEarlyDynamicLoad.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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 <jvmti.h> +#include <cstdio> +#include <cstring> + +extern "C" { + +static void JNICALL VMStartCallback(jvmtiEnv* jvmti, JNIEnv* env) { + putchar('1'); + fflush(stdout); + getchar(); +} + +JNIEXPORT int Agent_OnLoad(JavaVM* vm, char* options, void* reserved) { + jvmtiEnv* jvmti; + if (vm->GetEnv((void**) &jvmti, JVMTI_VERSION_1_0) != JVMTI_ERROR_NONE) { + fprintf(stderr, "JVMTI error occurred during GetEnv\n"); + return JNI_ERR; + } + + jvmtiEventCallbacks callbacks; + memset(&callbacks, 0, sizeof(callbacks)); + callbacks.VMStart = VMStartCallback; + + if (jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)) != JVMTI_ERROR_NONE) { + fprintf(stderr, "JVMTI error occurred during SetEventCallbacks\n"); + return JNI_ERR; + } + if (jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_START, nullptr) != JVMTI_ERROR_NONE) { + fprintf(stderr, "JVMTI error occurred during SetEventNotificationMode\n"); + return JNI_ERR; + } + + return JNI_OK; +} + +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/attach/RemovingUnixDomainSocketTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/attach/RemovingUnixDomainSocketTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/attach/RemovingUnixDomainSocketTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/attach/RemovingUnixDomainSocketTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ "jcmd exitValue = " + out.getExitValue()); out.shouldHaveExitValue(0); - out.stderrShouldBeEmptyIgnoreDeprecatedWarnings(); + out.stderrShouldBeEmptyIgnoreVMWarnings(); } public static void main(String... args) throws Exception { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/ClassVersionAfterRedefine.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/ClassVersionAfterRedefine.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/ClassVersionAfterRedefine.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/ClassVersionAfterRedefine.java 2026-04-17 19:08:13.000000000 +0000 @@ -32,68 +32,27 @@ * @run main/othervm -javaagent:redefineagent.jar ClassVersionAfterRedefine */ -import java.io.InputStream; import java.lang.reflect.Method; import static jdk.test.lib.Asserts.assertTrue; public class ClassVersionAfterRedefine extends ClassLoader { - private static String myName = ClassVersionAfterRedefine.class.getName(); - - private static byte[] getBytecodes(String name) throws Exception { - InputStream is = ClassVersionAfterRedefine.class.getResourceAsStream(name + ".class"); - byte[] buf = is.readAllBytes(); - System.out.println("sizeof(" + name + ".class) == " + buf.length); - return buf; - } - - private static int getStringIndex(String needle, byte[] buf) { - return getStringIndex(needle, buf, 0); - } - - private static int getStringIndex(String needle, byte[] buf, int offset) { - outer: - for (int i = offset; i < buf.length - offset - needle.length(); i++) { - for (int j = 0; j < needle.length(); j++) { - if (buf[i + j] != (byte)needle.charAt(j)) continue outer; - } - return i; - } - return 0; - } - - private static void replaceString(byte[] buf, String name, int index) { - for (int i = index; i < index + name.length(); i++) { - buf[i] = (byte)name.charAt(i - index); - } - } - - private static void replaceAllStrings(byte[] buf, String oldString, String newString) throws Exception { - assertTrue(oldString.length() == newString.length(), "must have same length"); - int index = -1; - while ((index = getStringIndex(oldString, buf, index + 1)) != 0) { - replaceString(buf, newString, index); - } - } - public static void main(String[] s) throws Exception { - byte[] buf = getBytecodes("TestClassOld"); - // Poor man's renaming of class "TestClassOld" to "TestClassXXX" - replaceAllStrings(buf, "TestClassOld", "TestClassXXX"); ClassVersionAfterRedefine cvar = new ClassVersionAfterRedefine(); + + byte[] buf = RedefineClassHelper.replaceClassName(cvar, "TestClassOld", "TestClassXXX"); Class<?> old = cvar.defineClass(null, buf, 0, buf.length); Method foo = old.getMethod("foo"); Object result = foo.invoke(null); assertTrue("java-lang-String".equals(result)); System.out.println(old.getSimpleName() + ".foo() = " + result); - buf = getBytecodes("TestClassNew"); // Rename class "TestClassNew" to "TestClassXXX" so we can use it for // redefining the original version of "TestClassXXX" (i.e. "TestClassOld"). - replaceAllStrings(buf, "TestClassNew", "TestClassXXX"); - // Now redine the original version of "TestClassXXX" (i.e. "TestClassOld"). + buf = RedefineClassHelper.replaceClassName(cvar, "TestClassNew", "TestClassXXX"); + // Now redefine the original version of "TestClassXXX" (i.e. "TestClassOld"). RedefineClassHelper.redefineClass(old, buf); result = foo.invoke(null); assertTrue("java.lang.String".equals(result)); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/MissedStackMapFrames/MissedStackMapFrames.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/MissedStackMapFrames/MissedStackMapFrames.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/MissedStackMapFrames/MissedStackMapFrames.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/MissedStackMapFrames/MissedStackMapFrames.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,17 +27,15 @@ * @bug 8228604 * * @requires vm.jvmti - * @library /testlibrary/asm * @library /test/lib * * @run main/othervm/native -agentlib:MissedStackMapFrames MissedStackMapFrames */ -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; - +import java.lang.classfile.Attributes; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassModel; +import java.lang.classfile.MethodModel; public class MissedStackMapFrames { static { @@ -58,30 +56,19 @@ private static native byte[] retransformBytes(int idx); private static int getStackMapFrameCount(byte[] classfileBuffer) { - ClassReader reader = new ClassReader(classfileBuffer); - final int[] frameCount = {0}; - ClassVisitor cv = new ClassVisitor(Opcodes.ASM9) { - @Override - public MethodVisitor visitMethod(int access, String name, - String descriptor, String signature, - String[] exceptions) { - return new MethodVisitor(Opcodes.ASM9) { - private int methodFrames = 0; - @Override - public void visitFrame(int type, int numLocal, Object[] local, - int numStack, Object[] stack) { - methodFrames++; - } - @Override - public void visitEnd() { - log(" method " + name + " - " + methodFrames + " frames"); - frameCount[0] += methodFrames; - } - }; + ClassModel clazz = ClassFile.of().parse(classfileBuffer); + int count = 0; + for (MethodModel method : clazz.methods()) { + var foundStackMapTable = method.code().flatMap(code -> code.findAttribute(Attributes.stackMapTable())); + if (foundStackMapTable.isPresent()) { + int methodFrames = foundStackMapTable.get().entries().size(); + log(" method " + method.methodName() + " - " + methodFrames + " frames"); + count += methodFrames; + } else { + log(" method " + method.methodName() + " - No StackMapTable"); } - }; - reader.accept(cv, 0); - return frameCount[0]; + } + return count; } private static int checkStackMapFrames(String mode, byte[] classfileBuffer) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineAnnotations.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineAnnotations.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -24,7 +24,6 @@ /* * @test * @library /test/lib - * @library /testlibrary/asm * @summary Test that type annotations are retained after a retransform * @requires vm.jvmti * @modules java.base/jdk.internal.misc @@ -46,6 +45,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import java.lang.classfile.ClassBuilder; +import java.lang.classfile.ClassElement; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassTransform; +import java.lang.classfile.FieldModel; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; import java.lang.instrument.Instrumentation; @@ -55,17 +59,10 @@ import java.lang.reflect.AnnotatedType; import java.lang.reflect.AnnotatedWildcardType; import java.lang.reflect.Executable; -import java.lang.reflect.TypeVariable; import java.security.ProtectionDomain; -import java.util.Arrays; -import java.util.LinkedList; +import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.FieldVisitor; -import static org.objectweb.asm.Opcodes.ASM7; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE_USE) @@ -86,53 +83,27 @@ ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { - ClassWriter cw = new ClassWriter(0); - ClassVisitor cv = new ReAddDummyFieldsClassVisitor(ASM7, cw) { }; - ClassReader cr = new ClassReader(classfileBuffer); - cr.accept(cv, 0); - return cw.toByteArray(); - } - - public class ReAddDummyFieldsClassVisitor extends ClassVisitor { - - LinkedList<F> fields = new LinkedList<>(); - - public ReAddDummyFieldsClassVisitor(int api, ClassVisitor cv) { - super(api, cv); - } - - @Override public FieldVisitor visitField(int access, String name, - String desc, String signature, Object value) { - if (name.startsWith("dummy")) { - // Remove dummy field - fields.addLast(new F(access, name, desc, signature, value)); - return null; - } - return cv.visitField(access, name, desc, signature, value); - } - - @Override public void visitEnd() { - F f; - while ((f = fields.pollFirst()) != null) { - // Re-add dummy fields - cv.visitField(f.access, f.name, f.desc, f.signature, f.value); + // Shuffle constant pool + ClassFile context = ClassFile.of(ClassFile.ConstantPoolSharingOption.NEW_POOL); + return context.transformClass(context.parse(classfileBuffer), new ClassTransform() { + final List<FieldModel> dummyFields = new ArrayList<>(); + + @Override + public void accept(ClassBuilder builder, ClassElement element) { + if (element instanceof FieldModel field && field.fieldName().stringValue().startsWith("dummy")) { + // Hold on to the associated constant pool entries too + dummyFields.addLast(field); + } else { + builder.with(element); + } } - } - private class F { - private int access; - private String name; - private String desc; - private String signature; - private Object value; - F(int access, String name, String desc, String signature, Object value) { - this.access = access; - this.name = name; - this.desc = desc; - this.signature = signature; - this.value = value; + @Override + public void atEnd(ClassBuilder builder) { + // Add the associated constant pool entries to the end of the CP + dummyFields.forEach(builder); } - } + }); } @Override public byte[] transform(ClassLoader loader, String className, diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineGenericSignatureTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineGenericSignatureTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineGenericSignatureTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineGenericSignatureTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -35,6 +35,11 @@ import java.io.File; import java.io.FileOutputStream; +import java.lang.classfile.ClassBuilder; +import java.lang.classfile.ClassElement; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassTransform; +import java.lang.classfile.attribute.SourceFileAttribute; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; @@ -141,27 +146,28 @@ private byte[] getNewClassBytes() { byte[] bytecode = InMemoryJavaCompiler.compile(GenericSignatureTarget.class.getName(), newTargetClassSource); - ClassWriter cw = new ClassWriter(0); - ClassReader cr = new ClassReader(bytecode); - cr.accept(new ClassVisitor(Opcodes.ASM7, cw) { + ClassFile context = ClassFile.of(); + return context.transformClass(context.parse(bytecode), new ClassTransform() { private boolean sourceSet = false; @Override - public void visitSource(String source, String debug) { - sourceSet = true; - log("Changing source: \"" + source + "\" -> \"" + sourceFileNameNew + "\""); - super.visitSource(sourceFileNameNew, debug); + public void accept(ClassBuilder builder, ClassElement element) { + if (element instanceof SourceFileAttribute src) { + sourceSet = true; + log("Changing source: \"" + src.sourceFile() + "\" -> \"" + sourceFileNameNew + "\""); + builder.with(SourceFileAttribute.of(sourceFileNameNew)); + } else { + builder.with(element); + } } @Override - public void visitEnd() { + public void atEnd(ClassBuilder builder) { if (!sourceSet) { log("Set source: \"" + sourceFileNameNew + "\""); - super.visitSource(sourceFileNameNew, null); + builder.with(SourceFileAttribute.of(sourceFileNameNew)); } - super.visitEnd(); } - }, 0); - return cw.toByteArray(); + }); } private void runTest() throws Throwable { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineObject.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineObject.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineObject.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineObject.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,7 +27,6 @@ * @summary Ensure Object natives stay registered after redefinition * @requires vm.jvmti * @library /test/lib - * @library /testlibrary/asm * @modules java.base/jdk.internal.misc * java.compiler * java.instrument @@ -41,19 +40,15 @@ import java.io.FileNotFoundException; import java.io.PrintWriter; import java.lang.RuntimeException; +import java.lang.classfile.ClassBuilder; +import java.lang.classfile.ClassElement; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassFileVersion; import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; import java.lang.instrument.Instrumentation; import java.lang.instrument.UnmodifiableClassException; import java.security.ProtectionDomain; -import java.util.Arrays; - -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; - -import static org.objectweb.asm.Opcodes.ASM6; -import static org.objectweb.asm.Opcodes.V1_8; public class RedefineObject { @@ -69,31 +64,14 @@ Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { - ClassWriter cw = new ClassWriter(0); - // Force an older ASM to force a bytecode update - ClassVisitor cv = new DummyClassVisitor(ASM6, cw) { }; - ClassReader cr = new ClassReader(classfileBuffer); - cr.accept(cv, 0); - byte[] bytes = cw.toByteArray(); - return bytes; - } - - public class DummyClassVisitor extends ClassVisitor { - - public DummyClassVisitor(int api, ClassVisitor cv) { - super(api, cv); - } - - public void visit( - final int version, - final int access, - final String name, - final String signature, - final String superName, - final String[] interfaces) { - // Artificially lower to JDK 8 version to force a redefine - cv.visit(V1_8, access, name, signature, superName, interfaces); - } + return ClassFile.of().transformClass(ClassFile.of().parse(classfileBuffer), (classBuilder, classElement) -> { + if (classElement instanceof ClassFileVersion cfv) { + // Force a redefine with different class file versions + classBuilder.with(ClassFileVersion.of(cfv.majorVersion() - 1, 0)); + } else { + classBuilder.with(classElement); + } + }); } @Override public byte[] transform(ClassLoader loader, String className, diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/RedefineRetransform.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/RedefineRetransform.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/RedefineRetransform.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/RedefineRetransform.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,7 +27,6 @@ * @bug 7124710 * * @requires vm.jvmti - * @library /testlibrary/asm * @library /test/lib * * @comment main/othervm/native -Xlog:redefine*=trace -agentlib:RedefineRetransform RedefineRetransform @@ -42,13 +41,17 @@ import java.io.IOException; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; - -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.Type; +import java.lang.classfile.Annotation; +import java.lang.classfile.AnnotationElement; +import java.lang.classfile.AnnotationValue; +import java.lang.classfile.Attributes; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassModel; +import java.lang.classfile.ClassTransform; +import java.lang.classfile.attribute.RuntimeVisibleAnnotationsAttribute; +import java.lang.constant.ClassDesc; +import java.util.List; +import java.util.NoSuchElementException; /* * The test verifies that after interleaved RedefineClasses/RetransformClasses calls @@ -81,67 +84,32 @@ // Class bytes for initial TestClass (ClassVersion == 0). private static byte[] initialClassBytes; - private static class VersionScanner extends ClassVisitor { - private Integer detectedVersion; - private Integer versionToSet; - // to get version - public VersionScanner() { - super(Opcodes.ASM7); - } - // to set version - public VersionScanner(int verToSet, ClassVisitor classVisitor) { - super(Opcodes.ASM7, classVisitor); - versionToSet = verToSet; - } - - public int detectedVersion() { - if (detectedVersion == null) { - throw new RuntimeException("Version not detected"); - } - return detectedVersion; - } - - @Override - public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { - //log("visitAnnotation: descr = '" + descriptor + "', visible = " + visible); - if (Type.getDescriptor(ClassVersion.class).equals(descriptor)) { - return new AnnotationVisitor(Opcodes.ASM7, super.visitAnnotation(descriptor, visible)) { - @Override - public void visit(String name, Object value) { - //log("visit: name = '" + name + "', value = " + value - // + " (" + (value == null ? "N/A" : value.getClass()) + ")"); - if ("value".equals(name) && value instanceof Integer intValue) { - detectedVersion = intValue; - if (versionToSet != null) { - //log("replace with " + versionToSet); - value = versionToSet; - } - } - super.visit(name, value); - } - }; - } - return super.visitAnnotation(descriptor, visible); - } - } + private static final ClassDesc CD_ClassVersion = ClassVersion.class.describeConstable().orElseThrow(); // Generates TestClass class bytes with the specified ClassVersion value. private static byte[] getClassBytes(int ver) { if (ver < 0) { return null; } - ClassWriter cw = new ClassWriter(0); - ClassReader cr = new ClassReader(initialClassBytes); - cr.accept(new VersionScanner(ver, cw), 0); - return cw.toByteArray(); + return ClassFile.of().transformClass(ClassFile.of().parse(initialClassBytes), + // overwrites previously passed RVAA + ClassTransform.endHandler(classBuilder -> classBuilder.with(RuntimeVisibleAnnotationsAttribute + .of(Annotation.of(CD_ClassVersion, AnnotationElement.ofInt("value", ver)))))); } // Extracts ClassVersion values from the provided class bytes. private static int getClassBytesVersion(byte[] classBytes) { - ClassReader cr = new ClassReader(classBytes); - VersionScanner scanner = new VersionScanner(); - cr.accept(scanner, 0); - return scanner.detectedVersion(); + ClassModel classModel = ClassFile.of().parse(classBytes); + RuntimeVisibleAnnotationsAttribute rvaa = classModel.findAttribute(Attributes.runtimeVisibleAnnotations()).orElseThrow(); + List<AnnotationElement> classVersionElementValuePairs = rvaa.annotations().stream() + .filter(anno -> anno.className().isFieldType(CD_ClassVersion)) + .findFirst().orElseThrow().elements(); + if (classVersionElementValuePairs.size() != 1) + throw new NoSuchElementException(); + AnnotationElement elementValuePair = classVersionElementValuePairs.getFirst(); + if (!elementValuePair.name().equalsString("value") || !(elementValuePair.value() instanceof AnnotationValue.OfInt intVal)) + throw new NoSuchElementException(); + return intVal.intValue(); } static void init() { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/ClhsdbJstackXcompStress.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/ClhsdbJstackXcompStress.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/ClhsdbJstackXcompStress.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/ClhsdbJstackXcompStress.java 2026-04-17 19:08:13.000000000 +0000 @@ -75,7 +75,7 @@ System.err.println(out.getStderr()); } - out.stderrShouldBeEmptyIgnoreDeprecatedWarnings(); + out.stderrShouldBeEmptyIgnoreVMWarnings(); out.stdoutShouldNotContain("Error occurred during stack walking:"); out.stdoutShouldContain(LingeredAppWithRecComputation.THREAD_NAME); List<String> stdoutList = Arrays.asList(out.getStdout().split("\\R")); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ out.shouldNotContain(" prio=0 "); out.shouldNotContain(" java.lang.Thread.State: UNKNOWN"); - out.stderrShouldBeEmptyIgnoreDeprecatedWarnings(); + out.stderrShouldBeEmptyIgnoreVMWarnings(); System.out.println("Test Completed"); } catch (Exception ex) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/LingeredAppWithVirtualThread.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/LingeredAppWithVirtualThread.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/LingeredAppWithVirtualThread.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/LingeredAppWithVirtualThread.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,87 @@ + +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, NTT DATA + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.invoke.MethodHandle; +import java.lang.foreign.Arena; +import java.lang.foreign.FunctionDescriptor; +import java.lang.foreign.Linker; +import java.lang.foreign.MemorySegment; +import java.lang.foreign.SymbolLookup; +import java.lang.foreign.ValueLayout; +import java.util.concurrent.CountDownLatch; + +import jdk.test.lib.apps.LingeredApp; + +public class LingeredAppWithVirtualThread extends LingeredApp implements Runnable { + + private static final String THREAD_NAME = "target thread"; + + private static final MethodHandle hndSleep; + + private static final int sleepArg; + + private static final CountDownLatch signal = new CountDownLatch(1); + + static { + MemorySegment func; + if (System.getProperty("os.name").startsWith("Windows")) { + func = SymbolLookup.libraryLookup("Kernel32", Arena.global()) + .findOrThrow("Sleep"); + sleepArg = 3600_000; // 1h in milliseconds + } else { + func = Linker.nativeLinker() + .defaultLookup() + .findOrThrow("sleep"); + sleepArg = 3600; // 1h in seconds + } + + var desc = FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_INT); + hndSleep = Linker.nativeLinker().downcallHandle(func, desc); + } + + @Override + public void run() { + Thread.yield(); + signal.countDown(); + try { + hndSleep.invoke(sleepArg); + } catch (Throwable t) { + throw new RuntimeException(t); + } + } + + public static void main(String[] args) { + try { + Thread.ofVirtual() + .name(THREAD_NAME) + .start(new LingeredAppWithVirtualThread()); + + signal.await(); + LingeredApp.main(args); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLock.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ out.shouldMatch("^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for int\\)$"); out.shouldMatch("^\\s+- waiting on (<0x[0-9a-f]+> \\(a java\\.lang\\.Object\\)|<no object reference available>)$"); - out.stderrShouldBeEmptyIgnoreDeprecatedWarnings(); + out.stderrShouldBeEmptyIgnoreVMWarnings(); System.out.println("Test Completed"); } finally { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackWithVirtualThread.java openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackWithVirtualThread.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackWithVirtualThread.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackWithVirtualThread.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, NTT DATA + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.SA.SATestUtils; +import jdk.test.lib.Utils; +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.process.OutputAnalyzer; + +/** + * @test + * @bug 8369505 + * @requires vm.hasSA + * @library /test/lib + * @run driver TestJhsdbJstackWithVirtualThread + */ +public class TestJhsdbJstackWithVirtualThread { + + private static void runJstack(LingeredApp app) throws Exception { + JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb"); + launcher.addVMArgs(Utils.getFilteredTestJavaOpts("-showversion")); + launcher.addToolArg("jstack"); + launcher.addToolArg("--pid"); + launcher.addToolArg(Long.toString(app.getPid())); + + ProcessBuilder pb = SATestUtils.createProcessBuilder(launcher); + Process jhsdb = pb.start(); + OutputAnalyzer out = new OutputAnalyzer(jhsdb); + + jhsdb.waitFor(); + + System.out.println(out.getStdout()); + System.err.println(out.getStderr()); + + out.stderrShouldBeEmptyIgnoreVMWarnings(); + out.shouldNotContain("must have non-zero frame size"); + } + + public static void main(String... args) throws Exception { + SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work. + LingeredApp app = null; + + try { + app = new LingeredAppWithVirtualThread(); + LingeredApp.startApp(app); + System.out.println("Started LingeredApp with pid " + app.getPid()); + runJstack(app); + System.out.println("Test Completed"); + } catch (Throwable e) { + e.printStackTrace(); + throw e; + } finally { + LingeredApp.stopApp(app); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/generators/tests/TestGenerators.java openjdk-25-25.0.3+9/test/hotspot/jtreg/testlibrary_tests/generators/tests/TestGenerators.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/generators/tests/TestGenerators.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/testlibrary_tests/generators/tests/TestGenerators.java 2026-04-17 19:08:13.000000000 +0000 @@ -391,13 +391,13 @@ Asserts.assertThrows(EmptyGeneratorException.class, () -> G.uniformDoubles(1, 0)); Asserts.assertNotNull(G.uniformDoubles(0, 1)); - Asserts.assertNotNull(G.uniformDoubles(0, 0)); + Asserts.assertThrows(EmptyGeneratorException.class, () -> G.uniformDoubles(0, 0)); Asserts.assertThrows(EmptyGeneratorException.class, () -> G.uniformDoubles(0, 1).restricted(1.1d, 2.4d)); Asserts.assertNotNull(G.uniformDoubles(0, 1).restricted(0.9d, 2.4d)); Asserts.assertThrows(EmptyGeneratorException.class, () -> G.uniformFloats(1, 0)); Asserts.assertNotNull(G.uniformFloats(0, 1)); - Asserts.assertNotNull(G.uniformFloats(0, 0)); + Asserts.assertThrows(EmptyGeneratorException.class, () -> G.uniformFloats(0, 0)); Asserts.assertThrows(EmptyGeneratorException.class, () -> G.uniformFloats(0, 1).restricted(1.1f, 2.4f)); Asserts.assertNotNull(G.uniformFloats(0, 1).restricted(0.9f, 2.4f)); @@ -592,8 +592,13 @@ var floatBoundGen = G.uniformFloats(); for (int j = 0; j < 500; j++) { - float a = floatBoundGen.next(), b = floatBoundGen.next(); - float lo = Math.min(a, b), hi = Math.max(a, b); + float lo = 1, hi = 0; + // Failure of a single round is very rare, repeated failure even rarer. + while (lo >= hi) { + float a = floatBoundGen.next(), b = floatBoundGen.next(); + lo = Math.min(a, b); + hi = Math.max(a, b); + } var gb = G.uniformFloats(lo, hi); for (int i = 0; i < 10_000; i++) { float x = gb.next(); @@ -604,8 +609,13 @@ var doubleBoundGen = G.uniformDoubles(); for (int j = 0; j < 500; j++) { - double a = doubleBoundGen.next(), b = doubleBoundGen.next(); - double lo = Math.min(a, b), hi = Math.max(a, b); + double lo = 1, hi = 0; + // Failure of a single round is very rare, repeated failure even rarer. + while (lo >= hi) { + double a = doubleBoundGen.next(), b = doubleBoundGen.next(); + lo = Math.min(a, b); + hi = Math.max(a, b); + } var gb = G.uniformDoubles(lo, hi); for (int i = 0; i < 10_000; i++) { double x = gb.next(); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java openjdk-25-25.0.3+9/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java 2026-04-17 19:08:13.000000000 +0000 @@ -60,6 +60,7 @@ public static void main(String[] args) { run(Basics.class); run(NoCompilationOutput.class); + run(LoadStore.class); } private static void run(Class<?> testClass) { @@ -549,3 +550,239 @@ .thenComparing(Failure::constraintId)).collect(Collectors.toList()); } } + +// Test load and store regexes +class LoadStore { + int i; + float f; + interface I1 {} + static class Base implements I1 { + int i; + } + interface I2 {} + static class Derived extends Base implements I2 { + long l; + } + Base base = new Base(); + Derived derived = new Derived(); + + static class SingleNest { + static class DoubleNest { + int i; + } + } + + SingleNest.DoubleNest doubleNest = new SingleNest.DoubleNest(); + + + @Test + @IR(failOn = {IRNode.LOAD_OF_CLASS, ".*", IRNode.STORE_OF_CLASS, ".*"}) + public void triviallyFailBoth() { + } + + @Test + @IR(counts = { + IRNode.LOAD_OF_CLASS, "LoadS[a-z]+", "1", + IRNode.LOAD_OF_CLASS, "Load.tore", "1", + IRNode.LOAD_OF_CLASS, "LoadStore", "1", + IRNode.LOAD_OF_CLASS, "/LoadStore", "1", + IRNode.LOAD_OF_CLASS, "tests/LoadStore", "1", + IRNode.LOAD_OF_CLASS, "/tests/LoadStore", "1", + IRNode.LOAD_OF_CLASS, "ir_framework/tests/LoadStore", "1", + IRNode.LOAD_OF_CLASS, "(?<=[@: ])ir_framework/tests/LoadStore", "1", // To assert it's the whole qualification + IRNode.LOAD_OF_CLASS, "(?<=[@: ])[\\w\\$/]*tests[\\w\\$/]*", "1", + }, + failOn = { + IRNode.LOAD_OF_CLASS, "oadStore", + IRNode.LOAD_OF_CLASS, "LoadStor", + IRNode.LOAD_OF_CLASS, "/ir_framework/tests/LoadStore", + IRNode.LOAD_OF_CLASS, "(?<=[@: ])[\\w\\$]*tests[\\w\\$]*", + } + ) + // @ir_framework/tests/LoadStore+12 * + public float simpleLoad() { + return f; + } + + @Test + @IR(counts = { + IRNode.STORE_OF_CLASS, "LoadS[a-z]+", "1", + IRNode.STORE_OF_CLASS, "Load.tore", "1", + IRNode.STORE_OF_CLASS, "LoadStore", "1", + IRNode.STORE_OF_CLASS, "/LoadStore", "1", + IRNode.STORE_OF_CLASS, "tests/LoadStore", "1", + IRNode.STORE_OF_CLASS, "/tests/LoadStore", "1", + IRNode.STORE_OF_CLASS, "ir_framework/tests/LoadStore", "1", + IRNode.STORE_OF_CLASS, "(?<=[@: ])ir_framework/tests/LoadStore", "1", + IRNode.STORE_OF_CLASS, "(?<=[@: ])[\\w\\$/]*tests[\\w\\$/]*", "1", + }, + failOn = { + IRNode.STORE_OF_CLASS, "oadStore", + IRNode.STORE_OF_CLASS, "LoadStor", + IRNode.STORE_OF_CLASS, "/ir_framework/tests/LoadStore", + IRNode.STORE_OF_CLASS, "(?<=[@: ])[\\w\\$]*tests[\\w\\$]*", + } + ) + // @ir_framework/tests/LoadStore+12 * + public void simpleStore() { + i = 1; + } + + @Test + @IR(counts = { + IRNode.LOAD_I_OF_CLASS, "Base", "1", + IRNode.LOAD_I_OF_CLASS, "\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "LoadS[a-z]+\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "Load.tore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "LoadStore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "/LoadStore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "tests/LoadStore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "/tests/LoadStore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "ir_framework/tests/LoadStore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "(?<=[@: ])ir_framework/tests/LoadStore\\$Base", "1", + IRNode.LOAD_I_OF_CLASS, "(?<=[@: ])[\\w\\$/]*tests[\\w\\$/]*", "1", + }, + failOn = { + IRNode.LOAD_I_OF_CLASS, "/Base", + IRNode.LOAD_I_OF_CLASS, "oadStore\\$Base", + IRNode.LOAD_I_OF_CLASS, "LoadStore\\$Bas", + IRNode.LOAD_I_OF_CLASS, "LoadStore", + IRNode.LOAD_I_OF_CLASS, "/ir_framework/tests/LoadStore\\$Base", + IRNode.LOAD_I_OF_CLASS, "(?<=[@: ])[\\w\\$]*tests[\\w\\$]*", + } + ) + // @ir_framework/tests/LoadStore$Base (ir_framework/tests/LoadStore$I1)+12 * + public int loadWithInterface() { + return base.i; + } + + @Test + @IR(counts = { + IRNode.STORE_I_OF_CLASS, "Base", "1", + IRNode.STORE_I_OF_CLASS, "\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "LoadS[a-z]+\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "Load.tore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "LoadStore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "/LoadStore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "tests/LoadStore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "/tests/LoadStore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "ir_framework/tests/LoadStore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "(?<=[@: ])ir_framework/tests/LoadStore\\$Base", "1", + IRNode.STORE_I_OF_CLASS, "(?<=[@: ])[\\w\\$/]*tests[\\w\\$/]*", "1", + }, + failOn = { + IRNode.STORE_I_OF_CLASS, "/Base", + IRNode.STORE_I_OF_CLASS, "oadStore\\$Base", + IRNode.STORE_I_OF_CLASS, "LoadStore\\$Bas", + IRNode.STORE_I_OF_CLASS, "LoadStore", + IRNode.STORE_I_OF_CLASS, "/ir_framework/tests/LoadStore\\$Base", + IRNode.STORE_I_OF_CLASS, "(?<=[@: ])[\\w\\$]*tests[\\w\\$]*", + } + ) + // @ir_framework/tests/LoadStore$Base (ir_framework/tests/LoadStore$I1)+12 * + public void storeWithInterface() { + base.i = 1; + } + + @Test + @IR(counts = { + IRNode.LOAD_L_OF_CLASS, "Derived", "1", + IRNode.LOAD_L_OF_CLASS, "\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "LoadS[a-z]+\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "Load.tore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "LoadStore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "/LoadStore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "tests/LoadStore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "/tests/LoadStore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "ir_framework/tests/LoadStore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "(?<=[@: ])ir_framework/tests/LoadStore\\$Derived", "1", + IRNode.LOAD_L_OF_CLASS, "(?<=[@: ])[\\w\\$/]*tests[\\w\\$/]*", "1", + }, + failOn = { + IRNode.LOAD_L_OF_CLASS, "/Derived", + IRNode.LOAD_L_OF_CLASS, "oadStore\\$Derived", + IRNode.LOAD_L_OF_CLASS, "LoadStore\\$Derive", + IRNode.LOAD_L_OF_CLASS, "LoadStore", + IRNode.LOAD_L_OF_CLASS, "/ir_framework/tests/LoadStore\\$Derived", + IRNode.LOAD_L_OF_CLASS, "(?<=[@: ])[\\w\\$]*tests[\\w\\$]*", + } + ) + // @ir_framework/tests/LoadStore$Derived (ir_framework/tests/LoadStore$I1,ir_framework/tests/LoadStore$I2)+24 * + public long loadWithInterfaces() { + return derived.l; + } + + @Test + @IR(counts = { + IRNode.STORE_L_OF_CLASS, "Derived", "1", + IRNode.STORE_L_OF_CLASS, "\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "LoadS[a-z]+\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "Load.tore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "LoadStore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "/LoadStore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "tests/LoadStore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "/tests/LoadStore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "ir_framework/tests/LoadStore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "(?<=[@: ])ir_framework/tests/LoadStore\\$Derived", "1", + IRNode.STORE_L_OF_CLASS, "(?<=[@: ])[\\w\\$/]*tests[\\w\\$/]*", "1", + }, + failOn = { + IRNode.STORE_L_OF_CLASS, "/Derived", + IRNode.STORE_L_OF_CLASS, "oadStore\\$Derived", + IRNode.STORE_L_OF_CLASS, "LoadStore\\$Derive", + IRNode.STORE_L_OF_CLASS, "LoadStore", + IRNode.STORE_L_OF_CLASS, "/ir_framework/tests/LoadStore\\$Derived", + IRNode.STORE_L_OF_CLASS, "(?<=[@: ])[\\w\\$]*tests[\\w\\$]*", + } + ) + // @ir_framework/tests/LoadStore$Derived (ir_framework/tests/LoadStore$I1,ir_framework/tests/LoadStore$I2)+24 * + public void storeWithInterfaces() { + derived.l = 1; + } + + @Test + @IR(counts = { + IRNode.LOAD_I_OF_CLASS, "DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "SingleNest\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "\\$SingleNest\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "/LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "tests/LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "/tests/LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.LOAD_I_OF_CLASS, "ir_framework/tests/LoadStore\\$SingleNest\\$DoubleNest", "1", + }, + failOn = { + IRNode.LOAD_I_OF_CLASS, "SingleNest", + IRNode.LOAD_I_OF_CLASS, "LoadStore", + IRNode.LOAD_I_OF_CLASS, "LoadStore\\$SingleNest", + } + ) + // @ir_framework/tests/LoadStore$SingleNest$DoubleNest+12 * + public int loadDoubleNested() { + return doubleNest.i; + } + + @Test + @IR(counts = { + IRNode.STORE_I_OF_CLASS, "DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "SingleNest\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "\\$SingleNest\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "/LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "tests/LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "/tests/LoadStore\\$SingleNest\\$DoubleNest", "1", + IRNode.STORE_I_OF_CLASS, "ir_framework/tests/LoadStore\\$SingleNest\\$DoubleNest", "1", + }, + failOn = { + IRNode.STORE_I_OF_CLASS, "SingleNest", + IRNode.STORE_I_OF_CLASS, "LoadStore", + IRNode.STORE_I_OF_CLASS, "LoadStore\\$SingleNest", + } + ) + // @ir_framework/tests/LoadStore$SingleNest$DoubleNest+12 * + public void storeDoubleNested() { + doubleNest.i = 1; + } +} \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,6 +26,9 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassTransform; +import java.lang.constant.ClassDesc; import java.nio.file.FileVisitResult; import java.nio.file.FileVisitor; import java.nio.file.Files; @@ -42,11 +45,6 @@ import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Opcodes; - /** * Class that imitates shell script to produce jar file with many similar * classes inside. @@ -259,28 +257,9 @@ * @return new class file to write into class */ byte[] morphClass(byte[] classToMorph, String newName) { - ClassReader cr = new ClassReader(classToMorph); - ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS); - ClassVisitor cv = new ClassRenamer(cw, newName); - cr.accept(cv, 0); - return cw.toByteArray(); + var context = ClassFile.of(); + return context.transformClass(context.parse(classToMorph), + ClassDesc.ofInternalName(newName), + ClassTransform.ACCEPT_ALL); } - - /** - * Visitor to rename class. - */ - static class ClassRenamer extends ClassVisitor implements Opcodes { - private final String newName; - - public ClassRenamer(ClassVisitor cv, String newName) { - super(ASM4, cv); - this.newName = newName; - } - - @Override - public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { - cv.visit(version, access, newName, signature, superName, interfaces); - } - - } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac] * * @modules java.base/jdk.internal.misc - * @library /testlibrary/asm * @library /vmTestbase * /test/lib * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac] * * @modules java.base/jdk.internal.misc - * @library /testlibrary/asm * @library /vmTestbase * /test/lib * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac] * * @modules java.base/jdk.internal.misc - * @library /testlibrary/asm * @library /vmTestbase * /test/lib * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac] * * @modules java.base/jdk.internal.misc - * @library /testlibrary/asm * @library /vmTestbase * /test/lib * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac] * * @modules java.base/jdk.internal.misc - * @library /testlibrary/asm * @library /vmTestbase * /test/lib * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,7 +30,6 @@ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac] * * @modules java.base/jdk.internal.misc - * @library /testlibrary/asm * @library /vmTestbase * /test/lib * diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ * Test scenario: * - during initialization (from function Agent_OnAttach) agent starts auxiliary thread waiting on * raw monitor and enables GarbageCollectionStart and GarbageCollectionFinish events - * - target application provokes garbage collection (calls System.gc()) + * - target application provokes garbage collection (calls WhiteBox.getWhiteBox().fullGC()) * - agent receives event GarbageCollectionStart * - agent receives event GarbageCollectionFinish event and notifies waiting auxiliary thread * - notified auxiliary thread notifies target application that agent finished its work @@ -48,11 +48,13 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach020.attach020Target + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach020.attach020Target - * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI" * -na attach020Agent00 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Target.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Target.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Target.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Target.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +22,14 @@ */ package nsk.jvmti.AttachOnDemand.attach020; -import nsk.share.ClassUnloader; import nsk.share.aod.TargetApplicationWaitingAgents; +import jdk.test.whitebox.WhiteBox; public class attach020Target extends TargetApplicationWaitingAgents { protected void targetApplicationActions() { log.display("Provoking garbage collection"); - ClassUnloader.eatMemory(); + WhiteBox.getWhiteBox().fullGC(); } public static void main(String[] args) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 +44,13 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach021.attach021Target + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach021.attach021Target - * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI" * -na attach021Agent00 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Target.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Target.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Target.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Target.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +22,8 @@ */ package nsk.jvmti.AttachOnDemand.attach021; -import nsk.share.ClassUnloader; import nsk.share.aod.TargetApplicationWaitingAgents; +import jdk.test.whitebox.WhiteBox; public class attach021Target extends TargetApplicationWaitingAgents { @@ -51,7 +51,7 @@ try { if (createTaggedObject()) { log.display("Provoking GC"); - ClassUnloader.eatMemory(); + WhiteBox.getWhiteBox().fullGC(); } } finally { shutdownAgent(); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 +47,13 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach022.attach022Target + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach022.attach022Target - * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI" * -na attach022Agent00 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Target.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Target.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Target.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Target.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +22,8 @@ */ package nsk.jvmti.AttachOnDemand.attach022; -import nsk.share.ClassUnloader; import nsk.share.aod.TargetApplicationWaitingAgents; +import jdk.test.whitebox.WhiteBox; class ClassForAllocationEventsTest { @@ -47,7 +47,7 @@ } log.display("Provoking GC"); - ClassUnloader.eatMemory(); + WhiteBox.getWhiteBox().fullGC(); } finally { if (!shutdownAgent(TEST_ALLOCATION_NUMBER)) { setStatusFailed("Error happened during agent work, see error messages for details"); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +40,11 @@ * * @library /vmTestbase * /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * -XX:-UseGCOverheadLimit + * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -agentlib:gcfinish001=-waittime=5 * nsk.jvmti.GarbageCollectionFinish.gcfinish001 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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.math.*; import nsk.share.*; +import jdk.test.whitebox.WhiteBox; /** * This test exercises the JVMTI event <code>GarbageCollectionFinish</code>. @@ -63,7 +64,7 @@ private int runThis(String argv[], PrintStream out) { try { for (int i=0; i<ITERATIONS; i++) - ClassUnloader.eatMemory(); // provoke garbage collecting + WhiteBox.getWhiteBox().fullGC(); // provoke garbage collecting } catch (OutOfMemoryError e) { // ignoring } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +40,11 @@ * * @library /vmTestbase * /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * -XX:-UseGCOverheadLimit + * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -agentlib:gcstart001=-waittime=5 * nsk.jvmti.GarbageCollectionStart.gcstart001 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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.math.*; import nsk.share.*; +import jdk.test.whitebox.WhiteBox; /** * This test exercises the JVMTI event <code>GarbageCollectionStart</code>. @@ -63,13 +64,7 @@ } private int runThis(String argv[], PrintStream out) { - try { - for (int i=0; i<ITERATIONS; i++) - ClassUnloader.eatMemory(); // provoke garbage collecting - } catch (OutOfMemoryError e) { - // ignoring - } - + WhiteBox.getWhiteBox().fullGC(); // provoke garbage collecting return Consts.TEST_PASSED; } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +40,11 @@ * * @library /vmTestbase * /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * -XX:-UseGCOverheadLimit + * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -agentlib:gcstart002=-waittime=5 * nsk.jvmti.GarbageCollectionStart.gcstart002 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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.math.*; import nsk.share.*; +import jdk.test.whitebox.WhiteBox; /** * This test exercises the JVMTI event <code>GarbageCollectionStart</code>. @@ -61,13 +62,7 @@ } private int runThis(String argv[], PrintStream out) { - try { - for (int i=0; i<ITERATIONS; i++) - ClassUnloader.eatMemory(); // provoke garbage collecting - } catch (OutOfMemoryError e) { - // ignoring - } - + WhiteBox.getWhiteBox().fullGC(); // provoke garbage collecting return Consts.TEST_PASSED; } } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,14 +25,12 @@ import java.io.PrintStream; import java.io.InputStream; +import java.lang.classfile.ClassFile; +import java.lang.classfile.ClassModel; +import java.lang.classfile.FieldModel; import java.util.List; import java.util.ArrayList; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.FieldVisitor; -import org.objectweb.asm.Opcodes; - public class getclfld007 { @@ -79,44 +77,29 @@ static void check(Class cls) throws Exception { - FieldExplorer explorer = new FieldExplorer(cls); - List<String> fields = explorer.get(); + List<String> fields = getFields(cls); check(cls, fields.toArray(new String[0])); } - // helper class to get list of the class fields - // in the order they appear in the class file - static class FieldExplorer extends ClassVisitor { - private final Class cls; - private List<String> fieldNameAndSig = new ArrayList<>(); - private FieldExplorer(Class cls) { - super(Opcodes.ASM7); - this.cls = cls; - } - - @Override - public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) { - System.out.println(" field '" + name + "', type = " + descriptor); - fieldNameAndSig.add(name); - fieldNameAndSig.add(descriptor); - return super.visitField(access, name, descriptor, signature, value); - } - - private InputStream getClassBytes() throws Exception { - String clsName = cls.getName(); - String clsPath = clsName.replace('.', '/') + ".class"; - return cls.getClassLoader().getResourceAsStream(clsPath); - } + private static InputStream getClassBytes(Class<?> cls) throws Exception { + String clsName = cls.getName(); + String clsPath = clsName.replace('.', '/') + ".class"; + return cls.getClassLoader().getResourceAsStream(clsPath); + } - // each field is represented by 2 Strings in the list: name and type descriptor - public List<String> get() throws Exception { - System.out.println("Class " + cls.getName()); - try (InputStream classBytes = getClassBytes()) { - ClassReader classReader = new ClassReader(classBytes); - classReader.accept(this, 0); + // get list of the class fields in the order they appear in the class file + // each field is represented by 2 Strings in the list: name and type descriptor + public static List<String> getFields(Class<?> cls) throws Exception { + System.out.println("Class " + cls.getName()); + List<String> fieldNameAndSig = new ArrayList<>(); + try (InputStream classBytes = getClassBytes(cls)) { + ClassModel classModel = ClassFile.of().parse(classBytes.readAllBytes()); + for (FieldModel field : classModel.fields()) { + fieldNameAndSig.add(field.fieldName().stringValue()); + fieldNameAndSig.add(field.fieldType().stringValue()); } - return fieldNameAndSig; } + return fieldNameAndSig; } static class InnerClass1 { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmonenter003 nsk.jvmti.RawMonitorEnter.rawmonenter003 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmonexit003 nsk.jvmti.RawMonitorExit.rawmonexit003 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmnntfy003 nsk.jvmti.RawMonitorNotify.rawmnntfy003 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmnntfyall003 nsk.jvmti.RawMonitorNotifyAll.rawmnntfyall003 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmnwait003 nsk.jvmti.RawMonitorWait.rawmnwait003 diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +39,12 @@ * @library /vmTestbase * /test/lib * @build nsk.jvmti.scenarios.allocation.AP12.ap12t001 + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * -agentlib:ap12t001=-waittime=5,-verbose * -XX:-UseGCOverheadLimit + * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * nsk.jvmti.scenarios.allocation.AP12.ap12t001 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +28,9 @@ import nsk.share.*; import nsk.share.jvmti.*; +import jdk.test.whitebox.WhiteBox; public class ap12t001 extends DebugeeClass { - /* number of interations to provoke garbage collecting */ - final static int GC_TRYS = 1; public static void main(String[] argv) { argv = nsk.share.jvmti.JVMTITest.commonInit(argv); @@ -70,9 +69,8 @@ log.display("References are ready for garbage collection"); status = checkStatus(status); - // Provoke OutOfMemoryError in order to clear all soft references - for (int i= 0; i < GC_TRYS; i++) - ClassUnloader.eatMemory(); + // Provoke fullgc in order to clear all soft references + WhiteBox.getWhiteBox().fullGC(); log.display("GC called"); flushObjectFreeEvents(); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -42,7 +42,7 @@ #if (defined(WIN32) || defined(_WIN32)) static const jlong EXPECTED_ACCURACY = 16; // 16ms is longest clock update interval #else -static const jlong EXPECTED_ACCURACY = 10; // high frequency clock updates expected +static const jlong EXPECTED_ACCURACY = 32; // high frequency clock updates expected #endif /* scaffold objects */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,9 +71,12 @@ * * @library /vmTestbase * /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * -agentlib:em02t002=-waittime=5 * -XX:-UseGCOverheadLimit + * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * nsk.jvmti.scenarios.events.EM02.em02t002 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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 nsk.share.*; import nsk.share.jvmti.*; +import jdk.test.whitebox.WhiteBox; public class em02t002 extends DebugeeClass { @@ -61,7 +62,7 @@ logger.display("generating events"); - ClassUnloader.eatMemory(); + WhiteBox.getWhiteBox().fullGC(); int currStatus = em02t002.checkStatus(Consts.TEST_PASSED); if (currStatus != Consts.TEST_PASSED) diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TEST.properties openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TEST.properties --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TEST.properties 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/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-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,9 +60,12 @@ * * @library /vmTestbase * /test/lib + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/native * -agentlib:em02t006=-waittime=5 * -XX:-UseGCOverheadLimit + * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * nsk.jvmti.scenarios.events.EM02.em02t006 */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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 nsk.share.*; import nsk.share.jvmti.*; +import jdk.test.whitebox.WhiteBox; public class em02t006 extends DebugeeClass { @@ -62,7 +63,7 @@ } logger.display("ObjectFree:: Provoke JVMTI_EVENT_OBJECT_FREE"); - ClassUnloader.eatMemory(); + WhiteBox.getWhiteBox().fullGC(); if (checkStatus(Consts.TEST_PASSED) == Consts.TEST_FAILED) { status = Consts.TEST_FAILED; diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -237,10 +237,6 @@ } jvmti->RawMonitorExit(syncLock); - - if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock))) - nsk_jvmti_setFailStatus(); - } /* ============================================================================= */ diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/ClassUnloader.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/share/ClassUnloader.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/ClassUnloader.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/share/ClassUnloader.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,7 @@ package nsk.share; -import java.lang.ref.Cleaner; +import java.lang.ref.PhantomReference; import java.util.*; import nsk.share.gc.gp.*; import nsk.share.test.ExecutionController; @@ -77,19 +77,9 @@ public static final String INTERNAL_CLASS_LOADER_NAME = "nsk.share.CustomClassLoader"; /** - * Whole amount of time in milliseconds to wait for class loader to be reclaimed. + * Phantom reference to the class loader. */ - private static final int WAIT_TIMEOUT = 15000; - - /** - * Sleep time in milliseconds for the loop waiting for the class loader to be reclaimed. - */ - private static final int WAIT_DELTA = 1000; - - /** - * Has class loader been reclaimed or not. - */ - volatile boolean is_reclaimed = false; + private PhantomReference<Object> customClassLoaderPhantomRef = null; /** * Current class loader used for loading classes. @@ -102,6 +92,14 @@ private Vector<Class<?>> classObjects = new Vector<Class<?>>(); /** + * Has class loader been reclaimed or not. + */ + private boolean isClassLoaderReclaimed() { + return customClassLoaderPhantomRef != null + && customClassLoaderPhantomRef.refersTo(null); + } + + /** * Class object of the first class been loaded with current class loader. * To get the rest loaded classes use <code>getLoadedClass(int)</code>. * The call <code>getLoadedClass()</code> is effectively equivalent to the call @@ -138,8 +136,7 @@ customClassLoader = new CustomClassLoader(); classObjects.removeAllElements(); - // Register a Cleaner to inform us when the class loader has been reclaimed. - Cleaner.create().register(customClassLoader, () -> { is_reclaimed = true; } ); + customClassLoaderPhantomRef = new PhantomReference<>(customClassLoader, null); return customClassLoader; } @@ -154,8 +151,7 @@ this.customClassLoader = customClassLoader; classObjects.removeAllElements(); - // Register a Cleaner to inform us when the class loader has been reclaimed. - Cleaner.create().register(customClassLoader, () -> { is_reclaimed = true; } ); + customClassLoaderPhantomRef = new PhantomReference<>(customClassLoader, null); } /** @@ -244,32 +240,15 @@ */ public boolean unloadClass(ExecutionController stresser) { - is_reclaimed = false; - // free references to class and class loader to be able for collecting by GC - long waitTimeout = (customClassLoader == null) ? 0 : WAIT_TIMEOUT; classObjects.removeAllElements(); customClassLoader = null; // force class unloading by eating memory pool eatMemory(stresser); - // give GC chance to run and wait for receiving reclaim notification - long timeToFinish = System.currentTimeMillis() + waitTimeout; - while (!is_reclaimed && System.currentTimeMillis() < timeToFinish) { - if (!stresser.continueExecution()) { - return false; - } - try { - // suspend thread for a while - Thread.sleep(WAIT_DELTA); - } catch (InterruptedException e) { - throw new Failure("Unexpected InterruptedException while class unloading: " + e); - } - } - // force GC to unload marked class loader and its classes - if (is_reclaimed) { + if (isClassLoaderReclaimed()) { Runtime.getRuntime().gc(); return true; } diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/gc/GC.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/share/gc/GC.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/gc/GC.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/share/gc/GC.java 2026-04-17 19:08:13.000000000 +0000 @@ -48,6 +48,9 @@ public GCTestRunner(Test test, String[] args) { super(test, args); + // GC tests often run at the brink of OOME, make sure + // LocalRandom is loaded, initialized, and has enough memory. + LocalRandom.init(); } private GCParams getGCParams(String[] args) { diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/AbstractDebuggeeTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/AbstractDebuggeeTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/AbstractDebuggeeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/AbstractDebuggeeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -149,19 +149,11 @@ } } - public static final int MAX_UNLOAD_ATTEMPS = 5; - public void unloadTestClass(String className, boolean expectedUnloadingResult) { ClassUnloader classUnloader = loadedClasses.get(className); - int unloadAttemps = 0; - if (classUnloader != null) { - boolean wasUnloaded = false; - - while (!wasUnloaded && (unloadAttemps++ < MAX_UNLOAD_ATTEMPS)) { - wasUnloaded = classUnloader.unloadClass(); - } + boolean wasUnloaded = classUnloader.unloadClass(); if (wasUnloaded) loadedClasses.remove(className); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/Test.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +33,7 @@ * another method handle and so on. * The test verifies that arguments are correctly passed between native methods and MHs. * + * @requires vm.compMode != "Xcomp" * @library /vmTestbase * /test/lib * @@ -62,26 +63,32 @@ private static final String RETURN_VALUE = "test"; + private static final MethodType MT_calledFromNative = MethodType.methodType( + Object.class, + Object.class, Object.class, int.class, long.class, double.class, float.class); + + private static MethodHandle mh; + static { System.loadLibrary("nativeAndMH"); + try { + mh = MethodHandles.lookup().findStatic( + Test.class, + "calledFromNative", + MT_calledFromNative); + } catch (Exception ex) { + throw new RuntimeException("TEST FAILED - Unable to lookup \"calledFromNative\""); + } } private static native Object native01(Object a1, String a2, Object a3, Object a4, Object a5, Object a6, MethodHandle mh); - private static final MethodType MT_calledFromNative = MethodType.methodType( - Object.class, - Object.class, Object.class, int.class, long.class, double.class, float.class); - private static Object calledFromNative(Object s1, Object s2, int i, long l, double d, float f) { return RETURN_VALUE; } @Override protected boolean runThread(int threadNum) throws Throwable { - MethodHandle mh = MethodHandles.lookup().findStatic( - Test.class, - "calledFromNative", - MT_calledFromNative); Stresser stresser = createStresser(); stresser.start(1); diff -Nru openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/StressTest.java openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/StressTest.java --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/StressTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/StressTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -44,6 +44,7 @@ import java.util.List; import java.util.Random; +import jdk.test.lib.thread.TestThreadFactory; import nsk.share.TestFailure; import nsk.share.test.StressOptions; import nsk.share.test.Stresser; @@ -82,16 +83,18 @@ @Option(name="ignoreTestFailures", default_value="false", description="ignore failures of the executed tests") private boolean ignoreTestFailures; - class Worker extends Thread { + class Worker implements Runnable { private final Random rand; private volatile DefMethTest failedTest; private Throwable reason; private volatile long executedTests = 0; - public Worker(String id, long seed) { - setName(id); - this.rand = new Random(seed); + private final Thread thread; + + Worker(String id, long seed) { + this.rand = new Random(seed); + this.thread = TestThreadFactory.newThread(this, id); } @Override @@ -247,13 +250,13 @@ } for (Worker worker : workers) { - worker.start(); + worker.thread.start(); } } private void interruptWorkers() { for (Worker worker : workers) { - worker.interrupt(); + worker.thread.interrupt(); } } @@ -261,14 +264,14 @@ boolean isFailed = false; for (Worker worker : workers) { - while (worker.isAlive()) { + while (worker.thread.isAlive()) { try { - worker.join(); + worker.thread.join(); } catch (InterruptedException e) {} } System.out.printf("%s: %s (executed: %d)\n", - worker.getName(), + worker.thread.getName(), worker.isFailed() ? "FAILED: " + worker.getFailedTest() : "PASSED", worker.getExecutedTests()); @@ -288,7 +291,7 @@ private boolean workersAlive() { for (Worker worker : workers) { - if (!worker.isAlive()) { + if (!worker.thread.isAlive()) { return false; } } diff -Nru openjdk-25-25.0.2+10/test/jdk/ProblemList.txt openjdk-25-25.0.3+9/test/jdk/ProblemList.txt --- openjdk-25-25.0.2+10/test/jdk/ProblemList.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/ProblemList.txt 2026-04-17 19:08:13.000000000 +0000 @@ -119,7 +119,6 @@ java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all -java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java 8361521 linux-all java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java 8340374 macosx-all java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all @@ -180,7 +179,7 @@ java/awt/Mixing/AWT_Mixing/JSliderOverlapping.java 8158801 windows-all java/awt/Mixing/AWT_Mixing/JSpinnerInGlassPaneOverlapping.java 8158801 windows-all java/awt/Mixing/AWT_Mixing/JSpinnerOverlapping.java 8158801 windows-all -java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8158801 windows-all +java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8158801,8357360 windows-all,linux-all java/awt/Mixing/AWT_Mixing/JTableOverlapping.java 8158801 windows-all java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java 8158801 windows-all java/awt/Mixing/AWT_Mixing/JTextAreaOverlapping.java 8158801 windows-all @@ -250,6 +249,8 @@ sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generic-all sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180 windows-all,macosx-all +sun/java2d/OpenGL/OpaqueDest.java#id1 8367574 macosx-all +sun/java2d/OpenGL/ScaleParamsOOB.java#id0 8377908 linux-all sun/java2d/SunGraphics2D/EmptyClipRenderingTest.java 8144029 macosx-all,linux-all sun/java2d/SunGraphics2D/DrawImageBilinear.java 8297175 linux-all sun/java2d/SunGraphics2D/PolyVertTest.java 6986565 generic-all @@ -553,8 +554,6 @@ # jdk_management -com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all -com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all java/lang/management/MemoryMXBean/Pending.java 8158837 generic-all java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all @@ -569,7 +568,6 @@ # jdk_jmx -javax/management/MBeanServer/OldMBeanServerTest.java 8030957 aix-all javax/management/remote/mandatory/connection/BrokenConnectionTest.java 8262312 linux-all @@ -596,8 +594,6 @@ # jdk_nio -java/nio/channels/Channels/SocketChannelStreams.java 8317838 aix-ppc64 - java/nio/channels/DatagramChannel/AdaptorMulticasting.java 8308807,8144003 aix-ppc64,macosx-all java/nio/channels/DatagramChannel/AfterDisconnect.java 8308807 aix-ppc64 java/nio/channels/DatagramChannel/ManySourcesAndTargets.java 8264385 macosx-aarch64 @@ -614,11 +610,8 @@ java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java 7146541 linux-all -java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java 7191877 generic-all - java/rmi/registry/readTest/CodebaseTest.java 8173324 windows-all java/rmi/registry/multipleRegistries/MultipleRegistries.java 8268182 macosx-all - java/rmi/Naming/DefaultRegistryPort.java 8005619 windows-all java/rmi/Naming/legalRegistryNames/LegalRegistryNames.java 8005619 windows-all @@ -802,7 +795,6 @@ java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java 7131438,8022539 generic-all java/awt/Modal/WsDisabledStyle/CloseBlocker/CloseBlocker.java 7187741 linux-all,macosx-all java/awt/xembed/server/TestXEmbedServerJava.java 8001150,8004031 generic-all -java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all java/awt/image/VolatileImage/VolatileImageConfigurationTest.java 8171069 macosx-all,linux-all java/awt/Modal/InvisibleParentTest/InvisibleParentTest.java 8172245 linux-all java/awt/Frame/FrameStateTest/FrameStateTest.java 8203920 macosx-all,linux-all @@ -818,7 +810,6 @@ java/awt/TextComponent/CorrectTextComponentSelectionTest.java 8237220 macosx-all java/awt/TextComponent/SelectionAndCaretColor.java 7017622 linux-all java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter.java 8254841 macosx-all -java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 8256289 windows-x64 java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 8258103 linux-all java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-x64 java/awt/Frame/SizeMinimizedTest.java 8305915 linux-x64 diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/Cipher/AES/TestGCMSplitBound.java openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/Cipher/AES/TestGCMSplitBound.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/Cipher/AES/TestGCMSplitBound.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/Cipher/AES/TestGCMSplitBound.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2025, Google LLC. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8371864 + * @run main/othervm/timeout=600 TestGCMSplitBound + * @requires (os.simpleArch == "x64" & (vm.cpu.features ~= ".*avx2.*" | + * vm.cpu.features ~= ".*avx512.*")) + * @summary Test GaloisCounterMode.implGCMCrypt0 AVX512/AVX2 intrinsics. + */ + +import java.security.SecureRandom; +import java.security.spec.AlgorithmParameterSpec; +import java.time.Duration; +import java.util.Arrays; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.GCMParameterSpec; +import javax.crypto.spec.SecretKeySpec; + +public class TestGCMSplitBound { + + static final SecureRandom SECURE_RANDOM = newDefaultSecureRandom(); + + private static SecureRandom newDefaultSecureRandom() { + SecureRandom retval = new SecureRandom(); + retval.nextLong(); // force seeding + return retval; + } + + private static byte[] randBytes(int size) { + byte[] rand = new byte[size]; + SECURE_RANDOM.nextBytes(rand); + return rand; + } + + private static final int IV_SIZE_IN_BYTES = 12; + private static final int TAG_SIZE_IN_BYTES = 16; + + private Cipher getCipher(final byte[] key, final byte[] aad, + final byte[] nonce, int mode) + throws Exception { + SecretKey keySpec = new SecretKeySpec(key, "AES"); + AlgorithmParameterSpec params = + new GCMParameterSpec(8 * TAG_SIZE_IN_BYTES, nonce, 0, nonce.length); + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + cipher.init(mode, keySpec, params); + if (aad != null && aad.length != 0) { + cipher.updateAAD(aad); + } + return cipher; + } + + private byte[] gcmEncrypt(final byte[] key, final byte[] plaintext, + final byte[] aad) + throws Exception { + byte[] nonce = randBytes(IV_SIZE_IN_BYTES); + Cipher cipher = getCipher(key, aad, nonce, Cipher.ENCRYPT_MODE); + int outputSize = cipher.getOutputSize(plaintext.length); + int len = IV_SIZE_IN_BYTES + outputSize; + byte[] output = new byte[len]; + System.arraycopy(nonce, 0, output, 0, IV_SIZE_IN_BYTES); + cipher.doFinal(plaintext, 0, plaintext.length, output, + IV_SIZE_IN_BYTES); + return output; + } + + private byte[] gcmDecrypt(final byte[] key, final byte[] ciphertext, + final byte[] aad) + throws Exception { + byte[] nonce = new byte[IV_SIZE_IN_BYTES]; + System.arraycopy(ciphertext, 0, nonce, 0, IV_SIZE_IN_BYTES); + Cipher cipher = getCipher(key, aad, nonce, Cipher.DECRYPT_MODE); + return cipher.doFinal(ciphertext, IV_SIZE_IN_BYTES, + ciphertext.length - IV_SIZE_IN_BYTES); + } + + // x86-64 parallel intrinsic data size + private static final int PARALLEL_LEN = 512; + // max data size for x86-64 intrinsic + private static final int SPLIT_LEN = 1048576; // 1MB + + private void encryptAndDecrypt(byte[] key, byte[] aad, byte[] message, + int messageSize) + throws Exception { + byte[] ciphertext = gcmEncrypt(key, message, aad); + byte[] decrypted = gcmDecrypt(key, ciphertext, aad); + if (ciphertext == null) { + throw new RuntimeException("ciphertext is null"); + } + if (Arrays.compare(decrypted, 0, messageSize, + message, 0, messageSize) != 0) { + throw new RuntimeException( + "Decrypted message is different from the original message"); + } + } + + private void run() throws Exception { + byte[] aad = randBytes(20); + byte[] key = randBytes(16); + // Force JIT. + for (int i = 0; i < 100000; i++) { + byte[] message = randBytes(PARALLEL_LEN); + encryptAndDecrypt(key, aad, message, PARALLEL_LEN); + } + for (int messageSize = SPLIT_LEN - 300; messageSize <= SPLIT_LEN + 300; + messageSize++) { + byte[] message = randBytes(messageSize); + try { + encryptAndDecrypt(key, aad, message, messageSize); + } catch (Exception e) { + throw new RuntimeException("Failed for messageSize " + + Integer.toHexString(messageSize), e); + } + } + } + + public static void main(String[] args) throws Exception { + TestGCMSplitBound test = new TestGCMSplitBound(); + for (int i = 0; i < 3; i++) { + test.run(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +39,9 @@ public class DHGenSharedSecret { + private static final String PROVIDER_NAME = + System.getProperty("test.provider.name", "SunJCE"); + public static void main(String[] args) throws Exception { DHGenSharedSecret test = new DHGenSharedSecret(); test.run(); @@ -57,7 +60,7 @@ // generate keyPairs using parameters KeyPairGenerator keyGen = - KeyPairGenerator.getInstance("DH", "SunJCE"); + KeyPairGenerator.getInstance("DH", PROVIDER_NAME); keyGen.initialize(spec); // Alice generates her key pairs @@ -77,11 +80,11 @@ // bob uses it to generate Secret X509EncodedKeySpec x509Spec = new X509EncodedKeySpec(alicePubKeyEnc); - KeyFactory bobKeyFac = KeyFactory.getInstance("DH", "SunJCE"); + KeyFactory bobKeyFac = KeyFactory.getInstance("DH", PROVIDER_NAME); PublicKey alicePubKey = bobKeyFac.generatePublic(x509Spec); - KeyAgreement bobAlice = KeyAgreement.getInstance("DH", "SunJCE"); + KeyAgreement bobAlice = KeyAgreement.getInstance("DH", PROVIDER_NAME); start = System.currentTimeMillis(); bobAlice.init(keyB.getPrivate()); bobAlice.doPhase(alicePubKey, true); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +53,8 @@ public class DHKeyAgreement2 { - private static final String SUNJCE = "SunJCE"; + private static final String PROVIDER_NAME = System.getProperty( + "test.provider.name", "SunJCE"); // Hex formatter to upper case with ":" delimiter private static final HexFormat HEX_FORMATTER = HexFormat.ofDelimiter(":").withUpperCase(); @@ -90,7 +91,7 @@ // Some central authority creates new DH parameters System.err.println("Creating Diffie-Hellman parameters ..."); AlgorithmParameterGenerator paramGen - = AlgorithmParameterGenerator.getInstance("DH", SUNJCE); + = AlgorithmParameterGenerator.getInstance("DH", PROVIDER_NAME); paramGen.init(primeSize); AlgorithmParameters params = paramGen.generateParameters(); dhParameterSpec = (DHParameterSpec)params.getParameterSpec @@ -108,7 +109,7 @@ * above */ System.err.println("ALICE: Generate DH keypair ..."); - KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", SUNJCE); + KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", PROVIDER_NAME); aliceKpairGen.initialize(dhParameterSpec); KeyPair aliceKpair = aliceKpairGen.generateKeyPair(); System.out.println("Alice DH public key:\n" + @@ -117,14 +118,14 @@ aliceKpair.getPrivate().toString()); DHParameterSpec dhParamSpec = ((DHPublicKey)aliceKpair.getPublic()).getParams(); - AlgorithmParameters algParams = AlgorithmParameters.getInstance("DH", SUNJCE); + AlgorithmParameters algParams = AlgorithmParameters.getInstance("DH", PROVIDER_NAME); algParams.init(dhParamSpec); System.out.println("Alice DH parameters:\n" + algParams.toString()); // Alice executes Phase1 of her version of the DH protocol System.err.println("ALICE: Execute PHASE1 ..."); - KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", SUNJCE); + KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", PROVIDER_NAME); aliceKeyAgree.init(aliceKpair.getPrivate()); // Alice encodes her public key, and sends it over to Bob. @@ -135,7 +136,7 @@ * in encoded format. * He instantiates a DH public key from the encoded key material. */ - KeyFactory bobKeyFac = KeyFactory.getInstance("DH", SUNJCE); + KeyFactory bobKeyFac = KeyFactory.getInstance("DH", PROVIDER_NAME); X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec (alicePubKeyEnc); PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec); @@ -149,7 +150,7 @@ // Bob creates his own DH key pair System.err.println("BOB: Generate DH keypair ..."); - KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", SUNJCE); + KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", PROVIDER_NAME); bobKpairGen.initialize(dhParamSpec); KeyPair bobKpair = bobKpairGen.generateKeyPair(); System.out.println("Bob DH public key:\n" + @@ -159,7 +160,7 @@ // Bob executes Phase1 of his version of the DH protocol System.err.println("BOB: Execute PHASE1 ..."); - KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH", SUNJCE); + KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH", PROVIDER_NAME); bobKeyAgree.init(bobKpair.getPrivate()); // Bob encodes his public key, and sends it over to Alice. @@ -171,7 +172,7 @@ * Before she can do so, she has to instanticate a DH public key * from Bob's encoded key material. */ - KeyFactory aliceKeyFac = KeyFactory.getInstance("DH", SUNJCE); + KeyFactory aliceKeyFac = KeyFactory.getInstance("DH", PROVIDER_NAME); x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc); PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec); System.err.println("ALICE: Execute PHASE2 ..."); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,6 +50,9 @@ public class DHKeyAgreement3 { + private static final String PROVIDER_NAME = + System.getProperty("test.provider.name", "SunJCE"); + // Hex formatter to upper case with ":" delimiter private static final HexFormat HEX_FORMATTER = HexFormat.ofDelimiter(":").withUpperCase(); @@ -70,36 +73,36 @@ // Alice creates her own DH key pair System.err.println("ALICE: Generate DH keypair ..."); - KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE"); + KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", PROVIDER_NAME); aliceKpairGen.initialize(dhParamSpec); KeyPair aliceKpair = aliceKpairGen.generateKeyPair(); // Bob creates his own DH key pair System.err.println("BOB: Generate DH keypair ..."); - KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE"); + KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", PROVIDER_NAME); bobKpairGen.initialize(dhParamSpec); KeyPair bobKpair = bobKpairGen.generateKeyPair(); // Carol creates her own DH key pair System.err.println("CAROL: Generate DH keypair ..."); - KeyPairGenerator carolKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE"); + KeyPairGenerator carolKpairGen = KeyPairGenerator.getInstance("DH", PROVIDER_NAME); carolKpairGen.initialize(dhParamSpec); KeyPair carolKpair = carolKpairGen.generateKeyPair(); // Alice initialize System.err.println("ALICE: Initialize ..."); - KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", "SunJCE"); + KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", PROVIDER_NAME); aliceKeyAgree.init(aliceKpair.getPrivate()); // Bob initialize System.err.println("BOB: Initialize ..."); - KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH", "SunJCE"); + KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH", PROVIDER_NAME); bobKeyAgree.init(bobKpair.getPrivate()); // Carol initialize System.err.println("CAROL: Initialize ..."); - KeyAgreement carolKeyAgree = KeyAgreement.getInstance("DH", "SunJCE"); + KeyAgreement carolKeyAgree = KeyAgreement.getInstance("DH", PROVIDER_NAME); carolKeyAgree.init(carolKpair.getPrivate()); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/java/swing/plaf/gtk/4928019/bug4928019.java openjdk-25-25.0.3+9/test/jdk/com/sun/java/swing/plaf/gtk/4928019/bug4928019.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/java/swing/plaf/gtk/4928019/bug4928019.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/java/swing/plaf/gtk/4928019/bug4928019.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,25 +26,25 @@ * @bug 4928019 * @key headful * @summary Makes sure all the basic classes can be created with GTK. - * @author Scott Violet + * @requires (os.family != "windows" & os.family != "mac") + * @library /test/lib + * @build jtreg.SkippedException + * @run main bug4928019 */ import javax.swing.*; import javax.swing.plaf.basic.*; +import jtreg.SkippedException; + public class bug4928019 { public static void main(String[] args) throws Throwable { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); - } catch (UnsupportedLookAndFeelException ex) { - System.err.println("GTKLookAndFeel is not supported on this platform." + - " Test is considered passed."); - return; - } catch (ClassNotFoundException ex) { - System.err.println("GTKLookAndFeel class is not found." + - " Test is considered passed."); - return; + } catch (Exception e) { + throw new SkippedException("GTKLookAndFeel isn't supported", e); } + new JButton() { public void updateUI() { setUI(new BasicButtonUI()); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/java/swing/plaf/gtk/Test6635110.java openjdk-25-25.0.3+9/test/jdk/com/sun/java/swing/plaf/gtk/Test6635110.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/java/swing/plaf/gtk/Test6635110.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/java/swing/plaf/gtk/Test6635110.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * 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,18 +21,28 @@ * questions. */ -/* @test - @bug 6635110 - @key headful - @summary GTK icons should not throw NPE when called by non-GTK UI - @author Peter Zhelezniakov - @run main Test6635110 +/* + * @test + * @bug 6635110 + * @key headful + * @summary GTK icons should not throw NPE when called by non-GTK UI + * @requires (os.family != "windows" & os.family != "mac") + * @library /test/lib + * @build jtreg.SkippedException + * @run main Test6635110 */ -import javax.swing.*; -import java.awt.*; +import java.awt.Component; import java.awt.image.BufferedImage; -import javax.swing.plaf.basic.*; + +import javax.swing.JMenu; +import javax.swing.JToolBar; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.plaf.basic.BasicMenuUI; +import javax.swing.plaf.basic.BasicToolBarUI; + +import jtreg.SkippedException; public class Test6635110 implements Runnable { @@ -53,7 +63,7 @@ paint(tb); } - void paint(Component c) { + private void paint(Component c) { c.setSize(WIDTH, HEIGHT); c.paint(IMAGE.getGraphics()); } @@ -62,9 +72,9 @@ try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); } catch (Exception e) { - System.out.println("GTKLookAndFeel cannot be set, skipping this test"); - return; + throw new SkippedException("GTKLookAndFeel isn't supported", e); } + SwingUtilities.invokeAndWait(new Test6635110()); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/java/swing/plaf/gtk/Test6963870.java openjdk-25-25.0.3+9/test/jdk/com/sun/java/swing/plaf/gtk/Test6963870.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/java/swing/plaf/gtk/Test6963870.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/java/swing/plaf/gtk/Test6963870.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved. * 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,23 +21,28 @@ * questions. */ -/* @test - @bug 6963870 - @key headful - @summary Tests that GTKPainter.ListTableFocusBorder.getBorderInsets() - doesn't return null - @author Peter Zhelezniakov - @run main Test6963870 -*/ +/* + * @test + * @bug 6963870 + * @key headful + * @summary Tests that GTKPainter.ListTableFocusBorder.getBorderInsets() + * doesn't return null + * @requires (os.family != "windows" & os.family != "mac") + * @library /test/lib + * @build jtreg.SkippedException + * @run main Test6963870 + */ import java.awt.Insets; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.border.Border; +import jtreg.SkippedException; + public class Test6963870 implements Runnable { - final static String[] UI_NAMES = { + static final String[] UI_NAMES = { "List.focusCellHighlightBorder", "List.focusSelectedCellHighlightBorder", "List.noFocusBorder", @@ -45,6 +50,7 @@ "Table.focusSelectedCellHighlightBorder", }; + @Override public void run() { for (String uiName: UI_NAMES) { test(uiName); @@ -63,11 +69,9 @@ try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); } catch (Exception e) { - System.out.println("GTKLookAndFeel cannot be set, skipping this test"); - return; + throw new SkippedException("GTKLookAndFeel isn't supported", e); } SwingUtilities.invokeAndWait(new Test6963870()); } } - diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/TwoThreadsTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/jdi/TwoThreadsTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/TwoThreadsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/jdi/TwoThreadsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +55,13 @@ t1.start(); t2.start(); + // The threads might be virtual and daemon, so wait until completion. + try { + t1.join(); + t2.join(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. * 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,6 +35,8 @@ import javax.naming.Context; import javax.naming.NamingException; import javax.naming.directory.InitialDirContext; + +import java.net.SocketTimeoutException; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; @@ -82,14 +84,10 @@ env.put(Context.PROVIDER_URL, "ldap://example.com:1234"); try { - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); - futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); + // launch a few concurrent connection attempts + for (int i = 0; i < 8; i++) { + futures.add(executorService.submit(() -> { attemptConnect(env); return null; })); + } } finally { executorService.shutdown(); } @@ -109,39 +107,57 @@ private static void attemptConnect(Hashtable<Object, Object> env) throws Exception { try { - LdapTimeoutTest.assertCompletion(CONNECT_MILLIS - 1000, - 2 * CONNECT_MILLIS + TOLERANCE, - () -> new InitialDirContext(env)); - } catch (RuntimeException e) { - final String msg = e.getCause() == null ? e.getMessage() : e.getCause().getMessage(); - // assertCompletion may wrap a CommunicationException in an RTE - if (msg != null && - (msg.contains("Network is unreachable") - || msg.contains("No route to host") - || msg.contains("Connection timed out"))) { - // got the expected exception - System.out.println("Received expected RuntimeException message: " + msg); - } else { - // propagate the unexpected exception - throw e; + final InitialDirContext unexpectedCtx = + LdapTimeoutTest.assertCompletion(CONNECT_MILLIS - 1000, + 2 * CONNECT_MILLIS + TOLERANCE, + () -> new InitialDirContext(env)); + throw new RuntimeException("InitialDirContext construction was expected to fail," + + " but returned " + unexpectedCtx); + } catch (Throwable t) { + final NamingException namingEx = findNamingException(t); + if (namingEx != null) { + // found the NamingException, verify it's the right reason + if (namingEx.getCause() instanceof SocketTimeoutException ste) { + // got the expected exception + System.out.println("Received expected SocketTimeoutException: " + ste); + return; + } + // rely on the exception message to verify the expected exception + final String msg = namingEx.getCause() == null + ? namingEx.getMessage() + : namingEx.getCause().getMessage(); + if (msg != null && + (msg.contains("Network is unreachable") + || msg.contains("No route to host") + || msg.contains("Timed out waiting for lock") + || msg.contains("Connect timed out") + || msg.contains("Connection timed out") + || msg.contains("Timeout exceeded while waiting for a connection"))) { + // got the expected exception + System.out.println("Received expected NamingException with message: " + msg); + return; + } } - } catch (NamingException ex) { - final String msg = ex.getCause() == null ? ex.getMessage() : ex.getCause().getMessage(); - if (msg != null && - (msg.contains("Network is unreachable") - || msg.contains("Timed out waiting for lock") - || msg.contains("Connect timed out") - || msg.contains("Timeout exceeded while waiting for a connection"))) { - // got the expected exception - System.out.println("Received expected NamingException message: " + msg); + // unexpected exception, propagate it + if (t instanceof Exception e) { + throw e; } else { - // propagate the unexpected exception - throw ex; + throw new Exception(t); } - } catch (Throwable t) { - throw new RuntimeException(t); } } + // Find and return the NamingException from the given Throwable. Returns null if none found. + private static NamingException findNamingException(final Throwable t) { + Throwable cause = t; + while (cause != null) { + if (cause instanceof NamingException ne) { + return ne; + } + cause = cause.getCause(); + } + return null; + } + } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/HttpsParametersClientAuthTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/HttpsParametersClientAuthTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/HttpsParametersClientAuthTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/HttpsParametersClientAuthTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -83,6 +83,7 @@ return t; }; + private static final SSLContext serverSSLCtx = SimpleSSLContext.findSSLContext(); /** * verifies default values of {@link HttpsParameters#setNeedClientAuth(boolean)} * and {@link HttpsParameters#setWantClientAuth(boolean)} methods @@ -167,8 +168,6 @@ public void testServerNeedClientAuth(final boolean presentClientCerts) throws Exception { // SSLContext which contains both the key and the trust material and will be used // by the server - final SSLContext serverSSLCtx = new SimpleSSLContext().get(); - assertNotNull(serverSSLCtx, "could not create SSLContext"); final HttpsConfigurator configurator = new HttpsConfigurator(serverSSLCtx) { @Override public void configure(final HttpsParameters params) { @@ -275,8 +274,6 @@ public void testServerWantClientAuth(final boolean presentClientCerts) throws Exception { // SSLContext which contains both the key and the trust material and will be used // by the server - final SSLContext serverSSLCtx = new SimpleSSLContext().get(); - assertNotNull(serverSSLCtx, "could not create SSLContext"); final HttpsConfigurator configurator = new HttpsConfigurator(serverSSLCtx) { @Override public void configure(final HttpsParameters params) { diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/SANTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/SANTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/SANTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/SANTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +61,7 @@ */ public class SANTest implements HttpServerAdapters { - static SSLContext ctx; + private static final SSLContext ctx = SimpleSSLContext.findSSLContext(); static HttpServer getHttpsServer(InetSocketAddress addr, Executor exec, SSLContext ctx) throws Exception { HttpsServer server = HttpsServer.create(addr, 0); @@ -110,7 +110,6 @@ ExecutorService executor=null; try { System.out.print ("SANTest: "); - ctx = new SimpleSSLContext().get(); executor = Executors.newCachedThreadPool(); InetAddress l1 = InetAddress.getByName("::1"); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/SelCacheTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/SelCacheTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/SelCacheTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/SelCacheTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -59,7 +59,7 @@ private static final String TEMP_FILE_PREFIX = HttpServer.class.getPackageName() + '-' + SelCacheTest.class.getSimpleName() + '-'; - static SSLContext ctx; + private static final SSLContext ctx = SimpleSSLContext.findSSLContext(); public static void main(String[] args) throws Exception { HttpServer s1 = null; @@ -84,7 +84,6 @@ executor = Executors.newCachedThreadPool(); s1.setExecutor(executor); s2.setExecutor(executor); - ctx = new SimpleSSLContext().get(); s2.setHttpsConfigurator(new HttpsConfigurator(ctx)); s1.start(); s2.start(); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/ServerStopTerminationTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/ServerStopTerminationTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/ServerStopTerminationTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/ServerStopTerminationTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -124,13 +124,16 @@ // Complete the exchange one second into the future final Duration exchangeDuration = Duration.ofSeconds(1); + // taking start time before entering completeExchange to account for possible + // delays in reaching server.stop(). + final long startTime = System.nanoTime(); completeExchange(exchangeDuration); log("Complete Exchange triggered"); // Time the shutdown sequence - final Duration delayDuration = Duration.ofSeconds(Utils.adjustTimeout(5)); + final Duration delayDuration = Duration.ofSeconds(Utils.adjustTimeout(20)); log("Shutdown triggered with the delay of " + delayDuration.getSeconds()); - final long elapsed = timeShutdown(delayDuration); + final long elapsed = timeShutdown(delayDuration, startTime); log("Shutdown complete"); // The shutdown should take at least as long as the exchange duration @@ -151,31 +154,20 @@ * @throws InterruptedException if an unexpected interruption occurs */ @Test - public void shouldCompeteAfterDelay() throws InterruptedException { + public void shouldCompleteAfterDelay() throws InterruptedException { // Initiate an exchange startExchange(); // Wait for the server to receive the exchange start.await(); log("Exchange started"); - // Complete the exchange 10 second into the future. - // Runs in parallel, so won't block the server stop - final Duration exchangeDuration = Duration.ofSeconds(Utils.adjustTimeout(10)); - completeExchange(exchangeDuration); - log("Complete Exchange triggered"); - - // Time the shutdown sequence final Duration delayDuration = Duration.ofSeconds(1); log("Shutdown triggered with the delay of " + delayDuration.getSeconds()); final long elapsed = timeShutdown(delayDuration); log("Shutdown complete"); - - - // The shutdown should not await the exchange to complete - if (elapsed >= exchangeDuration.toNanos()) { - fail("HttpServer.stop terminated too late"); - } + complete.countDown(); + log("Exchange completed"); // The shutdown delay should have expired if (elapsed < delayDuration.toNanos()) { @@ -277,7 +269,14 @@ */ private long timeShutdown(Duration delayDuration) { final long startTime = System.nanoTime(); + return timeShutdown(delayDuration, startTime); + } + /** + * This allows passing a custom start time + */ + private long timeShutdown(Duration delayDuration, + long startTime) { server.stop((int) delayDuration.toSeconds()); return System.nanoTime() - startTime; } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test1.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test1.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test1.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test1.java 2026-04-17 19:08:13.000000000 +0000 @@ -69,7 +69,7 @@ private static final String TEMP_FILE_PREFIX = HttpServer.class.getPackageName() + '-' + Test1.class.getSimpleName() + '-'; - static SSLContext ctx; + private static final SSLContext ctx = SimpleSSLContext.findSSLContext(); public static void main (String[] args) throws Exception { HttpServer s1 = null; @@ -94,7 +94,6 @@ executor = Executors.newCachedThreadPool(); s1.setExecutor (executor); s2.setExecutor (executor); - ctx = new SimpleSSLContext().get(); s2.setHttpsConfigurator(new HttpsConfigurator (ctx)); s1.start(); s2.start(); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test12.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test12.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test12.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test12.java 2026-04-17 19:08:13.000000000 +0000 @@ -56,7 +56,7 @@ private static final String TEMP_FILE_PREFIX = HttpServer.class.getPackageName() + '-' + Test12.class.getSimpleName() + '-'; - static SSLContext ctx; + private static final SSLContext ctx = SimpleSSLContext.findSSLContext(); public static void main (String[] args) throws Exception { HttpServer s1 = null; @@ -77,7 +77,6 @@ HttpContext c2 = s2.createContext ("/", h); s1.setExecutor (executor); s2.setExecutor (executor); - ctx = new SimpleSSLContext().get(); s2.setHttpsConfigurator(new HttpsConfigurator (ctx)); s1.start(); s2.start(); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test13.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test13.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test13.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test13.java 2026-04-17 19:08:13.000000000 +0000 @@ -59,7 +59,7 @@ private static final String TEMP_FILE_PREFIX = HttpServer.class.getPackageName() + '-' + Test13.class.getSimpleName() + '-'; - static SSLContext ctx; + private static final SSLContext ctx = SimpleSSLContext.findSSLContext(); final static int NUM = 32; // was 32 @@ -87,7 +87,6 @@ executor = Executors.newCachedThreadPool(); s1.setExecutor (executor); s2.setExecutor (executor); - ctx = new SimpleSSLContext().get(); s2.setHttpsConfigurator(new HttpsConfigurator (ctx)); s1.start(); s2.start(); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test6a.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test6a.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test6a.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test6a.java 2026-04-17 19:08:13.000000000 +0000 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6270015 * @library /test/lib @@ -54,7 +54,7 @@ HttpsServer server = HttpsServer.create (addr, 0); HttpContext ctx = server.createContext ("/test", handler); ExecutorService executor = Executors.newCachedThreadPool(); - SSLContext ssl = new SimpleSSLContext().get(); + SSLContext ssl = SimpleSSLContext.findSSLContext(); server.setExecutor (executor); server.setHttpsConfigurator(new HttpsConfigurator (ssl)); server.start (); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test7a.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test7a.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test7a.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test7a.java 2026-04-17 19:08:13.000000000 +0000 @@ -58,7 +58,7 @@ HttpsServer server = HttpsServer.create (addr, 0); HttpContext ctx = server.createContext ("/test", handler); ExecutorService executor = Executors.newCachedThreadPool(); - SSLContext ssl = new SimpleSSLContext().get(); + SSLContext ssl = SimpleSSLContext.findSSLContext(); server.setHttpsConfigurator(new HttpsConfigurator (ssl)); server.setExecutor (executor); server.start (); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test8a.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test8a.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test8a.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test8a.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +61,7 @@ server = HttpsServer.create (addr, 0); HttpContext ctx = server.createContext ("/test", handler); executor = Executors.newCachedThreadPool(); - SSLContext ssl = new SimpleSSLContext().get(); + SSLContext ssl = SimpleSSLContext.findSSLContext(); server.setHttpsConfigurator(new HttpsConfigurator (ssl)); server.setExecutor (executor); server.start (); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test9.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test9.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test9.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test9.java 2026-04-17 19:08:13.000000000 +0000 @@ -58,8 +58,8 @@ private static final String TEMP_FILE_PREFIX = HttpServer.class.getPackageName() + '-' + Test9.class.getSimpleName() + '-'; - static SSLContext ctx; - static boolean error = false; + private static final SSLContext ctx = SimpleSSLContext.findSSLContext(); + static volatile boolean error = false; public static void main (String[] args) throws Exception { HttpServer s1 = null; @@ -67,6 +67,8 @@ ExecutorService executor=null; Path smallFilePath = createTempFileOfSize(TEMP_FILE_PREFIX, null, 23); Path largeFilePath = createTempFileOfSize(TEMP_FILE_PREFIX, null, 2730088); + smallFilePath.toFile().deleteOnExit(); + largeFilePath.toFile().deleteOnExit(); try { System.out.print ("Test9: "); InetAddress loopback = InetAddress.getLoopbackAddress(); @@ -81,7 +83,6 @@ executor = Executors.newCachedThreadPool(); s1.setExecutor (executor); s2.setExecutor (executor); - ctx = new SimpleSSLContext().get(); s2.setHttpsConfigurator(new HttpsConfigurator (ctx)); s1.start(); s2.start(); @@ -122,20 +123,16 @@ s2.stop(0); if (executor != null) executor.shutdown (); - Files.delete(smallFilePath); - Files.delete(largeFilePath); } } - static int foo = 1; - static ClientThread test (boolean fixedLen, String protocol, int port, Path filePath) throws Exception { ClientThread t = new ClientThread (fixedLen, protocol, port, filePath); t.start(); return t; } - static Object fileLock = new Object(); + static final Object fileLock = new Object(); static class ClientThread extends Thread { @@ -203,9 +200,8 @@ error = true; } assertFileContentsEqual(filePath, temp.toPath()); - temp.delete(); } catch (Exception e) { - e.printStackTrace(); + System.err.println("Error occurred: " + e); error = true; } } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test9a.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test9a.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test9a.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/Test9a.java 2026-04-17 19:08:13.000000000 +0000 @@ -56,8 +56,8 @@ private static final String TEMP_FILE_PREFIX = HttpServer.class.getPackageName() + '-' + Test9a.class.getSimpleName() + '-'; - static SSLContext serverCtx; - static volatile SSLContext clientCtx = null; + private static final SSLContext serverCtx = SimpleSSLContext.findSSLContext(); + private static final SSLContext clientCtx = SimpleSSLContext.findSSLContext(); static volatile boolean error = false; public static void main (String[] args) throws Exception { @@ -76,8 +76,6 @@ HttpContext c1 = server.createContext ("/", h); executor = Executors.newCachedThreadPool(); server.setExecutor (executor); - serverCtx = new SimpleSSLContext().get(); - clientCtx = new SimpleSSLContext().get(); server.setHttpsConfigurator(new HttpsConfigurator (serverCtx)); server.start(); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/bugs/HandlerConnectionClose.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/bugs/HandlerConnectionClose.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/bugs/HandlerConnectionClose.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/bugs/HandlerConnectionClose.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +63,7 @@ { static final int ONEK = 1024; static final long POST_SIZE = ONEK * 1L; - SSLContext sslContext; + private static final SSLContext sslContext = SimpleSSLContext.findSSLContext(); Logger logger; void test(String[] args) throws Exception { @@ -77,7 +77,6 @@ } finally { httpServer.stop(0); } - sslContext = new SimpleSSLContext().get(); HttpServer httpsServer = startHttpServer("https"); try { testHttpURLConnection(httpsServer, "https","/close/legacy/https/chunked"); diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/CustomFileSystemTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/CustomFileSystemTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/CustomFileSystemTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/CustomFileSystemTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -256,63 +256,65 @@ @Test public void testNotReadableFileGET() throws Exception { - if (!Platform.isWindows()) { // not applicable on Windows - var expectedBody = openHTML + """ - <h1>File not found</h1> - <p>/aFile.txt</p> - """ + closeHTML; - var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); - var root = createDirectoryInCustomFs("testNotReadableFileGET"); - var file = Files.writeString(root.resolve("aFile.txt"), "some text", CREATE); - - file.toFile().setReadable(false, false); - assert !Files.isReadable(file); - - var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); - server.start(); - try { - var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); - var request = HttpRequest.newBuilder(uri(server, "aFile.txt")).build(); - var response = client.send(request, BodyHandlers.ofString()); - assertEquals(response.statusCode(), 404); - assertEquals(response.headers().firstValue("content-length").get(), expectedLength); - assertEquals(response.body(), expectedBody); - } finally { - server.stop(0); - file.toFile().setReadable(true, false); - } + if (Platform.isWindows()) { + throw new SkipException("Not applicable on Windows"); + } + var expectedBody = openHTML + """ + <h1>File not found</h1> + <p>/aFile.txt</p> + """ + closeHTML; + var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); + var root = createDirectoryInCustomFs("testNotReadableFileGET"); + var file = Files.writeString(root.resolve("aFile.txt"), "some text", CREATE); + + file.toFile().setReadable(false, false); + assert !Files.isReadable(file); + + var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); + server.start(); + try { + var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); + var request = HttpRequest.newBuilder(uri(server, "aFile.txt")).build(); + var response = client.send(request, BodyHandlers.ofString()); + assertEquals(response.statusCode(), 404); + assertEquals(response.headers().firstValue("content-length").get(), expectedLength); + assertEquals(response.body(), expectedBody); + } finally { + server.stop(0); + file.toFile().setReadable(true, false); } } @Test public void testNotReadableSegmentGET() throws Exception { - if (!Platform.isWindows()) { // not applicable on Windows - var expectedBody = openHTML + """ - <h1>File not found</h1> - <p>/dir/aFile.txt</p> - """ + closeHTML; - var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); - var root = createDirectoryInCustomFs("testNotReadableSegmentGET"); - var dir = Files.createDirectory(root.resolve("dir")); - var file = Files.writeString(dir.resolve("aFile.txt"), "some text", CREATE); - - dir.toFile().setReadable(false, false); - assert !Files.isReadable(dir); - assert Files.isReadable(file); - - var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); - server.start(); - try { - var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); - var request = HttpRequest.newBuilder(uri(server, "dir/aFile.txt")).build(); - var response = client.send(request, BodyHandlers.ofString()); - assertEquals(response.statusCode(), 404); - assertEquals(response.headers().firstValue("content-length").get(), expectedLength); - assertEquals(response.body(), expectedBody); - } finally { - server.stop(0); - dir.toFile().setReadable(true, false); - } + if (Platform.isWindows()) { + throw new SkipException("Not applicable on Windows"); + } + var expectedBody = openHTML + """ + <h1>File not found</h1> + <p>/dir/aFile.txt</p> + """ + closeHTML; + var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); + var root = createDirectoryInCustomFs("testNotReadableSegmentGET"); + var dir = Files.createDirectory(root.resolve("dir")); + var file = Files.writeString(dir.resolve("aFile.txt"), "some text", CREATE); + + dir.toFile().setReadable(false, false); + assert !Files.isReadable(dir); + assert Files.isReadable(file); + + var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); + server.start(); + try { + var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); + var request = HttpRequest.newBuilder(uri(server, "dir/aFile.txt")).build(); + var response = client.send(request, BodyHandlers.ofString()); + assertEquals(response.statusCode(), 404); + assertEquals(response.headers().firstValue("content-length").get(), expectedLength); + assertEquals(response.body(), expectedBody); + } finally { + server.stop(0); + dir.toFile().setReadable(true, false); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerAlertTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerAlertTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerAlertTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerAlertTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +59,11 @@ static final boolean ENABLE_LOGGING = true; static final Logger LOGGER = Logger.getLogger("com.sun.net.httpserver"); - SSLContext sslContext; + private static final SSLContext sslContext = SimpleSSLContext.findSSLContext(); + + static { + SSLContext.setDefault(sslContext); + } @BeforeTest public void setup() throws IOException { @@ -69,8 +73,6 @@ ch.setLevel(Level.ALL); LOGGER.addHandler(ch); } - sslContext = new SimpleSSLContext().get(); - SSLContext.setDefault(sslContext); } @Test diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/HttpsServerTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ import java.net.http.HttpResponse.BodyHandlers; import java.nio.charset.StandardCharsets; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.Logger; @@ -67,7 +66,11 @@ static final boolean ENABLE_LOGGING = true; static final Logger LOGGER = Logger.getLogger("com.sun.net.httpserver"); - SSLContext sslContext; + private static final SSLContext sslContext = SimpleSSLContext.findSSLContext(); + + static { + SSLContext.setDefault(sslContext); + } @BeforeTest public void setup() throws IOException { @@ -77,8 +80,6 @@ ch.setLevel(Level.ALL); LOGGER.addHandler(ch); } - sslContext = new SimpleSSLContext().get(); - SSLContext.setDefault(sslContext); } @Test diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/SimpleFileServerTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/SimpleFileServerTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/SimpleFileServerTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/SimpleFileServerTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -309,63 +309,65 @@ @Test public void testNotReadableFileGET() throws Exception { - if (!Platform.isWindows()) { // not applicable on Windows - var expectedBody = openHTML + """ - <h1>File not found</h1> - <p>/aFile.txt</p> - """ + closeHTML; - var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); - var root = Files.createDirectory(TEST_DIR.resolve("testNotReadableFileGET")); - var file = Files.writeString(root.resolve("aFile.txt"), "some text", CREATE); - - file.toFile().setReadable(false, false); - assert !Files.isReadable(file); - - var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); - server.start(); - try { - var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); - var request = HttpRequest.newBuilder(uri(server, "aFile.txt")).build(); - var response = client.send(request, BodyHandlers.ofString()); - assertEquals(response.statusCode(), 404); - assertEquals(response.headers().firstValue("content-length").get(), expectedLength); - assertEquals(response.body(), expectedBody); - } finally { - server.stop(0); - file.toFile().setReadable(true, false); - } + if (Platform.isWindows()) { + throw new SkipException("Not applicable on Windows"); + } + var expectedBody = openHTML + """ + <h1>File not found</h1> + <p>/aFile.txt</p> + """ + closeHTML; + var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); + var root = Files.createDirectory(TEST_DIR.resolve("testNotReadableFileGET")); + var file = Files.writeString(root.resolve("aFile.txt"), "some text", CREATE); + + file.toFile().setReadable(false, false); + assert !Files.isReadable(file); + + var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); + server.start(); + try { + var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); + var request = HttpRequest.newBuilder(uri(server, "aFile.txt")).build(); + var response = client.send(request, BodyHandlers.ofString()); + assertEquals(response.statusCode(), 404); + assertEquals(response.headers().firstValue("content-length").get(), expectedLength); + assertEquals(response.body(), expectedBody); + } finally { + server.stop(0); + file.toFile().setReadable(true, false); } } @Test public void testNotReadableSegmentGET() throws Exception { - if (!Platform.isWindows()) { // not applicable on Windows - var expectedBody = openHTML + """ - <h1>File not found</h1> - <p>/dir/aFile.txt</p> - """ + closeHTML; - var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); - var root = Files.createDirectory(TEST_DIR.resolve("testNotReadableSegmentGET")); - var dir = Files.createDirectory(root.resolve("dir")); - var file = Files.writeString(dir.resolve("aFile.txt"), "some text", CREATE); - - dir.toFile().setReadable(false, false); - assert !Files.isReadable(dir); - assert Files.isReadable(file); - - var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); - server.start(); - try { - var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); - var request = HttpRequest.newBuilder(uri(server, "dir/aFile.txt")).build(); - var response = client.send(request, BodyHandlers.ofString()); - assertEquals(response.statusCode(), 404); - assertEquals(response.headers().firstValue("content-length").get(), expectedLength); - assertEquals(response.body(), expectedBody); - } finally { - server.stop(0); - dir.toFile().setReadable(true, false); - } + if (Platform.isWindows()) { + throw new SkipException("Not applicable on Windows"); + } + var expectedBody = openHTML + """ + <h1>File not found</h1> + <p>/dir/aFile.txt</p> + """ + closeHTML; + var expectedLength = Integer.toString(expectedBody.getBytes(UTF_8).length); + var root = Files.createDirectory(TEST_DIR.resolve("testNotReadableSegmentGET")); + var dir = Files.createDirectory(root.resolve("dir")); + var file = Files.writeString(dir.resolve("aFile.txt"), "some text", CREATE); + + dir.toFile().setReadable(false, false); + assert !Files.isReadable(dir); + assert Files.isReadable(file); + + var server = SimpleFileServer.createFileServer(LOOPBACK_ADDR, root, OutputLevel.VERBOSE); + server.start(); + try { + var client = HttpClient.newBuilder().proxy(NO_PROXY).build(); + var request = HttpRequest.newBuilder(uri(server, "dir/aFile.txt")).build(); + var response = client.send(request, BodyHandlers.ofString()); + assertEquals(response.statusCode(), 404); + assertEquals(response.headers().firstValue("content-length").get(), expectedLength); + assertEquals(response.body(), expectedBody); + } finally { + server.stop(0); + dir.toFile().setReadable(true, false); } } @@ -680,18 +682,22 @@ var iae = expectThrows(IAE, () -> SimpleFileServer.createFileServer(addr, p, OutputLevel.INFO)); assertTrue(iae.getMessage().contains("does not exist")); } - { // not readable - if (!Platform.isWindows()) { // not applicable on Windows - Path p = Files.createDirectory(TEST_DIR.resolve("aDir")); - p.toFile().setReadable(false, false); - assert !Files.isReadable(p); - try { - var iae = expectThrows(IAE, () -> SimpleFileServer.createFileServer(addr, p, OutputLevel.INFO)); - assertTrue(iae.getMessage().contains("not readable")); - } finally { - p.toFile().setReadable(true, false); - } - } + } + + @Test + public void testNonReadablePath() throws Exception { + if (Platform.isWindows()) { + throw new SkipException("Not applicable on Windows"); + } + var addr = LOOPBACK_ADDR; + Path p = Files.createDirectory(TEST_DIR.resolve("aDir")); + p.toFile().setReadable(false, false); + assert !Files.isReadable(p); + try { + var iae = expectThrows(IAE, () -> SimpleFileServer.createFileServer(addr, p, OutputLevel.INFO)); + assertTrue(iae.getMessage().contains("not readable")); + } finally { + p.toFile().setReadable(true, false); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java --- openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -78,7 +78,7 @@ static final String LOOPBACK_ADDR = InetAddress.getLoopbackAddress().getHostAddress(); static final AtomicInteger PORT = new AtomicInteger(); - static SSLContext sslContext; + private static final SSLContext sslContext = SimpleSSLContext.findSSLContext(); @BeforeTest public void setup() throws IOException { @@ -86,10 +86,6 @@ FileUtils.deleteFileTreeWithRetry(TEST_DIR); } Files.createDirectories(TEST_DIR); - - sslContext = new SimpleSSLContext().get(); - if (sslContext == null) - throw new AssertionError("Unexpected null sslContext"); } @Test diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 @@ pt.y + choice.getHeight()*3/4); // testing that ItemEvent doesn't generated on a simple // mouse click when the dropdown appears under mouse : 6425067 + robot.waitForIdle(); + robot.delay(250); stateChanged = false; openChoice(); closeChoice(); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact 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 4041703 4096228 4025223 4260929 - @summary Ensures that appletviewer sets a reasonable default focus for an Applet on start - @library ../../regtesthelpers - @build Util - @run main AppletInitialFocusTest -*/ - -import java.awt.Button; -import java.awt.FlowLayout; -import java.awt.Frame; -import java.awt.Robot; -import test.java.awt.regtesthelpers.Util; - -public class AppletInitialFocusTest extends Frame { - - Robot robot = Util.createRobot(); - Button button = new Button("Button"); - - public static void main(final String[] args) throws Exception { - AppletInitialFocusTest app = new AppletInitialFocusTest(); - app.init(); - app.start(); - } - - public void init() { - setSize(200, 200); - setLocationRelativeTo(null); - setLayout(new FlowLayout()); - add(button); - setVisible(true); - } - - public void start() throws Exception { - Thread thread = new Thread(new Runnable() { - public void run() { - Util.waitTillShown(button); - robot.delay(1000); // delay the thread to let EDT to start dispatching focus events - Util.waitForIdle(robot); - if (!button.hasFocus()) { - throw new RuntimeException("Appletviewer doesn't set default focus correctly."); - } - } - }); - thread.start(); - thread.join(); - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please 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.FlowLayout; -import java.awt.Frame; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; - -/** - * @test - * @key headful - * @bug 4411534 4517274 - * @summary ensures that user's requestFocus() during applet initialization - * is not ignored - */ -public class AppletInitialFocusTest1 extends Frame implements FocusListener { - - Button button1 = new Button("Button1"); - Button button2 = new Button("Button2"); - private static volatile Object focused; - - public static void main(final String[] args) throws Exception { - AppletInitialFocusTest1 app = new AppletInitialFocusTest1(); - try { - app.setSize(200, 200); - app.setLocationRelativeTo(null); - app.setLayout(new FlowLayout()); - - app.button1.addFocusListener(app); - app.button2.addFocusListener(app); - app.add(app.button1); - app.add(app.button2); - app.setVisible(true); - app.button2.requestFocus(); - // wait for the very very last focus event - Thread.sleep(10000); - if (app.button2 != focused) { - throw new RuntimeException("Wrong focus owner: " + focused); - } - } finally { - app.dispose(); - } - } - - public void focusGained(FocusEvent e) { - focused = e.getSource(); - System.out.println("focused = " + focused); - } - - public void focusLost(FocusEvent e) { - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ JTextField tf1 = new JTextField(" "); JTextField tf2 = new JTextField(" "); JTextField tf3 = new JTextField(" "); - AtomicBoolean typed = new AtomicBoolean(false); + final AtomicBoolean typed = new AtomicBoolean(false); FocusListener listener1; FocusListener listener2; @@ -114,6 +114,7 @@ f1.setLocationRelativeTo(null); f1.setVisible(true); Util.waitForIdle(robot); + robot.delay(1000); /* * Break the sequence of LW requests in the middle. diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 4041703 4096228 4025223 4260929 + @summary Ensures that reasonable default focus is set correctly on start + @library ../../regtesthelpers + @build Util + @run main InitialFocusTest +*/ + +import java.awt.Button; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Robot; +import test.java.awt.regtesthelpers.Util; + +public class InitialFocusTest extends Frame { + + Robot robot = Util.createRobot(); + Button button = new Button("Button"); + + public static void main(final String[] args) throws Exception { + InitialFocusTest app = new InitialFocusTest(); + app.init(); + app.start(); + } + + public void init() { + setSize(200, 200); + setLocationRelativeTo(null); + setLayout(new FlowLayout()); + add(button); + setVisible(true); + } + + public void start() throws Exception { + Thread thread = new Thread(new Runnable() { + public void run() { + Util.waitTillShown(button); + robot.delay(1000); // delay the thread to let EDT to start dispatching focus events + Util.waitForIdle(robot); + if (!button.hasFocus()) { + throw new RuntimeException("default focus is not set correctly."); + } + } + }); + thread.start(); + thread.join(); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest1.java openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest1.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest1.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Focus/InitialFocusTest/InitialFocusTest1.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.EventQueue; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Robot; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; + +/** + * @test + * @key headful + * @bug 4411534 4517274 + * @summary ensures that user's requestFocus() during frame initialization + * is not ignored + */ +public class InitialFocusTest1 extends Frame implements FocusListener { + + Button button1 = new Button("Button1"); + Button button2 = new Button("Button2"); + private static volatile Object focused; + private static InitialFocusTest1 app; + + public static void main(final String[] args) throws Exception { + try { + Robot robot = new Robot(); + EventQueue.invokeAndWait(() -> { + app = new InitialFocusTest1(); + app.setLayout(new FlowLayout()); + + app.button1.addFocusListener(app); + app.button2.addFocusListener(app); + app.add(app.button1); + app.add(app.button2); + + app.setSize(200, 200); + app.setLocationRelativeTo(null); + app.setVisible(true); + }); + robot.waitForIdle(); + robot.delay(1000); + EventQueue.invokeAndWait(() -> { + app.button2.requestFocus(); + }); + // wait for the very very last focus event + robot.delay(1000); + if (app.button2 != focused) { + throw new RuntimeException("Wrong focus owner: " + focused); + } + } finally { + EventQueue.invokeAndWait(() -> app.dispose()); + } + } + + public void focusGained(FocusEvent e) { + focused = e.getSource(); + System.out.println("focused = " + focused); + } + + public void focusLost(FocusEvent e) { + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,7 +25,7 @@ /** * @test - * @bug 8346952 + * @bug 8346952 8361521 * @summary Verifies no exception occurs when triggering updateCG() * for an ownerless window. * @key headful diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/FrameSetMinimumSizeTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/FrameSetMinimumSizeTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/FrameSetMinimumSizeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/FrameSetMinimumSizeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Frame; +import java.awt.Robot; /* * @test @@ -35,57 +36,65 @@ public class FrameSetMinimumSizeTest { private static Frame f; - private static volatile boolean passed; - + private static Robot robot; public static void main(String[] args) throws Exception { - EventQueue.invokeAndWait(() -> { - try { - createAndShowUI(); - - f.setSize(200, 200); - passed = verifyFrameSize(new Dimension(300, 300)); - isFrameSizeOk(passed); - - f.setSize(200, 400); - passed = verifyFrameSize(new Dimension(300, 400)); - isFrameSizeOk(passed); - - f.setSize(400, 200); - passed = verifyFrameSize(new Dimension(400, 300)); - isFrameSizeOk(passed); - - f.setMinimumSize(null); - - f.setSize(200, 200); - passed = verifyFrameSize(new Dimension(200, 200)); - isFrameSizeOk(passed); - } finally { + robot = new Robot(); + try { + EventQueue.invokeAndWait(FrameSetMinimumSizeTest::createAndShowUI); + robot.waitForIdle(); + robot.delay(500); + + test( + new Dimension(200, 200), + new Dimension(300, 300) + ); + + test( + new Dimension(200, 400), + new Dimension(300, 400) + ); + + test( + new Dimension(400, 200), + new Dimension(400, 300) + ); + + EventQueue.invokeAndWait(() -> f.setMinimumSize(null)); + test( + new Dimension(200, 200), + new Dimension(200, 200) + ); + } finally { + EventQueue.invokeAndWait(() -> { if (f != null) { f.dispose(); } - } - }); + }); + } + } + + private static void test(Dimension size, Dimension expected) throws Exception { + robot.waitForIdle(); + robot.delay(250); + EventQueue.invokeAndWait(() -> f.setSize(size)); + robot.waitForIdle(); + EventQueue.invokeAndWait(() -> verifyFrameSize(expected)); } private static void createAndShowUI() { f = new Frame("Minimum Size Test"); f.setSize(300, 300); f.setMinimumSize(new Dimension(300, 300)); + f.setLocationRelativeTo(null); f.setVisible(true); } - private static boolean verifyFrameSize(Dimension expected) { - + private static void verifyFrameSize(Dimension expected) { if (f.getSize().width != expected.width || f.getSize().height != expected.height) { - return false; - } - return true; - } - - private static void isFrameSizeOk(boolean passed) { - if (!passed) { - throw new RuntimeException("Frame's setMinimumSize not honoured for the" + - " frame size: " + f.getSize()); + String message = + "Frame's setMinimumSize not honoured for the frame size: %s. Expected %s" + .formatted(f.getSize(), expected); + throw new RuntimeException(message); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/FrameVisualTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/FrameVisualTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/FrameVisualTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/FrameVisualTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * 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,62 +46,71 @@ public class FrameVisualTest { private static GraphicsConfiguration[] gcs; private static volatile Frame[] frames; - private static volatile int index; - private static Frame f; private static Robot robot; + private static volatile int frameNum; private static volatile Point p; private static volatile Dimension d; private static final int TOLERANCE = 5; + private static final int MAX_FRAME_COUNT = 30; public static void main(String[] args) throws Exception { - gcs = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getConfigurations(); + gcs = GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice().getConfigurations(); robot = new Robot(); robot.setAutoDelay(100); - try { - EventQueue.invokeAndWait(() -> { - createAndShowUI(); - }); - robot.delay(1000); - System.out.println("frames.length: "+frames.length); - for (index = 0; index < frames.length; index++) { + + // Limit the number of frames tested if needed + if (gcs.length > MAX_FRAME_COUNT) { + frames = new Frame[MAX_FRAME_COUNT]; + } else { + frames = new Frame[gcs.length]; + } + System.out.println(gcs.length + " gcs found. Testing " + + frames.length + " frame(s)."); + + for (frameNum = 0; frameNum < frames.length; frameNum++) { + try { + EventQueue.invokeAndWait(() -> { + frames[frameNum] = new Frame("Frame w/ gc " + + frameNum, gcs[frameNum]); + frames[frameNum].setSize(100, 100); + frames[frameNum].setUndecorated(true); + frames[frameNum].setBackground(Color.WHITE); + frames[frameNum].setVisible(true); + System.out.println("Frame " + frameNum + " created"); + }); + + robot.delay(1000); + EventQueue.invokeAndWait(() -> { - p = frames[index].getLocation(); - d = frames[index].getSize(); + p = frames[frameNum].getLocation(); + d = frames[frameNum].getSize(); }); + Rectangle rect = new Rectangle(p, d); BufferedImage img = robot.createScreenCapture(rect); if (chkImgBackgroundColor(img)) { try { - ImageIO.write(img, "png", new File("Frame_" + index + ".png")); + ImageIO.write(img, "png", + new File("Frame_" + + frameNum + ".png")); } catch (IOException ignored) {} - throw new RuntimeException("Frame visual test failed with non-white background color"); + throw new RuntimeException("Frame visual test " + + "failed with non-white background color"); } - } - } finally { - for (index = 0; index < frames.length; index++) { + } finally { EventQueue.invokeAndWait(() -> { - if (frames[index] != null) { - frames[index].dispose(); + if (frames[frameNum] != null) { + frames[frameNum].dispose(); + System.out.println("Frame " + frameNum + " disposed"); } }); } } } - private static void createAndShowUI() { - frames = new Frame[gcs.length]; - for (int i = 0; i < frames.length; i++) { - frames[i] = new Frame("Frame w/ gc " + i, gcs[i]); - frames[i].setSize(100, 100); - frames[i].setUndecorated(true); - frames[i].setBackground(Color.WHITE); - frames[i].setVisible(true); - } - } - private static boolean chkImgBackgroundColor(BufferedImage img) { - // scan for mid-line and if it is non-white color then return true. for (int x = 1; x < img.getWidth() - 1; ++x) { Color c = new Color(img.getRGB(x, img.getHeight() / 2)); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -24,18 +24,22 @@ /* * @test * @key headful - * @summary To check proper WINDOW_EVENTS are triggered when Frame gains or losses the focus - * @library /lib/client - * @build ExtendedRobot + * @summary To check proper WINDOW_EVENTS are triggered when Frame gains + * or loses the focus * @run main ActiveAWTWindowTest */ +import java.awt.AWTException; import java.awt.BorderLayout; import java.awt.Button; 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.Point; +import java.awt.Robot; import java.awt.TextField; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -43,101 +47,74 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowFocusListener; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import javax.swing.JButton; +import javax.swing.JComponent; public class ActiveAWTWindowTest { - private Frame frame, frame2; - private Button button, button2; - private TextField textField, textField2; - private volatile int eventType; - private final Object lock1 = new Object(); - private final Object lock2 = new Object(); - private final Object lock3 = new Object(); - private boolean passed = true; - private final int delay = 150; + private static Frame frame, frame2; + private static Button button, button2; + private static TextField textField, textField2; + + private static CountDownLatch windowActivatedLatch = new CountDownLatch(1); + private static CountDownLatch windowDeactivatedLatch = new CountDownLatch(1); + private static CountDownLatch windowFocusGainedLatch = new CountDownLatch(1); public static void main(String[] args) throws Exception { - ActiveAWTWindowTest test = new ActiveAWTWindowTest(); - try { - test.doTest(); - } finally { - EventQueue.invokeAndWait(() -> { - if (test.frame != null) { - test.frame.dispose(); - } - if (test.frame2 != null) { - test.frame2.dispose(); - } - }); - } - } - - public ActiveAWTWindowTest() { - try{ - EventQueue.invokeAndWait( () -> { - initializeGUI(); - }); - } catch (Exception e) { - e.printStackTrace(); - throw new RuntimeException("Interrupted or unexpected Exception occured"); - } + EventQueue.invokeAndWait(() -> { + initializeGUI(); + }); + doTest(); + EventQueue.invokeAndWait(() -> { + if (frame != null) { + frame.dispose(); + } + if (frame2 != null) { + frame2.dispose(); + } + }); } - private void initializeGUI() { + private static void initializeGUI() { frame = new Frame(); frame.setLayout(new FlowLayout()); - frame.setLocation(5, 20); frame.setSize(200, 200); frame.setUndecorated(true); + frame.addWindowFocusListener(new WindowFocusListener() { + @Override public void windowGainedFocus(WindowEvent event) { System.out.println("Frame Focus gained"); - synchronized (lock3) { - try { - lock3.notifyAll(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } + windowFocusGainedLatch.countDown(); } + @Override public void windowLostFocus(WindowEvent event) { - System.out.println("Frame Focus lost"); + System.out.println("Frame Focus lost"); } }); + frame.addWindowListener(new WindowAdapter() { + @Override public void windowActivated(WindowEvent e) { - eventType = WindowEvent.WINDOW_ACTIVATED; - System.out.println("Undecorated Frame is activated\n"); - synchronized (lock1) { - try { - lock1.notifyAll(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } + System.out.println("Undecorated Frame is activated"); + windowActivatedLatch.countDown(); } + @Override public void windowDeactivated(WindowEvent e) { - eventType = WindowEvent.WINDOW_DEACTIVATED; - System.out.println("Undecorated Frame got Deactivated\n"); - synchronized (lock2) { - try { - lock2.notifyAll(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } + System.out.println("Undecorated Frame got Deactivated"); + windowDeactivatedLatch.countDown(); } }); + textField = new TextField("TextField"); button = new Button("Click me"); - button.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - textField.setText("Focus gained"); - } - }); + button.addActionListener(e -> textField.setText("Focus gained")); frame.setBackground(Color.green); frame.add(button); @@ -149,86 +126,46 @@ frame2.setLocation(5, 250); frame2.setSize(200, 200); frame2.setBackground(Color.green); + button2 = new Button("Click me"); textField2 = new TextField("TextField"); - button2.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - textField2.setText("Got the focus"); - } - }); + button2.addActionListener(e -> textField2.setText("Got the focus")); frame2.add(button2, BorderLayout.SOUTH); frame2.add(textField2, BorderLayout.NORTH); frame2.setVisible(true); - - frame.toFront(); } - public void doTest() { - ExtendedRobot robot; - try { - robot = new ExtendedRobot(); - } catch (Exception e) { - e.printStackTrace(); - throw new RuntimeException("Cannot create robot"); - } - - robot.setAutoDelay(delay); + private static void doTest() throws AWTException, InterruptedException { + Robot robot = new Robot(); + robot.setAutoDelay(150); robot.setAutoWaitForIdle(true); - - robot.waitForIdle(5*delay); - robot.mouseMove(button.getLocationOnScreen().x + button.getSize().width / 2, - button.getLocationOnScreen().y + button.getSize().height / 2); - robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); - robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); - - if (eventType != WindowEvent.WINDOW_ACTIVATED) { - synchronized (lock1) { - try { - lock1.wait(delay * 10); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - if (eventType != WindowEvent.WINDOW_ACTIVATED) { - passed = false; - System.err.println("WINDOW_ACTIVATED event did not occur when the " + - "undecorated frame is activated!"); + if (!windowFocusGainedLatch.await(1000, TimeUnit.MILLISECONDS)) { + throw new RuntimeException("Frame did not gain focus"); } + clickButtonCenter(robot, button); - eventType = -1; - - robot.mouseMove(button2.getLocationOnScreen().x + button2.getSize().width / 2, - button2.getLocationOnScreen().y + button2.getSize().height / 2); - robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); - robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); - - if (eventType != WindowEvent.WINDOW_DEACTIVATED) { - synchronized (lock2) { - try { - lock2.wait(delay * 10); - } catch (Exception e) { - } - } + if (!windowActivatedLatch.await(1000, TimeUnit.MILLISECONDS)) { + throw new RuntimeException("Frame was not activated"); } - if (eventType != WindowEvent.WINDOW_DEACTIVATED) { - passed = false; - System.err.println("FAIL: WINDOW_DEACTIVATED event did not occur for the " + - "undecorated frame when another frame gains focus!"); + clickButtonCenter(robot, button2); + + if (!windowDeactivatedLatch.await(2000, TimeUnit.MILLISECONDS)) { + throw new RuntimeException("Frame was not deactivated"); } if (frame.hasFocus()) { - passed = false; - System.err.println("FAIL: The undecorated frame has focus even when " + - "another frame is clicked!"); + throw new RuntimeException("Frame did not lose focus"); } + } - if (!passed) { - //captureScreenAndSave(); - System.err.println("Test failed!"); - throw new RuntimeException("Test failed."); - } else { - System.out.println("Test passed"); - } + private static void clickButtonCenter(Robot robot, Component button) { + Point location = button.getLocationOnScreen(); + Dimension size = button.getSize(); + int x = location.x + size.width / 2; + int y = location.y + size.height / 2; + robot.mouseMove(x, y); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); } } + diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/MultiScreenTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/MultiScreenTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/MultiScreenTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Frame/MultiScreenTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +43,7 @@ import java.awt.RenderingHints; import java.awt.TextField; +import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -74,7 +75,7 @@ ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); gs = ge.getScreenDevices(); if (gs.length < 2) { - throw new SkippedException("You have only one monitor in your system - test passed"); + throw new SkippedException("You have only one monitor in your system"); } MultiScreenTest obj = new MultiScreenTest(); String INSTRUCTIONS = @@ -82,38 +83,42 @@ "You have " + gs.length + " monitors in your system.\n" + "Actively drag the DitherTest frames on the secondary screen and " + "if you see garbage appearing on your primary screen " + - "test failed otherwise it passed.";; + "test failed otherwise it passed."; PassFailJFrame.builder() - .title("MultiScreenTest Instruction") .instructions(INSTRUCTIONS) - .rows((int) INSTRUCTIONS.lines().count() + 2) .columns(40) .testUI(obj::init) + .positionTestUI(MultiScreenTest::positionTestWindows) .build() .awaitAndCheck(); } + private static void positionTestWindows(List<Window> windows, PassFailJFrame.InstructionUI instructionUI) { + // Do nothing - the location of each window is set when they're created + } + public List<JFrame> init() { List<JFrame> list = new ArrayList<>(); for (int j = 0; j < gs.length; j++) { GraphicsConfiguration[] gc = gs[j].getConfigurations(); if (gc.length > 0) { - for (int i = 0; i < gc.length / 2; i++) { - JFrame f = new JFrame(gc[i]); //test JFrame( gc ) - GCCanvas c = new GCCanvas(gc[i]);//test canvas( gc ) - Rectangle gcBounds = gc[i].getBounds(); //test getBounds() + for (int i = 0; i < gc.length && i < 10; i++) { + JFrame f = new JFrame(gc[i]); + GCCanvas c = new GCCanvas(gc[i]); + Rectangle gcBounds = gc[i].getBounds(); int xoffs = gcBounds.x; int yoffs = gcBounds.y; f.getContentPane().add(c); - f.setTitle("Screen# " + Integer.toString(j) + ", GC#" + Integer.toString(i)); + f.setTitle("Screen# " + j + ", GC#" + i); f.setSize(300, 200); - f.setLocation(400 + xoffs, (i * 150) + yoffs);//test displaying in right location + // test displaying in right location + f.setLocation(400 + xoffs, (i * 150) + yoffs); list.add(f); - Frame ditherfs = new Frame("DitherTest GC#" + Integer.toString(i), gc[i]); - ditherfs.setLayout(new BorderLayout()); //showDitherTest + Frame ditherfs = new Frame("DitherTest GC#" + i, gc[i]); + ditherfs.setLayout(new BorderLayout()); DitherTest ditherTest = new DitherTest(gc[i]); ditherfs.add("Center", ditherTest); ditherfs.setBounds(300, 200, 300, 200); @@ -126,360 +131,368 @@ } return list; } -} -class GCCanvas extends Canvas { - - GraphicsConfiguration gc; - Rectangle bounds; - Graphics g = this.getGraphics(); - Dimension size = getSize(); - - public GCCanvas(GraphicsConfiguration gc) { - super(gc); - this.gc = gc; - bounds = gc.getBounds(); - } - public void paint( Graphics _g ) { + static class GCCanvas extends Canvas { - Graphics2D g = (Graphics2D) _g; + GraphicsConfiguration gc; + Rectangle bounds; + Dimension size = getSize(); - g.drawRect(0, 0, size.width-1, size.height-1); - g.setColor(Color.lightGray); - g.draw3DRect(1, 1, size.width-3, size.height-3, true); + public GCCanvas(GraphicsConfiguration gc) { + super(gc); + this.gc = gc; + bounds = gc.getBounds(); + } - g.setColor(Color.red); - g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + @Override + public void paint( Graphics _g ) { - g.drawString("HELLO!", 110, 10); + Graphics2D g = (Graphics2D) _g; - g.setColor(Color.blue); - g.drawString("ScreenSize="+Integer.toString(bounds.width)+"X"+ - Integer.toString(bounds.height), 10, 20); - g.setColor(Color.green); - g.drawString(gc.toString(), 10, 30); - g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); + g.drawRect(0, 0, size.width-1, size.height-1); + g.setColor(Color.lightGray); + g.draw3DRect(1, 1, size.width-3, size.height-3, true); - g.setColor(Color.orange); - g.fillRect(40, 20, 50, 50); + g.setColor(Color.red); + g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - g.setColor(Color.red); - g.drawRect(100, 20, 30, 30); + g.drawString("HELLO!", 110, 10); - g.setColor(Color.gray); - g.drawLine(220, 20, 280, 40); + g.setColor(Color.blue); + g.drawString("ScreenSize="+Integer.toString(bounds.width)+"X"+ + Integer.toString(bounds.height), 10, 20); + g.setColor(Color.green); + g.drawString(gc.toString(), 10, 30); + g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); - g.setColor(Color.cyan); - g.fillArc(150, 30, 30, 30, 0, 200); - } + g.setColor(Color.orange); + g.fillRect(40, 20, 50, 50); - public Dimension getPreferredSize(){ - return new Dimension(300, 200); - } -} + g.setColor(Color.red); + g.drawRect(100, 20, 30, 30); -class DitherCanvas extends Canvas { - Image img; - static String calcString = "Calculating..."; - - GraphicsConfiguration mGC; - - public DitherCanvas(GraphicsConfiguration gc) { - super(gc); - mGC = gc; - } + g.setColor(Color.gray); + g.drawLine(220, 20, 280, 40); - public GraphicsConfiguration getGraphicsConfig() { - return mGC; - } + g.setColor(Color.cyan); + g.fillArc(150, 30, 30, 30, 0, 200); + } - public void paint(Graphics g) { - int w = getSize().width; - int h = getSize().height; - if (img == null) { - super.paint(g); - g.setColor(Color.black); - FontMetrics fm = g.getFontMetrics(); - int x = (w - fm.stringWidth(calcString)) / 2; - int y = h / 2; - g.drawString(calcString, x, y); - } else { - g.drawImage(img, 0, 0, w, h, this); + @Override + public Dimension getPreferredSize(){ + return new Dimension(300, 200); } } - public void update(Graphics g) { - paint(g); - } + static class DitherCanvas extends Canvas { + Image img; + static String calcString = "Calculating..."; - public Dimension getMinimumSize() { - return new Dimension(20, 20); - } + GraphicsConfiguration mGC; - public Dimension getPreferredSize() { - return new Dimension(200, 200); - } + public DitherCanvas(GraphicsConfiguration gc) { + super(gc); + mGC = gc; + } - public Image getImage() { - return img; - } + public GraphicsConfiguration getGraphicsConfig() { + return mGC; + } - public void setImage(Image img) { - this.img = img; - paint(getGraphics()); - } -} + @Override + public void paint(Graphics g) { + int w = getSize().width; + int h = getSize().height; + if (img == null) { + super.paint(g); + g.setColor(Color.black); + FontMetrics fm = g.getFontMetrics(); + int x = (w - fm.stringWidth(calcString)) / 2; + int y = h / 2; + g.drawString(calcString, x, y); + } else { + g.drawImage(img, 0, 0, w, h, this); + } + } -class DitherTest extends Panel implements Runnable { - final static int NOOP = 0; - final static int RED = 1; - final static int GREEN = 2; - final static int BLUE = 3; - final static int ALPHA = 4; - final static int SATURATION = 5; - - Thread runner; - - DitherControls XControls; - DitherControls YControls; - DitherCanvas canvas; - - public DitherTest(GraphicsConfiguration gc) { - String xspec, yspec; - int xvals[] = new int[2]; - int yvals[] = new int[2]; - - xspec = "red"; - yspec = "blue"; - int xmethod = colormethod(xspec, xvals); - int ymethod = colormethod(yspec, yvals); - - setLayout(new BorderLayout()); - XControls = new DitherControls(this, xvals[0], xvals[1], - xmethod, false); - YControls = new DitherControls(this, yvals[0], yvals[1], - ymethod, true); - YControls.addRenderButton(); - add("North", XControls); - add("South", YControls); - add("Center", canvas = new DitherCanvas(gc)); - } + @Override + public void update(Graphics g) { + paint(g); + } - public void start() { - runner = new Thread(this); - runner.start(); - } + @Override + public Dimension getMinimumSize() { + return new Dimension(20, 20); + } - int colormethod(String s, int vals[]) { - int method = NOOP; + @Override + public Dimension getPreferredSize() { + return new Dimension(200, 200); + } - if (s == null) { - s = ""; + public Image getImage() { + return img; } - String lower = s.toLowerCase(); - int len = 0; - if (lower.startsWith("red")) { - method = RED; - lower = lower.substring(3); - } else if (lower.startsWith("green")) { - method = GREEN; - lower = lower.substring(5); - } else if (lower.startsWith("blue")) { - method = BLUE; - lower = lower.substring(4); - } else if (lower.startsWith("alpha")) { - method = ALPHA; - lower = lower.substring(4); - } else if (lower.startsWith("saturation")) { - method = SATURATION; - lower = lower.substring(10); - } - - if (method == NOOP) { - vals[0] = 0; - vals[1] = 0; - return method; + public void setImage(Image img) { + this.img = img; + paint(getGraphics()); } + } - int begval = 0; - int endval = 255; + static class DitherTest extends Panel implements Runnable { + final static int NOOP = 0; + final static int RED = 1; + final static int GREEN = 2; + final static int BLUE = 3; + final static int ALPHA = 4; + final static int SATURATION = 5; - try { - int dash = lower.indexOf('-'); - if (dash < 0) { - begval = endval = Integer.parseInt(lower); - } else { - begval = Integer.parseInt(lower.substring(0, dash)); - endval = Integer.parseInt(lower.substring(dash + 1)); - } - } catch (Exception e) { - } + Thread runner; - if (begval < 0) { - begval = 0; - } - if (endval < 0) { - endval = 0; - } - if (begval > 255) { - begval = 255; + DitherControls XControls; + DitherControls YControls; + DitherCanvas canvas; + + public DitherTest(GraphicsConfiguration gc) { + String xspec, yspec; + int xvals[] = new int[2]; + int yvals[] = new int[2]; + + xspec = "red"; + yspec = "blue"; + int xmethod = colormethod(xspec, xvals); + int ymethod = colormethod(yspec, yvals); + + setLayout(new BorderLayout()); + XControls = new DitherControls(this, xvals[0], xvals[1], + xmethod, false); + YControls = new DitherControls(this, yvals[0], yvals[1], + ymethod, true); + YControls.addRenderButton(); + add("North", XControls); + add("South", YControls); + add("Center", canvas = new DitherCanvas(gc)); } - if (endval > 255) { - endval = 255; + + public void start() { + runner = new Thread(this); + runner.start(); } - vals[0] = begval; - vals[1] = endval; + int colormethod(String s, int vals[]) { + int method = NOOP; - return method; - } + if (s == null) { + s = ""; + } - void applymethod(int c[], int method, int step, int total, int vals[]) { - if (method == NOOP) - return; - int val = ((total < 2) - ? vals[0] - : vals[0] + ((vals[1] - vals[0]) * step / (total - 1))); - switch (method) { - case RED: - c[0] = val; - break; - case GREEN: - c[1] = val; - break; - case BLUE: - c[2] = val; - break; - case ALPHA: - c[3] = val; - break; - case SATURATION: - int max = Math.max(Math.max(c[0], c[1]), c[2]); - int min = max * (255 - val) / 255; - if (c[0] == 0) { - c[0] = min; - } - if (c[1] == 0) { - c[1] = min; - } - if (c[2] == 0) { - c[2] = min; - } - break; - } - } + String lower = s.toLowerCase(); + int len = 0; + if (lower.startsWith("red")) { + method = RED; + lower = lower.substring(3); + } else if (lower.startsWith("green")) { + method = GREEN; + lower = lower.substring(5); + } else if (lower.startsWith("blue")) { + method = BLUE; + lower = lower.substring(4); + } else if (lower.startsWith("alpha")) { + method = ALPHA; + lower = lower.substring(4); + } else if (lower.startsWith("saturation")) { + method = SATURATION; + lower = lower.substring(10); + } - public void run() { - canvas.setImage(null); // Wipe previous image - Image img = calculateImage(); - synchronized (this) { - if (img != null && runner == Thread.currentThread()) { - canvas.setImage(img); + if (method == NOOP) { + vals[0] = 0; + vals[1] = 0; + return method; } - } - } - /** - * Calculates and returns the image. Halts the calculation and returns - * null if stopped during the calculation. - */ - Image calculateImage() { - Thread me = Thread.currentThread(); - - int width = canvas.getSize().width; - int height = canvas.getSize().height; - int xvals[] = new int[2]; - int yvals[] = new int[2]; - int xmethod = XControls.getParams(xvals); - int ymethod = YControls.getParams(yvals); - int pixels[] = new int[width * height]; - int c[] = new int[4]; - int index = 0; - - for (int j = 0; j < height; j++) { - for (int i = 0; i < width; i++) { - c[0] = c[1] = c[2] = 0; - c[3] = 255; - if (xmethod < ymethod) { - applymethod(c, xmethod, i, width, xvals); - applymethod(c, ymethod, j, height, yvals); + int begval = 0; + int endval = 255; + + try { + int dash = lower.indexOf('-'); + if (dash < 0) { + begval = endval = Integer.parseInt(lower); } else { - applymethod(c, ymethod, j, height, yvals); - applymethod(c, xmethod, i, width, xvals); + begval = Integer.parseInt(lower.substring(0, dash)); + endval = Integer.parseInt(lower.substring(dash + 1)); } - pixels[index++] = ((c[3] << 24) | - (c[0] << 16) | - (c[1] << 8) | - (c[2] << 0)); + } catch (Exception e) { + } + if (begval < 0) { + begval = 0; + } + if (endval < 0) { + endval = 0; + } + if (begval > 255) { + begval = 255; } - // Poll once per row to see if we've been told to stop. - if (runner != me) { - return null; + if (endval > 255) { + endval = 255; } + + vals[0] = begval; + vals[1] = endval; + + return method; } - return createImage(new MemoryImageSource(width, height, - ColorModel.getRGBdefault(), pixels, 0, width)); - } + void applymethod(int c[], int method, int step, int total, int vals[]) { + if (method == NOOP) + return; + int val = ((total < 2) + ? vals[0] + : vals[0] + ((vals[1] - vals[0]) * step / (total - 1))); + switch (method) { + case RED: + c[0] = val; + break; + case GREEN: + c[1] = val; + break; + case BLUE: + c[2] = val; + break; + case ALPHA: + c[3] = val; + break; + case SATURATION: + int max = Math.max(Math.max(c[0], c[1]), c[2]); + int min = max * (255 - val) / 255; + if (c[0] == 0) { + c[0] = min; + } + if (c[1] == 0) { + c[1] = min; + } + if (c[2] == 0) { + c[2] = min; + } + break; + } + } - public String getInfo() { - return "An interactive demonstration of dithering."; - } + @Override + public void run() { + canvas.setImage(null); // Wipe previous image + Image img = calculateImage(); + synchronized (this) { + if (img != null && runner == Thread.currentThread()) { + canvas.setImage(img); + } + } + } - public String[][] getParameterInfo() { - String[][] info = { - {"xaxis", "{RED, GREEN, BLUE, PINK, ORANGE, MAGENTA, CYAN, WHITE, YELLOW, GRAY, DARKGRAY}", - "The color of the Y axis. Default is RED."}, - {"yaxis", "{RED, GREEN, BLUE, PINK, ORANGE, MAGENTA, CYAN, WHITE, YELLOW, GRAY, DARKGRAY}", - "The color of the X axis. Default is BLUE."} - }; - return info; - } -} + /** + * Calculates and returns the image. Halts the calculation and returns + * null if stopped during the calculation. + */ + Image calculateImage() { + Thread me = Thread.currentThread(); + + int width = canvas.getSize().width; + int height = canvas.getSize().height; + int xvals[] = new int[2]; + int yvals[] = new int[2]; + int xmethod = XControls.getParams(xvals); + int ymethod = YControls.getParams(yvals); + int pixels[] = new int[width * height]; + int c[] = new int[4]; + int index = 0; + + for (int j = 0; j < height; j++) { + for (int i = 0; i < width; i++) { + c[0] = c[1] = c[2] = 0; + c[3] = 255; + if (xmethod < ymethod) { + applymethod(c, xmethod, i, width, xvals); + applymethod(c, ymethod, j, height, yvals); + } else { + applymethod(c, ymethod, j, height, yvals); + applymethod(c, xmethod, i, width, xvals); + } + pixels[index++] = ((c[3] << 24) | + (c[0] << 16) | + (c[1] << 8) | + (c[2] << 0)); -class DitherControls extends Panel implements ActionListener { - TextField start; - TextField end; - Button button; - Choice choice; - DitherTest dt; - - static LayoutManager dcLayout = new FlowLayout(FlowLayout.CENTER, 10, 5); - - public DitherControls(DitherTest app, int s, int e, int type, - boolean vertical) { - dt = app; - setLayout(dcLayout); - add(new Label(vertical ? "Vertical" : "Horizontal")); - add(choice = new Choice()); - choice.addItem("Noop"); - choice.addItem("Red"); - choice.addItem("Green"); - choice.addItem("Blue"); - choice.addItem("Alpha"); - choice.addItem("Saturation"); - choice.select(type); - add(start = new TextField(Integer.toString(s), 4)); - add(end = new TextField(Integer.toString(e), 4)); - } + } + // Poll once per row to see if we've been told to stop. + if (runner != me) { + return null; + } + } - public void addRenderButton() { - add(button = new Button("New Image")); - button.addActionListener(this); - } + return createImage(new MemoryImageSource(width, height, + ColorModel.getRGBdefault(), pixels, 0, width)); + } - public int getParams(int vals[]) { - vals[0] = Integer.parseInt(start.getText()); - vals[1] = Integer.parseInt(end.getText()); - return choice.getSelectedIndex(); + public String getInfo() { + return "An interactive demonstration of dithering."; + } + + public String[][] getParameterInfo() { + String[][] info = { + {"xaxis", "{RED, GREEN, BLUE, PINK, ORANGE, MAGENTA, CYAN, WHITE, YELLOW, GRAY, DARKGRAY}", + "The color of the Y axis. Default is RED."}, + {"yaxis", "{RED, GREEN, BLUE, PINK, ORANGE, MAGENTA, CYAN, WHITE, YELLOW, GRAY, DARKGRAY}", + "The color of the X axis. Default is BLUE."} + }; + return info; + } } - public void actionPerformed(ActionEvent e) { - if (e.getSource() == button) { - dt.start(); + static class DitherControls extends Panel implements ActionListener { + TextField start; + TextField end; + Button button; + Choice choice; + DitherTest dt; + + static LayoutManager dcLayout = new FlowLayout(FlowLayout.CENTER, 10, 5); + + public DitherControls(DitherTest app, int s, int e, int type, + boolean vertical) { + dt = app; + setLayout(dcLayout); + add(new Label(vertical ? "Vertical" : "Horizontal")); + add(choice = new Choice()); + choice.addItem("Noop"); + choice.addItem("Red"); + choice.addItem("Green"); + choice.addItem("Blue"); + choice.addItem("Alpha"); + choice.addItem("Saturation"); + choice.select(type); + add(start = new TextField(Integer.toString(s), 4)); + add(end = new TextField(Integer.toString(e), 4)); + } + + public void addRenderButton() { + add(button = new Button("New Image")); + button.addActionListener(this); + } + + public int getParams(int vals[]) { + vals[0] = Integer.parseInt(start.getText()); + vals[1] = Integer.parseInt(end.getText()); + return choice.getSelectedIndex(); + } + + @Override + public void actionPerformed(ActionEvent e) { + if (e.getSource() == button) { + dt.start(); + } } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +31,16 @@ @run main ButtonActionKeyTest */ -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; +import java.awt.FlowLayout; +import java.awt.Robot; +import javax.swing.AbstractAction; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JTextField; +import javax.swing.KeyStroke; +import java.awt.event.ActionEvent; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; import java.util.concurrent.atomic.AtomicBoolean; import test.java.awt.regtesthelpers.Util; @@ -42,7 +49,7 @@ JFrame frame = new JFrame("Frame"); JButton button = new JButton("button"); JTextField text = new JTextField("text"); - AtomicBoolean gotEvent = new AtomicBoolean(false); + final AtomicBoolean gotEvent = new AtomicBoolean(false); public static void main(String[] args) { ButtonActionKeyTest app = new ButtonActionKeyTest(); @@ -82,9 +89,11 @@ frame.setLocationRelativeTo(null); frame.setVisible(true); Util.waitForIdle(robot); + robot.delay(1000); Util.clickOnComp(button, robot); Util.waitForIdle(robot); + robot.delay(500); if (!button.isFocusOwner()) { throw new Error("Test error: a button didn't gain focus."); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/LightweightComponent/LightWeightTabFocus/LightWeightTabFocus.java openjdk-25-25.0.3+9/test/jdk/java/awt/LightweightComponent/LightWeightTabFocus/LightWeightTabFocus.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/LightweightComponent/LightWeightTabFocus/LightWeightTabFocus.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/LightweightComponent/LightWeightTabFocus/LightWeightTabFocus.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,6 +97,7 @@ } catch (Exception e) { e.printStackTrace(); } finally { + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); EventQueue.invokeAndWait(() -> { if (f != null) { f.dispose(); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -49,40 +49,35 @@ public class PrintDialogsTest extends Panel implements ActionListener { - static final String INSTRUCTIONS = """ - This test is free format, which means there is no enforced or guided sequence. - - Please select each of - (a) The dialog parent type. - (b) The dialog modality type - (c) The print dialog type (Print dialog or Page Setup dialog) - - Once the choices have been made click the "Start test" button. - - Three windows will appear - (1) A Frame or a Dialog - in the case you selected "Dialog" as the parent type - (2) a Window (ie an undecorated top-level) - (3) A dialog with two buttons "Open" and "Finish" - - Now check as follows whether modal blocking works as expected. - Windows (1) and (2) contain a button which you should be able to press - ONLY if you selected "Non-modal", or "Modeless" for modality type. - In other cases window (3) will block input to (1) and (2) - - Then push the "Open" button on the Dialog to show the printing dialog and check - if it blocks the rest of the application - ie all of windows (1), (2) and (3) - should ALWAYS be blocked when the print dialog is showing. - Now cancel the printing dialog and check the correctness of modal blocking - behavior for the Dialog again. - To close all the 3 test windows please push the "Finish" button. - - Repeat all the above for different combinations, which should include - using all of the Dialog parent choices and all of the Dialog Modality types. - - If any behave incorrectly, note the combination of choices and press Fail. - - If all behave correctly, press Pass. - """; + static final String INSTRUCTIONS = + "1. On the Test UI Select:\n" + + "\tThe dialog parent type. (e.g. Frame, Dialog, Hidden, Null)\n" + + "\tThe dialog modality type. (e.g. Modal, Non-Modal, Toolkit modal).\n" + + "\tThe print dialog type. (Print dialog or Page Setup dialog).\n\n" + + "2. Next, click on 'Start test' - Three windows will appear:\n" + + "\tWindow (1) -a Frame or Dialog (depending on selected parent type).\n" + + "\tWindow (2) -an undecorated top-level Window.\n" + + "\tWindow (3) -a Dialog containing two buttons: 'Open' and 'Finish'.\n" + + "\tWindows (1) & (2) have a Dummy button.\n\n" + + "3. Press the button on Window (1) & Window (2) \n" + + "Verification step:\n" + + "\tIf Modality is 'Non-modal' or 'Modeless', Button is pressed \n" + + "\tIf Modality is 'Document' & parent is not Frame/Dialog, Button is pressed \n" + + "\tIn all other cases, button is not pressed & Window (3) should \n" + + "\tblock input to Windows (1) & (2).\n\n" + + "4. Next, press the 'Open' button in Window (3) to open print dialog.\n\n" + + "5. Press the button on Window (1) & Window (2)\n" + + "Verification step:\n" + + "\tThe print dialog should block all three windows (1, 2, and 3).\n\n" + + "6. Cancel the print dialog, Check again if Window (3) " + + "blocks Windows (1) and (2) correctly.\n" + + "Verification step:\n" + + "\tConditions as seen in Verification step 3 " + + "should be seen, as before.\n" + + "To close all test windows, press 'Finish'.\n\n" + + "7. Repeat the steps for different combinations of Dialog Parent, Dialog Modality Type, Print Dialg Type.\n" + + "Try every dialog parent type and every dialog modality type.\n\n" + + "If any of the Verification step fails, note the combination and press 'Fail'.\n"; public static void main(String[] args) throws Exception { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Modal/PrintDialogsTest/Test.java openjdk-25-25.0.3+9/test/jdk/java/awt/Modal/PrintDialogsTest/Test.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Modal/PrintDialogsTest/Test.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Modal/PrintDialogsTest/Test.java 2026-04-17 19:08:13.000000000 +0000 @@ -191,6 +191,7 @@ break; case DIALOG: dialog = new CustomDialog(parent); + break; case FRAME: dialog = new CustomDialog(frame); break; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Modal/ToFront/DialogToFrontModeless1Test.java openjdk-25-25.0.3+9/test/jdk/java/awt/Modal/ToFront/DialogToFrontModeless1Test.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Modal/ToFront/DialogToFrontModeless1Test.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Modal/ToFront/DialogToFrontModeless1Test.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * 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,12 +34,27 @@ * @build Flag * @build TestDialog * @build TestFrame + * @build jdk.test.lib.Platform * @run main DialogToFrontModeless1Test */ +import jdk.test.lib.Platform; +import jtreg.SkippedException; + public class DialogToFrontModeless1Test { public static void main(String[] args) throws Exception { + if (Platform.isOnWayland()) { + // Some tested systems are still use XTEST(X11 protocol) + // for key and mouse press emulation, but this will not work + // outside of X11. + // An emulated input event will reach X11 clients, but not the + // Wayland compositor, which is responsible for window restacking. + // + // This skip can be removed later once all systems switch to + // the default remote desktop XDG portal. + throw new SkippedException("SKIPPED: robot functionality is limited on the current platform."); + } (new DialogToFrontModelessTest()).doTest(); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java openjdk-25-25.0.3+9/test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * 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,110 +22,120 @@ */ /* - @test - @key headful - @bug 6315717 - @summary verifies that drag events are coming for every button if the property is set to true - @author Andrei Dmitriev : area=awt.mouse - @run main ExtraButtonDrag + * @test + * @key headful + * @bug 6315717 + * @summary Verifies that the mouse drag events received for every button if the property is set to true + * @run main ExtraButtonDrag */ -//events from standard should also come - -import java.awt.*; -import java.awt.event.*; - -public class ExtraButtonDrag extends Frame { - static String tk = Toolkit.getDefaultToolkit().getClass().getName(); - static Robot robot; - static int [] buttonsPressed; - static int [] buttonsReleased; - static int [] buttonsClicked; - volatile static boolean dragged = false; - volatile static boolean moved = false; - - public ExtraButtonDrag(){ - super("ExtraButtonDrag"); - } - - public static void main(String []s){ - Frame frame = new ExtraButtonDrag(); - - MouseAdapter ma = new MouseAdapter() { - public void mouseDragged(MouseEvent e) { - System.out.println("Dragged "+e);// +" : "+ e.getButton() + " : " +e.getButtonState(e.getButton())); - dragged = true; - } - public void mouseMoved(MouseEvent e) { - System.out.println("Moved "+e); - moved = true; - } - public void mousePressed(MouseEvent e) { - System.out.println(">>> "+e); - } - public void mouseReleased(MouseEvent e) { - System.out.println(">>> "+e); - } +import java.awt.AWTException; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.MouseInfo; +import java.awt.Point; +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.lang.reflect.InvocationTargetException; + +public class ExtraButtonDrag { + + private static Frame frame; + private static Robot robot; + private static volatile boolean dragged = false; + private static volatile boolean moved = false; + private static volatile Point centerFrame; + private static volatile Point outboundsFrame; + private static final String OS_NAME = System.getProperty("os.name"); + private static MouseAdapter mAdapter = new MouseAdapter() { + @Override + public void mouseDragged(MouseEvent e) { + dragged = true; + } - }; + @Override + public void mouseMoved(MouseEvent e) { + moved = true; + } + }; - frame.addMouseMotionListener(ma); - frame.addMouseListener(ma); + public static void initializeGUI() { + frame = new Frame("ExtraButtonDrag"); + frame.addMouseMotionListener(mAdapter); + frame.addMouseListener(mAdapter); frame.setSize(300, 300); + frame.setLocationRelativeTo(null); frame.setVisible(true); + } + + public static void doTest() + throws InvocationTargetException, InterruptedException { - int [] buttonMask = new int [MouseInfo.getNumberOfButtons()]; //InputEvent.getButtonMasks(); + int[] buttonMask = new int[MouseInfo.getNumberOfButtons()]; - for (int i = 0; i < MouseInfo.getNumberOfButtons(); i++){ - buttonMask[i] = InputEvent.getMaskForButton(i+1); - // System.out.println("TEST: "+tmp[i]); + for (int i = 0; i < MouseInfo.getNumberOfButtons(); i++) { + buttonMask[i] = InputEvent.getMaskForButton(i + 1); } - try { - robot = new Robot(); - robot.delay(1000); - Point centerFrame = new Point(frame.getLocationOnScreen().x + frame.getWidth()/2, frame.getLocationOnScreen().y + frame.getHeight()/2); - Point outboundsFrame = new Point(frame.getLocationOnScreen().x + frame.getWidth()*3/2, frame.getLocationOnScreen().y + frame.getHeight()/2); - - System.out.println("areExtraMouseButtonsEnabled() == " + Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled() ); - - for (int i = 0; i < MouseInfo.getNumberOfButtons(); i++){ - System.out.println("button to drag = " +(i+1) + " : value passed to robot = " +buttonMask[i]); - - try { - dragMouse(buttonMask[i], centerFrame.x, centerFrame.y, outboundsFrame.x, outboundsFrame.y); - } catch (IllegalArgumentException e){ - throw new RuntimeException("Test failed. Exception occured.", e); - } + EventQueue.invokeAndWait(() -> { + Point location = frame.getLocationOnScreen(); + Dimension size = frame.getSize(); + centerFrame = new Point(location.x + size.width / 2, + location.y + size.height / 2); + outboundsFrame = new Point(location.x + size.width * 3 / 2, + location.y + size.height / 2); + }); + + System.out.println("areExtraMouseButtonsEnabled() == " + + Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()); + + for (int i = 0; i < MouseInfo.getNumberOfButtons(); i++) { + System.out.println("button to drag = " + (i + 1) + + " : value passed to robot = " + buttonMask[i]); + + try { + dragMouse(buttonMask[i], centerFrame.x, centerFrame.y, + outboundsFrame.x, outboundsFrame.y); + } catch (IllegalArgumentException e) { + throw new RuntimeException("Test failed. Exception occured.", + e); + } - robot.delay(500); - //this is a choice-case for X protocol issue: native events from extra buttons doesn't contain - // the correct state so it's unable to decide if there is a drag or move. By default we send MOVED event. - //XToolkit: extra buttons should report MOVED events only - //WToolkit: extra buttons should report DRAGGED events only - if (i > 2){ //extra buttons only - if (tk.equals("sun.awt.X11.XToolkit")) { - if (!moved || dragged) { - throw new RuntimeException("Test failed."+ tk +" Button = " +(i+1) + " moved = "+moved +" : dragged = " +dragged); - } - } else { //WToolkit - if (moved || !dragged) { - throw new RuntimeException("Test failed."+ tk +" Button = " +(i+1) + " moved = "+moved +" : dragged = " +dragged); - } + // this is a choice-case for X protocol issue: native events from + // extra buttons doesn't contain + // the correct state so it's unable to decide if there is a drag or + // move. By default we send MOVED event. + // XToolkit: extra buttons should report MOVED events only + // WToolkit: extra buttons should report DRAGGED events only + if (i > 2) { // extra buttons only + if (OS_NAME.equals("Linux")) { + if (!moved || dragged) { + throw new RuntimeException("Test failed." + OS_NAME + + " Button = " + (i + 1) + " moved = " + moved + + " : dragged = " + dragged); } - } else { - if (moved || !dragged){ - throw new RuntimeException("Test failed. Button = " +(i+1) + " not dragged."); + } else { // WToolkit + if (moved || !dragged) { + throw new RuntimeException("Test failed." + OS_NAME + + " Button = " + (i + 1) + " moved = " + moved + + " : dragged = " + dragged); } } + } else { + if (moved || !dragged) { + throw new RuntimeException( + "Test failed. Button = " + (i + 1) + " not dragged."); + } } - } catch (Exception e){ - throw new RuntimeException("", e); } } - public static void dragMouse(int button, int x0, int y0, int x1, int y1){ + public static void dragMouse(int button, int x0, int y0, int x1, int y1) { int curX = x0; int curY = y0; int dx = x0 < x1 ? 1 : -1; @@ -138,12 +148,12 @@ robot.mousePress(button); - while (curX != x1){ + while (curX != x1) { curX += dx; robot.mouseMove(curX, curY); robot.delay(5); } - while (curY != y1 ){ + while (curY != y1) { curY += dy; robot.mouseMove(curX, curY); robot.delay(5); @@ -151,4 +161,30 @@ robot.mouseRelease(button); } + public static void main(String[] s) + throws InvocationTargetException, InterruptedException, AWTException { + try { + robot = new Robot(); + robot.setAutoDelay(10); + robot.setAutoWaitForIdle(true); + + EventQueue.invokeAndWait(ExtraButtonDrag::initializeGUI); + robot.waitForIdle(); + robot.delay(100); + + doTest(); + + System.out.println("Test Passed"); + } finally { + EventQueue.invokeAndWait(ExtraButtonDrag::disposeFrame); + } + } + + public static void disposeFrame() { + if (frame != null) { + frame.dispose(); + frame = null; + } + } + } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -24,7 +24,7 @@ /* * @test * @key headful - * @bug 8020443 6899304 4737732 + * @bug 8020443 6899304 4737732 8357390 * @summary Tests that Toolkit.getScreenInsets() returns correct insets * @library /test/lib * @build jdk.test.lib.Platform @@ -44,7 +44,7 @@ public class ScreenInsetsTest { private static final int SIZE = 100; // Allow a margin tolerance of 1 pixel due to scaling - private static final int MARGIN_TOLERANCE = 1; + private static final int MARGIN_TOLERANCE = 2; public static void main(String[] args) throws InterruptedException { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/SerializedFormSize.java openjdk-25-25.0.3+9/test/jdk/java/awt/color/ICC_Profile/SerializedFormSize.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/SerializedFormSize.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/color/ICC_Profile/SerializedFormSize.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * 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.awt.color.ColorSpace; +import java.awt.color.ICC_Profile; +import java.io.ByteArrayOutputStream; +import java.io.ObjectOutputStream; + +/** + * @test + * @bug 8369032 + * @summary Checks the size of the serialized ICC_Profile for standard and + * non-standard profiles. + */ +public final class SerializedFormSize { + + private static final ICC_Profile[] PROFILES = { + ICC_Profile.getInstance(ColorSpace.CS_sRGB), + ICC_Profile.getInstance(ColorSpace.CS_LINEAR_RGB), + ICC_Profile.getInstance(ColorSpace.CS_CIEXYZ), + ICC_Profile.getInstance(ColorSpace.CS_PYCC), + ICC_Profile.getInstance(ColorSpace.CS_GRAY) + }; + + public static void main(String[] args) throws Exception { + for (ICC_Profile profile : PROFILES) { + byte[] data = profile.getData(); + int dataSize = data.length; + int min = 3; // At least version, name and data fields + int max = 200; // Small enough to confirm no data saved + + // Standard profile: should serialize to a small size, no data + test(profile, min, max); + // Non-standard profile: includes full data, but only once + test(ICC_Profile.getInstance(data), dataSize, dataSize + max); + } + } + + private static void test(ICC_Profile p, int min, int max) throws Exception { + try (var bos = new ByteArrayOutputStream(); + var oos = new ObjectOutputStream(bos)) + { + oos.writeObject(p); + int size = bos.size(); + if (size < min || size > max) { + System.err.println("Expected: >= " + min + " and <= " + max); + System.err.println("Actual: " + size); + throw new RuntimeException("Wrong size"); + } + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/font/GlyphVector/GetGlyphCharIndexTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/font/GlyphVector/GetGlyphCharIndexTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/font/GlyphVector/GetGlyphCharIndexTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/font/GlyphVector/GetGlyphCharIndexTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,7 +23,7 @@ /* @test * @summary Test getGlyphCharIndex() results from layout - * @bug 8152680 + * @bug 8152680 8361381 */ import java.awt.Font; @@ -40,5 +40,22 @@ if (idx0 != 0) { throw new RuntimeException("Expected 0, got " + idx0); } + + // This is the encoding-independent Khmer string "បានស្នើសុំនៅតែត្រូវបានបដិសេធ" + // We can't check for more details like e.g. correct line breaking because it is font and platform dependent, + // but we can at least chack that the created GlyphVector has monotonically increasing character indices. + // This is guaranteed by HarfBuzz's HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS cluster level which is used + // in the OpenJDK layout implementation. + String khmer = "\u1794\u17b6\u1793\u179f\u17d2\u1793\u17be\u179f\u17bb\u17c6\u1793\u17c5" + + "\u178f\u17c2\u178f\u17d2\u179a\u17bc\u179c\u1794\u17b6\u1793\u1794\u178a\u17b7\u179f\u17c1\u1792"; + font = new Font(Font.DIALOG, Font.PLAIN, 12); + gv = font.layoutGlyphVector(frc, khmer.toCharArray(), 0, khmer.length(), 0); + int[] indices = gv.getGlyphCharIndices(0, gv.getNumGlyphs(), null); + for (int i = 0; i < (indices.length - 1); i++) { + if (indices[i] > indices[i + 1]) { + throw new RuntimeException("Glyph character indices are supposed to be monotonically growing, but character index at position " + + i + " is bigger then the one at position " + (i + 1) + ", i.e. " + indices[i] + " > " + indices[i + 1] + "."); + } + } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/font/LineBreakMeasurer/KhmerLineBreakTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/font/LineBreakMeasurer/KhmerLineBreakTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/font/LineBreakMeasurer/KhmerLineBreakTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/font/LineBreakMeasurer/KhmerLineBreakTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,115 @@ +/* + * 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. + */ + +/** + * @test + * @bug 8361381 + * @summary GlyphLayout behavior differs on JDK 11+ compared to JDK 8 + */ + +import java.awt.*; +import java.awt.font.FontRenderContext; +import java.awt.font.LineBreakMeasurer; +import java.awt.font.TextAttribute; +import java.text.AttributedCharacterIterator; +import java.text.AttributedString; +import java.text.BreakIterator; +import java.util.Locale; + +public class KhmerLineBreakTest { + static String khmer = "បានស្នើសុំនៅតែត្រូវបានបដិសេធ"; + /* + + This is part of the output we get from `ExtendedTextSourceLabel::createCharinfo()` + when running with `-Dsun.java2d.debugfonts=true`. It's a listing of the 28 code points + of the `khmer` string defined above and displays their x-position during rendering as + well as their advance. Code points with zero advance belong to the glyph cluster which + is started by the first preceding code point with a non-zero advance. There should be no + breaks at characters with zero advance, because this would break a glyph cluster. + + 0 ch: 1794 x: 0.0 xa: 68.115234 + 1 ch: 17b6 x: 68.115234 xa: 0.0 + 2 ch: 1793 x: 68.115234 xa: 45.410156 + 3 ch: 179f x: 113.52539 xa: 90.82031 + 4 ch: 17d2 x: 204.3457 xa: 0.0 + 5 ch: 1793 x: 204.3457 xa: 0.0 + 6 ch: 17be x: 204.3457 xa: 0.0 + 7 ch: 179f x: 204.3457 xa: 68.115234 + 8 ch: 17bb x: 272.46094 xa: 0.0 + 9 ch: 17c6 x: 272.46094 xa: 0.0 + 10 ch: 1793 x: 272.46094 xa: 90.82031 + 11 ch: 17c5 x: 363.28125 xa: 0.0 + 12 ch: 178f x: 363.28125 xa: 68.115234 + 13 ch: 17c2 x: 431.39648 xa: 0.0 + 14 ch: 178f x: 431.39648 xa: 68.115234 + 15 ch: 17d2 x: 499.51172 xa: 0.0 + 16 ch: 179a x: 499.51172 xa: 0.0 + 17 ch: 17bc x: 499.51172 xa: 0.0 + 18 ch: 179c x: 499.51172 xa: 22.705078 + 19 ch: 1794 x: 522.2168 xa: 68.115234 + 20 ch: 17b6 x: 590.33203 xa: 0.0 + 21 ch: 1793 x: 590.33203 xa: 45.410156 + 22 ch: 1794 x: 635.7422 xa: 45.410156 + 23 ch: 178a x: 681.15234 xa: 45.410156 + 24 ch: 17b7 x: 726.5625 xa: 0.0 + 25 ch: 179f x: 726.5625 xa: 90.82031 + 26 ch: 17c1 x: 817.3828 xa: 0.0 + 27 ch: 1792 x: 817.3828 xa: 45.410156 + + */ + static boolean[] possibleBreak = new boolean[] + { true, false, true, true, false, false, false, true, false, false, + true, false, true, false, true, false, false, false, true, true, + false, true, true, true, false, true, false, true, true /* */ }; + static Locale locale = new Locale.Builder().setLanguage("km").setRegion("KH").build(); + static BreakIterator breakIterator = BreakIterator.getLineInstance(locale); + static FontRenderContext frc = new FontRenderContext(null, true, true); + + public static void main(String[] args) { + Font[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); + for (int i=0; i < allFonts.length; i++) { + if (allFonts[i].canDisplayUpTo(khmer) == -1) { + Font font = allFonts[i].deriveFont(Font.PLAIN, 60f); + System.out.println("Trying font: " + font.getFontName()); + AttributedString attrStr = new AttributedString(khmer); + attrStr.addAttribute(TextAttribute.FONT, font); + AttributedCharacterIterator it = attrStr.getIterator(); + for (int width = 200; width < 400; width += 10) { + LineBreakMeasurer measurer = new LineBreakMeasurer(it, breakIterator, frc); + System.out.print(width + " : "); + while (measurer.getPosition() < it.getEndIndex()) { + int nextOffset = measurer.nextOffset(width); + System.out.print(nextOffset + " "); + if (!possibleBreak[nextOffset]) { + System.out.println(); + throw new RuntimeException("Invalid break at offset " + nextOffset + " (width = " + width + " font = " + font.getFontName() + ")"); + } + measurer.setPosition(nextOffset); + } + System.out.println(); + } + System.out.println("OK"); + } + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/FormatCharAdvanceTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/font/TextLayout/FormatCharAdvanceTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/FormatCharAdvanceTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/font/TextLayout/FormatCharAdvanceTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. * 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,9 +67,13 @@ * font.em = 2048 * font.ascent = 1638 * font.descent = 410 - * font.familyname = 'Test' - * font.fontname = 'Test' - * font.fullname = 'Test' + * font.familyname = 'TTFTest' + * font.fontname = 'TTFTest' + * font.fullname = 'TTFTest' + * #Use below values for Type 1 font + * #font.familyname = 'Type1Test' + * #font.fontname = 'Type1Test' + * #font.fullname = 'Type1Test' * font.copyright = '' * font.autoWidth(0, 0, 2048) * @@ -107,29 +111,30 @@ * * ttf = 'test.ttf' # TrueType * t64 = 'test.ttf.txt' # TrueType Base64 - * pfb = 'test.pfb' # PostScript Type1 - * p64 = 'test.pfb.txt' # PostScript Type1 Base64 + * #Use commented lines to generate Type1 font + * #pfb = 'test.pfb' # PostScript Type1 + * #p64 = 'test.pfb.txt' # PostScript Type1 Base64 * * font.generate(ttf) - * font.generate(pfb) + * #font.generate(pfb) * * with open(ttf, 'rb') as f1: * encoded = base64.b64encode(f1.read()) * with open(t64, 'wb') as f2: * f2.write(encoded) * - * with open(pfb, 'rb') as f3: - * encoded = base64.b64encode(f3.read()) - * with open(p64, 'wb') as f4: - * f4.write(encoded) + * #with open(pfb, 'rb') as f3: + * #encoded = base64.b64encode(f3.read()) + * #with open(p64, 'wb') as f4: + * #f4.write(encoded) * </pre> */ - private static final String TTF_BYTES = "AAEAAAANAIAAAwBQRkZUTarBS1AAABbcAAAAHE9TLzKD7vqWAAABWAAAAGBjbWFw11zF/AAAAvwAAANSY3Z0IABEBREAAAZQAAAABGdhc3D//wADAAAW1AAAAAhnbHlmgVJ3qAAAB4gAAAnMaGVhZCqFqboAAADcAAAANmhoZWEIcgJiAAABFAAAACRobXR4L1UevAAAAbgAAAFEbG9jYb8EwZoAAAZUAAABNG1heHAA4ABCAAABOAAAACBuYW1lJWcF2wAAEVQAAAGJcG9zdBSfZd0AABLgAAAD8QABAAAAAQAAzMHptF8PPPUACwgAAAAAAORfr7QAAAAA5F+vtABEAAACZAVVAAAACAACAAAAAAAAAAEAAAVVAAAAuAJYAAAAAAJkAAEAAAAAAAAAAAAAAAAAAAAJAAEAAACZAAgAAgAIAAIAAgAAAAEAAQAAAEAALgABAAEABAJXAZAABQAABTMFmQAAAR4FMwWZAAAD1wBmAhIAAAIABQMAAAAAAACAACADAgAAABECAKgAAAAAUGZFZACAAAn//wZm/mYAuAVVAAAAAAABAAAAAADIAMgAAAAgAAEC7ABEAAAAAAJYAGQCWABkAlgAZAJYAGQCWABkAjkAAAJYAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAAAAFAAAAAwAAACwAAAAEAAAA7AABAAAAAAJMAAMAAQAAACwAAwAKAAAA7AAEAMAAAAAoACAABAAIAA0AIAA5AFoAegCFAK0GBQYcBt0HDwiRCOIYDiAPIC8gb/7///v//wAAAAkAIAAwAEEAYQCFAK0GAAYcBt0HDwiQCOIYDiALICggYP7///n//wAA/+f/2P/R/8v/wf+a+kj6Mvly+UH3wfdx6EbgSuAy4AIBcwAAAAEAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAMABAAFAAYAAgBzAHQAdQAMAAAAAAFgAAAAAAAAABwAAAAJAAAADAAAAAMAAAANAAAADQAAAAIAAAAgAAAAIAAAAAcAAAAwAAAAOQAAAAgAAABBAAAAWgAAABIAAABhAAAAegAAACwAAACFAAAAhQAAAEYAAACtAAAArQAAAEcAAAYAAAAGBQAAAEgAAAYcAAAGHAAAAE4AAAbdAAAG3QAAAE8AAAcPAAAHDwAAAFAAAAiQAAAIkQAAAFEAAAjiAAAI4gAAAFMAABgOAAAYDgAAAFQAACALAAAgDwAAAFUAACAoAAAgLwAAAFoAACBgAAAgbwAAAGIAAP7/AAD+/wAAAHIAAP/5AAD/+wAAAHMAARC9AAEQvQAAAHYAARDNAAEQzQAAAHcAATQwAAE0PwAAAHgAAbygAAG8owAAAIgAAdFzAAHRegAAAIwADgABAA4AAQAAAJQADgAgAA4AIQAAAJUADgB+AA4AfwAAAJcAAAEGAAABAAAAAAAAAAEDBAUGAgAAAAAAAAAAAAAAAAAAAAEAAAcAAAAAAAAAAAAAAAAAAAAICQoLDA0ODxARAAAAAAAAABITFBUWFxgZGhscHR4fICEiIyQlJicoKSorAAAAAAAALC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAURAAAALAAsADQAPABEAEwAVABUAFwAZABsAHQAfACEAIwAlACcAKQArAC0ALwAxADMANQA3ADkAOwA9AD8AQQBDAEUARwBJAEsATQBPAFEAUwBVAFcAWQBbAF0AYYBjgGWAZ4BpgGuAbYBvgHGAc4B1gHeAeYB7gH2Af4CBgIOAhYCHgImAi4CNgI+AkYCTgJWAl4CZgJuAnYCfgKGAo4ClgKeAqYCrgK2Ar4CxgLOAtYC3gLmAu4C9gL+AwYDDgMWAx4DJgMuAzYDPgNGA04DVgNeA2YDbgN2A34DhgOOA5YDngOmA64DtgO+A8YDzgPWA94D5gPuA/YD/gQGBA4EFgQeBCYELgQ2BD4ERgROBFYEXgRmBG4EdgR+BIYEjgSWBJ4EpgSuBLYEvgTGBM4E1gTeBOYAAgBEAAACZAVVAAMABwAusQEALzyyBwQA7TKxBgXcPLIDAgDtMgCxAwAvPLIFBADtMrIHBgH8PLIBAgDtMjMRIRElIREhRAIg/iQBmP5oBVX6q0QEzQAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAAAAgBkAGQB9ADIAAMABwAANzUhFSE1IRVkAZD+cAGQZGRkZGT//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAAAAAAOAK4AAQAAAAAAAAAAAAIAAQAAAAAAAQAEAA0AAQAAAAAAAgAHACIAAQAAAAAAAwAgAGwAAQAAAAAABAAEAJcAAQAAAAAABQAPALwAAQAAAAAABgAEANYAAwABBAkAAAAAAAAAAwABBAkAAQAIAAMAAwABBAkAAgAOABIAAwABBAkAAwBAACoAAwABBAkABAAIAI0AAwABBAkABQAeAJwAAwABBAkABgAIAMwAAAAAVABlAHMAdAAAVGVzdAAAUgBlAGcAdQBsAGEAcgAAUmVndWxhcgAARgBvAG4AdABGAG8AcgBnAGUAIAAyAC4AMAAgADoAIABUAGUAcwB0ACAAOgAgADMAMAAtADUALQAyADAAMgA1AABGb250Rm9yZ2UgMi4wIDogVGVzdCA6IDMwLTUtMjAyNQAAVABlAHMAdAAAVGVzdAAAVgBlAHIAcwBpAG8AbgAgADAAMAAxAC4AMAAwADAAAFZlcnNpb24gMDAxLjAwMAAAVABlAHMAdAAAVGVzdAAAAAAAAgAAAAAAAP9nAGYAAAAAAAAAAAAAAAAAAAAAAAAAAACZAAAAAQECAQMBBAEFAQYAAwATABQAFQAWABcAGAAZABoAGwAcACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0BBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4BHwEgASEBIgEjASQBJQEmAScBKAEpASoBKwEsAS0BLgEvATABMQEyATMBNAE1ATYBNwE4ATkBOgE7ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZB3VuaTAwMEQHdW5pMDAwOQd1bmkwMDBBB3VuaTAwMEIHdW5pMDAwQwd1bmkwMDg1B3VuaTAwQUQHdW5pMDYwMAd1bmkwNjAxB3VuaTA2MDIHdW5pMDYwMwd1bmkwNjA0B3VuaTA2MDUHdW5pMDYxQwd1bmkwNkREB3VuaTA3MEYHdW5pMDg5MAd1bmkwODkxB3VuaTA4RTIHdW5pMTgwRQd1bmkyMDBCB3VuaTIwMEMHdW5pMjAwRAd1bmkyMDBFB3VuaTIwMEYHdW5pMjAyOAd1bmkyMDI5B3VuaTIwMkEHdW5pMjAyQgd1bmkyMDJDB3VuaTIwMkQHdW5pMjAyRQd1bmkyMDJGB3VuaTIwNjAHdW5pMjA2MQd1bmkyMDYyB3VuaTIwNjMHdW5pMjA2NAd1bmkyMDY1B3VuaTIwNjYHdW5pMjA2Nwd1bmkyMDY4B3VuaTIwNjkHdW5pMjA2QQd1bmkyMDZCB3VuaTIwNkMHdW5pMjA2RAd1bmkyMDZFB3VuaTIwNkYHdW5pRkVGRgd1bmlGRkY5B3VuaUZGRkEHdW5pRkZGQgZ1MTEwQkQGdTExMENEBnUxMzQzMAZ1MTM0MzEGdTEzNDMyBnUxMzQzMwZ1MTM0MzQGdTEzNDM1BnUxMzQzNgZ1MTM0MzcGdTEzNDM4BnUxMzQzOQZ1MTM0M0EGdTEzNDNCBnUxMzQzQwZ1MTM0M0QGdTEzNDNFBnUxMzQzRgZ1MUJDQTAGdTFCQ0ExBnUxQkNBMgZ1MUJDQTMGdTFEMTczBnUxRDE3NAZ1MUQxNzUGdTFEMTc2BnUxRDE3NwZ1MUQxNzgGdTFEMTc5BnUxRDE3QQZ1RTAwMDEGdUUwMDIwBnVFMDAyMQZ1RTAwN0UGdUUwMDdGAAAAAAAAAf//AAIAAAABAAAAAOIB6+cAAAAA5F+vtAAAAADkX6+0"; + private static final String TTF_BYTES = "AAEAAAANAIAAAwBQRkZUTbCUBjwAABcAAAAAHE9TLzKD7vqWAAABWAAAAGBjbWFw11zF/AAAAvwAAANSY3Z0IABEBREAAAZQAAAABGdhc3D//wADAAAW+AAAAAhnbHlmgVJ3qAAAB4gAAAnMaGVhZC1MmToAAADcAAAANmhoZWEIcgJiAAABFAAAACRobXR4L1UevAAAAbgAAAFEbG9jYb8EwZoAAAZUAAABNG1heHAA4ABCAAABOAAAACBuYW1lLzI4NgAAEVQAAAGtcG9zdBSfZd0AABMEAAAD8QABAAAAAQAAp/gvll8PPPUACwgAAAAAAOXDJ3QAAAAA5cMndABEAAACZAVVAAAACAACAAAAAAAAAAEAAAVVAAAAuAJYAAAAAAJkAAEAAAAAAAAAAAAAAAAAAAAJAAEAAACZAAgAAgAIAAIAAgAAAAEAAQAAAEAALgABAAEABAJXAZAABQAABTMFmQAAAR4FMwWZAAAD1wBmAhIAAAIABQMAAAAAAACAACADAgAAABECAKgAAAAAUGZFZACAAAn//wZm/mYAuAVVAAAAAAABAAAAAADIAMgAAAAgAAEC7ABEAAAAAAJYAGQCWABkAlgAZAJYAGQCWABkAjkAAAJYAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAZABkAGQAAAAFAAAAAwAAACwAAAAEAAAA7AABAAAAAAJMAAMAAQAAACwAAwAKAAAA7AAEAMAAAAAoACAABAAIAA0AIAA5AFoAegCFAK0GBQYcBt0HDwiRCOIYDiAPIC8gb/7///v//wAAAAkAIAAwAEEAYQCFAK0GAAYcBt0HDwiQCOIYDiALICggYP7///n//wAA/+f/2P/R/8v/wf+a+kj6Mvly+UH3wfdx6EbgSuAy4AIBcwAAAAEAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAMABAAFAAYAAgBzAHQAdQAMAAAAAAFgAAAAAAAAABwAAAAJAAAADAAAAAMAAAANAAAADQAAAAIAAAAgAAAAIAAAAAcAAAAwAAAAOQAAAAgAAABBAAAAWgAAABIAAABhAAAAegAAACwAAACFAAAAhQAAAEYAAACtAAAArQAAAEcAAAYAAAAGBQAAAEgAAAYcAAAGHAAAAE4AAAbdAAAG3QAAAE8AAAcPAAAHDwAAAFAAAAiQAAAIkQAAAFEAAAjiAAAI4gAAAFMAABgOAAAYDgAAAFQAACALAAAgDwAAAFUAACAoAAAgLwAAAFoAACBgAAAgbwAAAGIAAP7/AAD+/wAAAHIAAP/5AAD/+wAAAHMAARC9AAEQvQAAAHYAARDNAAEQzQAAAHcAATQwAAE0PwAAAHgAAbygAAG8owAAAIgAAdFzAAHRegAAAIwADgABAA4AAQAAAJQADgAgAA4AIQAAAJUADgB+AA4AfwAAAJcAAAEGAAABAAAAAAAAAAEDBAUGAgAAAAAAAAAAAAAAAAAAAAEAAAcAAAAAAAAAAAAAAAAAAAAICQoLDA0ODxARAAAAAAAAABITFBUWFxgZGhscHR4fICEiIyQlJicoKSorAAAAAAAALC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAURAAAALAAsADQAPABEAEwAVABUAFwAZABsAHQAfACEAIwAlACcAKQArAC0ALwAxADMANQA3ADkAOwA9AD8AQQBDAEUARwBJAEsATQBPAFEAUwBVAFcAWQBbAF0AYYBjgGWAZ4BpgGuAbYBvgHGAc4B1gHeAeYB7gH2Af4CBgIOAhYCHgImAi4CNgI+AkYCTgJWAl4CZgJuAnYCfgKGAo4ClgKeAqYCrgK2Ar4CxgLOAtYC3gLmAu4C9gL+AwYDDgMWAx4DJgMuAzYDPgNGA04DVgNeA2YDbgN2A34DhgOOA5YDngOmA64DtgO+A8YDzgPWA94D5gPuA/YD/gQGBA4EFgQeBCYELgQ2BD4ERgROBFYEXgRmBG4EdgR+BIYEjgSWBJ4EpgSuBLYEvgTGBM4E1gTeBOYAAgBEAAACZAVVAAMABwAusQEALzyyBwQA7TKxBgXcPLIDAgDtMgCxAwAvPLIFBADtMrIHBgH8PLIBAgDtMjMRIRElIREhRAIg/iQBmP5oBVX6q0QEzQAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAAAAgBkAGQB9ADIAAMABwAANzUhFSE1IRVkAZD+cAGQZGRkZGT//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAD//wBkAGQB9ADIEgYALAAA//8AZABkAfQAyBIGACwAAP//AGQAZAH0AMgSBgAsAAAAAAAOAK4AAQAAAAAAAAAAAAIAAQAAAAAAAQAHABMAAQAAAAAAAgAHACsAAQAAAAAAAwAjAHsAAQAAAAAABAAHAK8AAQAAAAAABQAPANcAAQAAAAAABgAHAPcAAwABBAkAAAAAAAAAAwABBAkAAQAOAAMAAwABBAkAAgAOABsAAwABBAkAAwBGADMAAwABBAkABAAOAJ8AAwABBAkABQAeALcAAwABBAkABgAOAOcAAAAAVABUAEYAVABlAHMAdAAAVFRGVGVzdAAAUgBlAGcAdQBsAGEAcgAAUmVndWxhcgAARgBvAG4AdABGAG8AcgBnAGUAIAAyAC4AMAAgADoAIABUAFQARgBUAGUAcwB0ACAAOgAgADIANAAtADIALQAyADAAMgA2AABGb250Rm9yZ2UgMi4wIDogVFRGVGVzdCA6IDI0LTItMjAyNgAAVABUAEYAVABlAHMAdAAAVFRGVGVzdAAAVgBlAHIAcwBpAG8AbgAgADAAMAAxAC4AMAAwADAAAFZlcnNpb24gMDAxLjAwMAAAVABUAEYAVABlAHMAdAAAVFRGVGVzdAAAAAAAAgAAAAAAAP9nAGYAAAAAAAAAAAAAAAAAAAAAAAAAAACZAAAAAQECAQMBBAEFAQYAAwATABQAFQAWABcAGAAZABoAGwAcACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0BBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4BHwEgASEBIgEjASQBJQEmAScBKAEpASoBKwEsAS0BLgEvATABMQEyATMBNAE1ATYBNwE4ATkBOgE7ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZB3VuaTAwMEQHdW5pMDAwOQd1bmkwMDBBB3VuaTAwMEIHdW5pMDAwQwd1bmkwMDg1B3VuaTAwQUQHdW5pMDYwMAd1bmkwNjAxB3VuaTA2MDIHdW5pMDYwMwd1bmkwNjA0B3VuaTA2MDUHdW5pMDYxQwd1bmkwNkREB3VuaTA3MEYHdW5pMDg5MAd1bmkwODkxB3VuaTA4RTIHdW5pMTgwRQd1bmkyMDBCB3VuaTIwMEMHdW5pMjAwRAd1bmkyMDBFB3VuaTIwMEYHdW5pMjAyOAd1bmkyMDI5B3VuaTIwMkEHdW5pMjAyQgd1bmkyMDJDB3VuaTIwMkQHdW5pMjAyRQd1bmkyMDJGB3VuaTIwNjAHdW5pMjA2MQd1bmkyMDYyB3VuaTIwNjMHdW5pMjA2NAd1bmkyMDY1B3VuaTIwNjYHdW5pMjA2Nwd1bmkyMDY4B3VuaTIwNjkHdW5pMjA2QQd1bmkyMDZCB3VuaTIwNkMHdW5pMjA2RAd1bmkyMDZFB3VuaTIwNkYHdW5pRkVGRgd1bmlGRkY5B3VuaUZGRkEHdW5pRkZGQgZ1MTEwQkQGdTExMENEBnUxMzQzMAZ1MTM0MzEGdTEzNDMyBnUxMzQzMwZ1MTM0MzQGdTEzNDM1BnUxMzQzNgZ1MTM0MzcGdTEzNDM4BnUxMzQzOQZ1MTM0M0EGdTEzNDNCBnUxMzQzQwZ1MTM0M0QGdTEzNDNFBnUxMzQzRgZ1MUJDQTAGdTFCQ0ExBnUxQkNBMgZ1MUJDQTMGdTFEMTczBnUxRDE3NAZ1MUQxNzUGdTFEMTc2BnUxRDE3NwZ1MUQxNzgGdTFEMTc5BnUxRDE3QQZ1RTAwMDEGdUUwMDIwBnVFMDAyMQZ1RTAwN0UGdUUwMDdGAAAAAAAAAf//AAIAAAABAAAAAOUNt1MAAAAA5cMndAAAAADlwyd0"; /** - * Same font as above, but in PostScript Type1 (PFB) format. + * Same font as above, but in PostScript Type1 (PFB) format with different font name. */ - private static final String TYPE1_BYTES = "gAFSBwAAJSFQUy1BZG9iZUZvbnQtMS4wOiBUZXN0IDAwMS4wMDAKJSVUaXRsZTogVGVzdAolVmVyc2lvbjogMDAxLjAwMAolJUNyZWF0aW9uRGF0ZTogRnJpIE1heSAzMCAyMDo1NTo0OCAyMDI1CiUlQ3JlYXRvcjogRGFuaWVsIEdyZWRsZXIKJSAyMDI1LTUtMzA6IENyZWF0ZWQgd2l0aCBGb250Rm9yZ2UgKGh0dHA6Ly9mb250Zm9yZ2Uub3JnKQolIEdlbmVyYXRlZCBieSBGb250Rm9yZ2UgMjAyMzAxMDEgKGh0dHA6Ly9mb250Zm9yZ2Uuc2YubmV0LykKJSVFbmRDb21tZW50cwoKMTAgZGljdCBiZWdpbgovRm9udFR5cGUgMSBkZWYKL0ZvbnRNYXRyaXggWzAuMDAwNDg4MjgxIDAgMCAwLjAwMDQ4ODI4MSAwIDAgXXJlYWRvbmx5IGRlZgovRm9udE5hbWUgL1Rlc3QgZGVmCi9Gb250QkJveCB7MTAwIDEwMCA1MDAgMjAwIH1yZWFkb25seSBkZWYKL1BhaW50VHlwZSAwIGRlZgovRm9udEluZm8gMTAgZGljdCBkdXAgYmVnaW4KIC92ZXJzaW9uICgwMDEuMDAwKSByZWFkb25seSBkZWYKIC9Ob3RpY2UgKCkgcmVhZG9ubHkgZGVmCiAvRnVsbE5hbWUgKFRlc3QpIHJlYWRvbmx5IGRlZgogL0ZhbWlseU5hbWUgKFRlc3QpIHJlYWRvbmx5IGRlZgogL1dlaWdodCAoUmVndWxhcikgcmVhZG9ubHkgZGVmCiAvRlNUeXBlIDAgZGVmCiAvSXRhbGljQW5nbGUgMCBkZWYKIC9pc0ZpeGVkUGl0Y2ggZmFsc2UgZGVmCiAvVW5kZXJsaW5lUG9zaXRpb24gLTIwNC44IGRlZgogL1VuZGVybGluZVRoaWNrbmVzcyAxMDIuNCBkZWYKZW5kIHJlYWRvbmx5IGRlZgovRW5jb2RpbmcgMjU2IGFycmF5CiAwIDEgMjU1IHsgMSBpbmRleCBleGNoIC8ubm90ZGVmIHB1dH0gZm9yCmR1cCA5L3VuaTAwMDkgcHV0CmR1cCAxMC91bmkwMDBBIHB1dApkdXAgMTEvdW5pMDAwQiBwdXQKZHVwIDEyL3VuaTAwMEMgcHV0CmR1cCAxMy91bmkwMDBEIHB1dApkdXAgMzIvc3BhY2UgcHV0CmR1cCA0OC96ZXJvIHB1dApkdXAgNDkvb25lIHB1dApkdXAgNTAvdHdvIHB1dApkdXAgNTEvdGhyZWUgcHV0CmR1cCA1Mi9mb3VyIHB1dApkdXAgNTMvZml2ZSBwdXQKZHVwIDU0L3NpeCBwdXQKZHVwIDU1L3NldmVuIHB1dApkdXAgNTYvZWlnaHQgcHV0CmR1cCA1Ny9uaW5lIHB1dApkdXAgNjUvQSBwdXQKZHVwIDY2L0IgcHV0CmR1cCA2Ny9DIHB1dApkdXAgNjgvRCBwdXQKZHVwIDY5L0UgcHV0CmR1cCA3MC9GIHB1dApkdXAgNzEvRyBwdXQKZHVwIDcyL0ggcHV0CmR1cCA3My9JIHB1dApkdXAgNzQvSiBwdXQKZHVwIDc1L0sgcHV0CmR1cCA3Ni9MIHB1dApkdXAgNzcvTSBwdXQKZHVwIDc4L04gcHV0CmR1cCA3OS9PIHB1dApkdXAgODAvUCBwdXQKZHVwIDgxL1EgcHV0CmR1cCA4Mi9SIHB1dApkdXAgODMvUyBwdXQKZHVwIDg0L1QgcHV0CmR1cCA4NS9VIHB1dApkdXAgODYvViBwdXQKZHVwIDg3L1cgcHV0CmR1cCA4OC9YIHB1dApkdXAgODkvWSBwdXQKZHVwIDkwL1ogcHV0CmR1cCA5Ny9hIHB1dApkdXAgOTgvYiBwdXQKZHVwIDk5L2MgcHV0CmR1cCAxMDAvZCBwdXQKZHVwIDEwMS9lIHB1dApkdXAgMTAyL2YgcHV0CmR1cCAxMDMvZyBwdXQKZHVwIDEwNC9oIHB1dApkdXAgMTA1L2kgcHV0CmR1cCAxMDYvaiBwdXQKZHVwIDEwNy9rIHB1dApkdXAgMTA4L2wgcHV0CmR1cCAxMDkvbSBwdXQKZHVwIDExMC9uIHB1dApkdXAgMTExL28gcHV0CmR1cCAxMTIvcCBwdXQKZHVwIDExMy9xIHB1dApkdXAgMTE0L3IgcHV0CmR1cCAxMTUvcyBwdXQKZHVwIDExNi90IHB1dApkdXAgMTE3L3UgcHV0CmR1cCAxMTgvdiBwdXQKZHVwIDExOS93IHB1dApkdXAgMTIwL3ggcHV0CmR1cCAxMjEveSBwdXQKZHVwIDEyMi96IHB1dApkdXAgMTMzL3VuaTAwODUgcHV0CmR1cCAxNzMvdW5pMDBBRCBwdXQKcmVhZG9ubHkgZGVmCmN1cnJlbnRkaWN0IGVuZApjdXJyZW50ZmlsZSBlZXhlYwqAAo0WAAB0P4QT82NsqFqf/vtQtLsnMCpcwKtuL5Wb8g0yDDc8ISjQoM5wcrH2cqCqOMPA7OsEtEyxdKHDFhLXH/ogyQlUJWN4Ny95WwvylB9DfwWfQa4FmMAFFf7xhzM1V/Ms4yqe59S6tl2lND+ScH4s/PPozkRuWtrDn8N+zmS2izVs4NcQ9FsefyzXaKvKFDYINmh2GhAJRkFi0FTB9r8sRqMZs8ZkUodjFsE6kmRW02YpWP1WdA1YVnNuYQT4E+0xkVZ3eTTuscVEWua/buWeWxlwi0KH20ubr5iCkavAb953/MMe4XMKlPvGzsx0Slmp9qOOLD0ko2287peB1DvLavHCG/r2rr8MhqsKVoSyFr36sVd9hMSQrwFxpRjVEjtt5HDGcbHwy3ylp8b1oopSl5AQmeoW/oGT0rPr+358A+Qd2/wpQgStXDcDExQWDrdOL7J5Fr7VBDu8NNORXc7c5uKb2iVQq5AOF+Yfa5bH4reIFcWrAItBML9L9b8sOf1QKzGymFzgcDW3EEx07Y07ys95zSLkYtY5lkjm07GFSyM9cuWhRctY6RTcjTAFNdbxOUBXbIGf4Q8nhdXXi3IKhYdqdgKEsWphwKEdQeP7QYqW4bPSB881DjF/e7r6PIkua8MXGI3G1I0C53TIFnHXai5dtVJ4cZhdaTzgoD9K6zYMNsb8Tof6THYx+cRUzPbJmb+VbprjDk96+92jF+P0EwubV0GQMLEdCyPDV1u/vIHPePqSJt2/YjgkXEugRbyqzFwfZJdeAmkzcqs1CU9EiqrwgqbEfdmWWwv9BDxgkWD4omPKAKX1A6asv/UVfH8lebHSbrKddpR8XU/C2I/t7UhI19oTFqIvUL061MrZPiHZaFE9bnvJw+P91hF+MoPs69ddhD4Kj6z6MJYNGlvAZMuUM/RdAUwE3HHhwGiCN3Hqi4V+byVeB95B/8YLQK1CiW/pgfU7TqZ1d5nWGoAXAcAu6UYGvZZ0ChX3AEPlIFJ4x4hXfBo0I/k/TEHus/u5dNm/+ixyBcr/rX/e2yPIBfJkBJDG8x/y7JaxOFAD1NMQ4zWjbzP1uPpiGzRKfCXYLF6YXLfGDKJ1w3IENGwIMXBgqOx6O2v2xkYhcAUkrZ2Nw3xpRrnj2RqGCGwz00AHrl9AU7CNaM8BkSe6d86xT8teVYuOk926Xj4/+Kx6rfu526Ylz91kxebopcMvql6ysRVzzSGsW2ec9ZPJo1Q/WKb+tCvBm8OdUnRi+DldIajpytyl08TmlS+IRUcHZbxoIjxb7ZCvF8hd03yDhs9bsUSO6h7jbhegenLIiQPX7RtsGAg3logZLD0NUjcAm2tKBieMHhMxAD89lVmuMkNj5r6EaixXvkvhgqzhjPExdu30Knife5IEnlCvIlMCh1EXQsY9KRkzeTRTKfnZTJ/idze+cX0nCEGcFrvCCjZRfNuaLRHx73o2KlDHmoYBm1mFEEvfUReQxS987AiVfSF7cs8IrLEqV9qe2mCAv7ATbVUFbnvYxTBYvHL9sc4892rLrjSu/yP5RZmmIMOpTH8CStLw1zGAcXH3W3ZfPjQkEA4jzvo1U5Oi9EkBKqlgqjj2pFLWepwuNG/L3Iyr36frW6NFtqCxyVQYcNwOTnmQjY0LXPAKxyz2l+xyo/gcDY8nqtWms5aqINgemqM0pG2wBt3GawARbEVkkKllyB/WJbRw0GGHktmj73ixkTulD6nHZ+vMd+aS8iKXPa2ASEOPpxp515DZxg+VYZIrM0h4mDdRff4To/8NKs7Kx4IZx2qzlhIKS2zHpLwuY/U2Wt80e9nqMCFEtnS8sKpcy1rrE9FzXsFUNtYE6LdIat4ygQxoq24Y6D3bfDpl3E8wMvECaVCJX8lfBhQcGGU6+Jba1qfQ7jonjQM0zfoOwHrApk/dkPkSdjQy7UM+dZNMtgZf2N46UuWC2YCtcqCN1X+o5SpojTgXNmTjUy3KOy6L4GNYOxutsDhWiah6rJ+FGVL9D51MJvT3l02T1+LpNt8ZeZQSkZpx7NdFFTFA4/SE8zycfBLNm71Q9pjQKa30TnCY9ZkMEH9rnArLV0w2Gi6LoJoWpT7GoAB2Cdvi3x9wGDdt60K6oABWiD5mpAv4KfrJMBn5dRDJVyRPARXxwBUROAc3BxY8St3WuWKqDqqef0t0rlqAXGynPrcAjqFMXc/GBWORQ7W/dTvbu/eZb+apjKEX7szjaY4cSRsNge4gTyCEsfhLrdBkncM7up9jj206tIaqZQILxHAnrVwYplJ5D2EvSSLYvxFEVHSrI19aNJEvDK64tzXCV+P4yOCOuXpBmc15PDlrMQEauqrD+xneCO+CrCbudHXOJsbmvQq56+ovLp5SNBfdEPQpqo5tBgQaNHcEjg/iVt++uLxT3vAEFW5d7WXPMYdy+XqoMmdRDOzey0Mdx5BZ92rNM/LthQa6F54nvzkypM64HdxCYlri8cO3k0G6bp2eWdseP0P4zMc5QikuXc/Dr4NztBYe2yJLbLLesWSB8nOWcl+gd0GMX5PY4P5mn5WJDNStLWPdD9NapzMsyx6lZwR9Tfv/XSmay9LEo9YaaxysWfllDIasUCdvhZVi7LJvPu/0GbuHLOz9mP6prkF8h8KmjBYMlMktouA23G74M+Pkdfbj9KAM8zOYCgQFZUaXx3iZ4m3uBtDPeKjUcdFZSnHdW11eSv5aCz2fMbExV/qnPOSMbkR5rvpR71WwVZP6j3tNWr8jlPQ8d60k8jXPy7d8wjw9obnDEpvKzKreEzjfA0wCovNt7FLH9oxWmO5TF8JMg/U7+ToEv0fPAW475dXTXdue98/k/c+3+LCJNbHzBBx14CzpteKXKqGNA3jwgJUhfDsTISiN4gF222zIi1deY9BspjPl7jergbwh+ZPdfk2BLaPTDeNUycKdeiFoJEd8gKLvjMrnPa9IX4HwR9gJSjsQ0UWhnYuaXdk12zk8sVkGJAJLrphh5tHcd4LwG2rWcVXwM/2zw1YXQR+jffC1uxUEPVaq1fSf9RB6iEb8LgIollE+gDEybc+Dw3Q/gxVe5/Nu0vHHur6B+4YEcxvz3O5cYKUQTxDgG4mXJhqZ6z7etSWINChQyP6PUFFbsUIDXjfuHZ9oF4ce1NNOnn/RIwm/u/+AduDTtqloUooZjqak4VbvmBEZcW75liKm0MggeilL0nl5arItzTwE8OudJDBkJ/xnf1yZIgeFKSODIz5aQrIiSMJX3BGRxHEEQrm1xtwCfjtMPpFhFtG+o5fjMlCnowJ6+/HrG3FdZKn4/gv7qCxF2/3NW2J4OWuXbjEsUlSHu57DFvhrVl/q8jv81OfXhZKutYQWjaDWwOQHR+ym6wvMyQ9YfiiJpBXa+Ig9uGAbERyApc8wsCLcy0d8Msxx9PAfhrDa+Gf2yhYGA57t8iGxEcoI0A4B8zKVqYXKf4AdsrVzE9cUpfRN/HH8OGWyv9mKMTJyGJQql/OH5hYHnvJVKZXIz6l3nL/7gnpYaGtASiV1q+JwO7WSk1pfwT9SE4sFl7uS7f3pu4BwPhcz/wyN82f144yav11mrGqypOMaMDR27/L0sW1c3hWBBa8BMU/EuwF7ldclS9nxmFHOc35RLruyQ26cp1niukcpK42wg3ozqGQLoQRIoin0AWnUwnOmkdBEkILqFCiWgERDZuCB7G3pZJW/32HPgD3byO0lH8JF6OiINsUmM+75Y3qdvuepTHxXwpDa9Isero3x/f+UWGGUO12s+Ou2yQKtLsQaBNSTaGEBVCAtpJ58TgZ+KfVyhgRQdINr7GuGq9iRPQBY00anspxvsrhfffggqOariHO8h0jdEZPJarJJAufQbYgKiACtJ8iG6jlIs3GfWRI0jRYDw+kHPc2/A6fS5XGF360aX1I6iy5J1pZpN+6stJq5MQ8QRHopTJWQ0DW1Pq46BglmHH9av/X4tvLFFyyC4X6OB2jDb9+XwwcuJ2t/352IcJC06IsWKDsr6E6vF3hC3GUBUy9I7JbqlAh7zlYK52MITQzGINZD2p8+TJjmDycEr/UM/JHqBzbJniUzxg8vo2/FjpZggU8NuBsTZ5P/YZSgRsZcVKkhkGYAn+euvrQIiZ2LMwOygD0gW/zy7v+Z1aHfxKig7kkOR1ZuVCFE8FWx1unCnFHtkjFIx9JY4cYHboveIlF2IzNhfnKJncBt7DuZORqfAT3gQDZlIFNx06tSnTe1v5l7u7VSKMXRhc3bbeCqfvO/NSOqfLz1QYlj2b0C5sm0AcUe1RpC7rOu6muPLeJ38DOIhJHzs+wpqBZTHJr9zdnjZl+OyXaAAbgCsxamEQW91iGdRmVHqyT+0+XQxssYOF795eGYpsXy9Bik6Z4apt/AcuZQFu3XthVXvjyVCi0Rj3gXjOkFdT1YaiRe6yPRdBB2GorcxCzQQvjZXTuh5P4a7MD/6W0mJYoh0BzQHYC0O/T9v3d8GepAbQTytL7MWIWk9C2qZ0pPciuIfXNmGRWBUkCCts1BAsW39l4giNBCwDQ6CauWkz8iWaxx2krBQpKl0WyBBSd/SIJUFM4psvYNaGNk+xR18s0OrPqvxQvc3NNgVwpAljSM/wt3IzIcIsJHF/u0T60hXgEv4H0f44/SzROL0iGUZIfRZK6sJRGBQH2ZVrFCJ6ageJX7WTBLVwKAtxgIUK2dXAemsYgGm/CIe3JCmwL/YmEh8I8W4LrWzXq4vNF6/Sq1hQ2r4dndAO+HEZ8nYpPr+9pUCUgSvnN7aVWZpc/xJaj5L4U6W28hVZ2mb+UUKDpq0bSxKdkVr2SC/7Q/8WimMNDYCaExzXQ+RzZyv/4227pn/k3y1avulXGz3ujy+lqdciVVWHmPYyJPhqeoyDEkM6g46KL9kg912jsB1SGP7Yc2l7XENW59mh5RE+fNiW8wWjxW0Oa+xSe2+RTOgRA+Ojq2L8+g9sL7jKw7BPAPjnYTo8gMat4DurAKbJrtaRLZMzXkFyE7heHr9NsLJl/d1JLRwNoGDpnvLjyPNBUjW/2CTEEIyI6yq3oOJivAwe1yiJib7IUTkh5MCBSnEssvxOYJRUaR/ILAHMJpAoEV/VOCfBlh/I55gVYZWa+Y/5/AMs5Po1w9/18Q6V4ichv80Qr+Up7+2s8sV6zM7m78WMmQp3IR6uTJasqI2Vnr99KAY31BJVpBelRq2xjIruSHx/BAr2kSHA+Kuk1I9+Y1dEaSbfUpjcly0WDUh9x1VTkrUu1u6XN/i/SkFeO1k8o2o7s0rVXNI+VipXQt69H+yVDea7AYuvy9Rp2kKuq7o7mgcFCVq1Vbeyv++vDSKdYmKbyQ2N7ubU6u41Td59YNfRldl56ec0bl7hgyMUb/7/ifjdRXOVl1sTTMUiETnT+44vuAiiUeOHRgKmRlLgHp9iMnPPZVF3DqExLV1IPraZO/olA9QIc4bM2g6SPebITaH94rZn80oQzWzBAFUzK/B2vY39XGdPSTAZTFn1yAYcRHIhqWZs9+FtJvBN9f9lUxPFHUs3vyKBC8sFph/yee7KNIKyTinMNAs1+jcnVS4LPqR4L4cn3ancasZ6wBgexKIjjwf8KPkgUcMwZqk+KwDeJbmyGblqsRzSuhrwPq0U+n4n1ktcqI11Y4D/u93UrU04LgZwWPEZPrgjGUgciPrRa3BIJb6oT1s5VSfgiupwHaFYgF5sJ3VD0ZcT1zwdet8tPprxRq00SIZMZKZeVSIWD0ai82pPxH4PYLUGwUbW3ocaYouILRf9sF9DP1gaVfd4SDRUuKUtZRiG6lpSopmFO24N1vWq90caknzY91uUWX2v4+C/JHDd47e4h/g1Lf13euI6csefzsnQDTDsyrh5zSJDo26B81kY5RyKv+AnsvTnTl8uroRsh1KqeIUywpWImmlnnWT8rpNg822BjraGaWc9NHFzkUSmOmD/iJRdfRjno1JaeDVk8KBniY0vnMqdBG1BWRMsnUAhWxHJ4Jn5fXCltO2C5OV+x+jYocNhWw4Mgu3CVZp9erAEPsDEUsY4qaMitjRq6yJPn3nwkQRpFHGbXv187fPU/z8+BQ5/W4Qfg/qEmJKcp1T5VcrwLAlZQTomKAt/7xNlJIxlx9bCMVXnvk3Y8hB7kCTaSQmvjC8IXCHbJyMCFQV7qAKdmaihyV7zmpqWcDqfELQChm2KxmQJ1dPYJ1+jR+aYm3an5bPEoCdbsZauFF8qXHIhx8JKvRGgxPrTGHi8N5FcfuNsCA3xOkoSGX9Sxg6h5KEtoeFdkwf5BKqhJj5pcsBewAHkWng86BzAqt7R+a9TnyvLMWvmpI/0fkpRkbg731aWOnWOvbpz6f+nXSxGgrvs/B6xSgFPDo6Ty3ivL+CGitfK6XwdHA07TV/eK5vd5oyNe/Ay5wMdXiypEUWukN+jiuGmrVMkke/0DmXmtqqY3T45iLrqfgwRhXsT9kEdzcWVqM4OkAEqEzpjI0NHG74cslhQvDPbX/ZRp57/bcOuarHpCDakvzajblF2NXf0Wp0dO0NltExHFoY8myAlBu/SMn3VN6GF5faMq370MevoNi4eNRD8XiGUYh+QzVphqtLIeqyyt6W4MzTjwSLgAB0kITRYcG0KVi89iUgZMQdwIOfMUBmS/q1GpBtTFKqI2TwC3dz9oBnNzwi3Ru9yyNuX1mw1p0Sd8UNY0yVbdb7UrLrd0ldVrx2FWNVCEedkn0npe9xstIJvgMuRLA0DNN7vex3hfvGvV7qCuQi5ssNVYUkoyEjlFR3xCThuVCgwzK77JmvWMpeB0eR0O3SH9KK/1qaAkXK/bhyazFdT+WHrexsFYZuO5I1MiQWJzNDQ9r3act5mt0senky0dQ+Sb233mB+RX2AWxOf9SUcRtkKjiTvfSdcKHmLx7ns2F8MQdwFoKz7j4a7sPsuruL+BMHWuDj/VTfnVmG6nlzIjs92LVWKnZ010UOv156HJYQvhlSV+WzPv8EC/2A2LhBx0g1ZJ3vYQIu2G1AuhcZurtEOfbhcIsS6cq9P2YoRYTYTHeiXHNzKot/25uSAFs85GQhWyMz+2L3HBiszTmSdwtf0ZzHgGEBc90JD6yNfjwqF4FJ7AcuLYw5euNz/VEON3z2C021shibn6LGd4RjflA8XmBGSakJ0nkpplflYaQ9Awcv2eKYR4ebAVjhyErm4zHikUC5Vgtz/0UbghbNcX0RIEESW2GaGtFNYIYNPHJNtj4QMYLK7BrUOnzITF+Kx/FZG6oIeySnU+TJoZIkJBIqGLOYSkw+QuEbCbf1BM5nERddA8z+IFxYz7Goxg4XMpc3+L/Hx29UZzkNSY55Y2Swii1qxBWgBaRGpzI66cKfr6mHES+cbb9vNAdFPuBgJttyT/t3Jf+W5yRYt8M4VyIlEiUjAGqL3bqakDP5IwywMSpYeS1PmqWBsbUcV9bAavsLMnnEHvUue8GboIr+EeBMCk6XPBKFahrRZBTQq802IGDYOi++VjG7805Tleu2pX6H/IY/LDQVLnqVhxDaVonTvQqMffVvSwXp7EFNvR/XKxh+IJxO/W3tQeAi8Jn77E3itRU+tQEl8QQ65psW7FBQXujG6YYWK9XbPUPI/AkdVmaAuQQt7RPni0MhxB0Q8k6BqzhwbpyLMPa/XCkHdJLrO2xGupnrwYvt0OcF7Ia/hN9+HAekLtq8l+HcNGIY/JA2RPYOYGSEgAEVAgAACjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMApjbGVhcnRvbWFyawqAAw=="; + private static final String TYPE1_BYTES = "gAFfBwAAJSFQUy1BZG9iZUZvbnQtMS4wOiBUeXBlMVRlc3QgMDAxLjAwMAolJVRpdGxlOiBUeXBlMVRlc3QKJVZlcnNpb246IDAwMS4wMDAKJSVDcmVhdGlvbkRhdGU6IFR1ZSBGZWIgMjQgMTU6MzQ6MDUgMjAyNgolJUNyZWF0b3I6IEpheWF0aGlydGggUmFvIEQgVgolIDIwMjYtMi0yNDogQ3JlYXRlZCB3aXRoIEZvbnRGb3JnZSAoaHR0cDovL2ZvbnRmb3JnZS5vcmcpCiUgR2VuZXJhdGVkIGJ5IEZvbnRGb3JnZSAyMDI1MTAwOSAoaHR0cDovL2ZvbnRmb3JnZS5zZi5uZXQvKQolJUVuZENvbW1lbnRzCgoxMCBkaWN0IGJlZ2luCi9Gb250VHlwZSAxIGRlZgovRm9udE1hdHJpeCBbMC4wMDA0ODgyODEgMCAwIDAuMDAwNDg4MjgxIDAgMCBdcmVhZG9ubHkgZGVmCi9Gb250TmFtZSAvVHlwZTFUZXN0IGRlZgovRm9udEJCb3ggezEwMCAxMDAgNTAwIDIwMCB9cmVhZG9ubHkgZGVmCi9QYWludFR5cGUgMCBkZWYKL0ZvbnRJbmZvIDkgZGljdCBkdXAgYmVnaW4KIC92ZXJzaW9uICgwMDEuMDAwKSByZWFkb25seSBkZWYKIC9Ob3RpY2UgKCkgcmVhZG9ubHkgZGVmCiAvRnVsbE5hbWUgKFR5cGUxVGVzdCkgcmVhZG9ubHkgZGVmCiAvRmFtaWx5TmFtZSAoVHlwZTFUZXN0KSByZWFkb25seSBkZWYKIC9XZWlnaHQgKFJlZ3VsYXIpIHJlYWRvbmx5IGRlZgogL0l0YWxpY0FuZ2xlIDAgZGVmCiAvaXNGaXhlZFBpdGNoIGZhbHNlIGRlZgogL1VuZGVybGluZVBvc2l0aW9uIC0yMDQuOCBkZWYKIC9VbmRlcmxpbmVUaGlja25lc3MgMTAyLjQgZGVmCmVuZCByZWFkb25seSBkZWYKL0VuY29kaW5nIDI1NiBhcnJheQogMCAxIDI1NSB7IDEgaW5kZXggZXhjaCAvLm5vdGRlZiBwdXR9IGZvcgpkdXAgOS91bmkwMDA5IHB1dApkdXAgMTAvdW5pMDAwQSBwdXQKZHVwIDExL3VuaTAwMEIgcHV0CmR1cCAxMi91bmkwMDBDIHB1dApkdXAgMTMvdW5pMDAwRCBwdXQKZHVwIDMyL3NwYWNlIHB1dApkdXAgNDgvemVybyBwdXQKZHVwIDQ5L29uZSBwdXQKZHVwIDUwL3R3byBwdXQKZHVwIDUxL3RocmVlIHB1dApkdXAgNTIvZm91ciBwdXQKZHVwIDUzL2ZpdmUgcHV0CmR1cCA1NC9zaXggcHV0CmR1cCA1NS9zZXZlbiBwdXQKZHVwIDU2L2VpZ2h0IHB1dApkdXAgNTcvbmluZSBwdXQKZHVwIDY1L0EgcHV0CmR1cCA2Ni9CIHB1dApkdXAgNjcvQyBwdXQKZHVwIDY4L0QgcHV0CmR1cCA2OS9FIHB1dApkdXAgNzAvRiBwdXQKZHVwIDcxL0cgcHV0CmR1cCA3Mi9IIHB1dApkdXAgNzMvSSBwdXQKZHVwIDc0L0ogcHV0CmR1cCA3NS9LIHB1dApkdXAgNzYvTCBwdXQKZHVwIDc3L00gcHV0CmR1cCA3OC9OIHB1dApkdXAgNzkvTyBwdXQKZHVwIDgwL1AgcHV0CmR1cCA4MS9RIHB1dApkdXAgODIvUiBwdXQKZHVwIDgzL1MgcHV0CmR1cCA4NC9UIHB1dApkdXAgODUvVSBwdXQKZHVwIDg2L1YgcHV0CmR1cCA4Ny9XIHB1dApkdXAgODgvWCBwdXQKZHVwIDg5L1kgcHV0CmR1cCA5MC9aIHB1dApkdXAgOTcvYSBwdXQKZHVwIDk4L2IgcHV0CmR1cCA5OS9jIHB1dApkdXAgMTAwL2QgcHV0CmR1cCAxMDEvZSBwdXQKZHVwIDEwMi9mIHB1dApkdXAgMTAzL2cgcHV0CmR1cCAxMDQvaCBwdXQKZHVwIDEwNS9pIHB1dApkdXAgMTA2L2ogcHV0CmR1cCAxMDcvayBwdXQKZHVwIDEwOC9sIHB1dApkdXAgMTA5L20gcHV0CmR1cCAxMTAvbiBwdXQKZHVwIDExMS9vIHB1dApkdXAgMTEyL3AgcHV0CmR1cCAxMTMvcSBwdXQKZHVwIDExNC9yIHB1dApkdXAgMTE1L3MgcHV0CmR1cCAxMTYvdCBwdXQKZHVwIDExNy91IHB1dApkdXAgMTE4L3YgcHV0CmR1cCAxMTkvdyBwdXQKZHVwIDEyMC94IHB1dApkdXAgMTIxL3kgcHV0CmR1cCAxMjIveiBwdXQKZHVwIDEzMy91bmkwMDg1IHB1dApkdXAgMTczL3VuaTAwQUQgcHV0CnJlYWRvbmx5IGRlZgpjdXJyZW50ZGljdCBlbmQKY3VycmVudGZpbGUgZWV4ZWMKgAKNFgAAdD+EE/NjbKhan/77ULS7JzAqXMCrbi+Vm/INMgw3PCEo0KDOcHKx9nKgqjjDwOzrBLRMsXShwxYS1x/6IMkJVCVjeDcveVsL8pQfQ38Fn0GuBZjABRX+8YczNVfzLOMqnufUurZdpTQ/knB+LPzz6M5Eblraw5/Dfs5ktos1bODXEPRbHn8s12iryhQ2CDZodhoQCUZBYtBUwfa/LEajGbPGZFKHYxbBOpJkVtNmKVj9VnQNWFZzbmEE+BPtMZFWd3k07rHFRFrmv27lnlsZcItCh9tLm6+YgpGrwG/ed/zDHuFzCpT7xs7MdEpZqfajjiw9JKNtvO6XgdQ7y2rxwhv69q6/DIarClaEsha9+rFXfYTEkK8BcaUY1RI7beRwxnGx8Mt8pafG9aKKUpeQEJnqFv6Bk9Kz6/t+fAPkHdv8KUIErVw3AxMUFg63Ti+yeRa+1QQ7vDTTkV3O3Obim9olUKuQDhfmH2uWx+K3iBXFqwCLQTC/S/W/LDn9UCsxsphc4HA1txBMdO2NO8rPec0i5GLWOZZI5tOxhUsjPXLloUXLWOkU3I0wBTXW8TlAV2yBn+EPJ4XV14tyCoWHanYChLFqYcChHUHj+0GKluGz0gfPNQ4xf3u6+jyJLmvDFxiNxtSNAud0yBZx12ouXbVSeHGYXWk84KA/Sus2DDbG/E6H+kx2MfnEVMz2yZm/lW6a4w5Pevvdoxfj9BMLm1dBkDCxHQsjw1dbv7yBz3j6kibdv2I4JFxLoEW8qsxcH2SXXgJpM3KrNQlPRIqq8IKmxH3ZllsL/QQ8YJFg+KJjygCl9QOmrL/1FXx/JXmx0m6ynXaUfF1PwtiP7e1ISNfaExaiL1C9OtTK2T4h2WhRPW57ycPj/dYRfjKD7OvXXYQ+Co+s+jCWDRpbwGTLlDP0XQFMBNxx4cBogjdx6ouFfm8lXgfeQf/GC0CtQolv6YH1O06mdXeZ1hqAFwHALulGBr2WdAoV9wBD5SBSeMeIV3waNCP5P0xB7rP7uXTZv/oscgXK/61/3tsjyAXyZASQxvMf8uyWsThQA9TTEOM1o28z9bj6Yhs0Snwl2CxemFy3xgyidcNyBDRsCDFwYKjsejtr9sZGIXAFJK2djcN8aUa549kahghsM9NAB65fQFOwjWjPAZEnunfOsU/LXlWLjpPdul4+P/iseq37udumJc/dZMXm6KXDL6pesrEVc80hrFtnnPWTyaNUP1im/rQrwZvDnVJ0Yvg5XSGo6crcpdPE5pUviEVHB2W8aCI8W+2QrxfIXdN8g4bPW7FEjuoe424XoHpyyIkD1+0MyVNgCVywIoFjugUfAu5NKoFo+7+WyIvtrHlgEuMjEK70a2RhFp7wVuod4VD0EHJ+MWXUglKomSB7mA07KQiQDck++iAwwPmxKLmUdUItfeOcEji8RBoUkcTu9YuNij22HrsBxawVzE8Yz/ZRKqlbHpuuRHao7z2gIobOg8wHb/+lMC1o4vjwayYLSNfFyvf6XivjCkz2KUQlrLX+8WyTVA6JDHsI1xfhI+kr3NTJ2fZBKweobTge72fpGuiVEjV82l52w9UZBH9P70XJUqd1lYIstqLN+mDdVSJ1axsp9sDufLMEFWX9xUlCOyAdOefz02cniXnJcxIVdH8q01OLa5jxMlJ+CBeXO0D4j+r7qY8ZCTyeRT9eEpAykqEajhOoZPjhjtMlw5jgyZJ9COaM30bC3coKF93YSmRQaIkE9b1kw5dGlFvpGGYL4bAzo0SNSkIO00So24z3TISF9aJ1ssBn2072KoV99O/5QN5cWKdDvaSFkMJp0YFRHXNNHe1Zo0kV5Shq0uEygfikR1XDyuLuiycQSHWnFxVr2xSaMnA5CfKwfQu8hQ5ljap6spe1+Qh6Am4TkDa/CaO1QlQ03mRUcyyxFwGZJljNAkI7mVgG6DUlxxVSK8wJMH7otzpS0L2LYTHTG6LV0iXQBjNB4wuH5LqyqTgsiA8x7UASJFYY0RJGrD9moFp/ON0t+NPT6Rfw3Semq239oYpxMQr/mHkHfExaIA0AX31DjfMqWzj4bypd8B9zZFvOogC2EHPobmhYhjzFcbMdVXwnAENC0EVbEMdLzDQFeSFRpDwF6MJ5CyqFS4wD7PsyF/aVlPwi0rLnr6+xygmhFhtpsOi/zVT8qT0BCWBG4+9UZIh6MfLm+JWkLNQcEGmhTglxzIhntDTZkBO9MkYhs2vOM9pAWS9Pjcba8OR6+aiVMOZVReGm7FH3BixWPTHOeqMGpZYH09MRTScHecT7G/TgiZIcUReqM7OdmyExBR2IJ0tLuaEuHxyn7SC5Gdlcf9mL9Kz15sZFzTkZMjJAtCOTPMaHq/0eQIr/Ln1YMDd6O+ApErFrIGDQd4hBA2H8tIZMIuSct/KMzwj83QiB+wvvF/ec6vJCSEjU7FPayLiPt9ELxOKC0p3+k4wfc4PCX0VLozKllmEQ2+m7gkcI+mvWXGkjziNZtg7HsgEZbRTjH2H8LuaonHwNzpASWjt8e6deQzOglya7sRNKamea3s1oGPx1ZAZmGs5EZGtW0wT7h7WbQkM0Pv0Xcmb2d+0MWyOpvThTQOqog9wOrBZp8WQwFMbimf5h3nqrmgeRcmQL5YGrA0lLaShxIB9fiC8RBJ2ndEs8vW4MJU3u95ZJmQUwTDewI2WhsgV4CG9t74y790nLu/OWuRtm83j6FLEvtmgs0fMoE0WAtqrbzB2BLblT4GN7VXbZSE7K8B+zPTlx2Lw1mH4AwW0RK/6Hl6P8Y2KMsVSnLDDhKXxXSpaQQiiMV6lGAT4JLO9dh4cSAl0KVseZ62jLfcpN3T5UpiNAXr/OMqe0Vki/TLdwUCbfNL606j7Ki8v84s/ob3kaoYzKE5HDhgxKRYkd5NXmT321GSDdGW5OG4J5kwcF7KgJ7lY4HwLAkumbF4oMWMDz3FYRK5BxlYA65pSMxhCYKV5XMg2cPDPpLj8S55CI0Nq8WX8vnIY8JhSA2nbnTwzrSU30sN6BpXPILan6UBbNn91PgLOawA9Qnqebuq3BwqHOYAFecMIf3W/70HZ+iFc87AiEPK7kmn2Fm4az69PV3jVBZlIKAYGUHQvTm3+KYnNEGKSoOLB0bUGhklOy3vnbCuZt7Z2i0OpM2d7J9SqaCF1qrmIItsPKwGI6E1XyOhs1pVMwbWUzwHh4EU/wvU0bmcMinR9PWfvyusq4wUeP/rSQoRd7TfFNHZaCg9HJkgDdtjcTjpPBv/SPMNahf6KdknrkRunKE1+XxvdjKxo+7DXcijK8kPwDB5ZAv//BxZ6NEkippShPuCXnlP6huGWMNaM4Ascw+BU3R5P6SHODlrafn48qAqemBBnoUfmCw2mu+su+agNtVYx5MEacrmpyZGaQizFF/IAygncdllch8YCF6upwv0J8ehKxqIrdB5EpS8NwVmSl9HnL4Xkob5/T/PzCK5wCZYkECwKZEF1atSrcoKBeIHzn7FsCGLNDU7WPEseSYZvRNOUmunflZDysYSLBf7XMKkeaLijeB1qrD4P4fone9c9g1KrdZO597AT3DFfL/fTuKfvzLFS2dFJW3JxBhtIAEbVyd7hhE1ik1QulOOh7ZyPiuu60urRcrGU+fQVbXtdCVCZ+NMn/gvFbipQ+4w4Ry8xfBpyWQrIFTyzQ/hyBgecQnA7iJhrSiV56aCErXrHDhNCXvApKd9+rUB6w8Ltrp2ag/AIn3jA414KjLwvcvh2ztTYW9kGsA9c/TQYKYXrgbaWoSd7Z357cmY9I4UOEVad3Fxk8QZ2zWFdvydAyOrGU+7lo6fvirobuADWo1P6/4BSh7ZdzHxs5s3RvDAYrWwoO/WpmMdWzF5RvAXKXXcYhme5QBalZw270QjmB3VOvaZLQgkBFYV/USdi2Pl5yJRxmeRLHxW+9U3gi/vUxowUiFPaJ4hjgzuogct3zF0oJ3ZrSamVut85DZC88fY5RdC/GR53FR+nt51wzu+PPjh2UtQgZTdTD4tfmZ8MGc2BaHiQ+yhEPpXWi2sfkFwkVlOMnHrJOFwKil0Uy8OoHHiDlSQNX22YinDSmcY8silpqltMmVnibm4mQodIocSfNY+DMA6v5oiFFsXUCEiS5P8975OihDJIokTGt4E/z7VQag2vChKPSEMaK6NIhQjGn1qAVq26MDnXkLe1ScmDDVhdBH7F9OiPdGEoGz0R/EHqAiPC6LaGByJwvKm87QgQ0bP/CIWKAGOmV9b9GV18G8nN4+T1xu4bcatp+0RzLNXxPXBMvFYBDvhBv0JqM1Bzkff5VHc8Cly7qfWJ9GPfghDC1cdFtXf/qNzdrCNvEeT5BloKFZ6s7vkDEfGPLqgMxt5T3ywQPJhdh0J5m7HurwNA+BwBycoPts7h33elU2NlSNe7iRbTViFFLirJdYGSlZaelccnNqAJEWC55V5gxbZiA+nym/7KRlEeUpFmLtFBBPKHOsbhK5uNWw2w2cCCJuwlC8FcLoqsGaykaQimUJNrg4r5lDLwcdIPslHivyRywMP4f/rr509DL/ZsvrEZHXpC1UHiuUnpoYp5uD8Sd5t7TCG1pKC5Wqw6QnE3j5Ra0Zd3WaY9MJkTtmj5zAmPvBWtda/uhdM++vqUD5pm2FkmZjpcxdQ+Dw2ebN3eOKQsDcRrNc07d8qWC2XkqAxyolN21qFg4FBcM68Szc1/50XwOK8QyEBhG24XJbMDfwTGOtzKCExUaTje30HoD3Nzzee39rTe8t3aQJ56VVEdDPBsxqjrYHdbEPJFqwRSExlngpbIWjOiEyWu5YbcX0cQgk/TSlnRGV16o9pg2qBbcvWm5gpPZ0Kj3QrxPpmJIUqq6tYoc2zt2LZUbrTnopjvISz8+fm1jIQJt2vpRgnwLwC9uAsf3vBEoZvnxGQKVsG+1B6uVnlK4hKB0retrDEbdcGGpiACMc8IuXH+vQztfpFYR8aCY79MpHm+oHiIUWsBiosbWoYNOZv1D3T28W+A3xBrKABzqhwvymGnMrec/JzNPObaj4szJYJegxC7SyWuNbA8Je5xNon8SKM9KvtSh6MWDOhOMk4eTOyiuwUpUYRiMpazBdMe0msnhuE2qlRvQC08QaDEUZMN+EWEX63wnjN6CfXw5qIdlAHoG9ZypCQy7G3mYVqYLfywMdFBKE7JY+u31XsYp7UNuRkKAN6VGQux6Qym64jGLBO5M5gvzIHmUluXR+y9D6SzcOtocea4Y9/YXggV1MWSmW2dq7hvV58ZYbix1wWwuv10uG8OIUwiaMet6vVag6bIK1RG+7yPB3caz9gCcqoXnU4zlHNYqu6Zcg3226k91SSDWcvy5fHoKSZOtSwkIEb0m+dJURp7QFJ1AeuWoy6oxD6xAM995YBRyLCX3N9gHGiJZ33BbKq85oGrzQN8SeXs6j8+FrglsRqcjvdk7vgZCLRl7qcWsmkFXCzikZsHPn2stZMJm7bVfILwdMTF4A42iV9wy1idF4qXYzAZHLdEP9BDpdGMKRiICY8avlTv0nYMW1qgBz4cXrdmSrBTPV4Ts5/3yDP44/foH/rju3wLoWprGkQMU1cNj66iCCuKnhExh/bRb40wLE1N6H86Le9WYBUbJEJA5Knx3ELAboZ2xK+e8zK2jPZdcv1AGGfPE7V6G7/7YCOepiP4cv+RTru77QaND/sf+eX1N+pb8WDxgTMPQ5/AJeibBWmEO7zw+L8CBY+rAphiofoUzY9U32dBwf82tdPDwvqrtik+HqZfG74h6We9fRJrfUjR3J/5g7P8IpcJAI7XQ6N7IvujSTMCtDtOd5Pf4mzuvFj/y3A5cLXuFT8wvqtm+BaIMLCe0lgWg4h6vtXEeKGmMsCVnZP16QiuaftHgo71UaXH18Z/rafUcV1TirxHs9ddST6hNPZ31IMPVt6L2Z8p3ucsMRPjlqY4SpYjQClVEiUc6R2FPbGstgmH/OU+uDx7oNhRgFV91/h3p/9klZ1PXOHWzTtPN91bKkITWttjft16yhKkY9Qi2vXG/f8BdyNenjFoUHATcsr4n9UtjNFBIptLX7UQFf4KkNnbyeKV1Cqdl3L+NEz8/gXBeAXJgEEHNRBjz9sQLiyj82rL4wgonrKDtxvVRCBVOc3g2BYdnqsKpe7be5GFrhxyYIufRfj64AVfn9tExQC4y7NoQcMUCXHcDXSQaO4DI5kh4hWftJhYRQciNx7okOXWgQakxRz0BLMquW2zr16Eh+a1wMV+RRRbnOQUrdSuOptLp0HeXxDPBmd23mb+o9EaBZopKJcsZ5uVRnRPG5MpSDZBX/dD+ZcFhNxAkwftTJGxbHU2FvDZxZMau4ORlvRpe0jQqK0KAPjVhxygj+efvJhwqE7SjMk92H8tSlUcJNKTPRWlbzC+nXIfQmrUKWHB9WkJYPkygDNksMh29qtDKBoTrPFKd8TjtqAmPPYOARdnuOZ5GBLvk29+HuyIxm1reGzc0gAVPFM4+a5KuvdXP5RDQsfOYhrjfhryXiSjnafEa4Vr8bQV4tCrvM1wB6GwJNUMUIOLnZMKC1Wpa42CVKIjTsED1U11qk0c/z2pdQSW8bkze+S96EspK6YwFRpG+l2w57H45pXKCM/OtEoUFAsNYp0aUI03VLX0vayOPXwZjxfm0Sbxw8GlVveOcDjxP9PubGwJWB3zThbP3mWiciTTtQYHzJ12nStPUWrHe09we4wUPO5jzfTMVhXA/IGP6+xomVdm6BR6Iffn12RP9G+HUeWBB/vSHCL6FMcBSGEKo8kX9sVT43WPthgSJGxH+5cxSVsRZSpa3WEwJI7W6R30TpkUmhLMOROdMF9Oh6+G+73HC6kdt27xFupu9ZkFRCBxpa/QAQxLUKMekm90PTVMdiWBALcRG/5a+GbCJsEwasen3e8NWD8CDFqPPeDNQEhkDNzaWbvtiNttHV9ESmFC5Ty642U6taS7g3yI/aeMBjh6zebr+UmXv17XeNyO6N6KJBOstv8Ry1f/TmkuuQm3fXu3n99fkb5gLZUHIvUuQ+Q3vTnWrPkCt2Ezbp125iAKvlRyhk1pXLvrr/EA1OhtaGnLqEeq5XqBpwh6StXPQXk9qfZT9wNzhylhcM929FxVeGolbk+68k//XdoJhQg4nxUqYBavhqCEpNTvL+tCJP/DOX4MSAH+3VYuzPQGp03X4exr4V3CKf9vCE6BUiBvHjDic5quOPsKCg8oYqU98UUr7f8aF1IwzW5woFt5CcScIS7mxk93T9ZB3WasKAPuMgV97OniMMOLqV1q6x5g1kHT67a7lQG3t1rPIFzDu/YvRh0ro/ldnLOAG7kgcZgBxG+GUlSMJMFzA51cKCE6zulbDK0U4lGyF+0fQzK5J7JGySCNyspkbL2KoioJJPWZ9kEggqZlKQk9ps0HQbBLNKkad1ZVIyuJHrQTddcr6SB8TnUI+FEH9/dyBpfXAx3XCL9xWWSqzEsQ9h24a+oRnfkm9lEQDrR9YpPyFavVP2QhljRuQJ6TXwqrrBe0LbEL7kn3st3w98B99u4MtdP/mbeSDjk5/8iYKLsilg30/mllHfbIv8kue12+JmZJo01gCc+Dehm0rlMPMxeqqrCKlXj5n5FerqqPfkNs/rKfXFFlgu5cl/cBKqP17G4xLPLOLA7wHfabHXZB0vQDeE9SpIAZPmzR9VjXx/quSDUV8p4ABFQIAAAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKY2xlYXJ0b21hcmsKgAM="; public static void main(String[] args) throws Exception { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU.java openjdk-25-25.0.3+9/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,889 +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. - */ - -/* - * Copyright (C) 2013-2014 IBM Corporation and Others. All Rights Reserved. - */ - -import java.awt.Color; -import java.awt.Composite; -import java.awt.Font; -import java.awt.FontFormatException; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.GraphicsConfiguration; -import java.awt.Image; -import java.awt.Paint; -import java.awt.Rectangle; -import java.awt.RenderingHints; -import java.awt.RenderingHints.Key; -import java.awt.Shape; -import java.awt.Stroke; -import java.awt.font.FontRenderContext; -import java.awt.font.GlyphVector; -import java.awt.font.TextLayout; -import java.awt.geom.AffineTransform; -import java.awt.image.BufferedImage; -import java.awt.image.BufferedImageOp; -import java.awt.image.ImageObserver; -import java.awt.image.RenderedImage; -import java.awt.image.renderable.RenderableImage; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.text.AttributedCharacterIterator; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.TreeMap; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -/** - * This test runs against a test XML file. It opens the fonts and attempts - * to shape and layout glyphs. - * Note that the test is highly environment dependent- you must have - * the same versions of the same fonts available or the test will fail. - * - * It is similar to letest which is part of ICU. - * For reference, here are some reference items: - * ICU's test file: - * http://source.icu-project.org/repos/icu/icu/trunk/source/test/testdata/letest.xml - * ICU's readme for the similar test: - * http://source.icu-project.org/repos/icu/icu/trunk/source/test/letest/readme.html - * - * @bug 8054203 - * @test - * @summary manual test of layout engine behavior. Takes an XML control file. - * @compile TestLayoutVsICU.java - * @author srl - * @run main/manual - */ -public class TestLayoutVsICU { - - public static boolean OPT_DRAW = false; - public static boolean OPT_VERBOSE = false; - public static boolean OPT_FAILMISSING = false; - public static boolean OPT_NOTHROW= false; // if true - don't stop on failure - - public static int docs = 0; // # docs processed - public static int skipped = 0; // cases skipped due to bad font - public static int total = 0; // cases processed - public static int bad = 0; // cases with errs - - public static final String XML_LAYOUT_TESTS = "layout-tests"; // top level - public static final String XML_TEST_CASE = "test-case"; - public static final String XML_TEST_FONT = "test-font"; - public static final String XML_TEST_TEXT = "test-text"; - public static final String XML_RESULT_GLYPHS = "result-glyphs"; - public static final String XML_ID = "id"; - public static final String XML_SCRIPT = "script"; - public static final String XML_NAME = "name"; - public static final String XML_VERSION = "version"; - public static final String XML_CHECKSUM = "checksum"; - public static final String XML_RESULT_INDICES = "result-indices"; - public static final String XML_RESULT_POSITIONS = "result-positions"; - - /** - * @param args - * @throws IOException - * @throws SAXException - * @throws ParserConfigurationException - */ - public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException { - System.out.println("Java " + System.getProperty("java.version") + " from " + System.getProperty("java.vendor")); - TestLayoutVsICU tlvi = null; - for(String arg : args) { - if(arg.equals("-d")) { - OPT_DRAW = true; - } else if(arg.equals("-n")) { - OPT_NOTHROW = true; - } else if(arg.equals("-v")) { - OPT_VERBOSE = true; - } else if(arg.equals("-f")) { - OPT_FAILMISSING = true; - } else { - if(tlvi == null) { - tlvi = new TestLayoutVsICU(); - } - try { - tlvi.show(arg); - } finally { - if(OPT_VERBOSE) { - System.out.println("# done with " + arg); - } - } - } - } - - if(tlvi == null) { - throw new IllegalArgumentException("No XML input. Usage: " + TestLayoutVsICU.class.getSimpleName() + " [-d][-v][-f] letest.xml ..."); - } else { - System.out.println("\n\nRESULTS:\n"); - System.out.println(skipped+"\tskipped due to missing font"); - System.out.println(total+"\ttested of which:"); - System.out.println(bad+"\twere bad"); - - if(bad>0) { - throw new InternalError("One or more failure(s)"); - } - } - } - - String id; - - private void show(String arg) throws ParserConfigurationException, SAXException, IOException { - id = "<none>"; - File xmlFile = new File(arg); - if(!xmlFile.exists()) { - throw new FileNotFoundException("Can't open input XML file " + arg); - } - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - if(OPT_VERBOSE) { - System.out.println("# Parsing " + xmlFile.getAbsolutePath()); - } - Document doc = db.parse(xmlFile); - Element e = doc.getDocumentElement(); - if(!XML_LAYOUT_TESTS.equals(e.getNodeName())) { - throw new IllegalArgumentException("Document " + xmlFile.getAbsolutePath() + " does not have <layout-tests> as its base"); - } - - NodeList testCases = e.getElementsByTagName(XML_TEST_CASE); - for(int caseNo=0;caseNo<testCases.getLength();caseNo++) { - final Node testCase = testCases.item(caseNo); - final Map<String,String> testCaseAttrs = attrs(testCase); - id = testCaseAttrs.get(XML_ID); - final String script = testCaseAttrs.get(XML_SCRIPT); - String testText = null; - Integer[] expectGlyphs = null; - Integer[] expectIndices = null; - Map<String,String> fontAttrs = null; - if(OPT_VERBOSE) { - System.out.println("#"+caseNo+" id="+id + ", script="+script); - } - NodeList children = testCase.getChildNodes(); - for(int sub=0;sub<children.getLength();sub++) { - Node n = children.item(sub); - if(n.getNodeType()!=Node.ELEMENT_NODE) continue; - String nn = n.getNodeName(); - if(nn.equals(XML_TEST_FONT)) { - fontAttrs = attrs(n); - } else if(nn.equals(XML_TEST_TEXT)) { - testText = n.getTextContent(); - } else if(nn.equals(XML_RESULT_GLYPHS)) { - String hex = n.getTextContent(); - expectGlyphs = parseHexArray(hex); - } else if(nn.equals(XML_RESULT_INDICES)) { - String hex = n.getTextContent(); - expectIndices = parseHexArray(hex); - } else if(OPT_VERBOSE) { - System.out.println("Ignoring node " + nn); - } - } - if(fontAttrs == null) { - throw new IllegalArgumentException(id + " Missing node " + XML_TEST_FONT); - } - if(testText == null) { - throw new IllegalArgumentException(id + " Missing node " + XML_TEST_TEXT); - } - - String fontName = fontAttrs.get(XML_NAME); - Font f = getFont(fontName, fontAttrs); - if(f==null) { - if(OPT_FAILMISSING) { - throw new MissingResourceException("Missing font, abort test", Font.class.getName(), fontName); - } - System.out.println("Skipping " + id + " because font is missing: " + fontName); - skipped++; - continue; - } - FontRenderContext frc = new FontRenderContext(null, true, true); - TextLayout tl = new TextLayout(testText,f,frc); - final List<GlyphVector> glyphs = new ArrayList<GlyphVector>(); - Graphics2D myg2 = new Graphics2D(){ - - @Override - public void draw(Shape s) { - // TODO Auto-generated method stub - - } - - @Override - public boolean drawImage(Image img, AffineTransform xform, - ImageObserver obs) { - // TODO Auto-generated method stub - return false; - } - - @Override - public void drawImage(BufferedImage img, - BufferedImageOp op, int x, int y) { - // TODO Auto-generated method stub - - } - - @Override - public void drawRenderedImage(RenderedImage img, - AffineTransform xform) { - // TODO Auto-generated method stub - - } - - @Override - public void drawRenderableImage(RenderableImage img, - AffineTransform xform) { - // TODO Auto-generated method stub - - } - - @Override - public void drawString(String str, int x, int y) { - // TODO Auto-generated method stub - - } - - @Override - public void drawString(String str, float x, float y) { - // TODO Auto-generated method stub - - } - - @Override - public void drawString( - AttributedCharacterIterator iterator, int x, int y) { - // TODO Auto-generated method stub - - } - - @Override - public void drawString( - AttributedCharacterIterator iterator, float x, - float y) { - // TODO Auto-generated method stub - - } - - @Override - public void drawGlyphVector(GlyphVector g, float x, float y) { - if(x!=0.0 || y!=0.0) { - throw new InternalError("x,y should be 0 but got " + x+","+y); - } - //System.err.println("dGV : " + g.toString() + " @ "+x+","+y); - glyphs.add(g); - } - - @Override - public void fill(Shape s) { - // TODO Auto-generated method stub - - } - - @Override - public boolean hit(Rectangle rect, Shape s, boolean onStroke) { - // TODO Auto-generated method stub - return false; - } - - @Override - public GraphicsConfiguration getDeviceConfiguration() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setComposite(Composite comp) { - // TODO Auto-generated method stub - - } - - @Override - public void setPaint(Paint paint) { - // TODO Auto-generated method stub - - } - - @Override - public void setStroke(Stroke s) { - // TODO Auto-generated method stub - - } - - @Override - public void setRenderingHint(Key hintKey, Object hintValue) { - // TODO Auto-generated method stub - - } - - @Override - public Object getRenderingHint(Key hintKey) { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setRenderingHints(Map<?, ?> hints) { - // TODO Auto-generated method stub - - } - - @Override - public void addRenderingHints(Map<?, ?> hints) { - // TODO Auto-generated method stub - - } - - @Override - public RenderingHints getRenderingHints() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void translate(int x, int y) { - // TODO Auto-generated method stub - - } - - @Override - public void translate(double tx, double ty) { - // TODO Auto-generated method stub - - } - - @Override - public void rotate(double theta) { - // TODO Auto-generated method stub - - } - - @Override - public void rotate(double theta, double x, double y) { - // TODO Auto-generated method stub - - } - - @Override - public void scale(double sx, double sy) { - // TODO Auto-generated method stub - - } - - @Override - public void shear(double shx, double shy) { - // TODO Auto-generated method stub - - } - - @Override - public void transform(AffineTransform Tx) { - // TODO Auto-generated method stub - - } - - @Override - public void setTransform(AffineTransform Tx) { - // TODO Auto-generated method stub - - } - - @Override - public AffineTransform getTransform() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Paint getPaint() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Composite getComposite() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setBackground(Color color) { - // TODO Auto-generated method stub - - } - - @Override - public Color getBackground() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Stroke getStroke() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void clip(Shape s) { - // TODO Auto-generated method stub - - } - - @Override - public FontRenderContext getFontRenderContext() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Graphics create() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Color getColor() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setColor(Color c) { - // TODO Auto-generated method stub - - } - - @Override - public void setPaintMode() { - // TODO Auto-generated method stub - - } - - @Override - public void setXORMode(Color c1) { - // TODO Auto-generated method stub - - } - - @Override - public Font getFont() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setFont(Font font) { - // TODO Auto-generated method stub - - } - - @Override - public FontMetrics getFontMetrics(Font f) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Rectangle getClipBounds() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void clipRect(int x, int y, int width, int height) { - // TODO Auto-generated method stub - - } - - @Override - public void setClip(int x, int y, int width, int height) { - // TODO Auto-generated method stub - - } - - @Override - public Shape getClip() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setClip(Shape clip) { - // TODO Auto-generated method stub - - } - - @Override - public void copyArea(int x, int y, int width, int height, - int dx, int dy) { - // TODO Auto-generated method stub - - } - - @Override - public void drawLine(int x1, int y1, int x2, int y2) { - // TODO Auto-generated method stub - - } - - @Override - public void fillRect(int x, int y, int width, int height) { - // TODO Auto-generated method stub - - } - - @Override - public void clearRect(int x, int y, int width, int height) { - // TODO Auto-generated method stub - - } - - @Override - public void drawRoundRect(int x, int y, int width, - int height, int arcWidth, int arcHeight) { - // TODO Auto-generated method stub - - } - - @Override - public void fillRoundRect(int x, int y, int width, - int height, int arcWidth, int arcHeight) { - // TODO Auto-generated method stub - - } - - @Override - public void drawOval(int x, int y, int width, int height) { - // TODO Auto-generated method stub - - } - - @Override - public void fillOval(int x, int y, int width, int height) { - // TODO Auto-generated method stub - - } - - @Override - public void drawArc(int x, int y, int width, int height, - int startAngle, int arcAngle) { - // TODO Auto-generated method stub - - } - - @Override - public void fillArc(int x, int y, int width, int height, - int startAngle, int arcAngle) { - // TODO Auto-generated method stub - - } - - @Override - public void drawPolyline(int[] xPoints, int[] yPoints, - int nPoints) { - // TODO Auto-generated method stub - - } - - @Override - public void drawPolygon(int[] xPoints, int[] yPoints, - int nPoints) { - // TODO Auto-generated method stub - - } - - @Override - public void fillPolygon(int[] xPoints, int[] yPoints, - int nPoints) { - // TODO Auto-generated method stub - - } - - @Override - public boolean drawImage(Image img, int x, int y, - ImageObserver observer) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean drawImage(Image img, int x, int y, - int width, int height, ImageObserver observer) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean drawImage(Image img, int x, int y, - Color bgcolor, ImageObserver observer) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean drawImage(Image img, int x, int y, - int width, int height, Color bgcolor, - ImageObserver observer) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean drawImage(Image img, int dx1, int dy1, - int dx2, int dy2, int sx1, int sy1, int sx2, - int sy2, ImageObserver observer) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean drawImage(Image img, int dx1, int dy1, - int dx2, int dy2, int sx1, int sy1, int sx2, - int sy2, Color bgcolor, ImageObserver observer) { - // TODO Auto-generated method stub - return false; - } - - @Override - public void dispose() { - // TODO Auto-generated method stub - - } - - }; - tl.draw(myg2, 0, 0); - if(glyphs.size() != 1) { - err("drew " + glyphs.size() + " times - expected 1"); - total++; - bad++; - continue; - } - boolean isBad = false; - GlyphVector gv = glyphs.get(0); - - // GLYPHS - int gotGlyphs[] = gv.getGlyphCodes(0, gv.getNumGlyphs(), new int[gv.getNumGlyphs()]); - - int count = Math.min(gotGlyphs.length, expectGlyphs.length); // go up to this count - - for(int i=0;i<count;i++) { - if(gotGlyphs[i]!=expectGlyphs[i]) { - err("@"+i+" - got \tglyph 0x" + Integer.toHexString(gotGlyphs[i]) + " wanted 0x" + Integer.toHexString(expectGlyphs[i])); - isBad=true; - break; - } - } - - // INDICES - int gotIndices[] = gv.getGlyphCharIndices(0, gv.getNumGlyphs(), new int[gv.getNumGlyphs()]); - for(int i=0;i<count;i++) { - if(gotIndices[i]!=expectIndices[i]) { - err("@"+i+" - got \tindex 0x" + Integer.toHexString(gotGlyphs[i]) + " wanted 0x" + Integer.toHexString(expectGlyphs[i])); - isBad=true; - break; - } - } - - - // COUNT - if(gotGlyphs.length != expectGlyphs.length) { - System.out.println("Got " + gotGlyphs.length + " wanted " + expectGlyphs.length + " glyphs"); - isBad=true; - } else { - if(OPT_VERBOSE) { - System.out.println(">> OK: " + gotGlyphs.length + " glyphs"); - } - } - - - if(isBad) { - bad++; - System.out.println("* FAIL: " + id + " /\t" + fontName); - } else { - System.out.println("* OK : " + id + " /\t" + fontName); - } - total++; - } - } - - - private boolean verifyFont(File f, Map<String, String> fontAttrs) { - InputStream fis = null; - String fontName = fontAttrs.get(XML_NAME); - int count=0; - try { - fis = new BufferedInputStream(new FileInputStream(f)); - - int i = 0; - int r; - try { - while((r=fis.read())!=-1) { - i+=(int)r; - count++; - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } - if(OPT_VERBOSE) { - System.out.println("for " + f.getAbsolutePath() + " chks = 0x" + Integer.toHexString(i) + " size=" + count); - } - String theirStr = fontAttrs.get("rchecksum"); - - String ourStr = Integer.toHexString(i).toLowerCase(); - - if(theirStr!=null) { - if(theirStr.startsWith("0x")) { - theirStr = theirStr.substring(2).toLowerCase(); - } else { - theirStr = theirStr.toLowerCase(); - } - long theirs = Integer.parseInt(theirStr, 16); - if(theirs != i) { - err("WARNING: rchecksum for " + fontName + " was " + i + " (0x"+ourStr+") "+ " but file said " + theirs +" (0x"+theirStr+") - perhaps a different font?"); - return false; - } else { - if(OPT_VERBOSE) { - System.out.println(" rchecksum for " + fontName + " OK"); - } - return true; - } - } else { - //if(OPT_VERBOSE) { - System.err.println("WARNING: rchecksum for " + fontName + " was " + i + " (0x"+ourStr+") "+ " but rchecksum was MISSING. Old ICU data?"); - //} - } - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return false; - } finally { - try { - fis.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - return true; - } - - - private Integer[] parseHexArray(String hex) { - List<Integer> ret = new ArrayList<Integer>(); - String items[] = hex.split("[\\s,]"); - for(String i : items) { - if(i.isEmpty()) continue; - if(i.startsWith("0x")) { - i = i.substring(2); - } - ret.add(Integer.parseInt(i, 16)); - } - return ret.toArray(new Integer[0]); - } - - - private void err(String string) { - if(OPT_NOTHROW) { - System.out.println(id+" ERROR: " + string +" (continuing due to -n)"); - } else { - throw new InternalError(id+ ": " + string); - } - } - - - private Font getFont(String fontName, Map<String, String> fontAttrs) { - Font f; - if(false) - try { - f = Font.getFont(fontName); - if(f!=null) { - if(OPT_VERBOSE) { - System.out.println("Loaded default path to " + fontName); - } - return f; - } - } catch(Throwable t) { - if(OPT_VERBOSE) { - t.printStackTrace(); - System.out.println("problem loading font " + fontName + " - " + t.toString()); - } - } - - File homeDir = new File(System.getProperty("user.home")); - File fontDir = new File(homeDir, "fonts"); - File fontFile = new File(fontDir, fontName); - //System.out.println("## trying " + fontFile.getAbsolutePath()); - if(fontFile.canRead()) { - try { - if(!verifyFont(fontFile,fontAttrs)) { - System.out.println("Warning: failed to verify " + fontName); - } - f = Font.createFont(Font.TRUETYPE_FONT, fontFile); - if(f!=null & OPT_VERBOSE) { - System.out.println("> loaded from " + fontFile.getAbsolutePath() + " - " + f.toString()); - } - return f; - } catch (FontFormatException e) { - if(OPT_VERBOSE) { - e.printStackTrace(); - System.out.println("problem loading font " + fontName + " - " + e.toString()); - } - } catch (IOException e) { - if(OPT_VERBOSE) { - e.printStackTrace(); - System.out.println("problem loading font " + fontName + " - " + e.toString()); - } - } - } - return null; - } - - - private static Map<String, String> attrs(Node testCase) { - Map<String,String> rv = new TreeMap<String,String>(); - NamedNodeMap nnm = testCase.getAttributes(); - for(int i=0;i<nnm.getLength();i++) { - Node n = nnm.item(i); - String k = n.getNodeName(); - String v = n.getNodeValue(); - rv.put(k, v); - } - return rv; - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU_jdkbase.xml openjdk-25-25.0.3+9/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU_jdkbase.xml --- openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU_jdkbase.xml 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/font/TextLayout/TestLayoutVsICU_jdkbase.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,1827 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -/* - * 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. - */ ---> -<!-- - NOTE: You are unlikely to have all needed fonts. - --> -<!-- - Copyright (c) 1999-2014 International Business Machines - Corporation and others. All rights reserved. - - WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT - UNLESS YOU REALLY KNOW WHAT YOU'RE DOING. - - file name: letest.xml - generated on: 03/04/2013 10:28:51 PM PST - generated by: gendata.cpp ---> - -<layout-tests> - <test-case id="Ghita" script="deva"> - <test-font name="raghu.ttf" version="Original Version 1.00 (2005)" checksum="0x088DB135" rchecksum="0x00803FCE"/> - - <test-text>श्रीमद् भगवद्गीता अध्याय अर्जुन विषाद योग धृतराष्ट्र उवाचृ धर्मक्षेत्रे कुरुक्षेत्रे समवेता युयुत्सवः मामकाः पाण्डवाश्चैव किमकुर्वत संजव</test-text> - - <result-glyphs> - 0x0000009E, 0x0000009A, 0x00000051, 0x00000222, 0x00000098, 0x00000091, 0x00000051, 0x00000003, - 0x00000097, 0x00000082, 0x0000009D, 0x000001A5, 0x0000FFFF, 0x0000FFFF, 0x00000222, 0x0000008F, - 0x00000221, 0x00000003, 0x0000005C, 0x000000DA, 0x0000FFFF, 0x00000099, 0x00000221, 0x00000099, - 0x00000003, 0x0000005C, 0x00000087, 0x000001D5, 0x0000005B, 0x0000FFFF, 0x00000093, 0x00000003, - 0x000001D2, 0x0000009D, 0x0000009F, 0x00000221, 0x00000091, 0x00000003, 0x00000099, 0x0000022A, - 0x00000082, 0x00000003, 0x00000092, 0x000001D9, 0x0000008F, 0x0000009A, 0x00000221, 0x000001B4, - 0x0000FFFF, 0x0000FFFF, 0x0000009A, 0x00000051, 0x00000003, 0x00000060, 0x0000009D, 0x00000221, - 0x00000085, 0x000001D9, 0x00000003, 0x00000092, 0x00000098, 0x0000005B, 0x0000FFFF, 0x000000A2, - 0x0000FFFF, 0x0000FFFF, 0x0000022F, 0x0000008F, 0x0000009A, 0x00000051, 0x0000022F, 0x00000003, - 0x00000080, 0x000001D5, 0x0000009A, 0x000001FD, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x0000022F, - 0x0000008F, 0x0000009A, 0x00000051, 0x0000022F, 0x00000003, 0x000000A0, 0x00000098, 0x0000009D, - 0x0000022F, 0x0000008F, 0x00000221, 0x00000003, 0x00000099, 0x000001D5, 0x00000099, 0x000001D5, - 0x000000D7, 0x0000FFFF, 0x000000A0, 0x0000009D, 0x0000022C, 0x00000003, 0x00000098, 0x00000221, - 0x00000098, 0x00000080, 0x00000221, 0x0000022C, 0x00000003, 0x00000094, 0x00000221, 0x000000D6, - 0x0000FFFF, 0x0000008C, 0x0000009D, 0x00000221, 0x000001B1, 0x0000FFFF, 0x0000FFFF, 0x00000230, - 0x0000009D, 0x00000003, 0x000001D1, 0x00000080, 0x00000098, 0x00000080, 0x000001D5, 0x0000009D, - 0x0000005B, 0x0000FFFF, 0x0000008F, 0x00000003, 0x000000A0, 0x00000232, 0x00000087, 0x0000009D - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000002, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x0000001C, 0x0000001D, 0x0000001A, 0x0000001B, 0x0000001E, 0x0000001F, - 0x00000021, 0x00000020, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, - 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037, - 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003E, 0x0000003C, 0x0000003D, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000045, 0x00000044, 0x00000046, 0x00000047, - 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000052, 0x00000051, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, - 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, - 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, - 0x00000078, 0x00000079, 0x0000007B, 0x0000007A, 0x0000007C, 0x0000007D, 0x0000007E, 0x00000081, - 0x0000007F, 0x00000080, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 9.468750, 0.000000, 19.130859, -0.451172, 15.984375, 0.000000, - 19.640625, 0.000000, 29.109375, 0.000000, 40.177734, -0.451172, 37.078125, 0.000000, - 43.078125, 0.000000, 52.546875, 0.000000, 62.015625, 0.000000, 69.984375, 0.000000, - 77.953125, 0.000000, 77.953125, 0.000000, 77.953125, 0.000000, 81.609375, 0.000000, - 89.578125, 0.000000, 93.234375, 0.000000, 99.234375, 0.000000, 109.171875, 0.000000, - 116.437500, 0.000000, 116.437500, 0.000000, 125.906250, 0.000000, 129.562500, 0.000000, - 139.031250, 0.000000, 145.031250, 0.000000, 154.968750, 0.000000, 164.718750, -0.011719, - 164.718750, 0.263672, 164.437500, 0.000000, 164.437500, 0.000000, 173.906250, 0.000000, - 179.906250, 0.000000, 184.265625, 0.000000, 192.234375, 0.000000, 200.203125, 0.000000, - 203.859375, 0.000000, 211.828125, 0.000000, 217.828125, 0.000000, 227.296875, 0.000000, - 231.375000, 0.000000, 240.843750, 0.000000, 246.843750, 0.000000, 256.740234, -0.011719, - 256.312500, 0.000000, 264.281250, 0.000000, 270.796875, 0.000000, 274.453125, 0.000000, - 282.796875, 0.000000, 282.796875, 0.000000, 282.796875, 0.000000, 292.458984, -0.451172, - 289.312500, 0.000000, 295.312500, 0.000000, 303.281250, 0.000000, 311.250000, 0.000000, - 314.906250, 0.000000, 324.890625, -0.011719, 324.375000, 0.000000, 330.375000, 0.000000, - 339.843750, 0.000000, 349.675781, 0.263672, 349.312500, 0.000000, 349.312500, 0.000000, - 360.187500, 0.000000, 360.187500, 0.000000, 359.384766, 0.275391, 360.187500, 0.000000, - 368.156250, 0.000000, 377.818359, -0.451172, 372.996094, 0.263672, 374.671875, 0.000000, - 380.671875, 0.000000, 388.371094, -0.011719, 391.546875, 0.000000, 398.062500, 0.000000, - 399.421875, 0.000000, 410.296875, 0.000000, 410.296875, 0.000000, 409.494141, 0.275391, - 410.296875, 0.000000, 418.265625, 0.000000, 427.927734, -0.451172, 423.105469, 0.263672, - 424.781250, 0.000000, 430.781250, 0.000000, 440.250000, 0.000000, 449.718750, 0.000000, - 456.832031, 0.263672, 457.687500, 0.000000, 465.656250, 0.000000, 469.312500, 0.000000, - 475.312500, 0.000000, 484.921875, -0.011719, 484.781250, 0.000000, 494.390625, -0.011719, - 494.250000, 0.000000, 500.179688, 0.000000, 500.179688, 0.000000, 509.648438, 0.000000, - 517.617188, 0.000000, 521.976562, 0.000000, 527.976562, 0.000000, 537.445312, 0.000000, - 541.101562, 0.000000, 550.570312, 0.000000, 561.445312, 0.000000, 565.101562, 0.000000, - 569.460938, 0.000000, 575.460938, 0.000000, 583.429688, 0.000000, 587.085938, 0.000000, - 594.351562, 0.000000, 594.351562, 0.000000, 602.320312, 0.000000, 610.289062, 0.000000, - 613.945312, 0.000000, 624.820312, 0.000000, 624.820312, 0.000000, 624.691406, 0.263672, - 624.820312, 0.000000, 632.789062, 0.000000, 638.789062, 0.000000, 643.148438, 0.000000, - 654.023438, 0.000000, 663.492188, 0.000000, 671.191406, -0.011719, 674.367188, 0.000000, - 682.628906, 0.263672, 682.335938, 0.000000, 682.335938, 0.000000, 690.304688, 0.000000, - 696.304688, 0.000000, 705.140625, 0.439453, 705.773438, 0.000000, 715.242188, 0.000000, - 723.210938, 0.000000 - </result-positions> - </test-case> - - <test-case id="Arabic" script="arab"> - <test-font name="CODE2000.TTF" version="Version 1.171" checksum="0xD025B1AD" rchecksum="0x1F6E6F2A"/> - - <test-text>أساسًا، تتعامل الحواسيب فقط مع الأرقام، وتقوم بتخزين الأحرف والمحارف الأخرى بعد أن تُعطي رقما معينا لكل واحد منها. وقبل اختراع "يونِكود"، كان هناك مئات الأنظمة للتشفير وتخصيص هذه الأرقام للمحارف، ولم يوجد نظام تشفير واحد يحتوي على جميع المحارف الضرورية</test-text> - - <result-glyphs> - 0x0000CE28, 0x0000CE87, 0x0000CE41, 0x0000CE81, 0x0000CE42, 0x0000CE54, 0x0000CE73, 0x0000CE21, - 0x00000003, 0x0000CE65, 0x0000CE41, 0x0000CE22, 0x0000CE38, 0x0000CE78, 0x0000CE73, 0x0000CE21, - 0x00000003, 0x0000CE5E, 0x0000CE88, 0x0000CE78, 0x0000CE33, 0x00000003, 0x0000CE84, 0x0000CE74, - 0x0000CE5F, 0x00000003, 0x0000CE85, 0x0000CE82, 0x0000CE2C, 0x0000CE38, 0x0000CE87, 0x00000003, - 0x0000CE3E, 0x0000CE37, 0x0000CE21, 0x0000CE81, 0x00000003, 0x0000CE42, 0x0000CE88, 0x0000CE68, - 0x0000CE4C, 0x0000CE2B, 0x00000003, 0x0000CE75, 0x0000CE22, 0x0000CE5C, 0x0000CE7B, 0x00000003, - 0x0000CE3E, 0x0000CE33, 0x0000CE82, 0x0000CE87, 0x00000003, 0x0000CE76, 0x0000CE73, 0x0000CE81, - 0x00000003, 0x00000588, 0x0000CE65, 0x0000CE41, 0x0000CE22, 0x0000CE38, 0x0000CE78, 0x0000CE74, - 0x0000CE73, 0x00000003, 0x0000CE75, 0x0000CE22, 0x0000CE6B, 0x0000CE41, 0x0000FFFE, 0x0000CE8B, - 0x0000CE21, 0x00000003, 0x0000CE7D, 0x0000CE40, 0x0000CE7F, 0x00000003, 0x0000CE4E, 0x0000CE88, - 0x0000CE50, 0x0000CE3C, 0x0000CE2B, 0x0000CE81, 0x00000003, 0x0000CE42, 0x0000CE88, 0x0000CE68, - 0x0000CE4C, 0x0000CE2C, 0x0000CE74, 0x0000CE73, 0x00000003, 0x0000CE28, 0x0000CE78, 0x0000CE5C, - 0x0000CE7B, 0x0000FFFE, 0x0000CE8B, 0x0000CE21, 0x00000003, 0x0000CE29, 0x0000CE22, 0x0000CE20, - 0x0000CE77, 0x00000003, 0x0000CE6D, 0x0000CE22, 0x0000CE7C, 0x0000CE7F, 0x00000003, 0x0000CE79, - 0x0000CE22, 0x0000CE6F, 0x00000003, 0x00000588, 0x00000005, 0x0000CE3D, 0x0000CE82, 0x0000CE70, - 0x000005B5, 0x0000CE7B, 0x0000CE82, 0x0000CE87, 0x00000005, 0x00000003, 0x0000CE5D, 0x0000CE21, - 0x0000CE42, 0x0000CE2C, 0x0000CE3B, 0x0000CE21, 0x00000003, 0x0000CE72, 0x0000CE26, 0x0000CE6B, - 0x0000CE81, 0x00000003, 0x00000011, 0x0000CE22, 0x0000CE80, 0x0000CE7C, 0x0000CE77, 0x00000003, - 0x0000CE3E, 0x0000CE37, 0x0000CE21, 0x0000CE81, 0x00000003, 0x0000CE72, 0x0000CE70, 0x0000CE73, - 0x00000003, 0x0000CE22, 0x0000CE7C, 0x0000CE88, 0x0000CE60, 0x0000CE77, 0x00000003, 0x0000CE22, - 0x0000CE78, 0x0000CE6B, 0x0000CE41, 0x00000003, 0x0000CE86, 0x0000CE58, 0x0000CE60, 0x000005B4, - 0x0000CE2B, 0x00000003, 0x0000CE79, 0x0000CE17, 0x00000003, 0x0000CE3E, 0x0000CE60, 0x0000CE25, - 0x00000003, 0x0000CE83, 0x0000CE42, 0x0000CE3B, 0x0000FFFE, 0x0000CE8B, 0x0000CE21, 0x00000003, - 0x0000CE65, 0x0000CE41, 0x0000CE22, 0x0000CE38, 0x0000CE78, 0x0000CE73, 0x0000CE21, 0x0000CE81, - 0x00000003, 0x0000CE65, 0x0000CE42, 0x0000CE37, 0x0000FFFE, 0x0000CE8B, 0x0000CE21, 0x00000003, - 0x0000CE7A, 0x0000CE87, 0x0000CE44, 0x0000CE3C, 0x0000CE2C, 0x0000CE25, 0x00000003, 0x0000CE75, - 0x0000CE82, 0x0000CE6C, 0x0000CE2B, 0x0000CE81, 0x00000003, 0x00000588, 0x0000CE75, 0x0000CE22, - 0x0000CE6B, 0x0000CE41, 0x0000FFFE, 0x0000CE8B, 0x0000CE21, 0x00000003, 0x0000CE5E, 0x0000CE77, - 0x00000003, 0x0000CE56, 0x0000CE6C, 0x0000CE67, 0x00000003, 0x0000CE24, 0x0000CE88, 0x0000CE47, - 0x0000CE21, 0x0000CE82, 0x0000CE38, 0x0000CE73, 0x0000CE21, 0x00000003, 0x0000CE72, 0x0000CE77, - 0x0000CE22, 0x0000CE60, 0x0000CE2C, 0x0000CE2B, 0x00000003, 0x00000588, 0x0000CE22, 0x000005B0, - 0x0000CE47, 0x0000CE22, 0x0000CE47, 0x0000CE17 - </result-glyphs> - - <result-indices> - 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4, - 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC, - 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4, - 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC, - 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4, - 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC, - 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4, - 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC, - 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4, - 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC, - 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4, - 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C, - 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094, - 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C, - 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084, - 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C, - 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074, - 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C, - 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064, - 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C, - 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054, - 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C, - 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044, - 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C, - 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, - 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C, - 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024, - 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C, - 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014, - 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C, - 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, - 0x00000003, 0x00000002, 0x00000001, 0x00000000 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 4.007812, 0.000000, 8.226562, 0.000000, 12.679688, 0.000000, - 18.679688, 0.000000, 23.132812, 0.000000, 31.289062, 0.000000, 34.312500, 0.000000, - 36.375000, 0.000000, 41.062500, 0.000000, 50.296875, 0.000000, 54.750000, 0.000000, - 56.859375, 0.000000, 62.367188, 0.000000, 66.632812, 0.000000, 69.656250, 0.000000, - 71.718750, 0.000000, 76.406250, 0.000000, 81.421875, 0.000000, 85.664062, 0.000000, - 89.929688, 0.000000, 95.742188, 0.000000, 100.429688, 0.000000, 108.796875, 0.000000, - 112.171875, 0.000000, 115.734375, 0.000000, 120.421875, 0.000000, 128.765625, 0.000000, - 134.765625, 0.000000, 139.007812, 0.000000, 144.515625, 0.000000, 148.734375, 0.000000, - 153.421875, 0.000000, 157.359375, 0.000000, 163.171875, 0.000000, 165.234375, 0.000000, - 171.234375, 0.000000, 175.921875, 0.000000, 180.375000, 0.000000, 184.617188, 0.000000, - 188.085938, 0.000000, 195.117188, 0.000000, 199.312500, 0.000000, 204.000000, 0.000000, - 208.007812, 0.000000, 210.117188, 0.000000, 217.054688, 0.000000, 220.429688, 0.000000, - 225.117188, 0.000000, 229.054688, 0.000000, 234.867188, 0.000000, 240.867188, 0.000000, - 245.085938, 0.000000, 249.773438, 0.000000, 253.781250, 0.000000, 256.804688, 0.000000, - 262.804688, 0.000000, 267.492188, 0.000000, 271.007812, 0.000000, 280.242188, 0.000000, - 284.695312, 0.000000, 286.804688, 0.000000, 292.312500, 0.000000, 296.578125, 0.000000, - 299.953125, 0.000000, 302.976562, 0.000000, 307.664062, 0.000000, 311.671875, 0.000000, - 313.781250, 0.000000, 317.882812, 0.000000, 322.335938, 0.000000, 322.335938, 0.000000, - 328.500000, 0.000000, 330.562500, 0.000000, 335.250000, 0.000000, 339.140625, 0.000000, - 343.078125, 0.000000, 348.984375, 0.000000, 353.671875, 0.000000, 366.445312, 0.000000, - 370.687500, 0.000000, 378.843750, 0.000000, 384.351562, 0.000000, 388.546875, 0.000000, - 394.546875, 0.000000, 399.234375, 0.000000, 403.687500, 0.000000, 407.929688, 0.000000, - 411.398438, 0.000000, 418.429688, 0.000000, 422.671875, 0.000000, 426.046875, 0.000000, - 429.070312, 0.000000, 433.757812, 0.000000, 437.765625, 0.000000, 442.031250, 0.000000, - 448.968750, 0.000000, 452.343750, 0.000000, 452.343750, 0.000000, 458.507812, 0.000000, - 460.570312, 0.000000, 465.257812, 0.000000, 474.492188, 0.000000, 476.601562, 0.000000, - 480.843750, 0.000000, 485.109375, 0.000000, 489.796875, 0.000000, 497.437500, 0.000000, - 499.546875, 0.000000, 503.765625, 0.000000, 509.671875, 0.000000, 514.359375, 0.000000, - 521.671875, 0.000000, 523.781250, 0.000000, 529.453125, 0.000000, 534.140625, 0.000000, - 537.656250, 0.000000, 543.046875, 0.000000, 546.585938, 0.000000, 552.585938, 0.000000, - 560.367188, 0.000000, 560.367188, 0.000000, 563.742188, 0.000000, 569.742188, 0.000000, - 573.960938, 0.000000, 579.351562, 0.000000, 584.039062, 0.000000, 589.851562, 0.000000, - 591.914062, 0.000000, 596.367188, 0.000000, 600.609375, 0.000000, 606.421875, 0.000000, - 608.484375, 0.000000, 613.171875, 0.000000, 619.570312, 0.000000, 623.812500, 0.000000, - 627.914062, 0.000000, 633.914062, 0.000000, 638.601562, 0.000000, 641.929688, 0.000000, - 644.039062, 0.000000, 647.789062, 0.000000, 652.007812, 0.000000, 656.273438, 0.000000, - 660.960938, 0.000000, 664.898438, 0.000000, 670.710938, 0.000000, 672.773438, 0.000000, - 678.773438, 0.000000, 683.460938, 0.000000, 689.859375, 0.000000, 697.640625, 0.000000, - 700.664062, 0.000000, 705.351562, 0.000000, 707.460938, 0.000000, 711.679688, 0.000000, - 715.921875, 0.000000, 719.390625, 0.000000, 723.656250, 0.000000, 728.343750, 0.000000, - 730.453125, 0.000000, 734.718750, 0.000000, 738.820312, 0.000000, 743.273438, 0.000000, - 747.960938, 0.000000, 756.328125, 0.000000, 763.265625, 0.000000, 766.734375, 0.000000, - 766.734375, 0.000000, 770.929688, 0.000000, 775.617188, 0.000000, 782.929688, 0.000000, - 785.273438, 0.000000, 789.960938, 0.000000, 793.898438, 0.000000, 797.367188, 0.000000, - 800.812500, 0.000000, 805.500000, 0.000000, 813.843750, 0.000000, 818.296875, 0.000000, - 824.109375, 0.000000, 824.109375, 0.000000, 830.273438, 0.000000, 832.335938, 0.000000, - 837.023438, 0.000000, 846.257812, 0.000000, 850.710938, 0.000000, 852.820312, 0.000000, - 858.328125, 0.000000, 862.593750, 0.000000, 865.617188, 0.000000, 867.679688, 0.000000, - 873.679688, 0.000000, 878.367188, 0.000000, 887.601562, 0.000000, 892.054688, 0.000000, - 897.867188, 0.000000, 897.867188, 0.000000, 904.031250, 0.000000, 906.093750, 0.000000, - 910.781250, 0.000000, 918.257812, 0.000000, 922.476562, 0.000000, 926.929688, 0.000000, - 932.437500, 0.000000, 936.679688, 0.000000, 940.125000, 0.000000, 944.812500, 0.000000, - 948.820312, 0.000000, 954.820312, 0.000000, 958.289062, 0.000000, 962.484375, 0.000000, - 968.484375, 0.000000, 973.171875, 0.000000, 976.687500, 0.000000, 980.695312, 0.000000, - 982.804688, 0.000000, 986.906250, 0.000000, 991.359375, 0.000000, 991.359375, 0.000000, - 997.523438, 0.000000, 999.585938, 0.000000, 1004.273438, 0.000000, 1009.289062, 0.000000, - 1013.554688, 0.000000, 1018.242188, 0.000000, 1026.187500, 0.000000, 1029.656250, 0.000000, - 1033.757812, 0.000000, 1038.445312, 0.000000, 1047.796875, 0.000000, 1052.039062, 0.000000, - 1058.859375, 0.000000, 1060.921875, 0.000000, 1066.921875, 0.000000, 1072.429688, 0.000000, - 1075.453125, 0.000000, 1077.515625, 0.000000, 1082.203125, 0.000000, 1088.601562, 0.000000, - 1092.867188, 0.000000, 1094.976562, 0.000000, 1098.445312, 0.000000, 1102.687500, 0.000000, - 1106.882812, 0.000000, 1111.570312, 0.000000, 1115.085938, 0.000000, 1117.195312, 0.000000, - 1117.195312, 0.000000, 1124.015625, 0.000000, 1126.125000, 0.000000, 1132.945312, 0.000000, - 1135.289062, 0.000000 - </result-positions> - </test-case> - - <test-case id="Unicode Arabic" script="arab"> - <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D" rchecksum="0x029B644F"/> - - <test-text>أساسًا، تتعامل الحواسيب فقط مع الأرقام، وتقوم بتخزين الأحرف والمحارف الأخرى بعد أن تُعطي رقما معينا لكل واحد منها. وقبل اختراع "يونِكود"، كان هناك مئات الأنظمة للتشفير وتخصيص هذه الأرقام للمحارف، ولم يوجد نظام تشفير واحد يحتوي على جميع المحارف الضرورية</test-text> - - <result-glyphs> - 0x00000872, 0x000008D1, 0x000003F9, 0x0000040B, 0x0000088C, 0x0000089E, 0x000008BD, 0x000003EF, - 0x00000003, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, - 0x00000003, 0x000008A8, 0x000008D2, 0x000008C2, 0x0000087D, 0x00000003, 0x000008CE, 0x000008BE, - 0x000008A9, 0x00000003, 0x0000040D, 0x000008CC, 0x00000876, 0x00000882, 0x000008D1, 0x00000003, - 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2, - 0x00000896, 0x00000875, 0x00000003, 0x00000408, 0x0000086C, 0x000008A6, 0x000008C5, 0x00000003, - 0x00000888, 0x0000087D, 0x000008CC, 0x000008D1, 0x00000003, 0x000008C0, 0x000008BD, 0x0000040B, - 0x00000003, 0x000003E6, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BE, - 0x000008BD, 0x00000003, 0x00000408, 0x0000086C, 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, - 0x000003EF, 0x00000003, 0x0000040A, 0x0000088A, 0x000008C9, 0x00000003, 0x00000898, 0x000008D2, - 0x0000089A, 0x00000886, 0x00000875, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2, - 0x00000896, 0x00000876, 0x000008BE, 0x000008BD, 0x00000003, 0x00000872, 0x000008C2, 0x000008A6, - 0x000008C5, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000003F2, 0x0000086C, 0x0000086A, - 0x000008C1, 0x00000003, 0x00000406, 0x0000086C, 0x000008C6, 0x000008C9, 0x00000003, 0x00000409, - 0x0000086C, 0x000008B9, 0x00000003, 0x000003E6, 0x00000005, 0x000003F7, 0x000008CC, 0x000008BA, - 0x00000413, 0x000008C5, 0x000008CC, 0x000008D1, 0x00000005, 0x00000003, 0x00000401, 0x000003EF, - 0x0000088C, 0x00000876, 0x00000885, 0x000003EF, 0x00000003, 0x000008BC, 0x00000870, 0x000008B5, - 0x0000040B, 0x00000003, 0x00000011, 0x0000086C, 0x000008CA, 0x000008C6, 0x000008C1, 0x00000003, - 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x000008BC, 0x000008BA, 0x000008BD, - 0x00000003, 0x0000086C, 0x000008C6, 0x000008D2, 0x000008AA, 0x000008C1, 0x00000003, 0x0000086C, - 0x000008C2, 0x000008B5, 0x000003F9, 0x00000003, 0x000008D0, 0x000008A2, 0x000008AA, 0x00000412, - 0x00000875, 0x00000003, 0x00000409, 0x000003EB, 0x00000003, 0x00000888, 0x000008AA, 0x0000086F, - 0x00000003, 0x0000040C, 0x0000088C, 0x00000885, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, - 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, 0x0000040B, - 0x00000003, 0x00000404, 0x0000088C, 0x00000881, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, - 0x000008C4, 0x000008D1, 0x0000088E, 0x00000886, 0x00000876, 0x0000086F, 0x00000003, 0x00000408, - 0x000008CC, 0x000008B6, 0x00000875, 0x0000040B, 0x00000003, 0x000003E6, 0x00000408, 0x0000086C, - 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000008A8, 0x000008C1, - 0x00000003, 0x000008A0, 0x000008B6, 0x000008B1, 0x00000003, 0x0000086E, 0x000008D2, 0x00000891, - 0x000003EF, 0x000008CC, 0x00000882, 0x000008BD, 0x000003EF, 0x00000003, 0x000008BC, 0x000008C1, - 0x0000086C, 0x000008AA, 0x00000876, 0x00000875, 0x00000003, 0x000003E6, 0x0000086C, 0x0000040E, - 0x00000891, 0x0000086C, 0x00000891, 0x000003EB - </result-glyphs> - - <result-indices> - 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4, - 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC, - 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4, - 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC, - 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4, - 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC, - 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4, - 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC, - 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4, - 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC, - 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4, - 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C, - 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094, - 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C, - 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084, - 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C, - 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074, - 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C, - 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064, - 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C, - 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054, - 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C, - 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044, - 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C, - 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, - 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C, - 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024, - 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C, - 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014, - 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C, - 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, - 0x00000003, 0x00000002, 0x00000001, 0x00000000 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 6.316406, 0.000000, 10.382812, 0.000000, 15.492188, 0.000000, - 21.035156, 0.000000, 27.058594, 0.000000, 39.527344, 0.000000, 43.792969, 0.000000, - 47.408203, 0.000000, 51.205078, 0.000000, 66.216797, 0.000000, 71.326172, 0.000000, - 74.695312, 0.000000, 83.367188, 0.000000, 90.826172, 0.000000, 95.091797, 0.000000, - 98.707031, 0.000000, 102.503906, 0.000000, 109.962891, 0.000000, 114.949219, 0.000000, - 122.408203, 0.000000, 130.687500, 0.000000, 134.484375, 0.000000, 145.787109, 0.000000, - 150.773438, 0.000000, 156.884766, 0.000000, 160.681641, 0.000000, 172.277344, 0.000000, - 177.919922, 0.000000, 182.906250, 0.000000, 191.578125, 0.000000, 195.644531, 0.000000, - 199.441406, 0.000000, 206.507812, 0.000000, 214.787109, 0.000000, 218.402344, 0.000000, - 223.945312, 0.000000, 227.742188, 0.000000, 233.765625, 0.000000, 238.751953, 0.000000, - 245.185547, 0.000000, 257.982422, 0.000000, 262.048828, 0.000000, 265.845703, 0.000000, - 272.654297, 0.000000, 276.023438, 0.000000, 285.240234, 0.000000, 289.306641, 0.000000, - 293.103516, 0.000000, 300.169922, 0.000000, 308.449219, 0.000000, 314.091797, 0.000000, - 318.158203, 0.000000, 321.955078, 0.000000, 329.572266, 0.000000, 333.837891, 0.000000, - 339.380859, 0.000000, 343.177734, 0.000000, 346.974609, 0.000000, 361.986328, 0.000000, - 367.095703, 0.000000, 370.464844, 0.000000, 379.136719, 0.000000, 386.595703, 0.000000, - 391.582031, 0.000000, 395.847656, 0.000000, 399.644531, 0.000000, 406.453125, 0.000000, - 409.822266, 0.000000, 415.523438, 0.000000, 420.632812, 0.000000, 420.632812, 0.000000, - 427.441406, 0.000000, 431.056641, 0.000000, 434.853516, 0.000000, 441.357422, 0.000000, - 448.423828, 0.000000, 455.912109, 0.000000, 459.708984, 0.000000, 479.255859, 0.000000, - 484.242188, 0.000000, 496.710938, 0.000000, 505.382812, 0.000000, 509.449219, 0.000000, - 514.992188, 0.000000, 518.789062, 0.000000, 524.812500, 0.000000, 529.798828, 0.000000, - 536.232422, 0.000000, 549.029297, 0.000000, 554.015625, 0.000000, 559.001953, 0.000000, - 563.267578, 0.000000, 567.064453, 0.000000, 573.380859, 0.000000, 580.839844, 0.000000, - 590.056641, 0.000000, 594.123047, 0.000000, 594.123047, 0.000000, 600.931641, 0.000000, - 604.546875, 0.000000, 608.343750, 0.000000, 620.636719, 0.000000, 624.005859, 0.000000, - 628.992188, 0.000000, 635.830078, 0.000000, 639.626953, 0.000000, 653.361328, 0.000000, - 656.730469, 0.000000, 661.716797, 0.000000, 669.205078, 0.000000, 673.001953, 0.000000, - 683.777344, 0.000000, 687.146484, 0.000000, 692.660156, 0.000000, 696.457031, 0.000000, - 700.253906, 0.000000, 704.736328, 0.000000, 711.105469, 0.000000, 716.748047, 0.000000, - 722.994141, 0.000000, 722.994141, 0.000000, 727.060547, 0.000000, 732.703125, 0.000000, - 736.769531, 0.000000, 741.251953, 0.000000, 745.048828, 0.000000, 752.507812, 0.000000, - 756.123047, 0.000000, 762.146484, 0.000000, 767.132812, 0.000000, 775.412109, 0.000000, - 779.027344, 0.000000, 782.824219, 0.000000, 794.203125, 0.000000, 799.189453, 0.000000, - 804.890625, 0.000000, 810.433594, 0.000000, 814.230469, 0.000000, 818.027344, 0.000000, - 821.396484, 0.000000, 828.128906, 0.000000, 833.115234, 0.000000, 839.953125, 0.000000, - 843.750000, 0.000000, 850.816406, 0.000000, 859.095703, 0.000000, 862.710938, 0.000000, - 868.253906, 0.000000, 872.050781, 0.000000, 883.429688, 0.000000, 889.675781, 0.000000, - 893.941406, 0.000000, 897.738281, 0.000000, 901.107422, 0.000000, 906.093750, 0.000000, - 911.080078, 0.000000, 917.800781, 0.000000, 924.638672, 0.000000, 928.435547, 0.000000, - 931.804688, 0.000000, 939.263672, 0.000000, 944.964844, 0.000000, 950.074219, 0.000000, - 953.871094, 0.000000, 965.173828, 0.000000, 974.390625, 0.000000, 981.111328, 0.000000, - 981.111328, 0.000000, 985.177734, 0.000000, 988.974609, 0.000000, 999.750000, 0.000000, - 1003.365234, 0.000000, 1007.162109, 0.000000, 1014.228516, 0.000000, 1020.949219, 0.000000, - 1025.015625, 0.000000, 1028.812500, 0.000000, 1040.408203, 0.000000, 1046.431641, 0.000000, - 1054.710938, 0.000000, 1054.710938, 0.000000, 1061.519531, 0.000000, 1065.134766, 0.000000, - 1068.931641, 0.000000, 1083.943359, 0.000000, 1089.052734, 0.000000, 1092.421875, 0.000000, - 1101.093750, 0.000000, 1108.552734, 0.000000, 1112.818359, 0.000000, 1116.433594, 0.000000, - 1121.976562, 0.000000, 1125.773438, 0.000000, 1140.785156, 0.000000, 1146.808594, 0.000000, - 1155.087891, 0.000000, 1155.087891, 0.000000, 1161.896484, 0.000000, 1165.511719, 0.000000, - 1169.308594, 0.000000, 1180.541016, 0.000000, 1184.607422, 0.000000, 1190.630859, 0.000000, - 1199.302734, 0.000000, 1204.289062, 0.000000, 1208.355469, 0.000000, 1212.152344, 0.000000, - 1218.960938, 0.000000, 1224.603516, 0.000000, 1231.037109, 0.000000, 1235.103516, 0.000000, - 1240.646484, 0.000000, 1244.443359, 0.000000, 1248.240234, 0.000000, 1255.048828, 0.000000, - 1258.417969, 0.000000, 1264.119141, 0.000000, 1269.228516, 0.000000, 1269.228516, 0.000000, - 1276.037109, 0.000000, 1279.652344, 0.000000, 1283.449219, 0.000000, 1290.908203, 0.000000, - 1297.746094, 0.000000, 1301.542969, 0.000000, 1311.427734, 0.000000, 1317.861328, 0.000000, - 1323.562500, 0.000000, 1327.359375, 0.000000, 1341.492188, 0.000000, 1346.478516, 0.000000, - 1357.904297, 0.000000, 1361.519531, 0.000000, 1367.162109, 0.000000, 1375.833984, 0.000000, - 1380.099609, 0.000000, 1383.714844, 0.000000, 1387.511719, 0.000000, 1398.890625, 0.000000, - 1405.728516, 0.000000, 1409.097656, 0.000000, 1415.818359, 0.000000, 1420.804688, 0.000000, - 1424.871094, 0.000000, 1428.667969, 0.000000, 1432.464844, 0.000000, 1435.833984, 0.000000, - 1435.833984, 0.000000, 1447.259766, 0.000000, 1450.628906, 0.000000, 1462.054688, 0.000000, - 1465.669922, 0.000000 - </result-positions> - </test-case> - - <test-case id="Thai" script="thai"> - <test-font name="angsd___.ttf" version="Version 2.1 - July 1995" checksum="0x49B67200" rchecksum="0x003C2EE9"/> - - <test-text>บทที่๑พายุไซโคลนโดโรธีอาศัยอยู่ท่ามกลางทุ่งใหญ่ในแคนซัสกับลุงเฮนรีชาวไร่และป้าเอ็มภรรยาชาวไร่บ้านของพวกเขาหลังเล็กเพราะไม้สร้างบ้านต้องขนมาด้วยเกวียนเป็นระยะทางหลายไมล์</test-text> - - <result-glyphs> - 0x000000F3, 0x000000F0, 0x000000F0, 0x0000010E, 0x0000011D, 0x00000126, 0x000000F7, 0x0000010B, - 0x000000FB, 0x00000111, 0x00000119, 0x000000E4, 0x00000117, 0x000000DD, 0x000000FE, 0x000000F2, - 0x00000117, 0x000000ED, 0x00000117, 0x000000FC, 0x000000F1, 0x0000010E, 0x00000106, 0x0000010B, - 0x00000101, 0x0000010A, 0x000000FB, 0x00000106, 0x000000FB, 0x00000112, 0x0000013B, 0x000000F0, - 0x0000013B, 0x0000010B, 0x000000FA, 0x000000DA, 0x000000FE, 0x0000010B, 0x000000E0, 0x000000F0, - 0x00000111, 0x0000013B, 0x000000E0, 0x00000118, 0x00000104, 0x000000E6, 0x0000013B, 0x00000118, - 0x000000F2, 0x00000116, 0x000000DD, 0x000000F2, 0x000000E4, 0x0000010A, 0x00000103, 0x000000DA, - 0x0000010A, 0x000000F3, 0x000000FE, 0x00000111, 0x000000E0, 0x00000115, 0x00000107, 0x000000F2, - 0x000000FC, 0x0000010E, 0x000000E3, 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B, - 0x00000116, 0x000000FE, 0x00000109, 0x000000F4, 0x00000137, 0x0000010B, 0x00000115, 0x00000106, - 0x0000011C, 0x000000FA, 0x000000F9, 0x000000FC, 0x000000FC, 0x000000FB, 0x0000010B, 0x000000E3, - 0x0000010B, 0x00000100, 0x00000119, 0x000000FC, 0x0000013B, 0x000000F3, 0x0000013C, 0x0000010B, - 0x000000F2, 0x000000DB, 0x00000106, 0x000000E0, 0x000000F7, 0x00000100, 0x000000DA, 0x00000115, - 0x000000DB, 0x0000010B, 0x00000104, 0x000000FE, 0x0000010A, 0x000000E0, 0x00000115, 0x000000FE, - 0x0000011C, 0x000000DA, 0x00000115, 0x000000F7, 0x000000FC, 0x0000010B, 0x00000109, 0x00000119, - 0x000000FA, 0x0000013C, 0x00000103, 0x000000FC, 0x0000013C, 0x0000010B, 0x000000E0, 0x000000F3, - 0x0000013C, 0x0000010B, 0x000000F2, 0x000000EE, 0x0000013C, 0x00000106, 0x000000E0, 0x000000DB, - 0x000000F2, 0x000000FA, 0x0000010B, 0x000000ED, 0x0000013C, 0x00000100, 0x000000FB, 0x00000115, - 0x000000DA, 0x00000100, 0x0000010E, 0x000000FB, 0x000000F2, 0x00000115, 0x000000F4, 0x00000143, - 0x000000F2, 0x000000FC, 0x00000109, 0x000000FB, 0x00000109, 0x000000F0, 0x0000010B, 0x000000E0, - 0x00000104, 0x000000FE, 0x0000010B, 0x000000FB, 0x00000119, 0x000000FA, 0x000000FE, 0x0000013F - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, - 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, - 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, - 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, - 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, - 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, - 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, - 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, - 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 5.399414, 0.000000, 10.798828, 0.000000, 16.198242, 0.000000, - 16.198242, 0.000000, 16.198242, 0.000000, 21.046875, 0.000000, 26.616211, 0.000000, - 30.035156, 0.000000, 34.151367, 0.000000, 34.151367, 0.000000, 38.279297, 0.000000, - 43.558594, 0.000000, 47.663086, 0.000000, 52.438477, 0.000000, 57.178711, 0.000000, - 62.698242, 0.000000, 66.802734, 0.000000, 71.601562, 0.000000, 75.706055, 0.000000, - 79.810547, 0.000000, 84.369141, 0.000000, 84.369141, 0.000000, 89.097656, 0.000000, - 92.516602, 0.000000, 97.195312, 0.000000, 97.195312, 0.000000, 101.311523, 0.000000, - 106.040039, 0.000000, 110.156250, 0.000000, 110.156250, 0.000000, 110.156250, 0.000000, - 115.555664, 0.000000, 115.555664, 0.000000, 118.974609, 0.000000, 124.013672, 0.000000, - 128.765625, 0.000000, 133.505859, 0.000000, 136.924805, 0.000000, 140.704102, 0.000000, - 146.103516, 0.000000, 146.103516, 0.000000, 146.103516, 0.000000, 149.882812, 0.000000, - 153.553711, 0.000000, 159.158203, 0.000000, 165.421875, 0.000000, 165.421875, 0.000000, - 169.092773, 0.000000, 174.612305, 0.000000, 179.135742, 0.000000, 183.911133, 0.000000, - 189.430664, 0.000000, 194.709961, 0.000000, 194.709961, 0.000000, 199.989258, 0.000000, - 204.741211, 0.000000, 204.741211, 0.000000, 210.140625, 0.000000, 214.880859, 0.000000, - 214.880859, 0.000000, 218.660156, 0.000000, 220.675781, 0.000000, 225.128906, 0.000000, - 230.648438, 0.000000, 234.752930, 0.000000, 234.752930, 0.000000, 239.613281, 0.000000, - 243.032227, 0.000000, 247.280273, 0.000000, 251.408203, 0.000000, 255.512695, 0.000000, - 255.512695, 0.000000, 260.036133, 0.000000, 264.776367, 0.000000, 269.071289, 0.000000, - 274.470703, 0.000000, 274.470703, 0.000000, 277.889648, 0.000000, 279.905273, 0.000000, - 284.633789, 0.000000, 284.633789, 0.000000, 289.672852, 0.000000, 294.641602, 0.000000, - 298.746094, 0.000000, 302.850586, 0.000000, 306.966797, 0.000000, 310.385742, 0.000000, - 315.246094, 0.000000, 318.665039, 0.000000, 322.913086, 0.000000, 327.041016, 0.000000, - 331.145508, 0.000000, 331.145508, 0.000000, 336.544922, 0.000000, 336.544922, 0.000000, - 339.963867, 0.000000, 345.483398, 0.000000, 350.258789, 0.000000, 354.987305, 0.000000, - 358.766602, 0.000000, 364.335938, 0.000000, 368.583984, 0.000000, 373.335938, 0.000000, - 375.351562, 0.000000, 380.126953, 0.000000, 383.545898, 0.000000, 389.150391, 0.000000, - 393.890625, 0.000000, 393.890625, 0.000000, 397.669922, 0.000000, 399.685547, 0.000000, - 404.425781, 0.000000, 404.425781, 0.000000, 409.177734, 0.000000, 411.193359, 0.000000, - 416.762695, 0.000000, 420.867188, 0.000000, 424.286133, 0.000000, 428.581055, 0.000000, - 432.708984, 0.000000, 437.748047, 0.000000, 437.748047, 0.000000, 443.027344, 0.000000, - 447.131836, 0.000000, 447.131836, 0.000000, 450.550781, 0.000000, 454.330078, 0.000000, - 459.729492, 0.000000, 459.729492, 0.000000, 463.148438, 0.000000, 468.667969, 0.000000, - 473.478516, 0.000000, 473.478516, 0.000000, 478.207031, 0.000000, 481.986328, 0.000000, - 486.761719, 0.000000, 492.281250, 0.000000, 497.320312, 0.000000, 500.739258, 0.000000, - 505.538086, 0.000000, 505.538086, 0.000000, 509.786133, 0.000000, 513.902344, 0.000000, - 515.917969, 0.000000, 520.669922, 0.000000, 524.917969, 0.000000, 524.917969, 0.000000, - 529.034180, 0.000000, 534.553711, 0.000000, 536.569336, 0.000000, 541.968750, 0.000000, - 541.968750, 0.000000, 547.488281, 0.000000, 551.592773, 0.000000, 555.887695, 0.000000, - 560.003906, 0.000000, 564.298828, 0.000000, 569.698242, 0.000000, 573.117188, 0.000000, - 576.896484, 0.000000, 582.500977, 0.000000, 587.241211, 0.000000, 590.660156, 0.000000, - 594.776367, 0.000000, 598.904297, 0.000000, 603.943359, 0.000000, 608.683594, 0.000000, - 608.683594, 0.000000 - </result-positions> - </test-case> - - <test-case id="Arabic Simple" script="arab"> - <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D" rchecksum="0x029B644F"/> - - <test-text>أساسًا، تتعامل الحواسيب فقط مع الأرقام، وتقوم بتخزين الأحرف والمحارف الأخرى بعد أن تُعطي رقما معينا لكل واحد منها. وقبل اختراع "يونِكود"، كان هناك مئات الأنظمة للتشفير وتخصيص هذه الأرقام للمحارف، ولم يوجد نظام تشفير واحد يحتوي على جميع المحارف الضرورية</test-text> - - <result-glyphs> - 0x00000872, 0x000008D1, 0x000003F9, 0x0000040B, 0x0000088C, 0x0000089E, 0x000008BD, 0x000003EF, - 0x00000003, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, - 0x00000003, 0x000008A8, 0x000008D2, 0x000008C2, 0x0000087D, 0x00000003, 0x000008CE, 0x000008BE, - 0x000008A9, 0x00000003, 0x0000040D, 0x000008CC, 0x00000876, 0x00000882, 0x000008D1, 0x00000003, - 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2, - 0x00000896, 0x00000875, 0x00000003, 0x00000408, 0x0000086C, 0x000008A6, 0x000008C5, 0x00000003, - 0x00000888, 0x0000087D, 0x000008CC, 0x000008D1, 0x00000003, 0x000008C0, 0x000008BD, 0x0000040B, - 0x00000003, 0x000003E6, 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BE, - 0x000008BD, 0x00000003, 0x00000408, 0x0000086C, 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, - 0x000003EF, 0x00000003, 0x0000040A, 0x0000088A, 0x000008C9, 0x00000003, 0x00000898, 0x000008D2, - 0x0000089A, 0x00000886, 0x00000875, 0x0000040B, 0x00000003, 0x0000088C, 0x000008D2, 0x000008B2, - 0x00000896, 0x00000876, 0x000008BE, 0x000008BD, 0x00000003, 0x00000872, 0x000008C2, 0x000008A6, - 0x000008C5, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000003F2, 0x0000086C, 0x0000086A, - 0x000008C1, 0x00000003, 0x00000406, 0x0000086C, 0x000008C6, 0x000008C9, 0x00000003, 0x00000409, - 0x0000086C, 0x000008B9, 0x00000003, 0x000003E6, 0x00000005, 0x000003F7, 0x000008CC, 0x000008BA, - 0x00000413, 0x000008C5, 0x000008CC, 0x000008D1, 0x00000005, 0x00000003, 0x00000401, 0x000003EF, - 0x0000088C, 0x00000876, 0x00000885, 0x000003EF, 0x00000003, 0x000008BC, 0x00000870, 0x000008B5, - 0x0000040B, 0x00000003, 0x00000011, 0x0000086C, 0x000008CA, 0x000008C6, 0x000008C1, 0x00000003, - 0x00000888, 0x00000881, 0x000003EF, 0x0000040B, 0x00000003, 0x000008BC, 0x000008BA, 0x000008BD, - 0x00000003, 0x0000086C, 0x000008C6, 0x000008D2, 0x000008AA, 0x000008C1, 0x00000003, 0x0000086C, - 0x000008C2, 0x000008B5, 0x000003F9, 0x00000003, 0x000008D0, 0x000008A2, 0x000008AA, 0x00000412, - 0x00000875, 0x00000003, 0x00000409, 0x000003EB, 0x00000003, 0x00000888, 0x000008AA, 0x0000086F, - 0x00000003, 0x0000040C, 0x0000088C, 0x00000885, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, - 0x00000404, 0x000003F9, 0x0000086C, 0x00000882, 0x000008C2, 0x000008BD, 0x000003EF, 0x0000040B, - 0x00000003, 0x00000404, 0x0000088C, 0x00000881, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, - 0x000008C4, 0x000008D1, 0x0000088E, 0x00000886, 0x00000876, 0x0000086F, 0x00000003, 0x00000408, - 0x000008CC, 0x000008B6, 0x00000875, 0x0000040B, 0x00000003, 0x000003E6, 0x00000408, 0x0000086C, - 0x000008B5, 0x000003F9, 0x0000FFFF, 0x000008D5, 0x000003EF, 0x00000003, 0x000008A8, 0x000008C1, - 0x00000003, 0x000008A0, 0x000008B6, 0x000008B1, 0x00000003, 0x0000086E, 0x000008D2, 0x00000891, - 0x000003EF, 0x000008CC, 0x00000882, 0x000008BD, 0x000003EF, 0x00000003, 0x000008BC, 0x000008C1, - 0x0000086C, 0x000008AA, 0x00000876, 0x00000875, 0x00000003, 0x000003E6, 0x0000086C, 0x0000040E, - 0x00000891, 0x0000086C, 0x00000891, 0x000003EB - </result-glyphs> - - <result-indices> - 0x000000FB, 0x000000FA, 0x000000F9, 0x000000F8, 0x000000F7, 0x000000F6, 0x000000F5, 0x000000F4, - 0x000000F3, 0x000000F2, 0x000000F1, 0x000000F0, 0x000000EF, 0x000000EE, 0x000000ED, 0x000000EC, - 0x000000EB, 0x000000EA, 0x000000E9, 0x000000E8, 0x000000E7, 0x000000E6, 0x000000E5, 0x000000E4, - 0x000000E3, 0x000000E2, 0x000000E1, 0x000000E0, 0x000000DF, 0x000000DE, 0x000000DD, 0x000000DC, - 0x000000DB, 0x000000DA, 0x000000D9, 0x000000D8, 0x000000D7, 0x000000D6, 0x000000D5, 0x000000D4, - 0x000000D3, 0x000000D2, 0x000000D1, 0x000000D0, 0x000000CF, 0x000000CE, 0x000000CD, 0x000000CC, - 0x000000CB, 0x000000CA, 0x000000C9, 0x000000C8, 0x000000C7, 0x000000C6, 0x000000C5, 0x000000C4, - 0x000000C3, 0x000000C2, 0x000000C1, 0x000000C0, 0x000000BF, 0x000000BE, 0x000000BD, 0x000000BC, - 0x000000BB, 0x000000BA, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000B6, 0x000000B5, 0x000000B4, - 0x000000B3, 0x000000B2, 0x000000B1, 0x000000B0, 0x000000AF, 0x000000AE, 0x000000AD, 0x000000AC, - 0x000000AB, 0x000000AA, 0x000000A9, 0x000000A8, 0x000000A7, 0x000000A6, 0x000000A5, 0x000000A4, - 0x000000A3, 0x000000A2, 0x000000A1, 0x000000A0, 0x0000009F, 0x0000009E, 0x0000009D, 0x0000009C, - 0x0000009B, 0x0000009A, 0x00000099, 0x00000098, 0x00000097, 0x00000096, 0x00000095, 0x00000094, - 0x00000093, 0x00000092, 0x00000091, 0x00000090, 0x0000008F, 0x0000008E, 0x0000008D, 0x0000008C, - 0x0000008B, 0x0000008A, 0x00000089, 0x00000088, 0x00000087, 0x00000086, 0x00000085, 0x00000084, - 0x00000083, 0x00000082, 0x00000081, 0x00000080, 0x0000007F, 0x0000007E, 0x0000007D, 0x0000007C, - 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, 0x00000074, - 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, 0x0000006C, - 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, 0x00000064, - 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, 0x0000005C, - 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, 0x00000054, - 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, 0x0000004C, - 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, 0x00000044, - 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, 0x0000003C, - 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, 0x00000034, - 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, 0x0000002C, - 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, 0x00000024, - 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, 0x0000001C, - 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, 0x00000014, - 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, 0x0000000C, - 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, - 0x00000003, 0x00000002, 0x00000001, 0x00000000 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 6.316406, 0.000000, 10.382812, 0.000000, 15.492188, 0.000000, - 21.035156, 0.000000, 27.058594, 0.000000, 39.527344, 0.000000, 43.792969, 0.000000, - 47.408203, 0.000000, 51.205078, 0.000000, 66.216797, 0.000000, 71.326172, 0.000000, - 74.695312, 0.000000, 83.367188, 0.000000, 90.826172, 0.000000, 95.091797, 0.000000, - 98.707031, 0.000000, 102.503906, 0.000000, 109.962891, 0.000000, 114.949219, 0.000000, - 122.408203, 0.000000, 130.687500, 0.000000, 134.484375, 0.000000, 145.787109, 0.000000, - 150.773438, 0.000000, 156.884766, 0.000000, 160.681641, 0.000000, 172.277344, 0.000000, - 177.919922, 0.000000, 182.906250, 0.000000, 191.578125, 0.000000, 195.644531, 0.000000, - 199.441406, 0.000000, 206.507812, 0.000000, 214.787109, 0.000000, 218.402344, 0.000000, - 223.945312, 0.000000, 227.742188, 0.000000, 233.765625, 0.000000, 238.751953, 0.000000, - 245.185547, 0.000000, 257.982422, 0.000000, 262.048828, 0.000000, 265.845703, 0.000000, - 272.654297, 0.000000, 276.023438, 0.000000, 285.240234, 0.000000, 289.306641, 0.000000, - 293.103516, 0.000000, 300.169922, 0.000000, 308.449219, 0.000000, 314.091797, 0.000000, - 318.158203, 0.000000, 321.955078, 0.000000, 329.572266, 0.000000, 333.837891, 0.000000, - 339.380859, 0.000000, 343.177734, 0.000000, 346.974609, 0.000000, 361.986328, 0.000000, - 367.095703, 0.000000, 370.464844, 0.000000, 379.136719, 0.000000, 386.595703, 0.000000, - 391.582031, 0.000000, 395.847656, 0.000000, 399.644531, 0.000000, 406.453125, 0.000000, - 409.822266, 0.000000, 415.523438, 0.000000, 420.632812, 0.000000, 420.632812, 0.000000, - 427.441406, 0.000000, 431.056641, 0.000000, 434.853516, 0.000000, 441.357422, 0.000000, - 448.423828, 0.000000, 455.912109, 0.000000, 459.708984, 0.000000, 479.255859, 0.000000, - 484.242188, 0.000000, 496.710938, 0.000000, 505.382812, 0.000000, 509.449219, 0.000000, - 514.992188, 0.000000, 518.789062, 0.000000, 524.812500, 0.000000, 529.798828, 0.000000, - 536.232422, 0.000000, 549.029297, 0.000000, 554.015625, 0.000000, 559.001953, 0.000000, - 563.267578, 0.000000, 567.064453, 0.000000, 573.380859, 0.000000, 580.839844, 0.000000, - 590.056641, 0.000000, 594.123047, 0.000000, 594.123047, 0.000000, 600.931641, 0.000000, - 604.546875, 0.000000, 608.343750, 0.000000, 620.636719, 0.000000, 624.005859, 0.000000, - 628.992188, 0.000000, 635.830078, 0.000000, 639.626953, 0.000000, 653.361328, 0.000000, - 656.730469, 0.000000, 661.716797, 0.000000, 669.205078, 0.000000, 673.001953, 0.000000, - 683.777344, 0.000000, 687.146484, 0.000000, 692.660156, 0.000000, 696.457031, 0.000000, - 700.253906, 0.000000, 704.736328, 0.000000, 711.105469, 0.000000, 716.748047, 0.000000, - 722.994141, 0.000000, 722.994141, 0.000000, 727.060547, 0.000000, 732.703125, 0.000000, - 736.769531, 0.000000, 741.251953, 0.000000, 745.048828, 0.000000, 752.507812, 0.000000, - 756.123047, 0.000000, 762.146484, 0.000000, 767.132812, 0.000000, 775.412109, 0.000000, - 779.027344, 0.000000, 782.824219, 0.000000, 794.203125, 0.000000, 799.189453, 0.000000, - 804.890625, 0.000000, 810.433594, 0.000000, 814.230469, 0.000000, 818.027344, 0.000000, - 821.396484, 0.000000, 828.128906, 0.000000, 833.115234, 0.000000, 839.953125, 0.000000, - 843.750000, 0.000000, 850.816406, 0.000000, 859.095703, 0.000000, 862.710938, 0.000000, - 868.253906, 0.000000, 872.050781, 0.000000, 883.429688, 0.000000, 889.675781, 0.000000, - 893.941406, 0.000000, 897.738281, 0.000000, 901.107422, 0.000000, 906.093750, 0.000000, - 911.080078, 0.000000, 917.800781, 0.000000, 924.638672, 0.000000, 928.435547, 0.000000, - 931.804688, 0.000000, 939.263672, 0.000000, 944.964844, 0.000000, 950.074219, 0.000000, - 953.871094, 0.000000, 965.173828, 0.000000, 974.390625, 0.000000, 981.111328, 0.000000, - 981.111328, 0.000000, 985.177734, 0.000000, 988.974609, 0.000000, 999.750000, 0.000000, - 1003.365234, 0.000000, 1007.162109, 0.000000, 1014.228516, 0.000000, 1020.949219, 0.000000, - 1025.015625, 0.000000, 1028.812500, 0.000000, 1040.408203, 0.000000, 1046.431641, 0.000000, - 1054.710938, 0.000000, 1054.710938, 0.000000, 1061.519531, 0.000000, 1065.134766, 0.000000, - 1068.931641, 0.000000, 1083.943359, 0.000000, 1089.052734, 0.000000, 1092.421875, 0.000000, - 1101.093750, 0.000000, 1108.552734, 0.000000, 1112.818359, 0.000000, 1116.433594, 0.000000, - 1121.976562, 0.000000, 1125.773438, 0.000000, 1140.785156, 0.000000, 1146.808594, 0.000000, - 1155.087891, 0.000000, 1155.087891, 0.000000, 1161.896484, 0.000000, 1165.511719, 0.000000, - 1169.308594, 0.000000, 1180.541016, 0.000000, 1184.607422, 0.000000, 1190.630859, 0.000000, - 1199.302734, 0.000000, 1204.289062, 0.000000, 1208.355469, 0.000000, 1212.152344, 0.000000, - 1218.960938, 0.000000, 1224.603516, 0.000000, 1231.037109, 0.000000, 1235.103516, 0.000000, - 1240.646484, 0.000000, 1244.443359, 0.000000, 1248.240234, 0.000000, 1255.048828, 0.000000, - 1258.417969, 0.000000, 1264.119141, 0.000000, 1269.228516, 0.000000, 1269.228516, 0.000000, - 1276.037109, 0.000000, 1279.652344, 0.000000, 1283.449219, 0.000000, 1290.908203, 0.000000, - 1297.746094, 0.000000, 1301.542969, 0.000000, 1311.427734, 0.000000, 1317.861328, 0.000000, - 1323.562500, 0.000000, 1327.359375, 0.000000, 1341.492188, 0.000000, 1346.478516, 0.000000, - 1357.904297, 0.000000, 1361.519531, 0.000000, 1367.162109, 0.000000, 1375.833984, 0.000000, - 1380.099609, 0.000000, 1383.714844, 0.000000, 1387.511719, 0.000000, 1398.890625, 0.000000, - 1405.728516, 0.000000, 1409.097656, 0.000000, 1415.818359, 0.000000, 1420.804688, 0.000000, - 1424.871094, 0.000000, 1428.667969, 0.000000, 1432.464844, 0.000000, 1435.833984, 0.000000, - 1435.833984, 0.000000, 1447.259766, 0.000000, 1450.628906, 0.000000, 1462.054688, 0.000000, - 1465.669922, 0.000000 - </result-positions> - </test-case> - - <test-case id="Matra Test" script="deva"> - <test-font name="raghu.ttf" version="Original Version 1.00 (2005)" checksum="0x088DB135" rchecksum="0x00803FCE"/> - - <test-text>ुं ं॑</test-text> - - <result-glyphs> - 0x0000029C, 0x000001D5, 0x00000232, 0x00000003, 0x0000029C, 0x00000232, 0x00000233 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000003, 0x00000004 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 7.541016, 0.000000, 7.541016, 0.000000, 7.541016, 0.000000, - 13.541016, 0.000000, 21.082031, 0.000000, 19.953125, -6.052734, 21.082031, 0.000000 - </result-positions> - </test-case> - - <test-case id="Deva Stress Test" script="deva"> - <test-font name="raghu.ttf" version="Original Version 1.00 (2005)" checksum="0x088DB135" rchecksum="0x00803FCE"/> - - <test-text>कँ कं कः क॑ क॒ कँ॑ कं॒ कँंः क॒॑</test-text> - - <result-glyphs> - 0x00000080, 0x00000231, 0x00000003, 0x00000080, 0x00000232, 0x00000003, 0x00000080, 0x0000022C, - 0x00000003, 0x00000080, 0x00000233, 0x00000003, 0x00000080, 0x000001DF, 0x00000003, 0x00000080, - 0x00000231, 0x00000233, 0x00000003, 0x00000080, 0x000001DF, 0x00000232, 0x00000003, 0x00000080, - 0x00000231, 0x0000029C, 0x00000232, 0x0000029C, 0x0000022C, 0x00000003, 0x00000080, 0x00000233, - 0x0000029C, 0x000001DF - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000015, 0x00000014, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x00000019, 0x0000001A, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, - 0x0000001E, 0x0000001E - </result-indices> - - <result-positions> - 0.000000, 0.000000, 10.001953, -0.087891, 10.875000, 0.000000, 16.875000, 0.000000, - 23.783203, 0.439453, 27.750000, 0.000000, 33.750000, 0.000000, 44.625000, 0.000000, - 48.984375, 0.000000, 54.984375, 0.000000, 63.546875, -1.669922, 65.859375, 0.000000, - 71.859375, 0.000000, 80.332031, 0.492188, 82.734375, 0.000000, 88.734375, 0.000000, - 98.736328, -0.087891, 97.431641, -6.228516, 99.609375, 0.000000, 105.609375, 0.000000, - 114.082031, 0.492188, 112.517578, 0.439453, 116.484375, 0.000000, 122.484375, 0.000000, - 132.486328, -0.087891, 133.359375, 0.000000, 140.900391, 0.000000, 140.900391, 0.000000, - 148.441406, 0.000000, 152.800781, 0.000000, 158.800781, 0.000000, 167.363281, -1.669922, - 169.675781, 0.000000, 177.216797, 0.000000, 177.216797, 0.000000 - </result-positions> - </test-case> - - <test-case id="Deva Test" script="deva"> - <test-font name="raghu.ttf" version="Original Version 1.00 (2005)" checksum="0x088DB135" rchecksum="0x00803FCE"/> - - <test-text>रू क़् क्ष क्कि क्रि ट्रि हिन्दी र्क्रिं क्षत्रज्ञत्रक्ष श्र थ्र श्र कके र्कें केूकूेकेृ र्कू क़ क क् क्ष क्ष् क्ष्क ज़ ज ज् ज्ञ ज्ञ् ज्ञ्क र्क र्क्क ड्र क्क क़्क क़्क क़् क्ष्क क्ष् त्र्क द्द कि हि रू रु र्के र्कं क् कु के द्द्द क़्ष क्ष र्क्षे द्दत्र्क ज्ञ क्त्व ज्ञ्क र्कँ र्किँ र्केँ र्क्रिँ हिंदी ह्मिह्यिखि ङ्क ङ्म ङ्क्त ङ्ख ङ्ग ङ्घ ङ्क्ष ङ्क्ष्व ङ्क्ष्य र्क्त्वि र्र्र्र कै के कु कू कृ कॅ कॆ हु हू हॆ है हे</test-text> - - <result-glyphs> - 0x0000009A, 0x000001FE, 0x00000003, 0x000000A4, 0x00000051, 0x00000003, 0x000000A2, 0x0000FFFF, - 0x0000FFFF, 0x00000003, 0x000001D4, 0x000000C8, 0x0000FFFF, 0x00000080, 0x00000003, 0x000001D1, - 0x00000080, 0x0000009A, 0x00000051, 0x00000003, 0x000001D1, 0x0000008A, 0x0000009A, 0x00000051, - 0x00000003, 0x000001D1, 0x000000A1, 0x000000DB, 0x0000FFFF, 0x00000091, 0x00000223, 0x00000003, - 0x000001D1, 0x00000080, 0x000000E2, 0x0000FFFF, 0x0000009A, 0x00000051, 0x00000232, 0x00000003, - 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x0000008F, 0x000000E2, 0x0000FFFF, 0x000000A3, 0x0000FFFF, - 0x0000FFFF, 0x0000008F, 0x000000E2, 0x0000FFFF, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000003, - 0x0000009E, 0x0000009A, 0x00000051, 0x00000003, 0x00000090, 0x0000009A, 0x00000051, 0x00000003, - 0x0000009E, 0x0000009A, 0x00000051, 0x00000003, 0x00000080, 0x00000080, 0x0000022F, 0x00000003, - 0x00000080, 0x0000022F, 0x0000024D, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000080, 0x0000022F, - 0x0000029C, 0x000001D7, 0x00000080, 0x000001D7, 0x0000029C, 0x0000022F, 0x00000080, 0x0000022F, - 0x0000029C, 0x000001D9, 0x00000003, 0x00000080, 0x000001D7, 0x0000005B, 0x0000FFFF, 0x00000003, - 0x000000A4, 0x00000003, 0x00000080, 0x00000003, 0x00000080, 0x00000051, 0x00000003, 0x000000A2, - 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000051, 0x00000003, - 0x000000EA, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000080, 0x00000003, 0x00000003, 0x000000AB, - 0x0000FFFF, 0x00000003, 0x00000087, 0x00000003, 0x00000087, 0x00000051, 0x00000003, 0x000000A3, - 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A3, 0x0000FFFF, 0x0000FFFF, 0x00000051, 0x00000003, - 0x000000EB, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000080, 0x00000003, 0x00000080, 0x0000005B, - 0x0000FFFF, 0x00000003, 0x000000C8, 0x0000FFFF, 0x00000080, 0x0000005B, 0x0000FFFF, 0x00000003, - 0x0000008C, 0x0000009A, 0x00000051, 0x00000003, 0x000000C8, 0x0000FFFF, 0x00000080, 0x00000003, - 0x000000EC, 0x0000FFFF, 0x00000080, 0x00000003, 0x000000EC, 0x0000FFFF, 0x00000080, 0x00000003, - 0x000000A4, 0x00000051, 0x00000003, 0x000000EA, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000080, - 0x00000003, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000051, 0x00000003, 0x000000D7, 0x0000FFFF, - 0x000000E2, 0x0000FFFF, 0x00000080, 0x00000003, 0x000001A7, 0x0000FFFF, 0x0000FFFF, 0x00000003, - 0x000001D1, 0x00000080, 0x00000003, 0x000001D1, 0x000000A1, 0x00000003, 0x0000009A, 0x000001FE, - 0x00000003, 0x0000009A, 0x000001FD, 0x00000003, 0x00000080, 0x0000022F, 0x0000005A, 0x0000FFFF, - 0x00000003, 0x00000080, 0x0000024D, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000080, 0x00000051, - 0x00000003, 0x00000080, 0x000001D5, 0x00000003, 0x00000080, 0x0000022F, 0x00000003, 0x000000D9, - 0x0000FFFF, 0x000001A7, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000EC, 0x0000FFFF, 0x0000009F, - 0x00000003, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A2, 0x0000FFFF, 0x0000FFFF, - 0x0000022F, 0x0000005A, 0x0000FFFF, 0x00000003, 0x000001A7, 0x0000FFFF, 0x0000FFFF, 0x000000D7, - 0x0000FFFF, 0x000000E2, 0x0000FFFF, 0x00000080, 0x00000003, 0x000000A3, 0x0000FFFF, 0x0000FFFF, - 0x00000003, 0x000000C8, 0x0000FFFF, 0x000000D7, 0x0000FFFF, 0x0000009D, 0x00000003, 0x000000EB, - 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000080, 0x00000003, 0x00000080, 0x0000024C, 0x0000FFFF, - 0x0000FFFF, 0x00000003, 0x000001D1, 0x00000080, 0x0000024C, 0x0000FFFF, 0x0000FFFF, 0x00000003, - 0x00000080, 0x0000022F, 0x0000024C, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000001D1, 0x00000080, - 0x000000E2, 0x0000FFFF, 0x0000009A, 0x00000051, 0x00000231, 0x00000003, 0x000001D1, 0x000000A1, - 0x00000232, 0x00000091, 0x00000223, 0x00000003, 0x000001D3, 0x000001BA, 0x0000FFFF, 0x0000FFFF, - 0x000001D3, 0x000001BB, 0x0000FFFF, 0x0000FFFF, 0x000001D4, 0x00000081, 0x00000003, 0x000000CC, - 0x0000FFFF, 0x00000080, 0x00000003, 0x000001A2, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000CC, - 0x0000FFFF, 0x000001A0, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000CC, 0x0000FFFF, 0x00000081, - 0x00000003, 0x000000CC, 0x0000FFFF, 0x00000082, 0x00000003, 0x000000CC, 0x0000FFFF, 0x00000083, - 0x00000003, 0x000000CC, 0x0000FFFF, 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000CC, - 0x0000FFFF, 0x000000EA, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000009D, 0x00000003, 0x000000CC, - 0x0000FFFF, 0x000000EA, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000099, 0x00000003, 0x000001D4, - 0x000000C8, 0x0000FFFF, 0x000000D7, 0x0000FFFF, 0x0000009D, 0x0000005B, 0x0000FFFF, 0x00000003, - 0x0000009A, 0x00000051, 0x0000009A, 0x000000E2, 0x0000FFFF, 0x0000009A, 0x00000051, 0x00000003, - 0x00000080, 0x00000230, 0x00000003, 0x00000080, 0x0000022F, 0x00000003, 0x00000080, 0x000001D5, - 0x00000003, 0x00000080, 0x000001D7, 0x00000003, 0x00000080, 0x000001D9, 0x00000003, 0x00000080, - 0x0000022D, 0x00000003, 0x00000080, 0x0000022E, 0x00000003, 0x000000A1, 0x000001D5, 0x00000003, - 0x000000A1, 0x000001D7, 0x00000003, 0x000000A1, 0x0000022E, 0x00000003, 0x000000A1, 0x00000230, - 0x00000003, 0x000000A1, 0x0000022F - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000D, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000E, 0x00000012, - 0x0000000F, 0x00000011, 0x00000010, 0x00000013, 0x00000017, 0x00000014, 0x00000016, 0x00000015, - 0x00000018, 0x0000001A, 0x00000019, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000025, 0x00000022, 0x00000024, 0x00000023, 0x00000020, 0x00000021, 0x00000026, 0x00000027, - 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002D, 0x0000002C, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000033, 0x00000032, 0x00000034, 0x00000035, 0x00000036, 0x00000037, - 0x00000038, 0x0000003A, 0x00000039, 0x0000003B, 0x0000003C, 0x0000003E, 0x0000003D, 0x0000003F, - 0x00000040, 0x00000042, 0x00000041, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, - 0x0000004A, 0x0000004B, 0x00000048, 0x00000049, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000053, 0x00000054, 0x00000055, - 0x00000056, 0x00000056, 0x00000057, 0x0000005A, 0x0000005B, 0x00000058, 0x00000059, 0x0000005C, - 0x0000005D, 0x0000005E, 0x0000005F, 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, - 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, - 0x0000006D, 0x0000006E, 0x0000006F, 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, - 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, - 0x0000007D, 0x0000007E, 0x0000007F, 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, - 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008D, 0x0000008B, - 0x0000008C, 0x0000008E, 0x00000091, 0x00000092, 0x00000093, 0x0000008F, 0x00000090, 0x00000094, - 0x00000095, 0x00000097, 0x00000096, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, - 0x0000009D, 0x0000009E, 0x0000009F, 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, - 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, - 0x000000AD, 0x000000AE, 0x000000AF, 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, - 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC, - 0x000000BE, 0x000000BD, 0x000000BF, 0x000000C1, 0x000000C0, 0x000000C2, 0x000000C3, 0x000000C4, - 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000CB, 0x000000CC, 0x000000C9, 0x000000CA, - 0x000000CD, 0x000000D0, 0x000000CE, 0x000000CF, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, - 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, - 0x000000DD, 0x000000DE, 0x000000DF, 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, - 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EC, 0x000000ED, 0x000000EE, - 0x000000EF, 0x000000EA, 0x000000EB, 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, - 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, - 0x000000FD, 0x000000FE, 0x000000FF, 0x00000100, 0x00000101, 0x00000102, 0x00000103, 0x00000104, - 0x00000105, 0x00000106, 0x00000107, 0x00000108, 0x00000109, 0x0000010C, 0x0000010A, 0x0000010B, - 0x0000010D, 0x0000010E, 0x00000112, 0x00000111, 0x0000010F, 0x00000110, 0x00000113, 0x00000114, - 0x00000117, 0x00000118, 0x00000115, 0x00000116, 0x00000119, 0x0000011A, 0x00000120, 0x0000011D, - 0x0000011F, 0x0000011E, 0x0000011B, 0x0000011C, 0x00000121, 0x00000122, 0x00000124, 0x00000123, - 0x00000125, 0x00000126, 0x00000127, 0x00000128, 0x0000012C, 0x00000129, 0x0000012A, 0x0000012B, - 0x00000130, 0x0000012D, 0x0000012E, 0x0000012F, 0x00000132, 0x00000131, 0x00000133, 0x00000134, - 0x00000135, 0x00000136, 0x00000137, 0x00000138, 0x00000139, 0x0000013A, 0x0000013B, 0x0000013C, - 0x0000013D, 0x0000013E, 0x0000013F, 0x00000140, 0x00000141, 0x00000142, 0x00000143, 0x00000144, - 0x00000145, 0x00000146, 0x00000147, 0x00000148, 0x00000149, 0x0000014A, 0x0000014B, 0x0000014C, - 0x0000014D, 0x0000014E, 0x0000014F, 0x00000150, 0x00000151, 0x00000152, 0x00000153, 0x00000154, - 0x00000155, 0x00000156, 0x00000157, 0x00000158, 0x00000159, 0x0000015A, 0x0000015B, 0x0000015C, - 0x0000015D, 0x0000015E, 0x0000015F, 0x00000160, 0x00000161, 0x00000162, 0x00000163, 0x0000016B, - 0x00000166, 0x00000167, 0x00000168, 0x00000169, 0x0000016A, 0x00000164, 0x00000165, 0x0000016C, - 0x0000016F, 0x00000170, 0x00000171, 0x00000173, 0x00000172, 0x0000016D, 0x0000016E, 0x00000174, - 0x00000175, 0x00000176, 0x00000177, 0x00000178, 0x00000179, 0x0000017A, 0x0000017B, 0x0000017C, - 0x0000017D, 0x0000017E, 0x0000017F, 0x00000180, 0x00000181, 0x00000182, 0x00000183, 0x00000184, - 0x00000185, 0x00000186, 0x00000187, 0x00000188, 0x00000189, 0x0000018A, 0x0000018B, 0x0000018C, - 0x0000018D, 0x0000018E, 0x0000018F, 0x00000190, 0x00000191, 0x00000192, 0x00000193, 0x00000194, - 0x00000195, 0x00000196, 0x00000197 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 6.515625, 0.000000, 8.121094, 0.000000, 14.121094, 0.000000, - 24.861328, -0.451172, 24.996094, 0.000000, 30.996094, 0.000000, 41.871094, 0.000000, - 41.871094, 0.000000, 41.871094, 0.000000, 47.871094, 0.000000, 52.230469, 0.000000, - 60.949219, 0.000000, 60.949219, 0.000000, 71.824219, 0.000000, 77.824219, 0.000000, - 82.183594, 0.000000, 93.058594, 0.000000, 102.720703, -0.451172, 99.574219, 0.000000, - 105.574219, 0.000000, 109.933594, 0.000000, 117.902344, 0.000000, 127.564453, -0.451172, - 124.417969, 0.000000, 130.417969, 0.000000, 134.777344, 0.000000, 142.746094, 0.000000, - 150.011719, 0.000000, 150.011719, 0.000000, 157.980469, 0.000000, 161.636719, 0.000000, - 167.636719, 0.000000, 171.996094, 0.000000, 182.871094, 0.000000, 186.621094, 0.000000, - 186.621094, 0.000000, 196.283203, -0.451172, 191.613281, 0.439453, 193.136719, 0.000000, - 199.136719, 0.000000, 210.011719, 0.000000, 210.011719, 0.000000, 210.011719, 0.000000, - 217.980469, 0.000000, 221.730469, 0.000000, 221.730469, 0.000000, 232.605469, 0.000000, - 232.605469, 0.000000, 232.605469, 0.000000, 240.574219, 0.000000, 244.324219, 0.000000, - 244.324219, 0.000000, 255.199219, 0.000000, 255.199219, 0.000000, 255.199219, 0.000000, - 261.199219, 0.000000, 270.667969, 0.000000, 280.330078, -0.451172, 277.183594, 0.000000, - 283.183594, 0.000000, 292.652344, 0.000000, 302.314453, -0.451172, 299.167969, 0.000000, - 305.167969, 0.000000, 314.636719, 0.000000, 324.298828, -0.451172, 321.152344, 0.000000, - 327.152344, 0.000000, 338.027344, 0.000000, 344.783203, 0.263672, 348.902344, 0.000000, - 354.902344, 0.000000, 361.658203, 0.263672, 362.279297, 0.263672, 365.777344, 0.000000, - 365.777344, 0.000000, 365.777344, 0.000000, 371.777344, 0.000000, 378.533203, 0.263672, - 382.652344, 0.000000, 390.193359, 0.000000, 390.193359, 0.000000, 397.916016, -0.011719, - 401.068359, 0.000000, 408.609375, 0.000000, 408.609375, 0.000000, 415.365234, 0.263672, - 419.484375, 0.000000, 427.025391, 0.000000, 427.025391, 0.000000, 433.025391, 0.000000, - 440.748047, -0.011719, 440.929688, 0.263672, 443.900391, 0.000000, 443.900391, 0.000000, - 449.900391, 0.000000, 460.775391, 0.000000, 466.775391, 0.000000, 477.650391, 0.000000, - 483.650391, 0.000000, 494.390625, -0.451172, 494.525391, 0.000000, 500.525391, 0.000000, - 511.400391, 0.000000, 511.400391, 0.000000, 511.400391, 0.000000, 517.400391, 0.000000, - 528.275391, 0.000000, 528.275391, 0.000000, 531.457031, -0.451172, 528.275391, 0.000000, - 534.275391, 0.000000, 542.994141, 0.000000, 542.994141, 0.000000, 542.994141, 0.000000, - 542.994141, 0.000000, 553.869141, 0.000000, 559.869141, 0.000000, 565.869141, 0.000000, - 575.337891, 0.000000, 575.337891, 0.000000, 581.337891, 0.000000, 590.806641, 0.000000, - 596.806641, 0.000000, 609.597656, -0.451172, 606.275391, 0.000000, 612.275391, 0.000000, - 623.150391, 0.000000, 623.150391, 0.000000, 623.150391, 0.000000, 629.150391, 0.000000, - 640.025391, 0.000000, 640.025391, 0.000000, 643.207031, -0.451172, 640.025391, 0.000000, - 646.025391, 0.000000, 653.994141, 0.000000, 653.994141, 0.000000, 653.994141, 0.000000, - 653.994141, 0.000000, 664.869141, 0.000000, 670.869141, 0.000000, 678.773438, 0.263672, - 681.744141, 0.000000, 681.744141, 0.000000, 687.744141, 0.000000, 696.462891, 0.000000, - 696.462891, 0.000000, 704.367188, 0.263672, 707.337891, 0.000000, 707.337891, 0.000000, - 713.337891, 0.000000, 721.306641, 0.000000, 730.968750, -0.451172, 727.822266, 0.000000, - 733.822266, 0.000000, 742.541016, 0.000000, 742.541016, 0.000000, 753.416016, 0.000000, - 759.416016, 0.000000, 768.134766, 0.000000, 768.134766, 0.000000, 779.009766, 0.000000, - 785.009766, 0.000000, 793.728516, 0.000000, 793.728516, 0.000000, 804.603516, 0.000000, - 810.603516, 0.000000, 821.343750, -0.451172, 821.478516, 0.000000, 827.478516, 0.000000, - 836.197266, 0.000000, 836.197266, 0.000000, 836.197266, 0.000000, 836.197266, 0.000000, - 847.072266, 0.000000, 853.072266, 0.000000, 863.947266, 0.000000, 863.947266, 0.000000, - 867.128906, -0.451172, 863.947266, 0.000000, 869.947266, 0.000000, 875.876953, 0.000000, - 875.876953, 0.000000, 879.626953, 0.000000, 879.626953, 0.000000, 890.501953, 0.000000, - 896.501953, 0.000000, 903.064453, 0.000000, 903.064453, 0.000000, 903.064453, 0.000000, - 909.064453, 0.000000, 913.423828, 0.000000, 924.298828, 0.000000, 930.298828, 0.000000, - 934.658203, 0.000000, 942.626953, 0.000000, 948.626953, 0.000000, 955.142578, 0.000000, - 956.748047, 0.000000, 962.748047, 0.000000, 969.263672, 0.000000, 970.623047, 0.000000, - 976.623047, 0.000000, 983.378906, 0.263672, 983.853516, 0.164062, 987.498047, 0.000000, - 987.498047, 0.000000, 993.498047, 0.000000, 1000.875000, 0.263672, 1004.373047, 0.000000, - 1004.373047, 0.000000, 1004.373047, 0.000000, 1010.373047, 0.000000, 1021.113281, -0.451172, - 1021.248047, 0.000000, 1027.248047, 0.000000, 1034.947266, -0.011719, 1038.123047, 0.000000, - 1044.123047, 0.000000, 1050.878906, 0.263672, 1054.998047, 0.000000, 1060.998047, 0.000000, - 1068.966797, 0.000000, 1068.966797, 0.000000, 1075.529297, 0.000000, 1075.529297, 0.000000, - 1075.529297, 0.000000, 1081.529297, 0.000000, 1090.248047, 0.000000, 1090.248047, 0.000000, - 1098.216797, 0.000000, 1104.216797, 0.000000, 1115.091797, 0.000000, 1115.091797, 0.000000, - 1115.091797, 0.000000, 1121.091797, 0.000000, 1131.966797, 0.000000, 1131.966797, 0.000000, - 1131.164062, 0.275391, 1131.638672, 0.175781, 1131.966797, 0.000000, 1131.966797, 0.000000, - 1137.966797, 0.000000, 1144.529297, 0.000000, 1144.529297, 0.000000, 1144.529297, 0.000000, - 1150.458984, 0.000000, 1150.458984, 0.000000, 1154.208984, 0.000000, 1154.208984, 0.000000, - 1165.083984, 0.000000, 1171.083984, 0.000000, 1181.958984, 0.000000, 1181.958984, 0.000000, - 1181.958984, 0.000000, 1187.958984, 0.000000, 1196.677734, 0.000000, 1196.677734, 0.000000, - 1202.607422, 0.000000, 1202.607422, 0.000000, 1210.576172, 0.000000, 1216.576172, 0.000000, - 1224.544922, 0.000000, 1224.544922, 0.000000, 1224.544922, 0.000000, 1224.544922, 0.000000, - 1235.419922, 0.000000, 1241.419922, 0.000000, 1249.236328, 0.263672, 1252.294922, 0.000000, - 1252.294922, 0.000000, 1252.294922, 0.000000, 1258.294922, 0.000000, 1262.654297, 0.000000, - 1270.470703, 0.263672, 1273.529297, 0.000000, 1273.529297, 0.000000, 1273.529297, 0.000000, - 1279.529297, 0.000000, 1286.285156, 0.263672, 1287.345703, 0.263672, 1290.404297, 0.000000, - 1290.404297, 0.000000, 1290.404297, 0.000000, 1296.404297, 0.000000, 1300.763672, 0.000000, - 1311.638672, 0.000000, 1315.388672, 0.000000, 1315.388672, 0.000000, 1325.050781, -0.451172, - 1323.474609, -0.087891, 1321.904297, 0.000000, 1327.904297, 0.000000, 1332.263672, 0.000000, - 1338.767578, 0.439453, 1340.232422, 0.000000, 1348.201172, 0.000000, 1351.857422, 0.000000, - 1357.857422, 0.000000, 1362.216797, 0.000000, 1372.388672, 0.000000, 1372.388672, 0.000000, - 1372.388672, 0.000000, 1376.748047, 0.000000, 1386.919922, 0.000000, 1386.919922, 0.000000, - 1386.919922, 0.000000, 1391.279297, 0.000000, 1402.154297, 0.000000, 1408.154297, 0.000000, - 1416.123047, 0.000000, 1416.123047, 0.000000, 1426.998047, 0.000000, 1432.998047, 0.000000, - 1446.076172, 0.000000, 1446.076172, 0.000000, 1446.076172, 0.000000, 1452.076172, 0.000000, - 1460.044922, 0.000000, 1460.044922, 0.000000, 1471.294922, 0.000000, 1471.294922, 0.000000, - 1471.294922, 0.000000, 1477.294922, 0.000000, 1485.263672, 0.000000, 1485.263672, 0.000000, - 1496.138672, 0.000000, 1502.138672, 0.000000, 1510.107422, 0.000000, 1510.107422, 0.000000, - 1519.576172, 0.000000, 1525.576172, 0.000000, 1533.544922, 0.000000, 1533.544922, 0.000000, - 1543.013672, 0.000000, 1549.013672, 0.000000, 1556.982422, 0.000000, 1556.982422, 0.000000, - 1567.857422, 0.000000, 1567.857422, 0.000000, 1567.857422, 0.000000, 1573.857422, 0.000000, - 1581.826172, 0.000000, 1581.826172, 0.000000, 1590.544922, 0.000000, 1590.544922, 0.000000, - 1590.544922, 0.000000, 1590.544922, 0.000000, 1598.513672, 0.000000, 1604.513672, 0.000000, - 1612.482422, 0.000000, 1612.482422, 0.000000, 1621.201172, 0.000000, 1621.201172, 0.000000, - 1621.201172, 0.000000, 1621.201172, 0.000000, 1630.669922, 0.000000, 1636.669922, 0.000000, - 1641.029297, 0.000000, 1649.748047, 0.000000, 1649.748047, 0.000000, 1655.677734, 0.000000, - 1655.677734, 0.000000, 1663.939453, 0.263672, 1663.646484, 0.000000, 1663.646484, 0.000000, - 1669.646484, 0.000000, 1679.308594, -0.451172, 1676.162109, 0.000000, 1682.677734, 0.000000, - 1686.427734, 0.000000, 1686.427734, 0.000000, 1696.089844, -0.451172, 1692.943359, 0.000000, - 1698.943359, 0.000000, 1706.314453, 0.263672, 1709.818359, 0.000000, 1715.818359, 0.000000, - 1722.574219, 0.263672, 1726.693359, 0.000000, 1732.693359, 0.000000, 1740.392578, -0.011719, - 1743.568359, 0.000000, 1749.568359, 0.000000, 1757.291016, -0.011719, 1760.443359, 0.000000, - 1766.443359, 0.000000, 1774.376953, -0.011719, 1777.318359, 0.000000, 1783.318359, 0.000000, - 1791.738281, -0.439453, 1794.193359, 0.000000, 1800.193359, 0.000000, 1808.121094, 0.263672, - 1811.068359, 0.000000, 1817.068359, 0.000000, 1823.085938, -0.011719, 1825.037109, 0.000000, - 1831.037109, 0.000000, 1837.078125, -0.011719, 1839.005859, 0.000000, 1845.005859, 0.000000, - 1852.529297, 0.263672, 1852.974609, 0.000000, 1858.974609, 0.000000, 1865.941406, 0.263672, - 1866.943359, 0.000000, 1872.943359, 0.000000, 1879.294922, 0.263672, 1880.912109, 0.000000 - </result-positions> - </test-case> - - <test-case id="Japanese Han" script="hani" lang="JAN"> - <test-font name="Arial Unicode.ttf" version="Version 1.01x" checksum="0x609C497F" rchecksum="0x63451FC0"/> - - <test-text>中华人民共和国 台湾 中華人民共和國 臺灣</test-text> - - <result-glyphs> - 0x000020BC, 0x000025DD, 0x00002149, 0x00003EA0, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, - 0x0000267F, 0x0000410D, 0x00000003, 0x000020BC, 0x0000567E, 0x00002149, 0x00003EA0, 0x00002400, - 0x0000271B, 0x0000299A, 0x00000003, 0x00005489, 0x000042F2 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, - 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, - 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, - 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, - 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, - 214.001953, 0.000000, 226.001953, 0.000000 - </result-positions> - </test-case> -<!-- known to fail in base JDK7, skip - <test-case id="Korean Han" script="hani" lang="KOR"> - <test-font name="Arial Unicode.ttf" version="Version 1.01x" checksum="0x609C497F" rchecksum="0x63451FC0"/> - - <test-text>中华人民共和国 台湾 中華人民共和國 臺灣</test-text> - - <result-glyphs> - 0x000020BC, 0x000025DD, 0x00002149, 0x00003EA0, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, - 0x0000267F, 0x0000410D, 0x00000003, 0x000020BC, 0x00007492, 0x00002149, 0x00003EA0, 0x00002400, - 0x0000271B, 0x0000299A, 0x00000003, 0x00005489, 0x000042F2 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, - 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, - 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, - 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, - 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, - 214.001953, 0.000000, 226.001953, 0.000000 - </result-positions> - </test-case> ---> - -<!-- known to fail in base JDK7, skip - <test-case id="Traditional Han" script="hani" lang="ZHT"> - <test-font name="Arial Unicode.ttf" version="Version 1.01x" checksum="0x609C497F" rchecksum="0x63451FC0"/> - - <test-text>中华人民共和国 台湾 中華人民共和國 臺灣</test-text> - - <result-glyphs> - 0x000020BC, 0x000025DD, 0x00002149, 0x000079EB, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, - 0x00007677, 0x0000410D, 0x00000003, 0x000020BC, 0x00007E26, 0x00002149, 0x000079EB, 0x00002400, - 0x0000271B, 0x0000299A, 0x00000003, 0x00007D8F, 0x00007A97 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, - 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, - 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, - 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, - 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, - 214.001953, 0.000000, 226.001953, 0.000000 - </result-positions> - </test-case> ---> - -<!-- known to fail in base JDK7, skip - <test-case id="Simplified Han" script="hani" lang="ZHS"> - <test-font name="Arial Unicode.ttf" version="Version 1.01x" checksum="0x609C497F" rchecksum="0x63451FC0"/> - - <test-text>中华人民共和国 台湾 中華人民共和國 臺灣</test-text> - - <result-glyphs> - 0x000020BC, 0x000025DD, 0x00002149, 0x000079EB, 0x00002400, 0x0000271B, 0x0000298C, 0x00000003, - 0x00007677, 0x00008886, 0x00000003, 0x000020BC, 0x0000567E, 0x00002149, 0x000079EB, 0x00002400, - 0x0000271B, 0x0000299A, 0x00000003, 0x00007D8F, 0x00007A97 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, - 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, - 87.333984, 0.000000, 99.333984, 0.000000, 111.333984, 0.000000, 114.667969, 0.000000, - 126.667969, 0.000000, 138.667969, 0.000000, 150.667969, 0.000000, 162.667969, 0.000000, - 174.667969, 0.000000, 186.667969, 0.000000, 198.667969, 0.000000, 202.001953, 0.000000, - 214.001953, 0.000000, 226.001953, 0.000000 - </result-positions> - </test-case> ---> - - <test-case id="Deva locl Hindi" script="deva" lang="HIN"> - <test-font name="TestFont1.otf" version="Version 001.000 " checksum="0x75B4A535" rchecksum="0x0004D80A"/> - - <test-text>शङ़ु</test-text> - - <result-glyphs> - 0x00000002, 0x00000001, 0x00000006, 0x0000FFFF - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 7.572000, 0.000000, 15.108000, 0.000000, 15.108000, 0.000000, - 15.108000, 0.000000 - </result-positions> - </test-case> - -<!-- known to fail in base JDK7, skip - <test-case id="Deva locl Marathi" script="deva" lang="MAR"> - <test-font name="TestFont1.otf" version="Version 001.000 " checksum="0x75B4A535" rchecksum="0x0004D80A"/> - - <test-text>शङ़ु</test-text> - - <result-glyphs> - 0x00000005, 0x00000001, 0x00000006, 0x0000FFFF - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 7.392000, 0.000000, 14.927999, 0.000000, 14.927999, 0.000000, - 14.927999, 0.000000 - </result-positions> - </test-case> ---> - - <test-case id="Deva ZWJ" script="deva"> - <test-font name="raghu.ttf" version="Original Version 1.00 (2005)" checksum="0x088DB135" rchecksum="0x00803FCE"/> - - <test-text>क्ष र्क क्‍ष र्‍क</test-text> - - <result-glyphs> - 0x000000A2, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x00000080, 0x0000005B, 0x0000FFFF, 0x00000003, - 0x00000080, 0x00000051, 0x00000001, 0x0000009F, 0x00000003, 0x0000009A, 0x00000051, 0x00000001, - 0x00000080 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000006, 0x00000004, 0x00000005, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 10.875000, 0.000000, 10.875000, 0.000000, 10.875000, 0.000000, - 16.875000, 0.000000, 24.779297, 0.263672, 27.750000, 0.000000, 27.750000, 0.000000, - 33.750000, 0.000000, 44.490234, -0.451172, 44.625000, 0.000000, 44.625000, 0.000000, - 52.593750, 0.000000, 58.593750, 0.000000, 68.255859, -0.451172, 65.109375, 0.000000, - 65.109375, 0.000000, 75.984375, 0.000000 - </result-positions> - </test-case> - - <test-case id="Hangul" script="hang"> - <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D" rchecksum="0x029B644F"/> - - <test-text>마만만</test-text> - - <result-glyphs> - 0x00000000, 0x0000FFFF, 0x00000000, 0x0000FFFF, 0x0000FFFF, 0x00000000, 0x0000FFFF - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 9.000000, 0.000000, 9.000000, 0.000000, 18.000000, 0.000000, - 18.000000, 0.000000, 18.000000, 0.000000, 27.000000, 0.000000, 27.000000, 0.000000 - </result-positions> - </test-case> - - <test-case id="Hebrew Mark Test" script="hebr"> - <test-font name="SBL_Hbrw.ttf" version="Version 1.51 Build 001" checksum="0x5126B325" rchecksum="0x00F5C25B"/> - - <test-text>מָשְׁכֵנִיאַחֲרֶיךָנָּרוּצָההֱבִיאַנִיהַמֶּלֶךְחֲדָרָיונָגִילָהוְנִשְׂמְחָהבָּךְנַזְכִּירָהדֹדֶיךָמִיַּיִןמֵישָׁרִיםאֲהֵבוּךָ</test-text> - - <result-glyphs> - 0x0000FFFF, 0x00000055, 0x0000FFFF, 0x0000004B, 0x0000001D, 0x00000097, 0x00000021, 0x00000094, - 0x0000001B, 0x0000002D, 0x00000027, 0x00000096, 0x0000003A, 0x0000009A, 0x0000FFFF, 0x00000066, - 0x00000027, 0x00000097, 0x0000002F, 0x00000030, 0x00000096, 0x00000027, 0x00000099, 0x0000FFFF, - 0x00000051, 0x00000096, 0x0000002F, 0x0000FFFF, 0x00000055, 0x00000027, 0x00000098, 0x0000001F, - 0x0000009C, 0x0000001F, 0x00000021, 0x0000009A, 0x0000003A, 0x00000027, 0x00000096, 0x0000FFFF, - 0x00000056, 0x00000092, 0x00000024, 0x00000099, 0x00000031, 0x0000FFFF, 0x00000054, 0x0000009A, - 0x0000FFFF, 0x00000043, 0x00000021, 0x0000009A, 0x00000025, 0x00000092, 0x0000002F, 0x00000092, - 0x0000FFFF, 0x00000067, 0x00000096, 0x00000031, 0x00000092, 0x00000023, 0x00000021, 0x0000009A, - 0x0000002B, 0x00000027, 0x00000096, 0x0000001E, 0x0000009A, 0x00000031, 0x00000023, 0x00000027, - 0x0000009A, 0x0000003A, 0x0000009A, 0x0000001F, 0x00000094, 0x00000025, 0x0000FFFF, 0x00000054, - 0x00000098, 0x0000002B, 0x00000098, 0x0000FFFF, 0x0000005D, 0x00000099, 0x00000021, 0x00000027, - 0x00000096, 0x00000031, 0x00000099, 0x0000001B, 0x00000027, 0x00000096, 0x0000001D, 0x00000093, - 0x00000021, 0x00000021, 0x0000009A, 0x00000038, 0x0000FFFF, 0x0000004B, 0x0000003A, 0x0000009A, - 0x0000FFFF, 0x0000005E, 0x0000FFFF, 0x00000055, 0x00000027, 0x00000098, 0x0000003A, 0x00000094, - 0x00000025, 0x00000099, 0x0000001B, 0x00000027, 0x00000096, 0x00000031, 0x00000097, 0x00000029, - 0x00000092, 0x0000FFFF, 0x00000066, 0x0000009A, 0x0000002F - </result-glyphs> - - <result-indices> - 0x0000007C, 0x0000007B, 0x0000007A, 0x00000079, 0x00000078, 0x00000077, 0x00000076, 0x00000075, - 0x00000074, 0x00000073, 0x00000072, 0x00000071, 0x00000070, 0x0000006F, 0x0000006E, 0x0000006D, - 0x0000006C, 0x0000006B, 0x0000006A, 0x00000069, 0x00000068, 0x00000067, 0x00000066, 0x00000065, - 0x00000064, 0x00000063, 0x00000062, 0x00000061, 0x00000060, 0x0000005F, 0x0000005E, 0x0000005D, - 0x0000005C, 0x0000005B, 0x0000005A, 0x00000059, 0x00000058, 0x00000057, 0x00000056, 0x00000055, - 0x00000054, 0x00000053, 0x00000052, 0x00000051, 0x00000050, 0x0000004F, 0x0000004E, 0x0000004D, - 0x0000004C, 0x0000004B, 0x0000004A, 0x00000049, 0x00000048, 0x00000047, 0x00000046, 0x00000045, - 0x00000044, 0x00000043, 0x00000042, 0x00000041, 0x00000040, 0x0000003F, 0x0000003E, 0x0000003D, - 0x0000003C, 0x0000003B, 0x0000003A, 0x00000039, 0x00000038, 0x00000037, 0x00000036, 0x00000035, - 0x00000034, 0x00000033, 0x00000032, 0x00000031, 0x00000030, 0x0000002F, 0x0000002E, 0x0000002D, - 0x0000002C, 0x0000002B, 0x0000002A, 0x00000029, 0x00000028, 0x00000027, 0x00000026, 0x00000025, - 0x00000024, 0x00000023, 0x00000022, 0x00000021, 0x00000020, 0x0000001F, 0x0000001E, 0x0000001D, - 0x0000001C, 0x0000001B, 0x0000001A, 0x00000019, 0x00000018, 0x00000017, 0x00000016, 0x00000015, - 0x00000014, 0x00000013, 0x00000012, 0x00000011, 0x00000010, 0x0000000F, 0x0000000E, 0x0000000D, - 0x0000000C, 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, - 0x00000004, 0x00000003, 0x00000002, 0x00000001, 0x00000000 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 0.000000, 0.000000, 5.806641, 0.000000, 5.806641, 0.000000, - 9.087891, 0.000000, 18.679688, 0.000000, 15.251953, 0.000000, 25.365234, 0.000000, - 21.878906, 0.000000, 28.787109, 0.000000, 35.191406, 0.000000, 42.966797, 0.000000, - 38.279297, 0.000000, 47.982422, 0.000000, 44.085938, 0.000000, 44.085938, 0.000000, - 52.347656, 0.000000, 58.453125, 0.000000, 55.113281, 0.000000, 62.021484, 0.000000, - 66.292969, 0.000000, 64.886719, 0.000000, 69.292969, 0.000000, 67.886719, 0.000000, - 67.886719, 0.000000, 74.050781, 0.000000, 70.710938, 0.000000, 77.619141, 0.000000, - 77.619141, 0.000000, 83.425781, 0.000000, 90.527344, 0.000000, 86.513672, 0.000000, - 91.804688, 0.000000, 92.390625, 0.000000, 98.267578, 0.000000, 109.347656, 0.000000, - 104.894531, 0.000000, 110.701172, 0.000000, 116.250000, 0.000000, 113.701172, 0.000000, - 113.554688, 0.000000, 121.242188, 0.000000, 119.484375, 0.000000, 124.552734, 0.000000, - 122.677734, 0.000000, 126.679688, 0.000000, 126.679688, 0.000000, 135.210938, 0.000000, - 132.486328, 0.000000, 132.251953, 0.000000, 138.416016, 0.000000, 148.734375, 0.000000, - 145.042969, 0.000000, 155.308594, 0.000000, 151.968750, 0.000000, 162.773438, 0.000000, - 158.876953, 0.000000, 158.876953, 0.000000, 168.398438, 0.000000, 166.523438, 0.000000, - 172.546875, 0.000000, 170.525391, 0.000000, 173.689453, 0.000000, 182.718750, 0.000000, - 180.199219, 0.000000, 185.583984, 0.000000, 190.107422, 0.000000, 187.998047, 0.000000, - 194.132812, 0.000000, 192.257812, 0.000000, 196.259766, 0.000000, 199.423828, 0.000000, - 206.964844, 0.000000, 202.511719, 0.000000, 212.332031, 0.000000, 208.318359, 0.000000, - 217.886719, 0.000000, 214.195312, 0.000000, 221.121094, 0.000000, 221.121094, 0.000000, - 229.447266, 0.000000, 226.927734, 0.000000, 235.652344, 0.000000, 232.312500, 0.000000, - 232.312500, 0.000000, 242.648438, 0.000000, 239.220703, 0.000000, 245.847656, 0.000000, - 250.195312, 0.000000, 248.320312, 0.000000, 255.808594, 0.000000, 252.322266, 0.000000, - 259.230469, 0.000000, 265.042969, 0.000000, 262.083984, 0.000000, 271.675781, 0.000000, - 268.248047, 0.000000, 274.875000, 0.000000, 284.197266, 0.000000, 281.501953, 0.000000, - 287.250000, 0.000000, 287.250000, 0.000000, 290.531250, 0.000000, 298.212891, 0.000000, - 296.337891, 0.000000, 296.337891, 0.000000, 300.339844, 0.000000, 300.339844, 0.000000, - 306.146484, 0.000000, 313.687500, 0.000000, 309.234375, 0.000000, 318.732422, 0.000000, - 315.041016, 0.000000, 325.453125, 0.000000, 321.966797, 0.000000, 328.875000, 0.000000, - 333.222656, 0.000000, 331.347656, 0.000000, 338.044922, 0.000000, 335.349609, 0.000000, - 345.175781, 0.000000, 341.279297, 0.000000, 341.279297, 0.000000, 352.558594, 0.000000, - 349.218750, 0.000000, 356.126953, 0.000000 - </result-positions> - </test-case> - - <test-case id="Not Language Specific" script="latn"> - <test-font name="fp9r8a.otf" version="Version 0.9.6 " checksum="0x62C6805F" rchecksum="0x00813376"/> - - <test-text>Ţhiş iş a ţeşţ.</test-text> - - <result-glyphs> - 0x00000107, 0x00000049, 0x0000004A, 0x00000104, 0x00000001, 0x0000004A, 0x00000104, 0x00000001, - 0x00000042, 0x00000001, 0x00000108, 0x00000046, 0x00000104, 0x00000108, 0x0000000F - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E - </result-indices> - - <result-positions> - 0.000000, 0.000000, 7.356000, 0.000000, 14.340000, 0.000000, 17.832001, 0.000000, - 22.920000, 0.000000, 25.920000, 0.000000, 29.412001, 0.000000, 34.500000, 0.000000, - 37.500000, 0.000000, 43.500000, 0.000000, 46.500000, 0.000000, 50.411999, 0.000000, - 56.160000, 0.000000, 61.248001, 0.000000, 65.160004, 0.000000, 68.160004, 0.000000 - </result-positions> - </test-case> - -<!-- known to fail in base JDK7, skip ('lang' not supported) - <test-case id="Romanian Language Specific" script="latn" lang="ROM"> - <test-font name="fp9r8a.otf" version="Version 0.9.6 " checksum="0x62C6805F" rchecksum="0x00813376"/> - - <test-text>Ţhiş iş a ţeşţ.</test-text> - - <result-glyphs> - 0x00000127, 0x00000049, 0x0000004A, 0x00000126, 0x00000001, 0x0000004A, 0x00000126, 0x00000001, - 0x00000042, 0x00000001, 0x00000128, 0x00000046, 0x00000126, 0x00000128, 0x0000000F - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E - </result-indices> - - <result-positions> - 0.000000, 0.000000, 7.356000, 0.000000, 14.340000, 0.000000, 17.832001, 0.000000, - 22.920000, 0.000000, 25.920000, 0.000000, 29.412001, 0.000000, 34.500000, 0.000000, - 37.500000, 0.000000, 43.500000, 0.000000, 46.500000, 0.000000, 50.411999, 0.000000, - 56.160000, 0.000000, 61.248001, 0.000000, 65.160004, 0.000000, 68.160004, 0.000000 - </result-positions> - </test-case> ---> - - <test-case id="Nafees Nastaleeq Cursive Positioning Test" script="arab"> - <test-font name="Nafees Nastaleeq v1.02.ttf" version="Version 1.02" checksum="0x1BD85538" rchecksum="0x0111F234"/> - - <test-text>فتح بینچ خلیج شیخ پہنچ</test-text> - - <result-glyphs> - 0x0000003B, 0x00000344, 0x000001D5, 0x00000318, 0x00000349, 0x0000007C, 0x00000003, 0x0000003D, - 0x00000348, 0x000001D5, 0x00000346, 0x000000B5, 0x00000003, 0x0000003A, 0x00000348, 0x000001D5, - 0x000002E3, 0x00000344, 0x00000087, 0x00000003, 0x0000003B, 0x00000344, 0x000001D5, 0x00000348, - 0x000001E5, 0x00000347, 0x0000006E, 0x00000003, 0x0000003C, 0x00000345, 0x000001D5, 0x00000344, - 0x0000011D - </result-glyphs> - - <result-indices> - 0x00000015, 0x00000014, 0x00000014, 0x00000013, 0x00000012, 0x00000012, 0x00000011, 0x00000010, - 0x0000000F, 0x0000000F, 0x0000000E, 0x0000000E, 0x0000000D, 0x0000000C, 0x0000000B, 0x0000000B, - 0x0000000A, 0x00000009, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000006, 0x00000005, - 0x00000005, 0x00000004, 0x00000004, 0x00000003, 0x00000002, 0x00000001, 0x00000001, 0x00000000, - 0x00000000 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 3.205078, -11.097656, 1.406250, 0.000000, 4.558594, -1.376953, - 9.421875, -5.273438, 7.505859, -6.843750, 11.537109, 0.000000, 12.726562, 0.000000, - 20.455078, -4.798828, 15.357422, 0.000000, 19.289062, -13.072266, 18.509766, -1.376953, - 22.552734, 0.000000, 23.742188, 0.000000, 30.246094, -4.798828, 25.148438, 0.000000, - 28.300781, -1.376953, 32.917969, -13.792969, 30.158203, -7.792969, 35.208984, 0.000000, - 36.398438, 0.000000, 39.603516, -11.097656, 37.804688, 0.000000, 45.632812, 3.181641, - 40.957031, -1.376953, 44.853516, -6.046875, 42.457031, -5.572266, 46.066406, 0.000000, - 47.255859, 0.000000, 49.376953, -11.396484, 48.662109, 0.000000, 52.769531, -14.332031, - 51.814453, -1.376953, 56.789062, 0.000000 - </result-positions> - </test-case> - - <test-case id="Malayalam Samvruthokaram Test" script="mlym"> - <test-font name="lohit_ml.ttf" version="Version 1.00" checksum="0x66CB0B82" rchecksum="0x002EEBD8"/> - - <test-text>ണു്</test-text> - - <result-glyphs> - 0x00000023, 0x0000003C, 0x00000045 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 15.117188, 0.000000, 18.503906, 0.000000, 18.503906, 0.000000 - </result-positions> - </test-case> - - <test-case id="Broken Font Test" script="hani" lang="ZHT"> - <test-font name="BMIN00M.TTF" version="Version 2.00" checksum="0xF16BE0C6" rchecksum="0x15E106D0"/> - - <test-text>中華人民共和國 臺灣</test-text> - - <result-glyphs> - 0x00000292, 0x000024E8, 0x000002D1, 0x00001582, 0x000004A1, 0x00000650, 0x000007E2, 0x00000021, - 0x00002395, 0x00001896 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.000000, 0.000000, 24.000000, 0.000000, 36.000000, 0.000000, - 48.000000, 0.000000, 60.000000, 0.000000, 72.000000, 0.000000, 84.000000, 0.000000, - 90.000000, 0.000000, 102.000000, 0.000000, 114.000000, 0.000000 - </result-positions> - </test-case> - - <test-case id="Telugu Syllable Boundary Test" script="telu"> - <test-font name="gautami.ttf" version="Version 5.02" checksum="0x45C66919" rchecksum="0x00DBFA1A"/> - - <test-text>ప్రకాష్</test-text> - - <result-glyphs> - 0x00000057, 0x0000023B, 0x0000FFFF, 0x00000125, 0x00000066, 0x00000241, 0x0000FFFF - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000002, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 8.285156, 0.000000, 14.894531, 0.000000, 14.894531, 0.000000, - 21.503906, 0.000000, 25.136719, 0.000000, 33.421875, 0.000000, 33.421875, 0.000000 - </result-positions> - </test-case> - - <test-case id="Angsana New Mark Test" script="thai"> - <test-font name="ANGSA.TTF" version="Version 5.00" checksum="0x95F16337" rchecksum="0x00724BC4"/> - - <test-text>บทที่๑พายุไซโคลนโดโรธีอาศัยอยู่ท่ามกลางทุ่งใหญ่ในแคนซัสกับลุงเฮนรีชาวไร่และป้าเอ็มภรรยาชาวไร่บ้านของพวกเขาหลังเล็กเพราะไม้สร้างบ้านต้องขนมาด้วยเกวียนเป็นระยะทางหลายไมล์</test-text> - - <result-glyphs> - 0x0000009D, 0x0000009A, 0x0000009A, 0x000000B8, 0x000000C9, 0x000000D2, 0x000000A1, 0x000000B5, - 0x000000A5, 0x000000BB, 0x000000C5, 0x0000008E, 0x000000C3, 0x00000087, 0x000000A8, 0x0000009C, - 0x000000C3, 0x00000097, 0x000000C3, 0x000000A6, 0x0000009B, 0x000000B8, 0x000000B0, 0x000000B5, - 0x000000AB, 0x000000B4, 0x000000A5, 0x000000B0, 0x000000A5, 0x000000BC, 0x0000006E, 0x0000009A, - 0x0000006E, 0x000000B5, 0x000000A4, 0x00000084, 0x000000A8, 0x000000B5, 0x0000008A, 0x0000009A, - 0x000000BB, 0x0000006E, 0x0000008A, 0x000000C4, 0x000000AE, 0x00000090, 0x0000006E, 0x000000C4, - 0x0000009C, 0x000000C2, 0x00000087, 0x0000009C, 0x0000008E, 0x000000B4, 0x000000AD, 0x00000084, - 0x000000B4, 0x0000009D, 0x000000A8, 0x000000BB, 0x0000008A, 0x000000C1, 0x000000B1, 0x0000009C, - 0x000000A6, 0x000000B8, 0x0000008D, 0x000000B5, 0x000000AA, 0x000000C5, 0x000000A6, 0x0000006E, - 0x000000C2, 0x000000A8, 0x000000B3, 0x0000009E, 0x0000006F, 0x000000B5, 0x000000C1, 0x000000B0, - 0x000000C8, 0x000000A4, 0x000000A3, 0x000000A6, 0x000000A6, 0x000000A5, 0x000000B5, 0x0000008D, - 0x000000B5, 0x000000AA, 0x000000C5, 0x000000A6, 0x0000006E, 0x0000009D, 0x0000006F, 0x000000B5, - 0x0000009C, 0x00000085, 0x000000B0, 0x0000008A, 0x000000A1, 0x000000AA, 0x00000084, 0x000000C1, - 0x00000085, 0x000000B5, 0x000000AE, 0x000000A8, 0x000000B4, 0x0000008A, 0x000000C1, 0x000000A8, - 0x000000C8, 0x00000084, 0x000000C1, 0x000000A1, 0x000000A6, 0x000000B5, 0x000000B3, 0x000000C5, - 0x000000A4, 0x0000006F, 0x000000AD, 0x000000A6, 0x0000006F, 0x000000B5, 0x0000008A, 0x0000009D, - 0x0000006F, 0x000000B5, 0x0000009C, 0x00000098, 0x0000006F, 0x000000B0, 0x0000008A, 0x00000085, - 0x0000009C, 0x000000A4, 0x000000B5, 0x00000097, 0x0000006F, 0x000000AA, 0x000000A5, 0x000000C1, - 0x00000084, 0x000000AA, 0x000000B8, 0x000000A5, 0x0000009C, 0x000000C1, 0x0000009E, 0x000000C8, - 0x0000009C, 0x000000A6, 0x000000B3, 0x000000A5, 0x000000B3, 0x0000009A, 0x000000B5, 0x0000008A, - 0x000000AE, 0x000000A8, 0x000000B5, 0x000000A5, 0x000000C5, 0x000000A4, 0x000000A8, 0x00000072 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, - 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, - 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, - 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, - 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, - 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, - 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, - 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, - 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 5.399414, 0.000000, 10.798828, 0.000000, 15.072266, 0.000000, - 15.072266, 0.000000, 16.198242, 0.000000, 21.046875, 0.000000, 26.616211, 0.000000, - 30.035156, 0.000000, 31.312500, 0.000000, 34.151367, 0.000000, 38.279297, 0.000000, - 43.558594, 0.000000, 47.663086, 0.000000, 52.438477, 0.000000, 57.178711, 0.000000, - 62.698242, 0.000000, 66.802734, 0.000000, 71.601562, 0.000000, 75.706055, 0.000000, - 79.810547, 0.000000, 84.029297, 0.000000, 84.369141, 0.000000, 89.097656, 0.000000, - 92.516602, 0.000000, 97.614258, 0.000000, 97.195312, 0.000000, 101.311523, 0.000000, - 106.040039, 0.000000, 107.375977, 0.000000, 108.326172, -0.084961, 110.156250, 0.000000, - 113.497070, -0.084961, 115.555664, 0.000000, 118.974609, 0.000000, 124.013672, 0.000000, - 128.765625, 0.000000, 133.505859, 0.000000, 136.924805, 0.000000, 140.704102, 0.000000, - 143.036133, 0.000000, 144.044922, -0.084961, 146.103516, 0.000000, 149.882812, 0.000000, - 153.553711, 0.000000, 159.158203, 0.000000, 163.377930, -0.084961, 165.421875, 0.000000, - 169.092773, 0.000000, 174.612305, 0.000000, 179.135742, 0.000000, 183.911133, 0.000000, - 189.430664, 0.000000, 194.879883, 0.000000, 194.709961, 0.000000, 199.989258, 0.000000, - 204.092773, -0.084961, 204.741211, 0.000000, 210.140625, 0.000000, 212.828125, 0.000000, - 214.880859, 0.000000, 218.660156, 0.000000, 220.675781, 0.000000, 225.128906, 0.000000, - 230.648438, 0.000000, 234.105469, 0.000000, 234.752930, 0.000000, 239.613281, 0.000000, - 243.032227, 0.000000, 247.280273, 0.000000, 251.408203, 0.000000, 253.932617, -0.084961, - 255.512695, 0.000000, 260.036133, 0.000000, 264.776367, 0.000000, 269.071289, 0.000000, - 272.704102, 0.000000, 274.470703, 0.000000, 277.889648, 0.000000, 279.905273, 0.000000, - 284.768555, 0.000000, 284.633789, 0.000000, 289.672852, 0.000000, 294.641602, 0.000000, - 298.746094, 0.000000, 302.850586, 0.000000, 306.966797, 0.000000, 310.385742, 0.000000, - 315.246094, 0.000000, 318.665039, 0.000000, 322.913086, 0.000000, 327.041016, 0.000000, - 329.565430, -0.084961, 331.145508, 0.000000, 335.911133, 0.000000, 336.544922, 0.000000, - 339.963867, 0.000000, 345.483398, 0.000000, 350.258789, 0.000000, 354.987305, 0.000000, - 358.766602, 0.000000, 364.335938, 0.000000, 368.583984, 0.000000, 373.335938, 0.000000, - 375.351562, 0.000000, 380.126953, 0.000000, 383.545898, 0.000000, 389.150391, 0.000000, - 394.306641, 0.000000, 393.890625, 0.000000, 397.669922, 0.000000, 399.685547, 0.000000, - 404.548828, 0.000000, 404.425781, 0.000000, 409.177734, 0.000000, 411.193359, 0.000000, - 416.762695, 0.000000, 420.867188, 0.000000, 424.286133, 0.000000, 428.581055, 0.000000, - 432.708984, 0.000000, 438.123047, 0.000000, 437.748047, 0.000000, 443.027344, 0.000000, - 446.976562, 0.000000, 447.131836, 0.000000, 450.550781, 0.000000, 454.330078, 0.000000, - 459.095703, 0.000000, 459.729492, 0.000000, 463.148438, 0.000000, 468.667969, 0.000000, - 473.847656, 0.000000, 473.478516, 0.000000, 478.207031, 0.000000, 481.986328, 0.000000, - 486.761719, 0.000000, 492.281250, 0.000000, 497.320312, 0.000000, 500.739258, 0.000000, - 505.860352, 0.000000, 505.538086, 0.000000, 509.786133, 0.000000, 513.902344, 0.000000, - 515.917969, 0.000000, 520.669922, 0.000000, 523.947266, 0.000000, 524.917969, 0.000000, - 529.034180, 0.000000, 534.553711, 0.000000, 536.569336, 0.000000, 540.846680, 0.000000, - 541.968750, 0.000000, 547.488281, 0.000000, 551.592773, 0.000000, 555.887695, 0.000000, - 560.003906, 0.000000, 564.298828, 0.000000, 569.698242, 0.000000, 573.117188, 0.000000, - 576.896484, 0.000000, 582.500977, 0.000000, 587.241211, 0.000000, 590.660156, 0.000000, - 594.776367, 0.000000, 598.904297, 0.000000, 603.943359, 0.000000, 608.894531, 0.000000, - 608.683594, 0.000000 - </result-positions> - </test-case> - -<!-- known to fail in base JDK7, skip (come back to this later) - <test-case id="Sinhala Al-Lakuna Test" script="sinh"> - <test-font name="lklug.hj.ttf" version="Version 0.6 " checksum="0xA190C2F4" rchecksum="0x00922218"/> - - <test-text>ක්‍රෙ ක්‍යෙ ක්‍ෂෙ ක්‍ෂ්‍යෙ ක්ෂෙ කර්‍මෙ ස්ට්‍රේ ස‍්සෙ ස්ස</test-text> - - <result-glyphs> - 0x0000004A, 0x000001D5, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x0000004A, 0x00000018, - 0x0000008B, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x0000004A, 0x0000008A, 0x0000FFFF, 0x0000FFFF, - 0x0000FFFF, 0x00000003, 0x0000004A, 0x0000008A, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000008B, - 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000001D6, 0x0000FFFF, 0x0000004A, 0x0000003C, 0x00000003, - 0x00000018, 0x0000004A, 0x000001F8, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A9, - 0x0000FFFF, 0x0000004A, 0x0000007A, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, - 0x0000004A, 0x00000203, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x00000003, 0x000000A9, 0x0000FFFF, - 0x0000003D - </result-glyphs> - - <result-indices> - 0x00000004, 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000005, 0x0000000A, 0x00000006, - 0x00000007, 0x00000008, 0x00000009, 0x0000000B, 0x00000010, 0x0000000C, 0x0000000D, 0x0000000E, - 0x0000000F, 0x00000011, 0x00000019, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, - 0x00000017, 0x00000018, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001E, 0x0000001D, 0x0000001F, - 0x00000020, 0x00000025, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000026, 0x00000027, - 0x00000028, 0x0000002D, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, - 0x00000033, 0x0000002F, 0x00000030, 0x00000031, 0x00000032, 0x00000034, 0x00000035, 0x00000036, - 0x00000037 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 8.520000, 0.000000, 19.224001, 0.000000, 19.224001, 0.000000, - 19.224001, 0.000000, 19.224001, 0.000000, 26.640001, 0.000000, 35.160004, 0.000000, - 45.864006, 0.000000, 51.936005, 0.000000, 51.936005, 0.000000, 51.936005, 0.000000, - 59.352005, 0.000000, 67.872009, 0.000000, 82.704010, 0.000000, 82.704010, 0.000000, - 82.704010, 0.000000, 82.704010, 0.000000, 90.120010, 0.000000, 98.640015, 0.000000, - 113.472015, 0.000000, 113.472015, 0.000000, 113.472015, 0.000000, 113.472015, 0.000000, - 119.544014, 0.000000, 119.544014, 0.000000, 119.544014, 0.000000, 126.960014, 0.000000, - 137.664017, 0.000000, 137.664017, 0.000000, 146.184021, 0.000000, 154.296021, 0.000000, - 161.712021, 0.000000, 172.416016, 0.000000, 180.936020, 0.000000, 189.552017, 0.000000, - 189.552017, 0.000000, 189.552017, 0.000000, 189.552017, 0.000000, 196.968018, 0.000000, - 205.584015, 0.000000, 205.584015, 0.000000, 214.104019, 0.000000, 222.720016, 0.000000, - 222.720016, 0.000000, 222.720016, 0.000000, 222.720016, 0.000000, 222.720016, 0.000000, - 230.136017, 0.000000, 238.656021, 0.000000, 254.784027, 0.000000, 254.784027, 0.000000, - 254.784027, 0.000000, 254.784027, 0.000000, 262.200012, 0.000000, 270.816010, 0.000000, - 270.816010, 0.000000, 279.432007, 0.000000 - </result-positions> - </test-case> ---> - - <test-case id="Arabic Presentation Forms LRO Test" script="arab"> - <test-font name="trado.ttf" version="Version 1.01" checksum="0x7B68B462" rchecksum="0x00708871"/> - - <test-text>‭ﻲﺑﺮﻌﻟﺎﺑ</test-text> - - <result-glyphs> - 0x0000FFFF, 0x00000206, 0x000001A5, 0x000001C2, 0x000001E0, 0x000001F3, 0x000001A2, 0x000001A5 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 0.000000, 0.000000, 5.759766, 0.000000, 7.980469, 0.000000, - 11.748047, 0.000000, 15.298828, 0.000000, 17.302734, 0.000000, 19.763672, 0.000000, - 21.984375, 0.000000 - </result-positions> - </test-case> - - <test-case id="Arabic Presentation Forms No LRO Test" script="arab"> - <test-font name="trado.ttf" version="Version 1.01" checksum="0x7B68B462" rchecksum="0x00708871"/> - - <test-text>ﻲﺑﺮﻌﻟﺎﺑ</test-text> - - <result-glyphs> - 0x000001A5, 0x000001A2, 0x000001F3, 0x000001E0, 0x000001C2, 0x000001A5, 0x00000206 - </result-glyphs> - - <result-indices> - 0x00000006, 0x00000005, 0x00000004, 0x00000003, 0x00000002, 0x00000001, 0x00000000 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 2.220703, 0.000000, 4.681641, 0.000000, 6.685547, 0.000000, - 10.236328, 0.000000, 14.003906, 0.000000, 16.224609, 0.000000, 21.984375, 0.000000 - </result-positions> - </test-case> - - <test-case id="Canonical Char Indices Test" script="latn"> - <test-font name="arial.ttf" version="Version 5.01.2x" checksum="0x92F28CF6" rchecksum="0x02CF4C8A"/> - - <test-text>ḤḤ</test-text> - - <result-glyphs> - 0x000009A3, 0x000009A3 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 8.666016, 0.000000, 17.332031, 0.000000 - </result-positions> - </test-case> - - <test-case id="REPH ZWNJ Test" script="deva"> - <test-font name="raghu.ttf" version="Original Version 1.00 (2005)" checksum="0x088DB135" rchecksum="0x00803FCE"/> - - <test-text>र्य र्‌य</test-text> - - <result-glyphs> - 0x00000099, 0x0000005B, 0x0000FFFF, 0x00000003, 0x0000009A, 0x00000051, 0x00000001, 0x00000099 - </result-glyphs> - - <result-indices> - 0x00000002, 0x00000000, 0x00000001, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 9.726562, 0.263672, 9.468750, 0.000000, 9.468750, 0.000000, - 15.468750, 0.000000, 25.130859, -0.451172, 21.984375, 0.000000, 21.984375, 0.000000, - 31.453125, 0.000000 - </result-positions> - </test-case> - -<!-- known to fail in base JDK7, skip ( won't load, 'bad font name' ) - <test-case id="AppleChancery mort" script="latn"> - <test-font name="Apple Chancery.ttf" version="6.1d4e1" checksum="0xC01C5902" rchecksum="0x014278BD"/> - - <test-text>The quick brown fox jumps over the lazy dog. • Jackdaws love my big sphinx of quartz</test-text> - - <result-glyphs> - 0x00000157, 0x0000FFFF, 0x00000048, 0x00000003, 0x00000054, 0x00000058, 0x0000004C, 0x00000046, - 0x0000004E, 0x00000003, 0x00000045, 0x00000055, 0x00000052, 0x0000005A, 0x00000051, 0x00000003, - 0x00000049, 0x00000052, 0x0000005B, 0x00000003, 0x0000004D, 0x00000058, 0x00000050, 0x00000053, - 0x00000056, 0x00000003, 0x00000052, 0x00000059, 0x00000048, 0x00000055, 0x00000003, 0x00000152, - 0x0000FFFF, 0x00000048, 0x00000003, 0x0000004F, 0x00000044, 0x0000005D, 0x0000005C, 0x00000003, - 0x00000047, 0x00000052, 0x0000004A, 0x00000011, 0x00000003, 0x00000087, 0x00000003, 0x0000002D, - 0x00000044, 0x00000046, 0x0000004E, 0x00000047, 0x00000044, 0x0000005A, 0x00000056, 0x00000003, - 0x0000004F, 0x00000052, 0x00000059, 0x00000048, 0x00000003, 0x00000050, 0x0000005C, 0x00000003, - 0x00000045, 0x0000004C, 0x0000004A, 0x00000003, 0x00000056, 0x00000053, 0x0000004B, 0x0000004C, - 0x00000051, 0x0000005B, 0x00000003, 0x00000052, 0x00000049, 0x00000003, 0x00000054, 0x00000058, - 0x00000044, 0x00000055, 0x00000057, 0x0000005D - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, - 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, - 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, - 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 13.523438, 0.000000, 13.523438, 0.000000, 17.982422, 0.000000, - 21.316406, 0.000000, 27.134766, 0.000000, 33.861328, 0.000000, 37.412109, 0.000000, - 42.005859, 0.000000, 47.554688, 0.000000, 50.888672, 0.000000, 56.707031, 0.000000, - 61.705078, 0.000000, 66.849609, 0.000000, 74.378906, 0.000000, 81.152344, 0.000000, - 84.486328, 0.000000, 88.230469, 0.000000, 93.375000, 0.000000, 99.386719, 0.000000, - 102.720703, 0.000000, 105.914062, 0.000000, 112.640625, 0.000000, 122.109375, 0.000000, - 128.080078, 0.000000, 132.345703, 0.000000, 135.679688, 0.000000, 140.824219, 0.000000, - 146.232422, 0.000000, 150.691406, 0.000000, 155.689453, 0.000000, 159.023438, 0.000000, - 168.908203, 0.000000, 168.908203, 0.000000, 173.367188, 0.000000, 176.701172, 0.000000, - 179.900391, 0.000000, 186.058594, 0.000000, 190.998047, 0.000000, 197.501953, 0.000000, - 200.835938, 0.000000, 206.994141, 0.000000, 212.138672, 0.000000, 217.734375, 0.000000, - 220.212891, 0.000000, 223.546875, 0.000000, 230.214844, 0.000000, 233.548828, 0.000000, - 239.003906, 0.000000, 245.162109, 0.000000, 249.755859, 0.000000, 255.304688, 0.000000, - 261.462891, 0.000000, 267.621094, 0.000000, 275.150391, 0.000000, 279.416016, 0.000000, - 282.750000, 0.000000, 285.949219, 0.000000, 291.093750, 0.000000, 296.501953, 0.000000, - 300.960938, 0.000000, 304.294922, 0.000000, 313.763672, 0.000000, 320.267578, 0.000000, - 323.601562, 0.000000, 329.419922, 0.000000, 332.970703, 0.000000, 338.566406, 0.000000, - 341.900391, 0.000000, 346.166016, 0.000000, 352.136719, 0.000000, 358.523438, 0.000000, - 362.074219, 0.000000, 368.847656, 0.000000, 374.859375, 0.000000, 378.193359, 0.000000, - 383.337891, 0.000000, 387.082031, 0.000000, 390.416016, 0.000000, 396.234375, 0.000000, - 402.960938, 0.000000, 409.119141, 0.000000, 414.117188, 0.000000, 418.365234, 0.000000, - 423.304688, 0.000000 - </result-positions> - </test-case> ---> - -<!-- known to fail in base JDK7, skip ( won't load, 'bad font name') - <test-case id="Zapfino morx" script="latn"> - <test-font name="Zapfino.ttf" version="8.0d1e1" checksum="0x78FF7638" rchecksum="0x00EDBCB6"/> - - <test-text>Pack my bags with six dozen liquor jugs</test-text> - - <result-glyphs> - 0x00000040, 0x000001F8, 0x00000203, 0x00000230, 0x00000003, 0x00000239, 0x00000274, 0x00000003, - 0x000001FE, 0x000001F8, 0x0000021D, 0x00000255, 0x00000003, 0x0000026C, 0x00000228, 0x0000025C, - 0x00000223, 0x00000003, 0x00000255, 0x00000228, 0x00000270, 0x00000003, 0x00000207, 0x00000244, - 0x0000027A, 0x00000210, 0x0000023D, 0x00000003, 0x00000235, 0x00000228, 0x0000024D, 0x00000264, - 0x00000244, 0x00000251, 0x00000003, 0x0000022C, 0x00000264, 0x0000021D, 0x00000255 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.630000, 0.000000, 21.180000, 0.000000, 27.600000, 0.000000, - 36.599998, 0.000000, 42.599998, 0.000000, 53.160000, 0.000000, 59.970001, 0.000000, - 65.970001, 0.000000, 73.620003, 0.000000, 82.170006, 0.000000, 89.370003, 0.000000, - 94.740005, 0.000000, 100.740005, 0.000000, 112.050003, 0.000000, 117.480003, 0.000000, - 123.420006, 0.000000, 131.400009, 0.000000, 137.400009, 0.000000, 142.770004, 0.000000, - 148.199997, 0.000000, 155.699997, 0.000000, 161.699997, 0.000000, 169.830002, 0.000000, - 177.330002, 0.000000, 184.020004, 0.000000, 190.169998, 0.000000, 198.000000, 0.000000, - 204.000000, 0.000000, 210.089996, 0.000000, 215.519989, 0.000000, 223.229996, 0.000000, - 230.940002, 0.000000, 238.440002, 0.000000, 244.290009, 0.000000, 250.290009, 0.000000, - 256.140015, 0.000000, 263.850006, 0.000000, 271.050018, 0.000000, 276.420013, 0.000000 - </result-positions> - </test-case> ---> - - <test-case id="SourceCodePro-Regular.otf" script="latn"> - <test-font name="SourceCodePro-Regular.otf" version="Version 1.009;PS 1.000;hotconv 1.0.70;makeotf.lib2.5.5900" checksum="0x9EFE425F" rchecksum="0x0074AEC5"/> - - <test-text>Li kien kien, li kieku kieku.</test-text> - - <result-glyphs> - 0x0000000D, 0x00000024, 0x00000001, 0x00000026, 0x00000024, 0x00000020, 0x00000029, 0x00000001, - 0x00000026, 0x00000024, 0x00000020, 0x00000029, 0x000001D0, 0x00000001, 0x00000027, 0x00000024, - 0x00000001, 0x00000026, 0x00000024, 0x00000020, 0x00000026, 0x00000030, 0x00000001, 0x00000026, - 0x00000024, 0x00000020, 0x00000026, 0x00000030, 0x000001CF - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C - </result-indices> - - <result-positions> - 0.000000, 0.000000, 7.200000, 0.000000, 14.400000, 0.000000, 21.599998, 0.000000, - 28.799999, 0.000000, 36.000000, 0.000000, 43.200001, 0.000000, 50.400002, 0.000000, - 57.600002, 0.000000, 64.800003, 0.000000, 72.000000, 0.000000, 79.199997, 0.000000, - 86.399994, 0.000000, 93.599991, 0.000000, 100.799988, 0.000000, 107.999985, 0.000000, - 115.199982, 0.000000, 122.399979, 0.000000, 129.599976, 0.000000, 136.799973, 0.000000, - 143.999969, 0.000000, 151.199966, 0.000000, 158.399963, 0.000000, 165.599960, 0.000000, - 172.799957, 0.000000, 179.999954, 0.000000, 187.199951, 0.000000, 194.399948, 0.000000, - 201.599945, 0.000000, 208.799942, 0.000000 - </result-positions> - </test-case> - - <test-case id="SourceSansPro-Regular.otf" script="latn"> - <test-font name="SourceSansPro-Regular.otf" version="Version 1.036;PS 1.000;hotconv 1.0.70;makeotf.lib2.5.5900" checksum="0x0EDDDCF3" rchecksum="0x008F9D5C"/> - - <test-text>Il-Mistoqsija oħt l-għerf.</test-text> - - <result-glyphs> - 0x0000000A, 0x00000027, 0x00000210, 0x0000000E, 0x00000024, 0x0000002E, 0x0000002F, 0x0000002A, - 0x0000002C, 0x0000002E, 0x00000024, 0x00000025, 0x0000001C, 0x00000001, 0x0000002A, 0x0000011F, - 0x0000002F, 0x00000001, 0x00000027, 0x00000210, 0x00000022, 0x0000011F, 0x00000020, 0x0000002D, - 0x00000021, 0x000001FB - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, - 0x00000018, 0x00000019 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 3.096000, 0.000000, 6.156000, 0.000000, 9.888000, 0.000000, - 18.552000, 0.000000, 21.504000, 0.000000, 26.532000, 0.000000, 30.467999, 0.000000, - 36.972000, 0.000000, 43.571999, 0.000000, 48.599998, 0.000000, 51.551998, 0.000000, - 54.515999, 0.000000, 60.660000, 0.000000, 63.084000, 0.000000, 69.587997, 0.000000, - 76.115997, 0.000000, 80.171997, 0.000000, 82.596001, 0.000000, 85.655998, 0.000000, - 89.388000, 0.000000, 95.435997, 0.000000, 101.963997, 0.000000, 107.916000, 0.000000, - 112.080002, 0.000000, 114.984001, 0.000000, 117.972000, 0.000000 - </result-positions> - </test-case> - - <test-case id="Tibetan" script="tibt"> - <test-font name="Jomolhari-alpha3c-0605331.ttf" version="Version alpha 0.003c 2006" checksum="0x0C1F08DC" rchecksum="0x067378EF"/> - - <test-text>༄༅།། ཏིན་ཏིན་གྱི་དཔའ་རྩལ</test-text> - - <result-glyphs> - 0x00000145, 0x0000FFFF, 0x00000151, 0x00000151, 0x00000003, 0x0000046C, 0x00000BFD, 0x0000059A, - 0x0000014E, 0x0000046C, 0x00000BFD, 0x0000059A, 0x0000014E, 0x000002CA, 0x0000FFFF, 0x00000BFD, - 0x0000014E, 0x0000050E, 0x00000611, 0x00000848, 0x0000014E, 0x0000093C, 0x0000FFFF, 0x0000098B - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 14.906250, 0.000000, 14.906250, 0.000000, 17.648438, 0.000000, - 20.390625, 0.000000, 23.906250, 0.000000, 29.109375, 0.000000, 29.109375, 0.000000, - 34.171875, 0.000000, 35.929688, 0.000000, 41.132812, 0.000000, 41.132812, 0.000000, - 46.195312, 0.000000, 47.953125, 0.000000, 54.773438, 0.000000, 54.773438, 0.000000, - 54.773438, 0.000000, 56.531250, 0.000000, 61.875000, 0.000000, 67.570312, 0.000000, - 73.195312, 0.000000, 74.953125, 0.000000, 80.437500, 0.000000, 80.437500, 0.000000, - 87.328125, 0.000000 - </result-positions> - </test-case> - - <test-case id="Old Hangul" script="hang"> - <test-font name="UnBatangOdal.ttf" version="Version 1.00" checksum="0x4BA78B70" rchecksum="0x0A18D67F"/> - - <test-text>ᄊᆞᆷ ᄒᆞᆫ글 ᄀᆞᇹ ᄫᆞᆼ</test-text> - - <result-glyphs> - 0x000044FF, 0x00004707, 0x00004859, 0x00000005, 0x0000462B, 0x00004707, 0x00004785, 0x000019B2, - 0x00000005, 0x00004361, 0x00004707, 0x0000498D, 0x00000005, 0x000044C3, 0x00004707, 0x00004911 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, - 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F - </result-indices> - - <result-positions> - 0.000000, 0.000000, 12.000000, 0.000000, 12.000000, 0.000000, 12.000000, 0.000000, - 14.700000, 0.000000, 26.700001, 0.000000, 26.700001, 0.000000, 26.700001, 0.000000, - 38.700001, 0.000000, 41.400002, 0.000000, 53.400002, 0.000000, 53.400002, 0.000000, - 53.400002, 0.000000, 56.100002, 0.000000, 68.100006, 0.000000, 68.100006, 0.000000, - 68.100006, 0.000000 - </result-positions> - </test-case> - - <test-case id="DevaRotate" script="deva"> - <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D" rchecksum="0x029B644F"/> - - <test-text>के े</test-text> - - <result-glyphs> - 0x00000901, 0x00000931, 0x00000003, 0x00000956, 0x00000931 - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000003 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 5.935547, 0.000000, 8.548828, 0.000000, 12.345703, 0.000000, - 17.085938, 0.000000, 18.345703, 0.000000 - </result-positions> - </test-case> - - - <test-case id="DevaGASP" script="deva"> - <test-font name="LucidaSansRegular.ttf" version="Version 1.20 - October 2000" checksum="0xF5D9BA6D" rchecksum="0x029B644F"/> - - <test-text>अँग्रेज़ी</test-text> - - <result-glyphs> - 0x000008F1, 0x000008EE, 0x000009CB, 0x0000FFFF, 0x0000FFFF, 0x00000931, 0x00000940, 0x0000FFFF, - 0x0000092A - </result-glyphs> - - <result-indices> - 0x00000000, 0x00000001, 0x00000002, 0x00000004, 0x00000003, 0x00000005, 0x00000006, 0x00000007, - 0x00000008 - </result-indices> - - <result-positions> - 0.000000, 0.000000, 9.076172, 0.000000, 9.076172, 0.000000, 16.025391, 0.000000, - 16.025391, 0.000000, 16.025391, 0.000000, 16.025391, 0.000000, 23.976562, 0.000000, - 23.976562, 0.000000, 27.304688, 0.000000 - </result-positions> - </test-case> - -</layout-tests> diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/image/VolatileImage/DrawBufImgOp.java openjdk-25-25.0.3+9/test/jdk/java/awt/image/VolatileImage/DrawBufImgOp.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/image/VolatileImage/DrawBufImgOp.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/image/VolatileImage/DrawBufImgOp.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,484 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact 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 6514990 8198613 - * @summary Verifies that calling - * Graphics2D.drawImage(BufferedImage, BufferedImageOp, x, y) to an - * accelerated destination produces the same results when performed - * in software via BufferedImageOp.filter(). - * @run main/othervm DrawBufImgOp -ignore - * @author campbelc - */ - -import java.awt.*; -import java.awt.image.*; -import java.io.File; -import javax.imageio.ImageIO; - -/** - * REMIND: This testcase was originally intended to automatically compare - * the results of the software BufferedImageOp implementations against - * the OGL-accelerated codepaths. However, there are just too many open - * bugs in the mediaLib-based codepaths (see below), which means that - * creating the reference image may cause crashes or exceptions, - * and even if we work around those cases using the "-ignore" flag, - * the visual results of the reference image are often buggy as well - * (so the comparison will fail even though the OGL results are correct). - * Therefore, for now we will run the testcase with the "-ignore" flag - * but without the "-compare" flag, so at least it will be checking for - * any exceptions/crashes in the OGL code. When we fix all of the - * outstanding bugs with the software codepaths, we can remove the - * "-ignore" flag and maybe even restore the "-compare" flag. In the - * meantime, it stil functions well as a manual testcase (with either - * the "-show" or "-dump" options). - */ -public class DrawBufImgOp extends Canvas { - - private static final int TESTW = 600; - private static final int TESTH = 500; - private static boolean done; - - /* - * If true, skips tests that are known to trigger bugs (which in - * turn may cause crashes, exceptions, or other artifacts). - */ - private static boolean ignore; - - // Test both pow2 and non-pow2 sized images - private static final int[] srcSizes = { 32, 17 }; - private static final int[] srcTypes = { - BufferedImage.TYPE_INT_RGB, - BufferedImage.TYPE_INT_ARGB, - BufferedImage.TYPE_INT_ARGB_PRE, - BufferedImage.TYPE_INT_BGR, - BufferedImage.TYPE_3BYTE_BGR, - BufferedImage.TYPE_4BYTE_ABGR, - BufferedImage.TYPE_USHORT_565_RGB, - BufferedImage.TYPE_BYTE_GRAY, - BufferedImage.TYPE_USHORT_GRAY, - }; - - private static final RescaleOp - rescale1band, rescale3band, rescale4band; - private static final LookupOp - lookup1bandbyte, lookup3bandbyte, lookup4bandbyte; - private static final LookupOp - lookup1bandshort, lookup3bandshort, lookup4bandshort; - private static final ConvolveOp - convolve3x3zero, convolve5x5zero, convolve7x7zero; - private static final ConvolveOp - convolve3x3noop, convolve5x5noop, convolve7x7noop; - - static { - rescale1band = new RescaleOp(0.5f, 10.0f, null); - rescale3band = new RescaleOp( - new float[] { 0.6f, 0.4f, 0.6f }, - new float[] { 10.0f, -3.0f, 5.0f }, - null); - rescale4band = new RescaleOp( - new float[] { 0.6f, 0.4f, 0.6f, 0.9f }, - new float[] { -1.0f, 5.0f, 3.0f, 1.0f }, - null); - - // REMIND: we should probably test non-zero offsets, but that - // would require massaging the source image data to avoid going - // outside the lookup table array bounds - int offset = 0; - { - byte invert[] = new byte[256]; - byte halved[] = new byte[256]; - for (int j = 0; j < 256 ; j++) { - invert[j] = (byte) (255-j); - halved[j] = (byte) (j / 2); - } - ByteLookupTable lut1 = new ByteLookupTable(offset, invert); - lookup1bandbyte = new LookupOp(lut1, null); - ByteLookupTable lut3 = - new ByteLookupTable(offset, - new byte[][] {invert, halved, invert}); - lookup3bandbyte = new LookupOp(lut3, null); - ByteLookupTable lut4 = - new ByteLookupTable(offset, - new byte[][] {invert, halved, invert, halved}); - lookup4bandbyte = new LookupOp(lut4, null); - } - - { - short invert[] = new short[256]; - short halved[] = new short[256]; - for (int j = 0; j < 256 ; j++) { - invert[j] = (short) ((255-j) * 255); - halved[j] = (short) ((j / 2) * 255); - } - ShortLookupTable lut1 = new ShortLookupTable(offset, invert); - lookup1bandshort = new LookupOp(lut1, null); - ShortLookupTable lut3 = - new ShortLookupTable(offset, - new short[][] {invert, halved, invert}); - lookup3bandshort = new LookupOp(lut3, null); - ShortLookupTable lut4 = - new ShortLookupTable(offset, - new short[][] {invert, halved, invert, halved}); - lookup4bandshort = new LookupOp(lut4, null); - } - - // 3x3 blur - float[] data3 = { - 0.1f, 0.1f, 0.1f, - 0.1f, 0.2f, 0.1f, - 0.1f, 0.1f, 0.1f, - }; - Kernel k3 = new Kernel(3, 3, data3); - - // 5x5 edge - float[] data5 = { - -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, - -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, - -1.0f, -1.0f, 24.0f, -1.0f, -1.0f, - -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, - -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, - }; - Kernel k5 = new Kernel(5, 5, data5); - - // 7x7 blur - float[] data7 = { - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, - }; - Kernel k7 = new Kernel(7, 7, data7); - - convolve3x3zero = new ConvolveOp(k3, ConvolveOp.EDGE_ZERO_FILL, null); - convolve5x5zero = new ConvolveOp(k5, ConvolveOp.EDGE_ZERO_FILL, null); - convolve7x7zero = new ConvolveOp(k7, ConvolveOp.EDGE_ZERO_FILL, null); - - convolve3x3noop = new ConvolveOp(k3, ConvolveOp.EDGE_NO_OP, null); - convolve5x5noop = new ConvolveOp(k5, ConvolveOp.EDGE_NO_OP, null); - convolve7x7noop = new ConvolveOp(k7, ConvolveOp.EDGE_NO_OP, null); - } - - public void paint(Graphics g) { - synchronized (this) { - if (done) { - return; - } - } - - VolatileImage vimg = createVolatileImage(TESTW, TESTH); - vimg.validate(getGraphicsConfiguration()); - - Graphics2D g2d = vimg.createGraphics(); - renderTest(g2d); - g2d.dispose(); - - g.drawImage(vimg, 0, 0, null); - - Toolkit.getDefaultToolkit().sync(); - - synchronized (this) { - done = true; - notifyAll(); - } - } - - /* - * foreach source image size (once with pow2, once with non-pow2) - * - * foreach BufferedImage type - * - * RescaleOp (1 band) - * RescaleOp (3 bands, if src has 3 bands) - * RescaleOp (4 bands, if src has 4 bands) - * - * foreach LookupTable type (once with ByteLUT, once with ShortLUT) - * LookupOp (1 band) - * LookupOp (3 bands, if src has 3 bands) - * LookupOp (4 bands, if src has 4 bands) - * - * foreach edge condition (once with ZERO_FILL, once with EDGE_NO_OP) - * ConvolveOp (3x3) - * ConvolveOp (5x5) - * ConvolveOp (7x7) - */ - private void renderTest(Graphics2D g2d) { - g2d.setColor(Color.white); - g2d.fillRect(0, 0, TESTW, TESTH); - - int yorig = 2; - int xinc = 34; - int yinc = srcSizes[0] + srcSizes[1] + 2 + 2; - - for (int srcType : srcTypes) { - int y = yorig; - - for (int srcSize : srcSizes) { - int x = 2; - System.out.printf("type=%d size=%d\n", srcType, srcSize); - - BufferedImage srcImg = makeSourceImage(srcSize, srcType); - ColorModel srcCM = srcImg.getColorModel(); - - // RescaleOp - g2d.drawImage(srcImg, rescale1band, x, y); - x += xinc; - // REMIND: 3-band RescaleOp.filter() throws IAE for images - // that contain an alpha channel (bug to be filed) - if (srcCM.getNumColorComponents() == 3 && - !(ignore && srcCM.hasAlpha())) - { - g2d.drawImage(srcImg, rescale3band, x, y); - } - x += xinc; - if (srcCM.getNumComponents() == 4) { - g2d.drawImage(srcImg, rescale4band, x, y); - } - x += xinc; - - // LookupOp - // REMIND: Our LUTs are only 256 elements long, so won't - // currently work with USHORT_GRAY data - if (srcType != BufferedImage.TYPE_USHORT_GRAY) { - g2d.drawImage(srcImg, lookup1bandbyte, x, y); - x += xinc; - if (srcCM.getNumColorComponents() == 3) { - g2d.drawImage(srcImg, lookup3bandbyte, x, y); - } - x += xinc; - if (srcCM.getNumComponents() == 4) { - g2d.drawImage(srcImg, lookup4bandbyte, x, y); - } - x += xinc; - - // REMIND: LookupOp.createCompatibleDestImage() throws - // IAE for 3BYTE_BGR/4BYTE_ABGR (bug to be filed) - if (!(ignore && - (srcType == BufferedImage.TYPE_3BYTE_BGR || - srcType == BufferedImage.TYPE_4BYTE_ABGR))) - { - g2d.drawImage(srcImg, lookup1bandshort, x, y); - x += xinc; - // REMIND: 3-band LookupOp.filter() throws IAE for - // images that contain an alpha channel - // (bug to be filed) - if (srcCM.getNumColorComponents() == 3 && - !(ignore && srcCM.hasAlpha())) - { - g2d.drawImage(srcImg, lookup3bandshort, x, y); - } - x += xinc; - if (srcCM.getNumComponents() == 4) { - g2d.drawImage(srcImg, lookup4bandshort, x, y); - } - x += xinc; - } else { - x += 3*xinc; - } - } else { - x += 6*xinc; - } - - // ConvolveOp - // REMIND: ConvolveOp.filter() throws ImagingOpException - // for 3BYTE_BGR (see 4957775) - if (srcType != BufferedImage.TYPE_3BYTE_BGR) { - g2d.drawImage(srcImg, convolve3x3zero, x, y); - x += xinc; - g2d.drawImage(srcImg, convolve5x5zero, x, y); - x += xinc; - g2d.drawImage(srcImg, convolve7x7zero, x, y); - x += xinc; - - g2d.drawImage(srcImg, convolve3x3noop, x, y); - x += xinc; - g2d.drawImage(srcImg, convolve5x5noop, x, y); - x += xinc; - g2d.drawImage(srcImg, convolve7x7noop, x, y); - x += xinc; - } else { - x += 6*xinc; - } - - y += srcSize + 2; - } - - yorig += yinc; - } - } - - private BufferedImage makeSourceImage(int size, int type) { - int s2 = size/2; - BufferedImage img = new BufferedImage(size, size, type); - Graphics2D g2d = img.createGraphics(); - g2d.setComposite(AlphaComposite.Src); - g2d.setColor(Color.orange); - g2d.fillRect(0, 0, size, size); - g2d.setColor(Color.red); - g2d.fillRect(0, 0, s2, s2); - g2d.setColor(Color.green); - g2d.fillRect(s2, 0, s2, s2); - g2d.setColor(Color.blue); - g2d.fillRect(0, s2, s2, s2); - g2d.setColor(new Color(255, 255, 0, 128)); - g2d.fillRect(s2, s2, s2, s2); - g2d.setColor(Color.pink); - g2d.fillOval(s2-3, s2-3, 6, 6); - g2d.dispose(); - return img; - } - - public BufferedImage makeReferenceImage() { - BufferedImage img = new BufferedImage(TESTW, TESTH, - BufferedImage.TYPE_INT_RGB); - Graphics2D g2d = img.createGraphics(); - renderTest(g2d); - g2d.dispose(); - return img; - } - - public Dimension getPreferredSize() { - return new Dimension(TESTW, TESTH); - } - - private static void compareImages(BufferedImage refImg, - BufferedImage testImg, - int tolerance) - { - int x1 = 0; - int y1 = 0; - int x2 = refImg.getWidth(); - int y2 = refImg.getHeight(); - - for (int y = y1; y < y2; y++) { - for (int x = x1; x < x2; x++) { - Color expected = new Color(refImg.getRGB(x, y)); - Color actual = new Color(testImg.getRGB(x, y)); - if (!isSameColor(expected, actual, tolerance)) { - throw new RuntimeException("Test failed at x="+x+" y="+y+ - " (expected="+expected+ - " actual="+actual+ - ")"); - } - } - } - } - - private static boolean isSameColor(Color c1, Color c2, int e) { - int r1 = c1.getRed(); - int g1 = c1.getGreen(); - int b1 = c1.getBlue(); - int r2 = c2.getRed(); - int g2 = c2.getGreen(); - int b2 = c2.getBlue(); - int rmin = Math.max(r2-e, 0); - int gmin = Math.max(g2-e, 0); - int bmin = Math.max(b2-e, 0); - int rmax = Math.min(r2+e, 255); - int gmax = Math.min(g2+e, 255); - int bmax = Math.min(b2+e, 255); - if (r1 >= rmin && r1 <= rmax && - g1 >= gmin && g1 <= gmax && - b1 >= bmin && b1 <= bmax) - { - return true; - } - return false; - } - - public static void main(String[] args) throws Exception { - boolean show = false; - boolean dump = false; - boolean compare = false; - - for (String arg : args) { - if (arg.equals("-show")) { - show = true; - } else if (arg.equals("-dump")) { - dump = true; - } else if (arg.equals("-compare")) { - compare = true; - } else if (arg.equals("-ignore")) { - ignore = true; - } - } - - DrawBufImgOp test = new DrawBufImgOp(); - Frame frame = new Frame(); - frame.add(test); - frame.pack(); - frame.setVisible(true); - - // Wait until the component's been painted - synchronized (test) { - while (!done) { - try { - test.wait(); - } catch (InterruptedException e) { - throw new RuntimeException("Failed: Interrupted"); - } - } - } - - GraphicsConfiguration gc = frame.getGraphicsConfiguration(); - if (gc.getColorModel() instanceof IndexColorModel) { - System.out.println("IndexColorModel detected: " + - "test considered PASSED"); - frame.dispose(); - return; - } - - // Grab the screen region - BufferedImage capture = null; - try { - Robot robot = new Robot(); - Point pt1 = test.getLocationOnScreen(); - Rectangle rect = new Rectangle(pt1.x, pt1.y, TESTW, TESTH); - capture = robot.createScreenCapture(rect); - } catch (Exception e) { - throw new RuntimeException("Problems creating Robot"); - } finally { - if (!show) { - frame.dispose(); - } - } - - // Compare the images (allow for +/- 1 bit differences in color comps) - if (dump || compare) { - BufferedImage ref = test.makeReferenceImage(); - if (dump) { - ImageIO.write(ref, "png", - new File("DrawBufImgOp.ref.png")); - ImageIO.write(capture, "png", - new File("DrawBufImgOp.cap.png")); - } - if (compare) { - test.compareImages(ref, capture, 1); - } - } - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. * 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,10 +29,14 @@ * @run main XBMDecoderTest */ +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.PrintStream; +import java.util.Arrays; import javax.swing.ImageIcon; public class XBMDecoderTest { @@ -57,21 +61,39 @@ ImageIcon icon = new ImageIcon(fis.readAllBytes()); boolean isErrEmpty = errContent.toString().isEmpty(); + if (!isErrEmpty) { System.out.println("Expected ImageFormatException occurred."); System.out.print(errContent); } - if (validCase && !isErrEmpty) { throw new RuntimeException("Test failed: Error stream not empty"); - } else if (!validCase && isErrEmpty) { + } else if (!validCase && isErrEmpty && hasPixelData(icon.getImage())) { throw new RuntimeException("Test failed: ImageFormatException" + " expected but not thrown"); } + if (validCase && !hasPixelData(icon.getImage())) { + throw new RuntimeException("Test failed: the parsed image " + + "does not contain any pixel data"); + } System.out.println("PASSED\n"); } finally { System.setErr(originalErr); } } } + + private static boolean hasPixelData(Image img) { + int w = img.getWidth(null); + int h = img.getHeight(null); + BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + Graphics2D g = bi.createGraphics(); + g.drawImage(img, 0, 0, null); + g.dispose(); + int[] pixels = bi.getRGB(0, 0, w, h, null, 0, w); + if (Arrays.stream(pixels).allMatch(i -> i == 0)) { + return false; + } + return true; + } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_empty.xbm openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/invalid_empty.xbm --- openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_empty.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/invalid_empty.xbm 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,6 @@ +#define test_width 16 +#define test_height 3 +#define ht_x 1 +#define ht_y 2 +static unsigned char test_bits[] = { +}; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm --- openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm 2026-04-17 19:08:13.000000000 +0000 @@ -1,3 +1,3 @@ -#define k_wt 16 -#define k_ht 1 +#define k_width 16 +#define k_height 1 k[] = { 0x10, 1234567890}; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_plus.xbm openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/invalid_plus.xbm --- openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_plus.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/invalid_plus.xbm 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,3 @@ +#define test_width 16 +#define test_height 2 +static unsigned char test_bits[] = { 0x13, 0x11, 0xAB+, 0xff }; \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid_multiline.xbm openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/valid_multiline.xbm --- openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid_multiline.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/image/XBMDecoder/valid_multiline.xbm 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,8 @@ +#define test_width 16 +#define test_height 3 +#define ht_x 1 +#define ht_y 2 +static unsigned char test_bits[] = { +0x20, 0x10, +0x25, 0x01, +0xAC, 0xab }; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/PageDialogTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/PageDialogTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/PageDialogTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/PageDialogTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -22,11 +22,12 @@ */ /* - @test - @bug 6302514 - @key printer - @run main/manual PageDialogTest - @summary A toolkit modal dialog should not be blocked by Page/Print dialog. + * @test + * @bug 6302514 + * @key printer + * @requires (os.family != "mac") + * @run main/manual PageDialogTest + * @summary A toolkit modal dialog should not be blocked by Page/Print dialog. */ import java.awt.BorderLayout; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/PageRanges.java openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/PageRanges.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/PageRanges.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/PageRanges.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * 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,58 +21,63 @@ * questions. */ -/** +/* * @test * @bug 6575331 * @key printer * @summary The specified pages should be printed. - * @run main/manual=yesno PageRanges + * @library /java/awt/regtesthelpers + * @library /test/lib + * @build PassFailJFrame + * @build jtreg.SkippedException + * @run main/manual PageRanges */ -import java.awt.*; -import java.awt.print.*; +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 jtreg.SkippedException; public class PageRanges implements Printable { - - static String[] instr = { - "This test prints two jobs, and tests that the specified range", - "of pages is printed. You must have a printer installed for this test.", - "In the first dialog, select a page range of 2 to 3, and press OK", - "In the second dialog, select ALL, to print all pages (in total 5 pages).", - "Collect the two print outs and confirm the jobs printed correctly", - }; + private static final String INSTRUCTIONS = """ + This test prints two jobs and tests that the specified range + of pages is printed. + In the first dialog, select a page range of 2 to 3, and press OK. + In the second dialog, select ALL, to print all pages (in total 5 pages). + Collect the two print outs and confirm the jobs are printed correctly. + """; public static void main(String args[]) throws Exception { - for (int i=0;i<instr.length;i++) { - System.out.println(instr[i]); - } PrinterJob job = PrinterJob.getPrinterJob(); if (job.getPrintService() == null) { - System.out.println("No printers. Test cannot continue."); - return; + throw new SkippedException("Printer not configured or available."); } + + PassFailJFrame passFailJFrame = PassFailJFrame.builder() + .instructions(INSTRUCTIONS) + .columns(45) + .build(); + job.setPrintable(new PageRanges()); - if (!job.printDialog()) { - return; + if (job.printDialog()) { + job.print(); } - job.print(); - if (!job.printDialog()) { - return; + if (job.printDialog()) { + job.print(); } - job.print(); - return; + passFailJFrame.awaitAndCheck(); } public int print(Graphics g, PageFormat pf, int pi) - throws PrinterException { - + throws PrinterException { if (pi >= 5) { return NO_SUCH_PAGE; } g.drawString("Page : " + (pi+1), 200, 200); - return PAGE_EXISTS; } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/PolylinePrintingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * 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,31 +21,56 @@ * questions. */ -/** +/* + * @test * @bug 8041902 * @key printer * @summary Test printing of wide poly lines. - * @run main/manual=yesno PolylinePrintingTest + * @library /java/awt/regtesthelpers + * @library /test/lib + * @build PassFailJFrame + * @build jtreg.SkippedException + * @run main/manual PolylinePrintingTest */ -import java.awt.Dialog; -import java.awt.Frame; -import java.awt.TextArea; import java.awt.BasicStroke; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Path2D; import java.awt.print.PageFormat; -import java.awt.print.Paper; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; +import jtreg.SkippedException; public class PolylinePrintingTest implements Printable { + private static final String INSTRUCTIONS = """ + Press OK in the print dialog and collect the printed page. + Passing test : Output should show two identical chevrons. + Failing test : The line joins will appear different. + """; + + public static void main(String[] args) throws Exception { + PrinterJob job = PrinterJob.getPrinterJob(); + if (job.getPrintService() == null) { + throw new SkippedException("Printer not configured or available."); + } + + PassFailJFrame passFailJFrame = PassFailJFrame.builder() + .instructions(INSTRUCTIONS) + .columns(45) + .build(); + + job.setPrintable(new PolylinePrintingTest()); + if (job.printDialog()) { + job.print(); + } + + passFailJFrame.awaitAndCheck(); + } public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { - if (pageIndex > 0) { return NO_SUCH_PAGE; } @@ -66,7 +91,6 @@ private void drawPolylineGOOD(Graphics2D g2d, int[] x2Points, int[] y2Points) { - Path2D polyline = new Path2D.Float(Path2D.WIND_EVEN_ODD, x2Points.length); @@ -83,141 +107,4 @@ g.translate(0, offset); g.drawPolyline(xp, yp, xp.length); } - - public PolylinePrintingTest() throws PrinterException { - PrinterJob job = PrinterJob.getPrinterJob(); - PageFormat pf = job.defaultPage(); - Paper p = pf.getPaper(); - p.setImageableArea(0,0,p.getWidth(), p.getHeight()); - pf.setPaper(p); - job.setPrintable(this, pf); - if (job.printDialog()) { - job.print(); - } - } - - public static void main(String[] args) throws PrinterException { - String[] instructions = { - "You must have a printer available to perform this test.", - "OK the print dialog, and collect the printed page.", - "Passing test : Output should show two identical chevrons.", - "Failing test : The line joins will appear different." - }; - Sysout.createDialog(); - Sysout.printInstructions(instructions); - new PolylinePrintingTest(); - } } - -class Sysout { - private static TestDialog dialog; - - public static void createDialogWithInstructions( String[] instructions ) - { - dialog = new TestDialog( new Frame(), "Instructions" ); - dialog.printInstructions( instructions ); - dialog.show(); - println( "Any messages for the tester will display here." ); - } - - public static void createDialog( ) - { - dialog = new TestDialog( new Frame(), "Instructions" ); - String[] defInstr = { "Instructions will appear here. ", "" } ; - dialog.printInstructions( defInstr ); - dialog.show(); - println( "Any messages for the tester will display here." ); - } - - - public static void printInstructions( String[] instructions ) - { - dialog.printInstructions( instructions ); - } - - - public static void println( String messageIn ) - { - dialog.displayMessage( messageIn ); - } - -}// Sysout class - -/** - This is part of the standard test machinery. It provides a place for the - test instructions to be displayed, and a place for interactive messages - to the user to be displayed. - To have the test instructions displayed, see Sysout. - To have a message to the user be displayed, see Sysout. - Do not call anything in this dialog directly. - */ -class TestDialog extends Dialog { - TextArea instructionsText; - TextArea messageText; - int maxStringLength = 80; - - //DO NOT call this directly, go through Sysout - public TestDialog( Frame frame, String name ) - { - super( frame, name ); - int scrollBoth = TextArea.SCROLLBARS_BOTH; - instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth ); - add( "North", instructionsText ); - - messageText = new TextArea( "", 5, maxStringLength, scrollBoth ); - add("Center", messageText); - - pack(); - - show(); - }// TestDialog() - - //DO NOT call this directly, go through Sysout - public void printInstructions( String[] instructions ) - { - //Clear out any current instructions - instructionsText.setText( "" ); - - //Go down array of instruction strings - - String printStr, remainingStr; - for( int i=0; i < instructions.length; i++ ) - { - //chop up each into pieces maxSringLength long - remainingStr = instructions[ i ]; - while( remainingStr.length() > 0 ) - { - //if longer than max then chop off first max chars to print - if( remainingStr.length() >= maxStringLength ) - { - //Try to chop on a word boundary - int posOfSpace = remainingStr. - lastIndexOf( ' ', maxStringLength - 1 ); - if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1; - - printStr = remainingStr.substring( 0, posOfSpace + 1 ); - remainingStr = remainingStr.substring( posOfSpace + 1 ); - } - //else just print - else - { - printStr = remainingStr; - remainingStr = ""; - } - - instructionsText.append( printStr + "\n" ); - - }// while - - }// for - - }//printInstructions() - - //DO NOT call this directly, go through Sysout - public void displayMessage( String messageIn ) - { - messageText.append( messageIn + "\n" ); - } - -}// TestDialog class - diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/SwingUIText.java openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/SwingUIText.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/print/PrinterJob/SwingUIText.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/print/PrinterJob/SwingUIText.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * 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,44 +21,70 @@ * questions. */ -/** +/* * @test * @bug 6488219 6560738 7158350 8017469 * @key printer * @summary Test that text printed in Swing UI measures and looks OK. - * @run main/manual=yesno PrintTextTest + * @library /java/awt/regtesthelpers /test/lib + * @build PassFailJFrame jtreg.SkippedException + * @run main/manual SwingUIText */ -import java.awt.*; -import javax.swing.*; -import java.awt.print.*; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.GridLayout; +import java.awt.print.PageFormat; +import java.awt.print.Printable; +import java.awt.print.PrinterJob; +import javax.swing.JButton; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import jtreg.SkippedException; public class SwingUIText implements Printable { + private static JFrame frame; + private static final String INSTRUCTIONS = """ + This test checks that when a Swing UI is printed, + the text in each component aligns with the component’s length as seen on-screen. + It also ensures the text spacing is reasonably even, though this is subjective. + The comparison should be made with JDK 1.5 GA or JDK 1.6 GA. + + Steps: + 1. Press the "Print" or "OK" button on the Print dialog. + This will print the content of the "Swing UI Text Printing Test" JFrame. + 2. Compare the printout with the content of the JFrame. + 3. If they match, press Pass; otherwise, press Fail. + """; - static String[] instructions = { - "This tests that when a Swing UI is printed, that the text", - "in each component properly matches the length of the component", - "as seen on-screen, and that the spacing of the text is of", - "reasonable even-ness. This latter part is very subjective and", - "the comparison has to be with JDK1.5 GA, or JDK 1.6 GA", - }; - - static JFrame frame; - - public static void main(String args[]) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - createUI(); - } - }); - } + public static void main(String args[]) throws Exception { + PrinterJob job = PrinterJob.getPrinterJob(); + if (job.getPrintService() == null) { + throw new SkippedException("Printer not configured or available."); + } - public static void createUI() { + PassFailJFrame passFailJFrame = PassFailJFrame.builder() + .instructions(INSTRUCTIONS) + .columns(45) + .testUI(SwingUIText::createTestUI) + .build(); - Sysout.createDialogWithInstructions(instructions); + job.setPrintable(new SwingUIText()); + if (job.printDialog()) { + job.print(); + } + + passFailJFrame.awaitAndCheck(); + } + public static JFrame createTestUI() { + frame = new JFrame(); JPanel panel = new JPanel(); - panel.setLayout(new GridLayout(4,1)); + panel.setLayout(new GridLayout(4, 1)); String text = "marvelous suspicious solving"; displayText(panel, text); @@ -89,24 +115,12 @@ frame = new JFrame("Swing UI Text Printing Test"); frame.getContentPane().add(panel); frame.pack(); - frame.setVisible(true); - - PrinterJob job = PrinterJob.getPrinterJob(); - PageFormat pf = job.defaultPage(); - job.setPrintable(new SwingUIText(), pf); - if (job.printDialog()) { - try { job.print(); } - catch (Exception e) { - e.printStackTrace(); - throw new RuntimeException(e); - } - } + return frame; } - static void displayText(JPanel p, String text) { JPanel panel = new JPanel(); - panel.setLayout(new GridLayout(2,1)); + panel.setLayout(new GridLayout(2, 1)); JPanel row = new JPanel(); Font font = new Font("Dialog", Font.PLAIN, 12); @@ -114,7 +128,7 @@ label.setFont(font); row.add(label); - JButton button = new JButton("Print "+text); + JButton button = new JButton("Print " + text); button.setMnemonic('P'); button.setFont(font); row.add(button); @@ -133,132 +147,14 @@ p.add(panel); } - public int print(Graphics g, PageFormat pf, int pageIndex) - throws PrinterException { - + public int print(Graphics g, PageFormat pf, int pageIndex) { if (pageIndex >= 1) { return Printable.NO_SUCH_PAGE; } + g.translate((int)pf.getImageableX(), (int)pf.getImageableY()); frame.printAll(g); - return Printable.PAGE_EXISTS; } } - -class Sysout - { - private static TestDialog dialog; - - public static void createDialogWithInstructions( String[] instructions ) - { - dialog = new TestDialog( new Frame(), "Instructions" ); - dialog.printInstructions( instructions ); - dialog.show(); - println( "Any messages for the tester will display here." ); - } - - public static void createDialog( ) - { - dialog = new TestDialog( new Frame(), "Instructions" ); - String[] defInstr = { "Instructions will appear here. ", "" } ; - dialog.printInstructions( defInstr ); - dialog.show(); - println( "Any messages for the tester will display here." ); - } - - - public static void printInstructions( String[] instructions ) - { - dialog.printInstructions( instructions ); - } - - - public static void println( String messageIn ) - { - dialog.displayMessage( messageIn ); - } - - }// Sysout class - -/** - This is part of the standard test machinery. It provides a place for the - test instructions to be displayed, and a place for interactive messages - to the user to be displayed. - To have the test instructions displayed, see Sysout. - To have a message to the user be displayed, see Sysout. - Do not call anything in this dialog directly. - */ -class TestDialog extends Dialog - { - - TextArea instructionsText; - TextArea messageText; - int maxStringLength = 80; - - //DO NOT call this directly, go through Sysout - public TestDialog( Frame frame, String name ) - { - super( frame, name ); - int scrollBoth = TextArea.SCROLLBARS_BOTH; - instructionsText = new TextArea( "", 10, maxStringLength, scrollBoth ); - add( "North", instructionsText ); - - messageText = new TextArea( "", 5, maxStringLength, scrollBoth ); - add("South", messageText); - - pack(); - - show(); - }// TestDialog() - - //DO NOT call this directly, go through Sysout - public void printInstructions( String[] instructions ) - { - //Clear out any current instructions - instructionsText.setText( "" ); - - //Go down array of instruction strings - - String printStr, remainingStr; - for( int i=0; i < instructions.length; i++ ) - { - //chop up each into pieces maxSringLength long - remainingStr = instructions[ i ]; - while( remainingStr.length() > 0 ) - { - //if longer than max then chop off first max chars to print - if( remainingStr.length() >= maxStringLength ) - { - //Try to chop on a word boundary - int posOfSpace = remainingStr. - lastIndexOf( ' ', maxStringLength - 1 ); - - if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1; - - printStr = remainingStr.substring( 0, posOfSpace + 1 ); - remainingStr = remainingStr.substring( posOfSpace + 1 ); - } - //else just print - else - { - printStr = remainingStr; - remainingStr = ""; - } - - instructionsText.append( printStr + "\n" ); - - }// while - - }// for - - }//printInstructions() - - //DO NOT call this directly, go through Sysout - public void displayMessage( String messageIn ) - { - messageText.append( messageIn + "\n" ); - } - -}// TestDialog class diff -Nru openjdk-25-25.0.2+10/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java openjdk-25-25.0.3+9/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java --- openjdk-25-25.0.2+10/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java 2026-04-17 19:08:13.000000000 +0000 @@ -486,9 +486,11 @@ long testTimeOut, int rows, int columns) throws InterruptedException, InvocationTargetException { - invokeOnEDT(() -> createUI(title, instructions, - testTimeOut, - rows, columns)); + this(builder().title(title) + .instructions(instructions) + .testTimeOut(testTimeOut) + .rows(rows) + .columns(columns)); } /** @@ -503,6 +505,7 @@ */ private PassFailJFrame(final Builder builder) throws InterruptedException, InvocationTargetException { + builder.validate(); invokeOnEDT(() -> createUI(builder)); if (!builder.splitUI && builder.panelCreator != null) { @@ -584,39 +587,13 @@ } } - private static void createUI(String title, String instructions, - long testTimeOut, int rows, int columns) { - frame = new JFrame(title); - frame.setLayout(new BorderLayout()); - - frame.addWindowListener(windowClosingHandler); - - frame.add(createInstructionUIPanel(instructions, - testTimeOut, - rows, columns, - null, - false, - false, 0), - BorderLayout.CENTER); - frame.pack(); - frame.setLocationRelativeTo(null); - addTestWindow(frame); - } - private static void createUI(Builder builder) { frame = new JFrame(builder.title); frame.setLayout(new BorderLayout()); frame.addWindowListener(windowClosingHandler); - JComponent instructionUI = - createInstructionUIPanel(builder.instructions, - builder.testTimeOut, - builder.rows, builder.columns, - builder.hyperlinkListener, - builder.screenCapture, - builder.addLogArea, - builder.logAreaRows); + JComponent instructionUI = createInstructionUIPanel(builder); if (builder.splitUI) { JSplitPane splitPane = new JSplitPane( builder.splitUIOrientation, @@ -632,24 +609,23 @@ addTestWindow(frame); } - private static JComponent createInstructionUIPanel(String instructions, - long testTimeOut, - int rows, int columns, - HyperlinkListener hyperlinkListener, - boolean enableScreenCapture, - boolean addLogArea, - int logAreaRows) { + private static JComponent createInstructionUIPanel(final Builder builder) { JPanel main = new JPanel(new BorderLayout()); main.setBorder(createFrameBorder()); - timeoutHandlerPanel = new TimeoutHandlerPanel(testTimeOut); + timeoutHandlerPanel = new TimeoutHandlerPanel(builder.testTimeOut); main.add(timeoutHandlerPanel, BorderLayout.NORTH); - JTextComponent text = instructions.startsWith("<html>") - ? configureHTML(instructions, rows, columns) - : configurePlainText(instructions, rows, columns); - if (hyperlinkListener != null && text instanceof JEditorPane ep) { - ep.addHyperlinkListener(hyperlinkListener); + JTextComponent text = builder.instructions.startsWith("<html>") + ? configureHTML(builder.instructions, + builder.rows, + builder.columns) + : configurePlainText(builder.instructions, + builder.rows, + builder.columns); + if (builder.hyperlinkListener != null + && text instanceof JEditorPane ep) { + ep.addHyperlinkListener(builder.hyperlinkListener); } text.setEditable(false); text.setBorder(createTextBorder()); @@ -678,12 +654,12 @@ buttonsPanel.add(btnPass); buttonsPanel.add(btnFail); - if (enableScreenCapture) { + if (builder.screenCapture) { buttonsPanel.add(createCapturePanel()); } - if (addLogArea) { - logArea = new JTextArea(logAreaRows, columns); + if (builder.addLogArea) { + logArea = new JTextArea(builder.logAreaRows, builder.columns); logArea.setEditable(false); logArea.setBorder(createTextBorder()); @@ -1843,7 +1819,6 @@ public PassFailJFrame build() throws InterruptedException, InvocationTargetException { try { - validate(); return new PassFailJFrame(this); } catch (final Throwable t) { // Dispose of all the windows, including those that may not diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Console/DefaultCharsetTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Console/DefaultCharsetTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Console/DefaultCharsetTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Console/DefaultCharsetTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -21,33 +21,66 @@ * questions. */ -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +import java.nio.file.Files; +import java.nio.file.Paths; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +import static jdk.test.lib.Utils.*; /** * @test - * @bug 8341975 8351435 + * @bug 8341975 8351435 8361613 * @summary Tests the default charset. It should honor `stdout.encoding` * which should be the same as System.out.charset() - * @modules jdk.internal.le - * @run junit/othervm -Djdk.console=jdk.internal.le -Dstdout.encoding=UTF-8 DefaultCharsetTest - * @run junit/othervm -Djdk.console=jdk.internal.le -Dstdout.encoding=ISO-8859-1 DefaultCharsetTest - * @run junit/othervm -Djdk.console=jdk.internal.le -Dstdout.encoding=US-ASCII DefaultCharsetTest - * @run junit/othervm -Djdk.console=jdk.internal.le -Dstdout.encoding=foo DefaultCharsetTest - * @run junit/othervm -Djdk.console=jdk.internal.le DefaultCharsetTest + * @requires (os.family == "linux") | (os.family == "mac") + * @library /test/lib + * @build jdk.test.lib.Utils + * jdk.test.lib.JDKToolFinder + * jdk.test.lib.process.ProcessTools + * @run junit DefaultCharsetTest */ public class DefaultCharsetTest { - @Test - public void testDefaultCharset() { + @BeforeAll + static void checkExpectAvailability() { + // check "expect" command availability + var expect = Paths.get("/usr/bin/expect"); + Assumptions.assumeTrue(Files.exists(expect) && Files.isExecutable(expect), + "'" + expect + "' not found. Test ignored."); + } + @ParameterizedTest + @ValueSource(strings = {"UTF-8", "ISO-8859-1", "US-ASCII", "foo", ""}) + void testDefaultCharset(String stdoutEncoding) throws Exception { + // invoking "expect" command + OutputAnalyzer oa = ProcessTools.executeProcess( + "expect", + "-n", + TEST_SRC + "/defaultCharset.exp", + TEST_CLASSES, + TEST_JDK + "/bin/java", + "-Dstdout.encoding=" + stdoutEncoding, + getClass().getName()); + oa.reportDiagnosticSummary(); + oa.shouldHaveExitValue(0); + } + + public static void main(String... args) { var stdoutEncoding = System.getProperty("stdout.encoding"); var sysoutCharset = System.out.charset(); var consoleCharset = System.console().charset(); - System.out.println(""" - stdout.encoding = %s - System.out.charset() = %s - System.console().charset() = %s - """.formatted(stdoutEncoding, sysoutCharset.name(), consoleCharset.name())); - assertEquals(consoleCharset, sysoutCharset, - "Charsets for System.out and Console differ for stdout.encoding: %s".formatted(stdoutEncoding)); + System.out.printf(""" + stdout.encoding = %s + System.out.charset() = %s + System.console().charset() = %s + """, stdoutEncoding, sysoutCharset.name(), consoleCharset.name()); + if (!consoleCharset.equals(sysoutCharset)) { + System.err.printf("Charsets for System.out and Console differ for stdout.encoding: %s%n", stdoutEncoding); + System.exit(-1); + } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Console/LocaleTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Console/LocaleTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Console/LocaleTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Console/LocaleTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -21,28 +21,40 @@ * questions. */ -import java.io.File; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.List; import java.util.Locale; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.function.Predicate; +import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +import static jdk.test.lib.Utils.*; /** * @test - * @bug 8330276 8351435 + * @bug 8330276 8351435 8361613 * @summary Tests Console methods that have Locale as an argument + * @requires (os.family == "linux") | (os.family == "mac") * @library /test/lib - * @modules jdk.internal.le jdk.localedata + * @build jdk.test.lib.Utils + * jdk.test.lib.JDKToolFinder + * jdk.test.lib.process.ProcessTools + * @modules jdk.localedata + * @run junit LocaleTest */ public class LocaleTest { - private static Calendar TODAY = new GregorianCalendar(2024, Calendar.APRIL, 22); - private static String FORMAT = "%1$tY-%1$tB-%1$te %1$tA"; + private static final Calendar TODAY = new GregorianCalendar(2024, Calendar.APRIL, 22); + private static final String FORMAT = "%1$tY-%1$tB-%1$te %1$tA"; // We want to limit the expected strings within US-ASCII charset, as // the native encoding is determined as such, which is used by // the `Process` class under jtreg environment. - private static List<String> EXPECTED = List.of( + private static final List<String> EXPECTED = List.of( String.format(Locale.UK, FORMAT, TODAY), String.format(Locale.FRANCE, FORMAT, TODAY), String.format(Locale.GERMANY, FORMAT, TODAY), @@ -53,56 +65,61 @@ String.format((Locale)null, FORMAT, TODAY) ); + @Test + void testLocale() throws Exception { + // check "expect" command availability + var expect = Paths.get("/usr/bin/expect"); + Assumptions.assumeTrue(Files.exists(expect) && Files.isExecutable(expect), + "'" + expect + "' not found. Test ignored."); + + // invoking "expect" command + OutputAnalyzer oa = ProcessTools.executeProcess( + "expect", + "-n", + TEST_SRC + "/locale.exp", + TEST_CLASSES, + TEST_JDK + "/bin/java", + getClass().getName()); + + var stdout = + oa.stdoutAsLines().stream().filter(Predicate.not(String::isEmpty)).toList(); + var resultText = + """ + Actual output: %s + Expected output: %s + """.formatted(stdout, EXPECTED); + if (!stdout.equals(EXPECTED)) { + throw new RuntimeException("Standard out had unexpected strings:\n" + resultText); + } else { + oa.shouldHaveExitValue(0); + System.out.println("Formatting with explicit Locale succeeded.\n" + resultText); + } + } + public static void main(String... args) throws Throwable { - if (args.length == 0) { - // no arg will launch the child process that actually perform tests - var pb = ProcessTools.createTestJavaProcessBuilder( - "-Djdk.console=jdk.internal.le", - "LocaleTest", "dummy"); - var input = new File(System.getProperty("test.src", "."), "input.txt"); - pb.redirectInput(input); - var oa = ProcessTools.executeProcess(pb); - if (oa.getExitValue() == -1) { - System.out.println("System.console() returns null. Ignoring the test."); - } else { - var output = oa.asLines(); - var resultText = - """ - Actual output: %s - Expected output: %s - """.formatted(output, EXPECTED); - if (!output.equals(EXPECTED)) { - throw new RuntimeException("Standard out had unexpected strings:\n" + resultText); - } else { - oa.shouldHaveExitValue(0); - System.out.println("Formatting with explicit Locale succeeded.\n" + resultText); - } - } + var con = System.console(); + if (con != null) { + // tests these additional methods that take a Locale + con.format(Locale.UK, FORMAT, TODAY); + con.printf("\n"); + con.printf(Locale.FRANCE, FORMAT, TODAY); + con.printf("\n"); + con.readLine(Locale.GERMANY, FORMAT, TODAY); + con.printf("\n"); + con.readPassword(Locale.of("es"), FORMAT, TODAY); + con.printf("\n"); + + // tests null locale + con.format((Locale)null, FORMAT, TODAY); + con.printf("\n"); + con.printf((Locale)null, FORMAT, TODAY); + con.printf("\n"); + con.readLine((Locale)null, FORMAT, TODAY); + con.printf("\n"); + con.readPassword((Locale)null, FORMAT, TODAY); } else { - var con = System.console(); - if (con != null) { - // tests these additional methods that take a Locale - con.format(Locale.UK, FORMAT, TODAY); - con.printf("\n"); - con.printf(Locale.FRANCE, FORMAT, TODAY); - con.printf("\n"); - con.readLine(Locale.GERMANY, FORMAT, TODAY); - con.printf("\n"); - con.readPassword(Locale.of("es"), FORMAT, TODAY); - con.printf("\n"); - - // tests null locale - con.format((Locale)null, FORMAT, TODAY); - con.printf("\n"); - con.printf((Locale)null, FORMAT, TODAY); - con.printf("\n"); - con.readLine((Locale)null, FORMAT, TODAY); - con.printf("\n"); - con.readPassword((Locale)null, FORMAT, TODAY); - } else { - // Exit with -1 - System.exit(-1); - } + // Exit with -1 + System.exit(-1); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Console/ModuleSelectionTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Console/ModuleSelectionTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Console/ModuleSelectionTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Console/ModuleSelectionTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -21,38 +21,88 @@ * questions. */ -/** +/* * @test - * @bug 8295803 8299689 8351435 + * @bug 8295803 8299689 8351435 8361613 8366261 * @summary Tests System.console() returns correct Console (or null) from the expected * module. - * @modules java.base/java.io:+open - * @run main/othervm ModuleSelectionTest java.base - * @run main/othervm -Djdk.console=jdk.internal.le ModuleSelectionTest jdk.internal.le - * @run main/othervm -Djdk.console=java.base ModuleSelectionTest java.base - * @run main/othervm --limit-modules java.base ModuleSelectionTest java.base + * @library /test/lib + * @build jdk.test.lib.Utils + * jdk.test.lib.process.ProcessTools + * @run junit ModuleSelectionTest */ import java.io.Console; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.stream.Stream; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import static jdk.test.lib.Utils.*; public class ModuleSelectionTest { + private static Stream<Arguments> options() { + return Stream.of( + Arguments.of("-Djdk.console=foo", "java.base"), + Arguments.of("-Djdk.console=java.base", "java.base"), + Arguments.of("-Djdk.console=jdk.internal.le", "jdk.internal.le"), + Arguments.of("--limit-modules java.base", "java.base") + ); + } + + @ParameterizedTest + @MethodSource("options") + void testNonTTY(String opts) throws Exception { + opts = opts + + " --add-opens java.base/java.io=ALL-UNNAMED ModuleSelectionTest null"; + OutputAnalyzer output = ProcessTools.executeTestJava(opts.split(" ")); + output.reportDiagnosticSummary(); + output.shouldHaveExitValue(0); + } + + @ParameterizedTest + @MethodSource("options") + void testTTY(String opts, String expected) throws Exception { + // check "expect" command availability + var expect = Paths.get("/usr/bin/expect"); + Assumptions.assumeTrue(Files.exists(expect) && Files.isExecutable(expect), + "'" + expect + "' not found. Test ignored."); + + opts = "expect -n " + TEST_SRC + "/moduleSelection.exp " + + TEST_CLASSES + " " + + expected + " " + + TEST_JDK + "/bin/java" + + " --add-opens java.base/java.io=ALL-UNNAMED " + + opts; + // invoking "expect" command + OutputAnalyzer output = ProcessTools.executeProcess(opts.split(" ")); + output.reportDiagnosticSummary(); + output.shouldHaveExitValue(0); + } + public static void main(String... args) throws Throwable { var con = System.console(); var pc = Class.forName("java.io.ProxyingConsole"); var jdkc = Class.forName("jdk.internal.io.JdkConsole"); - var istty = (boolean)MethodHandles.privateLookupIn(Console.class, MethodHandles.lookup()) - .findStatic(Console.class, "istty", MethodType.methodType(boolean.class)) - .invoke(); + var lookup = MethodHandles.privateLookupIn(Console.class, MethodHandles.lookup()); + var istty = (boolean)lookup.findStatic(Console.class, "isStdinTty", MethodType.methodType(boolean.class)) + .invoke() && + (boolean)lookup.findStatic(Console.class, "isStdoutTty", MethodType.methodType(boolean.class)) + .invoke(); + var impl = con != null ? MethodHandles.privateLookupIn(pc, MethodHandles.lookup()) .findGetter(pc, "delegate", jdkc) .invoke(con) : null; - var expected = switch (args[0]) { - case "java.base" -> istty ? "java.base" : "null"; - default -> args[0]; - }; + var expected = args[0]; var actual = con == null ? "null" : impl.getClass().getModule().getName(); if (!actual.equals(expected)) { @@ -62,7 +112,7 @@ Actual: %s """.formatted(expected, actual)); } else { - System.out.printf("%s is the expected implementation. (tty: %s)\n", impl, istty); + System.out.printf("%s is the expected implementation. (tty: %s)\n", actual, istty); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Console/defaultCharset.exp openjdk-25-25.0.3+9/test/jdk/java/io/Console/defaultCharset.exp --- openjdk-25-25.0.2+10/test/jdk/java/io/Console/defaultCharset.exp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Console/defaultCharset.exp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,32 @@ +# +# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# simply invoking java under expect command +set classpath [lrange $argv 0 0] +set java [lrange $argv 1 1] +set stdoutProp [lrange $argv 2 2] +set clsname [lrange $argv 3 3] +eval spawn $java -classpath $classpath $stdoutProp $clsname +expect eof +set result [wait] +exit [lindex $result 3] diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Console/locale.exp openjdk-25-25.0.3+9/test/jdk/java/io/Console/locale.exp --- openjdk-25-25.0.2+10/test/jdk/java/io/Console/locale.exp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Console/locale.exp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,37 @@ +# +# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# simply invoking java under expect command +set classpath [lrange $argv 0 0] +set java [lrange $argv 1 1] +set clsname [lrange $argv 2 2] +eval spawn -noecho $java -classpath $classpath $clsname + +# sends CR 4 times (readLine x 2, readPassword x 2) +send "\r" +send "\r" +send "\r" +send "\r" +expect eof +set result [wait] +exit [lindex $result 3] diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Console/moduleSelection.exp openjdk-25-25.0.3+9/test/jdk/java/io/Console/moduleSelection.exp --- openjdk-25-25.0.2+10/test/jdk/java/io/Console/moduleSelection.exp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Console/moduleSelection.exp 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,30 @@ +# +# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# simply invoking java under expect command +set classpath [lrange $argv 0 0] +set expected [lrange $argv 1 1] +set java [lrange $argv 2 2] +set opts [lrange $argv 3 end] +eval spawn $java $opts -classpath $classpath ModuleSelectionTest $expected +expect eof diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/File/MaxPath.java openjdk-25-25.0.3+9/test/jdk/java/io/File/MaxPath.java --- openjdk-25-25.0.2+10/test/jdk/java/io/File/MaxPath.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/File/MaxPath.java 2026-04-17 19:08:13.000000000 +0000 @@ -24,21 +24,14 @@ /* @test @bug 6481955 @summary Path length less than MAX_PATH (260) works on Windows - @library /test/lib + @requires (os.family == "windows") */ import java.io.File; import java.io.IOException; -import jtreg.SkippedException; - public class MaxPath { public static void main(String[] args) throws Exception { - String osName = System.getProperty("os.name"); - if (!osName.startsWith("Windows")) { - throw new SkippedException("This test is run only on Windows"); - } - int MAX_PATH = 260; String dir = new File(".").getAbsolutePath() + "\\"; String padding = "1234567890123456789012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890"; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/cloneArray/CloneArray.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/cloneArray/CloneArray.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/cloneArray/CloneArray.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/cloneArray/CloneArray.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ /* @test * @bug 6990094 * @summary Verify ObjectInputStream.cloneArray works on many kinds of arrays - * @author Stuart Marks, Joseph D. Darcy */ import java.io.ByteArrayInputStream; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/AbsentStreamValuesTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/AbsentStreamValuesTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/AbsentStreamValuesTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/AbsentStreamValuesTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Checks that the appropriate default value is given to the canonical ctr - * @run testng AbsentStreamValuesTest + * @run junit AbsentStreamValuesTest */ import java.io.ByteArrayInputStream; @@ -34,16 +34,20 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.io.ObjectStreamConstants.*; import static java.lang.System.out; -import static org.testng.Assert.*; + +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Basic test to check that default primitive / reference values are presented * to the record's canonical constructor, for fields not in the stream. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class AbsentStreamValuesTest { record R01(boolean x) implements Serializable { } @@ -61,7 +65,6 @@ record R13(R12 x) implements Serializable { } record R14(R13[] x) implements Serializable { } - @DataProvider(name = "recordTypeAndExpectedValue") public Object[][] recordTypeAndExpectedValue() { return new Object[][] { new Object[] { R01.class, false }, @@ -81,7 +84,8 @@ }; } - @Test(dataProvider = "recordTypeAndExpectedValue") + @ParameterizedTest + @MethodSource("recordTypeAndExpectedValue") public void testWithDifferentTypes(Class<?> clazz, Object expectedXValue) throws Exception { @@ -92,7 +96,7 @@ Object obj = deserialize(bytes); out.println("deserialized: " + obj); Object actualXValue = clazz.getDeclaredMethod("x").invoke(obj); - assertEquals(actualXValue, expectedXValue); + assertEquals(expectedXValue, actualXValue); } // --- all together @@ -107,18 +111,18 @@ R15 obj = (R15)deserialize(bytes); out.println("deserialized: " + obj); - assertEquals(obj.a, false); - assertEquals(obj.b, 0); - assertEquals(obj.c, 0); - assertEquals(obj.d, '\u0000'); - assertEquals(obj.e, 0); - assertEquals(obj.f, 0l); - assertEquals(obj.g, 0f); - assertEquals(obj.h, 0d); - assertEquals(obj.i, null); - assertEquals(obj.j, null); - assertEquals(obj.k, null); - assertEquals(obj.l, null); + assertEquals(false, obj.a); + assertEquals(0, obj.b); + assertEquals(0, obj.c); + assertEquals('\u0000', obj.d); + assertEquals(0, obj.e); + assertEquals(0l, obj.f); + assertEquals(0f, obj.g); + assertEquals(0d, obj.h); + assertEquals(null, obj.i); + assertEquals(null, obj.j); + assertEquals(null, obj.k); + assertEquals(null, obj.l); } // --- generic type @@ -132,8 +136,8 @@ R16 obj = (R16)deserialize(bytes); out.println("deserialized: " + obj); - assertEquals(obj.t, null); - assertEquals(obj.u, null); + assertEquals(null, obj.t); + assertEquals(null, obj.u); } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,7 @@ * @summary InvalidClassException is thrown when the canonical constructor * cannot be found during deserialization. * @library /test/lib - * @run testng BadCanonicalCtrTest + * @run junit BadCanonicalCtrTest */ import java.io.ByteArrayInputStream; @@ -44,22 +44,25 @@ import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.ByteCodeLoader; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; import static java.lang.classfile.ClassFile.ACC_PUBLIC; import static java.lang.constant.ConstantDescs.CD_Object; import static java.lang.constant.ConstantDescs.CD_void; import static java.lang.constant.ConstantDescs.INIT_NAME; import static java.lang.constant.ConstantDescs.MTD_void; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.expectThrows; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Checks that an InvalidClassException is thrown when the canonical * constructor cannot be found during deserialization. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class BadCanonicalCtrTest { // ClassLoader for creating instances of the records to test with. @@ -76,7 +79,7 @@ * the initial bytecode for the record classes using javac, then removes or * modifies the generated canonical constructor. */ - @BeforeTest + @BeforeAll public void setup() { { byte[] byteCode = InMemoryJavaCompiler.compile("R1", @@ -133,7 +136,6 @@ return c.getConstructor(long.class).newInstance(l); } - @DataProvider(name = "recordInstances") public Object[][] recordInstances() throws Exception { return new Object[][] { new Object[] { newR1() }, @@ -148,13 +150,14 @@ * Tests that InvalidClassException is thrown when no constructor is * present. */ - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void missingConstructorTest(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); byte[] bytes = serialize(objToSerialize); out.println("deserializing"); - InvalidClassException ice = expectThrows(ICE, () -> deserialize(bytes, missingCtrClassLoader)); + InvalidClassException ice = Assertions.assertThrows(ICE, () -> deserialize(bytes, missingCtrClassLoader)); out.println("caught expected ICE: " + ice); assertTrue(ice.getMessage().contains("record canonical constructor not found")); } @@ -164,13 +167,14 @@ * constructor is not present. ( a non-canonical constructor is * present ). */ - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void nonCanonicalConstructorTest(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); byte[] bytes = serialize(objToSerialize); out.println("deserializing"); - InvalidClassException ice = expectThrows(ICE, () -> deserialize(bytes, nonCanonicalCtrClassLoader)); + InvalidClassException ice = Assertions.assertThrows(ICE, () -> deserialize(bytes, nonCanonicalCtrClassLoader)); out.println("caught expected ICE: " + ice); assertTrue(ice.getMessage().contains("record canonical constructor not found")); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/BadValues.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/BadValues.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/BadValues.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/BadValues.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ /* * @test * @summary Basic test for ClassNotFoundException - * @run testng BadValues + * @run junit BadValues */ import java.io.ByteArrayInputStream; @@ -32,10 +32,11 @@ import java.io.DataOutputStream; import java.io.IOException; import java.io.ObjectInputStream; -import org.testng.annotations.Test; import static java.io.ObjectStreamConstants.*; import static java.lang.System.out; -import static org.testng.Assert.*; + +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; /** * Not directly related to records but provokes surrounding code, and ensures @@ -73,7 +74,7 @@ public void testNotFoundSer() throws Exception { out.println("\n---"); byte[] bytes = byteStreamFor("XxYyZz", 0L, (byte)SC_SERIALIZABLE); - Throwable t = expectThrows(CNFE, () -> deserialize(bytes)); + Throwable t = assertThrows(CNFE, () -> deserialize(bytes)); out.println("caught expected CNFE: " + t); } @@ -81,7 +82,7 @@ public void testNotFoundSerWr() throws Exception { out.println("\n---"); byte[] bytes = byteStreamFor("XxYyZz", 0L, (byte)(SC_SERIALIZABLE | SC_WRITE_METHOD)); - Throwable t = expectThrows(CNFE, () -> deserialize(bytes)); + Throwable t = assertThrows(CNFE, () -> deserialize(bytes)); out.println("caught expected CNFE: " + t); } @@ -89,7 +90,7 @@ public void testNotFoundExt() throws Exception { out.println("\n---"); byte[] bytes = byteStreamFor("AaBbCc", 0L, (byte)SC_EXTERNALIZABLE); - Throwable t = expectThrows(CNFE, () -> deserialize(bytes)); + Throwable t = assertThrows(CNFE, () -> deserialize(bytes)); out.println("caught expected CNFE: " + t); } @@ -97,7 +98,7 @@ public void testNotFoundExtWr() throws Exception { out.println("\n---"); byte[] bytes = byteStreamFor("AaBbCc", 0L, (byte)(SC_SERIALIZABLE | SC_WRITE_METHOD)); - Throwable t = expectThrows(CNFE, () -> deserialize(bytes)); + Throwable t = assertThrows(CNFE, () -> deserialize(bytes)); out.println("caught expected CNFE: " + t); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/BasicRecordSer.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/BasicRecordSer.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/BasicRecordSer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/BasicRecordSer.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Basic test that serializes and deserializes a number of records - * @run testng BasicRecordSer + * @run junit BasicRecordSer */ import java.io.ByteArrayInputStream; @@ -39,19 +39,24 @@ import java.io.ObjectOutputStream; import java.io.Serializable; import java.math.BigInteger; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.String.format; import static java.lang.System.out; import static java.net.InetAddress.getLoopbackAddress; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.expectThrows; -import static org.testng.Assert.fail; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Basic test that serializes and deserializes a number of simple records. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class BasicRecordSer { // a mix of a few record and non-record classes @@ -101,7 +106,6 @@ record Wubble (Wobble wobble, Wibble wibble, String s) implements ThrowingExternalizable { } - @DataProvider(name = "serializable") public Object[][] serializable() { Foo foo = new Foo(23); return new Object[][] { @@ -121,14 +125,20 @@ } /** Tests serializing and deserializing a number of records. */ - @Test(dataProvider = "serializable") + @ParameterizedTest + @MethodSource("serializable") public void testSerializable(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); var objDeserialized = serializeDeserialize(objToSerialize); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize, objDeserialized); - assertEquals(objDeserialized, objToSerialize); + if (objToSerialize.getClass().isArray()) { + assertArrayEquals((Object[]) objDeserialized, (Object[]) objToSerialize); + assertArrayEquals((Object[]) objToSerialize, (Object[]) objDeserialized); + } else { + assertEquals(objDeserialized, objToSerialize); + assertEquals(objToSerialize, objDeserialized); + } } /** Tests serializing and deserializing of local records. */ @@ -154,8 +164,8 @@ out.println("serializing : " + objToSerialize); Foo[] objDeserialized = (Foo[])serializeDeserialize(objToSerialize); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize, objDeserialized); - assertEquals(objDeserialized, objToSerialize); + Assertions.assertArrayEquals(objDeserialized, objToSerialize); + Assertions.assertArrayEquals(objToSerialize, objDeserialized); for (Foo f : objDeserialized) assertTrue(objDeserialized[0] == f); @@ -171,8 +181,8 @@ out.println("serializing : " + objToSerialize); Wobble[] objDeserialized = (Wobble[])serializeDeserialize(objToSerialize); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize, objDeserialized); - assertEquals(objDeserialized, objToSerialize); + Assertions.assertArrayEquals(objDeserialized, objToSerialize); + Assertions.assertArrayEquals(objToSerialize, objDeserialized); for (Wobble w : objDeserialized) { assertTrue(objDeserialized[0] == w); @@ -192,7 +202,6 @@ final NotSer notSer = new NotSer(7); } - @DataProvider(name = "notSerializable") public Object[][] notSerializable() { return new Object[][] { new Object[] { new NotSerEmpty() }, @@ -209,11 +218,12 @@ static final Class<NotSerializableException> NSE = NotSerializableException.class; /** Tests that non-Serializable record objects throw NotSerializableException. */ - @Test(dataProvider = "notSerializable") + @ParameterizedTest + @MethodSource("notSerializable") public void testNotSerializable(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); - NotSerializableException expected = expectThrows(NSE, () -> serialize(objToSerialize)); + NotSerializableException expected = Assertions.assertThrows(NSE, () -> serialize(objToSerialize)); out.println("caught expected NSE:" + expected); } @@ -235,9 +245,9 @@ out.println("serializing : " + objToSerialize); var objDeserialized = serializeDeserialize(objToSerialize); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize, objDeserialized); assertEquals(objDeserialized, objToSerialize); - assertEquals(e_ctrInvocationCount, 1); + assertEquals(objToSerialize, objDeserialized); + assertEquals(1, e_ctrInvocationCount); } // --- @@ -258,9 +268,9 @@ var objToSerialize = new G(); g_ctrInvocationCount = 0; // reset out.println("serializing : " + objToSerialize); - NotSerializableException expected = expectThrows(NSE, () -> serialize(objToSerialize)); + NotSerializableException expected = Assertions.assertThrows(NSE, () -> serialize(objToSerialize)); out.println("caught expected NSE:" + expected); - assertEquals(g_ctrInvocationCount, 0); + assertEquals(0, g_ctrInvocationCount); } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ConstructorAccessTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ConstructorAccessTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ConstructorAccessTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ConstructorAccessTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @bug 8246774 * @summary Ensures that the serialization implementation can *always* access * the record constructor - * @run testng ConstructorAccessTest + * @run junit ConstructorAccessTest */ import java.io.ByteArrayInputStream; @@ -38,16 +38,19 @@ import java.io.ObjectOutputStream; import java.io.Externalizable; import java.io.Serializable; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /*implicit*/ record Aux1 (int x) implements Serializable { } /*implicit*/ record Aux2 (int x) implements Serializable { } +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ConstructorAccessTest { public record A (int x) implements Serializable { } @@ -75,7 +78,6 @@ private record H (double d) implements ThrowingExternalizable { } - @DataProvider(name = "recordInstances") public Object[][] recordInstances() { return new Object[][] { new Object[] { new A(34) }, @@ -91,7 +93,8 @@ }; } - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void roundTrip(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/CycleTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/CycleTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/CycleTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/CycleTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Ensures basic behavior of cycles from record components - * @run testng CycleTest + * @run junit CycleTest */ import java.io.ByteArrayInputStream; @@ -34,10 +34,11 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; public class CycleTest { @@ -61,10 +62,10 @@ out.println("serializing : " + r); R deserializedObj = serializeDeserialize(r); out.println("deserialized: " + deserializedObj); - assertEquals(deserializedObj.x(), 1); // sanity - assertEquals(deserializedObj.y(), 2); // sanity + assertEquals(1, deserializedObj.x()); // sanity + assertEquals(2, deserializedObj.y()); // sanity assertTrue(deserializedObj.c() instanceof C); // sanity - assertEquals(deserializedObj.c().obj, null); // cycle, expect null + assertEquals(null, deserializedObj.c().obj); // cycle, expect null } /** @@ -84,8 +85,8 @@ out.println("deserialized: " + deserializedObj); assertTrue(deserializedObj instanceof C); // sanity assertTrue(deserializedObj.obj != null); // expect non-null, r - assertEquals(((R)deserializedObj.obj).x(), 3); // sanity - assertEquals(((R)deserializedObj.obj).y(), 4); // sanity + assertEquals(3, ((R)deserializedObj.obj).x()); // sanity + assertEquals(4, ((R)deserializedObj.obj).y()); // sanity } record R2 (int x, int y, C c1, C c2) implements Serializable { } @@ -105,8 +106,8 @@ out.println("serializing : " + r); R2 deserializedObj = serializeDeserialize(r); out.println("deserialized: " + deserializedObj); - assertEquals(deserializedObj.x(), 5); // sanity - assertEquals(deserializedObj.y(), 6); // sanity + assertEquals(5, deserializedObj.x()); // sanity + assertEquals(6, deserializedObj.y()); // sanity c1 = deserializedObj.c1(); c2 = deserializedObj.c2(); @@ -132,11 +133,11 @@ R3 deserializedObj = serializeDeserialize(r3); out.println("deserialized: " + deserializedObj); assertTrue(deserializedObj.r() != null); - assertEquals(deserializedObj.l(), 9); // sanity - assertEquals(deserializedObj.r().x(), 7); // sanity - assertEquals(deserializedObj.r().y(), 8); // sanity + assertEquals(9, deserializedObj.l()); // sanity + assertEquals(7, deserializedObj.r().x()); // sanity + assertEquals(8, deserializedObj.r().y()); // sanity assertTrue(deserializedObj.r().c() instanceof C); // sanity - assertEquals(deserializedObj.r().c().obj, null); // cycle, expect null + assertEquals(null, deserializedObj.r().c().obj); // cycle, expect null } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/DifferentStreamFieldsTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/DifferentStreamFieldsTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/DifferentStreamFieldsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/DifferentStreamFieldsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @bug 8246774 * @summary Checks that the appropriate value is given to the canonical ctr * @library /test/lib - * @run testng DifferentStreamFieldsTest + * @run junit DifferentStreamFieldsTest */ import java.io.ByteArrayInputStream; @@ -38,14 +38,19 @@ import java.io.ObjectOutputStream; import java.io.Serializable; import jdk.test.lib.serial.SerialObjectBuilder; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Checks that the appropriate value is given to the canonical ctr. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class DifferentStreamFieldsTest { record R01(boolean x) implements Serializable {} @@ -76,7 +81,6 @@ record R14(R13[]x) implements Serializable {} - @DataProvider(name = "recordTypeAndExpectedValue") public Object[][] recordTypeAndExpectedValue() { return new Object[][]{ new Object[]{R01.class, false}, @@ -96,7 +100,8 @@ }; } - @Test(dataProvider = "recordTypeAndExpectedValue") + @ParameterizedTest + @MethodSource("recordTypeAndExpectedValue") public void testWithDifferentTypes(Class<?> clazz, Object expectedXValue) throws Exception { out.println("\n---"); @@ -108,7 +113,7 @@ Object obj = deserialize(bytes); out.println("deserialized: " + obj); Object actualXValue = clazz.getDeclaredMethod("x").invoke(obj); - assertEquals(actualXValue, expectedXValue); + assertEquals(expectedXValue, actualXValue); bytes = SerialObjectBuilder .newBuilder(clazz.getName()) @@ -118,7 +123,7 @@ obj = deserialize(bytes); out.println("deserialized: " + obj); actualXValue = clazz.getDeclaredMethod("x").invoke(obj); - assertEquals(actualXValue, expectedXValue); + assertEquals(expectedXValue, actualXValue); } // --- all together @@ -137,18 +142,18 @@ R15 obj = deserialize(bytes); out.println("deserialized: " + obj); - assertEquals(obj.a, false); - assertEquals(obj.b, 0); - assertEquals(obj.c, 0); - assertEquals(obj.d, '\u0000'); - assertEquals(obj.e, 0); - assertEquals(obj.f, 0l); - assertEquals(obj.g, 0f); - assertEquals(obj.h, 0d); - assertEquals(obj.i, null); - assertEquals(obj.j, null); - assertEquals(obj.k, null); - assertEquals(obj.l, null); + assertEquals(false, obj.a); + assertEquals(0, obj.b); + assertEquals(0, obj.c); + assertEquals('\u0000', obj.d); + assertEquals(0, obj.e); + assertEquals(0l, obj.f); + assertEquals(0f, obj.g); + assertEquals(0d, obj.h); + assertEquals(null, obj.i); + assertEquals(null, obj.j); + assertEquals(null, obj.k); + assertEquals(null, obj.l); } @Test @@ -166,9 +171,9 @@ .build(); var deser1 = deserialize(OOSBytes); - assertEquals(deser1, r); + assertEquals(r, deser1); var deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); } { record R(int x, int y) implements Serializable {} @@ -176,7 +181,7 @@ var r = new R(7, 8); byte[] OOSBytes = serialize(r); var deser1 = deserialize(OOSBytes); - assertEquals(deser1, r); + assertEquals(r, deser1); byte[] builderBytes = SerialObjectBuilder .newBuilder(R.class.getName()) @@ -185,7 +190,7 @@ .build(); var deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); builderBytes = SerialObjectBuilder .newBuilder(R.class.getName()) @@ -193,7 +198,7 @@ .addPrimitiveField("x", int.class, 7) .build(); deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); builderBytes = SerialObjectBuilder .newBuilder(R.class.getName()) @@ -203,12 +208,12 @@ .addPrimitiveField("z", int.class, 9) // additional fields .build(); deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); r = new R(0, 0); OOSBytes = serialize(r); deser1 = deserialize(OOSBytes); - assertEquals(deser1, r); + assertEquals(r, deser1); builderBytes = SerialObjectBuilder .newBuilder(R.class.getName()) @@ -216,13 +221,13 @@ .addPrimitiveField("x", int.class, 0) .build(); deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); builderBytes = SerialObjectBuilder .newBuilder(R.class.getName()) // no field values .build(); deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); } } @@ -234,7 +239,7 @@ var r = new Str("Hello", "World!"); var deser1 = deserialize(serialize(r)); - assertEquals(deser1, r); + assertEquals(r, deser1); byte[] builderBytes = SerialObjectBuilder .newBuilder(Str.class.getName()) @@ -243,7 +248,7 @@ .build(); var deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); builderBytes = SerialObjectBuilder .newBuilder(Str.class.getName()) @@ -254,7 +259,7 @@ .build(); var deser3 = deserialize(builderBytes); - assertEquals(deser3, deser1); + assertEquals(deser1, deser3); } @Test @@ -264,8 +269,8 @@ record IntArray(int[]ints, long[]longs) implements Serializable {} IntArray r = new IntArray(new int[]{5, 4, 3, 2, 1}, new long[]{9L}); IntArray deser1 = deserialize(serialize(r)); - assertEquals(deser1.ints(), r.ints()); - assertEquals(deser1.longs(), r.longs()); + Assertions.assertArrayEquals(r.ints(), deser1.ints()); + Assertions.assertArrayEquals(r.longs(), deser1.longs()); byte[] builderBytes = SerialObjectBuilder .newBuilder(IntArray.class.getName()) @@ -274,14 +279,14 @@ .build(); IntArray deser2 = deserialize(builderBytes); - assertEquals(deser2.ints(), deser1.ints()); - assertEquals(deser2.longs(), deser1.longs()); + Assertions.assertArrayEquals(deser1.ints(), deser2.ints()); + Assertions.assertArrayEquals(deser1.longs(), deser2.longs()); } { record StrArray(String[]stringArray) implements Serializable {} StrArray r = new StrArray(new String[]{"foo", "bar"}); StrArray deser1 = deserialize(serialize(r)); - assertEquals(deser1.stringArray(), r.stringArray()); + Assertions.assertArrayEquals(r.stringArray(), deser1.stringArray()); byte[] builderBytes = SerialObjectBuilder .newBuilder(StrArray.class.getName()) @@ -289,7 +294,7 @@ .build(); StrArray deser2 = deserialize(builderBytes); - assertEquals(deser2.stringArray(), deser1.stringArray()); + Assertions.assertArrayEquals(deser1.stringArray(), deser2.stringArray()); } } @@ -302,7 +307,7 @@ var r = new NumberHolder(123); var deser1 = deserialize(serialize(r)); - assertEquals(deser1, r); + assertEquals(r, deser1); byte[] builderBytes = SerialObjectBuilder .newBuilder(NumberHolder.class.getName()) @@ -310,7 +315,7 @@ .build(); var deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); } { @@ -318,7 +323,7 @@ var r = new IntegerHolder(123); var deser1 = deserialize(serialize(r)); - assertEquals(deser1, r); + assertEquals(r, deser1); byte[] builderBytes = SerialObjectBuilder .newBuilder(IntegerHolder.class.getName()) @@ -326,7 +331,7 @@ .build(); var deser2 = deserialize(builderBytes); - assertEquals(deser2, deser1); + assertEquals(deser1, deser2); } } @@ -338,7 +343,7 @@ var r = new StringHolder("123"); var deser1 = deserialize(serialize(r)); - assertEquals(deser1, r); + assertEquals(r, deser1); byte[] builderBytes = SerialObjectBuilder .newBuilder(StringHolder.class.getName()) @@ -362,7 +367,7 @@ var r = new IntHolder(123); var deser1 = deserialize(serialize(r)); - assertEquals(deser1, r); + assertEquals(r, deser1); byte[] builderBytes = SerialObjectBuilder .newBuilder(IntHolder.class.getName()) diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ProhibitedMethods.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ProhibitedMethods.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ProhibitedMethods.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ProhibitedMethods.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @bug 8246774 * @summary Basic tests for prohibited magic serialization methods * @library /test/lib - * @run testng ProhibitedMethods + * @run junit ProhibitedMethods */ import java.io.ByteArrayInputStream; @@ -49,24 +49,28 @@ import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.ByteCodeLoader; -import org.testng.Assert; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; import static java.lang.classfile.ClassFile.ACC_PRIVATE; +import static java.lang.constant.ConstantDescs.CD_Object; import static java.lang.constant.ConstantDescs.CD_String; import static java.lang.constant.ConstantDescs.CD_void; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.expectThrows; -import static org.testng.Assert.fail; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Checks that the various prohibited Serialization magic methods, and * Externalizable methods, are not invoked ( effectively ignored ) for * record objects. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ProhibitedMethods { public interface ThrowingExternalizable extends Externalizable { @@ -100,7 +104,7 @@ * fail("readObjectNoData should not be invoked"); } * } */ - @BeforeTest + @BeforeAll public void setup() { { byte[] byteCode = InMemoryJavaCompiler.compile("Foo", @@ -165,7 +169,6 @@ } } - @DataProvider(name = "recordInstances") public Object[][] recordInstances() { return new Object[][] { new Object[] { newFoo() }, @@ -177,7 +180,8 @@ }; } - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void roundTrip(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); @@ -245,8 +249,8 @@ return cf.transformClass(cf.parse(classBytes), ClassTransform.endHandler(clb -> { clb.withMethodBody(name, desc, ACC_PRIVATE, cob -> { cob.loadConstant(name + " should not be invoked"); - cob.invokestatic(Assert.class.describeConstable().orElseThrow(), "fail", - MethodTypeDesc.of(CD_void, CD_String)); + cob.invokestatic(Assertions.class.describeConstable().orElseThrow(), "fail", + MethodTypeDesc.of(CD_Object, CD_String)); cob.return_(); }); })); @@ -266,37 +270,37 @@ Method m = obj.getClass().getDeclaredMethod("writeObject", ObjectOutputStream.class); assertTrue((m.getModifiers() & Modifier.PRIVATE) != 0); m.setAccessible(true); - ReflectiveOperationException t = expectThrows(ROE, () -> + ReflectiveOperationException t = Assertions.assertThrows(ROE, () -> m.invoke(obj, new ObjectOutputStream(OutputStream.nullOutputStream()))); Throwable assertionError = t.getCause(); out.println("caught expected AssertionError: " + assertionError); assertTrue(assertionError instanceof AssertionError, "Expected AssertionError, got:" + assertionError); - assertEquals(assertionError.getMessage(), "writeObject should not be invoked"); + assertEquals("writeObject should not be invoked", assertionError.getMessage()); } { // readObject Method m = obj.getClass().getDeclaredMethod("readObject", ObjectInputStream.class); assertTrue((m.getModifiers() & Modifier.PRIVATE) != 0); m.setAccessible(true); - ReflectiveOperationException t = expectThrows(ROE, () -> + ReflectiveOperationException t = Assertions.assertThrows(ROE, () -> m.invoke(obj, new ObjectInputStream() { })); Throwable assertionError = t.getCause(); out.println("caught expected AssertionError: " + assertionError); assertTrue(assertionError instanceof AssertionError, "Expected AssertionError, got:" + assertionError); - assertEquals(assertionError.getMessage(), "readObject should not be invoked"); + assertEquals("readObject should not be invoked", assertionError.getMessage()); } { // readObjectNoData Method m = obj.getClass().getDeclaredMethod("readObjectNoData"); assertTrue((m.getModifiers() & Modifier.PRIVATE) != 0); m.setAccessible(true); - ReflectiveOperationException t = expectThrows(ROE, () -> m.invoke(obj)); + ReflectiveOperationException t = Assertions.assertThrows(ROE, () -> m.invoke(obj)); Throwable assertionError = t.getCause(); out.println("caught expected AssertionError: " + assertionError); assertTrue(assertionError instanceof AssertionError, "Expected AssertionError, got:" + assertionError); - assertEquals(assertionError.getMessage(), "readObjectNoData should not be invoked"); + assertEquals("readObjectNoData should not be invoked", assertionError.getMessage()); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ReadResolveTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ReadResolveTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ReadResolveTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ReadResolveTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Basic tests for readResolve - * @run testng ReadResolveTest + * @run junit ReadResolveTest */ import java.io.ByteArrayInputStream; @@ -35,15 +35,19 @@ import java.io.ObjectOutputStream; import java.io.Serial; import java.io.Serializable; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.String.format; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Tests records being used as a serial proxy. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ReadResolveTest { static class C1 implements Serializable { @@ -94,7 +98,6 @@ } } - @DataProvider(name = "objectsToSerialize") public Object[][] objectsToSerialize() { return new Object[][] { new Object[] { new C1(3,4) }, @@ -103,13 +106,14 @@ }; } - @Test(dataProvider = "objectsToSerialize") + @ParameterizedTest + @MethodSource("objectsToSerialize") public void testSerialize(Object objectToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objectToSerialize); Object deserializedObj = serializeDeserialize(objectToSerialize); out.println("deserialized: " + deserializedObj); - assertEquals(deserializedObj, objectToSerialize); + assertEquals(objectToSerialize, deserializedObj); } // -- null replacement @@ -128,7 +132,7 @@ out.println("serializing : " + objectToSerialize); Object deserializedObj = serializeDeserialize(objectToSerialize); out.println("deserialized: " + deserializedObj); - assertEquals(deserializedObj, null); + assertEquals(null, deserializedObj); } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/RecordClassTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/RecordClassTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/RecordClassTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/RecordClassTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Basic tests for serializing and deserializing record classes - * @run testng RecordClassTest + * @run junit RecordClassTest */ import java.io.ByteArrayInputStream; @@ -38,15 +38,18 @@ import java.io.ObjectOutputStream; import java.io.ObjectStreamClass; import java.io.Serializable; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Serializes and deserializes record classes. Ensures that the SUID is 0. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class RecordClassTest { record Foo () implements Serializable { } @@ -74,7 +77,6 @@ record Wubble (Wobble wobble, Wibble wibble, String s) implements ThrowingExternalizable { } - @DataProvider(name = "recordClasses") public Object[][] recordClasses() { return new Object[][] { new Object[] { Foo.class , 0L }, @@ -87,7 +89,8 @@ } /** Tests that the serialized and deserialized instances are equal. */ - @Test(dataProvider = "recordClasses") + @ParameterizedTest + @MethodSource("recordClasses") public void testClassSerialization(Class<?> recordClass, long unused) throws Exception { @@ -95,21 +98,22 @@ out.println("serializing : " + recordClass); var deserializedClass = serializeDeserialize(recordClass); out.println("deserialized: " + deserializedClass); - assertEquals(recordClass, deserializedClass); assertEquals(deserializedClass, recordClass); + assertEquals(recordClass, deserializedClass); } /** Tests that the SUID is always 0 unless explicitly declared. */ - @Test(dataProvider = "recordClasses") + @ParameterizedTest + @MethodSource("recordClasses") public void testSerialVersionUID(Class<?> recordClass, long expectedUID) { out.println("\n---"); ObjectStreamClass osc = ObjectStreamClass.lookup(recordClass); out.println("ObjectStreamClass::lookup : " + osc); - assertEquals(osc.getSerialVersionUID(), expectedUID); + assertEquals(expectedUID, osc.getSerialVersionUID()); osc = ObjectStreamClass.lookupAny(recordClass); out.println("ObjectStreamClass::lookupAny: " + osc); - assertEquals(osc.getSerialVersionUID(), expectedUID); + assertEquals(expectedUID, osc.getSerialVersionUID()); } // --- not Serializable @@ -120,7 +124,6 @@ record NotSerializable3<T>(T t) { } - @DataProvider(name = "notSerRecordClasses") public Object[][] notSerRecordClasses() { return new Object[][] { new Object[] { NotSerializable1.class }, @@ -130,16 +133,17 @@ } /** Tests that the generated SUID is always 0 for all non-Serializable record classes. */ - @Test(dataProvider = "notSerRecordClasses") + @ParameterizedTest + @MethodSource("notSerRecordClasses") public void testSerialVersionUIDNonSer(Class<?> recordClass) { out.println("\n---"); ObjectStreamClass osc = ObjectStreamClass.lookup(recordClass); out.println("ObjectStreamClass::lookup : " + osc); - assertEquals(osc, null); + assertEquals(null, osc); osc = ObjectStreamClass.lookupAny(recordClass); out.println("ObjectStreamClass::lookupAny: " + osc); - assertEquals(osc.getSerialVersionUID(), 0L); + assertEquals(0L, osc.getSerialVersionUID()); } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @bug 8246774 * @summary Basic tests for prohibited magic serialPersistentFields * @library /test/lib - * @run testng SerialPersistentFieldsTest + * @run junit SerialPersistentFieldsTest */ import java.io.ByteArrayInputStream; @@ -52,9 +52,6 @@ import jdk.test.lib.ByteCodeLoader; import jdk.test.lib.compiler.InMemoryJavaCompiler; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; import static java.lang.classfile.ClassFile.ACC_FINAL; import static java.lang.classfile.ClassFile.ACC_PRIVATE; @@ -65,12 +62,18 @@ import static java.lang.constant.ConstantDescs.CLASS_INIT_NAME; import static java.lang.constant.ConstantDescs.INIT_NAME; import static java.lang.constant.ConstantDescs.MTD_void; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Checks that the serialPersistentFields declaration is effectively ignored. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SerialPersistentFieldsTest { ClassLoader serializableRecordLoader; @@ -88,7 +91,7 @@ * }; * } */ - @BeforeTest + @BeforeAll public void setup() { { // R1 byte[] byteCode = InMemoryJavaCompiler.compile("R1", @@ -174,7 +177,6 @@ return newRecord("R5", new Class[]{int.class}, new Object[]{x}); } - @DataProvider(name = "recordInstances") public Object[][] recordInstances() { return new Object[][] { new Object[] { newR1() }, @@ -185,14 +187,15 @@ }; } - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void roundTrip(Object objToSerialize) throws Exception { out.println("\n---"); out.println("serializing : " + objToSerialize); var objDeserialized = serializeDeserialize(objToSerialize); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize, objDeserialized); assertEquals(objDeserialized, objToSerialize); + assertEquals(objToSerialize, objDeserialized); } <T> byte[] serialize(T obj) throws IOException { @@ -290,7 +293,8 @@ // -- infra sanity -- /** Checks to ensure correct operation of the test's generation logic. */ - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void wellFormedGeneratedClasses(Object obj) throws Exception { out.println("\n---"); out.println(obj); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/SerialVersionUIDTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/SerialVersionUIDTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/SerialVersionUIDTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/SerialVersionUIDTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Basic tests for SUID in the serial stream - * @run testng SerialVersionUIDTest + * @run junit SerialVersionUIDTest */ import java.io.ByteArrayInputStream; @@ -39,13 +39,16 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.LongStream; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.io.ObjectStreamConstants.*; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SerialVersionUIDTest { record R1 () implements Serializable { @@ -64,7 +67,6 @@ private static final long serialVersionUID = 5678L; } - @DataProvider(name = "recordObjects") public Object[][] recordObjects() { return new Object[][] { new Object[] { new R1(), 1L }, @@ -78,7 +80,8 @@ /** * Tests that a declared SUID for a record class is inserted into the stream. */ - @Test(dataProvider = "recordObjects") + @ParameterizedTest + @MethodSource("recordObjects") public void testSerialize(Object objectToSerialize, long expectedUID) throws Exception { @@ -90,17 +93,16 @@ DataInputStream dis = new DataInputStream(bais); // sanity - assertEquals(dis.readShort(), STREAM_MAGIC); - assertEquals(dis.readShort(), STREAM_VERSION); - assertEquals(dis.readByte(), TC_OBJECT); - assertEquals(dis.readByte(), TC_CLASSDESC); - assertEquals(dis.readUTF(), objectToSerialize.getClass().getName()); + assertEquals(STREAM_MAGIC, dis.readShort()); + assertEquals(STREAM_VERSION, dis.readShort()); + assertEquals(TC_OBJECT, dis.readByte()); + assertEquals(TC_CLASSDESC, dis.readByte()); + assertEquals(objectToSerialize.getClass().getName(), dis.readUTF()); // verify that the UID is as expected - assertEquals(dis.readLong(), expectedUID); + assertEquals(expectedUID, dis.readLong()); } - @DataProvider(name = "recordClasses") public Object[][] recordClasses() { List<Object[]> list = new ArrayList<>(); List<Class<?>> recordClasses = List.of(R1.class, R2.class, R3.class, R4.class, R5.class); @@ -115,14 +117,15 @@ * Tests that matching of the serialVersionUID values ( stream value * and runtime class value ) is waived for record classes. */ - @Test(dataProvider = "recordClasses") + @ParameterizedTest + @MethodSource("recordClasses") public void testSerializeFromClass(Class<? extends Record> cl, long suid) throws Exception { out.println("\n---"); byte[] bytes = byteStreamFor(cl.getName(), suid); Object obj = deserialize(bytes); - assertEquals(obj.getClass(), cl); + assertEquals(cl, obj.getClass()); assertTrue(obj.getClass().isRecord()); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/StreamRefTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/StreamRefTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/StreamRefTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/StreamRefTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Tests for stream references - * @run testng StreamRefTest + * @run junit StreamRefTest */ import java.io.ByteArrayInputStream; @@ -36,11 +36,12 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.expectThrows; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; /** * Tests for stream references. @@ -123,14 +124,14 @@ updateIntValue(3, -3, bytes, 40); var byteStream = new ObjectInputStream(new ByteArrayInputStream(bytes)); - InvalidObjectException ioe = expectThrows(IOE, () -> deserializeOne(byteStream)); + InvalidObjectException ioe = Assertions.assertThrows(IOE, () -> deserializeOne(byteStream)); out.println("caught expected IOE: " + ioe); Throwable t = ioe.getCause(); assertTrue(t instanceof IllegalArgumentException, "Expected IAE, got:" + t); out.println("expected cause IAE: " + t); B b1 = (B)deserializeOne(byteStream); - assertEquals(b1.a, null); + assertEquals(null, b1.a); } @Test @@ -144,14 +145,14 @@ updateIntValue(3, -3, bytes, 96); var byteStream = new ObjectInputStream(new ByteArrayInputStream(bytes)); - InvalidObjectException ioe = expectThrows(IOE, () -> deserializeOne(byteStream)); + InvalidObjectException ioe = Assertions.assertThrows(IOE, () -> deserializeOne(byteStream)); out.println("caught expected IOE: " + ioe); Throwable t = ioe.getCause(); assertTrue(t instanceof IllegalArgumentException, "Expected IAE, got:" + t); out.println("expected cause IAE: " + t); A a1 = (A)deserializeOne(byteStream); - assertEquals(a1, null); + assertEquals(null, a1); } // --- @@ -211,7 +212,7 @@ throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes, offset, 4); DataInputStream dis = new DataInputStream(bais); - assertEquals(dis.readInt(), expectedValue); + assertEquals(expectedValue, dis.readInt()); } static void updateIntValue(int expectedValue, int newValue, byte[] bytes, int offset) diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ThrowingConstructorTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ThrowingConstructorTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/ThrowingConstructorTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/ThrowingConstructorTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Tests constructor invocation exceptions are handled appropriately - * @run testng ThrowingConstructorTest + * @run junit ThrowingConstructorTest */ import java.io.ByteArrayInputStream; @@ -35,17 +35,20 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.expectThrows; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * If the constructor invocation throws an exception, an * `InvalidObjectException` is thrown with that exception as its cause. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ThrowingConstructorTest { /** "big switch" that can be used to allow/disallow record construction @@ -84,7 +87,6 @@ static final Class<InvalidObjectException> IOE = InvalidObjectException.class; - @DataProvider(name = "exceptionInstances") public Object[][] exceptionInstances() { Object[][] objs = new Object[][] { new Object[] { new R1(), NullPointerException.class, "thrown from R1" }, @@ -98,7 +100,8 @@ return objs; } - @Test(dataProvider = "exceptionInstances") + @ParameterizedTest + @MethodSource("exceptionInstances") public void testExceptions(Object objectToSerialize, Class<? extends Throwable> expectedExType, String expectedExMessage) @@ -107,13 +110,13 @@ out.println("\n---"); out.println("serializing: " + objectToSerialize); byte[] bytes = serialize(objectToSerialize); - InvalidObjectException ioe = expectThrows(IOE, () -> deserialize(bytes)); + InvalidObjectException ioe = Assertions.assertThrows(IOE, () -> deserialize(bytes)); out.println("caught expected IOE: " + ioe); Throwable t = ioe.getCause(); assertTrue(t.getClass().equals(expectedExType), "Expected:" + expectedExType + ", got:" + t); out.println("expected cause " + expectedExType +" : " + t); - assertEquals(t.getMessage(), expectedExMessage); + assertEquals(expectedExMessage, t.getMessage()); } // -- errors ( pass through unwrapped ) @@ -143,7 +146,6 @@ } } - @DataProvider(name = "errorInstances") public Object[][] errorInstances() { Object[][] objs = new Object[][] { new Object[] { new R4(), OutOfMemoryError.class, "thrown from R4" }, @@ -157,7 +159,8 @@ return objs; } - @Test(dataProvider = "errorInstances") + @ParameterizedTest + @MethodSource("errorInstances") public void testErrors(Object objectToSerialize, Class<? extends Throwable> expectedExType, String expectedExMessage) @@ -166,11 +169,11 @@ out.println("\n---"); out.println("serializing: " + objectToSerialize); byte[] bytes = serialize(objectToSerialize); - Throwable t = expectThrows(expectedExType, () -> deserialize(bytes)); + Throwable t = Assertions.assertThrows(expectedExType, () -> deserialize(bytes)); assertTrue(t.getClass().equals(expectedExType), "Expected:" + expectedExType + ", got:" + t); out.println("caught expected " + expectedExType +" : " + t); - assertEquals(t.getMessage(), expectedExMessage); + assertEquals(expectedExMessage, t.getMessage()); } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/UnsharedTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/UnsharedTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/UnsharedTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/UnsharedTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8238763 8246774 * @summary ObjectInputStream readUnshared method handling of Records - * @run testng UnsharedTest + * @run junit UnsharedTest */ import java.io.ByteArrayInputStream; @@ -35,10 +35,11 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.expectThrows; +import org.junit.jupiter.api.Assertions; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; /** * Tests OOS::writeUnshared and OIS::readUnshared to verify that records @@ -56,16 +57,16 @@ { // shared - sanity to ensure the second foo is a ref var byteStream = serialize(foo, foo); var foo1 = (Foo) deserializeOne(byteStream); - assertEquals(foo1.x, foo.x); + assertEquals(foo.x, foo1.x); var foo2 = (Foo) deserializeOne(byteStream); - assertEquals(foo2.x, foo.x); + assertEquals(foo.x, foo2.x); assertTrue(foo2 == foo1); } { // unshared var byteStream = serialize(foo, foo); var foo1 = (Foo) deserializeOneUnshared(byteStream); - assertEquals(foo1.x, foo.x); - var expected = expectThrows(IOE, () -> deserializeOne(byteStream)); + assertEquals(foo.x, foo1.x); + var expected = Assertions.assertThrows(IOE, () -> deserializeOne(byteStream)); assertTrue(expected.getMessage().contains("cannot read back reference to unshared object")); } } @@ -76,17 +77,17 @@ { // shared - sanity to ensure the second foo is NOT a ref var byteStream = serializeUnshared(foo, foo); var foo1 = (Foo) deserializeOne(byteStream); - assertEquals(foo1.x, foo.x); + assertEquals(foo.x, foo1.x); var foo2 = (Foo) deserializeOne(byteStream); - assertEquals(foo2.x, foo.x); + assertEquals(foo.x, foo2.x); assertTrue(foo2 != foo1); } { // unshared var byteStream = serializeUnshared(foo, foo); var foo1 = (Foo) deserializeOneUnshared(byteStream); - assertEquals(foo1.x, foo.x); + assertEquals(foo.x, foo1.x); var foo2 = (Foo) deserializeOneUnshared(byteStream); - assertEquals(foo2.x, foo.x); + assertEquals(foo.x, foo2.x); assertTrue(foo2 != foo1); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/WriteReplaceTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/WriteReplaceTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/WriteReplaceTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/WriteReplaceTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8246774 * @summary Basic tests for writeReplace - * @run testng WriteReplaceTest + * @run junit WriteReplaceTest */ import java.io.ByteArrayInputStream; @@ -34,11 +34,15 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class WriteReplaceTest { record R1 () implements Serializable { @@ -71,7 +75,6 @@ } } - @DataProvider(name = "recordObjects") public Object[][] recordObjects() { return new Object[][] { new Object[] { new R1(), R1.class }, @@ -81,7 +84,8 @@ }; } - @Test(dataProvider = "recordObjects") + @ParameterizedTest + @MethodSource("recordObjects") public void testSerialize(Object objectToSerialize, Class<?> expectedType) throws Exception { @@ -90,9 +94,9 @@ Object deserializedObj = serializeDeserialize(objectToSerialize); out.println("deserialized: " + deserializedObj); if (objectToSerialize.getClass().equals(expectedType)) - assertEquals(deserializedObj, objectToSerialize); + assertEquals(objectToSerialize, deserializedObj); else - assertEquals(deserializedObj.getClass(), expectedType); + assertEquals(expectedType, deserializedObj.getClass()); } // -- null replacement @@ -108,7 +112,7 @@ out.println("serializing : " + objectToSerialize); Object deserializedObj = serializeDeserialize(objectToSerialize); out.println("deserialized: " + deserializedObj); - assertEquals(deserializedObj, null); + assertEquals(null, deserializedObj); } // --- infra diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/AbstractTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/AbstractTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/AbstractTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/AbstractTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 +34,9 @@ import java.net.URLClassLoader; import java.nio.file.Path; import jdk.test.lib.compiler.CompilerUtils; -import org.testng.annotations.BeforeTest; -import static org.testng.Assert.*; + +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; /** * An abstract superclass for tests that require to serialize and deserialize @@ -54,7 +55,7 @@ static final Path RECORD_SRC_DIR = Path.of(TEST_SRC, "record"); static final Path RECORD_DEST_DIR = Path.of("record"); - @BeforeTest + @BeforeAll public void setup() throws IOException { assertTrue(CompilerUtils.compile(PLAIN_SRC_DIR, PLAIN_DEST_DIR, "--class-path", TEST_CLASSES_DIR.toString())); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/AssignableFromTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/AssignableFromTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/AssignableFromTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/AssignableFromTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,24 +29,26 @@ * @modules jdk.compiler * @compile AssignableFrom.java Point.java * DefaultValues.java SuperStreamFields.java - * @run testng AssignableFromTest + * @run junit AssignableFromTest */ import java.math.BigDecimal; import java.math.BigInteger; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Basic test to check that stream field values that are not the exact * declared param/field type, but assignable to a declared supertype, * are bound/assigned correctly. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class AssignableFromTest extends AbstractTest { - @DataProvider(name = "plainInstances") public Object[][] plainInstances() { return new Object[][] { new Object[] { newPlainAssignableFrom(Byte.valueOf((byte)11)) }, @@ -59,7 +61,8 @@ } /** Serialize non-record (plain) instances, deserialize as a record. */ - @Test(dataProvider = "plainInstances") + @ParameterizedTest + @MethodSource("plainInstances") public void testPlainToRecord(AssignableFrom objToSerialize) throws Exception { assert !objToSerialize.getClass().isRecord(); out.println("serialize : " + objToSerialize); @@ -68,13 +71,12 @@ assert objDeserialized.getClass().isRecord(); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize.number(), objDeserialized.number()); assertEquals(objDeserialized.number(), objToSerialize.number()); + assertEquals(objToSerialize.number(), objDeserialized.number()); assertEquals(objDeserialized.number().getClass(), objDeserialized.number().getClass()); } - @DataProvider(name = "recordInstances") public Object[][] recordInstances() { return new Object[][] { new Object[] { newRecordAssignableFrom(Byte.valueOf((byte)21)) }, @@ -87,7 +89,8 @@ } /** Serialize record instances, deserialize as non-record (plain). */ - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void testRecordToPlain(AssignableFrom objToSerialize) throws Exception { assert objToSerialize.getClass().isRecord(); out.println("serialize : " + objToSerialize); @@ -96,8 +99,8 @@ assert !objDeserialized.getClass().isRecord(); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize.number(), objDeserialized.number()); assertEquals(objDeserialized.number(), objToSerialize.number()); + assertEquals(objToSerialize.number(), objDeserialized.number()); assertEquals(objDeserialized.number().getClass(), objDeserialized.number().getClass()); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/DefaultValuesTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/DefaultValuesTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/DefaultValuesTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/DefaultValuesTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,21 +28,24 @@ * @library /test/lib * @modules jdk.compiler * @compile AssignableFrom.java Point.java DefaultValues.java SuperStreamFields.java - * @run testng DefaultValuesTest + * @run junit DefaultValuesTest */ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; -import org.testng.annotations.Test; import static java.io.ObjectStreamConstants.*; import static java.lang.System.out; -import static org.testng.Assert.*; + +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; /** * Basic test to check that default primitive / reference values are * presented to the record's canonical constructor, for fields not in * the stream. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class DefaultValuesTest extends AbstractTest { /** @@ -77,13 +80,13 @@ Point point = deserializeAsPlain(bytes); out.println("deserialized: " + point); - assertEquals(point.x(), 0); - assertEquals(point.y(), 0); + assertEquals(0, point.x()); + assertEquals(0, point.y()); point = deserializeAsRecord(bytes); out.println("deserialized: " + point); - assertEquals(point.x(), 0); - assertEquals(point.y(), 0); + assertEquals(0, point.x()); + assertEquals(0, point.y()); } // --- @@ -115,8 +118,8 @@ DefaultValues o1 = deserializeAsRecord(bytes); out.println("deserialized: " + o1); - assertEquals(o1.point().x(), point.x()); // sanity - assertEquals(o1.point().y(), point.y()); // sanity + assertEquals(point.x(), o1.point().x()); // sanity + assertEquals(point.y(), o1.point().y()); // sanity assertTrue(o1.bool() == Defaults.bool); assertTrue(o1.by() == Defaults.by); assertTrue(o1.ch() == Defaults.ch); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/SuperStreamFieldsTest.java openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/SuperStreamFieldsTest.java --- openjdk-25-25.0.2+10/test/jdk/java/io/Serializable/records/migration/SuperStreamFieldsTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/io/Serializable/records/migration/SuperStreamFieldsTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,20 +28,23 @@ * @library /test/lib * @modules jdk.compiler * @compile AssignableFrom.java Point.java DefaultValues.java SuperStreamFields.java - * @run testng SuperStreamFieldsTest + * @run junit SuperStreamFieldsTest */ -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.lang.System.out; -import static org.testng.Assert.assertEquals; + +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Tests that superclass fields in the stream are discarded. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SuperStreamFieldsTest extends AbstractTest { - @DataProvider(name = "plainInstances") public Object[][] plainInstances() { return new Object[][] { new Object[] { newPlainSuperStreamFields("cat", new int[] { 1 }, 1) }, @@ -51,7 +54,8 @@ } /** Serializes non-record (plain) instance, deserializes as a record. */ - @Test(dataProvider = "plainInstances") + @ParameterizedTest + @MethodSource("plainInstances") public void testPlainToRecord(SuperStreamFields objToSerialize) throws Exception { assert !objToSerialize.getClass().isRecord(); out.println("serialize : " + objToSerialize); @@ -60,12 +64,11 @@ assert objDeserialized.getClass().isRecord(); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize.str(), objDeserialized.str()); - assertEquals(objToSerialize.x(), objDeserialized.x()); - assertEquals(objToSerialize.y(), objDeserialized.y()); + assertEquals(objDeserialized.str(), objToSerialize.str()); + Assertions.assertArrayEquals(objDeserialized.x(), objToSerialize.x()); + assertEquals(objDeserialized.y(), objToSerialize.y()); } - @DataProvider(name = "recordInstances") public Object[][] recordInstances() { return new Object[][] { new Object[] { newRecordSuperStreamFields("goat", new int[] { 56 }, 66) }, @@ -75,7 +78,8 @@ } /** Serializes record instance, deserializes as non-record (plain). */ - @Test(dataProvider = "recordInstances") + @ParameterizedTest + @MethodSource("recordInstances") public void testRecordToPlain(SuperStreamFields objToSerialize) throws Exception { assert objToSerialize.getClass().isRecord(); out.println("serialize : " + objToSerialize); @@ -84,9 +88,9 @@ assert !objDeserialized.getClass().isRecord(); out.println("deserialized: " + objDeserialized); - assertEquals(objToSerialize.str(), objDeserialized.str()); - assertEquals(objToSerialize.x(), objDeserialized.x()); - assertEquals(objToSerialize.y(), objDeserialized.y()); + assertEquals(objDeserialized.str(), objToSerialize.str()); + Assertions.assertArrayEquals(objDeserialized.x(), objToSerialize.x()); + assertEquals(objDeserialized.y(), objToSerialize.y()); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Byte/Decode.java openjdk-25-25.0.3+9/test/jdk/java/lang/Byte/Decode.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Byte/Decode.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Byte/Decode.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @test * @bug 4242173 5017980 6576055 * @summary Test Byte.decode method - * @author madbot - * @author Joseph D. Darcy */ /** diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Class/IsAnnotationType.java openjdk-25-25.0.3+9/test/jdk/java/lang/Class/IsAnnotationType.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Class/IsAnnotationType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Class/IsAnnotationType.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4891872 4988155 * @summary Check isAnnotation() method - * @author Joseph D. Darcy */ import java.lang.annotation.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Class/IsEnum.java openjdk-25-25.0.3+9/test/jdk/java/lang/Class/IsEnum.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Class/IsEnum.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Class/IsEnum.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4891872 4989735 4990789 5020490 * @summary Check isEnum() method - * @author Joseph D. Darcy */ import java.lang.annotation.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Class/IsSynthetic.java openjdk-25-25.0.3+9/test/jdk/java/lang/Class/IsSynthetic.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Class/IsSynthetic.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Class/IsSynthetic.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5012133 * @summary Check Class.isSynthetic method - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Class/getEnclosingConstructor/EnclosingConstructorTests.java openjdk-25-25.0.3+9/test/jdk/java/lang/Class/getEnclosingConstructor/EnclosingConstructorTests.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Class/getEnclosingConstructor/EnclosingConstructorTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Class/getEnclosingConstructor/EnclosingConstructorTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4962341 6832557 * @summary Check getEnclosingMethod method - * @author Joseph D. Darcy */ import java.lang.reflect.Constructor; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Class/getEnclosingMethod/EnclosingMethodTests.java openjdk-25-25.0.3+9/test/jdk/java/lang/Class/getEnclosingMethod/EnclosingMethodTests.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Class/getEnclosingMethod/EnclosingMethodTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Class/getEnclosingMethod/EnclosingMethodTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4962341 * @summary Check getEnclosingMethod method - * @author Joseph D. Darcy */ import java.lang.reflect.Method; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Double/BitwiseConversion.java openjdk-25-25.0.3+9/test/jdk/java/lang/Double/BitwiseConversion.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Double/BitwiseConversion.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Double/BitwiseConversion.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,6 @@ * @library ../Math * @build DoubleConsts * @run main BitwiseConversion - * @author Joseph D. Darcy */ import static java.lang.Double.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Double/Constants.java openjdk-25-25.0.3+9/test/jdk/java/lang/Double/Constants.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Double/Constants.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Double/Constants.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @compile Constants.java * @bug 4397405 4826652 * @summary Testing constant-ness of Double.{MIN_VALUE, MAX_VALUE}, etc. - * @author Joseph D. Darcy */ public class Constants { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Double/Extrema.java openjdk-25-25.0.3+9/test/jdk/java/lang/Double/Extrema.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Double/Extrema.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Double/Extrema.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4408489 4826652 * @summary Testing values of Double.{MIN_VALUE, MIN_NORMAL, MAX_VALUE} - * @author Joseph D. Darcy */ public class Extrema { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Double/NaNInfinityParsing.java openjdk-25-25.0.3+9/test/jdk/java/lang/Double/NaNInfinityParsing.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Double/NaNInfinityParsing.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Double/NaNInfinityParsing.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4428772 * @summary Testing recognition of "NaN" and "Infinity" strings - * @author Joseph D. Darcy */ diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Double/ParseHexFloatingPoint.java openjdk-25-25.0.3+9/test/jdk/java/lang/Double/ParseHexFloatingPoint.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Double/ParseHexFloatingPoint.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Double/ParseHexFloatingPoint.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,6 @@ * @run main ParseHexFloatingPoint * @bug 4826774 8078672 * @summary Numerical tests for hexadecimal inputs to parse{Double, Float} (use -Dseed=X to set PRNG seed) - * @author Joseph D. Darcy * @key randomness */ diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Double/ToHexString.java openjdk-25-25.0.3+9/test/jdk/java/lang/Double/ToHexString.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Double/ToHexString.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Double/ToHexString.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,6 @@ * @library ../Math * @build DoubleConsts * @run main ToHexString - * @author Joseph D. Darcy */ import java.util.regex.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Float/BitwiseConversion.java openjdk-25-25.0.3+9/test/jdk/java/lang/Float/BitwiseConversion.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Float/BitwiseConversion.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Float/BitwiseConversion.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,6 @@ * @library ../Math * @build FloatConsts * @run main BitwiseConversion - * @author Joseph D. Darcy */ import static java.lang.Float.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Float/Constants.java openjdk-25-25.0.3+9/test/jdk/java/lang/Float/Constants.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Float/Constants.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Float/Constants.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @compile Constants.java * @bug 4397405 4826652 * @summary Testing constant-ness of Float.{MIN_VALUE, MAX_VALUE}, etc. - * @author Joseph D. Darcy */ public class Constants { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Float/Extrema.java openjdk-25-25.0.3+9/test/jdk/java/lang/Float/Extrema.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Float/Extrema.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Float/Extrema.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4408489 4826652 * @summary Testing values of Float.{MIN_VALUE, MIN_NORMAL, MAX_VALUE} - * @author Joseph D. Darcy */ public class Extrema { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Float/NaNInfinityParsing.java openjdk-25-25.0.3+9/test/jdk/java/lang/Float/NaNInfinityParsing.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Float/NaNInfinityParsing.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Float/NaNInfinityParsing.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4428772 * @summary Testing recognition of "NaN" and "Infinity" strings - * @author Joseph D. Darcy */ diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/IO/IO.java openjdk-25-25.0.3+9/test/jdk/java/lang/IO/IO.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/IO/IO.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/IO/IO.java 2026-04-17 19:08:13.000000000 +0000 @@ -50,10 +50,9 @@ /* * @test - * @bug 8305457 8342936 8351435 8344706 + * @bug 8305457 8342936 8351435 8344706 8361613 * @summary java.lang.IO tests * @library /test/lib - * @modules jdk.internal.le * @run junit IO */ @ExtendWith(IO.TimingExtension.class) @@ -78,22 +77,6 @@ } catch (Exception _) { } } - /* - * Unlike printTest, which tests a _default_ console that is normally - * jdk.internal.org.jline.JdkConsoleProviderImpl, this test tests - * jdk.internal.io.JdkConsoleImpl. Those console implementations operate - * in different conditions and, thus, are tested separately. - * - * To test jdk.internal.io.JdkConsoleImpl one needs to ensure that both - * conditions are met: - * - * - a non-existent console provider is requested - * - isatty is true - * - * To achieve isatty, the test currently uses the EXPECT(1) Unix command, - * which does not work for Windows. Later, a library like pty4j or JPty - * might be used instead of EXPECT, to cover both Unix and Windows. - */ @ParameterizedTest @ValueSource(strings = {"println", "print"}) public void outputTestInteractive(String mode) throws Exception { @@ -102,8 +85,6 @@ expect.toString(), Path.of(testSrc, "output.exp").toAbsolutePath().toString(), System.getProperty("test.jdk") + "/bin/java", - "--enable-preview", - "-Djdk.console=gibberish", Path.of(testSrc, "Output.java").toAbsolutePath().toString(), mode); assertEquals(0, output.getExitValue()); @@ -130,7 +111,7 @@ */ @ParameterizedTest @MethodSource("args") - public void inputTestInteractive(String console, String prompt) throws Exception { + public void inputTestInteractive(String prompt) throws Exception { var testSrc = System.getProperty("test.src", "."); var command = new ArrayList<String>(); command.add(expect.toString()); @@ -138,9 +119,6 @@ : "input"; command.add(Path.of(testSrc, expectInputName + ".exp").toAbsolutePath().toString()); command.add(System.getProperty("test.jdk") + "/bin/java"); - command.add("--enable-preview"); - if (console != null) - command.add("-Djdk.console=" + console); command.add(Path.of(testSrc, "Input.java").toAbsolutePath().toString()); command.add(prompt == null ? "0" : PROMPT_NONE.equals(prompt) ? "2" : "1"); command.add(String.valueOf(prompt)); @@ -152,33 +130,11 @@ private static final String PROMPT_NONE = "prompt-none"; public static Stream<Arguments> args() { - // cross product: consoles x prompts - return Stream.of("jdk.internal.le", "gibberish").flatMap(console -> Stream.of(null, "?", "%s", PROMPT_NONE) - .map(prompt -> new String[]{console, prompt}).map(Arguments::of)); + // prompts + return Stream.of(null, "?", "%s", PROMPT_NONE).map(Arguments::of); } } - @ParameterizedTest - @ValueSource(strings = {"println", "print"}) - public void printTest(String mode) throws Exception { - var file = Path.of(System.getProperty("test.src", "."), "Output.java") - .toAbsolutePath().toString(); - var pb = ProcessTools.createTestJavaProcessBuilder("-Djdk.console=jdk.internal.le", "--enable-preview", file, mode); - OutputAnalyzer output = ProcessTools.executeProcess(pb); - assertEquals(0, output.getExitValue()); - assertTrue(output.getStderr().isEmpty()); - output.reportDiagnosticSummary(); - String out = output.getStdout(); - // The first half of the output is produced by Console, the second - // half is produced by IO: those halves must match. - // Executing Console and IO in the same VM (as opposed to - // consecutive VM runs, which are cleaner) to be able to compare string - // representation of objects. - assertFalse(out.isBlank()); - assertEquals(out.substring(0, out.length() / 2), - out.substring(out.length() / 2)); - } - @Test //JDK-8342936 public void printlnNoParamsTest() throws Exception { var file = Path.of("PrintlnNoParams.java"); @@ -193,7 +149,7 @@ } """); } - var pb = ProcessTools.createTestJavaProcessBuilder("-Djdk.console=jdk.internal.le", "--enable-preview", file.toString()); + var pb = ProcessTools.createTestJavaProcessBuilder(file.toString()); OutputAnalyzer output = ProcessTools.executeProcess(pb); assertEquals(0, output.getExitValue()); assertTrue(output.getStderr().isEmpty()); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Integer/Decode.java openjdk-25-25.0.3+9/test/jdk/java/lang/Integer/Decode.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Integer/Decode.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Integer/Decode.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @test * @bug 4136371 5017980 6576055 * @summary Test Integer.decode method - * @author madbot - * @author Joseph D. Darcy */ /** diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Integer/ParsingTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/Integer/ParsingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Integer/ParsingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Integer/ParsingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5017980 6576055 8041972 8055251 * @summary Test parsing methods - * @author Joseph D. Darcy */ import java.lang.IndexOutOfBoundsException; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Integer/Unsigned.java openjdk-25-25.0.3+9/test/jdk/java/lang/Integer/Unsigned.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Integer/Unsigned.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Integer/Unsigned.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4504839 4215269 6322074 * @summary Basic tests for unsigned operations. - * @author Joseph D. Darcy */ public class Unsigned { public static void main(String... args) { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Long/Decode.java openjdk-25-25.0.3+9/test/jdk/java/lang/Long/Decode.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Long/Decode.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Long/Decode.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @test * @bug 4136371 5017980 6576055 * @summary Test Long.decode method - * @author madbot - * @author Joseph D. Darcy */ import java.math.BigInteger; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Long/ParsingTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/Long/ParsingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Long/ParsingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Long/ParsingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5017980 6576055 8041972 8055251 * @summary Test parsing methods - * @author Joseph D. Darcy */ /** diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Long/Unsigned.java openjdk-25-25.0.3+9/test/jdk/java/lang/Long/Unsigned.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Long/Unsigned.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Long/Unsigned.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4504839 4215269 6322074 8030814 * @summary Basic tests for unsigned operations - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/Basic.java openjdk-25-25.0.3+9/test/jdk/java/lang/ProcessBuilder/Basic.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/Basic.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/ProcessBuilder/Basic.java 2026-04-17 19:08:13.000000000 +0000 @@ -85,8 +85,8 @@ static final String libpath = System.getenv("LIBPATH"); /* Used for regex String matching for long error messages */ - static final String PERMISSION_DENIED_ERROR_MSG = "(Permission denied|error=13)"; - static final String NO_SUCH_FILE_ERROR_MSG = "(No such file|error=2)"; + static final String PERMISSION_DENIED_ERROR_MSG = "(Permission denied|error:13)"; + static final String NO_SUCH_FILE_ERROR_MSG = "(No such file|error:2)"; static final String SPAWNHELPER_FAILURE_MSG = "(Possible reasons:)"; /** diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessHandle/TEST.properties openjdk-25-25.0.3+9/test/jdk/java/lang/ProcessHandle/TEST.properties --- openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessHandle/TEST.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/ProcessHandle/TEST.properties 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1 @@ +maxOutputSize=6000000 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Short/Decode.java openjdk-25-25.0.3+9/test/jdk/java/lang/Short/Decode.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Short/Decode.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Short/Decode.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @test * @bug 4136371 5017980 6576055 * @summary Test Short.decode method - * @author madbot - * @author Joseph D. Darcy */ /** diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/String/IndexOf.java openjdk-25-25.0.3+9/test/jdk/java/lang/String/IndexOf.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/String/IndexOf.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/String/IndexOf.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Intel Corporation. All rights reserved. + * Copyright (c) 2024, 2026, Intel Corporation. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,15 @@ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xcomp -XX:-TieredCompilation -XX:UseAVX=2 -XX:+UnlockDiagnosticVMOptions -XX:+EnableX86ECoreOpts IndexOf */ +/* + * @test + * @bug 8360271 + * @summary test String indexOf() intrinsic + * @requires vm.cpu.features ~= ".*avx2.*" + * @requires vm.compiler2.enabled + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xcomp -XX:-TieredCompilation -XX:UseAVX=2 -XX:+UnlockDiagnosticVMOptions -XX:+EnableX86ECoreOpts -XX:-CompactStrings IndexOf + */ + public class IndexOf { final int scope = 32*2+16+8; final char a, aa, b, c, d; @@ -56,11 +65,11 @@ d = 'd'; break; case UU: - a = '\u0061'; + a = '\u1061'; aa = a; - b = '\u0062'; + b = '\u1062'; c = '\u1063'; - d = '\u0064'; + d = '\u1064'; break; default: //case UL: a = 'a'; @@ -73,7 +82,7 @@ } // needle =~ /ab*d/ - // badNeedle =~ /ab*db*d/ + // badNeedle =~ /ab*cb*d/ interface Append {void append(int pos, char cc);} String newNeedle(int size, int badPosition) { if (size<2) {throw new RuntimeException("Fix testcase "+size);} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/StringBuilder/RacingSBThreads.java openjdk-25-25.0.3+9/test/jdk/java/lang/StringBuilder/RacingSBThreads.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/StringBuilder/RacingSBThreads.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/StringBuilder/RacingSBThreads.java 2026-04-17 19:08:13.000000000 +0000 @@ -46,7 +46,7 @@ public class RacingSBThreads { private static final int TIMEOUT_SEC = 1; // Duration to run each test case - private static final int N = 10_000_000; // static number of iterations for writes and modifies + private static final int N = 1_000_000; // static number of iterations for writes and modifies private static final int LEN = 100_000; // Length of initial SB // Strings available to be used as the initial contents of a StringBuilder diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/Starvation.java openjdk-25-25.0.3+9/test/jdk/java/lang/Thread/virtual/Starvation.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/Starvation.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Thread/virtual/Starvation.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,7 +25,7 @@ * @requires vm.continuations * @library /test/lib * @bug 8345294 - * @run main/othervm/timeout=200/native --enable-native-access=ALL-UNNAMED Starvation 100000 + * @run main/othervm/native --enable-native-access=ALL-UNNAMED Starvation */ import java.time.Duration; @@ -37,9 +37,16 @@ public class Starvation { public static void main(String[] args) throws Exception { - int iterations = Integer.parseInt(args[0]); + int iterations; + if (args.length > 0) { + iterations = Integer.parseInt(args[0]); + } else { + int nprocs = Runtime.getRuntime().availableProcessors(); + iterations = 40_000 / nprocs; + } - for (int i = 0; i < iterations; i++) { + for (int i = 1; i <= iterations; i++) { + System.out.format("%s iteration %d of %d ...%n", Instant.now(), i, iterations); var exRef = new AtomicReference<Exception>(); Thread thread = Thread.startVirtualThread(() -> { try { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/ParkAfterTimedPark.java openjdk-25-25.0.3+9/test/jdk/java/lang/Thread/virtual/stress/ParkAfterTimedPark.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/ParkAfterTimedPark.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Thread/virtual/stress/ParkAfterTimedPark.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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=parked + * @bug 8369227 + * @summary Stress test untimed park after a timed park when a thread is unparked around the + * same time that the timeout expires. + * @library /test/lib + * @run main/othervm --enable-native-access=ALL-UNNAMED ParkAfterTimedPark 200 false + */ + +/* + * @test id=pinned + * @summary Stress test untimed park, while pinned, and after a timed park when a thread is + * unparked around the same time that the timeout expires. + * @library /test/lib + * @run main/othervm --enable-native-access=ALL-UNNAMED ParkAfterTimedPark 200 true + */ + +import java.time.Instant; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.LockSupport; +import jdk.test.lib.thread.VThreadPinner; + +public class ParkAfterTimedPark { + public static void main(String[] args) throws Exception { + int iterations = (args.length > 0) ? Integer.parseInt(args[0]) : 100; + boolean pinned = (args.length > 1) ? Boolean.parseBoolean(args[1]) : false; + + for (int i = 1; i <= iterations; i++) { + System.out.println(Instant.now() + " => " + i + " of " + iterations); + for (int timeout = 1; timeout <= 10; timeout++) { + test(timeout, true); + } + } + } + + /** + * Creates two virtual threads. The first does a timed-park for the given time, + * then parks in CountDownLatch.await. A second virtual thread unparks the first + * around the same time that the timeout for the first expires. + */ + private static void test(int millis, boolean pinned) throws Exception { + long nanos = TimeUnit.MILLISECONDS.toNanos(millis); + + var finish = new CountDownLatch(1); + + Thread thread1 = Thread.startVirtualThread(() -> { + LockSupport.parkNanos(nanos); + boolean done = false; + while (!done) { + try { + if (pinned) { + VThreadPinner.runPinned(() -> { + finish.await(); + }); + } else { + finish.await(); + } + done = true; + } catch (InterruptedException e) { } + } + }); + + Thread thread2 = Thread.startVirtualThread(() -> { + int delta = ThreadLocalRandom.current().nextInt(millis); + boolean done = false; + while (!done) { + try { + Thread.sleep(millis - delta); + done = true; + } catch (InterruptedException e) { } + } + LockSupport.unpark(thread1); + }); + + // wait for first thread to park before count down + await(thread1, Thread.State.WAITING); + finish.countDown(); + + thread1.join(); + thread2.join(); + } + + /** + * Waits for the given thread to reach a given state. + */ + private static void await(Thread thread, Thread.State expectedState) throws Exception { + Thread.State state = thread.getState(); + while (state != expectedState) { + if (state == Thread.State.TERMINATED) + throw new RuntimeException("Thread has terminated"); + Thread.sleep(10); + state = thread.getState(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/TimedWaitALot.java openjdk-25-25.0.3+9/test/jdk/java/lang/Thread/virtual/stress/TimedWaitALot.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/TimedWaitALot.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Thread/virtual/stress/TimedWaitALot.java 2026-04-17 19:08:13.000000000 +0000 @@ -94,17 +94,20 @@ // start thread to Object.notifyAll at around time that the timeout expires if (notify) { - if (ThreadLocalRandom.current().nextBoolean()) { - synchronized (lock) { + executor.submit(() -> { + if (ThreadLocalRandom.current().nextBoolean()) { + synchronized (lock) { + sleepLessThan(timeout); + lock.notifyAll(); + } + } else { sleepLessThan(timeout); - lock.notifyAll(); + synchronized (lock) { + lock.notifyAll(); + } } - } else { - sleepLessThan(timeout); - synchronized (lock) { - lock.notifyAll(); - } - } + return null; + }); } // start thread to interrupt first thread at around time that the timeout expires diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/Throwable/SuppressedExceptions.java openjdk-25-25.0.3+9/test/jdk/java/lang/Throwable/SuppressedExceptions.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/Throwable/SuppressedExceptions.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/Throwable/SuppressedExceptions.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,6 @@ * @test * @bug 6911258 6962571 6963622 6991528 7005628 8012044 * @summary Basic tests of suppressed exceptions - * @author Joseph D. Darcy */ public class SuppressedExceptions { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/annotation/Missing/MissingTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/annotation/Missing/MissingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/annotation/Missing/MissingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/annotation/Missing/MissingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6322301 5041778 * @summary Verify when missing annotation classes cause exceptions - * @author Joseph D. Darcy * @compile MissingTest.java A.java B.java C.java D.java Marker.java Missing.java MissingWrapper.java MissingDefault.java * @clean Missing * @run main MissingTest diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/annotation/TestIncompleteAnnotationExceptionNPE.java openjdk-25-25.0.3+9/test/jdk/java/lang/annotation/TestIncompleteAnnotationExceptionNPE.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/annotation/TestIncompleteAnnotationExceptionNPE.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/annotation/TestIncompleteAnnotationExceptionNPE.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 7021922 * @summary Test null handling of IncompleteAnnotationException constructor - * @author Joseph D. Darcy */ import java.lang.annotation.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodHandleProxies/Driver.java openjdk-25-25.0.3+9/test/jdk/java/lang/invoke/MethodHandleProxies/Driver.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodHandleProxies/Driver.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/invoke/MethodHandleProxies/Driver.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved. * 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,12 +21,12 @@ * questions. */ -/** +/* * @test * @bug 8280377 * @build m1/* m2/* Unnamed * @run testng/othervm m1/p1.Main - * @run testng/othervm Unnamed + * @run main/othervm Unnamed * @summary Test MethodHandleProxies::asInterfaceInstance with a default * method with varargs */ diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodHandleProxies/Unnamed.java openjdk-25-25.0.3+9/test/jdk/java/lang/invoke/MethodHandleProxies/Unnamed.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodHandleProxies/Unnamed.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/invoke/MethodHandleProxies/Unnamed.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ // verify that the caller has no access to the proxy created on an // inaccessible interface - Method m = intf.getMethod("test", Object[].class); - assertFalse(m.canAccess(null)); + Method m = intf.getMethod("test"); + assertFalse(m.canAccess(t)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/TestVHInvokerCaching.java openjdk-25-25.0.3+9/test/jdk/java/lang/invoke/TestVHInvokerCaching.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/TestVHInvokerCaching.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/invoke/TestVHInvokerCaching.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import java.util.List; import static java.lang.invoke.MethodHandles.lookup; -import static org.testng.Assert.assertSame; +import static org.testng.Assert.*; public class TestVHInvokerCaching { @@ -74,7 +74,7 @@ MethodHandles.Lookup lookup = lookup(); - for (Field field : Holder.class.getFields()) { + for (Field field : Holder.class.getDeclaredFields()) { String fieldName = field.getName(); Class<?> fieldType = field.getType(); @@ -82,6 +82,8 @@ testHandles.add(lookup.findVarHandle(Holder.class, fieldName, fieldType)); } + assertFalse(testHandles.isEmpty()); + return testHandles.stream().map(vh -> new Object[]{ vh }).toArray(Object[][]::new); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java openjdk-25-25.0.3+9/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/module/customfs/ModulesInCustomFileSystem.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,7 @@ * @library /test/lib * @build ModulesInCustomFileSystem m1/* m2/* * jdk.test.lib.util.JarUtils - * @run testng/othervm ModulesInCustomFileSystem + * @run testng/othervm -Djava.io.tmpdir=. ModulesInCustomFileSystem * @summary Test ModuleFinder to find modules in a custom file system */ diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/AnnotatedElement/TestAnnotatedElementDefaults.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/AnnotatedElement/TestAnnotatedElementDefaults.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/AnnotatedElement/TestAnnotatedElementDefaults.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/AnnotatedElement/TestAnnotatedElementDefaults.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 8005294 * @summary Check behavior of default methods of AnnotatedElement - * @author Joseph D. Darcy */ import java.lang.annotation.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Constructor/GenericStringTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Constructor/GenericStringTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Constructor/GenericStringTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Constructor/GenericStringTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5033583 6316717 6470106 8161500 8162539 6304578 * @summary Check toGenericString() and toString() methods - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Constructor/TestParameterAnnotations.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Constructor/TestParameterAnnotations.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Constructor/TestParameterAnnotations.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Constructor/TestParameterAnnotations.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6332964 * @summary Verify getParameterAnnotations doesn't throw spurious errors - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/DefaultAccessibility.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/DefaultAccessibility.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/DefaultAccessibility.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/DefaultAccessibility.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6648344 * @summary Test that default accessibility is false - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Field/GenericStringTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Field/GenericStringTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Field/GenericStringTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Field/GenericStringTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5033583 8161500 * @summary Check toGenericString() method - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/HashCodeTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/HashCodeTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/HashCodeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/HashCodeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5097856 * @summary Computing hashCode of objects modeling generics shouldn't blow stack - * @author Joseph D. Darcy */ import java.util.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/Probe.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/Probe.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/Probe.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/Probe.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5003916 6704655 6873951 6476261 8004928 * @summary Testing parsing of signatures attributes of nested classes - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/StringsAndBounds.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/StringsAndBounds.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/StringsAndBounds.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/StringsAndBounds.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5015676 4987888 4997464 * @summary Testing upper bounds and availability of toString methods - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/TestParameterizedType.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/TestParameterizedType.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/TestParameterizedType.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/TestParameterizedType.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5061485 * @summary Test sematics of ParameterizedType.equals - * @author Joseph D. Darcy */ import java.util.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/exceptionCauseTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/exceptionCauseTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/exceptionCauseTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/exceptionCauseTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4981727 * @summary - * @author Joseph D. Darcy */ import java.io.PrintStream; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/getAnnotationTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/getAnnotationTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Generics/getAnnotationTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Generics/getAnnotationTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4979440 * @summary Test for signature parsing corner case - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Method/GenericStringTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Method/GenericStringTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Method/GenericStringTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Method/GenericStringTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 5033583 6316717 6470106 8004979 8161500 8162539 6304578 * @summary Check toGenericString() and toString() methods - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Method/IsDefaultTest.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Method/IsDefaultTest.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Method/IsDefaultTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Method/IsDefaultTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 8005042 * @summary Check behavior of Method.isDefault - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Method/defaultMethodModeling/DefaultMethodModeling.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Method/defaultMethodModeling/DefaultMethodModeling.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/Method/defaultMethodModeling/DefaultMethodModeling.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/Method/defaultMethodModeling/DefaultMethodModeling.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 8011590 * @summary Check modeling of default methods - * @author Joseph D. Darcy */ import java.util.Objects; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/TypeVariable/TestAnnotatedElement.java openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/TypeVariable/TestAnnotatedElement.java --- openjdk-25-25.0.2+10/test/jdk/java/lang/reflect/TypeVariable/TestAnnotatedElement.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/lang/reflect/TypeVariable/TestAnnotatedElement.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 7086192 * @summary Verify functionality of AnnotatedElement methods on type variables - * @author Joseph D. Darcy */ import java.lang.reflect.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/AddTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/AddTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/AddTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/AddTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6362557 8200698 * @summary Some tests of add(BigDecimal, mc) - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/CompareToTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/CompareToTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/CompareToTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/CompareToTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6473768 * @summary Tests of BigDecimal.compareTo - * @author Joseph D. Darcy */ import java.math.*; import static java.math.BigDecimal.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/DivideTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/DivideTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/DivideTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/DivideTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4851776 4907265 6177836 6876282 8066842 * @summary Some tests for the divide methods. - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/IntegralDivisionTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/IntegralDivisionTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/IntegralDivisionTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/IntegralDivisionTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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 * @bug 4904082 4917089 6337226 6378503 * @summary Tests that integral division and related methods return the proper result and scale. - * @author Joseph D. Darcy */ import java.math.*; public class IntegralDivisionTests { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/NegateTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/NegateTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/NegateTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/NegateTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6325535 * @summary Test for the rounding behavior of negate(MathContext) - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/PowTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/PowTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/PowTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/PowTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4916097 * @summary Some exponent over/undeflow tests for the pow method - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/PrecisionTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/PrecisionTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/PrecisionTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/PrecisionTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 1234567 * @summary Test that precision() is computed properly. - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/RoundingTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/RoundingTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/RoundingTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/RoundingTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6334849 * @summary Tests of dropping digits near the scale threshold - * @author Joseph D. Darcy */ import java.math.*; public class RoundingTests { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/ScaleByPowerOfTenTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/ScaleByPowerOfTenTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/ScaleByPowerOfTenTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/ScaleByPowerOfTenTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4899722 * @summary Basic tests of scaleByPowerOfTen - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/StrippingZerosTest.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/StrippingZerosTest.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/StrippingZerosTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/StrippingZerosTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ * @summary A few tests of stripTrailingZeros * @run main StrippingZerosTest * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox -XX:AutoBoxCacheMax=20000 StrippingZerosTest - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/ToPlainStringTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/ToPlainStringTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/ToPlainStringTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/ToPlainStringTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ * @summary Basic tests of toPlainString method * @run main ToPlainStringTests * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox -XX:AutoBoxCacheMax=20000 ToPlainStringTests - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/ZeroScalingTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/ZeroScalingTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigDecimal/ZeroScalingTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigDecimal/ZeroScalingTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ * @summary Tests that the scale of zero is propagated properly and has the * proper effect and that setting the scale to zero does not mutate the * BigDecimal. - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/CompareToTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/CompareToTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/CompareToTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/CompareToTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6473768 * @summary Tests of BigInteger.compareTo - * @author Joseph D. Darcy */ import java.math.*; import static java.math.BigInteger.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/ExtremeShiftingTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/ExtremeShiftingTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/ExtremeShiftingTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/ExtremeShiftingTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ * @summary Tests of shiftLeft and shiftRight on Integer.MIN_VALUE * @requires os.maxMemory >= 1g * @run main/othervm -Xmx512m ExtremeShiftingTests - * @author Joseph D. Darcy */ import java.math.BigInteger; import static java.math.BigInteger.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/OperatorNpeTests.java openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/OperatorNpeTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/OperatorNpeTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/OperatorNpeTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6365176 * @summary Get NullPointerExceptions when expected - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/StringConstructor.java openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/StringConstructor.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/StringConstructor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/StringConstructor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4489146 5017980 * @summary tests String constructors of BigInteger - * @author Joseph D. Darcy */ import java.math.*; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/TestValueExact.java openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/TestValueExact.java --- openjdk-25-25.0.2+10/test/jdk/java/math/BigInteger/TestValueExact.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/BigInteger/TestValueExact.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 6371401 * @summary Tests of fooValueExact methods - * @author Joseph D. Darcy */ import java.math.BigInteger; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/math/RoundingMode/RoundingModeTests.java openjdk-25-25.0.3+9/test/jdk/java/math/RoundingMode/RoundingModeTests.java --- openjdk-25-25.0.2+10/test/jdk/java/math/RoundingMode/RoundingModeTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/math/RoundingMode/RoundingModeTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @test * @bug 4851776 4891522 4905335 * @summary Basic tests for the RoundingMode class. - * @author Joseph D. Darcy */ import java.math.RoundingMode; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java 2026-04-17 19:08:13.000000000 +0000 @@ -35,18 +35,10 @@ * ReferenceTracker AbstractThrowingPushPromises * jdk.httpclient.test.lib.common.HttpServerAdapters * <concrete-class-name> - * @run testng/othervm -Djdk.internal.httpclient.debug=true <concrete-class-name> + * @run junit/othervm -Djdk.internal.httpclient.debug=true <concrete-class-name> */ import jdk.test.lib.net.SimpleSSLContext; -import org.testng.ITestContext; -import org.testng.ITestResult; -import org.testng.SkipException; -import org.testng.annotations.AfterTest; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; import javax.net.ssl.SSLContext; import java.io.BufferedReader; @@ -95,18 +87,29 @@ import static java.lang.String.format; import static java.net.http.HttpClient.Version.HTTP_2; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; +import org.junit.jupiter.api.AfterAll; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.extension.BeforeEachCallback; +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.api.extension.RegisterExtension; +import org.junit.jupiter.api.extension.TestWatcher; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public abstract class AbstractThrowingPushPromises implements HttpServerAdapters { - SSLContext sslContext; - HttpTestServer http2TestServer; // HTTP/2 ( h2c ) - HttpTestServer https2TestServer; // HTTP/2 ( h2 ) - String http2URI_fixed; - String http2URI_chunk; - String https2URI_fixed; - String https2URI_chunk; + static SSLContext sslContext; + static HttpTestServer http2TestServer; // HTTP/2 ( h2c ) + static HttpTestServer https2TestServer; // HTTP/2 ( h2 ) + static String http2URI_fixed; + static String http2URI_chunk; + static String https2URI_fixed; + static String https2URI_chunk; static final int ITERATION_COUNT = 1; // a shared executor helps reduce the amount of threads created by the test @@ -124,8 +127,34 @@ return String.format("[%d s, %d ms, %d ns] ", secs, mill, nan); } - final ReferenceTracker TRACKER = ReferenceTracker.INSTANCE; - private volatile HttpClient sharedClient; + static final class TestStopper implements TestWatcher, BeforeEachCallback { + final AtomicReference<String> failed = new AtomicReference<>(); + TestStopper() { } + @Override + public void testFailed(ExtensionContext context, Throwable cause) { + if (stopAfterFirstFailure()) { + String msg = "Aborting due to: " + cause; + failed.compareAndSet(null, msg); + FAILURES.putIfAbsent(context.getDisplayName(), cause); + System.out.printf("%nTEST FAILED: %s%s%n\tAborting due to %s%n%n", + now(), context.getDisplayName(), cause); + System.err.printf("%nTEST FAILED: %s%s%n\tAborting due to %s%n%n", + now(), context.getDisplayName(), cause); + } + } + + @Override + public void beforeEach(ExtensionContext context) { + String msg = failed.get(); + Assumptions.assumeTrue(msg == null, msg); + } + } + + @RegisterExtension + static final TestStopper stopper = new TestStopper(); + + static final ReferenceTracker TRACKER = ReferenceTracker.INSTANCE; + private static volatile HttpClient sharedClient; static class TestExecutor implements Executor { final AtomicLong tasks = new AtomicLong(); @@ -151,34 +180,13 @@ } } - protected boolean stopAfterFirstFailure() { + protected static boolean stopAfterFirstFailure() { return Boolean.getBoolean("jdk.internal.httpclient.debug"); } - final AtomicReference<SkipException> skiptests = new AtomicReference<>(); - void checkSkip() { - var skip = skiptests.get(); - if (skip != null) throw skip; - } - static String name(ITestResult result) { - var params = result.getParameters(); - return result.getName() - + (params == null ? "()" : Arrays.toString(result.getParameters())); - } - - @BeforeMethod - void beforeMethod(ITestContext context) { - if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) { - if (skiptests.get() == null) { - SkipException skip = new SkipException("some tests failed"); - skip.setStackTrace(new StackTraceElement[0]); - skiptests.compareAndSet(null, skip); - } - } - } - @AfterClass - static final void printFailedTests(ITestContext context) { + @AfterAll + static final void printFailedTests() { out.println("\n========================="); try { // Exceptions should already have been added to FAILURES @@ -203,7 +211,7 @@ } } - private String[] uris() { + private static String[] uris() { return new String[] { http2URI_fixed, http2URI_chunk, @@ -212,8 +220,7 @@ }; } - @DataProvider(name = "sanity") - public Object[][] sanity() { + public static Object[][] sanity() { String[] uris = uris(); Object[][] result = new Object[uris.length * 2][]; @@ -242,7 +249,7 @@ } } - private Object[][] variants(List<Thrower> throwers) { + private static Object[][] variants(List<Thrower> throwers) { String[] uris = uris(); // reduce traces by always using the same client if // stopAfterFirstFailure is requested. @@ -262,25 +269,17 @@ return result; } - @DataProvider(name = "ioVariants") - public Object[][] ioVariants(ITestContext context) { - if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) { - return new Object[0][]; - } + public static Object[][] ioVariants() { return variants(List.of( new UncheckedIOExceptionThrower())); } - @DataProvider(name = "customVariants") - public Object[][] customVariants(ITestContext context) { - if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) { - return new Object[0][]; - } + public static Object[][] customVariants() { return variants(List.of( new UncheckedCustomExceptionThrower())); } - private HttpClient makeNewClient() { + private static HttpClient makeNewClient() { clientCount.incrementAndGet(); return TRACKER.track(HttpClient.newBuilder() .proxy(HttpClient.Builder.NO_PROXY) @@ -289,11 +288,11 @@ .build()); } - HttpClient newHttpClient(boolean share) { + static HttpClient newHttpClient(boolean share) { if (!share) return makeNewClient(); HttpClient shared = sharedClient; if (shared != null) return shared; - synchronized (this) { + synchronized (AbstractThrowingPushPromises.class) { shared = sharedClient; if (shared == null) { shared = sharedClient = makeNewClient(); @@ -331,13 +330,13 @@ HttpResponse<Stream<String>> response = client.sendAsync(req, BodyHandlers.ofLines(), pushHandler).get(); String body = response.body().collect(Collectors.joining("|")); - assertEquals(URI.create(body).getPath(), URI.create(uri).getPath()); + assertEquals(URI.create(uri).getPath(), URI.create(body).getPath()); for (HttpRequest promised : pushPromises.keySet()) { out.printf("%s Received promise: %s%n\tresponse: %s%n", now(), promised, pushPromises.get(promised).get()); String promisedBody = pushPromises.get(promised).get().body() .collect(Collectors.joining("|")); - assertEquals(promisedBody, promised.uri().toASCIIString()); + assertEquals(promised.uri().toASCIIString(), promisedBody); } assertEquals(3, pushPromises.size()); if (!sameClient) { @@ -402,7 +401,6 @@ Finisher finisher, Thrower thrower) throws Exception { - checkSkip(); out.printf("%n%s%s%n", now(), name); try { testThrowing(uri, sameClient, handlers, finisher, thrower); @@ -577,9 +575,9 @@ default: expectedCount = 3; } - assertEquals(promises.size(), expectedCount, + assertEquals(expectedCount, promises.size(), "bad promise count for " + reqURI + " with " + w); - assertEquals(result, List.of(reqURI.toASCIIString())); + assertEquals(List.of(reqURI.toASCIIString()), result); return result; } @@ -732,8 +730,8 @@ } - @BeforeTest - public void setup() throws Exception { + @BeforeAll + public static void setup() throws Exception { sslContext = new SimpleSSLContext().get(); if (sslContext == null) throw new AssertionError("Unexpected null sslContext"); @@ -759,8 +757,8 @@ https2TestServer.start(); } - @AfterTest - public void teardown() throws Exception { + @AfterAll + public static void teardown() throws Exception { String sharedClientName = sharedClient == null ? null : sharedClient.toString(); sharedClient = null; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamCustom * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamCustom + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamCustom */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesAsInputStreamCustom extends AbstractThrowingPushPromises { - @Test(dataProvider = "customVariants") + @ParameterizedTest + @MethodSource("customVariants") public void testThrowingAsInputStream(String uri, boolean sameClient, Thrower thrower) throws Exception { super.testThrowingAsInputStreamImpl(uri, sameClient, thrower); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamIO * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamIO + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamIO */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesAsInputStreamIO extends AbstractThrowingPushPromises { - @Test(dataProvider = "ioVariants") + @ParameterizedTest + @MethodSource("ioVariants") public void testThrowingAsInputStream(String uri, boolean sameClient, Thrower thrower) throws Exception { super.testThrowingAsInputStreamImpl(uri, sameClient, thrower); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesCustom * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesCustom + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesCustom */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesAsLinesCustom extends AbstractThrowingPushPromises { - @Test(dataProvider = "customVariants") + @ParameterizedTest + @MethodSource("customVariants") public void testThrowingAsLines(String uri, boolean sameClient, Thrower thrower) throws Exception { super.testThrowingAsLinesImpl(uri, sameClient, thrower); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesIO * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesIO + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesIO */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesAsLinesIO extends AbstractThrowingPushPromises { - @Test(dataProvider = "ioVariants") + @ParameterizedTest + @MethodSource("ioVariants") public void testThrowingAsLines(String uri, boolean sameClient, Thrower thrower) throws Exception { super.testThrowingAsLinesImpl(uri, sameClient, thrower); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringCustom * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringCustom + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringCustom */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesAsStringCustom extends AbstractThrowingPushPromises { - @Test(dataProvider = "customVariants") + @ParameterizedTest + @MethodSource("customVariants") public void testThrowingAsString(String uri, boolean sameClient, Thrower thrower) throws Exception { super.testThrowingAsStringImpl(uri, sameClient, thrower); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringIO * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringIO + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringIO */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesAsStringIO extends AbstractThrowingPushPromises { - @Test(dataProvider = "ioVariants") + @ParameterizedTest + @MethodSource("ioVariants") public void testThrowingAsString(String uri, boolean sameClient, Thrower thrower) throws Exception { super.testThrowingAsStringImpl(uri, sameClient, thrower); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +30,16 @@ * @build jdk.test.lib.net.SimpleSSLContext * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesSanity * jdk.httpclient.test.lib.common.HttpServerAdapters - * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesSanity + * @run junit/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesSanity */ -import org.testng.annotations.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; public class ThrowingPushPromisesSanity extends AbstractThrowingPushPromises { - @Test(dataProvider = "sanity") + @ParameterizedTest + @MethodSource("sanity") public void testSanity(String uri, boolean sameClient) throws Exception { super.testSanityImpl(uri, sameClient); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/BadHeadersTest.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/BadHeadersTest.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/BadHeadersTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/BadHeadersTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -29,7 +29,7 @@ * with bad header fields. * @library /test/lib /test/jdk/java/net/httpclient/lib * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext - * @run testng/othervm -Djdk.internal.httpclient.debug=true BadHeadersTest + * @run junit/othervm -Djdk.internal.httpclient.debug=true BadHeadersTest */ import jdk.internal.net.http.common.HttpHeadersBuilder; @@ -38,10 +38,10 @@ import jdk.internal.net.http.frame.HeadersFrame; import jdk.internal.net.http.frame.Http2Frame; import jdk.test.lib.net.SimpleSSLContext; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import java.io.IOException; @@ -61,6 +61,7 @@ import java.util.Map.Entry; import java.util.concurrent.ExecutionException; import java.util.function.BiFunction; + import jdk.httpclient.test.lib.http2.Http2TestServer; import jdk.httpclient.test.lib.http2.Http2TestExchange; import jdk.httpclient.test.lib.http2.Http2TestExchangeImpl; @@ -69,8 +70,9 @@ import jdk.httpclient.test.lib.http2.Http2TestServerConnection; import static java.util.List.of; import static java.util.Map.entry; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; // Code copied from ContinuationFrameTest public class BadHeadersTest { @@ -85,11 +87,11 @@ of(entry("hello", "world!"), entry(":status", "200")) // Pseudo header is not the first one ); - SSLContext sslContext; - Http2TestServer http2TestServer; // HTTP/2 ( h2c ) - Http2TestServer https2TestServer; // HTTP/2 ( h2 ) - String http2URI; - String https2URI; + private static SSLContext sslContext; + private static Http2TestServer http2TestServer; // HTTP/2 ( h2c ) + private static Http2TestServer https2TestServer; // HTTP/2 ( h2 ) + private static String http2URI; + private static String https2URI; /** * A function that returns a list of 1) one HEADERS frame ( with an empty @@ -127,8 +129,7 @@ return frames; }; - @DataProvider(name = "variants") - public Object[][] variants() { + static Object[][] variants() { return new Object[][] { { http2URI, false, oneContinuation }, { https2URI, false, oneContinuation }, @@ -142,8 +143,8 @@ }; } - - @Test(dataProvider = "variants") + @ParameterizedTest + @MethodSource("variants") void test(String uri, boolean sameClient, BiFunction<Integer,List<ByteBuffer>,List<Http2Frame>> headerFramesSupplier) @@ -172,7 +173,8 @@ } } - @Test(dataProvider = "variants") + @ParameterizedTest + @MethodSource("variants") void testAsync(String uri, boolean sameClient, BiFunction<Integer,List<ByteBuffer>,List<Http2Frame>> headerFramesSupplier) @@ -211,8 +213,7 @@ // sync with implementation. static void assertDetailMessage(Throwable throwable, int iterationIndex) { try { - assertTrue(throwable instanceof ProtocolException, - "Expected ProtocolException, got " + throwable); + assertInstanceOf(ProtocolException.class, throwable, "Expected ProtocolException, got " + throwable); assertTrue(throwable.getMessage().contains("malformed response"), "Expected \"malformed response\" in: " + throwable.getMessage()); @@ -239,8 +240,8 @@ } } - @BeforeTest - public void setup() throws Exception { + @BeforeAll + static void setup() throws Exception { sslContext = new SimpleSSLContext().get(); if (sslContext == null) throw new AssertionError("Unexpected null sslContext"); @@ -264,8 +265,8 @@ https2TestServer.start(); } - @AfterTest - public void teardown() throws Exception { + @AfterAll + static void teardown() throws Exception { http2TestServer.stop(); https2TestServer.stop(); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/BadPushPromiseTest.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/BadPushPromiseTest.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/BadPushPromiseTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/BadPushPromiseTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,16 +26,16 @@ * @bug 8354276 * @library /test/lib /test/jdk/java/net/httpclient/lib * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer - * @run testng/othervm + * @run junit/othervm * -Djdk.internal.httpclient.debug=true * -Djdk.httpclient.HttpClient.log=errors,requests,responses,trace * BadPushPromiseTest */ import jdk.httpclient.test.lib.common.HttpServerAdapters; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -59,7 +59,7 @@ import static java.net.http.HttpClient.Version.HTTP_2; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.List.of; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; public class BadPushPromiseTest { @@ -73,11 +73,11 @@ static final String MAIN_RESPONSE_BODY = "the main response body"; - HttpServerAdapters.HttpTestServer server; - URI uri; + static HttpServerAdapters.HttpTestServer server; + static URI uri; - @BeforeTest - public void setup() throws Exception { + @BeforeAll + static void setup() throws Exception { server = HttpServerAdapters.HttpTestServer.create(HTTP_2); HttpServerAdapters.HttpTestHandler handler = new ServerPushHandler(MAIN_RESPONSE_BODY); server.addHandler(handler, "/"); @@ -87,8 +87,8 @@ uri = new URI("http://" + authority + "/foo/a/b/c"); } - @AfterTest - public void teardown() { + @AfterAll + static void teardown() { server.stop(); } @@ -96,7 +96,7 @@ * Malformed push promise headers should kill the connection */ @Test - public void test() throws Exception { + void test() { HttpClient client = HttpClient.newHttpClient(); for (int i=0; i< BAD_HEADERS.size(); i++) { @@ -123,8 +123,7 @@ // sync with implementation. static void assertDetailMessage(Throwable throwable, int iterationIndex) { try { - assertTrue(throwable instanceof ProtocolException, - "Expected ProtocolException, got " + throwable); + assertInstanceOf(ProtocolException.class, throwable, "Expected ProtocolException, got " + throwable); if (iterationIndex == 0) { // unknown assertTrue(throwable.getMessage().contains("Unknown pseudo-header"), diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/BasicTest.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/BasicTest.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/BasicTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/BasicTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -32,7 +32,7 @@ * jdk.test.lib.Asserts * jdk.test.lib.Utils * jdk.test.lib.net.SimpleSSLContext - * @run testng/othervm -Djdk.httpclient.HttpClient.log=ssl,requests,responses,errors BasicTest + * @run junit/othervm -Djdk.httpclient.HttpClient.log=ssl,requests,responses,errors BasicTest */ import java.io.IOException; @@ -53,14 +53,13 @@ import jdk.httpclient.test.lib.http2.Http2TestExchange; import jdk.httpclient.test.lib.http2.Http2EchoHandler; import jdk.test.lib.net.SimpleSSLContext; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; import static java.net.http.HttpClient.Version.HTTP_2; import static jdk.test.lib.Asserts.assertFileContentsEqual; import static jdk.test.lib.Utils.createTempFile; import static jdk.test.lib.Utils.createTempFileOfSize; -@Test public class BasicTest { private static final String TEMP_FILE_PREFIX = @@ -127,7 +126,7 @@ } @Test - public static void test() throws Exception { + void test() throws Exception { try { initialize(); warmup(false); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/ConnectionFlowControlTest.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/ConnectionFlowControlTest.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/ConnectionFlowControlTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/ConnectionFlowControlTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,7 @@ * @summary checks connection flow control * @library /test/lib /test/jdk/java/net/httpclient/lib * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext - * @run testng/othervm -Djdk.internal.httpclient.debug=true + * @run junit/othervm -Djdk.internal.httpclient.debug=err * -Djdk.httpclient.connectionWindowSize=65535 * -Djdk.httpclient.windowsize=16384 * ConnectionFlowControlTest @@ -43,23 +43,13 @@ import java.net.http.HttpRequest; import java.net.http.HttpRequest.BodyPublishers; import java.net.http.HttpResponse; -import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandlers; -import java.net.http.HttpResponse.BodySubscriber; -import java.net.http.HttpResponse.ResponseInfo; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; -import java.util.Map.Entry; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionStage; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; -import java.util.concurrent.Flow.Subscription; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.BiFunction; import java.util.function.Consumer; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; @@ -72,44 +62,34 @@ import jdk.httpclient.test.lib.http2.Http2TestServer; import jdk.httpclient.test.lib.http2.Http2TestServerConnection; import jdk.internal.net.http.common.HttpHeadersBuilder; -import jdk.internal.net.http.frame.ContinuationFrame; -import jdk.internal.net.http.frame.HeaderFrame; -import jdk.internal.net.http.frame.HeadersFrame; -import jdk.internal.net.http.frame.Http2Frame; import jdk.internal.net.http.frame.SettingsFrame; import jdk.test.lib.Utils; import jdk.test.lib.net.SimpleSSLContext; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -import static java.util.List.of; -import static java.util.Map.entry; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -public class ConnectionFlowControlTest { +import static org.junit.jupiter.api.Assertions.*; - SSLContext sslContext; - HttpTestServer http2TestServer; // HTTP/2 ( h2c ) - HttpTestServer https2TestServer; // HTTP/2 ( h2 ) - String http2URI; - String https2URI; - final AtomicInteger reqid = new AtomicInteger(); +public class ConnectionFlowControlTest { + private static SSLContext sslContext; + private static HttpTestServer http2TestServer; // HTTP/2 ( h2c ) + private static HttpTestServer https2TestServer; // HTTP/2 ( h2 ) + private static String http2URI; + private static String https2URI; + private final AtomicInteger reqid = new AtomicInteger(); - @DataProvider(name = "variants") - public Object[][] variants() { + static Object[][] variants() { return new Object[][] { { http2URI }, { https2URI }, }; } - @Test(dataProvider = "variants") + @ParameterizedTest + @MethodSource("variants") void test(String uri) throws Exception { System.out.printf("%ntesting %s%n", uri); ConcurrentHashMap<String, CompletableFuture<String>> responseSent = new ConcurrentHashMap<>(); @@ -142,13 +122,13 @@ final HttpClient cc = client; var response = cc.send(request, BodyHandlers.ofInputStream()); responses.put(query, response); - String ckey = response.headers().firstValue("X-Connection-Key").get(); + String ckey = response.connectionLabel().get(); if (label == null) label = ckey; try { if (i < max - 1) { // the connection window might be exceeded at i == max - 2, which // means that the last request could go on a new connection. - assertEquals(ckey, label, "Unexpected key for " + query); + assertEquals(label, ckey, "Unexpected key for " + query); } } catch (AssertionError ass) { // since we won't pull all responses, the client @@ -169,12 +149,12 @@ try { String query = keys[i]; var response = responses.get(keys[i]); - String ckey = response.headers().firstValue("X-Connection-Key").get(); + String ckey = response.connectionLabel().get(); if (label == null) label = ckey; if (i < max - 1) { // the connection window might be exceeded at i == max - 2, which // means that the last request could go on a new connection. - assertEquals(ckey, label, "Unexpected key for " + query); + assertEquals(label, ckey, "Unexpected key for " + query); } int wait = uri.startsWith("https://") ? 500 : 250; try (InputStream is = response.body()) { @@ -226,8 +206,8 @@ System.out.println("\nSending last request:" + uriWithQuery); var response = client.send(request, BodyHandlers.ofString()); if (label != null) { - String ckey = response.headers().firstValue("X-Connection-Key").get(); - assertNotEquals(ckey, label); + String ckey = response.connectionLabel().get(); + assertNotEquals(label, ckey); System.out.printf("last request %s sent on different connection as expected:" + "\n\tlast: %s\n\tprevious: %s%n", query, ckey, label); } @@ -258,33 +238,33 @@ } } - @BeforeTest - public void setup() throws Exception { + @BeforeAll + static void setup() throws Exception { sslContext = new SimpleSSLContext().get(); if (sslContext == null) throw new AssertionError("Unexpected null sslContext"); - var http2TestServer = new Http2TestServer("localhost", false, 0); - http2TestServer.addHandler(new Http2TestHandler(), "/http2/"); - this.http2TestServer = HttpTestServer.of(http2TestServer); - http2URI = "http://" + this.http2TestServer.serverAuthority() + "/http2/x"; - - var https2TestServer = new Http2TestServer("localhost", true, sslContext); - https2TestServer.addHandler(new Http2TestHandler(), "/https2/"); - this.https2TestServer = HttpTestServer.of(https2TestServer); - https2URI = "https://" + this.https2TestServer.serverAuthority() + "/https2/x"; + var http2TestServerLocal = new Http2TestServer("localhost", false, 0); + http2TestServerLocal.addHandler(new Http2TestHandler(), "/http2/"); + http2TestServer = HttpTestServer.of(http2TestServerLocal); + http2URI = "http://" + http2TestServer.serverAuthority() + "/http2/x"; + + var https2TestServerLocal = new Http2TestServer("localhost", true, sslContext); + https2TestServerLocal.addHandler(new Http2TestHandler(), "/https2/"); + https2TestServer = HttpTestServer.of(https2TestServerLocal); + https2URI = "https://" + https2TestServer.serverAuthority() + "/https2/x"; // Override the default exchange supplier with a custom one to enable // particular test scenarios - http2TestServer.setExchangeSupplier(FCHttp2TestExchange::new); - https2TestServer.setExchangeSupplier(FCHttp2TestExchange::new); + http2TestServerLocal.setExchangeSupplier(FCHttp2TestExchange::new); + https2TestServerLocal.setExchangeSupplier(FCHttp2TestExchange::new); - this.http2TestServer.start(); - this.https2TestServer.start(); + http2TestServer.start(); + https2TestServer.start(); } - @AfterTest - public void teardown() throws Exception { + @AfterAll + static void teardown() throws Exception { http2TestServer.stop(); https2TestServer.stop(); } @@ -301,7 +281,6 @@ byte[] bytes = is.readAllBytes(); System.out.println("Server " + t.getLocalAddress() + " received:\n" + t.getRequestURI() + ": " + new String(bytes, StandardCharsets.UTF_8)); - t.getResponseHeaders().setHeader("X-Connection-Key", t.getConnectionKey()); if (bytes.length == 0) bytes = "no request body!".getBytes(StandardCharsets.UTF_8); int window = Math.max(16384, Integer.getInteger("jdk.httpclient.windowsize", 2*16*1024)); @@ -364,6 +343,5 @@ System.out.println("Server: response sent for " + query); responseSentCB.accept(query); } - } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,7 @@ * @library /test/lib /test/jdk/java/net/httpclient/lib * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext * @compile ../ReferenceTracker.java - * @run testng/othervm ContinuationFrameTest + * @run junit/othervm ContinuationFrameTest */ import java.io.IOException; @@ -59,25 +59,24 @@ import jdk.httpclient.test.lib.http2.Http2TestServerConnection; import jdk.test.lib.net.SimpleSSLContext; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import static java.lang.System.out; import static java.net.http.HttpClient.Version.HTTP_2; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; public class ContinuationFrameTest { - SSLContext sslContext; - Http2TestServer http2TestServer; // HTTP/2 ( h2c ) - Http2TestServer https2TestServer; // HTTP/2 ( h2 ) - String http2URI; - String https2URI; - String noBodyhttp2URI; - String noBodyhttps2URI; - final ReferenceTracker TRACKER = ReferenceTracker.INSTANCE; + private static SSLContext sslContext; + private static Http2TestServer http2TestServer; // HTTP/2 ( h2c ) + private static Http2TestServer https2TestServer; // HTTP/2 ( h2 ) + private static String http2URI; + private static String https2URI; + private static String noBodyhttp2URI; + private static String noBodyhttps2URI; + private final static ReferenceTracker TRACKER = ReferenceTracker.INSTANCE; /** * A function that returns a list of 1) a HEADERS frame ( with an empty @@ -132,8 +131,7 @@ return frames; }; - @DataProvider(name = "variants") - public Object[][] variants() { + static Object[][] variants() { return new Object[][] { { http2URI, false, oneContinuation }, { https2URI, false, oneContinuation }, @@ -154,7 +152,8 @@ static final int ITERATION_COUNT = 20; - @Test(dataProvider = "variants") + @ParameterizedTest + @MethodSource("variants") void test(String uri, boolean sameClient, BiFunction<Integer,List<ByteBuffer>,List<Http2Frame>> headerFramesSupplier) @@ -184,22 +183,20 @@ if(uri.contains("nobody")) { out.println("Got response: " + resp); - assertTrue(resp.statusCode() == 204, - "Expected 204, got:" + resp.statusCode()); - assertEquals(resp.version(), HTTP_2); + assertEquals(204, resp.statusCode(), "Expected 204, got:" + resp.statusCode()); + assertEquals(HTTP_2, resp.version()); continue; } out.println("Got response: " + resp); out.println("Got body: " + resp.body()); - assertTrue(resp.statusCode() == 200, - "Expected 200, got:" + resp.statusCode()); - assertEquals(resp.body(), "Hello there!"); - assertEquals(resp.version(), HTTP_2); + assertEquals(200, resp.statusCode(), "Expected 200, got:" + resp.statusCode()); + assertEquals("Hello there!", resp.body()); + assertEquals(HTTP_2, resp.version()); } } - @BeforeTest - public void setup() throws Exception { + @BeforeAll + static void setup() throws Exception { sslContext = new SimpleSSLContext().get(); if (sslContext == null) throw new AssertionError("Unexpected null sslContext"); @@ -227,8 +224,8 @@ https2TestServer.start(); } - @AfterTest - public void teardown() throws Exception { + @AfterAll + static void teardown() throws Exception { AssertionError fail = TRACKER.check(500); try { http2TestServer.stop(); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/websocket/DummyWebSocketServer.java 2026-04-17 19:08:13.000000000 +0000 @@ -351,7 +351,14 @@ if (!started.get()) { throw new IllegalStateException("Not yet started"); } - return URI.create("ws://localhost:" + address.getPort()); + String ip = address.getAddress().isAnyLocalAddress() + ? InetAddress.getLoopbackAddress().getHostAddress() + : address.getAddress().getHostAddress(); + if (ip.indexOf(':') >= 0) { + ip = String.format("[%s]", ip); + } + + return URI.create("ws://" + ip + ":" + address.getPort()); } private boolean readRequest(SocketChannel channel, StringBuilder request) diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/whitebox/RawChannelTestDriver.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/whitebox/RawChannelTestDriver.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/whitebox/RawChannelTestDriver.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/whitebox/RawChannelTestDriver.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 @@ * @test * @bug 8151299 8164704 * @modules java.net.http/jdk.internal.net.http - * @run testng java.net.http/jdk.internal.net.http.RawChannelTest + * @run testng/othervm java.net.http/jdk.internal.net.http.RawChannelTest */ +// use +// @run testng/othervm -Dseed=6434511950803022575 +// java.net.http/jdk.internal.net.http.RawChannelTest +// to reproduce a failure with a particular seed (e.g. 6434511950803022575) +// if this test is observed failing with that seed //-Djdk.internal.httpclient.websocket.debug=true diff -Nru openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/RawChannelTest.java openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/RawChannelTest.java --- openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/RawChannelTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/RawChannelTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ package jdk.internal.net.http; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -43,8 +44,9 @@ import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; +import java.util.concurrent.atomic.AtomicReference; + import jdk.internal.net.http.websocket.RawChannel; -import jdk.internal.net.http.websocket.WebSocketRequest; import org.testng.annotations.Test; import static java.net.http.HttpResponse.BodyHandlers.discarding; import static java.util.concurrent.TimeUnit.SECONDS; @@ -57,6 +59,20 @@ */ public class RawChannelTest { + // can't use jdk.test.lib when injected in java.net.httpclient + // Seed can be specified on the @run line with -Dseed=<seed> + private static class RandomFactory { + private static long getSeed() { + long seed = Long.getLong("seed", new Random().nextLong()); + System.out.println("Seed from RandomFactory = "+seed+"L"); + return seed; + } + public static Random getRandom() { + return new Random(getSeed()); + } + } + + private static final Random RANDOM = RandomFactory.getRandom(); private final AtomicLong clientWritten = new AtomicLong(); private final AtomicLong serverWritten = new AtomicLong(); private final AtomicLong clientRead = new AtomicLong(); @@ -90,7 +106,8 @@ server.setReuseAddress(false); server.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); int port = server.getLocalPort(); - new TestServer(server).start(); + TestServer testServer = new TestServer(server); + testServer.start(); final RawChannel chan = channelOf(port); print("RawChannel is %s", String.valueOf(chan)); @@ -129,6 +146,7 @@ } catch (IOException e) { outputCompleted.completeExceptionally(e); e.printStackTrace(); + closeChannel(chan); } return; } @@ -145,6 +163,9 @@ chan.registerEvent(this); writeStall.countDown(); // signal send buffer is full } catch (IOException e) { + print("OP_WRITE failed: " + e); + outputCompleted.completeExceptionally(e); + closeChannel(chan); throw new UncheckedIOException(e); } } @@ -168,6 +189,7 @@ read = chan.read(); } catch (IOException e) { inputCompleted.completeExceptionally(e); + closeChannel(chan); e.printStackTrace(); } if (read == null) { @@ -179,7 +201,10 @@ try { chan.registerEvent(this); } catch (IOException e) { - e.printStackTrace(); + print("OP_READ failed to register event: " + e); + inputCompleted.completeExceptionally(e); + closeChannel(chan); + throw new UncheckedIOException(e); } readStall.countDown(); break; @@ -191,21 +216,33 @@ print("OP_READ read %s bytes (%s total)", total, clientRead.get()); } }); + CompletableFuture.allOf(outputCompleted,inputCompleted) .whenComplete((r,t) -> { - try { - print("closing channel"); - chan.close(); - } catch (IOException x) { - x.printStackTrace(); - } + closeChannel(chan); }); exit.await(); // All done, we need to compare results: assertEquals(clientRead.get(), serverWritten.get()); assertEquals(serverRead.get(), clientWritten.get()); + Throwable serverError = testServer.failed.get(); + if (serverError != null) { + throw new AssertionError("TestServer failed: " + + serverError, serverError); + } } } + private static void closeChannel(RawChannel chan) { + print("closing channel"); + try { + chan.close(); + } catch (IOException x) { + print("Failed to close channel: " + x); + x.printStackTrace(); + } + } + + private static RawChannel channelOf(int port) throws Exception { URI uri = URI.create("http://localhost:" + port + "/"); print("raw channel to %s", uri.toString()); @@ -237,11 +274,24 @@ private class TestServer extends Thread { // Powered by Slowpokes private final ServerSocket server; + private final AtomicReference<Throwable> failed = new AtomicReference<>(); TestServer(ServerSocket server) throws IOException { this.server = server; } + private void fail(Closeable s, String actor, Throwable t) { + failed.compareAndSet(null, t); + print("Server %s got exception: %s", actor, t); + t.printStackTrace(); + try { + s.close(); + } catch (Exception x) { + print("Server %s failed to close socket: %s", actor, t); + } + + } + @Override public void run() { try (Socket s = server.accept()) { @@ -252,21 +302,23 @@ Thread reader = new Thread(() -> { try { + print("Server reader started"); long n = readSlowly(is); print("Server read %s bytes", n); s.shutdownInput(); } catch (Exception e) { - e.printStackTrace(); + fail(s, "reader", e); } }); Thread writer = new Thread(() -> { try { + print("Server writer started"); long n = writeSlowly(os); print("Server written %s bytes", n); s.shutdownOutput(); } catch (Exception e) { - e.printStackTrace(); + fail(s, "writer", e); } }); @@ -276,7 +328,7 @@ reader.join(); writer.join(); } catch (Exception e) { - e.printStackTrace(); + fail(server,"acceptor", e); } finally { exit.countDown(); } @@ -365,6 +417,8 @@ } private static byte[] byteArrayOfSize(int bound) { - return new byte[new Random().nextInt(1 + bound)]; + // bound must be > 1; No need to check it, + // nextInt will throw IllegalArgumentException if needed + return new byte[RANDOM.nextInt(1, bound + 1)]; } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java openjdk-25-25.0.3+9/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java --- openjdk-25-25.0.2+10/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -40,7 +40,6 @@ * @key intermittent */ -import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; @@ -77,7 +76,7 @@ }; } - @Test(dataProvider = "testCases", timeOut=30000) + @Test(dataProvider = "testCases") public void test(String desc, List<String> opts) throws Throwable { String pathVar = Platform.sharedLibraryPathVariableName(); System.out.println(pathVar + "=" + libraryPath); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java openjdk-25-25.0.3+9/test/jdk/java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java --- openjdk-25-25.0.2+10/test/jdk/java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 @@ Path file = Files.createFile(dir.resolve("test.dat")); testNanos(file); - testNanosLink(false); - testNanosLink(true); + if (TestUtil.supportsSymbolicLinks(Path.of(""))) { + testNanosLink(false); + testNanosLink(true); + } } private static void testNanos(Path path) throws IOException { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/rmi/server/RemoteServer/AddrInUse.java openjdk-25-25.0.3+9/test/jdk/java/rmi/server/RemoteServer/AddrInUse.java --- openjdk-25-25.0.2+10/test/jdk/java/rmi/server/RemoteServer/AddrInUse.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/rmi/server/RemoteServer/AddrInUse.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * 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 * @bug 4111507 * @summary retryServerSocket should not retry on BindException - * @author Ann Wollrath * * @run main/othervm AddrInUse */ @@ -33,75 +32,54 @@ import java.rmi.registry.LocateRegistry; import java.rmi.server.ExportException; -public class AddrInUse implements Runnable { +public class AddrInUse { - private static int port = -1; - private static final long TIMEOUT = 10000; - - private boolean exportSucceeded = false; - private Throwable exportException = null; - - public void run() { - - /* - * Attempt to create (i.e. export) a registry on the port that - * has already been bound, and record the result. - */ - try { - LocateRegistry.createRegistry(port); - synchronized (this) { - exportSucceeded = true; - notifyAll(); - } - } catch (Throwable t) { - synchronized (this) { - exportException = t; - notifyAll(); - } - } - } + private static volatile Throwable registryExportFailure = null; public static void main(String[] args) throws Exception { - System.err.println("\nRegression test for bug 4111507\n"); - /* * Bind a server socket to a port. */ - ServerSocket server = new ServerSocket(0); - port = server.getLocalPort(); - System.err.println("Created a ServerSocket on port " + port + "..."); - - /* - * Start a thread that creates a registry on the same port, - * and analyze the result. - */ - System.err.println("create a registry on the same port..."); - System.err.println("(should cause an ExportException)"); - AddrInUse obj = new AddrInUse(); - synchronized (obj) { - (new Thread(obj, "AddrInUse")).start(); + try (ServerSocket server = new ServerSocket(0)) { + int port = server.getLocalPort(); + System.err.println("Created a ServerSocket on port " + port + "..."); /* - * Don't wait forever (original bug is that the export - * hangs). + * Start a thread that creates a registry on the same port, + * and analyze the result. */ - obj.wait(TIMEOUT); + System.err.println("create a registry on the same port..."); + System.err.println("(should cause an ExportException)"); - if (obj.exportSucceeded) { - throw new RuntimeException( - "TEST FAILED: export on already-bound port succeeded"); - } else if (obj.exportException != null) { - obj.exportException.printStackTrace(); - if (obj.exportException instanceof ExportException) { - System.err.println("TEST PASSED"); - } else { - throw new RuntimeException( - "TEST FAILED: unexpected exception occurred", - obj.exportException); + Thread exportRegistryThread = new Thread(() -> { + /* + * Attempt to create (i.e. export) a registry on the port that + * has already been bound, and record the result. + */ + try { + LocateRegistry.createRegistry(port); + } catch (Throwable t) { + registryExportFailure = t; } - } else { - throw new RuntimeException("TEST FAILED: export timed out"); + }, "ExportRegistry-Thread"); + + exportRegistryThread.start(); + + /* + * Wait for the LocateRegistry.createRegistry() call to complete or + * if it blocks forever (due to the original bug), then let jtreg fail + * the test with a timeout + */ + exportRegistryThread.join(); + if (registryExportFailure == null) { + throw new RuntimeException( + "TEST FAILED: export on already-bound port succeeded"); + } + if (!(registryExportFailure instanceof ExportException)) { + throw new RuntimeException( + "TEST FAILED: unexpected exception occurred", registryExportFailure); } + System.err.println("TEST PASSED, received expected exception: " + registryExportFailure); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java openjdk-25-25.0.3+9/test/jdk/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java --- openjdk-25-25.0.2+10/test/jdk/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * 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,16 +54,18 @@ import java.rmi.*; import java.rmi.server.*; -import sun.rmi.transport.*; -import sun.rmi.*; import java.util.Map; import java.io.*; import java.lang.reflect.*; import java.rmi.registry.*; +import sun.rmi.transport.*; +import java.util.concurrent.CountDownLatch; public class CheckLeaseLeak extends UnicastRemoteObject implements LeaseLeak { public CheckLeaseLeak() throws RemoteException { } - public void ping () throws RemoteException { } + public void ping () throws RemoteException { + remoteCallsComplete.countDown(); + } /** * Id to fake the DGC_ID, so we can later get a reference to the @@ -75,6 +77,9 @@ private final static int numberPingCalls = 0; private final static int CHECK_INTERVAL = 400; private final static int LEASE_VALUE = 20; + private static final int NO_OF_CLIENTS = ITERATIONS; + private static final int GOOD_LUCK_FACTOR = 2; + private static CountDownLatch remoteCallsComplete = new CountDownLatch(NO_OF_CLIENTS); public static void main (String[] args) { CheckLeaseLeak leakServer = null; @@ -102,8 +107,6 @@ System.err.println("Created client: " + i); JavaVM jvm = new JavaVM("LeaseLeakClient", - " -Djava.security.policy=" + - TestParams.defaultPolicy + " -Drmi.registry.port=" + registryPort, ""); @@ -116,8 +119,14 @@ jvm.destroy(); } } + try { + remoteCallsComplete.await(); + System.out.println("remoteCallsComplete . . . "); + } catch (InterruptedException intEx) { + System.out.println("remoteCallsComplete.await interrupted . . . "); + } + Thread.sleep(NO_OF_CLIENTS * LEASE_VALUE * GOOD_LUCK_FACTOR); numLeft = getDGCLeaseTableSize(); - Thread.sleep(3000); } catch(Exception e) { TestLibrary.bomb("CheckLeaseLeak Error: ", e); @@ -128,7 +137,7 @@ } } - /* numLeft should be 2 - if 11 there is a problem. */ + /* numLeft should not be greater than 2 - if 11 there is a problem. */ if (numLeft > 2) { TestLibrary.bomb("Too many objects in DGCImpl.leaseTable: "+ numLeft); @@ -156,70 +165,62 @@ Field f; try { - f = (Field) java.security.AccessController.doPrivileged - (new java.security.PrivilegedExceptionAction() { - public Object run() throws Exception { - - ObjID dgcID = new ObjID(DGC_ID); - - /* - * Construct an ObjectEndpoint containing DGC's - * ObjID. - */ - Class oeClass = - Class.forName("sun.rmi.transport.ObjectEndpoint"); - Class[] constrParams = - new Class[]{ ObjID.class, Transport.class }; - Constructor oeConstructor = - oeClass.getDeclaredConstructor(constrParams); - oeConstructor.setAccessible(true); - Object oe = - oeConstructor.newInstance( - new Object[]{ dgcID, null }); - - /* - * Get Target that contains DGCImpl in ObjectTable - */ - Class objTableClass = - Class.forName("sun.rmi.transport.ObjectTable"); - Class getTargetParams[] = new Class[] { oeClass }; - Method objTableGetTarget = - objTableClass.getDeclaredMethod("getTarget", - getTargetParams); - objTableGetTarget.setAccessible(true); - Target dgcTarget = (Target) - objTableGetTarget.invoke(null, new Object[]{ oe }); - - /* get the DGCImpl from its Target */ - Method targetGetImpl = - dgcTarget.getClass().getDeclaredMethod + ObjID dgcID = new ObjID(DGC_ID); + /* + * Construct an ObjectEndpoint containing DGC's + * ObjID. + */ + Class oeClass = + Class.forName("sun.rmi.transport.ObjectEndpoint"); + Class[] constrParams = + new Class[]{ ObjID.class, Transport.class }; + Constructor oeConstructor = + oeClass.getDeclaredConstructor(constrParams); + oeConstructor.setAccessible(true); + Object oe = + oeConstructor.newInstance( + new Object[]{ dgcID, null }); + + /* + * Get Target that contains DGCImpl in ObjectTable + */ + Class objTableClass = + Class.forName("sun.rmi.transport.ObjectTable"); + Class getTargetParams[] = new Class[] { oeClass }; + Method objTableGetTarget = + objTableClass.getDeclaredMethod("getTarget", + getTargetParams); + objTableGetTarget.setAccessible(true); + Target dgcTarget = (Target) + objTableGetTarget.invoke(null, new Object[]{ oe }); + + /* get the DGCImpl from its Target */ + Method targetGetImpl = + dgcTarget.getClass().getDeclaredMethod ("getImpl", null); - targetGetImpl.setAccessible(true); - dgcImpl[0] = - (Remote) targetGetImpl.invoke(dgcTarget, null); - - /* Get the lease table from the DGCImpl. */ - Field reflectedLeaseTable = - dgcImpl[0].getClass().getDeclaredField + targetGetImpl.setAccessible(true); + dgcImpl[0] = + (Remote) targetGetImpl.invoke(dgcTarget, null); + + /* Get the lease table from the DGCImpl. */ + Field reflectedLeaseTable = + dgcImpl[0].getClass().getDeclaredField ("leaseTable"); - reflectedLeaseTable.setAccessible(true); + reflectedLeaseTable.setAccessible(true); + + f = reflectedLeaseTable; - return reflectedLeaseTable; - } - }); /** * This is the leaseTable that will fill up with LeaseInfo * objects if the LeaseInfo memory leak is not fixed. */ leaseTable = (Map) f.get(dgcImpl[0]); - - numLeaseInfosLeft = leaseTable.size(); + synchronized (leaseTable) { + numLeaseInfosLeft = leaseTable.size(); + } } catch(Exception e) { - if (e instanceof java.security.PrivilegedActionException) - e = ((java.security.PrivilegedActionException) e). - getException(); TestLibrary.bomb(e); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java openjdk-25-25.0.3+9/test/jdk/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java --- openjdk-25-25.0.2+10/test/jdk/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ public class LeaseLeakClient { public static void main(String args[]) { - TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager"); try { LeaseLeak leaseLeak = null; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/security/KeyStore/TestDisabledAlgorithms.java openjdk-25-25.0.3+9/test/jdk/java/security/KeyStore/TestDisabledAlgorithms.java --- openjdk-25-25.0.2+10/test/jdk/java/security/KeyStore/TestDisabledAlgorithms.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/security/KeyStore/TestDisabledAlgorithms.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8244336 + * @summary Test JCE layer algorithm restriction + * @library /test/lib + * @run main/othervm TestDisabledAlgorithms KEYSTORE.JKs true + * @run main/othervm TestDisabledAlgorithms keySTORE.what false + * @run main/othervm TestDisabledAlgorithms kEYstoRe.jceKS false + * @run main/othervm -Djdk.crypto.disabledAlgorithms="keystore.jkS" TestDisabledAlgorithms keySTORE.jceKs true + * @run main/othervm -Djdk.crypto.disabledAlgorithms="KEYstORE.what" TestDisabledAlgorithms KeYStore.JKs false + * @run main/othervm -Djdk.crypto.disabledAlgorithms="keystOre.jceKS" TestDisabledAlgorithms KEysTORE.JKS false + */ +import java.io.File; +import java.util.List; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.Provider; +import java.security.Security; +import jdk.test.lib.Utils; + +public class TestDisabledAlgorithms { + + private static final String PROP_NAME = "jdk.crypto.disabledAlgorithms"; + + // reuse existing JKS test keystore + private final static String DIR = System.getProperty("test.src", "."); + private static final char[] PASSWD = "passphrase".toCharArray(); + private static final String JKS_FN = "keystore.jks"; + + private static void test(List<String> algos, Provider p, + boolean shouldThrow) throws Exception { + + for (String a : algos) { + System.out.println("Testing " + (p != null ? p.getName() : "") + + ": " + a + ", shouldThrow=" + shouldThrow); + if (shouldThrow) { + if (p == null) { + Utils.runAndCheckException(() -> KeyStore.getInstance(a), + KeyStoreException.class); + Utils.runAndCheckException( + () -> KeyStore.getInstance(new File(DIR, JKS_FN), + PASSWD), + KeyStoreException.class); + Utils.runAndCheckException( + () -> KeyStore.getInstance(new File(DIR, JKS_FN), + () -> { + return new KeyStore.PasswordProtection(PASSWD); + }), + KeyStoreException.class); + } else { + // with a provider argument + Utils.runAndCheckException(() -> KeyStore.getInstance(a, p), + KeyStoreException.class); + Utils.runAndCheckException(() -> KeyStore.getInstance(a, + p.getName()), KeyStoreException.class); + } + } else { + KeyStore k; + if (p == null) { + k = KeyStore.getInstance(a); + System.out.println("Got KeyStore w/ algo " + k.getType()); + k = KeyStore.getInstance(new File(DIR, JKS_FN), PASSWD); + System.out.println("Got KeyStore w/ algo " + k.getType()); + k = KeyStore.getInstance(new File(DIR, JKS_FN), + () -> { + return new KeyStore.PasswordProtection(PASSWD); + }); + System.out.println("Got KeyStore w/ algo " + k.getType()); + } else { + // with a provider argument + k = KeyStore.getInstance(a, p); + k = KeyStore.getInstance(a, p.getName()); + System.out.println("Got KeyStore w/ algo " + k.getType()); + } + } + } + } + + public static void main(String[] args) throws Exception { + String propValue = args[0]; + System.out.println("Setting Security Prop " + PROP_NAME + " = " + + propValue); + Security.setProperty(PROP_NAME, propValue); + + boolean shouldThrow = Boolean.valueOf(args[1]); + + List<String> algos = List.of("JKS", "jkS"); + // test w/o provider + test(algos, null, shouldThrow); + + // test w/ provider + Provider[] providers = Security.getProviders("KeyStore.JKS"); + for (Provider p : providers) { + test(algos, p, shouldThrow); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/security/MessageDigest/TestDisabledAlgorithms.java openjdk-25-25.0.3+9/test/jdk/java/security/MessageDigest/TestDisabledAlgorithms.java --- openjdk-25-25.0.2+10/test/jdk/java/security/MessageDigest/TestDisabledAlgorithms.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/security/MessageDigest/TestDisabledAlgorithms.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8244336 + * @summary Test JCE layer algorithm restriction + * @library /test/lib + * @run main/othervm TestDisabledAlgorithms MESSAGEdigest.Sha-512 true + * @run main/othervm TestDisabledAlgorithms messageDIGest.what false + * @run main/othervm TestDisabledAlgorithms meSSagedIgest.sHA-512/224 false + */ +import java.util.List; +import java.security.NoSuchAlgorithmException; +import java.security.MessageDigest; +import java.security.Provider; +import java.security.Security; +import jdk.test.lib.Utils; + +public class TestDisabledAlgorithms { + + private static final String PROP_NAME = "jdk.crypto.disabledAlgorithms"; + + private static void test(List<String> algos, Provider p, + boolean shouldThrow) throws Exception { + + for (String a : algos) { + System.out.println("Testing " + (p != null ? p.getName() : "") + + ": " + a + ", shouldThrow=" + shouldThrow); + if (shouldThrow) { + if (p == null) { + Utils.runAndCheckException(() -> MessageDigest.getInstance(a), + NoSuchAlgorithmException.class); + } else { + Utils.runAndCheckException(() -> MessageDigest.getInstance(a, p), + NoSuchAlgorithmException.class); + Utils.runAndCheckException(() -> MessageDigest.getInstance(a, + p.getName()), NoSuchAlgorithmException.class); + } + } else { + MessageDigest m; + if (p == null) { + m = MessageDigest.getInstance(a); + } else { + m = MessageDigest.getInstance(a, p); + m = MessageDigest.getInstance(a, p.getName()); + } + System.out.println("Got MessageDigest w/ algo " + + m.getAlgorithm()); + } + } + } + + public static void main(String[] args) throws Exception { + String propValue = args[0]; + System.out.println("Setting Security Prop " + PROP_NAME + " = " + + propValue); + Security.setProperty(PROP_NAME, propValue); + + boolean shouldThrow = Boolean.valueOf(args[1]); + + List<String> algos = List.of("sHA-512", "shA-512", + "2.16.840.1.101.3.4.2.3"); + // test w/o provider + test(algos, null, shouldThrow); + + // test w/ provider + Provider[] providers = Security.getProviders("MessageDigest.SHA-512"); + for (Provider p : providers) { + test(algos, p, shouldThrow); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/security/Provider/NewInstance.java openjdk-25-25.0.3+9/test/jdk/java/security/Provider/NewInstance.java --- openjdk-25-25.0.2+10/test/jdk/java/security/Provider/NewInstance.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/security/Provider/NewInstance.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * 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,21 +26,34 @@ * @bug 8039853 * @summary Provider.Service.newInstance() does not work with current JDK JGSS Mechanisms + * @library /test/lib */ -import java.security.*; -import java.util.*; + +import jtreg.SkippedException; + +import java.security.InvalidAlgorithmParameterException; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Security; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; public class NewInstance { public static void main(String[] args) throws Exception { - for (Provider p : Security.getProviders()) { + + System.out.println("Removing SunPCSC provider from the list (A smartcard might not be installed)."); + final List<Provider> providers = Arrays.stream(Security.getProviders()) + .filter(provider -> !provider.getName().equals("SunPCSC")) + .collect(Collectors.toList()); + + for (Provider p : providers) { System.out.println("---------"); System.out.println(p.getName() + ":" + p.getInfo()); - if (p.getName().equals("SunPCSC")) { - System.out.println("A smartcard might not be installed. Skip test."); - continue; - } Set<Provider.Service> set = p.getServices(); Iterator<Provider.Service> i = set.iterator(); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/security/Provider/ProviderVersionCheck.java openjdk-25-25.0.3+9/test/jdk/java/security/Provider/ProviderVersionCheck.java --- openjdk-25-25.0.2+10/test/jdk/java/security/Provider/ProviderVersionCheck.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/security/Provider/ProviderVersionCheck.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +42,11 @@ for (Provider p: Security.getProviders()) { System.out.print(p.getName() + " "); + if (p.getName().equals(System.getProperty("test.provider.name"))) { + // Version numbers of non JDK-providers do not match JDK version number. + continue; + } + String specVersion = System.getProperty("java.specification.version"); if (p.getVersion() != Double.parseDouble(specVersion)) { System.out.println("failed. " + "Version received was " + diff -Nru openjdk-25-25.0.2+10/test/jdk/java/security/Signature/TestDisabledAlgorithms.java openjdk-25-25.0.3+9/test/jdk/java/security/Signature/TestDisabledAlgorithms.java --- openjdk-25-25.0.2+10/test/jdk/java/security/Signature/TestDisabledAlgorithms.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/security/Signature/TestDisabledAlgorithms.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8244336 + * @summary Test JCE layer algorithm restriction + * @library /test/lib + * @run main/othervm TestDisabledAlgorithms SIGNATURe.sha512withRSA true + * @run main/othervm TestDisabledAlgorithms signaturE.what false + * @run main/othervm TestDisabledAlgorithms SiGnAtUrE.SHa512/224withRSA false + */ +import java.util.List; +import java.security.NoSuchAlgorithmException; +import java.security.Signature; +import java.security.Provider; +import java.security.Security; +import jdk.test.lib.Utils; + +public class TestDisabledAlgorithms { + + private static final String PROP_NAME = "jdk.crypto.disabledAlgorithms"; + + private static void test(List<String> algos, Provider p, + boolean shouldThrow) throws Exception { + + for (String a : algos) { + System.out.println("Testing " + (p != null ? p.getName() : "") + + ": " + a + ", shouldThrow=" + shouldThrow); + if (shouldThrow) { + if (p == null) { + Utils.runAndCheckException(() -> Signature.getInstance(a), + NoSuchAlgorithmException.class); + } else { + Utils.runAndCheckException(() -> Signature.getInstance(a, p), + NoSuchAlgorithmException.class); + Utils.runAndCheckException(() -> Signature.getInstance(a, + p.getName()), NoSuchAlgorithmException.class); + } + } else { + Signature s; + if (p == null) { + s = Signature.getInstance(a); + } else { + s = Signature.getInstance(a, p); + s = Signature.getInstance(a, p.getName()); + } + System.out.println("Got Signature w/ algo " + s.getAlgorithm()); + } + } + } + + public static void main(String[] args) throws Exception { + String propValue = args[0]; + System.out.println("Setting Security Prop " + PROP_NAME + " = " + + propValue); + Security.setProperty(PROP_NAME, propValue); + + boolean shouldThrow = Boolean.valueOf(args[1]); + + List<String> algos = List.of("sha512withRsa", "1.2.840.113549.1.1.13"); + // test w/o provider + test(algos, null, shouldThrow); + + // test w/ provider + Provider[] providers = Security.getProviders("Signature.SHA512withRSA"); + for (Provider p : providers) { + test(algos, p, shouldThrow); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/security/cert/CertStore/NoLDAP.java openjdk-25-25.0.3+9/test/jdk/java/security/cert/CertStore/NoLDAP.java --- openjdk-25-25.0.2+10/test/jdk/java/security/cert/CertStore/NoLDAP.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/security/cert/CertStore/NoLDAP.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * 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,20 +25,23 @@ * @bug 8004502 * @summary Sanity check that NoSuchAlgorithmException is thrown when requesting * a CertStore of type "LDAP" and LDAP is not available. + * @library /test/lib */ import java.security.NoSuchAlgorithmException; import java.security.cert.CertStore; import java.security.cert.LDAPCertStoreParameters; +import jtreg.SkippedException; public class NoLDAP { public static void main(String[] args) throws Exception { try { Class.forName("javax.naming.ldap.LdapName"); - System.out.println("LDAP is present, test skipped"); - return; - } catch (ClassNotFoundException ignore) { } + throw new SkippedException("LDAP is present"); + } catch (ClassNotFoundException ignore) { + System.err.println("Expected: class not found exception " + ignore.getMessage()); + } try { CertStore.getInstance("LDAP", new LDAPCertStoreParameters()); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Collator/RuleBasedCollatorTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Collator/RuleBasedCollatorTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Collator/RuleBasedCollatorTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Collator/RuleBasedCollatorTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,40 +26,45 @@ * @bug 4406815 8222969 8266784 * @summary RuleBasedCollatorTest uses very limited but selected test data * to test basic functionalities provided by RuleBasedCollator. - * @run testng/othervm RuleBasedCollatorTest + * @run junit/othervm RuleBasedCollatorTest */ +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.CollationElementIterator; import java.text.CollationKey; -import java.text.RuleBasedCollator; import java.text.Collator; import java.text.ParseException; +import java.text.RuleBasedCollator; import java.util.Arrays; import java.util.Locale; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; -import org.testng.SkipException; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeFalse; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class RuleBasedCollatorTest { - static RuleBasedCollator USC; - static String US_RULES; + private static RuleBasedCollator USC; + private static String US_RULES; - @BeforeClass - public void setup() { + @BeforeAll + void setup() { Collator c = Collator.getInstance(Locale.US); - if (!(c instanceof RuleBasedCollator)) { - throw new SkipException("skip tests."); - } + assumeFalse(!(c instanceof RuleBasedCollator), "skip tests."); USC = (RuleBasedCollator) c; US_RULES = USC.getRules(); } - @DataProvider(name = "rulesData") Object[][] rulesData() { //Basic Tailor String BASIC_TAILOR_RULES = "< b=c<\u00e6;A,a"; @@ -91,15 +96,15 @@ }; } - @Test(dataProvider = "rulesData") - public void testRules(String rules, String[] testData, String[] expected) + @ParameterizedTest + @MethodSource("rulesData") + void testRules(String rules, String[] testData, String[] expected) throws ParseException { Arrays.sort(testData, new RuleBasedCollator(rules)); - assertEquals(testData, expected); + assertArrayEquals(expected, testData); } - @DataProvider(name = "FrenchSecondarySort") Object[][] FrenchSecondarySort() { return new Object[][] { { "\u0061\u00e1\u0061", "\u00e1\u0061\u0061", 1 }, @@ -111,8 +116,9 @@ { "a", "\u1ea1", -1 } }; } - @Test(dataProvider = "FrenchSecondarySort") - public void testFrenchSecondarySort(String sData, String tData, + @ParameterizedTest + @MethodSource("FrenchSecondarySort") + void testFrenchSecondarySort(String sData, String tData, int expected) throws ParseException { String french_rule = "@"; String rules = US_RULES + french_rule; @@ -121,7 +127,6 @@ assertEquals(expected, result); } - @DataProvider(name = "ThaiLaoVowelConsonantSwapping") Object[][] ThaiLaoVowelConsonantSwapping() { return new Object[][] {{"\u0e44\u0e01", "\u0e40\u0e2e", -1},//swap {"\u0e2e\u0e40", "\u0e01\u0e44", 1},//no swap @@ -129,8 +134,9 @@ }; } - @Test(dataProvider = "ThaiLaoVowelConsonantSwapping") - public void testThaiLaoVowelConsonantSwapping(String sData, String tData, + @ParameterizedTest + @MethodSource("ThaiLaoVowelConsonantSwapping") + void testThaiLaoVowelConsonantSwapping(String sData, String tData, int expected) throws ParseException { String thai_rule = "& Z < \u0e01 < \u0e2e <\u0e40 < \u0e44!"; String rules = US_RULES + thai_rule; @@ -140,16 +146,15 @@ } @Test - public void testIgnorableCharacter() throws ParseException { + void testIgnorableCharacter() throws ParseException { String rule = "=f<a<c"; RuleBasedCollator rc = new RuleBasedCollator(rule); CollationElementIterator iter = rc.getCollationElementIterator("f"); int element = iter.next(); int primary = iter.primaryOrder(element); - assertEquals(primary, 0); + assertEquals(0, primary); } - @DataProvider(name = "Normalization") Object[][] Normalization() { return new Object[][] { //micro sign has no canonical decomp mapping @@ -162,16 +167,17 @@ }; } - @Test(dataProvider = "Normalization") - public void testNormalization(String sData, String tData, int decomp, + @ParameterizedTest + @MethodSource("Normalization") + void testNormalization(String sData, String tData, int decomp, int result) { RuleBasedCollator rc = (RuleBasedCollator)USC.clone(); rc.setDecomposition(decomp); - assertEquals(rc.compare(sData, tData), result); + assertEquals(result, rc.compare(sData, tData)); } @Test - public void testEquality() throws ParseException { + void testEquality() throws ParseException { String rule1 = "<a=b"; RuleBasedCollator rc1= new RuleBasedCollator(rule1); //test equals() @@ -186,12 +192,12 @@ Arrays.sort(array1, rc1); Arrays.sort(array2, rc2); - assertEquals(array1, array2); - assertEquals(array1, expected); + assertArrayEquals(array2, array1); + assertArrayEquals(expected, array1); } @Test - public void testBasicParsingOrder() throws ParseException { + void testBasicParsingOrder() throws ParseException { String rule1 = "< a < b & a < c"; String rule2 = "< a < c & a < b"; String rule3 = "< a < b < c"; @@ -203,13 +209,12 @@ CollationKey k2 = c2.getCollationKey(s); CollationKey k3 = c3.getCollationKey(s); //rule1 should not equals to rule2 - assertEquals(k1.compareTo(k2) == 0, false); + assertNotEquals(0, k1.compareTo(k2)); //rule2 should equals to rule3 - assertEquals(k2.compareTo(k3) == 0, true); + assertEquals(0, k2.compareTo(k3)); } - @DataProvider(name = "ParseData") Object[][] ParseData() { return new Object[][] { {""}, @@ -220,14 +225,14 @@ }; } - @Test(dataProvider = "ParseData", - expectedExceptions = ParseException.class) - public void testParseException(String rule) throws ParseException{ - new RuleBasedCollator(rule); + @ParameterizedTest + @MethodSource("ParseData") + void testParseException(String rule) { + assertThrows(ParseException.class, () -> new RuleBasedCollator(rule)); } - @Test(expectedExceptions = NullPointerException.class) - public void testNullParseException() throws ParseException{ - new RuleBasedCollator(null); + @Test + void testNullParseException() { + assertThrows(NullPointerException.class, () -> new RuleBasedCollator(null)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/CompactFormatAndParseHelper.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/CompactFormatAndParseHelper.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/CompactFormatAndParseHelper.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/CompactFormatAndParseHelper.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,15 @@ import java.text.NumberFormat; import java.text.ParseException; import java.text.ParsePosition; -import static org.testng.Assert.assertEquals; + +import static org.junit.jupiter.api.Assertions.assertEquals; class CompactFormatAndParseHelper { static void testFormat(NumberFormat cnf, Object number, String expected) { String result = cnf.format(number); - assertEquals(result, expected, "Incorrect formatting of the number '" + assertEquals(expected, result, "Incorrect formatting of the number '" + number + "'"); } @@ -46,11 +47,11 @@ } if (returnType != null) { - assertEquals(number.getClass(), returnType, + assertEquals(returnType, number.getClass(), "Incorrect return type for string '" + parseString + "'"); } - assertEquals(number, expected, "Incorrect parsing of the string '" + assertEquals(expected, number, "Incorrect parsing of the string '" + parseString + "'"); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestCNFRounding.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestCNFRounding.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestCNFRounding.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestCNFRounding.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,21 +20,28 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 * @summary Checks the rounding of formatted number in compact number formatting - * @run testng/othervm TestCNFRounding + * @run junit/othervm TestCNFRounding */ +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.math.RoundingMode; import java.text.NumberFormat; import java.util.List; import java.util.Locale; -import static org.testng.Assert.*; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestCNFRounding { private static final List<RoundingMode> MODES = List.of( @@ -46,7 +53,6 @@ RoundingMode.CEILING, RoundingMode.FLOOR); - @DataProvider(name = "roundingData") Object[][] roundingData() { return new Object[][]{ // Number, half_even, half_up, half_down, up, down, ceiling, floor @@ -70,7 +76,6 @@ {-4500, new String[]{"-4K", "-5K", "-4K", "-5K", "-4K", "-4K", "-5K"}},}; } - @DataProvider(name = "roundingFract") Object[][] roundingFract() { return new Object[][]{ // Number, half_even, half_up, half_down, up, down, ceiling, floor @@ -94,7 +99,6 @@ {-4500, new String[]{"-4.5K", "-4.5K", "-4.5K", "-4.5K", "-4.5K", "-4.5K", "-4.5K"}},}; } - @DataProvider(name = "rounding2Fract") Object[][] rounding2Fract() { return new Object[][]{ // Number, half_even, half_up, half_down @@ -118,37 +122,42 @@ {4686, new String[]{"4.69K", "4.69K", "4.69K"}},}; } - @Test(expectedExceptions = NullPointerException.class) - public void testNullMode() { - NumberFormat fmt = NumberFormat - .getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); - fmt.setRoundingMode(null); + @Test + void testNullMode() { + assertThrows(NullPointerException.class, () -> { + NumberFormat fmt = NumberFormat + .getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); + fmt.setRoundingMode(null); + }); } @Test - public void testDefaultRoundingMode() { + void testDefaultRoundingMode() { NumberFormat fmt = NumberFormat .getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); - assertEquals(fmt.getRoundingMode(), RoundingMode.HALF_EVEN, + assertEquals(RoundingMode.HALF_EVEN, fmt.getRoundingMode(), "Default RoundingMode should be " + RoundingMode.HALF_EVEN); } - @Test(dataProvider = "roundingData") - public void testRounding(Object number, String[] expected) { + @ParameterizedTest + @MethodSource("roundingData") + void testRounding(Object number, String[] expected) { for (int index = 0; index < MODES.size(); index++) { testRoundingMode(number, expected[index], 0, MODES.get(index)); } } - @Test(dataProvider = "roundingFract") - public void testRoundingFract(Object number, String[] expected) { + @ParameterizedTest + @MethodSource("roundingFract") + void testRoundingFract(Object number, String[] expected) { for (int index = 0; index < MODES.size(); index++) { testRoundingMode(number, expected[index], 1, MODES.get(index)); } } - @Test(dataProvider = "rounding2Fract") - public void testRounding2Fract(Object number, String[] expected) { + @ParameterizedTest + @MethodSource("rounding2Fract") + void testRounding2Fract(Object number, String[] expected) { List<RoundingMode> rModes = List.of(RoundingMode.HALF_EVEN, RoundingMode.HALF_UP, RoundingMode.HALF_DOWN); for (int index = 0; index < rModes.size(); index++) { @@ -161,12 +170,12 @@ NumberFormat fmt = NumberFormat .getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); fmt.setRoundingMode(rounding); - assertEquals(fmt.getRoundingMode(), rounding, + assertEquals(rounding, fmt.getRoundingMode(), "RoundingMode set is not returned by getRoundingMode"); fmt.setMinimumFractionDigits(fraction); String result = fmt.format(number); - assertEquals(result, expected, "Incorrect formatting of number " + assertEquals(expected, result, "Incorrect formatting of number " + number + " using rounding mode: " + rounding); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestClone.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestClone.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestClone.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestClone.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8368328 + * @summary Tests if CompactNumberFormat.clone() creates an independent object + * @run junit/othervm --add-opens java.base/java.text=ALL-UNNAMED TestClone + */ + +import java.lang.invoke.MethodHandles; +import java.text.CompactNumberFormat; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.util.Locale; +import java.util.stream.IntStream; +import java.util.stream.Stream; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotSame; + +public class TestClone { + // Concurrently parse numbers using cloned instances as originally + // reported in the bug. This test could produce false negative results, + // depending on the testing environment + @Test + void randomAccessTest() { + var original = + NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); + var threads = IntStream.range(0, 10) + .mapToObj(num -> new Thread(() -> { + var clone = (NumberFormat) original.clone(); + for (int i = 0; i < 1000; i++) { + assertDoesNotThrow(() -> + assertEquals(num, clone.parse(String.valueOf(num)).intValue())); + } + })).toList(); + threads.forEach(Thread::start); + threads.forEach(t -> { + try { + t.join(); + } catch (InterruptedException ie) { + throw new RuntimeException(ie); + } + }); + } + + private static Stream<Arguments> referenceFields() throws ClassNotFoundException { + return Stream.of( + Arguments.of("compactPatterns", String[].class), + Arguments.of("symbols", DecimalFormatSymbols.class), + Arguments.of("decimalFormat", DecimalFormat.class), + Arguments.of("defaultDecimalFormat", DecimalFormat.class), + Arguments.of("digitList", Class.forName("java.text.DigitList")) + ); + } + // Explicitly checks if the cloned object has its own references for + // "compactPatterns", "symbols", "decimalFormat", "defaultDecimalFormat", + // and "digitList" + @ParameterizedTest + @MethodSource("referenceFields") + void whiteBoxTest(String fieldName, Class<?> type) throws Throwable { + var original = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); + var clone = original.clone(); + var lookup = MethodHandles.privateLookupIn(CompactNumberFormat.class, MethodHandles.lookup()); + + assertNotSame(lookup.findGetter(CompactNumberFormat.class, fieldName, type).invoke(original), + lookup.findGetter(CompactNumberFormat.class, fieldName, type).invoke(clone)); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestCompactNumber.java 2026-04-17 19:08:13.000000000 +0000 @@ -25,8 +25,14 @@ * @bug 8177552 8217721 8222756 8295372 8306116 8319990 8338690 * @summary Checks the functioning of compact number format * @modules jdk.localedata - * @run testng/othervm TestCompactNumber + * @run junit/othervm TestCompactNumber */ + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.math.BigDecimal; import java.math.BigInteger; import java.text.FieldPosition; @@ -36,10 +42,11 @@ import java.text.ParsePosition; import java.util.Locale; import java.util.stream.Stream; -import static org.testng.Assert.*; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestCompactNumber { private static final NumberFormat FORMAT_DZ_LONG = NumberFormat @@ -106,7 +113,6 @@ FORMAT_PT_LONG_FD4.setMaximumFractionDigits(4); } - @DataProvider(name = "format") Object[][] compactFormatData() { return new Object[][]{ // compact number format instance, number to format, formatted output @@ -378,7 +384,6 @@ }; } - @DataProvider(name = "parse") Object[][] compactParseData() { return new Object[][]{ // compact number format instance, string to parse, parsed number, return type @@ -489,7 +494,6 @@ }; } - @DataProvider(name = "exceptionParse") Object[][] exceptionParseData() { return new Object[][]{ // compact number instance, string to parse, null (no o/p; must throw exception) @@ -507,7 +511,6 @@ {FORMAT_SE_SHORT, "-8\u00a0mn", null},}; } - @DataProvider(name = "invalidParse") Object[][] invalidParseData() { return new Object[][]{ // compact number instance, string to parse, parsed number @@ -541,7 +544,6 @@ }; } - @DataProvider(name = "fieldPosition") Object[][] formatFieldPositionData() { return new Object[][]{ //compact number instance, number to format, field, start position, end position, formatted string @@ -587,7 +589,6 @@ {FORMAT_SE_SHORT, new BigDecimal("-48982865901234567890.98"), NumberFormat.Field.INTEGER, 1, 9, "\u221248982866\u00a0bn"},}; } - @DataProvider(name = "varParsePosition") Object[][] varParsePosition() { return new Object[][]{ // compact number instance, parse string, parsed number, @@ -615,73 +616,82 @@ } @Test - public void testInstanceCreation() { + void testInstanceCreation() { Stream.of(NumberFormat.getAvailableLocales()).forEach(l -> NumberFormat .getCompactNumberInstance(l, NumberFormat.Style.SHORT).format(10000)); Stream.of(NumberFormat.getAvailableLocales()).forEach(l -> NumberFormat .getCompactNumberInstance(l, NumberFormat.Style.LONG).format(10000)); } - @Test(expectedExceptions = IllegalArgumentException.class) - public void testFormatWithNullParam() { - FORMAT_EN_US_SHORT.format(null); + @Test + void testFormatWithNullParam() { + assertThrows(IllegalArgumentException.class, () -> { + FORMAT_EN_US_SHORT.format(null); + }); } - @Test(dataProvider = "format") - public void testFormat(NumberFormat cnf, Object number, + @ParameterizedTest + @MethodSource("compactFormatData") + void testFormat(NumberFormat cnf, Object number, String expected) { CompactFormatAndParseHelper.testFormat(cnf, number, expected); } - @Test(dataProvider = "parse") - public void testParse(NumberFormat cnf, String parseString, + @ParameterizedTest + @MethodSource("compactParseData") + void testParse(NumberFormat cnf, String parseString, Number expected, Class<? extends Number> returnType) throws ParseException { CompactFormatAndParseHelper.testParse(cnf, parseString, expected, null, returnType); } - @Test(dataProvider = "parse") - public void testParsePosition(NumberFormat cnf, String parseString, + @ParameterizedTest + @MethodSource("compactParseData") + void testParsePosition(NumberFormat cnf, String parseString, Number expected, Class<? extends Number> returnType) throws ParseException { ParsePosition pos = new ParsePosition(0); CompactFormatAndParseHelper.testParse(cnf, parseString, expected, pos, returnType); - assertEquals(pos.getIndex(), parseString.length()); - assertEquals(pos.getErrorIndex(), -1); + assertEquals(parseString.length(), pos.getIndex()); + assertEquals(-1, pos.getErrorIndex()); } - @Test(dataProvider = "varParsePosition") - public void testVarParsePosition(NumberFormat cnf, String parseString, + @ParameterizedTest + @MethodSource("varParsePosition") + void testVarParsePosition(NumberFormat cnf, String parseString, Number expected, int startPosition, int indexPosition, int errPosition) throws ParseException { ParsePosition pos = new ParsePosition(startPosition); CompactFormatAndParseHelper.testParse(cnf, parseString, expected, pos, null); - assertEquals(pos.getIndex(), indexPosition); - assertEquals(pos.getErrorIndex(), errPosition); + assertEquals(indexPosition, pos.getIndex()); + assertEquals(errPosition, pos.getErrorIndex()); } - @Test(dataProvider = "exceptionParse", expectedExceptions = ParseException.class) - public void throwsParseException(NumberFormat cnf, String parseString, - Number expected) throws ParseException { - CompactFormatAndParseHelper.testParse(cnf, parseString, expected, null, null); + @ParameterizedTest + @MethodSource("exceptionParseData") + void throwsParseException(NumberFormat cnf, String parseString, + Number expected) { + assertThrows(ParseException.class, () -> CompactFormatAndParseHelper.testParse(cnf, parseString, expected, null, null)); } - @Test(dataProvider = "invalidParse") - public void testInvalidParse(NumberFormat cnf, String parseString, + @ParameterizedTest + @MethodSource("invalidParseData") + void testInvalidParse(NumberFormat cnf, String parseString, Number expected) throws ParseException { CompactFormatAndParseHelper.testParse(cnf, parseString, expected, null, null); } - @Test(dataProvider = "fieldPosition") - public void testFormatWithFieldPosition(NumberFormat nf, + @ParameterizedTest + @MethodSource("formatFieldPositionData") + void testFormatWithFieldPosition(NumberFormat nf, Object number, Format.Field field, int posStartExpected, int posEndExpected, String expected) { FieldPosition pos = new FieldPosition(field); StringBuffer buf = new StringBuffer(); StringBuffer result = nf.format(number, buf, pos); - assertEquals(result.toString(), expected, "Incorrect formatting of the number '" + assertEquals(expected, result.toString(), "Incorrect formatting of the number '" + number + "'"); - assertEquals(pos.getBeginIndex(), posStartExpected, "Incorrect start position" + assertEquals(posStartExpected, pos.getBeginIndex(), "Incorrect start position" + " while formatting the number '" + number + "', for the field " + field); - assertEquals(pos.getEndIndex(), posEndExpected, "Incorrect end position" + assertEquals(posEndExpected, pos.getEndIndex(), "Incorrect end position" + " while formatting the number '" + number + "', for the field " + field); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestCompactPatternsValidity.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestCompactPatternsValidity.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestCompactPatternsValidity.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestCompactPatternsValidity.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +25,13 @@ * @bug 8177552 8217254 8251499 8281317 * @summary Checks the validity of compact number patterns specified through * CompactNumberFormat constructor - * @run testng/othervm TestCompactPatternsValidity + * @run junit/othervm TestCompactPatternsValidity */ +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.math.BigDecimal; import java.math.BigInteger; import java.text.CompactNumberFormat; @@ -35,9 +39,10 @@ import java.text.ParseException; import java.util.List; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertThrows; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestCompactPatternsValidity { // Max range 10^4 @@ -74,7 +79,6 @@ private static final String[] COMPACT_PATTERN14 = new String[]{"", "", "", "{one:Kun other:0' 'Kun}"}; // from Somali in CLDR 38 - @DataProvider(name = "invalidPatterns") Object[][] invalidCompactPatterns() { return new Object[][] { // compact patterns @@ -90,7 +94,6 @@ }; } - @DataProvider(name = "validPatternsFormat") Object[][] validPatternsFormat() { return new Object[][] { // compact patterns, numbers, expected output @@ -116,7 +119,6 @@ }; } - @DataProvider(name = "validPatternsParse") Object[][] validPatternsParse() { return new Object[][] { // compact patterns, parse string, expected output @@ -136,7 +138,6 @@ }; } - @DataProvider(name = "validPatternsFormatWithPluralRules") Object[][] validPatternsFormatWithPluralRules() { return new Object[][] { // compact patterns, plural rules, numbers, expected output @@ -144,7 +145,6 @@ }; } - @DataProvider(name = "validPatternsParseWithPluralRules") Object[][] validPatternsParseWithPluralRules() { return new Object[][] { // compact patterns, plural rules, parse string, expected output @@ -152,15 +152,18 @@ }; } - @Test(dataProvider = "invalidPatterns", - expectedExceptions = IllegalArgumentException.class) - public void testInvalidCompactPatterns(String[] compactPatterns) { - new CompactNumberFormat("#,##0.0#", DecimalFormatSymbols - .getInstance(Locale.US), compactPatterns); + @ParameterizedTest + @MethodSource("invalidCompactPatterns") + void testInvalidCompactPatterns(String[] compactPatterns) { + assertThrows(IllegalArgumentException.class, () -> { + new CompactNumberFormat("#,##0.0#", DecimalFormatSymbols + .getInstance(Locale.US), compactPatterns); + }); } - @Test(dataProvider = "validPatternsFormat") - public void testValidPatternsFormat(String[] compactPatterns, + @ParameterizedTest + @MethodSource("validPatternsFormat") + void testValidPatternsFormat(String[] compactPatterns, List<Object> numbers, List<String> expected) { CompactNumberFormat fmt = new CompactNumberFormat("#,##0.0#", DecimalFormatSymbols.getInstance(Locale.US), compactPatterns); @@ -170,8 +173,9 @@ } } - @Test(dataProvider = "validPatternsParse") - public void testValidPatternsParse(String[] compactPatterns, + @ParameterizedTest + @MethodSource("validPatternsParse") + void testValidPatternsParse(String[] compactPatterns, List<String> parseString, List<Number> numbers) throws ParseException { CompactNumberFormat fmt = new CompactNumberFormat("#,##0.0#", DecimalFormatSymbols.getInstance(Locale.US), compactPatterns); @@ -181,8 +185,9 @@ } } - @Test(dataProvider = "validPatternsFormatWithPluralRules") - public void testValidPatternsFormatWithPluralRules(String[] compactPatterns, String pluralRules, + @ParameterizedTest + @MethodSource("validPatternsFormatWithPluralRules") + void testValidPatternsFormatWithPluralRules(String[] compactPatterns, String pluralRules, List<Object> numbers, List<String> expected) { CompactNumberFormat fmt = new CompactNumberFormat("#,##0.0#", DecimalFormatSymbols.getInstance(Locale.US), compactPatterns, pluralRules); @@ -192,8 +197,9 @@ } } - @Test(dataProvider = "validPatternsParseWithPluralRules") - public void testValidPatternsParsewithPluralRules(String[] compactPatterns, String pluralRules, + @ParameterizedTest + @MethodSource("validPatternsParseWithPluralRules") + void testValidPatternsParsewithPluralRules(String[] compactPatterns, String pluralRules, List<String> parseString, List<Number> numbers) throws ParseException { CompactNumberFormat fmt = new CompactNumberFormat("#,##0.0#", DecimalFormatSymbols.getInstance(Locale.US), compactPatterns, pluralRules); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestEquality.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestEquality.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestEquality.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestEquality.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,25 +20,26 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 8222756 8327640 * @summary Checks the equals and hashCode method of CompactNumberFormat * @modules jdk.localedata - * @run testng/othervm TestEquality - * + * @run junit/othervm TestEquality */ +import org.junit.jupiter.api.Test; + import java.text.CompactNumberFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.Locale; -import org.testng.annotations.Test; public class TestEquality { @Test - public void testEquality() { + void testEquality() { CompactNumberFormat cnf1 = (CompactNumberFormat) NumberFormat .getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); @@ -160,7 +161,7 @@ } @Test - public void testHashCode() { + void testHashCode() { NumberFormat cnf1 = NumberFormat .getCompactNumberInstance(Locale.JAPAN, NumberFormat.Style.SHORT); NumberFormat cnf2 = NumberFormat @@ -175,7 +176,7 @@ // Test the property of equals and hashCode i.e. two equal object must // always have the same hashCode @Test - public void testEqualsAndHashCode() { + void testEqualsAndHashCode() { NumberFormat cnf1 = NumberFormat .getCompactNumberInstance(Locale.of("hi", "IN"), NumberFormat.Style.SHORT); cnf1.setMinimumIntegerDigits(5); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestFormatToCharacterIterator.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestFormatToCharacterIterator.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestFormatToCharacterIterator.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestFormatToCharacterIterator.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,14 +20,20 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 * @summary Checks the functioning of * CompactNumberFormat.formatToCharacterIterator method * @modules jdk.localedata - * @run testng/othervm TestFormatToCharacterIterator + * @run junit/othervm TestFormatToCharacterIterator */ + +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.math.BigDecimal; import java.math.BigInteger; import java.text.AttributedCharacterIterator; @@ -36,10 +42,10 @@ import java.text.NumberFormat; import java.util.Locale; import java.util.Set; -import static org.testng.Assert.assertEquals; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestFormatToCharacterIterator { private static final NumberFormat FORMAT_DZ = NumberFormat @@ -54,7 +60,6 @@ .getCompactNumberInstance(Locale.ENGLISH, NumberFormat.Style.LONG); - @DataProvider(name = "fieldPositions") Object[][] compactFieldPositionData() { return new Object[][]{ // compact format instance, number, resulted string, attributes/fields, attribute positions @@ -149,22 +154,23 @@ }; } - @Test(dataProvider = "fieldPositions") - public void testFormatToCharacterIterator(NumberFormat fmt, Object number, + @ParameterizedTest + @MethodSource("compactFieldPositionData") + void testFormatToCharacterIterator(NumberFormat fmt, Object number, String expected, Format.Field[] expectedFields, int[] positions) { AttributedCharacterIterator iterator = fmt.formatToCharacterIterator(number); - assertEquals(getText(iterator), expected, "Incorrect formatting of the number '" + assertEquals(expected, getText(iterator), "Incorrect formatting of the number '" + number + "'"); iterator.first(); // Check start and end index of the formatted string - assertEquals(iterator.getBeginIndex(), 0, "Incorrect start index: " + assertEquals(0, iterator.getBeginIndex(), "Incorrect start index: " + iterator.getBeginIndex() + " of the formatted string: " + expected); - assertEquals(iterator.getEndIndex(), expected.length(), "Incorrect end index: " + assertEquals(expected.length(), iterator.getEndIndex(), "Incorrect end index: " + iterator.getEndIndex() + " of the formatted string: " + expected); // Check the attributes returned by the formatToCharacterIterator - assertEquals(iterator.getAllAttributeKeys(), Set.of(expectedFields), + assertEquals(Set.of(expectedFields), iterator.getAllAttributeKeys(), "Attributes do not match while formatting number: " + number); // Check the begin and end index for attributes @@ -173,10 +179,10 @@ do { int start = iterator.getRunStart(); int end = iterator.getRunLimit(); - assertEquals(start, positions[currentPosition], + assertEquals(positions[currentPosition], start, "Incorrect start position for the attribute(s): " + iterator.getAttributes().keySet()); - assertEquals(end, positions[currentPosition + 1], + assertEquals(positions[currentPosition + 1], end, "Incorrect end position for the attribute(s): " + iterator.getAttributes().keySet()); currentPosition = currentPosition + 2; diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestMutatingInstance.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestMutatingInstance.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestMutatingInstance.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestMutatingInstance.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,6 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 @@ -27,8 +28,14 @@ * formatting parameters. For example, min fraction digits, grouping * size etc. * @modules jdk.localedata - * @run testng/othervm TestMutatingInstance + * @run junit/othervm TestMutatingInstance */ + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.math.BigDecimal; import java.math.BigInteger; import java.text.CompactNumberFormat; @@ -36,10 +43,8 @@ import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestMutatingInstance { private static final NumberFormat FORMAT_FRACTION = NumberFormat @@ -61,8 +66,8 @@ "#,##0.0#", DecimalFormatSymbols.getInstance(Locale.US), new String[]{"", "", "", "", "00K", "", "", "", "", "", "", "", "", "", ""}); - @BeforeTest - public void mutateInstances() { + @BeforeAll + void mutateInstances() { FORMAT_FRACTION.setMinimumFractionDigits(2); FORMAT_GROUPING.setGroupingSize(3); FORMAT_GROUPING.setGroupingUsed(true); @@ -75,7 +80,6 @@ FORMAT_NO_PATTERNS.setMinimumFractionDigits(2); } - @DataProvider(name = "format") Object[][] compactFormatData() { return new Object[][]{ {FORMAT_FRACTION, 1900, "1.90 thousand"}, @@ -95,7 +99,6 @@ {FORMAT_NO_PATTERNS, new BigDecimal(12346567890987654.32), "12,346,567,890,987,654"},}; } - @DataProvider(name = "parse") Object[][] compactParseData() { return new Object[][]{ {FORMAT_FRACTION, "190 thousand", 190000L}, @@ -106,14 +109,16 @@ {FORMAT_PARSEINTONLY, "12.345 thousand", 12000L},}; } - @Test(dataProvider = "format") - public void formatCompactNumber(NumberFormat nf, + @ParameterizedTest + @MethodSource("compactFormatData") + void formatCompactNumber(NumberFormat nf, Object number, String expected) { CompactFormatAndParseHelper.testFormat(nf, number, expected); } - @Test(dataProvider = "parse") - public void parseCompactNumber(NumberFormat nf, + @ParameterizedTest + @MethodSource("compactParseData") + void parseCompactNumber(NumberFormat nf, String parseString, Number expected) throws ParseException { CompactFormatAndParseHelper.testParse(nf, parseString, expected, null, null); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestParseBigDecimal.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,17 +20,19 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 8306116 8319990 * @summary Checks CNF.parse() when parseBigDecimal is set to true * @modules jdk.localedata - * @run testng/othervm TestParseBigDecimal + * @run junit/othervm TestParseBigDecimal */ -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.math.BigDecimal; import java.text.CompactNumberFormat; @@ -38,6 +40,7 @@ import java.text.ParseException; import java.util.Locale; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestParseBigDecimal { private static final CompactNumberFormat FORMAT_DZ_LONG = (CompactNumberFormat) NumberFormat @@ -64,8 +67,8 @@ private static final CompactNumberFormat FORMAT_SE_SHORT = (CompactNumberFormat) NumberFormat .getCompactNumberInstance(Locale.of("se"), NumberFormat.Style.SHORT); - @BeforeTest - public void mutateInstances() { + @BeforeAll + void mutateInstances() { FORMAT_DZ_LONG.setParseBigDecimal(true); FORMAT_EN_US_SHORT.setParseBigDecimal(true); FORMAT_EN_LONG.setParseBigDecimal(true); @@ -76,7 +79,6 @@ FORMAT_SE_SHORT.setParseBigDecimal(true); } - @DataProvider(name = "parse") Object[][] compactParseData() { return new Object[][]{ // compact number format instance, string to parse, parsed number @@ -165,8 +167,9 @@ {FORMAT_SE_SHORT, "\u221212345679,89\u00a0bn", new BigDecimal("-12345679890000000000.00")},}; } - @Test(dataProvider = "parse") - public void testParse(NumberFormat cnf, String parseString, + @ParameterizedTest + @MethodSource("compactParseData") + void testParse(NumberFormat cnf, String parseString, Number expected) throws ParseException { CompactFormatAndParseHelper.testParse(cnf, parseString, expected, null, BigDecimal.class); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestPlurals.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestPlurals.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestPlurals.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestPlurals.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,21 +20,27 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8222756 * @summary Tests plurals support in CompactNumberFormat - * @run testng/othervm TestPlurals + * @run junit/othervm TestPlurals */ +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.CompactNumberFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; -import static org.testng.Assert.*; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestPlurals { private final static DecimalFormatSymbols DFS = DecimalFormatSymbols.getInstance(Locale.ROOT); @@ -45,7 +51,6 @@ private final static String RULE_3 = "one:n%2=0andn/3=2;"; - @DataProvider Object[][] pluralRules() { return new Object[][]{ // rules, number, expected @@ -78,7 +83,6 @@ }; } - @DataProvider Object[][] invalidRules() { return new Object [][] { {"one:a = 1"}, @@ -92,27 +96,34 @@ }; } - @Test(expectedExceptions = NullPointerException.class) - public void testNullPluralRules() { - String[] pattern = {""}; - new CompactNumberFormat("#", DFS, PATTERN, null); + @Test + void testNullPluralRules() { + assertThrows(NullPointerException.class, () -> { + String[] pattern = {""}; + new CompactNumberFormat("#", DFS, PATTERN, null); + }); } - @Test(dataProvider = "pluralRules") - public void testPluralRules(String rules, Number n, String expected) { + @ParameterizedTest + @MethodSource("pluralRules") + void testPluralRules(String rules, Number n, String expected) { var cnp = new CompactNumberFormat("#", DFS, PATTERN, rules); - assertEquals(cnp.format(n), expected); - } - - @Test(dataProvider = "invalidRules", expectedExceptions = IllegalArgumentException.class) - public void testInvalidRules(String rules) { - new CompactNumberFormat("#", DFS, PATTERN, rules); + assertEquals(expected, cnp.format(n)); } - @Test(expectedExceptions = IllegalArgumentException.class) - public void testLimitExceedingRules() { - String andCond = " and n = 1"; - String invalid = "one: n = 1" + andCond.repeat(2_048 / andCond.length()); - new CompactNumberFormat("#", DFS, PATTERN, invalid); + @ParameterizedTest + @MethodSource("invalidRules") + void testInvalidRules(String rules) { + assertThrows(IllegalArgumentException.class, + () -> new CompactNumberFormat("#", DFS, PATTERN, rules)); + } + + @Test + void testLimitExceedingRules() { + assertThrows(IllegalArgumentException.class, () -> { + String andCond = " and n = 1"; + String invalid = "one: n = 1" + andCond.repeat(2_048 / andCond.length()); + new CompactNumberFormat("#", DFS, PATTERN, invalid); + }); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestSpecialValues.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestSpecialValues.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestSpecialValues.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestSpecialValues.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,25 +20,29 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 * @summary Checks the formatting and parsing of special values * @modules jdk.localedata - * @run testng/othervm TestSpecialValues + * @run junit/othervm TestSpecialValues */ + +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestSpecialValues { private static final NumberFormat FORMAT = NumberFormat .getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); - @DataProvider(name = "formatSpecialValues") Object[][] formatSpecialValues() { return new Object[][]{ // number , formatted ouput @@ -53,7 +57,6 @@ {Long.MAX_VALUE, "9223372T"},}; } - @DataProvider(name = "parseSpecialValues") Object[][] parseSpecialValues() { return new Object[][]{ // parse string, parsed number @@ -65,13 +68,15 @@ {"-\u221E", Double.NEGATIVE_INFINITY},}; } - @Test(dataProvider = "formatSpecialValues") - public void testFormatSpecialValues(Object number, String expected) { + @ParameterizedTest + @MethodSource("formatSpecialValues") + void testFormatSpecialValues(Object number, String expected) { CompactFormatAndParseHelper.testFormat(FORMAT, number, expected); } - @Test(dataProvider = "parseSpecialValues") - public void testParseSpecialValues(String parseString, Number expected) + @ParameterizedTest + @MethodSource("parseSpecialValues") + void testParseSpecialValues(String parseString, Number expected) throws ParseException { CompactFormatAndParseHelper.testParse(FORMAT, parseString, expected, null, null); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/TestUExtensionOverride.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,23 +20,27 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 8221432 * @summary Checks the behaviour of Unicode BCP 47 U Extension with * compact number format * @modules jdk.localedata - * @run testng/othervm TestUExtensionOverride + * @run junit/othervm TestUExtensionOverride */ + +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestUExtensionOverride { - @DataProvider(name = "compactFormatData") Object[][] compactFormatData() { return new Object[][]{ // locale, number, formatted string @@ -61,7 +65,6 @@ "\u0967\u0968\u00a0k"},}; } - @DataProvider(name = "compactParseData") Object[][] compactParseData() { return new Object[][]{ // locale, parse string, parsed number @@ -87,16 +90,18 @@ "\u0967\u0968\u00a0k", 12000L},}; } - @Test(dataProvider = "compactFormatData") - public void testFormat(Locale locale, double num, + @ParameterizedTest + @MethodSource("compactFormatData") + void testFormat(Locale locale, double num, String expected) { NumberFormat cnf = NumberFormat.getCompactNumberInstance(locale, NumberFormat.Style.SHORT); CompactFormatAndParseHelper.testFormat(cnf, num, expected); } - @Test(dataProvider = "compactParseData") - public void testParse(Locale locale, String parseString, + @ParameterizedTest + @MethodSource("compactParseData") + void testParse(Locale locale, String parseString, Number expected) throws ParseException { NumberFormat cnf = NumberFormat.getCompactNumberInstance(locale, NumberFormat.Style.SHORT); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestDeserializeCNF.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestDeserializeCNF.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestDeserializeCNF.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestDeserializeCNF.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 +28,12 @@ * @summary Checks deserialization of compact number format * @library /java/text/testlib * @build TestDeserializeCNF HexDumpReader - * @run testng/othervm TestDeserializeCNF + * @run junit/othervm TestDeserializeCNF */ -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; import java.io.IOException; import java.io.InputStream; @@ -41,8 +42,10 @@ import java.text.CompactNumberFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestDeserializeCNF { // This object is serialized in cnf1.ser.txt with HALF_UP @@ -60,8 +63,8 @@ private static final String FILE_COMPACT_FORMAT1 = "cnf1.ser.txt"; private static final String FILE_COMPACT_FORMAT2 = "cnf2.ser.txt"; - @BeforeTest - public void mutateInstances() { + @BeforeAll + void mutateInstances() { COMPACT_FORMAT1.setRoundingMode(RoundingMode.HALF_UP); COMPACT_FORMAT1.setGroupingSize(3); COMPACT_FORMAT1.setParseBigDecimal(true); @@ -71,18 +74,18 @@ } @Test - public void testDeserialization() throws IOException, ClassNotFoundException { + void testDeserialization() throws IOException, ClassNotFoundException { try (InputStream istream1 = HexDumpReader.getStreamFromHexDump(FILE_COMPACT_FORMAT1); ObjectInputStream ois1 = new ObjectInputStream(istream1); InputStream istream2 = HexDumpReader.getStreamFromHexDump(FILE_COMPACT_FORMAT2); ObjectInputStream ois2 = new ObjectInputStream(istream2);) { CompactNumberFormat obj1 = (CompactNumberFormat) ois1.readObject(); - assertEquals(obj1, COMPACT_FORMAT1, "Deserialized instance is not" + assertEquals(COMPACT_FORMAT1, obj1, "Deserialized instance is not" + " equal to the instance serialized in " + FILE_COMPACT_FORMAT1); CompactNumberFormat obj2 = (CompactNumberFormat) ois2.readObject(); - assertEquals(obj2, COMPACT_FORMAT2, "Deserialized instance is not" + assertEquals(COMPACT_FORMAT2, obj2, "Deserialized instance is not" + " equal to the instance serialized in " + FILE_COMPACT_FORMAT2); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestSerialization.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestSerialization.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestSerialization.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/CompactNumberFormat/serialization/TestSerialization.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,16 +20,18 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8177552 8327640 * @modules jdk.localedata * @summary Checks the serialization feature of CompactNumberFormat - * @run testng/othervm TestSerialization + * @run junit/othervm TestSerialization */ -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -40,8 +42,10 @@ import java.text.CompactNumberFormat; import java.text.NumberFormat; import java.util.Locale; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestSerialization { private static final NumberFormat FORMAT_HI = NumberFormat.getCompactNumberInstance( @@ -57,8 +61,8 @@ private static final NumberFormat FORMAT_KO_KR = NumberFormat.getCompactNumberInstance( Locale.KOREA, NumberFormat.Style.SHORT); - @BeforeTest - public void mutateInstances() { + @BeforeAll + void mutateInstances() { FORMAT_HI.setMinimumFractionDigits(2); FORMAT_HI.setMinimumIntegerDigits(5); @@ -81,7 +85,7 @@ } @Test - public void testSerialization() throws IOException, ClassNotFoundException { + void testSerialization() throws IOException, ClassNotFoundException { // Serialize serialize("cdf.ser", FORMAT_HI, FORMAT_EN_US, FORMAT_JA_JP, FORMAT_FR_FR, FORMAT_DE_DE, FORMAT_KO_KR); // Deserialize @@ -104,13 +108,13 @@ new FileInputStream(fileName))) { for (NumberFormat fmt : formats) { NumberFormat obj = (NumberFormat) os.readObject(); - assertEquals(fmt, obj, "Serialized and deserialized" + assertEquals(obj, fmt, "Serialized and deserialized" + " objects do not match"); long number = 123456789789L; String expected = fmt.format(number); String actual = obj.format(number); - assertEquals(actual, expected, "Serialized and deserialized" + assertEquals(expected, actual, "Serialized and deserialized" + " objects are expected to return same formatted" + " output for number: " + number); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/Bug8193444.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/Bug8193444.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/Bug8193444.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/Bug8193444.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,29 +20,32 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 8193444 * @summary Checks SimpleDateFormat.format/parse for the AIOOB exception when * formatting/parsing dates through a pattern string that contains a * sequence of 256 or more non-ASCII unicode characters. - * @run testng/othervm Bug8193444 + * @run junit/othervm Bug8193444 */ -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; + +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -import static org.testng.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Bug8193444 { private static final String NON_ASCII_CHAR = "\u263A"; - @DataProvider(name = "dateFormat") Object[][] dateFormatData() { return new Object[][]{ // short_length (between 0 and 254) @@ -53,8 +56,9 @@ {257},}; } - @Test(dataProvider = "dateFormat") - public void testDateFormatAndParse(int length) + @ParameterizedTest + @MethodSource("dateFormatData") + void testDateFormatAndParse(int length) throws ParseException { String pattern = NON_ASCII_CHAR.repeat(length); @@ -66,7 +70,7 @@ // Since the tested format patterns do not contain any character // representing date/time field, those characters are not interpreted, // they are simply copied into the output string during formatting - assertEquals(result, pattern, "Failed to format the date using" + assertEquals(pattern, result, "Failed to format the date using" + " pattern of length: " + length); // The format pattern used by this SimpleDateFormat diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/CaseInsensitiveParseTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/CaseInsensitiveParseTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/CaseInsensitiveParseTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/CaseInsensitiveParseTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +21,18 @@ * questions. */ -/** +/* * @test * @bug 8248434 * @modules jdk.localedata - * @run testng/othervm CaseInsensitiveParseTest * @summary Checks format/parse round trip in case-insensitive manner. + * @run junit/othervm CaseInsensitiveParseTest */ +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -37,36 +41,36 @@ import java.util.Locale; import java.util.stream.Stream; -import static org.testng.Assert.assertEquals; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class CaseInsensitiveParseTest { private final static String PATTERN = "GGGG/yyyy/MMMM/dddd/hhhh/mmmm/ss/aaaa"; private final static Date EPOCH = new Date(0L); - @DataProvider - private Object[][] locales() { + Object[][] locales() { return (Object[][])Arrays.stream(DateFormat.getAvailableLocales()) .map(Stream::of) .map(Stream::toArray) .toArray(Object[][]::new); } - @Test(dataProvider = "locales") - public void testUpperCase(Locale loc) throws ParseException { + @ParameterizedTest + @MethodSource("locales") + void testUpperCase(Locale loc) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat(PATTERN, loc); String formatted = sdf.format(EPOCH); - assertEquals(sdf.parse(formatted.toUpperCase(Locale.ROOT)), EPOCH, + assertEquals(EPOCH, sdf.parse(formatted.toUpperCase(Locale.ROOT)), "roundtrip failed for string '" + formatted + "', locale: " + loc); } - @Test(dataProvider = "locales") - public void testLowerCase(Locale loc) throws ParseException { + @ParameterizedTest + @MethodSource("locales") + void testLowerCase(Locale loc) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat(PATTERN, loc); String formatted = sdf.format(EPOCH); - assertEquals(sdf.parse(formatted.toLowerCase(Locale.ROOT)), EPOCH, + assertEquals(EPOCH, sdf.parse(formatted.toLowerCase(Locale.ROOT)), "roundtrip failed for string '" + formatted + "', locale: " + loc); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/LocaleDateFormats.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/LocaleDateFormats.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/LocaleDateFormats.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/LocaleDateFormats.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * 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,34 +21,38 @@ * questions. */ -/** +/* * @test * @bug 8080774 8174269 * @modules jdk.localedata - * @run testng LocaleDateFormats * @summary This file contains tests for JRE locales date formats + * @run junit LocaleDateFormats */ +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.DateFormat; import java.util.Calendar; import java.util.Locale; -import static org.testng.Assert.assertEquals; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class LocaleDateFormats { - @Test(dataProvider = "dateFormats") - public void testDateFormat(Locale loc, int style, int year, int month, int date, String expectedString) { + @ParameterizedTest + @MethodSource("dateFormats") + void testDateFormat(Locale loc, int style, int year, int month, int date, String expectedString) { Calendar cal = Calendar.getInstance(loc); cal.set(year, month-1, date); // Create date formatter based on requested style and test locale DateFormat df = DateFormat.getDateInstance(style, loc); // Test the date format - assertEquals(df.format(cal.getTime()), expectedString); + assertEquals(expectedString, df.format(cal.getTime())); } - @DataProvider(name = "dateFormats" ) private Object[][] dateFormats() { return new Object[][] { //8080774 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/SimpleDateFormatPatternTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/SimpleDateFormatPatternTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DateFormat/SimpleDateFormatPatternTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DateFormat/SimpleDateFormatPatternTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,21 +21,25 @@ * questions. */ -/** +/* * @test * @bug 4326988 6990146 8231213 * @summary test SimpleDateFormat, check its pattern in the constructor - * @run testng/othervm SimpleDateFormatPatternTest + * @run junit/othervm SimpleDateFormatPatternTest */ -import java.lang.IllegalArgumentException; + +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.SimpleDateFormat; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertThrows; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SimpleDateFormatPatternTest { private static String[] validPat = { "yyyy-MM-dd h.mm.ss.a z", @@ -136,90 +140,104 @@ return objArray; } - @DataProvider(name = "dfAllLocalesObj") Object[][] dfAllLocalesObj() { return dfAllLocalesObj; } - @DataProvider(name = "invalidPatternObj") Object[][] invalidPatternObj() { return invalidPatObj; } - @DataProvider(name = "validPatternObj") Object[][] validPatternObj() { return validPatObj; } //check Constructors for invalid pattern - @Test(dataProvider = "invalidPatternObj", - expectedExceptions = IllegalArgumentException.class) - public void testIllegalArgumentException1(String pattern, Locale loc) + @ParameterizedTest + @MethodSource("invalidPatternObj") + void testIllegalArgumentException1(String pattern, Locale loc) throws IllegalArgumentException { - Locale.setDefault(loc); - new SimpleDateFormat(pattern); + assertThrows(IllegalArgumentException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat(pattern); + }); } - @Test(dataProvider = "invalidPatternObj", - expectedExceptions = IllegalArgumentException.class) - public void testIllegalArgumentException2(String pattern, Locale loc) + @ParameterizedTest + @MethodSource("invalidPatternObj") + void testIllegalArgumentException2(String pattern, Locale loc) throws IllegalArgumentException { - Locale.setDefault(loc); - new SimpleDateFormat(pattern, new DateFormatSymbols()); + assertThrows(IllegalArgumentException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat(pattern, new DateFormatSymbols()); + }); } - @Test(dataProvider = "invalidPatternObj", - expectedExceptions = IllegalArgumentException.class) - public void testIllegalArgumentException3 (String pattern, Locale loc) + @ParameterizedTest + @MethodSource("invalidPatternObj") + void testIllegalArgumentException3 (String pattern, Locale loc) throws IllegalArgumentException { - Locale.setDefault(loc); - new SimpleDateFormat(pattern, Locale.getDefault()); + assertThrows(IllegalArgumentException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat(pattern, Locale.getDefault()); + }); } - @Test(dataProvider = "invalidPatternObj", - expectedExceptions = IllegalArgumentException.class) - public void testIllegalArgumentException4(String pattern, Locale loc) + @ParameterizedTest + @MethodSource("invalidPatternObj") + void testIllegalArgumentException4(String pattern, Locale loc) throws IllegalArgumentException { - Locale.setDefault(loc); - new SimpleDateFormat().applyPattern(pattern); + assertThrows(IllegalArgumentException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat().applyPattern(pattern); + }); } //check Constructors for null pattern - @Test(dataProvider = "dfAllLocalesObj", - expectedExceptions = NullPointerException.class) - public void testNullPointerException1(Locale loc) + @ParameterizedTest + @MethodSource("dfAllLocalesObj") + void testNullPointerException1(Locale loc) throws NullPointerException { - Locale.setDefault(loc); - new SimpleDateFormat(null); + assertThrows(NullPointerException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat(null); + }); } - @Test(dataProvider = "dfAllLocalesObj", - expectedExceptions = NullPointerException.class) - public void testNullPointerException2(Locale loc) + @ParameterizedTest + @MethodSource("dfAllLocalesObj") + void testNullPointerException2(Locale loc) throws NullPointerException { - Locale.setDefault(loc); - new SimpleDateFormat(null, new DateFormatSymbols()); + assertThrows(NullPointerException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat(null, new DateFormatSymbols()); + }); } - @Test(dataProvider = "dfAllLocalesObj", - expectedExceptions = NullPointerException.class) - public void testNullPointerException3(Locale loc) + @ParameterizedTest + @MethodSource("dfAllLocalesObj") + void testNullPointerException3(Locale loc) throws NullPointerException { - Locale.setDefault(loc); - new SimpleDateFormat(null, Locale.getDefault()); + assertThrows(NullPointerException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat(null, Locale.getDefault()); + }); } - @Test(dataProvider = "dfAllLocalesObj", - expectedExceptions = NullPointerException.class) - public void testNullPointerException4(Locale loc) + @ParameterizedTest + @MethodSource("dfAllLocalesObj") + void testNullPointerException4(Locale loc) throws NullPointerException { - Locale.setDefault(loc); - new SimpleDateFormat().applyPattern(null); + assertThrows(NullPointerException.class, () -> { + Locale.setDefault(loc); + new SimpleDateFormat().applyPattern(null); + }); } - @Test(dataProvider = "validPatternObj") + @ParameterizedTest //check Constructors for valid pattern - public void testValidPattern(String pattern, Locale loc) { + @MethodSource("validPatternObj") + void testValidPattern(String pattern, Locale loc) { Locale.setDefault(loc); new SimpleDateFormat(pattern); new SimpleDateFormat(pattern, new DateFormatSymbols()); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/DecimalFormat.114.txt 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,54 @@ +# +# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Hex dump of a serialized DecimalFormat for SerializationLoadTest. + +aced000573720012436865636b446563696d616c466f726d6174aa9218d3b530 +540a0200014c000a5f646563466f726d61747400194c6a6176612f746578742f +446563696d616c466f726d61743b7870737200176a6176612e746578742e4465 +63696d616c466f726d61740bff0362d872303a0200085a001b646563696d616c +536570617261746f72416c7761797353686f776e42000c67726f7570696e6753 +697a6549000a6d756c7469706c6965724c000e6e656761746976655072656669 +787400124c6a6176612f6c616e672f537472696e673b4c000e6e656761746976 +655375666669787400124c6a6176612f6c616e672f537472696e673b4c000e70 +6f7369746976655072656669787400124c6a6176612f6c616e672f537472696e +673b4c000e706f7369746976655375666669787400124c6a6176612f6c616e67 +2f537472696e673b4c000773796d626f6c737400204c6a6176612f746578742f +446563696d616c466f726d617453796d626f6c733b787200166a6176612e7465 +78742e4e756d626572466f726d6174dff6b3bf137d07e80200065a000c67726f +7570696e67557365644200116d61784672616374696f6e446967697473420010 +6d6178496e74656765724469676974734200116d696e4672616374696f6e4469 +676974734200106d696e496e74656765724469676974735a0010706172736549 +6e74656765724f6e6c79787200106a6176612e746578742e466f726d6174fbd8 +bc12e90f1843020000787001037f0001000003000000017400012d7400007400 +007400007372001e6a6176612e746578742e446563696d616c466f726d617453 +796d626f6c73501d17990868939c02000c430010646563696d616c5365706172 +61746f72430005646967697443001167726f7570696e67536570617261746f72 +4300096d696e75735369676e4300107061747465726e536570617261746f7243 +00077065724d696c6c43000770657263656e744300097a65726f44696769744c +00034e614e7400124c6a6176612f6c616e672f537472696e673b4c000e637572 +72656e637953796d626f6c7400124c6a6176612f6c616e672f537472696e673b +4c0008696e66696e6974797400124c6a6176612f6c616e672f537472696e673b +4c0012696e746c43757272656e637953796d626f6c7400124c6a6176612f6c61 +6e672f537472696e673b7870002e0023002c002d003b203000250030740003ef +bfbd74000124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.114.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.114.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.114.txt 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.114.txt 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,39 @@ +# +# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Hex dump of a serialized DecimalFormatSymbols for SerializationLoadTest. + +aced000573720019436865636b446563696d616c466f726d617453796d626f6c +737763237e1aa359bb0200014c00115f646563466f726d617453796d626f6c73 +7400204c6a6176612f746578742f446563696d616c466f726d617453796d626f +6c733b78707372001e6a6176612e746578742e446563696d616c466f726d6174 +53796d626f6c73501d17990868939c02000c430010646563696d616c53657061 +7261746f72430005646967697443001167726f7570696e67536570617261746f +724300096d696e75735369676e4300107061747465726e536570617261746f72 +4300077065724d696c6c43000770657263656e744300097a65726f4469676974 +4c00034e614e7400124c6a6176612f6c616e672f537472696e673b4c000e6375 +7272656e637953796d626f6c7400124c6a6176612f6c616e672f537472696e67 +3b4c0008696e66696e6974797400124c6a6176612f6c616e672f537472696e67 +3b4c0012696e746c43757272656e637953796d626f6c7400124c6a6176612f6c +616e672f537472696e673b7870002e0023002c002d003b203000250030740003 +efbfbd74000124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.142.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.142.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.142.txt 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/DecimalFormatSymbols.142.txt 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,42 @@ +# +# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Hex dump of a serialized DecimalFormatSymbols for SerializationLoadTest. + +aced00057372001e6a6176612e746578742e446563696d616c466f726d617453 +796d626f6c73501d17990868939c020010430010646563696d616c5365706172 +61746f72430005646967697443000b6578706f6e656e7469616c43001167726f +7570696e67536570617261746f724300096d696e75735369676e4300116d6f6e +6574617279536570617261746f724300107061747465726e536570617261746f +724300077065724d696c6c43000770657263656e7449001573657269616c5665 +7273696f6e4f6e53747265616d4300097a65726f44696769744c00034e614e74 +00124c6a6176612f6c616e672f537472696e673b4c000e63757272656e637953 +796d626f6c71007e00014c0008696e66696e69747971007e00014c0012696e74 +6c43757272656e637953796d626f6c71007e00014c00066c6f63616c65740012 +4c6a6176612f7574696c2f4c6f63616c653b7870002e00230045002c002d002e +003b20300025000000020030740003efbfbd7400172a5370656369616c437572 +72656e637953796d626f6c2a740003e2889e740003434e59737200106a617661 +2e7574696c2e4c6f63616c657ef811609c30f9ec03000449000868617368636f +64654c0007636f756e74727971007e00014c00086c616e677561676571007e00 +014c000776617269616e7471007e00017870ffffffff740002434e7400027a68 +74000078 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761a.ser.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761a.ser.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761a.ser.txt 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761a.ser.txt 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,57 @@ +# +# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Hex dump of a serialized NumberFormat for NumberRegression. + +aced0005737200176a6176612e746578742e446563696d616c466f726d61740b +ff0362d872303a02000b5a001b646563696d616c536570617261746f72416c77 +61797353686f776e42000c67726f7570696e6753697a654200116d696e457870 +6f6e656e7444696769747349000a6d756c7469706c6965724900157365726961 +6c56657273696f6e4f6e53747265616d5a00167573654578706f6e656e746961 +6c4e6f746174696f6e4c000e6e656761746976655072656669787400124c6a61 +76612f6c616e672f537472696e673b4c000e6e65676174697665537566666978 +71007e00014c000e706f73697469766550726566697871007e00014c000e706f +73697469766553756666697871007e00014c000773796d626f6c737400204c6a +6176612f746578742f446563696d616c466f726d617453796d626f6c733b7872 +00166a6176612e746578742e4e756d626572466f726d6174dff6b3bf137d07e8 +03000b5a000c67726f7570696e67557365644200116d61784672616374696f6e +4469676974734200106d6178496e74656765724469676974734900156d617869 +6d756d4672616374696f6e4469676974734900146d6178696d756d496e746567 +65724469676974734200116d696e4672616374696f6e4469676974734200106d +696e496e74656765724469676974734900156d696e696d756d4672616374696f +6e4469676974734900146d696e696d756d496e74656765724469676974735a00 +107061727365496e74656765724f6e6c7949001573657269616c56657273696f +6e4f6e53747265616d787200106a6176612e746578742e466f726d6174fbd8bc +12e90f18430200007870017f7f00000123000001217f7f000001240000012200 +00000001780003000000000100000001007400012d7400007400007400007372 +001e6a6176612e746578742e446563696d616c466f726d617453796d626f6c73 +501d17990868939c02000f430010646563696d616c536570617261746f724300 +05646967697443000b6578706f6e656e7469616c43001167726f7570696e6753 +6570617261746f724300096d696e75735369676e4300116d6f6e657461727953 +6570617261746f724300107061747465726e536570617261746f724300077065 +724d696c6c43000770657263656e7449001573657269616c56657273696f6e4f +6e53747265616d4300097a65726f44696769744c00034e614e71007e00014c00 +0e63757272656e637953796d626f6c71007e00014c0008696e66696e69747971 +007e00014c0012696e746c43757272656e637953796d626f6c71007e00017870 +002e00230045002c002d002e003b20300025000000010030740003efbfbd7400 +0124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761b.ser.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761b.ser.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761b.ser.txt 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/NumberFormat4185761b.ser.txt 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,57 @@ +# +# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Hex dump of a serialized NumberFormat for NumberRegression. + +aced0005737200176a6176612e746578742e446563696d616c466f726d61740b +ff0362d872303a02000b5a001b646563696d616c536570617261746f72416c77 +61797353686f776e42000c67726f7570696e6753697a654200116d696e457870 +6f6e656e7444696769747349000a6d756c7469706c6965724900157365726961 +6c56657273696f6e4f6e53747265616d5a00167573654578706f6e656e746961 +6c4e6f746174696f6e4c000e6e656761746976655072656669787400124c6a61 +76612f6c616e672f537472696e673b4c000e6e65676174697665537566666978 +71007e00014c000e706f73697469766550726566697871007e00014c000e706f +73697469766553756666697871007e00014c000773796d626f6c737400204c6a +6176612f746578742f446563696d616c466f726d617453796d626f6c733b7872 +00166a6176612e746578742e4e756d626572466f726d6174dff6b3bf137d07e8 +03000b5a000c67726f7570696e67557365644200116d61784672616374696f6e +4469676974734200106d6178496e74656765724469676974734900156d617869 +6d756d4672616374696f6e4469676974734900146d6178696d756d496e746567 +65724469676974734200116d696e4672616374696f6e4469676974734200106d +696e496e74656765724469676974734900156d696e696d756d4672616374696f +6e4469676974734900146d696e696d756d496e74656765724469676974735a00 +107061727365496e74656765724f6e6c7949001573657269616c56657273696f +6e4f6e53747265616d787200106a6176612e746578742e466f726d6174fbd8bc +12e90f18430200007870017f7f00000314000003127f7f000003130000031100 +00000001780003000000000100000001007400012d7400007400007400007372 +001e6a6176612e746578742e446563696d616c466f726d617453796d626f6c73 +501d17990868939c02000f430010646563696d616c536570617261746f724300 +05646967697443000b6578706f6e656e7469616c43001167726f7570696e6753 +6570617261746f724300096d696e75735369676e4300116d6f6e657461727953 +6570617261746f724300107061747465726e536570617261746f724300077065 +724d696c6c43000770657263656e7449001573657269616c56657273696f6e4f +6e53747265616d4300097a65726f44696769744c00034e614e71007e00014c00 +0e63757272656e637953796d626f6c71007e00014c0008696e66696e69747971 +007e00014c0012696e746c43757272656e637953796d626f6c71007e00017870 +002e00230045002c002d002e003b20300025000000010030740003efbfbd7400 +0124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/RoundingTiesNearZeroTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/RoundingTiesNearZeroTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/RoundingTiesNearZeroTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/RoundingTiesNearZeroTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8369050 + * @summary Check rounding of DecimalFormat on tie cases when the maximum + * fraction digits allowed is one less than the position of the first + * significant digit in the double. + * @run junit RoundingTiesNearZeroTest + */ + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.math.RoundingMode; +import java.text.NumberFormat; +import java.util.Locale; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class RoundingTiesNearZeroTest { + + // Safe to re-use since we are not testing any fast-path cases + // so state is irrelevant + private static final NumberFormat format = NumberFormat.getInstance(Locale.US); + + @ParameterizedTest + @MethodSource("ties") + void roundingTieTest(RoundingMode rm, int maxDigits, double db, String expected) { + format.setRoundingMode(rm); + format.setMaximumFractionDigits(maxDigits); + assertEquals(expected, format.format(db), "Rounding failed under " + rm); + } + + static Stream<Arguments> ties() { + return Stream.of( + // 1) String is exact as binary + // 0.5 -> 0.5 + Arguments.of(RoundingMode.HALF_EVEN, 0, 0.5, "0"), + Arguments.of(RoundingMode.HALF_UP, 0, 0.5, "1"), + Arguments.of(RoundingMode.HALF_DOWN, 0, 0.5, "0"), + // 2) String is rounded up from binary + // 0.0000005 -> 4.999999999999999773740559129431293428069693618454039096832275390625E-7 + Arguments.of(RoundingMode.HALF_EVEN, 6, 0.0000005, "0"), + Arguments.of(RoundingMode.HALF_UP, 6, 0.0000005, "0"), + Arguments.of(RoundingMode.HALF_DOWN, 6, 0.0000005, "0"), + // 3) String is not rounded up from binary + // Non-exponential notation + // 0.05 -> 0.05000000000000000277555756156289135105907917022705078125 + Arguments.of(RoundingMode.HALF_EVEN, 1, 0.05, "0.1"), + Arguments.of(RoundingMode.HALF_UP, 1, 0.05, "0.1"), + Arguments.of(RoundingMode.HALF_DOWN, 1, 0.05, "0.1"), + // Exponential notation + // 0.00005 -> 0.0000500000000000000023960868011929647991564706899225711822509765625 + Arguments.of(RoundingMode.HALF_EVEN, 4, 0.00005, "0.0001"), + Arguments.of(RoundingMode.HALF_UP, 4, 0.00005, "0.0001"), + Arguments.of(RoundingMode.HALF_DOWN, 4, 0.00005, "0.0001") + ); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/SerializationTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/SerializationTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/SerializationTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/SerializationTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * 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,65 +22,344 @@ */ /* * @test - * @bug 8327640 - * @summary Check parseStrict correctness for DecimalFormat serialization - * @run junit/othervm SerializationTest + * @bug 4069754 4067878 4101150 4185761 8327640 + * @library /java/text/testlib + * @build HexDumpReader + * @summary Check de-serialization correctness for DecimalFormat. That is, ensure the + * behavior for each stream version is correct during de-serialization. + * @run junit/othervm --add-opens java.base/java.text=ALL-UNNAMED SerializationTest */ -import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import java.io.FileInputStream; -import java.io.FileOutputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.lang.reflect.Field; +import java.math.RoundingMode; +import java.text.DateFormat; +import java.text.DecimalFormat; import java.text.NumberFormat; -import java.text.ParseException; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.Random; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; public class SerializationTest { - private static final NumberFormat FORMAT = NumberFormat.getInstance(); + @Nested // Test that rely on hex dump files that were written from older JDK versions + class HexDumpTests { - @BeforeAll - public static void mutateFormat() { - FORMAT.setStrict(true); + @Test // See 4101150 and CDF which is the serialized hex dump + void JDK1_1_4Test() { + // Reconstruct a 1.1.4 serializable class which has a DF holder + var cdf = (CheckDecimalFormat) assertDoesNotThrow( + () -> deSer("DecimalFormat.114.txt")); + assertDoesNotThrow(cdf::Update); // Checks format call succeeds + } + + @Test // See 4185761 + void minMaxDigitsTest() { + // Reconstructing a DFS stream from an older JDK version + // The min digits are smaller than the max digits and should fail + // minint maxint minfrac maxfrac + // 0x122 0x121 0x124 0x123 + assertEquals("Digit count range invalid", + assertThrows(InvalidObjectException.class, + () -> deSer("NumberFormat4185761a.ser.txt")).getMessage()); + } + + @Test // See 4185761 + void digitLimitTest() { + // Reconstructing a DFS stream from an older JDK version + // The digit values exceed the class invariant limits + // minint maxint minfrac maxfrac + // 0x311 0x312 0x313 0x314 + assertEquals("Digit count out of range", + assertThrows(InvalidObjectException.class, + () -> deSer("NumberFormat4185761b.ser.txt")).getMessage()); + } } + @Nested + class VersionTests { + + // Version 0 did not have exponential fields and defaulted the value to false + @Test + void version0Test() { + var crafted = new DFBuilder() + .setVer(0) + .set("useExponentialNotation", true) + .build(); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + // Ensure we do not observe exponential notation form + assertFalse(df.format(0).contains("E")); + } + + // Version 1 did not support the affix pattern Strings. Ensure when they + // are read in from the stream they are not defaulted and remain null. + @Test + void version1Test() { + var crafted = new DFBuilder() + .setVer(1) + .set("posPrefixPattern", null) + .set("posSuffixPattern", null) + .set("negPrefixPattern", null) + .set("negSuffixPattern", null) + .build(); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertNull(readField(df, "posPrefixPattern")); + assertNull(readField(df, "posSuffixPattern")); + assertNull(readField(df, "negPrefixPattern")); + assertNull(readField(df, "negSuffixPattern")); + } + + // Version 2 did not support the min/max int and frac digits. + // Ensure the proper defaults are set. + @Test + void version2Test() { + var crafted = new DFBuilder() + .setVer(2) + .set("maximumIntegerDigits", -1) + .set("maximumFractionDigits", -1) + .set("minimumIntegerDigits", -1) + .set("minimumFractionDigits", -1) + .build(); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertEquals(1, df.getMinimumIntegerDigits()); + assertEquals(3, df.getMaximumFractionDigits()); + assertEquals(309, df.getMaximumIntegerDigits()); + assertEquals(0, df.getMinimumFractionDigits()); + } + + // Version 3 did not support rounding mode. Should default to HALF_EVEN + @Test + void version3Test() { + var crafted = new DFBuilder() + .setVer(3) + .set("roundingMode", RoundingMode.UNNECESSARY) + .build(); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertEquals(RoundingMode.HALF_EVEN, df.getRoundingMode()); + } + } + + // Some invariant checking in DF relies on checking NF fields. + // Either via NF.readObject() or through super calls in DF.readObject + @Nested // For all these nested tests, see 4185761 + class NumberFormatTests { + + // Ensure the max integer value invariant is not exceeded + @Test + void integerTest() { + var crafted = new DFBuilder() + .setSuper("maximumIntegerDigits", 786) + .setSuper("minimumIntegerDigits", 785) + .build(); + var bytes = ser(crafted); + assertEquals("Digit count out of range", + assertThrows(InvalidObjectException.class, () -> deSer(bytes)).getMessage()); + } + + // Ensure the max fraction value invariant is not exceeded + @Test + void fractionTest() { + var crafted = new DFBuilder() + .setSuper("maximumFractionDigits", 788) + .setSuper("minimumFractionDigits", 787) + .build(); + var bytes = ser(crafted); + assertEquals("Digit count out of range", + assertThrows(InvalidObjectException.class, () -> deSer(bytes)).getMessage()); + } + + // Ensure the minimum integer digits cannot be greater than the max + @Test + void maxMinIntegerTest() { + var crafted = new DFBuilder() + .setSuper("maximumIntegerDigits", 5) + .setSuper("minimumIntegerDigits", 6) + .build(); + var bytes = ser(crafted); + assertEquals("Digit count range invalid", + assertThrows(InvalidObjectException.class, () -> deSer(bytes)).getMessage()); + } + + // Ensure the minimum fraction digits cannot be greater than the max + @Test + void maxMinFractionTest() { + var crafted = new DFBuilder() + .setSuper("maximumFractionDigits", 5) + .setSuper("minimumFractionDigits", 6) + .build(); + var bytes = ser(crafted); + assertEquals("Digit count range invalid", + assertThrows(InvalidObjectException.class, () -> deSer(bytes)).getMessage()); + } + } + + // Ensure the serial version is updated to the current after de-serialization. @Test - public void testSerialization() throws IOException, ClassNotFoundException { - // Serialize - serialize("fmt.ser", FORMAT); - // Deserialize - deserialize("fmt.ser", FORMAT); + void versionTest() { + var bytes = ser(new DFBuilder().setVer(-25).build()); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertEquals(4, readField(df, "serialVersionOnStream")); } - private void serialize(String fileName, NumberFormat... formats) - throws IOException { - try (ObjectOutputStream os = new ObjectOutputStream( - new FileOutputStream(fileName))) { - for (NumberFormat fmt : formats) { - os.writeObject(fmt); - } + // Ensure strictness value is read properly when it is set. + @Test + void strictnessTest() { + var crafted = new DecimalFormat(); + crafted.setStrict(true); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertTrue(df.isStrict()); + } + + // Ensure invalid grouping sizes are corrected to the default invariant. + @Test + void groupingSizeTest() { + var crafted = new DFBuilder() + .set("groupingSize", (byte) -5) + .build(); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertEquals(3, df.getGroupingSize()); + } + + // Ensure a de-serialized dFmt does not throw NPE from missing digitList + // later when formatting. i.e. re-construct the transient digitList field + @Test // See 4069754, 4067878 + void digitListTest() { + var crafted = new DecimalFormat(); + var bytes = ser(crafted); + var df = assertDoesNotThrow(() -> deSer(bytes)); + assertDoesNotThrow(() -> df.format(1)); + assertNotNull(readField(df, "digitList")); + } + + // Similar to the previous test, but the original regression test + // which was a failure in DateFormat due to DecimalFormat NPE + @Test // See 4069754 and 4067878 + void digitListDateFormatTest() { + var fmt = new FooFormat(); + fmt.now(); + var bytes = ser(fmt); + var ff = (FooFormat) assertDoesNotThrow(() -> deSer0(bytes)); + assertDoesNotThrow(ff::now); + } + + static class FooFormat implements Serializable { + DateFormat dateFormat = DateFormat.getDateInstance(); + + public String now() { + GregorianCalendar calendar = new GregorianCalendar(); + Date t = calendar.getTime(); + return dateFormat.format(t); } } - private static void deserialize(String fileName, NumberFormat... formats) - throws IOException, ClassNotFoundException { - try (ObjectInputStream os = new ObjectInputStream( - new FileInputStream(fileName))) { - for (NumberFormat fmt : formats) { - NumberFormat obj = (NumberFormat) os.readObject(); - assertEquals(fmt, obj, "Serialized and deserialized" - + " objects do not match"); - - String badNumber = "fooofooo23foo"; - assertThrows(ParseException.class, () -> fmt.parse(badNumber)); - assertThrows(ParseException.class, () -> obj.parse(badNumber)); +// Utilities ---- + + // Utility to serialize + private static byte[] ser(Object obj) { + return assertDoesNotThrow(() -> { + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(byteArrayOutputStream)) { + oos.writeObject(obj); + return byteArrayOutputStream.toByteArray(); } + }, "Unexpected error during serialization"); + } + + // Utility to deserialize + private static Object deSer0(byte[] bytes) throws IOException, ClassNotFoundException { + try (ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes); + ObjectInputStream ois = new ObjectInputStream(byteArrayInputStream)) { + return ois.readObject(); + } + } + + // Convenience cast to DF + private static DecimalFormat deSer(byte[] bytes) throws IOException, ClassNotFoundException { + return (DecimalFormat) deSer0(bytes); + } + + // Utility to deserialize from file in hex format + private static Object deSer(String file) throws IOException, ClassNotFoundException { + try (InputStream stream = HexDumpReader.getStreamFromHexDump(file); + ObjectInputStream ois = new ObjectInputStream(stream)) { + return ois.readObject(); + } + } + + // Utility to read a private field + private static Object readField(DecimalFormat df, String name) { + return assertDoesNotThrow(() -> { + var field = DecimalFormat.class.getDeclaredField(name); + field.setAccessible(true); + return field.get(df); + }, "Unexpected error during field reading"); + } + + // Utility class to build instances of DF via reflection + private static class DFBuilder { + + private final DecimalFormat df; + + private DFBuilder() { + df = new DecimalFormat(); + } + + private DFBuilder setVer(Object value) { + return set("serialVersionOnStream", value); + } + + private DFBuilder setSuper(String field, Object value) { + return set(df.getClass().getSuperclass(), field, value); + } + + private DFBuilder set(String field, Object value) { + return set(df.getClass(), field, value); + } + + private DFBuilder set(Class<?> clzz, String field, Object value) { + return assertDoesNotThrow(() -> { + Field f = clzz.getDeclaredField(field); + f.setAccessible(true); + f.set(df, value); + return this; + }, "Unexpected error during reflection setting"); + } + + private DecimalFormat build() { + return df; } } } + +// Not nested, so that it can be recognized and cast correctly for the 1.1.4 test +class CheckDecimalFormat implements Serializable { + DecimalFormat _decFormat = (DecimalFormat) NumberFormat.getInstance(); + public String Update() { + Random r = new Random(); + return _decFormat.format(r.nextDouble()); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/SetGroupingSizeTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/SetGroupingSizeTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/DecimalFormat/SetGroupingSizeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/DecimalFormat/SetGroupingSizeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,28 +26,27 @@ * @bug 8212749 * @summary test whether input value check for * DecimalFormat.setGroupingSize(int) works correctly. - * @run testng/othervm SetGroupingSizeTest + * @run junit/othervm SetGroupingSizeTest */ +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.text.DecimalFormat; -import static org.testng.Assert.assertEquals; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; -@Test public class SetGroupingSizeTest { - @DataProvider - public static Object[][] validGroupingSizes() { + static Object[][] validGroupingSizes() { return new Object[][] { { 0 }, { Byte.MAX_VALUE }, }; } - @DataProvider - public static Object[][] invalidGroupingSizes() { + static Object[][] invalidGroupingSizes() { return new Object[][] { { Byte.MIN_VALUE - 1 }, { Byte.MIN_VALUE }, @@ -58,17 +57,20 @@ }; } - @Test(dataProvider = "validGroupingSizes") - public void test_validGroupingSize(int newVal) { + @ParameterizedTest + @MethodSource("validGroupingSizes") + void test_validGroupingSize(int newVal) { DecimalFormat df = new DecimalFormat(); df.setGroupingSize(newVal); - assertEquals(df.getGroupingSize(), newVal); + assertEquals(newVal, df.getGroupingSize()); } - @Test(dataProvider = "invalidGroupingSizes", - expectedExceptions = IllegalArgumentException.class) - public void test_invalidGroupingSize(int newVal) { - DecimalFormat df = new DecimalFormat(); - df.setGroupingSize(newVal); + @ParameterizedTest + @MethodSource("invalidGroupingSizes") + void test_invalidGroupingSize(int newVal) { + assertThrows(IllegalArgumentException.class, () -> { + DecimalFormat df = new DecimalFormat(); + df.setGroupingSize(newVal); + }); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/Bug4944439.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/Bug4944439.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/Bug4944439.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/Bug4944439.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,22 +23,19 @@ /* * @test - * @bug 4944439 + * @bug 4944439 8372609 * @summary Confirm that numbers where all digits after the decimal separator are 0 * and which are between Long.MIN_VALUE and Long.MAX_VALUE are returned * as Long(not double). * @run junit Bug4944439 */ -import java.text.DecimalFormat; +import java.text.NumberFormat; import java.util.ArrayList; import java.util.Locale; import java.util.stream.Stream; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; @@ -47,21 +44,7 @@ public class Bug4944439 { - // Save JVM default locale - private static final Locale savedLocale = Locale.getDefault(); - private static final DecimalFormat df = new DecimalFormat(); - - // Set JVM default locale to US for testing - @BeforeAll - static void initAll() { - Locale.setDefault(Locale.US); - } - - // Restore JVM default locale - @AfterAll - static void tearDownAll() { - Locale.setDefault(savedLocale); - } + private static final NumberFormat df = NumberFormat.getInstance(Locale.US); // Check return type and value returned by DecimalFormat.parse() for longs @ParameterizedTest diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSDeserialization142.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSDeserialization142.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSDeserialization142.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSDeserialization142.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * No at-test for this test, because it needs to be run on older version JDK than 1.6 to test. - * It was tested using 1.4.2. The file object was created using JDK1.6. - */ - - - -import java.awt.*; -import java.text.*; -import java.util.*; -import java.io.*; - -public class DFSDeserialization142{ - - public static void main(String[] args) - { - try { - - File file = new File("DecimalFormatSymbols.current"); - FileInputStream istream = new FileInputStream(file); - ObjectInputStream p = new ObjectInputStream(istream); - DecimalFormatSymbols dfs = (DecimalFormatSymbols)p.readObject(); - if (dfs.getCurrencySymbol().equals("*SpecialCurrencySymbol*")){ - System.out.println("Serialization/Deserialization Test Passed."); - }else{ - throw new Exception("Serialization/Deserialization Test Failed:"+dfs.getCurrencySymbol()); - } - istream.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSMinusPerCentMill.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSMinusPerCentMill.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSMinusPerCentMill.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSMinusPerCentMill.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 8220309 8230284 * @library /java/text/testlib @@ -29,17 +29,26 @@ * This test assumes CLDR has numbering systems for "arab" and * "arabext", and their minus/percent representations include * BiDi formatting control characters. - * @run testng/othervm DFSMinusPerCentMill + * @run junit/othervm DFSMinusPerCentMill */ -import java.io.*; -import java.util.*; -import java.text.*; - -import static org.testng.Assert.*; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.util.Locale; + +import static org.junit.jupiter.api.Assertions.assertEquals; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class DFSMinusPerCentMill { private enum Type { NUMBER, PERCENT, CURRENCY, INTEGER, COMPACT, PERMILL @@ -49,7 +58,6 @@ private static final Locale US_ARABEXT = Locale.forLanguageTag("en-US-u-nu-arabext"); private static final double SRC_NUM = -1234.56; - @DataProvider Object[][] formatData() { return new Object[][] { // Locale, FormatStyle, expected format, expected single char symbol @@ -69,7 +77,6 @@ }; } - @DataProvider Object[][] charSymbols() { return new Object[][]{ // Locale, percent, per mille, minus sign @@ -78,8 +85,9 @@ }; } - @Test(dataProvider="formatData") - public void testFormatData(Locale l, Type style, String expected) { + @ParameterizedTest + @MethodSource("formatData") + void testFormatData(Locale l, Type style, String expected) { NumberFormat nf = null; switch (style) { case NUMBER: @@ -102,19 +110,20 @@ break; } - assertEquals(nf.format(SRC_NUM), expected); + assertEquals(expected, nf.format(SRC_NUM)); } - @Test(dataProvider="charSymbols") - public void testCharSymbols(Locale l, char percent, char permill, char minus) { + @ParameterizedTest + @MethodSource("charSymbols") + void testCharSymbols(Locale l, char percent, char permill, char minus) { DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(l); - assertEquals(dfs.getPercent(), percent); - assertEquals(dfs.getPerMill(), permill); - assertEquals(dfs.getMinusSign(), minus); + assertEquals(percent, dfs.getPercent()); + assertEquals(permill, dfs.getPerMill()); + assertEquals(minus, dfs.getMinusSign()); } @Test - public void testSerialization() throws Exception { + void testSerialization() throws Exception { DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); new ObjectOutputStream(bos).writeObject(dfs); @@ -122,7 +131,7 @@ new ByteArrayInputStream(bos.toByteArray()) ).readObject(); - assertEquals(dfs, dfsSerialized); + assertEquals(dfsSerialized, dfs); // set minus/percent/permille dfs.setMinusSign('a'); @@ -134,6 +143,6 @@ new ByteArrayInputStream(bos.toByteArray()) ).readObject(); - assertEquals(dfs, dfsSerialized); + assertEquals(dfsSerialized, dfs); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSSerialization.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSSerialization.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSSerialization.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSSerialization.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact 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 4068067 - * @library /java/text/testlib - * @build DFSSerialization HexDumpReader - * @run junit DFSSerialization - * @summary Three different tests are done. - * 1. read from the object created using jdk1.4.2 - * 2. create a valid DecimalFormatSymbols object with current JDK, then read the object - * 3. Try to create an valid DecimalFormatSymbols object by passing null to set null - * for the exponent separator symbol. Expect the NullPointerException. - */ - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.text.DecimalFormatSymbols; -import java.util.Locale; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.fail; - -public class DFSSerialization{ - - @Test - public void TestDFSSerialization(){ - /* - * 1. read from the object created using jdk1.4.2 - */ - File oldFile = new File(System.getProperty("test.src", "."), "DecimalFormatSymbols.142.txt"); - DecimalFormatSymbols dfs142 = readTestObject(oldFile); - if (dfs142 != null){ - if (dfs142.getExponentSeparator().equals("E") && dfs142.getCurrencySymbol().equals("*SpecialCurrencySymbol*")){ - System.out.println("\n Deserialization of JDK1.4.2 Object from the current JDK: Passed."); - System.out.println(" Deserialization of JDK1.4.2 Object from the current JDK: Passed."); - } else { - fail(" Deserialization of JDK1.4.2 Object from the current JDK was Failed:" - +dfs142.getCurrencySymbol()+" "+dfs142.getExponentSeparator()); - /* - * logically should not throw this exception as errln throws exception - * if not thrown yet - but in case errln got changed - */ - throw new RuntimeException(" Deserialization of JDK1.4.2 Object from the current JDK was Failed:" - +dfs142.getCurrencySymbol()+" "+dfs142.getExponentSeparator()); - } - } - /* - * 2. create a valid DecimalFormatSymbols object with current JDK, then read the object - */ - String validObject = "DecimalFormatSymbols.current"; - File currentFile = createTestObject(validObject, "*SpecialExponentSeparator*"); - - DecimalFormatSymbols dfsValid = readTestObject(currentFile); - if (dfsValid != null){ - if (dfsValid.getExponentSeparator().equals("*SpecialExponentSeparator*") && - dfsValid.getCurrencySymbol().equals("*SpecialCurrencySymbol*")){ - System.out.println(" Deserialization of current JDK Object from the current JDK: Passed."); - System.out.println(" Deserialization of current JDK Object from the current JDK: Passed."); - } else { - fail(" Deserialization of current JDK Object from the current JDK was Failed:" - +dfsValid.getCurrencySymbol()+" "+dfsValid.getExponentSeparator()); - /* - * logically should not throw this exception as errln throws exception - * if not thrown yet - but in case errln got changed - */ - throw new RuntimeException(" Deserialization of current Object from the current JDK was Failed:" - +dfsValid.getCurrencySymbol()+" "+dfsValid.getExponentSeparator()); - } - } - /* - * 3. Try to create an valid DecimalFormatSymbols object by passing null - * to set null for the exponent separator symbol. Expect the NullPointerException. - */ - DecimalFormatSymbols symNPE = new DecimalFormatSymbols(Locale.US); - boolean npePassed = false; - try { - symNPE.setExponentSeparator(null); - } catch (NullPointerException npe){ - npePassed = true; - System.out.println(" Trying to set exponent separator with null: Passed."); - System.out.println(" Trying to set exponent separator with null: Passed."); - } - if (!npePassed){ - System.out.println(" Trying to set exponent separator with null:Failed."); - fail(" Trying to set exponent separator with null:Failed."); - /* - * logically should not throw this exception as errln throws exception - * if not thrown yet - but in case errln got changed - */ - throw new RuntimeException(" Trying to set exponent separator with null:Failed."); - } - - } - - private DecimalFormatSymbols readTestObject(File inputFile){ - try (InputStream istream = inputFile.getName().endsWith(".txt") ? - HexDumpReader.getStreamFromHexDump(inputFile) : - new FileInputStream(inputFile)) { - ObjectInputStream p = new ObjectInputStream(istream); - DecimalFormatSymbols dfs = (DecimalFormatSymbols)p.readObject(); - return dfs; - } catch (Exception e) { - fail("Test Malfunction in DFSSerialization: Exception while reading the object"); - /* - * logically should not throw this exception as errln throws exception - * if not thrown yet - but in case errln got changed - */ - throw new RuntimeException("Test Malfunction: re-throwing the exception", e); - } - } - - private File createTestObject(String objectName, String expString){ - DecimalFormatSymbols dfs= new DecimalFormatSymbols(); - dfs.setExponentSeparator(expString); - dfs.setCurrencySymbol("*SpecialCurrencySymbol*"); - System.out.println(" The special exponent separator is set : " + dfs.getExponentSeparator()); - System.out.println(" The special currency symbol is set : " + dfs.getCurrencySymbol()); - - // 6345659: create a test object in the test.class dir where test user has a write permission. - File file = new File(System.getProperty("test.class", "."), objectName); - try (FileOutputStream ostream = new FileOutputStream(file)) { - ObjectOutputStream p = new ObjectOutputStream(ostream); - p.writeObject(dfs); - //System.out.println(" The special currency symbol is set : " + dfs.getCurrencySymbol()); - return file; - } catch (Exception e){ - fail("Test Malfunction in DFSSerialization: Exception while creating an object"); - /* - * logically should not throw this exception as errln throws exception - * if not thrown yet - but in case errln got changed - */ - throw new RuntimeException("Test Malfunction: re-throwing the exception", e); - } - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSSerialization142.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSSerialization142.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DFSSerialization142.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DFSSerialization142.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * No at-test for this test, because it needs to be run on JDK 1.4.2 - * Instead, the resulting serialized file - * DecimalFormatSymbols.142 is archived. - */ - -import java.awt.*; -import java.text.*; -import java.util.*; -import java.io.*; - -public class DFSSerialization142 { - - public static void main(String[] args) - { - try { - - DecimalFormatSymbols dfs= new DecimalFormatSymbols(); - System.out.println("Default currency symbol in the default locale : " + dfs.getCurrencySymbol()); - dfs.setCurrencySymbol("*SpecialCurrencySymbol*"); - System.out.println("The special currency symbol is set : " + dfs.getCurrencySymbol()); - FileOutputStream ostream = new FileOutputStream("DecimalFormatSymbols.142"); - ObjectOutputStream p = new ObjectOutputStream(ostream); - p.writeObject(dfs); - ostream.close(); - System.out.println("DecimalFormatSymbols saved ok."); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DecimalFormat.114.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DecimalFormat.114.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DecimalFormat.114.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DecimalFormat.114.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -# -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Hex dump of a serialized DecimalFormat for SerializationLoadTest. - -aced000573720012436865636b446563696d616c466f726d6174aa9218d3b530 -540a0200014c000a5f646563466f726d61747400194c6a6176612f746578742f -446563696d616c466f726d61743b7870737200176a6176612e746578742e4465 -63696d616c466f726d61740bff0362d872303a0200085a001b646563696d616c -536570617261746f72416c7761797353686f776e42000c67726f7570696e6753 -697a6549000a6d756c7469706c6965724c000e6e656761746976655072656669 -787400124c6a6176612f6c616e672f537472696e673b4c000e6e656761746976 -655375666669787400124c6a6176612f6c616e672f537472696e673b4c000e70 -6f7369746976655072656669787400124c6a6176612f6c616e672f537472696e -673b4c000e706f7369746976655375666669787400124c6a6176612f6c616e67 -2f537472696e673b4c000773796d626f6c737400204c6a6176612f746578742f -446563696d616c466f726d617453796d626f6c733b787200166a6176612e7465 -78742e4e756d626572466f726d6174dff6b3bf137d07e80200065a000c67726f -7570696e67557365644200116d61784672616374696f6e446967697473420010 -6d6178496e74656765724469676974734200116d696e4672616374696f6e4469 -676974734200106d696e496e74656765724469676974735a0010706172736549 -6e74656765724f6e6c79787200106a6176612e746578742e466f726d6174fbd8 -bc12e90f1843020000787001037f0001000003000000017400012d7400007400 -007400007372001e6a6176612e746578742e446563696d616c466f726d617453 -796d626f6c73501d17990868939c02000c430010646563696d616c5365706172 -61746f72430005646967697443001167726f7570696e67536570617261746f72 -4300096d696e75735369676e4300107061747465726e536570617261746f7243 -00077065724d696c6c43000770657263656e744300097a65726f44696769744c -00034e614e7400124c6a6176612f6c616e672f537472696e673b4c000e637572 -72656e637953796d626f6c7400124c6a6176612f6c616e672f537472696e673b -4c0008696e66696e6974797400124c6a6176612f6c616e672f537472696e673b -4c0012696e746c43757272656e637953796d626f6c7400124c6a6176612f6c61 -6e672f537472696e673b7870002e0023002c002d003b203000250030740003ef -bfbd74000124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.114.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.114.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.114.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.114.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -# -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Hex dump of a serialized DecimalFormatSymbols for SerializationLoadTest. - -aced000573720019436865636b446563696d616c466f726d617453796d626f6c -737763237e1aa359bb0200014c00115f646563466f726d617453796d626f6c73 -7400204c6a6176612f746578742f446563696d616c466f726d617453796d626f -6c733b78707372001e6a6176612e746578742e446563696d616c466f726d6174 -53796d626f6c73501d17990868939c02000c430010646563696d616c53657061 -7261746f72430005646967697443001167726f7570696e67536570617261746f -724300096d696e75735369676e4300107061747465726e536570617261746f72 -4300077065724d696c6c43000770657263656e744300097a65726f4469676974 -4c00034e614e7400124c6a6176612f6c616e672f537472696e673b4c000e6375 -7272656e637953796d626f6c7400124c6a6176612f6c616e672f537472696e67 -3b4c0008696e66696e6974797400124c6a6176612f6c616e672f537472696e67 -3b4c0012696e746c43757272656e637953796d626f6c7400124c6a6176612f6c -616e672f537472696e673b7870002e0023002c002d003b203000250030740003 -efbfbd74000124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.142.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.142.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.142.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/DecimalFormatSymbols.142.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -# -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Hex dump of a serialized DecimalFormatSymbols for SerializationLoadTest. - -aced00057372001e6a6176612e746578742e446563696d616c466f726d617453 -796d626f6c73501d17990868939c020010430010646563696d616c5365706172 -61746f72430005646967697443000b6578706f6e656e7469616c43001167726f -7570696e67536570617261746f724300096d696e75735369676e4300116d6f6e -6574617279536570617261746f724300107061747465726e536570617261746f -724300077065724d696c6c43000770657263656e7449001573657269616c5665 -7273696f6e4f6e53747265616d4300097a65726f44696769744c00034e614e74 -00124c6a6176612f6c616e672f537472696e673b4c000e63757272656e637953 -796d626f6c71007e00014c0008696e66696e69747971007e00014c0012696e74 -6c43757272656e637953796d626f6c71007e00014c00066c6f63616c65740012 -4c6a6176612f7574696c2f4c6f63616c653b7870002e00230045002c002d002e -003b20300025000000020030740003efbfbd7400172a5370656369616c437572 -72656e637953796d626f6c2a740003e2889e740003434e59737200106a617661 -2e7574696c2e4c6f63616c657ef811609c30f9ec03000449000868617368636f -64654c0007636f756e74727971007e00014c00086c616e677561676571007e00 -014c000776617269616e7471007e00017870ffffffff740002434e7400027a68 -74000078 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761a.ser.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761a.ser.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761a.ser.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761a.ser.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -# -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Hex dump of a serialized NumberFormat for NumberRegression. - -aced0005737200176a6176612e746578742e446563696d616c466f726d61740b -ff0362d872303a02000b5a001b646563696d616c536570617261746f72416c77 -61797353686f776e42000c67726f7570696e6753697a654200116d696e457870 -6f6e656e7444696769747349000a6d756c7469706c6965724900157365726961 -6c56657273696f6e4f6e53747265616d5a00167573654578706f6e656e746961 -6c4e6f746174696f6e4c000e6e656761746976655072656669787400124c6a61 -76612f6c616e672f537472696e673b4c000e6e65676174697665537566666978 -71007e00014c000e706f73697469766550726566697871007e00014c000e706f -73697469766553756666697871007e00014c000773796d626f6c737400204c6a -6176612f746578742f446563696d616c466f726d617453796d626f6c733b7872 -00166a6176612e746578742e4e756d626572466f726d6174dff6b3bf137d07e8 -03000b5a000c67726f7570696e67557365644200116d61784672616374696f6e -4469676974734200106d6178496e74656765724469676974734900156d617869 -6d756d4672616374696f6e4469676974734900146d6178696d756d496e746567 -65724469676974734200116d696e4672616374696f6e4469676974734200106d -696e496e74656765724469676974734900156d696e696d756d4672616374696f -6e4469676974734900146d696e696d756d496e74656765724469676974735a00 -107061727365496e74656765724f6e6c7949001573657269616c56657273696f -6e4f6e53747265616d787200106a6176612e746578742e466f726d6174fbd8bc -12e90f18430200007870017f7f00000123000001217f7f000001240000012200 -00000001780003000000000100000001007400012d7400007400007400007372 -001e6a6176612e746578742e446563696d616c466f726d617453796d626f6c73 -501d17990868939c02000f430010646563696d616c536570617261746f724300 -05646967697443000b6578706f6e656e7469616c43001167726f7570696e6753 -6570617261746f724300096d696e75735369676e4300116d6f6e657461727953 -6570617261746f724300107061747465726e536570617261746f724300077065 -724d696c6c43000770657263656e7449001573657269616c56657273696f6e4f -6e53747265616d4300097a65726f44696769744c00034e614e71007e00014c00 -0e63757272656e637953796d626f6c71007e00014c0008696e66696e69747971 -007e00014c0012696e746c43757272656e637953796d626f6c71007e00017870 -002e00230045002c002d002e003b20300025000000010030740003efbfbd7400 -0124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761b.ser.txt openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761b.ser.txt --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761b.ser.txt 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/NumberFormat4185761b.ser.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -# -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Hex dump of a serialized NumberFormat for NumberRegression. - -aced0005737200176a6176612e746578742e446563696d616c466f726d61740b -ff0362d872303a02000b5a001b646563696d616c536570617261746f72416c77 -61797353686f776e42000c67726f7570696e6753697a654200116d696e457870 -6f6e656e7444696769747349000a6d756c7469706c6965724900157365726961 -6c56657273696f6e4f6e53747265616d5a00167573654578706f6e656e746961 -6c4e6f746174696f6e4c000e6e656761746976655072656669787400124c6a61 -76612f6c616e672f537472696e673b4c000e6e65676174697665537566666978 -71007e00014c000e706f73697469766550726566697871007e00014c000e706f -73697469766553756666697871007e00014c000773796d626f6c737400204c6a -6176612f746578742f446563696d616c466f726d617453796d626f6c733b7872 -00166a6176612e746578742e4e756d626572466f726d6174dff6b3bf137d07e8 -03000b5a000c67726f7570696e67557365644200116d61784672616374696f6e -4469676974734200106d6178496e74656765724469676974734900156d617869 -6d756d4672616374696f6e4469676974734900146d6178696d756d496e746567 -65724469676974734200116d696e4672616374696f6e4469676974734200106d -696e496e74656765724469676974734900156d696e696d756d4672616374696f -6e4469676974734900146d696e696d756d496e74656765724469676974735a00 -107061727365496e74656765724f6e6c7949001573657269616c56657273696f -6e4f6e53747265616d787200106a6176612e746578742e466f726d6174fbd8bc -12e90f18430200007870017f7f00000314000003127f7f000003130000031100 -00000001780003000000000100000001007400012d7400007400007400007372 -001e6a6176612e746578742e446563696d616c466f726d617453796d626f6c73 -501d17990868939c02000f430010646563696d616c536570617261746f724300 -05646967697443000b6578706f6e656e7469616c43001167726f7570696e6753 -6570617261746f724300096d696e75735369676e4300116d6f6e657461727953 -6570617261746f724300107061747465726e536570617261746f724300077065 -724d696c6c43000770657263656e7449001573657269616c56657273696f6e4f -6e53747265616d4300097a65726f44696769744c00034e614e71007e00014c00 -0e63757272656e637953796d626f6c71007e00014c0008696e66696e69747971 -007e00014c0012696e746c43757272656e637953796d626f6c71007e00017870 -002e00230045002c002d002e003b20300025000000010030740003efbfbd7400 -0124740003e2889e740003555344 diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/NumberRegression.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/NumberRegression.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/NumberRegression.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/NumberRegression.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +28,9 @@ * 4087251 4087535 4088161 4088503 4090489 4090504 4092480 4092561 4095713 * 4098741 4099404 4101481 4106658 4106662 4106664 4108738 4110936 4122840 * 4125885 4134034 4134300 4140009 4141750 4145457 4147295 4147706 4162198 - * 4162852 4167494 4170798 4176114 4179818 4185761 4212072 4212073 4216742 - * 4217661 4243011 4243108 4330377 4233840 4241880 4833877 8008577 8227313 - * 8174269 + * 4162852 4167494 4170798 4176114 4179818 4212072 4212073 4216742 4217661 + * 4243011 4243108 4330377 4233840 4241880 4833877 8008577 8227313 8174269 + * 8369050 * @summary Regression tests for NumberFormat and associated classes * @library /java/text/testlib * @build HexDumpReader TestUtils @@ -307,33 +307,6 @@ Locale.setDefault(savedLocale); } - /* bugs 4069754, 4067878 - * null pointer thrown when accessing a deserialized DecimalFormat - * object. - */ - @Test - public void Test4069754() - { - try { - myformat it = new myformat(); - System.out.println(it.Now()); - FileOutputStream ostream = new FileOutputStream("t.tmp"); - ObjectOutputStream p = new ObjectOutputStream(ostream); - p.writeObject(it); - ostream.close(); - System.out.println("Saved ok."); - - FileInputStream istream = new FileInputStream("t.tmp"); - ObjectInputStream p2 = new ObjectInputStream(istream); - myformat it2 = (myformat)p2.readObject(); - System.out.println(it2.Now()); - istream.close(); - System.out.println("Loaded ok."); - } catch (Exception foo) { - fail("Test for bug 4069754 or 4057878 failed => Exception: " + foo.getMessage()); - } - } - /** * DecimalFormat.applyPattern(String) allows illegal patterns */ @@ -1485,59 +1458,6 @@ } } - @Test - public void Test4185761() throws IOException, ClassNotFoundException { - /* Code used to write out the initial files, which are - * then edited manually: - NumberFormat nf = NumberFormat.getInstance(Locale.US); - nf.setMinimumIntegerDigits(0x111); // Keep under 309 - nf.setMaximumIntegerDigits(0x112); // Keep under 309 - nf.setMinimumFractionDigits(0x113); // Keep under 340 - nf.setMaximumFractionDigits(0x114); // Keep under 340 - FileOutputStream ostream = - new FileOutputStream("NumberFormat4185761"); - ObjectOutputStream p = new ObjectOutputStream(ostream); - p.writeObject(nf); - ostream.close(); - */ - - // File minint maxint minfrac maxfrac - // NumberFormat4185761a 0x122 0x121 0x124 0x123 - // NumberFormat4185761b 0x311 0x312 0x313 0x314 - // File a is bad because the mins are smaller than the maxes. - // File b is bad because the values are too big for a DecimalFormat. - // These files have a sufix ".ser.txt". - - InputStream istream = HexDumpReader.getStreamFromHexDump("NumberFormat4185761a.ser.txt"); - ObjectInputStream p = new ObjectInputStream(istream); - try { - NumberFormat nf = (NumberFormat) p.readObject(); - fail("FAIL: Deserialized bogus NumberFormat int:" + - nf.getMinimumIntegerDigits() + ".." + - nf.getMaximumIntegerDigits() + " frac:" + - nf.getMinimumFractionDigits() + ".." + - nf.getMaximumFractionDigits()); - } catch (InvalidObjectException e) { - System.out.println("Ok: " + e.getMessage()); - } - istream.close(); - - istream = HexDumpReader.getStreamFromHexDump("NumberFormat4185761b.ser.txt"); - p = new ObjectInputStream(istream); - try { - NumberFormat nf = (NumberFormat) p.readObject(); - fail("FAIL: Deserialized bogus DecimalFormat int:" + - nf.getMinimumIntegerDigits() + ".." + - nf.getMaximumIntegerDigits() + " frac:" + - nf.getMinimumFractionDigits() + ".." + - nf.getMaximumFractionDigits()); - } catch (InvalidObjectException e) { - System.out.println("Ok: " + e.getMessage()); - } - istream.close(); - } - - /** * Some DecimalFormatSymbols changes are not picked up by DecimalFormat. * This includes the minus sign, currency symbol, international currency @@ -1853,7 +1773,7 @@ "2%", "1%", "2%", "2%", "1%", "0%", "0%", "1%", "1%", "1%", "0", "2", "0.2", "0.6", "0.04", - "0.04", "0.000", "0.002", + "0.04", "0.001", "0.002", }; for (int i = 0; i < input.length; i++) { DecimalFormat format = new DecimalFormat(pattern[i]); @@ -1930,20 +1850,6 @@ } } -@SuppressWarnings("serial") -class myformat implements Serializable -{ - DateFormat _dateFormat = DateFormat.getDateInstance(); - - public String Now() - { - GregorianCalendar calendar = new GregorianCalendar(); - Date t = calendar.getTime(); - String nowStr = _dateFormat.format(t); - return nowStr; - } -} - @SuppressWarnings("serial") class MyNumberFormatTest extends NumberFormat { public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/SerializationLoadTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/SerializationLoadTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/SerializationLoadTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/SerializationLoadTest.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact 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 4101150 - * @library /java/text/testlib - * @build SerializationLoadTest HexDumpReader - * @run main SerializationLoadTest - * @summary test serialization compatibility of DecimalFormat and DecimalFormatSymbols - * @key randomness - */ - -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.Serializable; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.Random; - -public class SerializationLoadTest { - - public static void main(String[] args) - { - try { - InputStream istream1 = HexDumpReader.getStreamFromHexDump("DecimalFormat.114.txt"); - ObjectInputStream p = new ObjectInputStream(istream1); - CheckDecimalFormat it = (CheckDecimalFormat)p.readObject(); - System.out.println("1.1.4 DecimalFormat Loaded ok."); - System.out.println(it.Update()); - System.out.println("Called Update successfully."); - istream1.close(); - - InputStream istream2 = HexDumpReader.getStreamFromHexDump("DecimalFormatSymbols.114.txt"); - ObjectInputStream p2 = new ObjectInputStream(istream2); - CheckDecimalFormatSymbols it2 = (CheckDecimalFormatSymbols)p2.readObject(); - System.out.println("1.1.4 DecimalFormatSymbols Loaded ok."); - System.out.println("getDigit : " + it2.Update()); - System.out.println("Called Update successfully."); - istream2.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } -} - -@SuppressWarnings("serial") -class CheckDecimalFormat implements Serializable -{ - DecimalFormat _decFormat = (DecimalFormat)NumberFormat.getInstance(); - - public String Update() - { - Random r = new Random(); - return _decFormat.format(r.nextDouble()); - } -} - -@SuppressWarnings("serial") -class CheckDecimalFormatSymbols implements Serializable -{ - DecimalFormatSymbols _decFormatSymbols = new DecimalFormatSymbols(); - - public char Update() - { - return _decFormatSymbols.getDigit(); - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/SerializationSaveTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/SerializationSaveTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Format/NumberFormat/SerializationSaveTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Format/NumberFormat/SerializationSaveTest.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * No at-test for this test, because it needs to be run on JDK 1.1.4. - * Instead, the resulting serialized files DecimalFormat.114 and - * DecimalFormatSymbols.114 are archived. - */ - -import java.awt.*; -import java.text.*; -import java.util.*; -import java.io.*; - -public class SerializationSaveTest { - - public static void main(String[] args) - { - try { - CheckDecimalFormat it = new CheckDecimalFormat(); - System.out.println(it.Update()); - FileOutputStream ostream = new FileOutputStream("DecimalFormat.114"); - ObjectOutputStream p = new ObjectOutputStream(ostream); - p.writeObject(it); - ostream.close(); - System.out.println("DecimalFormat saved ok."); - CheckDecimalFormatSymbols it2 = new CheckDecimalFormatSymbols(); - System.out.println("getDigit : " + it2.Update()); - FileOutputStream ostream2 = new FileOutputStream("DecimalFormatSymbols.114"); - ObjectOutputStream p2 = new ObjectOutputStream(ostream2); - p2.writeObject(it2); - ostream2.close(); - System.out.println("DecimalFormatSymbols saved ok."); - } catch (Exception e) { - e.printStackTrace(); - } - } -} - -@SuppressWarnings("serial") -class CheckDecimalFormat implements Serializable -{ - DecimalFormat _decFormat = (DecimalFormat)NumberFormat.getInstance(); - - public String Update() - { - Random r = new Random(); - return _decFormat.format(r.nextDouble()); - } -} - -@SuppressWarnings("serial") -class CheckDecimalFormatSymbols implements Serializable -{ - DecimalFormatSymbols _decFormatSymbols = new DecimalFormatSymbols(); - - public char Update() - { - return _decFormatSymbols.getDigit(); - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/text/Normalizer/SquareEraCharacterTest.java openjdk-25-25.0.3+9/test/jdk/java/text/Normalizer/SquareEraCharacterTest.java --- openjdk-25-25.0.2+10/test/jdk/java/text/Normalizer/SquareEraCharacterTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/text/Normalizer/SquareEraCharacterTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,20 +25,20 @@ * @test * @bug 8221431 * @summary Tests decomposition of Japanese square era characters. - * @run testng/othervm SquareEraCharacterTest + * @run junit/othervm SquareEraCharacterTest */ -import static org.testng.Assert.assertEquals; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.text.Normalizer; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SquareEraCharacterTest { - @DataProvider Object[][] squareEras() { return new Object[][] { @@ -51,12 +51,10 @@ }; } - @Test(dataProvider="squareEras") - public void test_normalize(char squareChar, String expected) { - - assertEquals( - Normalizer.normalize(Character.toString(squareChar), Normalizer.Form.NFKD), - expected, + @ParameterizedTest + @MethodSource("squareEras") + void test_normalize(char squareChar, String expected) { + assertEquals(expected, Normalizer.normalize(Character.toString(squareChar), Normalizer.Form.NFKD), "decomposing " + Character.getName(squareChar) + "."); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/CalendarDisplayNamesTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/CalendarDisplayNamesTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/CalendarDisplayNamesTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/CalendarDisplayNamesTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,21 +21,21 @@ * questions. */ -import org.testng.Assert; -import org.testng.annotations.Test; import java.util.Calendar; import java.util.Locale; import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; /** * @test * @bug 8262108 8174269 * @summary Verify the results returned by Calendar.getDisplayNames() API * @comment Locale providers: CLDR,SPI - * @run testng/othervm -Djava.locale.providers=CLDR,SPI CalendarDisplayNamesTest + * @run junit/othervm -Djava.locale.providers=CLDR,SPI CalendarDisplayNamesTest * @comment Locale providers: default - * @run testng CalendarDisplayNamesTest + * @run junit CalendarDisplayNamesTest */ public class CalendarDisplayNamesTest { @@ -55,7 +55,7 @@ continue; } for (final Integer fieldValue : names.values()) { - Assert.assertTrue(fieldValue == Calendar.AM || fieldValue == Calendar.PM, + Assertions.assertTrue(fieldValue == Calendar.AM || fieldValue == Calendar.PM, "Invalid field value " + fieldValue + " for calendar field AM_PM, in locale " + locale + " with style " + style); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/JapaneseLenientEraTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/JapaneseLenientEraTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/JapaneseLenientEraTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/JapaneseLenientEraTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @bug 8206120 * @summary Test whether lenient era is accepted in JapaneseImperialCalendar - * @run testng/othervm JapaneseLenientEraTest + * @run junit/othervm JapaneseLenientEraTest */ import java.text.DateFormat; @@ -34,15 +34,15 @@ import java.util.Date; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class JapaneseLenientEraTest { - @DataProvider(name="lenientEra") - Object[][] names() { + Object[][] lenientEra() { return new Object[][] { // lenient era/year, strict era/year { "Meiji 123", "Heisei 2" }, @@ -51,7 +51,8 @@ }; } - @Test(dataProvider="lenientEra") + @ParameterizedTest + @MethodSource("lenientEra") public void testLenientEra(String lenient, String strict) throws Exception { Calendar c = new Calendar.Builder() .setCalendarType("japanese") @@ -61,6 +62,6 @@ Date lenDate = df.parse(lenient + "-01-01"); df.setLenient(false); Date strDate = df.parse(strict + "-01-01"); - assertEquals(lenDate, strDate); + assertEquals(strDate, lenDate); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/RollHoursTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/RollHoursTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/RollHoursTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/RollHoursTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8367901 + * @summary Ensure hour rolling is correct. Particularly, when the HOUR/HOUR_OF_DAY + * amount rolled would cause the calendar to originate on the same hour as before + * the call. + * @run junit RollHoursTest + */ + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.FieldSource; + +import java.text.DateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.TimeZone; +import java.util.stream.IntStream; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class RollHoursTest { + + // Should trigger multiple full HOUR/HOUR_OF_DAY cycles + private static final List<Integer> hours = + IntStream.rangeClosed(-55, 55).boxed().toList(); + // Various calendars to test against + private static final List<Calendar> calendars = List.of( + // GMT, independent of daylight saving time transitions + new GregorianCalendar(TimeZone.getTimeZone("GMT")), + // Daylight saving observing calendars + new GregorianCalendar(TimeZone.getTimeZone("America/Chicago")), + new GregorianCalendar(TimeZone.getTimeZone("America/Chicago")), + new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles")), + new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles")) + ); + + // Reset the times of each calendar. These calendars provide testing under + // daylight saving transitions (or the lack thereof) and different AM/PM hours. + @BeforeEach + void clear() { + // Reset all calendars each iteration for clean slate + calendars.forEach(Calendar::clear); + + // Basic test, independent of daylight saving transitions + calendars.get(0).set(2005, 8, 20, 12, 10, 25); + + // Transition to daylight saving time (CST/CDT) --- + // Day of transition: 03/13/2016 (Sunday) + // Most interesting test case due to 2 AM skip + calendars.get(1).set(2016, 2, 13, 3, 30, 55); + // Day before transition: 03/12/2016 (Saturday) + calendars.get(2).set(2016, 2, 12, 15, 20, 45); + + // Transition back to standard time (PST/PDT) ---- + // Day of transition: 11/06/2016 (Sunday) + calendars.get(3).set(2016, 10, 6, 4, 15, 20); + // Day before transition: 11/05/2016 (Saturday) + calendars.get(4).set(2016, 10, 5, 12, 25, 30); + } + + // Rolling the HOUR_OF_DAY field. + @ParameterizedTest + @FieldSource("hours") + void HourOfDayTest(int hoursToRoll) { + for (var cal : calendars) { + var savedTime = cal.getTime(); + var savedHour = cal.get(Calendar.HOUR_OF_DAY); + cal.roll(Calendar.HOUR_OF_DAY, hoursToRoll); + assertEquals(getExpectedHour(hoursToRoll, savedHour, 24, cal, savedTime), + cal.get(Calendar.HOUR_OF_DAY), + getMessage(cal.getTimeZone(), savedTime, hoursToRoll)); + } + } + + // Rolling the HOUR field. + @ParameterizedTest + @FieldSource("hours") + void HourTest(int hoursToRoll) { + for (var cal : calendars) { + var savedTime = cal.getTime(); + var savedHour = cal.get(Calendar.HOUR_OF_DAY); + cal.roll(Calendar.HOUR, hoursToRoll); + assertEquals(getExpectedHour(hoursToRoll, savedHour, 12, cal, savedTime), + cal.get(Calendar.HOUR), + getMessage(cal.getTimeZone(), savedTime, hoursToRoll)); + } + } + + // Gets the expected hour after rolling by X hours. Supports 12/24-hour cycle. + // Special handling for non-existent 2 AM case on transition day. + private static int getExpectedHour(int roll, int hour, int hourCycle, Calendar cal, Date oldDate) { + // For example with HOUR_OF_DAY at 15 and a 24-hour cycle + // For rolling forwards 50 hours -> (50 + 15) % 24 = 17 + // For hour backwards 50 hours -> (24 + (15 - 50) % 24) % 24 + // -> (24 - 11) % 24 = 13 + var result = (roll >= 0 ? (hour + roll) : (hourCycle + (hour + roll) % hourCycle)) % hourCycle; + + // 2 AM does not exist on transition day. Calculate normalized value accordingly + if (cal.getTimeZone().inDaylightTime(oldDate) && cal.get(Calendar.MONTH) == Calendar.MARCH && result == 2) { + return roll > 0 ? result + 1 : result - 1; + } else { + // Normal return value + return result; + } + } + + // Get a TimeZone adapted error message + private static String getMessage(TimeZone tz, Date date, int hoursToRoll) { + var fmt = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL); + fmt.setTimeZone(tz); + return fmt.format(date) + " incorrectly rolled " + hoursToRoll; + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Calendar/SupplementalJapaneseEraTestRun.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,7 +27,7 @@ * @summary Test for jdk.calendar.japanese.supplemental.era support * @library /test/lib * @build SupplementalJapaneseEraTest - * @run testng/othervm SupplementalJapaneseEraTestRun + * @run junit/othervm SupplementalJapaneseEraTestRun */ import java.util.Calendar; @@ -45,11 +45,12 @@ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.Utils; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class SupplementalJapaneseEraTestRun { - @DataProvider(name = "validprop") Object[][] validPropertyData() { return new Object[][] { //Tests with valid property values @@ -58,7 +59,6 @@ }; } - @DataProvider(name = "invalidprop") Object[][] invalidPropertyData() { return new Object[][] { //Tests with invalid property values @@ -76,7 +76,8 @@ }; } - @Test(dataProvider = "validprop") + @ParameterizedTest + @MethodSource("validPropertyData") public void ValidPropertyValuesTest(String prop) throws Throwable { //get the start time of the fictional next era @@ -84,7 +85,8 @@ testRun(prop + startTime, List.of("-t")); } - @Test(dataProvider = "invalidprop") + @ParameterizedTest + @MethodSource("invalidPropertyData") public void InvalidPropertyValuesTest(String prop) throws Throwable { //get the start time of the fictional next era diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/LocaleMatchingTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/LocaleMatchingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/LocaleMatchingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/LocaleMatchingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +25,13 @@ * @test * @bug 7069824 8042360 8032842 8175539 8210443 8242010 8276302 * @summary Verify implementation for Locale matching. - * @run testng/othervm LocaleMatchingTest + * @run junit/othervm LocaleMatchingTest */ +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -40,15 +44,14 @@ import static java.util.Locale.FilteringMode.*; import static java.util.Locale.LanguageRange.*; -import static org.testng.Assert.*; - -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; public class LocaleMatchingTest { - @DataProvider(name = "LRConstructorData") - Object[][] LRConstructorData() { + static Object[][] LRConstructorData() { return new Object[][] { // Range, Weight {"elvish", MAX_WEIGHT}, @@ -62,8 +65,7 @@ }; } - @DataProvider(name = "LRConstructorNPEData") - Object[][] LRConstructorNPEData() { + static Object[][] LRConstructorNPEData() { return new Object[][] { // Range, Weight {null, MAX_WEIGHT}, @@ -71,8 +73,7 @@ }; } - @DataProvider(name = "LRConstructorIAEData") - Object[][] LRConstructorIAEData() { + static Object[][] LRConstructorIAEData() { return new Object[][] { // Range, Weight {"ja", -0.8}, @@ -93,8 +94,7 @@ }; } - @DataProvider(name = "LRParseData") - Object[][] LRParseData() { + static Object[][] LRParseData() { return new Object[][] { // Ranges, Expected result {"Accept-Language: fr-FX, de-DE;q=0.5, fr-tp-x-FOO;q=0.1, " @@ -139,8 +139,7 @@ }; } - @DataProvider(name = "LRParseIAEData") - Object[][] LRParseIAEData() { + static Object[][] LRParseIAEData() { return new Object[][] { // Ranges {""}, @@ -148,8 +147,7 @@ }; } - @DataProvider(name = "LRMapEquivalentsData") - Object[][] LRMapEquivalentsData() { + static Object[][] LRMapEquivalentsData() { return new Object[][] { // Ranges, Map, Expected result {LanguageRange.parse("zh, zh-TW;q=0.8, ar;q=0.9, EN, zh-HK, ja-JP;q=0.2, es;q=0.4"), @@ -181,8 +179,7 @@ }; } - @DataProvider(name = "LFilterData") - Object[][] LFilterData() { + static Object[][] LFilterData() { return new Object[][] { // Range, LanguageTags, FilteringMode, Expected locales {"ja-JP, fr-FR", "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP", @@ -203,8 +200,7 @@ }; } - @DataProvider(name = "LFilterNPEData") - Object[][] LFilterNPEData() { + static Object[][] LFilterNPEData() { return new Object[][] { // Range, LanguageTags, FilteringMode {"en;q=0.2, ja-*-JP, fr-JP", null, REJECT_EXTENDED_RANGES}, @@ -212,8 +208,7 @@ }; } - @DataProvider(name = "LFilterTagsData") - Object[][] LFilterTagsData() { + static Object[][] LFilterTagsData() { return new Object[][] { // Range, LanguageTags, FilteringMode, Expected language tags {"fr-FR, fr-BG;q=0.8, *;q=0.5, en;q=0", "en-US, fr-FR, fr-CA, fr-BG", @@ -274,8 +269,7 @@ }; } - @DataProvider(name = "LLookupData") - Object[][] LLookupData() { + static Object[][] LLookupData() { return new Object[][] { // Range, LanguageTags, Expected locale {"en;q=0.2, *-JP;q=0.6, iw", "de-DE, en, ja-JP-hepburn, fr-JP, he", "he"}, @@ -284,8 +278,7 @@ }; } - @DataProvider(name = "LLookupTagData") - Object[][] LLookupTagData() { + static Object[][] LLookupTagData() { return new Object[][] { // Range, LanguageTags, Expected language tag {"en, *", "es, de, ja-JP", null}, @@ -298,117 +291,135 @@ } @Test - public void testLRConstants() { - assertEquals(MIN_WEIGHT, 0.0, " MIN_WEIGHT should be 0.0 but got " + void testLRConstants() { + assertEquals(0.0, MIN_WEIGHT, " MIN_WEIGHT should be 0.0 but got " + MIN_WEIGHT); - assertEquals(MAX_WEIGHT, 1.0, " MAX_WEIGHT should be 1.0 but got " + assertEquals(1.0, MAX_WEIGHT, " MAX_WEIGHT should be 1.0 but got " + MAX_WEIGHT); } - @Test(dataProvider = "LRConstructorData") - public void testLRConstructors(String range, double weight) { + @MethodSource("LRConstructorData") + @ParameterizedTest + void testLRConstructors(String range, double weight) { LanguageRange lr; if (weight == MAX_WEIGHT) { lr = new LanguageRange(range); } else { lr = new LanguageRange(range, weight); } - assertEquals(lr.getRange(), range.toLowerCase(Locale.ROOT), + assertEquals(range.toLowerCase(Locale.ROOT), lr.getRange(), " LR.getRange() returned unexpected value. Expected: " + range.toLowerCase(Locale.ROOT) + ", got: " + lr.getRange()); - assertEquals(lr.getWeight(), weight, + assertEquals(weight, lr.getWeight(), " LR.getWeight() returned unexpected value. Expected: " + weight + ", got: " + lr.getWeight()); } - @Test(dataProvider = "LRConstructorNPEData", expectedExceptions = NullPointerException.class) - public void testLRConstructorNPE(String range, double weight) { + @MethodSource("LRConstructorNPEData") + @ParameterizedTest + void testLRConstructorNPE(String range, double weight) { if (weight == MAX_WEIGHT) { - new LanguageRange(range); + assertThrows(NullPointerException.class, () -> new LanguageRange(range)); } else { - new LanguageRange(range, weight); + assertThrows(NullPointerException.class, () -> new LanguageRange(range, weight)); } } - @Test(dataProvider = "LRConstructorIAEData", expectedExceptions = IllegalArgumentException.class) - public void testLRConstructorIAE(String range, double weight) { + @MethodSource("LRConstructorIAEData") + @ParameterizedTest + void testLRConstructorIAE(String range, double weight) { if (weight == MAX_WEIGHT) { - new LanguageRange(range); + assertThrows(IllegalArgumentException.class, () -> new LanguageRange(range)); } else { - new LanguageRange(range, weight); + assertThrows(IllegalArgumentException.class, () -> new LanguageRange(range, weight)); } } @Test - public void testLREquals() { + void testLREquals() { LanguageRange lr1 = new LanguageRange("ja", 1.0); LanguageRange lr2 = new LanguageRange("ja"); LanguageRange lr3 = new LanguageRange("ja", 0.1); LanguageRange lr4 = new LanguageRange("en", 1.0); - assertEquals(lr1, lr2, " LR(ja, 1.0).equals(LR(ja)) should return true."); - assertNotEquals(lr1, lr3, " LR(ja, 1.0).equals(LR(ja, 0.1)) should return false."); - assertNotEquals(lr1, lr4, " LR(ja, 1.0).equals(LR(en, 1.0)) should return false."); + assertEquals(lr2, lr1, " LR(ja, 1.0).equals(LR(ja)) should return true."); + assertNotEquals(lr3, lr1, " LR(ja, 1.0).equals(LR(ja, 0.1)) should return false."); + assertNotEquals(lr4, lr1, " LR(ja, 1.0).equals(LR(en, 1.0)) should return false."); assertNotNull(lr1, " LR(ja, 1.0).equals(null) should return false."); - assertNotEquals(lr1, "", " LR(ja, 1.0).equals(\"\") should return false."); + assertNotEquals("", lr1, " LR(ja, 1.0).equals(\"\") should return false."); } - @Test(dataProvider = "LRParseData") - public void testLRParse(String ranges, List<LanguageRange> expected) { - assertEquals(LanguageRange.parse(ranges), expected, + @MethodSource("LRParseData") + @ParameterizedTest + void testLRParse(String ranges, List<LanguageRange> expected) { + assertEquals(expected, LanguageRange.parse(ranges), " LR.parse(" + ranges + ") test failed."); } - @Test(expectedExceptions = NullPointerException.class) - public void testLRParseNPE() { - LanguageRange.parse(null); + @Test + void testLRParseNPE() { + assertThrows(NullPointerException.class, () -> LanguageRange.parse(null)); } - @Test(dataProvider = "LRParseIAEData", expectedExceptions = IllegalArgumentException.class) - public void testLRParseIAE(String ranges) { - LanguageRange.parse(ranges); + @MethodSource("LRParseIAEData") + @ParameterizedTest + void testLRParseIAE(String ranges) { + assertThrows(IllegalArgumentException.class, () -> LanguageRange.parse(ranges)); } - @Test(dataProvider = "LRMapEquivalentsData") - public void testLRMapEquivalents(List<Locale.LanguageRange> priorityList, + @MethodSource("LRMapEquivalentsData") + @ParameterizedTest + void testLRMapEquivalents(List<Locale.LanguageRange> priorityList, Map<String,List<String>> map, List<LanguageRange> expected) { - assertEquals(LanguageRange.mapEquivalents(priorityList, map), expected, + assertEquals(expected, LanguageRange.mapEquivalents(priorityList, map), " LR.mapEquivalents() test failed."); } - @Test(expectedExceptions = NullPointerException.class) - public void testLRMapEquivalentsNPE() { - LanguageRange.mapEquivalents(null, Map.of("ja", List.of("ja", "ja-Hira"))); + @Test + void testLRMapEquivalentsNPE() { + assertThrows(NullPointerException.class, + () -> LanguageRange.mapEquivalents(null, Map.of("ja", List.of("ja", "ja-Hira")))); } - @Test(dataProvider = "LFilterData") - public void testLFilter(String ranges, String tags, FilteringMode mode, String expectedLocales) { + @MethodSource("LFilterData") + @ParameterizedTest + void testLFilter(String ranges, String tags, FilteringMode mode, String expectedLocales) { List<LanguageRange> priorityList = LanguageRange.parse(ranges); List<Locale> tagList = generateLocales(tags); String actualLocales = showLocales(Locale.filter(priorityList, tagList, mode)); - assertEquals(actualLocales, expectedLocales, showErrorMessage(" L.Filter(" + mode + ")", + assertEquals(expectedLocales, actualLocales, showErrorMessage(" L.Filter(" + mode + ")", ranges, tags, expectedLocales, actualLocales)); } - @Test(dataProvider = "LFilterNPEData", expectedExceptions = NullPointerException.class) - public void testLFilterNPE(String ranges, String tags, FilteringMode mode) { - List<LanguageRange> priorityList = LanguageRange.parse(ranges); - List<Locale> tagList = generateLocales(tags); - showLocales(Locale.filter(priorityList, tagList, mode)); + @MethodSource("LFilterNPEData") + @ParameterizedTest + void testLFilterNPE(String ranges, String tags, FilteringMode mode) { + if (ranges == null) { + // Ranges are null + assertThrows(NullPointerException.class, () -> LanguageRange.parse(ranges)); + } else { + // Tags are null + List<LanguageRange> priorityList = LanguageRange.parse(ranges); + List<Locale> tagList = generateLocales(tags); + assertThrows(NullPointerException.class, + () -> showLocales(Locale.filter(priorityList, tagList, mode))); + } } - @Test(expectedExceptions = IllegalArgumentException.class) - public void testLFilterIAE() { + @Test + void testLFilterIAE() { String ranges = "en;q=0.2, ja-*-JP, fr-JP"; String tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP"; List<LanguageRange> priorityList = LanguageRange.parse(ranges); List<Locale> tagList = generateLocales(tags); - showLocales(Locale.filter(priorityList, tagList, REJECT_EXTENDED_RANGES)); + assertThrows(IllegalArgumentException.class, + () -> showLocales(Locale.filter(priorityList, tagList, REJECT_EXTENDED_RANGES))); } - @Test(dataProvider = "LFilterTagsData") - public void testLFilterTags(String ranges, String tags, FilteringMode mode, String expectedTags) { + @MethodSource("LFilterTagsData") + @ParameterizedTest + void testLFilterTags(String ranges, String tags, FilteringMode mode, String expectedTags) { List<LanguageRange> priorityList = LanguageRange.parse(ranges); List<String> tagList = generateLanguageTags(tags); String actualTags; @@ -417,36 +428,39 @@ } else { actualTags = showLanguageTags(Locale.filterTags(priorityList, tagList, mode)); } - assertEquals(actualTags, expectedTags, + assertEquals(expectedTags, actualTags, showErrorMessage(" L.FilterTags(" + (mode != null ? mode : "") + ")", ranges, tags, expectedTags, actualTags)); } - @Test(expectedExceptions = IllegalArgumentException.class) - public void testLFilterTagsIAE() { + @Test + void testLFilterTagsIAE() { String ranges = "de-*-DE"; String tags = "de-DE, de-de, de-Latn-DE, de-Latf-DE, de-DE-x-goethe, " + "de-Latn-DE-1996, de-Deva-DE, de, de-x-DE, de-Deva"; List<LanguageRange> priorityList = LanguageRange.parse(ranges); - showLanguageTags(Locale.filterTags(priorityList, generateLanguageTags(tags), REJECT_EXTENDED_RANGES)); + assertThrows(IllegalArgumentException.class, + () -> showLanguageTags(Locale.filterTags(priorityList, generateLanguageTags(tags), REJECT_EXTENDED_RANGES))); } - @Test(dataProvider = "LLookupData") - public void testLLookup(String ranges, String tags, String expectedLocale) { + @MethodSource("LLookupData") + @ParameterizedTest + void testLLookup(String ranges, String tags, String expectedLocale) { List<LanguageRange> priorityList = LanguageRange.parse(ranges); List<Locale> localeList = generateLocales(tags); String actualLocale = Locale.lookup(priorityList, localeList).toLanguageTag(); - assertEquals(actualLocale, expectedLocale, showErrorMessage(" L.Lookup()", + assertEquals(expectedLocale, actualLocale, showErrorMessage(" L.Lookup()", ranges, tags, expectedLocale, actualLocale)); } - @Test(dataProvider = "LLookupTagData") - public void testLLookupTag(String ranges, String tags, String expectedTag) { + @MethodSource("LLookupTagData") + @ParameterizedTest + void testLLookupTag(String ranges, String tags, String expectedTag) { List<LanguageRange> priorityList = LanguageRange.parse(ranges); List<String> tagList = generateLanguageTags(tags); String actualTag = Locale.lookupTag(priorityList, tagList); - assertEquals(actualTag, expectedTag, showErrorMessage(" L.LookupTag()", + assertEquals(expectedTag, actualTag, showErrorMessage(" L.LookupTag()", ranges, tags, expectedTag, actualTag)); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/PreserveTagCase.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/PreserveTagCase.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/PreserveTagCase.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/PreserveTagCase.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 +53,7 @@ */ @ParameterizedTest @MethodSource("filterProvider") - public static void testFilterTags(String ranges, List<String> tags, + public void testFilterTags(String ranges, List<String> tags, List<String> expected, FilteringMode mode) { List<LanguageRange> priorityList = LanguageRange.parse(ranges); List<String> actual = Locale.filterTags(priorityList, tags, mode); @@ -67,7 +67,7 @@ */ @ParameterizedTest @MethodSource("lookupProvider") - public static void testLookupTag(String ranges, List<String> tags, + public void testLookupTag(String ranges, List<String> tags, String expected) { List<LanguageRange> priorityList = LanguageRange.parse(ranges); String actual = Locale.lookupTag(priorityList, tags); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/RequiredAvailableLocalesTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -20,33 +20,41 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/** + +/* * @test * @bug 8276186 8174269 * @summary Checks whether getAvailableLocales() returns at least Locale.ROOT and * Locale.US instances. - * @run testng RequiredAvailableLocalesTest + * @run junit RequiredAvailableLocalesTest */ import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; -import java.text.*; +import java.text.BreakIterator; +import java.text.Collator; +import java.text.DateFormat; +import java.text.DateFormatSymbols; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; import java.time.format.DecimalStyle; -import java.util.*; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Locale; +import java.util.Set; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; -import static org.testng.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -@Test public class RequiredAvailableLocalesTest { private static final Set<Locale> REQUIRED_LOCALES = Set.of(Locale.ROOT, Locale.US); private static final MethodType ARRAY_RETURN_TYPE = MethodType.methodType(Locale.class.arrayType()); private static final MethodType SET_RETURN_TYPE = MethodType.methodType(Set.class); - @DataProvider - public Object[][] availableLocalesClasses() { + static Object[][] availableLocalesClasses() { return new Object[][] { {BreakIterator.class, ARRAY_RETURN_TYPE}, {Calendar.class, ARRAY_RETURN_TYPE}, @@ -60,8 +68,9 @@ }; } - @Test (dataProvider = "availableLocalesClasses") - public void checkRequiredLocales(Class<?> c, MethodType mt) throws Throwable { + @MethodSource("availableLocalesClasses") + @ParameterizedTest + void checkRequiredLocales(Class<?> c, MethodType mt) throws Throwable { var ret = MethodHandles.lookup().findStatic(c, "getAvailableLocales", mt).invoke(); if (ret instanceof Locale[] a) { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/TestOf.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/TestOf.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/TestOf.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/TestOf.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,29 +20,30 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/** + +/* * @test * @bug 8282819 * @summary Unit tests for Locale.of() method. Those tests check the equality * of obtained objects with ones that are gotten from other means with both * well-formed and ill-formed arguments. Also checks the possible NPEs * for error cases. - * @run testng TestOf + * @run junit TestOf */ -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertThrows; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.util.Locale; -import org.testng.annotations.Test; -import org.testng.annotations.DataProvider; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; @SuppressWarnings("deprecation") -@Test public class TestOf { - @DataProvider - public Object[][] data_1Arg() { + static Object[][] data_1Arg() { return new Object[][]{ // well-formed {Locale.ENGLISH, "en"}, @@ -55,8 +56,7 @@ }; } - @DataProvider - public Object[][] data_2Args() { + static Object[][] data_2Args() { return new Object[][]{ // well-formed {Locale.US, "en", "US"}, @@ -69,8 +69,7 @@ }; } - @DataProvider - public Object[][] data_3Args() { + static Object[][] data_3Args() { return new Object[][]{ // well-formed {Locale.forLanguageTag("en-US-POSIX"), "en", "US", "POSIX"}, @@ -87,23 +86,26 @@ }; } - @Test (dataProvider = "data_1Arg") - public void test_1Arg(Locale expected, String lang) { - assertEquals(Locale.of(lang), expected); - } - - @Test (dataProvider = "data_2Args") - public void test_2Args(Locale expected, String lang, String ctry) { - assertEquals(Locale.of(lang, ctry), expected); - } - - @Test (dataProvider = "data_3Args") - public void test_3Args(Locale expected, String lang, String ctry, String vrnt) { - assertEquals(Locale.of(lang, ctry, vrnt), expected); + @MethodSource("data_1Arg") + @ParameterizedTest + void test_1Arg(Locale expected, String lang) { + assertEquals(expected, Locale.of(lang)); + } + + @MethodSource("data_2Args") + @ParameterizedTest + void test_2Args(Locale expected, String lang, String ctry) { + assertEquals(expected, Locale.of(lang, ctry)); + } + + @MethodSource("data_3Args") + @ParameterizedTest + void test_3Args(Locale expected, String lang, String ctry, String vrnt) { + assertEquals(expected, Locale.of(lang, ctry, vrnt)); } @Test - public void test_NPE() { + void test_NPE() { assertThrows(NullPointerException.class, () -> Locale.of(null)); assertThrows(NullPointerException.class, () -> Locale.of("", null)); assertThrows(NullPointerException.class, () -> Locale.of("", "", null)); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/CalendarTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/CalendarTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/CalendarTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/CalendarTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,25 +28,24 @@ * @summary Tests Calendar class deals with Unicode extensions * correctly. * @modules jdk.localedata - * @run testng/othervm CalendarTests + * @run junit/othervm CalendarTests */ -import static org.testng.Assert.assertEquals; - import java.text.DateFormat; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test Calendar with BCP47 U extensions */ -@Test public class CalendarTests { private static TimeZone defaultTZ; @@ -64,19 +63,18 @@ private static final Locale FW_FRI = Locale.forLanguageTag("en-US-u-fw-fri"); private static final Locale FW_SAT = Locale.forLanguageTag("en-US-u-fw-sat"); - @BeforeTest - public void beforeTest() { + @BeforeAll + static void beforeTest() { defaultTZ = TimeZone.getDefault(); TimeZone.setDefault(AMLA); } - @AfterTest - public void afterTest() { + @AfterAll + static void afterTest() { TimeZone.setDefault(defaultTZ); } - @DataProvider(name="tz") - Object[][] tz() { + static Object[][] tz() { return new Object[][] { // Locale, Expected Zone, {JPTYO, ASIATOKYO}, @@ -87,8 +85,7 @@ }; } - @DataProvider(name="firstDayOfWeek") - Object[][] firstDayOfWeek () { + static Object[][] firstDayOfWeek () { return new Object[][] { // Locale, Expected DayOfWeek, {Locale.US, Calendar.SUNDAY}, @@ -114,8 +111,7 @@ }; } - @DataProvider(name="minDaysInFirstWeek") - Object[][] minDaysInFrstWeek () { + static Object[][] minDaysInFirstWeek () { return new Object[][] { // Locale, Expected minDay, {Locale.US, 1}, @@ -126,33 +122,36 @@ }; } - @Test(dataProvider="tz") - public void test_tz(Locale locale, TimeZone zoneExpected) { + @MethodSource("tz") + @ParameterizedTest + void test_tz(Locale locale, TimeZone zoneExpected) { DateFormat df = DateFormat.getTimeInstance(DateFormat.FULL, locale); - assertEquals(df.getTimeZone(), zoneExpected); + assertEquals(zoneExpected, df.getTimeZone()); Calendar c = Calendar.getInstance(locale); - assertEquals(c.getTimeZone(), zoneExpected); + assertEquals(zoneExpected, c.getTimeZone()); c = new Calendar.Builder().setLocale(locale).build(); - assertEquals(c.getTimeZone(), zoneExpected); + assertEquals(zoneExpected, c.getTimeZone()); } - @Test(dataProvider="firstDayOfWeek") - public void test_firstDayOfWeek(Locale locale, int dowExpected) { + @MethodSource("firstDayOfWeek") + @ParameterizedTest + void test_firstDayOfWeek(Locale locale, int dowExpected) { Calendar c = Calendar.getInstance(locale); - assertEquals(c.getFirstDayOfWeek(), dowExpected); + assertEquals(dowExpected, c.getFirstDayOfWeek()); c = new Calendar.Builder().setLocale(locale).build(); - assertEquals(c.getFirstDayOfWeek(), dowExpected); + assertEquals(dowExpected, c.getFirstDayOfWeek()); } - @Test(dataProvider="minDaysInFirstWeek") - public void test_minDaysInFirstWeek(Locale locale, int minDaysExpected) { + @MethodSource("minDaysInFirstWeek") + @ParameterizedTest + void test_minDaysInFirstWeek(Locale locale, int minDaysExpected) { Calendar c = Calendar.getInstance(locale); - assertEquals(c.getMinimalDaysInFirstWeek(), minDaysExpected); + assertEquals(minDaysExpected, c.getMinimalDaysInFirstWeek()); c = new Calendar.Builder().setLocale(locale).build(); - assertEquals(c.getMinimalDaysInFirstWeek(), minDaysExpected); + assertEquals(minDaysExpected, c.getMinimalDaysInFirstWeek()); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/CurrencyFormatTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,26 +27,24 @@ * @bug 8215181 8230284 8231273 8284840 * @summary Tests the "u-cf" extension * @modules jdk.localedata - * @run testng CurrencyFormatTests + * @run junit CurrencyFormatTests */ -import static org.testng.Assert.assertEquals; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.text.NumberFormat; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test NumberFormat with BCP47 u-cf extensions. Note that this test depends * on the particular CLDR release. Results may vary on other CLDR releases. */ -@Test public class CurrencyFormatTests { - @DataProvider(name="getInstanceData") - Object[][] getInstanceData() { + static Object[][] getInstanceData() { return new Object[][] { // Locale, amount, expected // US dollar @@ -97,8 +95,9 @@ }; } - @Test(dataProvider="getInstanceData") - public void test_getInstance(Locale locale, int amount, String expected) { - assertEquals(NumberFormat.getCurrencyInstance(locale).format(amount), expected); + @MethodSource("getInstanceData") + @ParameterizedTest + void test_getInstance(Locale locale, int amount, String expected) { + assertEquals(expected, NumberFormat.getCurrencyInstance(locale).format(amount)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/CurrencyTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/CurrencyTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/CurrencyTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/CurrencyTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,28 +28,26 @@ * @summary Tests Currency class instantiates correctly with Unicode * extensions * @modules jdk.localedata - * @run testng/othervm CurrencyTests + * @run junit/othervm CurrencyTests */ -import static org.testng.Assert.assertEquals; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.util.Currency; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test Currency with BCP47 U extensions */ -@Test public class CurrencyTests { private static final Currency USD = Currency.getInstance("USD"); private static final Currency CAD = Currency.getInstance("CAD"); private static final Currency JPY = Currency.getInstance("JPY"); - @DataProvider(name="getInstanceData") - Object[][] getInstanceData() { + static Object[][] getInstanceData() { return new Object[][] { // Locale, Expected Currency // "cu" @@ -76,8 +74,7 @@ }; } - @DataProvider(name="getSymbolData") - Object[][] getSymbolData() { + static Object[][] getSymbolData() { return new Object[][] { // Currency, DisplayLocale, expected Symbol {USD, Locale.forLanguageTag("en-US-u-rg-jpzzzz"), "$"}, @@ -94,13 +91,15 @@ }; } - @Test(dataProvider="getInstanceData") - public void test_getInstance(Locale locale, Currency currencyExpected) { - assertEquals(Currency.getInstance(locale), currencyExpected); + @MethodSource("getInstanceData") + @ParameterizedTest + void test_getInstance(Locale locale, Currency currencyExpected) { + assertEquals(currencyExpected, Currency.getInstance(locale)); } - @Test(dataProvider="getSymbolData") - public void test_getSymbol(Currency c, Locale locale, String expected) { - assertEquals(c.getSymbol(locale), expected); + @MethodSource("getSymbolData") + @ParameterizedTest + void test_getSymbol(Currency c, Locale locale, String expected) { + assertEquals(expected, c.getSymbol(locale)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/DisplayNameTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -27,21 +27,20 @@ * @bug 8176841 8202537 * @summary Tests the display names for BCP 47 U extensions * @modules jdk.localedata - * @run testng DisplayNameTests + * @run junit DisplayNameTests */ -import static org.testng.Assert.assertEquals; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test Locale.getDisplayName() with BCP47 U extensions. Note that the * result may change depending on the CLDR releases. */ -@Test public class DisplayNameTests { private static final Locale loc1 = Locale.forLanguageTag("en-Latn-US-u" + "-ca-japanese" + @@ -75,8 +74,7 @@ .build(); private static final Locale loc6 = Locale.forLanguageTag( "zh-CN-u-ca-dddd-nu-ddd-cu-ddd-fw-moq-tz-unknown-rg-twzz"); - @DataProvider(name="locales") - Object[][] tz() { + static Object[][] locales() { return new Object[][] { // Locale for display, Test Locale, Expected output, {Locale.US, loc1, @@ -101,9 +99,10 @@ }; } - @Test(dataProvider="locales") - public void test_locales(Locale inLocale, Locale testLocale, String expected) { + @MethodSource("locales") + @ParameterizedTest + void test_locales(Locale inLocale, Locale testLocale, String expected) { String result = testLocale.getDisplayName(inLocale); - assertEquals(result, expected); + assertEquals(expected, result); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/FormatTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/FormatTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/FormatTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/FormatTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,10 +28,13 @@ * @summary Tests *Format class deals with Unicode extensions * correctly. * @modules jdk.localedata - * @run testng FormatTests + * @run junit FormatTests */ -import static org.testng.Assert.assertEquals; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.text.DateFormat; import java.text.NumberFormat; @@ -40,15 +43,11 @@ import java.util.Locale; import java.util.TimeZone; -import org.testng.annotations.AfterTest; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test *Format classes with BCP47 U extensions */ -@Test public class FormatTests { private static TimeZone defaultTZ; @@ -80,19 +79,18 @@ .build() .getTime(); - @BeforeTest - public void beforeTest() { + @BeforeAll + static void beforeTest() { defaultTZ = TimeZone.getDefault(); TimeZone.setDefault(AMLA); } - @AfterTest - public void afterTest() { + @AfterAll + static void afterTest() { TimeZone.setDefault(defaultTZ); } - @DataProvider(name="dateFormatData") - Object[][] dateFormatData() { + static Object[][] dateFormatData() { return new Object[][] { // Locale, Expected calendar, Expected timezone, Expected formatted string @@ -116,8 +114,7 @@ }; } - @DataProvider(name="numberFormatData") - Object[][] numberFormatData() { + static Object[][] numberFormatData() { return new Object[][] { // Locale, number, expected format @@ -136,33 +133,35 @@ }; } - @Test(dataProvider="dateFormatData") - public void test_DateFormat(Locale locale, String calClass, TimeZone tz, + @MethodSource("dateFormatData") + @ParameterizedTest + void test_DateFormat(Locale locale, String calClass, TimeZone tz, String formatExpected) throws Exception { DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, locale); if (calClass != null) { try { Class expected = Class.forName(calClass); - assertEquals(df.getCalendar().getClass(), expected); + assertEquals(expected, df.getCalendar().getClass()); } catch (Exception e) { throw e; } } if (tz != null) { - assertEquals(df.getTimeZone(), tz); + assertEquals(tz, df.getTimeZone()); } String formatted = df.format(testDate); - assertEquals(formatted, formatExpected); - assertEquals(df.parse(formatted), testDate); + assertEquals(formatExpected, formatted); + assertEquals(testDate, df.parse(formatted)); } - @Test(dataProvider="numberFormatData") - public void test_NumberFormat(Locale locale, double num, + @MethodSource("numberFormatData") + @ParameterizedTest + void test_NumberFormat(Locale locale, double num, String formatExpected) throws Exception { NumberFormat nf = NumberFormat.getNumberInstance(locale); nf.setMaximumFractionDigits(4); String formatted = nf.format(num); - assertEquals(nf.format(num), formatExpected); - assertEquals(nf.parse(formatted), num); + assertEquals(formatExpected, nf.format(num)); + assertEquals(num, nf.parse(formatted)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/SymbolsTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/SymbolsTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/SymbolsTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/SymbolsTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,30 +28,28 @@ * @summary Tests *FormatSymbols class deals with Unicode extensions * correctly. * @modules jdk.localedata - * @run testng SymbolsTests + * @run junit SymbolsTests */ -import static org.testng.Assert.assertEquals; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import java.text.DateFormatSymbols; import java.text.DecimalFormatSymbols; import java.util.Locale; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test *FormatSymbols classes with BCP47 U extensions */ -@Test public class SymbolsTests { private static final Locale RG_GB = Locale.forLanguageTag("en-US-u-rg-gbzzzz"); private static final Locale RG_IE = Locale.forLanguageTag("en-US-u-rg-iezzzz"); private static final Locale RG_AT = Locale.forLanguageTag("en-US-u-rg-atzzzz"); - @DataProvider(name="dateFormatSymbolsData") - Object[][] dateFormatSymbolsData() { + static Object[][] dateFormatSymbolsData() { return new Object[][] { // Locale, expected AM string, expected PM string @@ -61,8 +59,7 @@ }; } - @DataProvider(name="decimalFormatSymbolsData") - Object[][] decimalFormatSymbolsData() { + static Object[][] decimalFormatSymbolsData() { return new Object[][] { // Locale, expected decimal separator, expected grouping separator @@ -74,18 +71,20 @@ }; } - @Test(dataProvider="dateFormatSymbolsData") - public void test_DateFormatSymbols(Locale locale, String amExpected, String pmExpected) { + @MethodSource("dateFormatSymbolsData") + @ParameterizedTest + void test_DateFormatSymbols(Locale locale, String amExpected, String pmExpected) { DateFormatSymbols dfs = DateFormatSymbols.getInstance(locale); String[] ampm = dfs.getAmPmStrings(); - assertEquals(ampm[0], amExpected); - assertEquals(ampm[1], pmExpected); + assertEquals(amExpected, ampm[0]); + assertEquals(pmExpected, ampm[1]); } - @Test(dataProvider="decimalFormatSymbolsData") - public void test_DecimalFormatSymbols(Locale locale, char decimal, char grouping) { + @MethodSource("decimalFormatSymbolsData") + @ParameterizedTest + void test_DecimalFormatSymbols(Locale locale, char decimal, char grouping) { DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(locale); - assertEquals(dfs.getDecimalSeparator(), decimal); - assertEquals(dfs.getGroupingSeparator(), grouping); + assertEquals(decimal, dfs.getDecimalSeparator()); + assertEquals(grouping, dfs.getGroupingSeparator()); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Locale/bcp47u/SystemPropertyTests.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,30 +28,26 @@ * @summary Tests the system properties * @modules jdk.localedata * @build DefaultLocaleTest - * @run testng/othervm SystemPropertyTests + * @run junit/othervm SystemPropertyTests */ -import static jdk.test.lib.process.ProcessTools.executeTestJava; -import static org.testng.Assert.assertTrue; - -import java.util.Locale; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static jdk.test.lib.process.ProcessTools.executeTestJava; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test Locale.getDefault() reflects the system property. Note that the * result may change depending on the CLDR releases. */ -@Test public class SystemPropertyTests { private static String LANGPROP = "-Duser.language=en"; private static String SCPTPROP = "-Duser.script="; private static String CTRYPROP = "-Duser.country=US"; - @DataProvider(name="data") - Object[][] data() { + static Object[][] data() { return new Object[][] { // system property, expected default, expected format, expected display {"-Duser.extensions=u-ca-japanese", @@ -86,8 +82,9 @@ }; } - @Test(dataProvider="data") - public void runTest(String extprop, String defLoc, + @MethodSource("data") + @ParameterizedTest + void runTest(String extprop, String defLoc, String defFmtLoc, String defDspLoc) throws Exception { int exitValue = executeTestJava(LANGPROP, SCPTPROP, CTRYPROP, extprop, "DefaultLocaleTest", defLoc, defFmtLoc, defDspLoc) @@ -95,6 +92,6 @@ .errorTo(System.out) .getExitValue(); - assertTrue(exitValue == 0); + assertEquals(0, exitValue); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Properties/CompatibilityTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Properties/CompatibilityTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Properties/CompatibilityTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Properties/CompatibilityTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,19 +24,19 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Properties; -import org.testng.Assert; - -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /* * @test * @bug 8252354 - * @run testng CompatibilityTest + * @run junit CompatibilityTest * @summary Verify compatibility. */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class CompatibilityTest { - @DataProvider(name = "entries") public Object[][] getEntries() throws IOException { return new Object[][]{ {8, 238923}, @@ -53,9 +53,10 @@ * @param value the value * @throws IOException */ - @Test(dataProvider = "entries") + @ParameterizedTest + @MethodSource("getEntries") void testThrows(Object key, Object value) throws IOException { - Assert.assertThrows(ClassCastException.class, () -> storeToXML(key, value)); + Assertions.assertThrows(ClassCastException.class, () -> storeToXML(key, value)); } void storeToXML(Object key, Object value) throws IOException { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Properties/EncodingTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Properties/EncodingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Properties/EncodingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Properties/EncodingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,19 +27,20 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.Properties; -import org.testng.Assert; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * @test * @bug 8183743 * @summary Test to verify the new overload method with Charset functions the * same as the existing method that takes a charset name. - * @run testng EncodingTest + * @run junit EncodingTest */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class EncodingTest { - @DataProvider(name = "parameters") public Object[][] getParameters() throws IOException { return new Object[][]{ {StandardCharsets.UTF_8.name(), null}, @@ -51,7 +52,8 @@ * encoding name or a charset can be read with Properties#loadFromXML that * returns the same Properties object. */ - @Test(dataProvider = "parameters") + @ParameterizedTest + @MethodSource("getParameters") void testLoadAndStore(String encoding, Charset charset) throws IOException { Properties props = new Properties(); props.put("k0", "\u6C34"); @@ -74,6 +76,6 @@ } } - Assert.assertEquals(props, p); + Assertions.assertEquals(p, props); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Properties/InitialCapacity.java openjdk-25-25.0.3+9/test/jdk/java/util/Properties/InitialCapacity.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Properties/InitialCapacity.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Properties/InitialCapacity.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,18 +22,22 @@ */ import java.util.Properties; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; /* * @test * @bug 8189319 * @summary Test that Properties(int initialCapacity) throws exceptions (or doesn't) as expected - * @run testng InitialCapacity + * @run junit InitialCapacity */ public class InitialCapacity { - @Test(expectedExceptions = IllegalArgumentException.class) - public void negativeInitCap() { Properties p = new Properties(-1); } + @Test + public void negativeInitCap() { Assertions.assertThrows(IllegalArgumentException.class, () -> { + Properties p = new Properties(-1); + }); +} @Test public void positiveInitCap() { Properties p = new Properties(10); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Properties/PropertiesEntrySetTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Properties/PropertiesEntrySetTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Properties/PropertiesEntrySetTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Properties/PropertiesEntrySetTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,17 +26,17 @@ * @bug 8245694 * @summary tests the entrySet() method of Properties class * @author Yu Li - * @run testng PropertiesEntrySetTest + * @run junit PropertiesEntrySetTest */ -import org.testng.annotations.Test; import java.util.Properties; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertThrows; -import static org.testng.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; public class PropertiesEntrySetTest { @@ -99,13 +99,13 @@ public void testToString() { Properties a = new Properties(); var aEntrySet = a.entrySet(); - assertEquals(aEntrySet.toString(), "[]"); + assertEquals("[]", aEntrySet.toString()); a.setProperty("p1", "1"); - assertEquals(aEntrySet.toString(), "[p1=1]"); + assertEquals("[p1=1]", aEntrySet.toString()); a.setProperty("p2", "2"); - assertEquals(aEntrySet.size(), 2); + assertEquals(2, aEntrySet.size()); assertTrue(aEntrySet.toString().trim().startsWith("[")); assertTrue(aEntrySet.toString().contains("p1=1")); assertTrue(aEntrySet.toString().contains("p2=2")); @@ -115,18 +115,18 @@ b.setProperty("p2", "2"); b.setProperty("p1", "1"); var bEntrySet = b.entrySet(); - assertEquals(bEntrySet.size(), 2); + assertEquals(2, bEntrySet.size()); assertTrue(bEntrySet.toString().trim().startsWith("[")); assertTrue(bEntrySet.toString().contains("p1=1")); assertTrue(bEntrySet.toString().contains("p2=2")); assertTrue(bEntrySet.toString().trim().endsWith("]")); b.setProperty("p0", "0"); - assertEquals(bEntrySet.size(), 3); + assertEquals(3, bEntrySet.size()); assertTrue(bEntrySet.toString().contains("p0=0")); b.remove("p1"); - assertEquals(bEntrySet.size(), 2); + assertEquals(2, bEntrySet.size()); assertFalse(bEntrySet.toString().contains("p1=1")); assertTrue(bEntrySet.toString().trim().startsWith("[")); assertTrue(bEntrySet.toString().contains("p0=0")); @@ -134,7 +134,7 @@ assertTrue(bEntrySet.toString().trim().endsWith("]")); b.remove("p0", "0"); - assertEquals(bEntrySet.size(), 1); + assertEquals(1, bEntrySet.size()); assertFalse(bEntrySet.toString().contains("p0=0")); assertTrue(bEntrySet.toString().trim().startsWith("[")); assertTrue(bEntrySet.toString().contains("p2=2")); @@ -151,13 +151,13 @@ a.setProperty("p1", "1"); a.setProperty("p2", "2"); var aEntrySet = a.entrySet(); - assertEquals(aEntrySet.size(), 2); + assertEquals(2, aEntrySet.size()); var i = aEntrySet.iterator(); var e1 = i.next(); i.remove(); assertFalse(aEntrySet.contains(e1)); - assertEquals(aEntrySet.size(), 1); + assertEquals(1, aEntrySet.size()); var e2 = i.next(); aEntrySet.remove(e2); @@ -172,14 +172,14 @@ var bEntrySet = b.entrySet(); assertFalse(bEntrySet.containsAll(aEntrySet)); - assertEquals(bEntrySet.size(), 2); + assertEquals(2, bEntrySet.size()); assertTrue(bEntrySet.removeAll(aEntrySet)); - assertEquals(bEntrySet.size(), 1); + assertEquals(1, bEntrySet.size()); assertTrue(bEntrySet.retainAll(aEntrySet)); assertTrue(bEntrySet.isEmpty()); - assertEquals(aEntrySet.size(), 2); + assertEquals(2, aEntrySet.size()); aEntrySet.clear(); assertTrue(aEntrySet.isEmpty()); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Properties/PropertiesStoreTest.java openjdk-25-25.0.3+9/test/jdk/java/util/Properties/PropertiesStoreTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Properties/PropertiesStoreTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Properties/PropertiesStoreTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +21,6 @@ * questions. */ -import org.testng.Assert; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import java.io.BufferedReader; import java.io.IOException; @@ -45,13 +42,18 @@ import java.util.Set; import java.util.TreeSet; import java.util.stream.Collectors; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /* * @test * @summary tests the order in which the Properties.store() method writes out the properties * @bug 8231640 8282023 - * @run testng/othervm PropertiesStoreTest + * @run junit/othervm PropertiesStoreTest */ +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class PropertiesStoreTest { private static final String DATE_FORMAT_PATTERN = "EEE MMM dd HH:mm:ss zzz uuuu"; @@ -60,7 +62,6 @@ private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT_PATTERN, Locale.US); private static final Locale PREV_LOCALE = Locale.getDefault(); - @DataProvider(name = "propsProvider") private Object[][] createProps() { final Properties simple = new Properties(); simple.setProperty("1", "one"); @@ -101,7 +102,6 @@ /** * Returns a {@link Locale} to use for testing */ - @DataProvider(name = "localeProvider") private Object[][] provideLocales() { // pick a non-english locale for testing Set<Locale> locales = Arrays.stream(Locale.getAvailableLocales()) @@ -122,7 +122,8 @@ * Tests that the {@link Properties#store(Writer, String)} API writes out the properties * in the expected order */ - @Test(dataProvider = "propsProvider") + @ParameterizedTest + @MethodSource("createProps") public void testStoreWriterKeyOrder(final Properties props, final String[] expectedOrder) throws Exception { // Properties.store(...) to a temp file final Path tmpFile = Files.createTempFile("8231640", "props"); @@ -136,7 +137,8 @@ * Tests that the {@link Properties#store(OutputStream, String)} API writes out the properties * in the expected order */ - @Test(dataProvider = "propsProvider") + @ParameterizedTest + @MethodSource("createProps") public void testStoreOutputStreamKeyOrder(final Properties props, final String[] expectedOrder) throws Exception { // Properties.store(...) to a temp file final Path tmpFile = Files.createTempFile("8231640", "props"); @@ -161,7 +163,7 @@ try (final InputStream is = Files.newInputStream(storedProps)) { loaded.load(is); } - Assert.assertEquals(loaded, props, "Unexpected properties loaded from stored state"); + Assertions.assertEquals(props, loaded, "Unexpected properties loaded from stored state"); // now read lines from the stored file and keep track of the order in which the keys were // found in that file. Compare that order with the expected store order of the keys. @@ -169,10 +171,10 @@ try (final BufferedReader reader = Files.newBufferedReader(storedProps)) { actualOrder = readInOrder(reader); } - Assert.assertEquals(actualOrder.size(), expectedOrder.length, + Assertions.assertEquals(expectedOrder.length, actualOrder.size(), "Unexpected number of keys read from stored properties"); if (!Arrays.equals(actualOrder.toArray(new String[0]), expectedOrder)) { - Assert.fail("Unexpected order of stored property keys. Expected order: " + Arrays.toString(expectedOrder) + Assertions.fail("Unexpected order of stored property keys. Expected order: " + Arrays.toString(expectedOrder) + ", found order: " + actualOrder); } } @@ -180,7 +182,8 @@ /** * Tests that {@link Properties#store(Writer, String)} writes out a proper date comment */ - @Test(dataProvider = "localeProvider") + @ParameterizedTest + @MethodSource("provideLocales") public void testStoreWriterDateComment(final Locale testLocale) throws Exception { // switch the default locale to the one being tested Locale.setDefault(testLocale); @@ -202,7 +205,8 @@ /** * Tests that {@link Properties#store(OutputStream, String)} writes out a proper date comment */ - @Test(dataProvider = "localeProvider") + @ParameterizedTest + @MethodSource("provideLocales") public void testStoreOutputStreamDateComment(final Locale testLocale) throws Exception { // switch the default locale to the one being tested Locale.setDefault(testLocale); @@ -232,19 +236,19 @@ while ((line = reader.readLine()) != null) { if (line.startsWith("#")) { if (comment != null) { - Assert.fail("More than one comment line found in the stored properties file " + file); + Assertions.fail("More than one comment line found in the stored properties file " + file); } comment = line.substring(1); } } } if (comment == null) { - Assert.fail("No comment line found in the stored properties file " + file); + Assertions.fail("No comment line found in the stored properties file " + file); } try { FORMATTER.parse(comment); } catch (DateTimeParseException pe) { - Assert.fail("Unexpected date comment: " + comment, pe); + Assertions.fail("Unexpected date comment: " + comment, pe); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/basic/BasicTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/basic/BasicTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/basic/BasicTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/basic/BasicTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * jdk.test.lib.compiler.CompilerUtils * jdk.test.lib.process.ProcessTools * ModuleTestUtil - * @run testng BasicTest + * @run junit BasicTest */ import java.nio.file.Path; @@ -54,13 +54,15 @@ import jdk.test.lib.Utils; import jdk.test.lib.compiler.CompilerUtils; import jdk.test.lib.process.ProcessTools; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static jdk.test.lib.Asserts.assertEquals; -import static org.testng.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class BasicTest { private static final String SRC_DIR_APPBASIC = "srcAppbasic"; private static final String SRC_DIR_APPBASIC2 = "srcAppbasic2"; @@ -92,7 +94,6 @@ private static final String MAIN = "test/jdk.test.Main"; - @DataProvider(name = "basicTestData") Object[][] basicTestData() { return new Object[][] { // Named module "test" contains resource bundles for root and en, @@ -122,7 +123,8 @@ }; } - @Test(dataProvider = "basicTestData") + @ParameterizedTest + @MethodSource("basicTestData") public void runBasicTest(String src, String mod, List<String> moduleList, List<String> localeList, String resFormat) throws Throwable { Path srcPath = Paths.get(Utils.TEST_SRC, src); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/cache/CacheTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/cache/CacheTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/cache/CacheTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/cache/CacheTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,7 @@ * @library /test/lib * @modules jdk.compiler * @build CacheTest jdk.test.lib.compiler.CompilerUtils - * @run testng CacheTest + * @run junit CacheTest */ import java.nio.file.Files; @@ -37,11 +37,12 @@ import static jdk.test.lib.process.ProcessTools.*; import jdk.test.lib.compiler.CompilerUtils; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class CacheTest { private static final String TEST_SRC = System.getProperty("test.src"); @@ -55,7 +56,7 @@ private static final String MAIN = "test/jdk.test.Main"; private static final String MAIN_CLASS = "jdk.test.Main"; - @BeforeTest + @BeforeAll public void compileTestModules() throws Exception { for (String mn : new String[] {MAIN_BUNDLES_MODULE, TEST_MODULE}) { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +28,7 @@ * @modules jdk.compiler * @build jdk.test.lib.compiler.CompilerUtils * jdk.test.lib.process.ProcessTools CaseInsensitiveNameClash - * @run testng CaseInsensitiveNameClash + * @run junit CaseInsensitiveNameClash */ import java.nio.file.Files; @@ -37,10 +37,12 @@ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.compiler.CompilerUtils; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class CaseInsensitiveNameClash { private static final String TEST_SRC = System.getProperty("test.src"); @@ -54,7 +56,7 @@ /** * Compiles the module used by the test */ - @BeforeTest + @BeforeAll public void compileAll() throws Exception { Path msrc = SRC_DIR.resolve(MODULE); assertTrue(CompilerUtils.compile(msrc, MODS_DIR, diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ResourceBundle/modules/visibility/VisibilityTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * jdk.test.lib.compiler.CompilerUtils * jdk.test.lib.process.ProcessTools * ModuleTestUtil - * @run testng VisibilityTest + * @run junit VisibilityTest */ import java.nio.file.Path; @@ -46,13 +46,13 @@ import jdk.test.lib.Utils; import jdk.test.lib.process.ProcessTools; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -import static org.testng.Assert.assertEquals; - -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class VisibilityTest { private static final Path SRC_DIR = Paths.get(Utils.TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get(Utils.TEST_CLASSES, "mods"); @@ -63,7 +63,7 @@ private static final List<String> MODULE_LIST = List.of("embargo", "exported.named.bundles", "named.bundles", "test"); - @BeforeTest + @BeforeAll public void prepareTestEnv() throws Throwable { MODULE_LIST.forEach(mn -> ModuleTestUtil.prepareModule(SRC_DIR, MODS_DIR, mn, ".properties")); @@ -93,7 +93,6 @@ * "exported.named.bundle" are exported to unnamed modules. */ - @DataProvider(name = "RunWithTestResData") Object[][] RunWithTestResData() { return new Object[][] { // Tests using jdk.test.TestWithNoModuleArg and jdk.embargo.TestWithNoModuleArg. @@ -188,7 +187,6 @@ }; } - @DataProvider(name = "RunWithExportedResData") Object[][] RunWithExportedResData() { return new Object[][] { // Tests using jdk.test.TestWithNoModuleArg and jdk.embargo.TestWithNoModuleArg @@ -285,7 +283,6 @@ }; } - @DataProvider(name = "RunWithPkgResData") Object[][] RunWithPkgResData() { return new Object[][] { // jdk.pkg.resources.* are in an unnamed module. @@ -300,10 +297,11 @@ /** * Test cases with jdk.test.resources.* */ - @Test(dataProvider = "RunWithTestResData") + @ParameterizedTest + @MethodSource("RunWithTestResData") public void RunWithTestRes(List<String> argsList) throws Throwable { int exitCode = runCmd(argsList); - assertEquals(exitCode, 0, "Execution of the tests with " + assertEquals(0, exitCode, "Execution of the tests with " + "jdk.test.resources.* failed. " + "Unexpected exit code: " + exitCode); } @@ -311,10 +309,11 @@ /** * Test cases with jdk.test.resources.exported.* */ - @Test(dataProvider = "RunWithExportedResData") + @ParameterizedTest + @MethodSource("RunWithExportedResData") public void RunWithExportedRes(List<String> argsList) throws Throwable { int exitCode = runCmd(argsList); - assertEquals(exitCode, 0, "Execution of the tests with " + assertEquals(0, exitCode, "Execution of the tests with " + "jdk.test.resources.exported.* failed. " + "Unexpected exit code: " + exitCode); } @@ -322,10 +321,11 @@ /** * Test cases with jdk.pkg.resources.* */ - @Test(dataProvider = "RunWithPkgResData") + @ParameterizedTest + @MethodSource("RunWithPkgResData") public void RunWithPkgRes(List<String> argsList) throws Throwable { int exitCode = runCmd(argsList); - assertEquals(exitCode, 0, "Execution of the tests with " + assertEquals(0, exitCode, "Execution of the tests with " + "jdk.pkg.resources.* failed. " + "Unexpected exit code: " + exitCode); } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/BadProvidersTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/BadProvidersTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/BadProvidersTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/BadProvidersTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @library /test/lib * @modules jdk.compiler * @build jdk.test.lib.compiler.CompilerUtils - * @run testng/othervm BadProvidersTest + * @run junit/othervm BadProvidersTest * @summary Basic test of ServiceLoader with bad provider and bad provider * factories deployed on the module path */ @@ -50,8 +50,6 @@ import jdk.test.lib.compiler.CompilerUtils; -import org.testng.annotations.Test; -import org.testng.annotations.DataProvider; import static java.lang.classfile.ClassFile.ACC_PUBLIC; import static java.lang.classfile.ClassFile.ACC_STATIC; @@ -59,13 +57,16 @@ import static java.lang.constant.ConstantDescs.INIT_NAME; import static java.lang.constant.ConstantDescs.MTD_void; -import static org.testng.Assert.*; +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; /** * Basic test of `provides S with PF` and `provides S with P` where the provider * factory or provider */ - public class BadProvidersTest { private static final String TEST_SRC = System.getProperty("test.src"); @@ -137,22 +138,10 @@ assertTrue(p != null); } - - @DataProvider(name = "badfactories") - public Object[][] createBadFactories() { - return new Object[][] { - { "classnotpublic", null }, - { "methodnotpublic", null }, - { "badreturntype", null }, - { "returnsnull", null }, - { "throwsexception", null }, - }; - } - - - @Test(dataProvider = "badfactories", - expectedExceptions = ServiceConfigurationError.class) - public void testBadFactory(String testName, String ignore) throws Exception { + @ParameterizedTest + @ValueSource(strings = { "classnotpublic", "methodnotpublic", "badreturntype", + "returnsnull", "throwsexception" }) + public void testBadFactory(String testName) throws Exception { Path mods = compileTest(TEST1_MODULE); // compile the bad factory @@ -164,28 +153,18 @@ // copy the compiled class into the module Path classFile = Paths.get("p", "ProviderFactory.class"); Files.copy(output.resolve(classFile), - mods.resolve(TEST1_MODULE).resolve(classFile), - StandardCopyOption.REPLACE_EXISTING); + mods.resolve(TEST1_MODULE).resolve(classFile), + StandardCopyOption.REPLACE_EXISTING); - // load providers and instantiate each one - loadProviders(mods, TEST1_MODULE).forEach(Provider::get); + Assertions.assertThrows(ServiceConfigurationError.class, + // load providers and instantiate each one + () -> loadProviders(mods, TEST1_MODULE).forEach(Provider::get) + ); } - - @DataProvider(name = "badproviders") - public Object[][] createBadProviders() { - return new Object[][] { - { "notpublic", null }, - { "ctornotpublic", null }, - { "notasubtype", null }, - { "throwsexception", null } - }; - } - - - @Test(dataProvider = "badproviders", - expectedExceptions = ServiceConfigurationError.class) - public void testBadProvider(String testName, String ignore) throws Exception { + @ParameterizedTest + @ValueSource(strings = { "notpublic", "ctornotpublic", "notasubtype", "throwsexception" }) + public void testBadProvider(String testName) throws Exception { Path mods = compileTest(TEST2_MODULE); // compile the bad provider @@ -197,11 +176,13 @@ // copy the compiled class into the module Path classFile = Paths.get("p", "Provider.class"); Files.copy(output.resolve(classFile), - mods.resolve(TEST2_MODULE).resolve(classFile), - StandardCopyOption.REPLACE_EXISTING); + mods.resolve(TEST2_MODULE).resolve(classFile), + StandardCopyOption.REPLACE_EXISTING); - // load providers and instantiate each one - loadProviders(mods, TEST2_MODULE).forEach(Provider::get); + Assertions.assertThrows(ServiceConfigurationError.class, + // load providers and instantiate each one + () -> loadProviders(mods, TEST2_MODULE).forEach(Provider::get) + ); } @@ -209,7 +190,7 @@ * Test a service provider that defines more than one no-args * public static "provider" method. */ - @Test(expectedExceptions = ServiceConfigurationError.class) + @Test public void testWithTwoFactoryMethods() throws Exception { Path mods = compileTest(TEST1_MODULE); @@ -244,8 +225,10 @@ .resolve("ProviderFactory.class"); Files.write(classFile, bytes); - // load providers and instantiate each one - loadProviders(mods, TEST1_MODULE).forEach(Provider::get); + Assertions.assertThrows(ServiceConfigurationError.class, + // load providers and instantiate each one + () -> loadProviders(mods, TEST1_MODULE).forEach(Provider::get) + ); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/CachingTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/CachingTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/CachingTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/CachingTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ /** * @test * @summary Test ServiceLoader caches - * @run testng CachingTest + * @run junit CachingTest */ import java.nio.file.Files; @@ -38,9 +38,9 @@ import java.util.Spliterator; import java.util.stream.Collectors; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; public class CachingTest { @@ -52,17 +52,17 @@ public static class S2 implements S { } - private ClassLoader testClassLoader; + private static ClassLoader testClassLoader; // creates the services configuration file and sets the ClassLoader - @BeforeClass - void setup() throws Exception { + @BeforeAll + static void setup() throws Exception { String classes = System.getProperty("test.classes"); Path dir = Paths.get(classes, "META-INF", "services"); Files.createDirectories(dir); Path config = dir.resolve(S.class.getName()); Files.write(config, List.of(S1.class.getName(), S2.class.getName())); - this.testClassLoader = CachingTest.class.getClassLoader(); + testClassLoader = CachingTest.class.getClassLoader(); } private void checkLists(List<?> list1, List<?> list2) { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/ModulesTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/ModulesTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/ModulesTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/ModulesTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @build jdk.test.lib.util.JarUtils * @compile classpath/pearscript/org/pear/PearScriptEngineFactory.java * classpath/pearscript/org/pear/PearScript.java - * @run testng/othervm ModulesTest + * @run junit/othervm ModulesTest * @summary Basic test for ServiceLoader with a provider deployed as a module. */ @@ -55,9 +55,10 @@ import jdk.test.lib.util.JarUtils; -import org.testng.annotations.Test; -import org.testng.annotations.BeforeTest; -import static org.testng.Assert.*; +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; /** * Basic test for ServiceLoader. The test make use of two service providers: @@ -67,12 +68,11 @@ * 2. PearScriptEngine - a ScriptEngineFactory deployed on the class path * with a service configuration file. */ - public class ModulesTest { // Copy the services configuration file for "pearscript" into place. - @BeforeTest - public void setup() throws Exception { + @BeforeAll + public static void setup() throws Exception { Path src = Paths.get(System.getProperty("test.src")); Path classes = Paths.get(System.getProperty("test.classes")); String st = ScriptEngineFactory.class.getName(); @@ -428,30 +428,36 @@ // -- nulls -- - @Test(expectedExceptions = { NullPointerException.class }) + @Test public void testLoadNull1() { - ServiceLoader.load(null); + Assertions.assertThrows(NullPointerException.class, + () -> ServiceLoader.load(null)); } - @Test(expectedExceptions = { NullPointerException.class }) + @Test public void testLoadNull2() { - ServiceLoader.load((Class<?>) null, ClassLoader.getSystemClassLoader()); + Assertions.assertThrows(NullPointerException.class, + () -> ServiceLoader.load((Class<?>) null, ClassLoader.getSystemClassLoader())); } - @Test(expectedExceptions = { NullPointerException.class }) + @Test public void testLoadNull3() { class S { } - ServiceLoader.load((ModuleLayer) null, S.class); + Assertions.assertThrows(NullPointerException.class, () -> { + ServiceLoader.load((ModuleLayer) null, S.class); + }); } - @Test(expectedExceptions = { NullPointerException.class }) + @Test public void testLoadNull4() { - ServiceLoader.load(ModuleLayer.empty(), null); + Assertions.assertThrows(NullPointerException.class, + () -> ServiceLoader.load(ModuleLayer.empty(), null)); } - @Test(expectedExceptions = { NullPointerException.class }) + @Test public void testLoadNull5() { - ServiceLoader.loadInstalled(null); + Assertions.assertThrows(NullPointerException.class, + () -> ServiceLoader.loadInstalled(null)); } /** diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/NoInterferenceTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/NoInterferenceTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/NoInterferenceTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/NoInterferenceTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @library /test/lib * @modules jdk.compiler * @build jdk.test.lib.compiler.CompilerUtils - * @run testng NoInterferenceTest + * @run junit NoInterferenceTest * @summary Basic test of ServiceLoader that ensures there is no interference * when there are two service interfaces of the same name in a layer * or overridden in a child layer. @@ -46,9 +46,9 @@ import jdk.test.lib.compiler.CompilerUtils; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; public class NoInterferenceTest { @@ -57,8 +57,8 @@ private static final Path MODS_DIR = Paths.get("mods"); private static final List<String> MODULES = Arrays.asList("s1", "p1", "s2", "p2"); - @BeforeTest - void compile() throws Exception { + @BeforeAll + static void compile() throws Exception { Files.createDirectory(MODS_DIR); for (String name : MODULES) { Path src = SRC_DIR.resolve(name); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/ReloadTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/ReloadTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/ReloadTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/ReloadTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @modules java.scripting * @library modules classpath/pearscript * @build ReloadTest org.pear.PearScript org.pear.PearScriptEngineFactory bananascript/* - * @run testng/othervm ReloadTest + * @run junit/othervm ReloadTest * @summary Basic test of ServiceLoader.reload */ @@ -40,12 +40,14 @@ import java.util.stream.Stream; import static java.util.ServiceLoader.*; import javax.script.ScriptEngineFactory; -import org.testng.annotations.Test; -import static org.testng.Assert.*; -@Test +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; + public class ReloadTest { + @Test public void testReload() { ServiceLoader<ScriptEngineFactory> sl = load(ScriptEngineFactory.class); List<String> names1 = sl.stream() @@ -58,41 +60,42 @@ .map(Provider::get) .map(ScriptEngineFactory::getEngineName) .collect(Collectors.toList()); - assertEquals(names1, names2); + assertEquals(names2, names1); } - @Test(expectedExceptions = { ConcurrentModificationException.class }) + @Test public void testIteratorHasNext() { ServiceLoader<ScriptEngineFactory> sl = load(ScriptEngineFactory.class); Iterator<ScriptEngineFactory> iterator = sl.iterator(); sl.reload(); - iterator.hasNext(); + Assertions.assertThrows(ConcurrentModificationException.class, iterator::hasNext); } - @Test(expectedExceptions = { ConcurrentModificationException.class }) + @Test public void testIteratorNext() { ServiceLoader<ScriptEngineFactory> sl = load(ScriptEngineFactory.class); Iterator<ScriptEngineFactory> iterator = sl.iterator(); assertTrue(iterator.hasNext()); sl.reload(); - iterator.next(); + Assertions.assertThrows(ConcurrentModificationException.class, iterator::next); } - @Test(expectedExceptions = { ConcurrentModificationException.class }) + @Test public void testStreamFindAny() { ServiceLoader<ScriptEngineFactory> sl = load(ScriptEngineFactory.class); Stream<Provider<ScriptEngineFactory>> stream = sl.stream(); sl.reload(); - stream.findAny(); + Assertions.assertThrows(ConcurrentModificationException.class, stream::findAny); } - @Test(expectedExceptions = { ConcurrentModificationException.class }) + @Test public void testSpliteratorTryAdvance() { ServiceLoader<ScriptEngineFactory> sl = load(ScriptEngineFactory.class); Stream<Provider<ScriptEngineFactory>> stream = sl.stream(); Spliterator<Provider<ScriptEngineFactory>> spliterator = stream.spliterator(); sl.reload(); - spliterator.tryAdvance(System.out::println); + Assertions.assertThrows(ConcurrentModificationException.class, + () -> spliterator.tryAdvance(System.out::println)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/TwoIterators.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/TwoIterators.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/TwoIterators.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/TwoIterators.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 @@ * @test * @summary Test ServiceLoader with two iterators, interleaving their use * to test that they don't interfere with each other - * @run testng TwoIterators + * @run junit TwoIterators */ import java.nio.file.Files; @@ -35,9 +35,9 @@ import java.util.Iterator; import java.util.ServiceLoader; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; public class TwoIterators { @@ -48,18 +48,17 @@ public static class S1 implements S { } public static class S2 implements S { } - private ClassLoader testClassLoader; + private static ClassLoader testClassLoader; // creates the services configuration file and sets the ClassLoader - @BeforeClass - void setup() throws Exception { + @BeforeAll + static void setup() throws Exception { String classes = System.getProperty("test.classes"); Path dir = Paths.get(classes, "META-INF", "services"); Files.createDirectories(dir); Path config = dir.resolve(S.class.getName()); Files.write(config, Arrays.asList(S1.class.getName(), S2.class.getName())); - - this.testClassLoader = TwoIterators.class.getClassLoader(); + testClassLoader = TwoIterators.class.getClassLoader(); } @Test diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/ServiceLoader/basic/ServiceLoaderBasicTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @build jdk.test.lib.process.* * jdk.test.lib.util.JarUtils * Basic Load FooService FooProvider1 FooProvider2 FooProvider3 BarProvider - * @run testng ServiceLoaderBasicTest + * @run junit ServiceLoaderBasicTest */ @@ -44,14 +44,16 @@ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.util.JarUtils; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; import static java.nio.file.StandardOpenOption.CREATE; import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; import static java.util.Arrays.asList; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; + public class ServiceLoaderBasicTest { private static final String METAINFO = "META-INF/services/FooService"; @@ -79,8 +81,8 @@ private static final String XTESTXMETA_CP = XTEST_CP + XMETA; private static final String XTESTXMETAP2_CP = XTESTXMETA_CP + P2; - @BeforeClass - public void initialize() throws Exception { + @BeforeAll + public static void initialize() throws Exception { createProviderConfig(XTEST_CONFIG, "FooProvider1"); createProviderConfig(XMETA_CONFIG, "FooProvider42"); createJar(P2JAR, "FooProvider2", List.of("FooProvider2")); @@ -88,8 +90,7 @@ Files.copy(P2JAR, P2DUPJAR, REPLACE_EXISTING); } - @DataProvider - public Object[][] testCases() { + private static Object[][] testCases() { return new Object[][]{ // CLI options, Test, Runtime arguments // Success cases @@ -110,23 +111,14 @@ }; } - @DataProvider - public Object[][] negativeTestCases() { - return new Object[][]{ - {"blah blah"}, - {"9234"}, - {"X!"}, - {"BarProvider"}, - {"FooProvider42"} - }; - } - - @Test(dataProvider = "testCases") + @ParameterizedTest + @MethodSource("testCases") public void testProvider(List<String> args) throws Throwable { runJava(args); } - @Test(dataProvider = "negativeTestCases") + @ParameterizedTest // negative test cases + @ValueSource(strings = { "blah blah", "9234", "X!", "BarProvider", "FooProvider42" }) public void testBadProvider(String providerName) throws Throwable { Files.write(XMETA_CONFIG, providerName.getBytes()); runJava(List.of("-cp", XMETA_CP, "Load", "fail")); @@ -144,12 +136,12 @@ .shouldHaveExitValue(0); } - private void createProviderConfig(Path config, String providerName) throws Exception { + private static void createProviderConfig(Path config, String providerName) throws Exception { Files.createDirectories(config.getParent()); Files.write(config, providerName.getBytes(), CREATE); } - private void createJar(Path jar, String provider, List<String> files) throws Exception { + private static void createJar(Path jar, String provider, List<String> files) throws Exception { Path xdir = Path.of(provider); createProviderConfig(xdir.resolve(METAINFO), provider); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/StringJoiner/MergeTest.java openjdk-25-25.0.3+9/test/jdk/java/util/StringJoiner/MergeTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/StringJoiner/MergeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/StringJoiner/MergeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved. * 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,17 +27,18 @@ * @summary test StringJoiner::merge * @modules java.base/jdk.internal.util * @requires vm.bits == "64" & os.maxMemory > 4G - * @run testng/othervm -Xmx4g -XX:+CompactStrings MergeTest + * @run junit/othervm -Xmx4g -XX:+CompactStrings MergeTest */ import java.util.StringJoiner; import java.util.stream.Stream; -import org.testng.annotations.Test; import static jdk.internal.util.ArraysSupport.SOFT_MAX_ARRAY_LENGTH; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; -@Test +import org.junit.jupiter.api.Assertions; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; +import org.junit.jupiter.api.Test; + public class MergeTest { private static final String[] PREFIXES = {"", "{", "@#$%"}; private static final String[] SUFFIXES = {"", "}", "*&%$"}; @@ -69,12 +70,13 @@ return builder.build(); } - @Test(expectedExceptions = {NullPointerException.class}) + @Test public void testNull() { StringJoiner sj = new StringJoiner(",", "{", "}"); - sj.merge(null); + Assertions.assertThrows(NullPointerException.class, () -> sj.merge(null)); } + @Test public void testSimple() { fixesStream().forEach(fixes -> { StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0); @@ -83,10 +85,11 @@ Stream.of("d", "e", "f").forEachOrdered(other::add); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + "a,b,c,d,e,f" + fixes.suf0); + assertEquals(fixes.pre0 + "a,b,c,d,e,f" + fixes.suf0, sj.toString()); }); } + @Test public void testEmptyOther() { fixesStream().forEach(fixes -> { StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0); @@ -94,14 +97,15 @@ Stream.of("a", "b", "c").forEachOrdered(sj::add); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + "a,b,c" + fixes.suf0); + assertEquals(fixes.pre0 + "a,b,c" + fixes.suf0, sj.toString()); other.setEmptyValue("EMPTY"); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + "a,b,c" + fixes.suf0); + assertEquals(fixes.pre0 + "a,b,c" + fixes.suf0, sj.toString()); }); } + @Test public void testEmptyThis() { fixesStream().forEach(fixes -> { StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0); @@ -109,34 +113,36 @@ Stream.of("d", "e", "f").forEachOrdered(other::add); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + "d:e:f" + fixes.suf0); + assertEquals(fixes.pre0 + "d:e:f" + fixes.suf0, sj.toString()); sj = new StringJoiner(",", fixes.pre0, fixes.suf0).setEmptyValue("EMPTY"); - assertEquals(sj.toString(), "EMPTY"); + assertEquals("EMPTY", sj.toString()); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + "d:e:f" + fixes.suf0); + assertEquals(fixes.pre0 + "d:e:f" + fixes.suf0, sj.toString()); }); } + @Test public void testEmptyBoth() { fixesStream().forEach(fixes -> { StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0); StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + fixes.suf0); + assertEquals(fixes.pre0 + fixes.suf0, sj.toString()); other.setEmptyValue("NOTHING"); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + fixes.suf0); + assertEquals(fixes.pre0 + fixes.suf0, sj.toString()); sj = new StringJoiner(",", fixes.pre0, fixes.suf0).setEmptyValue("EMPTY"); - assertEquals(sj.toString(), "EMPTY"); + assertEquals("EMPTY", sj.toString()); sj.merge(other); - assertEquals(sj.toString(), "EMPTY"); + assertEquals("EMPTY", sj.toString()); }); } + @Test public void testCascadeEmpty() { fixesStream().forEach(fixes -> { StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0); @@ -144,13 +150,14 @@ StringJoiner o2 = new StringJoiner(",", "<", ">").setEmptyValue("Empty2"); o1.merge(o2); - assertEquals(o1.toString(), "Empty1"); + assertEquals("Empty1", o1.toString()); sj.merge(o1); - assertEquals(sj.toString(), fixes.pre0 + fixes.suf0); + assertEquals(fixes.pre0 + fixes.suf0, sj.toString()); }); } + @Test public void testDelimiter() { fixesStream().forEach(fixes -> { StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0); @@ -159,18 +166,20 @@ Stream.of("d", "e", "f").forEachOrdered(other::add); sj.merge(other); - assertEquals(sj.toString(), fixes.pre0 + "a,b,c,d:e:f" + fixes.suf0); + assertEquals(fixes.pre0 + "a,b,c,d:e:f" + fixes.suf0, sj.toString()); }); } + @Test public void testMergeSelf() { fixesStream().forEach(fixes -> { final StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0).add("a").add("b"); - assertEquals(sj.merge(sj).toString(), fixes.pre0 + "a,b,a,b" + fixes.suf0); - assertEquals(sj.merge(sj).toString(), fixes.pre0 + "a,b,a,b,a,b,a,b" + fixes.suf0); + assertEquals(fixes.pre0 + "a,b,a,b" + fixes.suf0, sj.merge(sj).toString()); + assertEquals(fixes.pre0 + "a,b,a,b,a,b,a,b" + fixes.suf0, sj.merge(sj).toString()); }); } + @Test public void OOM() { String maxString = "*".repeat(SOFT_MAX_ARRAY_LENGTH); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/StringJoiner/StringJoinerOomUtf16Test.java openjdk-25-25.0.3+9/test/jdk/java/util/StringJoiner/StringJoinerOomUtf16Test.java --- openjdk-25-25.0.2+10/test/jdk/java/util/StringJoiner/StringJoinerOomUtf16Test.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/StringJoiner/StringJoinerOomUtf16Test.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. * 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,18 +26,23 @@ * @summary tests StringJoiner OOME when joining sub-max-length Strings * @modules java.base/jdk.internal.util * @requires vm.bits == "64" & os.maxMemory > 4G - * @run testng/othervm -Xmx4g -XX:+CompactStrings StringJoinerOomUtf16Test + * @run junit/othervm -Xmx4g -XX:+CompactStrings StringJoinerOomUtf16Test */ -import org.testng.annotations.Test; import static jdk.internal.util.ArraysSupport.SOFT_MAX_ARRAY_LENGTH; -import static org.testng.Assert.fail; + +import static org.junit.jupiter.api.Assertions.fail; import java.util.StringJoiner; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; -@Test(groups = {"unit","string","util","libs"}) +@Tag("unit") +@Tag("string") +@Tag("util") +@Tag("libs") public class StringJoinerOomUtf16Test { // the sum of lengths of the following two strings is way less than @@ -48,6 +53,7 @@ private static final String OVERFLOW_UTF16_STRING = "\u017D".repeat(((Integer.MAX_VALUE - SOFT_MAX_ARRAY_LENGTH) >> 1) + 1); + @Test public void OOM1() { try { new StringJoiner("") @@ -60,6 +66,7 @@ } } + @Test public void OOM2() { try { new StringJoiner(HALF_MAX_LATIN1_STRING) @@ -72,6 +79,7 @@ } } + @Test public void OOM3() { try { new StringJoiner(OVERFLOW_UTF16_STRING) @@ -84,6 +92,7 @@ } } + @Test public void OOM4() { try { new StringJoiner("", HALF_MAX_LATIN1_STRING, OVERFLOW_UTF16_STRING) diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/StringJoiner/StringJoinerTest.java openjdk-25-25.0.3+9/test/jdk/java/util/StringJoiner/StringJoinerTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/StringJoiner/StringJoinerTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/StringJoiner/StringJoinerTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved. * 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,18 +26,25 @@ * @summary tests StringJoinerTest * @modules java.base/jdk.internal.util * @requires vm.bits == "64" & os.maxMemory > 4G - * @run testng/othervm -Xmx4g -XX:+CompactStrings StringJoinerTest + * @run junit/othervm -Xmx4g -XX:+CompactStrings StringJoinerTest * @author Jim Gish */ + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + import java.util.ArrayList; import java.util.StringJoiner; -import org.testng.annotations.Test; -import static jdk.internal.util.ArraysSupport.SOFT_MAX_ARRAY_LENGTH; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; +import static jdk.internal.util.ArraysSupport.SOFT_MAX_ARRAY_LENGTH; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; -@Test(groups = {"unit","string","util","libs"}) +@Tag("unit") +@Tag("string") +@Tag("util") +@Tag("libs") public class StringJoinerTest { private static final String EMPTY = "EMPTY"; @@ -51,6 +58,7 @@ private static final String DASH = "-"; private static final String MAX_STRING = "*".repeat(SOFT_MAX_ARRAY_LENGTH); + @Test public void addAddAll() { StringJoiner sj = new StringJoiner(DASH, "{", "}"); sj.add(ONE); @@ -61,7 +69,7 @@ nextOne.stream().forEachOrdered(sj::add); String expected = "{"+ONE+DASH+TWO+DASH+THREE+"}"; - assertEquals(sj.toString(), expected); + assertEquals(expected, sj.toString()); } void addAlladd() { @@ -75,10 +83,11 @@ sj.add(THREE); String expected = "{"+ONE+DASH+TWO+DASH+THREE+"}"; - assertEquals(sj.toString(), expected); + assertEquals(expected, sj.toString()); } // The following tests do two successive adds of different types + @Test public void addAlladdAll() { StringJoiner sj = new StringJoiner(DASH, "{", "}"); ArrayList<String> firstOne = new ArrayList<>(); @@ -93,9 +102,10 @@ nextOne.stream().forEachOrdered(sj::add); String expected = "{"+ONE+DASH+TWO+DASH+THREE+DASH+FOUR+DASH+FIVE+"}"; - assertEquals(sj.toString(), expected); + assertEquals(expected, sj.toString()); } + @Test public void addCharSequence() { StringJoiner sj = new StringJoiner(","); CharSequence cs_one = ONE; @@ -104,13 +114,13 @@ sj.add(cs_one); sj.add(cs_two); - assertEquals(sj.toString(), ONE + "," + TWO); + assertEquals(ONE + "," + TWO, sj.toString()); sj = new StringJoiner(DASH, "{", "}"); sj.add(cs_one); sj.add(cs_two); - assertEquals(sj.toString(), "{" + ONE + DASH + TWO + "}"); + assertEquals("{" + ONE + DASH + TWO + "}", sj.toString()); StringBuilder builder = new StringBuilder(ONE); StringBuffer buffer = new StringBuffer(THREE); @@ -118,13 +128,14 @@ sj.add(builder).add(buffer); builder.append(TWO); buffer.append(FOUR); - assertEquals(sj.toString(), "{ " + ONE + ", " + THREE + " }", + assertEquals("{ " + ONE + ", " + THREE + " }", sj.toString(), "CharSequence is copied when add"); sj.add(builder); - assertEquals(sj.toString(), "{ " + ONE + ", " + THREE + ", " + ONE + - TWO + " }"); + assertEquals("{ " + ONE + ", " + THREE + ", " + ONE + + TWO + " }", sj.toString()); } + @Test public void addCharSequenceWithEmptyValue() { StringJoiner sj = new StringJoiner(",").setEmptyValue(EMPTY); CharSequence cs_one = ONE; @@ -133,189 +144,200 @@ sj.add(cs_one); sj.add(cs_two); - assertEquals(sj.toString(), ONE + "," + TWO); + assertEquals(ONE + "," + TWO, sj.toString()); sj = new StringJoiner(DASH, "{", "}"); sj.add(cs_one); sj.add(cs_two); - assertEquals(sj.toString(), "{" + ONE + DASH + TWO + "}"); + assertEquals("{" + ONE + DASH + TWO + "}", sj.toString()); sj = new StringJoiner(DASH, "{", "}"); - assertEquals(sj.toString(), "{}"); + assertEquals("{}", sj.toString()); sj = new StringJoiner("=", "{", "}").setEmptyValue(""); - assertEquals(sj.toString(), ""); + assertEquals("", sj.toString()); sj = new StringJoiner(DASH, "{", "}").setEmptyValue(EMPTY); - assertEquals(sj.toString(), EMPTY); + assertEquals(EMPTY, sj.toString()); sj.add(cs_one); sj.add(cs_two); - assertEquals(sj.toString(), "{" + ONE + DASH + TWO + "}"); + assertEquals("{" + ONE + DASH + TWO + "}", sj.toString()); } + @Test public void addString() { StringJoiner sj = new StringJoiner(DASH); sj.add(ONE); - assertEquals(sj.toString(), ONE); + assertEquals(ONE, sj.toString()); sj = new StringJoiner(DASH, "{", "}"); sj.add(ONE); - assertEquals(sj.toString(), "{" + ONE + "}"); + assertEquals("{" + ONE + "}", sj.toString()); sj.add(TWO); - assertEquals(sj.toString(), "{" + ONE + DASH + TWO + "}"); + assertEquals("{" + ONE + DASH + TWO + "}", sj.toString()); } + @Test public void lengthWithCustomEmptyValue() { StringJoiner sj = new StringJoiner(DASH, "<", ">").setEmptyValue(EMPTY); - assertEquals(sj.length(), EMPTY.length()); + assertEquals(EMPTY.length(), sj.length()); sj.add(""); - assertEquals(sj.length(), "<>".length()); + assertEquals("<>".length(), sj.length()); sj.add(""); - assertEquals(sj.length(), "<->".length()); + assertEquals("<->".length(), sj.length()); sj.add(ONE); - assertEquals(sj.length(), 4 + ONE_LEN); - assertEquals(sj.toString().length(), sj.length()); + assertEquals(4 + ONE_LEN, sj.length()); + assertEquals(sj.length(), sj.toString().length()); sj.add(TWO); - assertEquals(sj.length(), 5 + ONE_LEN + TWO_LEN); - assertEquals(sj.toString().length(), sj.length()); + assertEquals(5 + ONE_LEN + TWO_LEN, sj.length()); + assertEquals(sj.length(), sj.toString().length()); sj = new StringJoiner("||", "<", "-->"); - assertEquals(sj.length(), 4); - assertEquals(sj.toString().length(), sj.length()); + assertEquals(4, sj.length()); + assertEquals(sj.length(), sj.toString().length()); sj.add("abcdef"); - assertEquals(sj.length(), 10); - assertEquals(sj.toString().length(), sj.length()); + assertEquals(10, sj.length()); + assertEquals(sj.length(), sj.toString().length()); sj.add("xyz"); - assertEquals(sj.length(), 15); - assertEquals(sj.toString().length(), sj.length()); + assertEquals(15, sj.length()); + assertEquals(sj.length(), sj.toString().length()); } + @Test public void noAddAndEmptyValue() { StringJoiner sj = new StringJoiner(DASH, "", "").setEmptyValue(EMPTY); - assertEquals(sj.toString(), EMPTY); + assertEquals(EMPTY, sj.toString()); sj = new StringJoiner(DASH, "<..", ""); - assertEquals(sj.toString(), "<.."); + assertEquals("<..", sj.toString()); sj = new StringJoiner(DASH, "<..", ""); - assertEquals(sj.toString(), "<.."); + assertEquals("<..", sj.toString()); sj = new StringJoiner(DASH, "", "==>"); - assertEquals(sj.toString(), "==>"); + assertEquals("==>", sj.toString()); sj = new StringJoiner(DASH, "{", "}"); - assertEquals(sj.toString(), "{}"); + assertEquals("{}", sj.toString()); } - @Test(expectedExceptions = {NullPointerException.class}) + @Test public void setEmptyValueNull() { - new StringJoiner(DASH, "{", "}").setEmptyValue(null); + Assertions.assertThrows(NullPointerException.class, + () -> new StringJoiner(DASH, "{", "}").setEmptyValue(null)); } - @Test(expectedExceptions = {NullPointerException.class}) + @Test public void setDelimiterNull() { - new StringJoiner(null); + Assertions.assertThrows(NullPointerException.class, + () -> new StringJoiner(null)); } - @Test(expectedExceptions = {NullPointerException.class}) + @Test public void setPrefixNull() { - new StringJoiner(DASH, null, "}"); + Assertions.assertThrows(NullPointerException.class, + () -> new StringJoiner(DASH, null, "}")); } - @Test(expectedExceptions = {NullPointerException.class}) + @Test public void setSuffixNull() { - new StringJoiner(DASH, "{", null); + Assertions.assertThrows(NullPointerException.class, + () -> new StringJoiner(DASH, "{", null)); } + @Test public void stringFromtoString() { StringJoiner sj = new StringJoiner(", "); - assertEquals(sj.toString(), ""); + assertEquals("", sj.toString()); sj = new StringJoiner(",", "{", "}"); - assertEquals(sj.toString(), "{}"); + assertEquals("{}", sj.toString()); sj = new StringJoiner(","); sj.add(ONE); - assertEquals(sj.toString(), ONE); + assertEquals(ONE, sj.toString()); sj.add(TWO); - assertEquals(sj.toString(), ONE + "," + TWO); + assertEquals(ONE + "," + TWO, sj.toString()); sj = new StringJoiner(",", "{--", "--}"); sj.add(ONE); sj.add(TWO); - assertEquals(sj.toString(), "{--" + ONE + "," + TWO + "--}"); + assertEquals("{--" + ONE + "," + TWO + "--}", sj.toString()); } + @Test public void stringFromtoStringWithEmptyValue() { StringJoiner sj = new StringJoiner(" ", "", ""); - assertEquals(sj.toString(), ""); + assertEquals("", sj.toString()); sj = new StringJoiner(", "); - assertEquals(sj.toString(), ""); + assertEquals("", sj.toString()); sj = new StringJoiner(",", "{", "}"); - assertEquals(sj.toString(), "{}"); + assertEquals("{}", sj.toString()); sj = new StringJoiner(",", "{", "}").setEmptyValue(""); - assertEquals(sj.toString(), ""); + assertEquals("", sj.toString()); sj = new StringJoiner(","); sj.add(ONE); - assertEquals(sj.toString(), ONE); + assertEquals(ONE, sj.toString()); sj.add(TWO); - assertEquals(sj.toString(), ONE + "," + TWO); + assertEquals(ONE + "," + TWO, sj.toString()); sj = new StringJoiner(",", "{--", "--}"); sj.add(ONE); - assertEquals(sj.toString(), "{--" + ONE + "--}" ); + assertEquals("{--" + ONE + "--}", sj.toString() ); sj.add(TWO); - assertEquals(sj.toString(), "{--" + ONE + "," + TWO + "--}"); + assertEquals("{--" + ONE + "," + TWO + "--}", sj.toString()); } + @Test public void toStringWithCustomEmptyValue() { StringJoiner sj = new StringJoiner(DASH, "<", ">").setEmptyValue(EMPTY); - assertEquals(sj.toString(), EMPTY); + assertEquals(EMPTY, sj.toString()); sj.add(""); - assertEquals(sj.toString(), "<>"); + assertEquals("<>", sj.toString()); sj.add(""); - assertEquals(sj.toString(), "<->"); + assertEquals("<->", sj.toString()); } private void testCombos(String infix, String prefix, String suffix) { StringJoiner sj = new StringJoiner(infix, prefix, suffix); - assertEquals(sj.toString(), prefix + suffix); - assertEquals(sj.toString().length(), sj.length()); + assertEquals(prefix + suffix, sj.toString()); + assertEquals(sj.length(), sj.toString().length()); // EmptyValue sj = new StringJoiner(infix, prefix, suffix).setEmptyValue("<NONE>"); - assertEquals(sj.toString(), "<NONE>"); - assertEquals(sj.toString().length(), sj.length()); + assertEquals("<NONE>", sj.toString()); + assertEquals(sj.length(), sj.toString().length()); // empty in front sj.add(""); - assertEquals(sj.toString(), prefix + suffix); + assertEquals(prefix + suffix, sj.toString()); // empty in middle sj.add(""); - assertEquals(sj.toString(), prefix + infix + suffix); + assertEquals(prefix + infix + suffix, sj.toString()); sj.add("1"); - assertEquals(sj.toString(), prefix + infix + infix + "1" + suffix); + assertEquals(prefix + infix + infix + "1" + suffix, sj.toString()); // empty at end sj.add(""); - assertEquals(sj.toString(), prefix + infix + infix + "1" + infix + suffix); + assertEquals(prefix + infix + infix + "1" + infix + suffix, sj.toString()); sj = new StringJoiner(infix, prefix, suffix).setEmptyValue("<NONE>"); sj.add("1"); - assertEquals(sj.toString(), prefix + "1" + suffix); + assertEquals(prefix + "1" + suffix, sj.toString()); sj.add("2"); - assertEquals(sj.toString(), prefix + "1" + infix + "2" + suffix); + assertEquals(prefix + "1" + infix + "2" + suffix, sj.toString()); sj.add(""); - assertEquals(sj.toString(), prefix + "1" + infix + "2" + infix + suffix); + assertEquals(prefix + "1" + infix + "2" + infix + suffix, sj.toString()); sj.add("3"); - assertEquals(sj.toString(), prefix + "1" + infix + "2" + infix + infix + "3" + suffix); + assertEquals(prefix + "1" + infix + "2" + infix + infix + "3" + suffix, sj.toString()); } + @Test public void testDelimiterCombinations() { testCombos("", "", ""); testCombos("", "<", ""); @@ -327,6 +349,7 @@ testCombos(",", "<", ">"); } + @Test public void OOM1() { try { new StringJoiner(MAX_STRING, MAX_STRING, MAX_STRING).toString(); @@ -336,6 +359,7 @@ } } + @Test public void OOM2() { try { new StringJoiner(MAX_STRING, MAX_STRING, "").toString(); @@ -345,6 +369,7 @@ } } + @Test public void OOM3() { try { new StringJoiner(MAX_STRING, "", MAX_STRING).toString(); @@ -354,6 +379,7 @@ } } + @Test public void OOM4() { try { new StringJoiner("", MAX_STRING, MAX_STRING).toString(); diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/NegativeDSTTest.java openjdk-25-25.0.3+9/test/jdk/java/util/TimeZone/NegativeDSTTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/NegativeDSTTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/TimeZone/NegativeDSTTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +21,7 @@ * questions. */ -import static org.testng.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.time.Instant; import java.time.LocalDate; @@ -31,18 +31,19 @@ import java.util.Date; import java.util.TimeZone; -import org.testng.annotations.Test; -import org.testng.annotations.DataProvider; -import static org.testng.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * @test * @bug 8212970 8324065 * @summary Test whether the savings are positive in time zones that have * negative savings in the source TZ files. - * @run testng NegativeDSTTest + * @run junit NegativeDSTTest */ -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class NegativeDSTTest { private static final TimeZone DUBLIN = TimeZone.getTimeZone("Europe/Dublin"); @@ -51,7 +52,6 @@ private static final TimeZone CASABLANCA = TimeZone.getTimeZone("Africa/Casablanca"); private static final int ONE_HOUR = 3600_000; - @DataProvider private Object[][] negativeDST () { return new Object[][] { // TimeZone, localDate, offset, isDaylightSavings @@ -88,10 +88,11 @@ }; } - @Test(dataProvider="negativeDST") + @ParameterizedTest + @MethodSource("negativeDST") public void test_NegativeDST(TimeZone tz, LocalDate ld, int offset, boolean isDST) { Date d = Date.from(Instant.from(ZonedDateTime.of(ld, LocalTime.MIN, tz.toZoneId()))); - assertEquals(tz.getOffset(d.getTime()), offset); - assertEquals(tz.inDaylightTime(d), isDST); + assertEquals(offset, tz.getOffset(d.getTime())); + assertEquals(isDST, tz.inDaylightTime(d)); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/TimeZoneData/VERSION openjdk-25-25.0.3+9/test/jdk/java/util/TimeZone/TimeZoneData/VERSION --- openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/TimeZoneData/VERSION 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/TimeZone/TimeZoneData/VERSION 2026-04-17 19:08:13.000000000 +0000 @@ -1 +1 @@ -tzdata2025b +tzdata2026a diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/ZoneIdRoundTripTest.java openjdk-25-25.0.3+9/test/jdk/java/util/TimeZone/ZoneIdRoundTripTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/ZoneIdRoundTripTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/TimeZone/ZoneIdRoundTripTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * 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,20 +25,20 @@ import java.time.ZoneOffset; import java.util.TimeZone; -import org.testng.annotations.Test; -import org.testng.annotations.DataProvider; -import static org.testng.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * @test * @bug 8285844 * @summary Checks round-trips between TimeZone and ZoneId are consistent - * @run testng ZoneIdRoundTripTest + * @run junit ZoneIdRoundTripTest */ -@Test +@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ZoneIdRoundTripTest { - @DataProvider private Object[][] testZoneIds() { return new Object[][] { {ZoneId.of("Z"), 0}, @@ -60,11 +60,12 @@ }; } - @Test(dataProvider="testZoneIds") + @ParameterizedTest + @MethodSource("testZoneIds") public void test_ZoneIdRoundTrip(ZoneId zid, int offset) { var tz = TimeZone.getTimeZone(zid); - assertEquals(tz.getRawOffset(), offset); - assertEquals(tz.toZoneId().normalized(), zid.normalized()); + assertEquals(offset, tz.getRawOffset()); + assertEquals(zid.normalized(), tz.toZoneId().normalized()); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/Vector/ArrayManagement.java openjdk-25-25.0.3+9/test/jdk/java/util/Vector/ArrayManagement.java --- openjdk-25-25.0.2+10/test/jdk/java/util/Vector/ArrayManagement.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/Vector/ArrayManagement.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,4 +1,5 @@ /* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. * Copyright 2016 Google, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -25,7 +26,7 @@ * @test * @bug 8148174 * @summary brittle white box test of internal array management - * @run testng ArrayManagement + * @run junit ArrayManagement */ import java.lang.reflect.Field; @@ -35,8 +36,8 @@ import java.util.List; import java.util.SplittableRandom; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; public class ArrayManagement { @@ -61,9 +62,9 @@ super.ensureCapacity(minCapacity); assertTrue(capacity() >= minCapacity); if (minCapacity <= oldCapacity) - assertEquals(capacity(), oldCapacity); + assertEquals(oldCapacity, capacity()); if (minCapacity > 0) - assertEquals(modCount(), oldModCount + 1); + assertEquals(oldModCount + 1, modCount()); } } @@ -89,117 +90,117 @@ case 3: assertTrue(list.addAll(size, singletonList())); break; default: throw new AssertionError(); } - assertEquals(list.modCount(), modCount + 1); - assertEquals(list.size(), size + 1); + assertEquals(modCount + 1, list.modCount()); + assertEquals(size + 1, list.size()); } @Test public void defaultCapacity() { PublicVector<Object> list = new PublicVector<>(); - assertEquals(new PublicVector<Object>().capacity(), DEFAULT_CAPACITY); + assertEquals(DEFAULT_CAPACITY, new PublicVector<Object>().capacity()); for (int i = 0; i < DEFAULT_CAPACITY; i++) { addOneElement(list); - assertEquals(list.capacity(), DEFAULT_CAPACITY); + assertEquals(DEFAULT_CAPACITY, list.capacity()); } addOneElement(list); - assertEquals(list.capacity(), newCapacity(DEFAULT_CAPACITY)); + assertEquals(newCapacity(DEFAULT_CAPACITY), list.capacity()); } @Test public void defaultCapacityEnsureCapacity() { PublicVector<Object> list = new PublicVector<>(); for (int i = 0; i <= DEFAULT_CAPACITY; i++) { list.ensureCapacity(i); // no-op! - assertEquals(list.capacity(), DEFAULT_CAPACITY); + assertEquals(DEFAULT_CAPACITY, list.capacity()); } for (int i = 0; i < DEFAULT_CAPACITY; i++) { addOneElement(list); - assertEquals(list.capacity(), DEFAULT_CAPACITY); + assertEquals(DEFAULT_CAPACITY, list.capacity()); } addOneElement(list); - assertEquals(list.capacity(), newCapacity(DEFAULT_CAPACITY)); + assertEquals(newCapacity(DEFAULT_CAPACITY), list.capacity()); { int capacity = list.capacity(); list.ensureCapacity(capacity + 1); - assertEquals(list.capacity(), newCapacity(capacity)); + assertEquals(newCapacity(capacity), list.capacity()); } { int capacity = list.capacity(); list.ensureCapacity(3 * capacity); - assertEquals(list.capacity(), 3 * capacity); + assertEquals(3 * capacity, list.capacity()); } } @Test public void ensureCapacityBeyondDefaultCapacity() { PublicVector<Object> list = new PublicVector<>(); list.ensureCapacity(DEFAULT_CAPACITY + 1); - assertEquals(list.capacity(), newCapacity(DEFAULT_CAPACITY)); + assertEquals(newCapacity(DEFAULT_CAPACITY), list.capacity()); } @Test public void explicitZeroCapacity() { PublicVector<Object> list = new PublicVector<>(0); - assertEquals(list.capacity(), 0); + assertEquals(0, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 1); + assertEquals(1, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 2); + assertEquals(2, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 4); + assertEquals(4, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 4); + assertEquals(4, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 8); + assertEquals(8, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 8); + assertEquals(8, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 8); + assertEquals(8, list.capacity()); list.clear(); - assertEquals(list.capacity(), 8); + assertEquals(8, list.capacity()); } @Test public void explicitZeroCapacityWithCapacityIncrement() { PublicVector<Object> list = new PublicVector<>(0, 2); - assertEquals(list.capacity(), 0); + assertEquals(0, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 2); + assertEquals(2, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 2); + assertEquals(2, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 4); + assertEquals(4, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 4); + assertEquals(4, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 6); + assertEquals(6, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 6); + assertEquals(6, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), 8); + assertEquals(8, list.capacity()); list.clear(); - assertEquals(list.capacity(), 8); + assertEquals(8, list.capacity()); } @Test public void explicitLargeCapacity() { int n = DEFAULT_CAPACITY * 3; PublicVector<Object> list = new PublicVector<>(n); - assertEquals(list.capacity(), n); + assertEquals(n, list.capacity()); list.ensureCapacity(0); list.ensureCapacity(n); for (int i = 0; i < n; i++) addOneElement(list); - assertEquals(list.capacity(), n); + assertEquals(n, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), newCapacity(n)); + assertEquals(newCapacity(n), list.capacity()); } @Test public void explicitLargeCapacityWithCapacityIncrement() { int n = DEFAULT_CAPACITY * 3; PublicVector<Object> list = new PublicVector<>(n, 2); - assertEquals(list.capacity(), n); + assertEquals(n, list.capacity()); list.ensureCapacity(0); list.ensureCapacity(n); for (int i = 0; i < n; i++) addOneElement(list); - assertEquals(list.capacity(), n); + assertEquals(n, list.capacity()); addOneElement(list); - assertEquals(list.capacity(), n + 2); + assertEquals(n + 2, list.capacity()); } @Test public void emptyArraysAreNotShared() { diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/DelayScheduler/AscendingOrderAfterReplace.java openjdk-25-25.0.3+9/test/jdk/java/util/concurrent/DelayScheduler/AscendingOrderAfterReplace.java --- openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/DelayScheduler/AscendingOrderAfterReplace.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/concurrent/DelayScheduler/AscendingOrderAfterReplace.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8370887 + * @summary Test that cancelling a delayed task doesn't impact the ordering that other + * delayed tasks execute + */ + +import java.time.Duration; +import java.time.Instant; +import java.util.Arrays; +import java.util.concurrent.ForkJoinPool; +import java.util.concurrent.Future; +import java.util.concurrent.LinkedTransferQueue; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import static java.util.concurrent.TimeUnit.MILLISECONDS; + +public class AscendingOrderAfterReplace { + + private static final int[] DELAYS_IN_MS = { 3000, 3400, 3900, 3800, 3700, 3600, 3430, 3420, 3310, 3500, 3200 }; + + public static void main(String[] args) throws Exception { + for (int i = 1; i < DELAYS_IN_MS.length; i++) { + System.out.println("=== Test " + i + " ==="); + while (!testCancel(DELAYS_IN_MS, i)) { } + } + } + + /** + * Schedule the delayed tasks, cancel one of them, and check that the remaining tasks + * execute in the ascending order of delay. + * @return true if the test passed, false if a retry is needed + * @throws RuntimeException if the test fails + */ + private static boolean testCancel(int[] delays, int indexToCancel) throws Exception { + log("Delayed tasks: " + toString(delays)); + + // delayed tasks add to this queue when they execute + var queue = new LinkedTransferQueue<Integer>(); + + // pool with one thread to ensure that delayed tasks don't execute concurrently + try (var pool = new ForkJoinPool(1)) { + long startNanos = System.nanoTime(); + Future<?>[] futures = Arrays.stream(delays) + .mapToObj(d -> pool.schedule(() -> { + log("Triggered " + d); + queue.add(d); + }, d, MILLISECONDS)) + .toArray(Future[]::new); + long endNanos = System.nanoTime(); + log("Delayed tasks submitted"); + + // check submit took < min diffs between two delays + long submitTime = Duration.ofNanos(endNanos - startNanos).toMillis(); + long minDiff = minDifference(delays); + if (submitTime >= minDiff) { + log("Submit took >= " + minDiff + " ms, need to retry"); + pool.shutdownNow(); + return false; + } + + // give a bit of time for -delayScheduler thread to process pending tasks + Thread.sleep(minValue(delays) / 2); + log("Cancel " + delays[indexToCancel]); + futures[indexToCancel].cancel(true); + } + + // delayed tasks should have executed in ascending order of their delay + int[] executed = queue.stream().mapToInt(Integer::intValue).toArray(); + log("Executed: " + toString(executed)); + if (!isAscendingOrder(executed)) { + throw new RuntimeException("Not in ascending order!"); + } + return true; + } + + /** + * Return the minimum element. + */ + private static int minValue(int[] array) { + return IntStream.of(array).min().orElseThrow(); + } + + /** + * Return the minimum difference between any two elements. + */ + private static int minDifference(int[] array) { + int[] sorted = array.clone(); + Arrays.sort(sorted); + return IntStream.range(1, sorted.length) + .map(i -> sorted[i] - sorted[i - 1]) + .min() + .orElse(0); + } + + /** + * Return true if the array is in ascending order. + */ + private static boolean isAscendingOrder(int[] array) { + return IntStream.range(1, array.length) + .allMatch(i -> array[i - 1] <= array[i]); + } + + /** + * Returns a String containing the elements of an array in index order. + */ + private static String toString(int[] array) { + return IntStream.of(array) + .mapToObj(Integer::toString) + .collect(Collectors.joining(", ", "[", "]")); + } + + private static void log(String message) { + System.out.println(Instant.now() + " " + message); + } +} + diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java openjdk-25-25.0.3+9/test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8368500 + * @run junit/othervm ContextClassLoaderTest + * @summary Check the context classloader is reset + */ +import java.net.URL; +import java.net.URLClassLoader; +import java.util.concurrent.Future; +import java.util.concurrent.ForkJoinPool; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +class ContextClassLoaderTest { + + @Test + void testContextClassLoaderIsSetAndRestored() throws Exception { + Future<?> future = ForkJoinPool.commonPool().submit(() -> { + Thread thread = Thread.currentThread(); + ClassLoader originalCCL = thread.getContextClassLoader(); + ClassLoader customCCL = new URLClassLoader(new URL[0], originalCCL); + // Set custom context classloader and verify it + thread.setContextClassLoader(customCCL); + assertSame(customCCL, thread.getContextClassLoader(), "Custom context class loader not set"); + + // Reset to original and verify restoration + thread.setContextClassLoader(originalCCL); + assertSame(originalCCL, thread.getContextClassLoader(), "Original context class loader not restored"); + }); + future.get(); + } +} + diff -Nru openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java openjdk-25-25.0.3+9/test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java --- openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -31,9 +31,6 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.NANOSECONDS; - import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; @@ -41,6 +38,7 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; +import java.util.concurrent.CancellationException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; @@ -51,13 +49,19 @@ import java.util.concurrent.Future; import java.util.concurrent.RecursiveTask; import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.ReentrantLock; import junit.framework.Test; import junit.framework.TestSuite; +import static java.util.concurrent.TimeUnit.*; + public class ForkJoinPoolTest extends JSR166TestCase { public static void main(String[] args) { main(suite(), args); @@ -482,6 +486,57 @@ } } + public void testCancellationExceptionInGet() throws Exception { + final ExecutorService e = new ForkJoinPool(1); + try (var cleaner = cleaner(e)) { + assertCancellationExceptionFrom( + e::submit, + f -> () -> f.get(1000, TimeUnit.SECONDS) + ); + assertCancellationExceptionFrom( + e::submit, + f -> f::get + ); + assertCancellationExceptionFrom( + c -> e.submit(() -> { try { c.call(); } catch (Exception ex) { throw new RuntimeException(ex); } }), + f -> () -> f.get(1000, TimeUnit.SECONDS) + ); + assertCancellationExceptionFrom( + c -> e.submit(() -> { try { c.call(); } catch (Exception ex) { throw new RuntimeException(ex); } }), + f -> f::get + ); + } + } + + private void assertCancellationExceptionFrom( + Function<Callable<Void>, Future<?>> createTask, + Function<Future<?>, Callable<?>> getResult) throws Exception { + final var t = new AtomicReference<Thread>(); + final var c = new CountDownLatch(1); // Only used to induce WAITING state (never counted down) + final var task = createTask.apply(() -> { + try { + t.set(Thread.currentThread()); + c.await(); + } catch (InterruptedException ie) { + Thread.currentThread().interrupt();; + } + return null; + }); + Thread taskThread; + while((taskThread = t.get()) == null || taskThread.getState() != Thread.State.WAITING) { + if (Thread.interrupted()) + throw new InterruptedException(); + Thread.onSpinWait(); + } + task.cancel(true); + try { + getResult.apply(task).call(); + } catch (CancellationException ce) { + return; // Success + } + shouldThrow(); + } + /** * Completed submit(runnable, result) returns result */ diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/accessibility/JSpinner/CustomSpinnerAccessibilityTest.java openjdk-25-25.0.3+9/test/jdk/javax/accessibility/JSpinner/CustomSpinnerAccessibilityTest.java --- openjdk-25-25.0.2+10/test/jdk/javax/accessibility/JSpinner/CustomSpinnerAccessibilityTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/accessibility/JSpinner/CustomSpinnerAccessibilityTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.GridLayout; +import java.lang.reflect.InvocationTargetException; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JSpinner; +import javax.swing.SpinnerListModel; + +/* + * @test + * @bug 8286258 + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @requires (os.family == "mac") + * @summary Checks that JSpinner with custom model announces + * the value every time it is changed + * @run main/manual CustomSpinnerAccessibilityTest + */ + +public class CustomSpinnerAccessibilityTest extends JPanel { + private static final String INSTRUCTIONS = """ + 1. Turn on VoiceOver + 2. In the window named "Test UI" click on the text editor inside the + spinner component + 3. Using up and down arrows change current month + 4. Wait for the VoiceOver to finish speaking + 5. Repeat steps 3 and 4 couple more times + + If every time value of the spinner is changed VoiceOver + announces the new value click "Pass". + If instead the value is narrated only partially + and the new value is never fully narrated press "Fail". + """; + + public CustomSpinnerAccessibilityTest() { + super(new GridLayout(0, 2)); + String[] monthStrings = new java.text.DateFormatSymbols().getMonths(); + int lastIndex = monthStrings.length - 1; + if (monthStrings[lastIndex] == null + || monthStrings[lastIndex].length() <= 0) { + String[] tmp = new String[lastIndex]; + System.arraycopy(monthStrings, 0, + tmp, 0, lastIndex); + monthStrings = tmp; + } + + SpinnerListModel model = new SpinnerListModel(monthStrings); + JLabel label = new JLabel("Month: "); + add(label); + JSpinner spinner = new JSpinner(model); + label.setLabelFor(spinner); + add(spinner); + } + + public static void main(String[] args) throws InterruptedException, + InvocationTargetException { + PassFailJFrame.builder() + .title("Custom Spinner Accessibility Test") + .instructions(INSTRUCTIONS) + .testUI(CustomSpinnerAccessibilityTest::new) + .build() + .awaitAndCheck(); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/crypto/Cipher/TestDisabledAlgorithms.java openjdk-25-25.0.3+9/test/jdk/javax/crypto/Cipher/TestDisabledAlgorithms.java --- openjdk-25-25.0.2+10/test/jdk/javax/crypto/Cipher/TestDisabledAlgorithms.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/crypto/Cipher/TestDisabledAlgorithms.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8244336 + * @summary Test JCE layer algorithm restriction + * @library /test/lib + * @run main/othervm TestDisabledAlgorithms CIPHEr.Rsa/ECB/PKCS1Padding true + * @run main/othervm TestDisabledAlgorithms cipheR.rsA true + * @run main/othervm TestDisabledAlgorithms CIPher.what false + * @run main/othervm TestDisabledAlgorithms cipHER.RSA/ECB/PKCS1Padding2 false + */ +import java.util.List; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Security; +import java.security.Signature; +import javax.crypto.Cipher; +import javax.crypto.NoSuchPaddingException; +import jdk.test.lib.Utils; + +public class TestDisabledAlgorithms { + + private static final String PROP_NAME = "jdk.crypto.disabledAlgorithms"; + + private static final String TARGET = "Cipher.RSA/ECB/PKCS1Padding"; + + private static void test(List<String> algos, Provider p, + boolean shouldThrow) throws Exception { + + for (String a : algos) { + System.out.println("Testing " + (p != null ? p.getName() : "") + + ": " + a + ", shouldThrow=" + shouldThrow); + if (shouldThrow) { + if (p == null) { + Utils.runAndCheckException(() -> Cipher.getInstance(a), + NoSuchAlgorithmException.class); + } else { + Utils.runAndCheckException(() -> Cipher.getInstance(a, p), + NoSuchAlgorithmException.class); + Utils.runAndCheckException(() -> Cipher.getInstance(a, + p.getName()), NoSuchAlgorithmException.class); + + } + } else { + Cipher c; + if (p == null) { + c = Cipher.getInstance(a); + } else { + c = Cipher.getInstance(a, p); + c = Cipher.getInstance(a, p.getName()); + } + System.out.println("Got cipher w/ algo " + c.getAlgorithm()); + } + } + } + + public static void main(String[] args) throws Exception { + String propValue = args[0]; + System.out.println("Setting Security Prop " + PROP_NAME + " = " + + propValue); + Security.setProperty(PROP_NAME, propValue); + + boolean shouldThrow = Boolean.valueOf(args[1]); + + List<String> algos = List.of("Rsa/ECB/PKCS1Padding", "rSA"); + + // test w/o provider + test(algos, null, shouldThrow); + + // test w/ provider + Provider[] providers = Security.getProviders(); + for (Provider p : providers) { + if (p.getService("Cipher", "RSA/ECB/PKCS1Padding") != null) { + test(algos, p, shouldThrow); + } + } + + // make sure NONEwithRSA signature is still available from SunJCE and + // SunMSCAPI (windows) + if (shouldThrow) { + System.out.println("Testing NONEwithRSA signature support"); + for (String pn : List.of("SunJCE", "SunMSCAPI")) { + Provider p = Security.getProvider(pn); + if (p != null) { + Signature s = Signature.getInstance("NONEwithRSA", p); + System.out.println(pn + "=> yes"); + } else { + System.out.println(pn + "=> skip; not found"); + } + } + } + System.out.println("Done"); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java openjdk-25-25.0.3+9/test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java --- openjdk-25-25.0.2+10/test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8375549 + * @summary Test JCE layer algorithm restriction using algorithms w/ oids + * @library /test/lib + * @run main/othervm -Djdk.crypto.disabledAlgorithms=Cipher.DES,Cipher.RSA/ECB/PKCS1Padding TestDisabledWithOids + * @run main/othervm -Djdk.crypto.disabledAlgorithms=Cipher.RSA/ECB/PKCS1Padding,Cipher.DES TestDisabledWithOids + */ +import java.security.NoSuchAlgorithmException; +import javax.crypto.Cipher; +import jdk.test.lib.Utils; + +public class TestDisabledWithOids { + public static void main(String[] args) throws Exception { + String algo1 = "RSA/ECB/PKCS1Padding"; + String algo2 = "DES"; + + Utils.runAndCheckException(() -> Cipher.getInstance(algo1), + NoSuchAlgorithmException.class); + Utils.runAndCheckException(() -> Cipher.getInstance(algo2), + NoSuchAlgorithmException.class); + System.out.println("Done"); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java openjdk-25-25.0.3+9/test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java --- openjdk-25-25.0.2+10/test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025 IBM Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8359388 + * @summary test that the Cipher.getInstance() would reject improper + * transformations with empty mode and/or padding. + */ + +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Security; +import javax.crypto.Cipher; + +public class TestEmptyModePadding { + + public static void main(String[] args) throws Exception { + Provider provider = Security.getProvider( + System.getProperty("test.provider.name", "SunJCE")); + + System.out.println("Testing against " + provider.getName()); + + String[] testTransformations = { + // transformations w/ only 1 component, i.e. algo + " ", + // transformations w/ only 2 components + "AES/", + "AES/ ", + "AES/CBC", + "PBEWithHmacSHA512/224AndAES_128/", + "PBEWithHmacSHA512/256AndAES_128/ ", + "PBEWithHmacSHA512/224AndAES_128/CBC", + // 3-component transformations w/ empty component(s) + "AES//", + "AES/ /", + "AES// ", + "AES/ / ", + "AES/CBC/", "AES/CBC/ ", + "AES//PKCS5Padding", "AES/ /NoPadding", + "PBEWithHmacSHA512/224AndAES_128//", + "PBEWithHmacSHA512/224AndAES_128/ /", + "PBEWithHmacSHA512/224AndAES_128// ", + "PBEWithHmacSHA512/224AndAES_128/ / ", + "PBEWithHmacSHA512/256AndAES_128/CBC/", + "PBEWithHmacSHA512/256AndAES_128/CBC/ ", + "PBEWithHmacSHA512/256AndAES_128//PKCS5Padding", + "PBEWithHmacSHA512/256AndAES_128/ /PKCS5Padding", + }; + + for (String t : testTransformations) { + test(t, provider); + } + } + + private static void test(String t, Provider p) throws Exception { + try { + Cipher c = Cipher.getInstance(t, p); + throw new RuntimeException("Should throw NSAE for \'" + t + "\'"); + } catch (NoSuchAlgorithmException nsae) { + // transformation info is already in the NSAE message + System.out.println("Expected NSAE: " + nsae.getMessage()); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java 2026-04-17 19:08:13.000000000 +0000 @@ -107,5 +107,10 @@ throw new Exception( "Server record plaintext exceeds 2^14 octets: " + extra); } + + int drained = 1; + while (drained < appData.length) { + drained += sslIS.read(appData, drained, appData.length - drained); + } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java 2026-04-17 19:08:13.000000000 +0000 @@ -33,7 +33,11 @@ * @run main/othervm HttpsUrlConnClient RSASSA-PSS RSASSA-PSS */ -import java.io.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -41,7 +45,9 @@ import java.net.URL; import java.net.HttpURLConnection; import java.net.InetAddress; + import javax.net.ssl.*; + import java.security.KeyStore; import java.security.PublicKey; import java.security.Security; @@ -55,7 +61,16 @@ import java.security.cert.PKIXRevocationChecker; import java.security.spec.PKCS8EncodedKeySpec; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Base64; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import jdk.test.lib.security.SimpleOCSPServer; @@ -92,10 +107,6 @@ static String INT_ALIAS = "intermediate"; static String SSL_ALIAS = "ssl"; - /* - * Is the server ready to serve? - */ - volatile static boolean serverReady = false; volatile int serverPort = 0; volatile Exception serverException = null; @@ -164,7 +175,7 @@ ClientParameters cliParams = new ClientParameters(); cliParams.protocols = allowedProts; ServerParameters servParams = new ServerParameters(); - serverReady = false; + CountDownLatch serverReady = new CountDownLatch(1); System.out.println("====================================="); System.out.println("Stapling enabled, PKIXParameters with"); @@ -192,7 +203,7 @@ Security.setProperty("ocsp.enable", "false"); HttpsUrlConnClient sslTest = new HttpsUrlConnClient(cliParams, - servParams); + servParams, serverReady); TestResult tr = sslTest.getResult(); if (!checkClientValidationFailure(tr.clientExc, BasicReason.REVOKED)) { if (tr.clientExc != null) { @@ -219,10 +230,11 @@ /* * Define the server side of the test. * - * If the server prematurely exits, serverReady will be set to true + * If the server prematurely exits, serverReady will be counted down * to avoid infinite hangs. */ - void doServerSide(ServerParameters servParams) throws Exception { + void doServerSide(ServerParameters servParams, CountDownLatch serverReady) + throws Exception { // Selectively enable or disable the feature System.setProperty("jdk.tls.server.enableStatusRequestExtension", @@ -274,7 +286,7 @@ /* * Signal Client, we're ready for his connect. */ - serverReady = true; + serverReady.countDown(); try (SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept(); BufferedReader in = new BufferedReader( @@ -306,18 +318,13 @@ /* * Define the client side of the test. * - * If the server prematurely exits, serverReady will be set to true + * If the server prematurely exits, serverReady will be counted down * to avoid infinite hangs. */ - void doClientSide(ClientParameters cliParams) throws Exception { + void doClientSide(ClientParameters cliParams, CountDownLatch serverReady) + throws Exception { - // Wait 5 seconds for server ready - for (int i = 0; (i < 100 && !serverReady); i++) { - Thread.sleep(50); - } - if (!serverReady) { - throw new RuntimeException("Server not ready yet"); - } + serverReady.await(); // Selectively enable or disable the feature System.setProperty("jdk.tls.client.enableStatusRequestExtension", @@ -373,16 +380,16 @@ * * Fork off the other side, then do your work. */ - HttpsUrlConnClient(ClientParameters cliParams, - ServerParameters servParams) throws Exception { + HttpsUrlConnClient(ClientParameters cliParams, ServerParameters servParams, + CountDownLatch serverReady) throws Exception { Exception startException = null; try { if (separateServerThread) { - startServer(servParams, true); - startClient(cliParams, false); + startServer(servParams, true, serverReady); + startClient(cliParams, false, serverReady); } else { - startClient(cliParams, true); - startServer(servParams, false); + startClient(cliParams, true, serverReady); + startServer(servParams, false, serverReady); } } catch (Exception e) { startException = e; @@ -453,51 +460,53 @@ return tr; } - final void startServer(ServerParameters servParams, boolean newThread) - throws Exception { + final void startServer(ServerParameters servParams, boolean newThread, + CountDownLatch serverReady) throws IOException { if (newThread) { serverThread = new Thread() { @Override public void run() { try { - doServerSide(servParams); + doServerSide(servParams, serverReady); } catch (Exception e) { /* * Our server thread just died. * * Release the client, if not active already... */ - System.err.println("Server died..."); - serverReady = true; + System.err.println("Server died: " + e); serverException = e; + } finally { + serverReady.countDown(); } } }; serverThread.start(); } else { try { - doServerSide(servParams); + doServerSide(servParams, serverReady); } catch (Exception e) { + System.err.println("Server died: " + e); serverException = e; } finally { - serverReady = true; + serverReady.countDown(); } } } - final void startClient(ClientParameters cliParams, boolean newThread) - throws Exception { + final void startClient(ClientParameters cliParams, boolean newThread, + CountDownLatch serverReady) throws Exception { if (newThread) { clientThread = new Thread() { @Override public void run() { try { - doClientSide(cliParams); + doClientSide(cliParams, serverReady); } catch (Exception e) { /* * Our client thread just died. */ - System.err.println("Client died..."); + System.err.println("Client died: " + e); clientException = e; } } @@ -505,9 +514,10 @@ clientThread.start(); } else { try { - doClientSide(cliParams); + doClientSide(cliParams, serverReady); } catch (Exception e) { clientException = e; + System.err.println("Client died: " + e); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractPeer.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractPeer.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractPeer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractPeer.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,13 +50,6 @@ } /* - * Deletes log file if exists. - */ - protected void deleteLog() throws IOException { - Utilities.deleteFile(getLogPath()); - } - - /* * The negotiated application protocol. */ public String getNegoAppProtocol() throws SSLTestException { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkClient.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkClient.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkClient.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkClient.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ import java.net.InetSocketAddress; import java.net.SocketException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.net.ssl.SNIHostName; @@ -86,6 +87,16 @@ if (builder.getAppProtocols() != null) { sslParams.setApplicationProtocols(builder.getAppProtocols()); } + + NamedGroup[] namedGroups = builder.getNamedGroups(); + if (namedGroups != null + && namedGroups.length > 0) { + String[] namedGroupStrs = Arrays.stream(namedGroups) + .map(NamedGroup::name) + .toArray(String[]::new); + sslParams.setNamedGroups(namedGroupStrs); + } + socket.setSSLParameters(sslParams); } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcClient.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcClient.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcClient.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcClient.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -148,7 +148,6 @@ @Override public void close() throws IOException { printLog(); - deleteLog(); } public static void main(String[] args) throws Exception { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkProcServer.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ public void close() throws IOException { printLog(); deletePort(); - deleteLog(); } private static int readPort() { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +22,9 @@ */ import java.io.IOException; -import java.net.InetAddress; import java.net.SocketException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.net.ssl.SNIHostName; @@ -85,6 +85,16 @@ System.out.println("appProtocol: " + appProtocol); } } + + NamedGroup[] namedGroups = builder.getNamedGroups(); + if (namedGroups != null + && namedGroups.length > 0) { + String[] namedGroupStrs = Arrays.stream(namedGroups) + .map(NamedGroup::name) + .toArray(String[]::new); + sslParams.setNamedGroups(namedGroupStrs); + } + serverSocket.setSSLParameters(sslParams); } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java --- openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java 2026-04-17 19:08:13.000000000 +0000 @@ -190,6 +190,7 @@ try { sslServerSocket.setSoTimeout(30000); sslSocket = (SSLSocket)sslServerSocket.accept(); + System.out.println("Connection established on port : " +serverPort); } catch (SocketTimeoutException ste) { // Ignore the test case if no connection within 30 seconds. System.out.println( @@ -228,6 +229,7 @@ } } finally { sslSocket.close(); + System.out.println("Connection closed on port : " +serverPort); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java 2026-04-17 19:08:13.000000000 +0000 @@ -24,6 +24,7 @@ /** * @test * @bug 4933700 + * @key sound * @summary Tests that default devices return MidiDeviceTransmitter/Receiver and returned objects return correct MidiDevice * @compile TestAllDevices.java * @run main TestAllDevices diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/Sequencer/Looping.java openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/Sequencer/Looping.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/Sequencer/Looping.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/Sequencer/Looping.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,7 +36,7 @@ * @test * @bug 4204105 * @summary RFE: add loop() method(s) to Sequencer - * @key intermittent + * @key sound */ public class Looping { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/SysexMessage/SendRawSysexMessage.java openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/SysexMessage/SendRawSysexMessage.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/SysexMessage/SendRawSysexMessage.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/SysexMessage/SendRawSysexMessage.java 2026-04-17 19:08:13.000000000 +0000 @@ -35,6 +35,7 @@ /** * @test * @bug 8074211 8237495 8301310 + * @key sound * @summary fail with memory errors when asked to send a sysex message starting * with 0xF7 */ diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/ExpectedNPEOnNull.java openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/ExpectedNPEOnNull.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/ExpectedNPEOnNull.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/ExpectedNPEOnNull.java 2026-04-17 19:08:13.000000000 +0000 @@ -32,6 +32,7 @@ /** * @test * @bug 8143909 + * @key sound * @author Sergey Bylokhov */ public final class ExpectedNPEOnNull { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/FakeInfo.java openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/FakeInfo.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/FakeInfo.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/FakeInfo.java 2026-04-17 19:08:13.000000000 +0000 @@ -35,6 +35,7 @@ /** * @test * @bug 8059743 + * @key sound * @summary MidiDeviceProvider shouldn't returns incorrect results in case of * some unknown MidiDevice.Info * @author Sergey Bylokhov diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/UnsupportedInfo.java openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/UnsupportedInfo.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/UnsupportedInfo.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/midi/spi/MidiDeviceProvider/UnsupportedInfo.java 2026-04-17 19:08:13.000000000 +0000 @@ -30,6 +30,7 @@ /** * @test * @bug 8058115 + * @key sound * @summary MidiDeviceProvider shouldn't returns incorrect results in case of * unsupported MidiDevice.Info * @author Sergey Bylokhov diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/Clip/AutoCloseTimeCheck.java openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/Clip/AutoCloseTimeCheck.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/Clip/AutoCloseTimeCheck.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/Clip/AutoCloseTimeCheck.java 2026-04-17 19:08:13.000000000 +0000 @@ -39,6 +39,7 @@ /** * @test + * @key sound * @bug 8202264 */ public final class AutoCloseTimeCheck { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/Clip/IsRunningHang.java openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/Clip/IsRunningHang.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/Clip/IsRunningHang.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/Clip/IsRunningHang.java 2026-04-17 19:08:13.000000000 +0000 @@ -36,6 +36,7 @@ /** * @test * @bug 8156169 + * @key sound * @run main/othervm/timeout=300 IsRunningHang */ public final class IsRunningHang { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/DataLine/LongFramePosition.java openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/DataLine/LongFramePosition.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/DataLine/LongFramePosition.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/DataLine/LongFramePosition.java 2026-04-17 19:08:13.000000000 +0000 @@ -29,6 +29,7 @@ /** * @test * @bug 5049129 + * @key sound * @summary DataLine.getLongFramePosition */ public class LongFramePosition { diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/DirectAudio/bug6372428.java openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/DirectAudio/bug6372428.java --- openjdk-25-25.0.2+10/test/jdk/javax/sound/sampled/DirectAudio/bug6372428.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/sound/sampled/DirectAudio/bug6372428.java 2026-04-17 19:08:13.000000000 +0000 @@ -31,6 +31,7 @@ /* * @test * @bug 6372428 + * @key sound * @summary playback and capture doesn't interrupt after terminating thread that * calls start() * @run main bug6372428 diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java openjdk-25-25.0.3+9/test/jdk/javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/ButtonGroup/TestButtonGroupFocusTraversal.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +30,6 @@ * @run main TestButtonGroupFocusTraversal */ -import javax.swing.AbstractAction; import javax.swing.ButtonGroup; import javax.swing.JCheckBox; import javax.swing.JFrame; @@ -43,9 +42,7 @@ import java.awt.Container; import java.awt.FlowLayout; import java.awt.KeyboardFocusManager; -import java.awt.Point; import java.awt.Robot; -import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; public class TestButtonGroupFocusTraversal { @@ -53,25 +50,11 @@ private static JTextField textFieldFirst, textFieldLast; private static JToggleButton toggleButton1, toggleButton2; private static JCheckBox checkBox1, checkBox2; - private static boolean toggleButtonActionPerformed; - private static boolean checkboxActionPerformed; + private static volatile boolean toggleButtonActionPerformed; + private static volatile boolean checkboxActionPerformed; private static JRadioButton radioButton1, radioButton2; private static Robot robot; - private static void blockTillDisplayed(Component comp) { - Point p = null; - while (p == null) { - try { - p = comp.getLocationOnScreen(); - } catch (IllegalStateException e) { - try { - Thread.sleep(500); - } catch (InterruptedException ie) { - } - } - } - } - private static void createUI() throws Exception { SwingUtilities.invokeAndWait(new Runnable() { public void run() { @@ -84,33 +67,11 @@ checkBox1 = new JCheckBox("1"); checkBox2 = new JCheckBox("2"); - toggleButton1.setAction(new AbstractAction() { - @Override - public void actionPerformed(ActionEvent e) { - toggleButtonActionPerformed = true; - } - }); - - toggleButton2.setAction(new AbstractAction() { - @Override - public void actionPerformed(ActionEvent e) { - toggleButtonActionPerformed = true; - } - }); - - checkBox1.setAction(new AbstractAction() { - @Override - public void actionPerformed(ActionEvent e) { - checkboxActionPerformed = true; - } - }); - - checkBox2.setAction(new AbstractAction() { - @Override - public void actionPerformed(ActionEvent e) { - checkboxActionPerformed = true; - } - }); + toggleButton1.addActionListener((_) -> toggleButtonActionPerformed = true); + toggleButton2.addActionListener((_) -> toggleButtonActionPerformed = true); + + checkBox1.addActionListener((_) -> checkboxActionPerformed = true); + checkBox2.addActionListener((_) -> checkboxActionPerformed = true); ButtonGroup toggleGroup = new ButtonGroup(); toggleGroup.add(toggleButton1); @@ -128,7 +89,7 @@ radioButton2.setSelected(true); checkBox2.setSelected(true); - frame = new JFrame("Test"); + frame = new JFrame("TestButtonGroupFocusTraversal"); frame.setLayout(new FlowLayout()); Container pane = frame.getContentPane(); @@ -178,7 +139,7 @@ } private static void checkCheckboxActionPerformed() { - if (toggleButtonActionPerformed) { + if (checkboxActionPerformed) { throw new RuntimeException("Checkbox Action should not be" + "performed"); } @@ -196,19 +157,13 @@ createUI(); robot.waitForIdle(); - robot.delay(200); - - blockTillDisplayed(frame); + robot.delay(500); SwingUtilities.invokeAndWait(textFieldFirst::requestFocus); if (!textFieldFirst.equals(KeyboardFocusManager.getCurrentKeyboardFocusManager() .getFocusOwner())) { - try { - Thread.sleep(100); - } catch (InterruptedException e) { - e.printStackTrace(); - } + robot.delay(300); SwingUtilities.invokeAndWait(textFieldFirst::requestFocus); } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java openjdk-25-25.0.3+9/test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/GraphicsConfigNotifier/StalePreferredSize.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +66,8 @@ * It is checked by SwingUtilities.updateComponentTreeUI(), if layout * was correct the call to updateComponentTreeUI() will be no-op. * @compile -encoding utf-8 StalePreferredSize.java - * @run main/othervm/timeout=600 StalePreferredSize - * @run main/othervm/timeout=600 -Dsun.java2d.uiScale=1 StalePreferredSize - * @run main/othervm/timeout=600 -Dsun.java2d.uiScale=2.25 StalePreferredSize + * @run main/othervm/timeout=420 StalePreferredSize + * @run main/othervm/timeout=420 -Dsun.java2d.uiScale=2.25 StalePreferredSize */ public final class StalePreferredSize { @@ -92,7 +91,7 @@ public static void main(final String[] args) throws Exception { for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) { EventQueue.invokeAndWait(() -> setLookAndFeel(laf)); - for (typeFont = 0; typeFont < 3; typeFont++) { + for (typeFont = 0; typeFont < 1; typeFont++) { System.err.println("typeFont = " + typeFont); for (boolean usePopup : new boolean[]{true, false}) { addViaPopup = usePopup; diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/JEditorPane/TestBrowserBGColor.java openjdk-25-25.0.3+9/test/jdk/javax/swing/JEditorPane/TestBrowserBGColor.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/JEditorPane/TestBrowserBGColor.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/JEditorPane/TestBrowserBGColor.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,94 +23,79 @@ /* * @test - * @key headful * @bug 8213781 * @summary Verify webpage background color renders correctly in JEditorPane */ -import java.awt.Toolkit; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import java.io.File; import java.io.IOException; -import java.net.MalformedURLException; -import javax.swing.JDialog; +import java.util.Objects; +import java.util.stream.IntStream; + +import javax.imageio.ImageIO; import javax.swing.JEditorPane; -import javax.swing.JFrame; -import javax.swing.JScrollPane; -import javax.swing.SwingUtilities; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import javax.swing.text.html.HTMLFrameHyperlinkEvent; -import javax.swing.text.html.HTMLDocument; -import java.awt.Color; -import java.awt.Insets; -import java.awt.Point; -import java.awt.Robot; +import javax.swing.text.StyleConstants; +import javax.swing.text.View; -public class TestBrowserBGColor extends JFrame implements HyperlinkListener { +import static java.awt.image.BufferedImage.TYPE_INT_RGB; +import static java.lang.Integer.toHexString; - private static TestBrowserBGColor b; - private static JEditorPane browser; +public final class TestBrowserBGColor { + + private static final String HTML_DOC = + "<!DOCTYPE html>" + + "<html><head>" + + "<style> body { background: #FFF; } </style>" + + "<title>Title" + + " "; + + private static final int SIZE = 300; public static void main(final String[] args) throws Exception { - Robot r = new Robot(); - SwingUtilities.invokeAndWait(() -> { - try { - b = new TestBrowserBGColor(); - } catch (Exception e) { - throw new RuntimeException(e); - } - b.setSize(Toolkit.getDefaultToolkit().getScreenSize()); - b.setVisible(true); - b.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - b.addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent e) { - b.dispose(); - b = null; - } - }); - }); - - r.waitForIdle(); - r.delay(500); - - SwingUtilities.invokeAndWait(() -> { - Insets insets = browser.getInsets(); - Point loc = browser.getLocationOnScreen(); - Color c = r.getPixelColor( loc.x + insets.left+100, - loc.y + insets.top + 100); - b.dispose(); - if (!c.equals(Color.WHITE)) { - throw new RuntimeException("webpage background color wrong"); - } - }); - } + JEditorPane browser = new JEditorPane("text/html", HTML_DOC); + browser.setEditable(false); + browser.setSize(SIZE, SIZE); + BufferedImage image = new BufferedImage(SIZE, SIZE, TYPE_INT_RGB); + Graphics g = image.getGraphics(); + browser.paint(g); + g.dispose(); + + Color bgColor = StyleConstants.getBackground( + getBodyView(browser.getUI() + .getRootView(browser)) + .getAttributes()); + if (!bgColor.equals(Color.WHITE)) { + saveImage(image); + throw new RuntimeException("Wrong background color: " + + toHexString(bgColor.getRGB()) + + " vs " + + toHexString(Color.WHITE.getRGB())); + } + } - String htmlDoc = " Title "; + private static View getBodyView(final View view) { + if ("body".equals(view.getElement() + .getName())) { + return view; + } - public TestBrowserBGColor() throws IOException, MalformedURLException { - browser = new JEditorPane("text/html", htmlDoc); - browser.setEditable(false); - browser.addHyperlinkListener(this); - JScrollPane scroll = new JScrollPane(browser); - getContentPane().add(scroll); + return IntStream.range(0, view.getViewCount()) + .mapToObj(view::getView) + .map(TestBrowserBGColor::getBodyView) + .filter(Objects::nonNull) + .findFirst() + .orElse(null); } - public void hyperlinkUpdate(final HyperlinkEvent e) { - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - JEditorPane pane = (JEditorPane) e.getSource(); - if (e instanceof HTMLFrameHyperlinkEvent) { - HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e; - HTMLDocument doc = (HTMLDocument) pane.getDocument(); - doc.processHTMLFrameHyperlinkEvent(evt); - } else { - try { - pane.setPage(e.getURL()); - } catch (Throwable t) { - t.printStackTrace(); - } - } + private static void saveImage(BufferedImage image) { + try { + ImageIO.write(image, "png", + new File("html-rendering.png")); + } catch (IOException ignored) { } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/FileSizeCheck.java openjdk-25-25.0.3+9/test/jdk/javax/swing/JFileChooser/FileSizeCheck.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/FileSizeCheck.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/JFileChooser/FileSizeCheck.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ import java.util.Arrays; import java.util.Locale; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Predicate; import javax.swing.AbstractButton; import javax.swing.JFileChooser; @@ -52,6 +51,8 @@ * @requires (os.family == "linux") * @summary Verifies if the size of an empty file is shown as 0.0 KB * as well as checks the displayed file sizes are rounded up + * @library /javax/swing/regtesthelpers + * @build Util * @run main FileSizeCheck */ public class FileSizeCheck { @@ -228,31 +229,15 @@ } private static AbstractButton findDetailsButton(final Container container) { - Component result = findComponent(container, + Component result = Util.findComponent(container, c -> c instanceof JToggleButton button && "Details".equals(button.getToolTipText())); return (AbstractButton) result; } private static JTable findTable(final Container container) { - Component result = findComponent(container, - c -> c instanceof JTable); + Component result = Util.findComponent(container, + c -> c instanceof JTable); return (JTable) result; } - - private static Component findComponent(final Container container, - final Predicate predicate) { - for (Component child : container.getComponents()) { - if (predicate.test(child)) { - return child; - } - if (child instanceof Container cont && cont.getComponentCount() > 0) { - Component result = findComponent(cont, predicate); - if (result != null) { - return result; - } - } - } - return null; - } } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/bug4759934.java openjdk-25-25.0.3+9/test/jdk/javax/swing/JFileChooser/bug4759934.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/bug4759934.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/JFileChooser/bug4759934.java 2026-04-17 19:08:13.000000000 +0000 @@ -31,10 +31,11 @@ * @run main bug4759934 */ +import java.awt.Component; +import java.awt.Container; import java.awt.Dialog; import java.awt.Point; import java.awt.Robot; -import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import javax.swing.JButton; import javax.swing.JDialog; @@ -72,8 +73,10 @@ robot.mouseRelease(MouseEvent.BUTTON1_DOWN_MASK); robot.delay(500); - robot.keyPress(KeyEvent.VK_ESCAPE); - robot.keyRelease(KeyEvent.VK_ESCAPE); + SwingUtilities.invokeAndWait(() -> { + JButton cancelBtn = findCancelButton(jfc); + cancelBtn.doClick(); + }); robot.delay(500); SwingUtilities.invokeAndWait(() -> { @@ -121,4 +124,11 @@ dlg.setLocation(fr.getX() + fr.getWidth() + 10, fr.getY()); dlg.setVisible(true); } + + private static JButton findCancelButton(final Container container) { + Component result = Util.findComponent(container, + c -> c instanceof JButton button + && "Cancel".equals(button.getText())); + return (JButton) result; + } } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java openjdk-25-25.0.3+9/test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +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. - */ - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.awt.Graphics; -import java.awt.image.BufferedImage; -import javax.imageio.ImageIO; -import javax.swing.JComponent; -import javax.swing.JProgressBar; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; - -import static java.awt.image.BufferedImage.TYPE_INT_RGB; - -/* - * @test - * @bug 8224261 - * @key headful - * @library ../regtesthelpers - * @build Util - * @summary Verifies JProgressBar border is not painted when border - * painting is set to false - * @run main TestProgressBarBorder - */ - -public class TestProgressBarBorder { - public static void main(String[] args) throws Exception { - for (UIManager.LookAndFeelInfo laf : - UIManager.getInstalledLookAndFeels()) { - if (!laf.getName().contains("Nimbus") && !laf.getName().contains("GTK")) { - continue; - } - System.out.println("Testing LAF: " + laf.getName()); - SwingUtilities.invokeAndWait(() -> test(laf)); - } - } - - private static void test(UIManager.LookAndFeelInfo laf) { - setLookAndFeel(laf); - JProgressBar progressBar = createProgressBar(); - progressBar.setBorderPainted(true); - BufferedImage withBorder = paintToImage(progressBar); - progressBar.setBorderPainted(false); - BufferedImage withoutBorder = paintToImage(progressBar); - - boolean equal = Util.compareBufferedImages(withBorder, withoutBorder); - if (equal) { - try { - ImageIO.write(withBorder, "png", new File("withBorder.png")); - ImageIO.write(withoutBorder, "png", new File("withoutBorder.png")); - } catch (IOException ignored) {} - - throw new RuntimeException("JProgressBar border is painted when border " + - "painting is set to false"); - } - } - - private static void setLookAndFeel(UIManager.LookAndFeelInfo laf) { - try { - UIManager.setLookAndFeel(laf.getClassName()); - } catch (UnsupportedLookAndFeelException ignored) { - System.out.println("Unsupported LAF: " + laf.getClassName()); - } catch (ClassNotFoundException | InstantiationException - | IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - private static JProgressBar createProgressBar() { - JProgressBar progressBar = new JProgressBar(); - progressBar.setSize(100, 50); - progressBar.setValue(0); - progressBar.setStringPainted(true); - return progressBar; - } - - private static BufferedImage paintToImage(JComponent content) { - BufferedImage im = new BufferedImage(content.getWidth(), content.getHeight(), - TYPE_INT_RGB); - Graphics g = im.getGraphics(); - content.paint(g); - g.dispose(); - return im; - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/JSlider/bug4382876.java openjdk-25-25.0.3+9/test/jdk/javax/swing/JSlider/bug4382876.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/JSlider/bug4382876.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/JSlider/bug4382876.java 2026-04-17 19:08:13.000000000 +0000 @@ -48,8 +48,8 @@ private static Robot r; private static JFrame f; private static JSlider slider; - private static boolean upFail; - private static boolean downFail; + private static volatile boolean upFail; + private static volatile boolean downFail; public static void main(String[] args) throws Exception { try { @@ -70,23 +70,30 @@ r.delay(1000); r.keyPress(KeyEvent.VK_PAGE_UP); + r.keyRelease(KeyEvent.VK_PAGE_UP); + SwingUtilities.invokeAndWait(() -> { if (slider.getValue() < -1000) { System.out.println("PAGE_UP VAL: " + slider.getValue()); upFail = true; } }); + if (upFail) { writeFailImage(); throw new RuntimeException("Slider value did NOT change with PAGE_UP"); } + r.keyPress(KeyEvent.VK_PAGE_DOWN); + r.keyRelease(KeyEvent.VK_PAGE_DOWN); + SwingUtilities.invokeAndWait(() -> { if (slider.getValue() > -1000) { System.out.println("PAGE_DOWN VAL: " + slider.getValue()); downFail = true; } }); + if (downFail) { writeFailImage(); throw new RuntimeException("Slider value did NOT change with PAGE_DOWN"); diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java openjdk-25-25.0.3+9/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/JSpinner/8223788/JSpinnerButtonFocusTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +63,7 @@ robot.setAutoDelay(50); SwingUtilities.invokeAndWait(() -> { - frame = new JFrame(); + frame = new JFrame("JSpinnerButtonFocusTest"); spinner1 = new JSpinner(); spinner2 = new JSpinner(); @@ -72,6 +72,15 @@ frame.getContentPane().add(spinner2, BorderLayout.SOUTH); editor1 = ((DefaultEditor)spinner1.getEditor()); + editor1.getTextField().addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + super.focusGained(e); + robot.keyPress(KeyEvent.VK_TAB); + robot.keyRelease(KeyEvent.VK_TAB); + latch1.countDown(); + } + }); editor1.setFocusable(false); spinner1.setFocusable(false); @@ -84,26 +93,18 @@ frame.setFocusTraversalPolicyProvider(true); frame.setAlwaysOnTop(true); - frame.pack(); + frame.setSize(100, 100); + frame.setLocationRelativeTo(null); frame.setVisible(true); }); robot.waitForIdle(); - - editor1.getTextField().addFocusListener(new FocusAdapter() { - @Override - public void focusGained(FocusEvent e) { - super.focusGained(e); - robot.keyPress(KeyEvent.VK_TAB); - robot.keyRelease(KeyEvent.VK_TAB); - latch1.countDown(); - } - }); + robot.delay(1000); SwingUtilities.invokeAndWait(() -> { editor1.getTextField().requestFocusInWindow(); }); - if (!latch1.await(15, TimeUnit.MINUTES)) { + if (!latch1.await(1, TimeUnit.MINUTES)) { throw new RuntimeException(LF.getClassName() + ": Timeout waiting for editor1 to gain focus."); } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/basic/BasicHTML/bug4248210.java openjdk-25-25.0.3+9/test/jdk/javax/swing/plaf/basic/BasicHTML/bug4248210.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/basic/BasicHTML/bug4248210.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/plaf/basic/BasicHTML/bug4248210.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ UIManager.getDefaults().put("Label.foreground", labelColor); } - JLabel label = new JLabel("Can You Read This?"); + JLabel label = new JLabel("\u2588 \u2588 \u2588 \u2588"); label.setSize(150, 30); BufferedImage img = paintToImage(label); diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/nimbus/TestNimbusProgressBarBorder.java openjdk-25-25.0.3+9/test/jdk/javax/swing/plaf/nimbus/TestNimbusProgressBarBorder.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/nimbus/TestNimbusProgressBarBorder.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/plaf/nimbus/TestNimbusProgressBarBorder.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8192888 + * @key headful + * @summary Verifies ProgressBar in Synth L&F renders background + * when border is not painted + * @run main TestNimbusProgressBarBorder + */ + +import java.io.File; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.GridBagLayout; +import java.awt.image.BufferedImage; +import java.awt.Rectangle; +import java.awt.Robot; + +import javax.imageio.ImageIO; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.UIManager; +import javax.swing.SwingUtilities; + +public class TestNimbusProgressBarBorder { + + private static JFrame frame; + private static JProgressBar progressBar; + private static boolean failure = true; + private static volatile Rectangle rect; + + public static void main(String[] args) throws Exception { + int width = 200; + int height = 100; + try { + Robot robot = new Robot(); + SwingUtilities.invokeAndWait(() -> { + try { + // Set Nimbus L&F + UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel"); + } catch (Exception e) { + throw new RuntimeException(e); + } + frame = new JFrame("Nimbus JProgressBar Test"); + frame.setSize(width, height); + + // ProgressBar setup + progressBar = new JProgressBar(0, 100); + progressBar.setValue(0); + progressBar.setBorderPainted(false); + + JPanel center = new JPanel(new GridBagLayout()); + center.setBackground(Color.WHITE); + center.add(progressBar); + + frame.add(center, BorderLayout.CENTER); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + }); + robot.waitForIdle(); + robot.delay(1000); + SwingUtilities.invokeAndWait(() -> { + rect = progressBar.getBounds(); + }); + + BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + Graphics2D g2d = (Graphics2D) img.getGraphics(); + g2d.setColor(Color.WHITE); + g2d.fillRect(0, 0, rect.width, rect.height); + progressBar.paint(g2d); + g2d.dispose(); + + robot.waitForIdle(); + robot.delay(100); + + for (int x = 10; x < (10 + rect.width / 2); x++) { + for (int y = 10; y < (10 + rect.height / 2); y++) { + Color col = new Color(img.getRGB(x, y)); + if (!col.equals(Color.WHITE)) { + failure = false; + break; + } + } + } + if (failure) { + ImageIO.write(img, "png", new File("ProgressBarTest.png")); + throw new RuntimeException("ProgressBar background not drawn"); + } + } finally { + SwingUtilities.invokeAndWait(() -> { + if (frame != null) { + frame.dispose(); + } + }); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/regtesthelpers/Util.java openjdk-25-25.0.3+9/test/jdk/javax/swing/regtesthelpers/Util.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/regtesthelpers/Util.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/regtesthelpers/Util.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +21,32 @@ * questions. */ -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; +import java.awt.AWTException; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dialog; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.Callable; +import java.util.function.Predicate; + +import javax.swing.Box; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.SwingUtilities; + +import static javax.swing.SwingUtilities.isEventDispatchThread; /** *

This class contains utilities useful for regression testing. @@ -123,26 +141,44 @@ } /** - * Find a sub component by class name. - * Always run this method on the EDT thread + * Find a subcomponent by class name. */ public static Component findSubComponent(Component parent, String className) { - String parentClassName = parent.getClass().getName(); + return findComponent((Container) parent, + c -> c.getClass() + .getName() + .contains(className)); + } - if (parentClassName.contains(className)) { - return parent; + /** + * Find a component based on predicate. + */ + public static Component findComponent(final Container container, + final Predicate predicate) { + try { + if (isEventDispatchThread()) { + return findComponentImpl(container, predicate); + } else { + return Util.invokeOnEDT(() -> findComponentImpl(container, predicate)); + } + } catch (Exception e) { + throw new RuntimeException("Error occurred while finding component", e); } + } - if (parent instanceof Container) { - for (Component child : ((Container) parent).getComponents()) { - Component subComponent = findSubComponent(child, className); - - if (subComponent != null) { - return subComponent; + private static Component findComponentImpl(final Container container, + final Predicate predicate) { + for (Component child : container.getComponents()) { + if (predicate.test(child)) { + return child; + } + if (child instanceof Container cont && cont.getComponentCount() > 0) { + Component result = findComponentImpl(cont, predicate); + if (result != null) { + return result; } } } - return null; } diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/text/GlyphView/bug4188841.java openjdk-25-25.0.3+9/test/jdk/javax/swing/text/GlyphView/bug4188841.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/text/GlyphView/bug4188841.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/text/GlyphView/bug4188841.java 2026-04-17 19:08:13.000000000 +0000 @@ -69,7 +69,7 @@ JFrame frame = new JFrame("bug4188841"); NoWrapTextPane nwp = new NoWrapTextPane(); - nwp.setText("the\tslow\tbrown\tfox\tjumps\tover\tthe\tlazy\tdog!"); + nwp.setText("the\tquick\tbrown\tfox\tjumps\tover\tthe\tlazy\tdog!"); nwp.setCaretPosition(nwp.getText().length()); JScrollPane scrollPane = new JScrollPane(nwp, diff -Nru openjdk-25-25.0.2+10/test/jdk/javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java openjdk-25-25.0.3+9/test/jdk/javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java --- openjdk-25-25.0.2+10/test/jdk/javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. * 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,8 +51,8 @@ htmlPane.setEditorKit(kit); String htmlString = "\n" - + "\n" - + "

This should be 16 pt.

\n" + + "\n" + + "

This should be 32 pt.

\n" + "\n" + ""; @@ -71,10 +71,16 @@ System.out.println("size with W3C:" + w3cFrameSize); System.out.println("size without W3C:" + stdFrameSize); - float ratio = (float)w3cFrameSize.width / (float)stdFrameSize.width; - System.out.println("w3cFrameSize.width/stdFrameSize.width " + ratio); + float widthRatio = (float)w3cFrameSize.width / (float)stdFrameSize.width; + System.out.println("w3cFrameSize.width/stdFrameSize.width " + widthRatio); - if (!"1.3".equals(String.format(Locale.ENGLISH, "%.1f", ratio))) { + float heightRatio = (float)w3cFrameSize.height / (float)stdFrameSize.height; + System.out.println("w3cFrameSize.height/stdFrameSize.height " + heightRatio); + + float avgRatio = (widthRatio + heightRatio) / 2.0f; + System.out.println("Average ratio of two dimensions " + avgRatio); + + if (!"1.3".equals(String.format(Locale.ENGLISH, "%.1f", avgRatio))) { throw new RuntimeException("HTML font size too large with high-DPI scaling and W3C_LENGTH_UNITS"); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/jline/JLineConsoleProviderTest.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/jline/JLineConsoleProviderTest.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/jline/JLineConsoleProviderTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/jline/JLineConsoleProviderTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,16 +23,19 @@ /** * @test - * @bug 8331535 8351435 8347050 + * @bug 8331535 8351435 8347050 8361613 * @summary Verify the jdk.internal.le's console provider works properly. - * @modules jdk.internal.le + * @modules java.base/jdk.internal.io + * jdk.internal.le/jdk.internal.org.jline * @library /test/lib - * @run main/othervm -Djdk.console=jdk.internal.le JLineConsoleProviderTest + * @run main JLineConsoleProviderTest */ import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; import java.util.Objects; +import jdk.internal.org.jline.JdkConsoleProviderImpl; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; @@ -66,8 +69,13 @@ String input, String expectedOut) throws Exception { ProcessBuilder builder = - ProcessTools.createTestJavaProcessBuilder("-Djdk.console=jdk.internal.le", ConsoleTest.class.getName(), - testName); + ProcessTools.createTestJavaProcessBuilder( + "--add-exports", + "java.base/jdk.internal.io=ALL-UNNAMED", + "--add-exports", + "jdk.internal.le/jdk.internal.org.jline=ALL-UNNAMED", + ConsoleTest.class.getName(), + testName); OutputAnalyzer output = ProcessTools.executeProcess(builder, input); output.waitFor(); @@ -98,16 +106,18 @@ public static class ConsoleTest { public static void main(String... args) { + // directly instantiate JLine JdkConsole, simulating isTTY=true + var impl = new JdkConsoleProviderImpl().console(true, StandardCharsets.UTF_8, StandardCharsets.UTF_8); switch (args[0]) { case "testCorrectOutputReadLine" -> - System.console().readLine("%%s"); + impl.readLine(null, "%%s"); case "testCorrectOutputReadPassword" -> - System.console().readPassword("%%s"); + impl.readPassword(null, "%%s"); case "readAndPrint" -> - System.out.println("'" + System.console().readLine() + "'"); + System.out.println("'" + impl.readLine() + "'"); case "readAndPrint2" -> { - System.out.println("1: '" +System.console().readLine() + "'"); - System.out.println("2: '" + System.console().readLine() + "'"); + System.out.println("1: '" + impl.readLine() + "'"); + System.out.println("2: '" + impl.readLine() + "'"); } default -> throw new UnsupportedOperationException(args[0]); } diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,15 +23,19 @@ /** * @test - * @bug 8333086 8344706 + * @bug 8333086 8344706 8361613 * @summary Verify the JLine backend is not initialized for simple printing. - * @enablePreview - * @modules jdk.internal.le/jdk.internal.org.jline.reader + * @modules java.base/jdk.internal.io + * jdk.internal.le/jdk.internal.org.jline + * jdk.internal.le/jdk.internal.org.jline.reader * jdk.internal.le/jdk.internal.org.jline.terminal * @library /test/lib * @run main LazyJdkConsoleProvider */ +import java.nio.charset.StandardCharsets; + +import jdk.internal.org.jline.JdkConsoleProviderImpl; import jdk.internal.org.jline.reader.LineReader; import jdk.internal.org.jline.terminal.Terminal; @@ -41,19 +45,18 @@ public class LazyJdkConsoleProvider { public static void main(String... args) throws Throwable { + // directly instantiate JLine JdkConsole, simulating isTTY=true switch (args.length > 0 ? args[0] : "default") { case "write" -> { - System.console().printf("Hello!\n"); - System.console().printf("Hello!"); - System.console().format("\nHello!\n"); - System.console().flush(); - IO.println("Hello!"); - IO.print("Hello!"); - } - case "read" -> System.console().readLine("Hello!"); - case "IO-read" -> { - IO.readln("Hello!"); + var impl = new JdkConsoleProviderImpl().console(true, StandardCharsets.UTF_8, StandardCharsets.UTF_8); + impl.println("Hello!\n"); + impl.println("Hello!"); + impl.format(null, "\nHello!\n"); + impl.flush(); } + case "read" -> new JdkConsoleProviderImpl() + .console(true, StandardCharsets.UTF_8, StandardCharsets.UTF_8) + .readLine(null, "Hello!"); case "default" -> { new LazyJdkConsoleProvider().runTest(); } @@ -64,14 +67,15 @@ record TestCase(String testKey, String expected, String notExpected) {} TestCase[] testCases = new TestCase[] { new TestCase("write", null, Terminal.class.getName()), - new TestCase("read", LineReader.class.getName(), null), - new TestCase("IO-read", null, Terminal.class.getName()) + new TestCase("read", LineReader.class.getName(), null) }; for (TestCase tc : testCases) { ProcessBuilder builder = - ProcessTools.createTestJavaProcessBuilder("--enable-preview", - "-verbose:class", - "-Djdk.console=jdk.internal.le", + ProcessTools.createTestJavaProcessBuilder("-verbose:class", + "--add-exports", + "java.base/jdk.internal.io=ALL-UNNAMED", + "--add-exports", + "jdk.internal.le/jdk.internal.org.jline=ALL-UNNAMED", LazyJdkConsoleProvider.class.getName(), tc.testKey()); OutputAnalyzer output = ProcessTools.executeProcess(builder, ""); diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/jline/RedirectedStdOut.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/jline/RedirectedStdOut.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/jline/RedirectedStdOut.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/jline/RedirectedStdOut.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact 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 8330998 8351435 - * @summary Verify that even if the stdout is redirected java.io.Console will - * use it for writing. - * @modules jdk.internal.le - * @library /test/lib - * @run main RedirectedStdOut runRedirectAllTest - * @run main/othervm --enable-native-access=ALL-UNNAMED RedirectedStdOut runRedirectOutOnly - */ - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.lang.foreign.Arena; -import java.lang.foreign.FunctionDescriptor; -import java.lang.foreign.Linker; -import java.lang.foreign.MemorySegment; -import java.lang.foreign.SymbolLookup; -import java.lang.foreign.ValueLayout; -import java.lang.invoke.MethodHandle; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Objects; -import java.util.Optional; - -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.process.ProcessTools; - -public class RedirectedStdOut { - private static final String OUTPUT = "Hello!"; - - public static void main(String... args) throws Throwable { - RedirectedStdOut.class.getDeclaredMethod(args[0]) - .invoke(new RedirectedStdOut()); - } - - //verify the case where neither stdin/out/err is attached to a terminal, - //this test is weaker, but more reliable: - void runRedirectAllTest() throws Exception { - ProcessBuilder builder = - ProcessTools.createTestJavaProcessBuilder("-Djdk.console=jdk.internal.le", ConsoleTest.class.getName()); - OutputAnalyzer output = ProcessTools.executeProcess(builder); - - output.waitFor(); - - if (output.getExitValue() != 0) { - throw new AssertionError("Unexpected return value: " + output.getExitValue() + - ", actualOut: " + output.getStdout() + - ", actualErr: " + output.getStderr()); - } - - String expectedOut = OUTPUT; - String actualOut = output.getStdout(); - - if (!Objects.equals(expectedOut, actualOut)) { - throw new AssertionError("Unexpected stdout content. " + - "Expected: '" + expectedOut + "'" + - ", got: '" + actualOut + "'"); - } - - String expectedErr = ""; - String actualErr = output.getStderr(); - - if (!Objects.equals(expectedErr, actualErr)) { - throw new AssertionError("Unexpected stderr content. " + - "Expected: '" + expectedErr + "'" + - ", got: '" + actualErr + "'"); - } - } - - //verify the case where stdin is attached to a terminal, - //this test allocates pty, and it might be skipped, if the appropriate - //native functions cannot be found - //it also leaves the VM in a broken state (with a pty attached), and so - //should run in a separate VM instance - void runRedirectOutOnly() throws Throwable { - Path stdout = Path.of(".", "stdout.txt").toAbsolutePath(); - - Files.deleteIfExists(stdout); - - Linker linker = Linker.nativeLinker(); - SymbolLookup stdlib = linker.defaultLookup(); - MemorySegment parent = Arena.global().allocate(ValueLayout.ADDRESS); - MemorySegment child = Arena.global().allocate(ValueLayout.ADDRESS); - Optional openptyAddress = stdlib.find("openpty"); - - if (openptyAddress.isEmpty()) { - System.out.println("Cannot lookup openpty."); - //does not have forkpty, ignore - return ; - } - - Optional loginttyAddress = stdlib.find("login_tty"); - - if (loginttyAddress.isEmpty()) { - System.out.println("Cannot lookup login_tty."); - //does not have forkpty, ignore - return ; - } - - FunctionDescriptor openttyDescriptor = - FunctionDescriptor.of(ValueLayout.JAVA_INT, - ValueLayout.ADDRESS, - ValueLayout.ADDRESS, - ValueLayout.ADDRESS, - ValueLayout.ADDRESS, - ValueLayout.ADDRESS); - MethodHandle forkpty = linker.downcallHandle(openptyAddress.get(), - openttyDescriptor); - int res = (int) forkpty.invoke(parent, - child, - MemorySegment.NULL, - MemorySegment.NULL, - MemorySegment.NULL); - - if (res != 0) { - throw new AssertionError(); - } - - //set the current VM's in/out to the terminal: - FunctionDescriptor loginttyDescriptor = - FunctionDescriptor.of(ValueLayout.JAVA_INT, - ValueLayout.JAVA_INT); - MethodHandle logintty = linker.downcallHandle(loginttyAddress.get(), - loginttyDescriptor); - logintty.invoke(child.get(ValueLayout.JAVA_INT, 0)); - - //createTestJavaProcessBuilder logs to (current process') System.out, but - //that may not work since the redirect. Setting System.out to a scratch value: - System.setOut(new PrintStream(new ByteArrayOutputStream())); - - ProcessBuilder builder = - ProcessTools.createTestJavaProcessBuilder("-Djdk.console=jdk.internal.le", ConsoleTest.class.getName()); - - builder.inheritIO(); - builder.redirectOutput(stdout.toFile()); - - OutputAnalyzer output = ProcessTools.executeProcess(builder); - - output.waitFor(); - - String expectedOut = OUTPUT; - String actualOut = Files.readString(stdout); - - if (!Objects.equals(expectedOut, actualOut)) { - throw new AssertionError("Unexpected stdout content. " + - "Expected: '" + expectedOut + "'" + - ", got: '" + actualOut + "'"); - } - } - - public static class ConsoleTest { - public static void main(String... args) { - System.console().printf(OUTPUT); - System.exit(0); - } - } -} diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/MetricsCpuTester.java 2026-04-17 19:08:13.000000000 +0000 @@ -145,9 +145,13 @@ private static void testCpuShares(long shares) { Metrics metrics = Metrics.systemMetrics(); if ("cgroupv2".equals(metrics.getProvider()) && shares < 1024) { - // Adjust input shares for < 1024 cpu shares as the - // impl. rounds up to the next multiple of 1024 - shares = 1024; + // Don't assert for shares values less than 1024 as we don't + // have a 1-to-1 mapping from the cgroup v2 value to the OCI + // value. + System.out.println("Debug: cgv2 - Got CPU shares of: " + + metrics.getCpuShares() + " - Skipping assert."); + System.out.println("TEST PASSED!!!"); + return; } long newShares = metrics.getCpuShares(); if (newShares != shares) { diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ // We need swap to execute this test or will SEGV if (memAndSwapLimit <= memLimit) { - System.out.println("No swap memory limits, test case skipped"); + System.out.println("No swap memory limits. Ignoring test!"); } else { long count = Metrics.systemMetrics().getMemoryFailCount(); diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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 jdk.test.lib.containers.docker.DockerRunOptions; import jdk.test.lib.containers.docker.DockerTestUtils; import jdk.test.lib.process.OutputAnalyzer; +import jtreg.SkippedException; /* * @test @@ -112,18 +113,22 @@ // Check whether swapping really works for this test // On some systems there is no swap space enabled. And running - // 'java -Xms{mem-limit} -Xmx{mem-limit} -version' would fail due to swap space size being 0. + // 'java -Xms{mem-limit} -Xmx{mem-limit} -XX:+AlwaysPreTouch -version' + // would fail due to swap space size being 0. Note that when swap is + // properly enabled on the system the container gets the same amount + // of swap as is configured for memory. Thus, 2x{mem-limit} is the actual + // memory and swap bound for this pre-test. DockerRunOptions preOpts = new DockerRunOptions(imageName, "/jdk/bin/java", "-version"); preOpts.addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/") .addDockerOpts("--memory=" + value) + .addJavaOpts("-XX:+AlwaysPreTouch") .addJavaOpts("-Xms" + value) .addJavaOpts("-Xmx" + value); OutputAnalyzer oa = DockerTestUtils.dockerRunJava(preOpts); String output = oa.getOutput(); if (!output.contains("version")) { - System.out.println("Swapping doesn't work for this test."); - return; + throw new SkippedException("Swapping doesn't work for this test."); } DockerRunOptions opts = @@ -137,8 +142,7 @@ oa = DockerTestUtils.dockerRunJava(opts); output = oa.getOutput(); if (output.contains("Ignoring test")) { - System.out.println("Ignored by the tester"); - return; + throw new SkippedException("Ignored by the tester"); } oa.shouldHaveExitValue(0).shouldContain("TEST PASSED!!!"); } diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java 2026-04-17 19:08:13.000000000 +0000 @@ -52,19 +52,6 @@ DockerfileConfig.getBaseImageName() + ":" + DockerfileConfig.getBaseImageVersion(); - static String getEngineInfo(String format) throws Exception { - return DockerTestUtils.execute(Container.ENGINE_COMMAND, "info", "-f", format) - .getStdout(); - } - - static boolean isRootless() throws Exception { - // Docker and Podman have different INFO structures. - // The node path for Podman is .Host.Security.Rootless, that also holds for - // Podman emulating Docker CLI. The node path for Docker is .SecurityOptions. - return (getEngineInfo("{{.Host.Security.Rootless}}").contains("true") || - getEngineInfo("{{.SecurityOptions}}").contains("name=rootless")); - } - public static void main(String[] args) throws Exception { Metrics metrics = Metrics.systemMetrics(); if (metrics == null) { @@ -78,7 +65,7 @@ ContainerRuntimeVersionTestUtils.checkContainerVersionSupported(); - if (isRootless()) { + if (DockerTestUtils.isRootless()) { throw new SkippedException("Test skipped in rootless mode"); } diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/vm/Continuation/Fuzz.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/vm/Continuation/Fuzz.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/vm/Continuation/Fuzz.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/vm/Continuation/Fuzz.java 2026-04-17 19:08:13.000000000 +0000 @@ -97,6 +97,9 @@ if (Platform.isPPC()) { COMPILATION_TIMEOUT = COMPILATION_TIMEOUT * 2; } + if (Platform.isDebugBuild()) { + COMPILATION_TIMEOUT = COMPILATION_TIMEOUT * 2; + } warmup(); for (int compileLevel : new int[]{4}) { for (boolean compileRun : new boolean[]{true}) { diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/internal/vm/Continuation/OSRWithManyLocals.java openjdk-25-25.0.3+9/test/jdk/jdk/internal/vm/Continuation/OSRWithManyLocals.java --- openjdk-25-25.0.2+10/test/jdk/jdk/internal/vm/Continuation/OSRWithManyLocals.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/internal/vm/Continuation/OSRWithManyLocals.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* This code is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 only, as +* published by the Free Software Foundation. +* +* This code is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +* version 2 for more details (a copy is included in the LICENSE file that +* accompanied this code). +* +* You should have received a copy of the GNU General Public License version +* 2 along with this work; if not, write to the Free Software Foundation, +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* Please contact 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 8372591 +* @summary Test freeze/thaw of OSR frame from method with many locals +* @requires vm.continuations +* @requires vm.compMode != "Xint" & vm.compMode != "Xcomp" +* @modules java.base/jdk.internal.vm +* @library /test/lib /test/hotspot/jtreg +* @build jdk.test.whitebox.WhiteBox +* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox +* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI OSRWithManyLocals +*/ + +import jdk.internal.vm.Continuation; +import jdk.internal.vm.ContinuationScope; + +import jdk.test.lib.Asserts; +import java.lang.reflect.Method; +import jdk.test.whitebox.WhiteBox; + +public class OSRWithManyLocals { + static final WhiteBox wb = WhiteBox.getWhiteBox(); + static final ContinuationScope FOO = new ContinuationScope() {}; + static final Method foo = getMethod("foo"); + + public static void main(String[] args) throws Exception { + runCont(new Continuation(FOO, () -> warmUp())); + runCont(new Continuation(FOO, () -> foo())); + } + + public static void runCont(Continuation cont) { + while (!cont.isDone()) { + cont.run(); + } + } + + public static void warmUp() { + // Trigger compilation of Continuation.yield/yield0 + for (int i = 0; i < 10_000; i++) { + Continuation.yield(FOO); + } + } + + public static void foo() { + // Declare lots of locals so that size of OSR foo + Continuation.yield/yield0 + // frames is less than (foo_sender.unextended_sp() - foo_sender.sp()). + double d1=1,d2=2,d3=3,d4=4,d5=5,d6=6,d7=7,d8=8,d9=9,d10=10,d11=11,d12=12,d13=13,d14=14,d15=15,d16=16,d17=17,d18=18; + double d19=19,d20=20,d21=21,d22=22,d23=23,d24=24,d25=25,d26=26,d27=27,d28=28,d29=29,d30=30,d31=31,d32=32,d33=33,d34=34; + double d35=35,d36=36,d37=37,d38=38,d39=39,d40=40,d41=41,d42=42,d43=43,d44=44,d45=45,d46=46,d47=47,d48=48,d49=49,d50=50; + double d51=51,d52=52,d53=53,d54=54,d55=55,d56=56,d57=57,d58=58,d59=59,d60=60,d61=61,d62=62,d63=63,d64=64,d65=65,d66=66; + double d67=67,d68=68,d69=69,d70=70,d71=71,d72=72,d73=73,d74=74,d75=75,d76=76,d77=77,d78=78,d79=79,d80=80,d81=81,d82=82; + + // Provoke OSR compilation. After we verified the method was compiled keep looping + // until we trigger the _backedge_counter overflow to actually trigger OSR. + for (int i = 0; !wb.isMethodCompiled(foo, true) || i++ < 2_000;) { + } + Continuation.yield(FOO); + } + + static Method getMethod(String method) { + try { + return OSRWithManyLocals.class.getMethod(method); + } catch (Exception e) { + throw new RuntimeException("Exception: couldn't found method " + method + ". " + e.getMessage()); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/consumer/streaming/TestFilledChunks.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/api/consumer/streaming/TestFilledChunks.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/consumer/streaming/TestFilledChunks.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/api/consumer/streaming/TestFilledChunks.java 2026-04-17 19:08:13.000000000 +0000 @@ -26,6 +26,7 @@ import java.util.Random; import jdk.jfr.Event; +import jdk.jfr.StackTrace; import jdk.jfr.consumer.RecordingStream; /** @@ -38,6 +39,7 @@ */ public class TestFilledChunks { + @StackTrace(false) static class FillEvent extends Event { String message; int value; diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/consumer/streaming/TestStartMultiChunk.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/api/consumer/streaming/TestStartMultiChunk.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/consumer/streaming/TestStartMultiChunk.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/api/consumer/streaming/TestStartMultiChunk.java 2026-04-17 19:08:13.000000000 +0000 @@ -44,7 +44,7 @@ */ public class TestStartMultiChunk { - @Period("10 s") + @Period("2 s") @Name("Zebra") static class ZebraEvent extends Event { } @@ -65,7 +65,7 @@ CountDownLatch dogLatch = new CountDownLatch(1); CountDownLatch catLatch = new CountDownLatch(1); CountDownLatch mouseLatch = new CountDownLatch(1); - CountDownLatch zebraLatch = new CountDownLatch(3); + CountDownLatch zebraLatch = new CountDownLatch(2); FlightRecorder.addPeriodicEvent(ZebraEvent.class, () -> { ZebraEvent ze = new ZebraEvent(); diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2026, Oracle and/or its affiliates. All rights reserved. * 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,7 +36,8 @@ * @requires vm.hasJFR & vm.gc.Z * @requires vm.flagless * @library /test/lib /test/jdk /test/hotspot/jtreg - * @run main/othervm -XX:+UseZGC -Xmx32M -Xlog:gc*:gc.log::filecount=0 jdk.jfr.event.gc.detailed.TestZAllocationStallEvent + * @run main/othervm -XX:+UseZGC -Xmx64M -Xlog:gc*:gc.log::filecount=0 + * jdk.jfr.event.gc.detailed.TestZAllocationStallEvent */ public class TestZAllocationStallEvent { @@ -47,7 +48,7 @@ recording.start(); // Allocate many large objects quickly, to outrun the GC - for (int i = 0; i < 100; i++) { + for (int i = 0; i < 1000; i++) { blackHole(new byte[4 * 1024 * 1024]); } diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2025, NTT DATA. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -97,8 +97,8 @@ // Check OldObjectSample events if (oldObjects.get() > 0L) { if (shouldCrash) { - Asserts.assertEquals("VM Error", shutdownReason.get()); - Asserts.assertEquals("Out of Memory", dumpReason.get()); + Asserts.assertEquals("CrashOnOutOfMemoryError", shutdownReason.get()); + Asserts.assertEquals("CrashOnOutOfMemoryError", dumpReason.get()); } else { Asserts.assertEquals("No remaining non-daemon Java threads", shutdownReason.get()); } diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleMultipleRecordings.java 2026-04-17 19:08:13.000000000 +0000 @@ -39,20 +39,15 @@ * @run main jdk.jfr.event.profiling.TestCPUTimeSampleMultipleRecordings */ public class TestCPUTimeSampleMultipleRecordings { - - static String nativeEvent = EventNames.CPUTimeSample; - static volatile boolean alive = true; public static void main(String[] args) throws Exception { Thread t = new Thread(TestCPUTimeSampleMultipleRecordings::nativeMethod); - t.setDaemon(true); t.start(); for (int i = 0; i < 2; i++) { try (RecordingStream rs = new RecordingStream()) { - rs.enable(nativeEvent).with("throttle", "1ms"); - rs.onEvent(nativeEvent, e -> { - alive = false; + rs.enable(EventNames.CPUTimeSample).with("throttle", "1ms"); + rs.onEvent(EventNames.CPUTimeSample, e -> { rs.close(); }); @@ -60,6 +55,7 @@ } } alive = false; + t.join(); } public static void nativeMethod() { diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2025 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. + */ + +package jdk.jfr.event.profiling; + +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.stream.Collectors; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; + +import jdk.jfr.Recording; +import jdk.jfr.consumer.RecordingStream; +import jdk.jfr.consumer.RecordedEvent; +import jdk.jfr.internal.JVM; +import jdk.test.lib.Asserts; +import jdk.test.lib.jfr.EventNames; +import jdk.test.whitebox.WhiteBox; + + +/* + * Tests the sample queues increase in size as needed, when loss is recorded. + * + * The test starts CPU time sampling with a short interval (1ms), disabling + * out-of-stack sample processing for the duration of the test. + * It now runs in native for one second, to cause queue overflows, + * then it comes back into Java to trigger the queue walking. + * Repeats the cycle 5 times and verifies that the loss decreases from the first + * to the last iteration. + * @test + * @requires vm.hasJFR & os.family == "linux" & vm.debug & vm.flagless + * @library /test/lib + * @modules jdk.jfr/jdk.jfr.internal + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Xbatch -XX:StartFlightRecording:dumponexit=true jdk.jfr.event.profiling.TestCPUTimeSampleQueueAutoSizes + */ +public class TestCPUTimeSampleQueueAutoSizes { + + private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); + + record LossEvent(long relativeTimeMillis, long lostSamples) {} + + /** A data collection from the CPUTimeSampleLost events for the burst thread */ + static class LossEventCollection { + private final List events = new ArrayList<>(); + private final List sampleEventsInTimeBox = new ArrayList<>(); + private final List timeBoxEnds = new ArrayList<>(); + + public synchronized void addEvent(LossEvent event) { + events.add(event); + } + + public synchronized List getSortedEvents() { + return events.stream() + .sorted(Comparator.comparingLong(e -> e.relativeTimeMillis)) + .collect(Collectors.toList()); + } + + public synchronized List getEventsPerTimeBox() { + List ret = new ArrayList<>(); + AtomicLong previousEnd = new AtomicLong(0); + for (Long timeBoxEnd : timeBoxEnds) { + long lostSamples = events.stream() + .filter(e -> e.relativeTimeMillis >= previousEnd.get() && e.relativeTimeMillis <= timeBoxEnd) + .mapToLong(e -> e.lostSamples) + .sum(); + ret.add(new LossEvent(previousEnd.get(), lostSamples)); + previousEnd.set(timeBoxEnd); + } + return ret; + } + + public synchronized void addTimeBoxEnd(long timeBoxEnd, long sampleEvents) { + timeBoxEnds.add(timeBoxEnd); + sampleEventsInTimeBox.add(sampleEvents); + } + + public synchronized void print() { + System.out.println("Loss event information:"); + for (int i = 0; i < timeBoxEnds.size(); i++) { + System.out.println(" Time box end: " + timeBoxEnds.get(i) + ", sample events: " + sampleEventsInTimeBox.get(i)); + } + for (LossEvent e : events) { + System.out.println(" Lost samples event: " + e.lostSamples + " at " + e.relativeTimeMillis); + } + for (LossEvent e : getEventsPerTimeBox()) { + System.out.println(" Lost samples in time box ending at " + e.relativeTimeMillis + ": " + e.lostSamples); + } + } + } + + public static void main(String[] args) throws Exception { + try (RecordingStream rs = new RecordingStream()) { + // setup recording + long burstThreadId = Thread.currentThread().threadId(); + final long startTimeMillis = Instant.now().toEpochMilli(); + LossEventCollection lossEvents = new LossEventCollection(); + AtomicLong sampleEventCountInTimeBox = new AtomicLong(0); + rs.enable(EventNames.CPUTimeSample).with("throttle", "1ms"); + rs.enable(EventNames.CPUTimeSamplesLost); + rs.onEvent(EventNames.CPUTimeSamplesLost, e -> { + if (e.getThread("eventThread").getJavaThreadId() == burstThreadId) { + long eventTime = e.getStartTime().toEpochMilli(); + long relativeTime = eventTime - startTimeMillis; + System.out.println("Lost samples: " + e.getLong("lostSamples") + " at " + relativeTime + " start time " + startTimeMillis); + lossEvents.addEvent(new LossEvent(relativeTime, e.getLong("lostSamples"))); + } + }); + rs.onEvent(EventNames.CPUTimeSample, e -> { + if (e.getThread("eventThread").getJavaThreadId() == burstThreadId) { + sampleEventCountInTimeBox.incrementAndGet(); + } + }); + rs.startAsync(); + // we disable the out-of-stack walking so that the queue fills up and overflows + // while we are in native code + disableOutOfStackWalking(); + + + for (int i = 0; i < 5; i++) { + // run in native for one second + WHITE_BOX.busyWaitCPUTime(1000); + // going out-of-native at the end of the previous call should have triggered + // the safepoint handler, thereby also triggering the stack walking and creation + // of the loss event + WHITE_BOX.forceSafepoint(); // just to be sure + lossEvents.addTimeBoxEnd(Instant.now().toEpochMilli() - startTimeMillis, sampleEventCountInTimeBox.get()); + sampleEventCountInTimeBox.set(0); + } + + rs.stop(); + rs.close(); + + enableOutOfStackWalking(); + + checkThatLossDecreased(lossEvents); + } + } + + static void disableOutOfStackWalking() { + Asserts.assertTrue(WHITE_BOX.cpuSamplerSetOutOfStackWalking(false), "Out-of-stack-walking not supported"); + } + + static void enableOutOfStackWalking() { + WHITE_BOX.cpuSamplerSetOutOfStackWalking(true); + } + + static void checkThatLossDecreased(LossEventCollection lossEvents) { + lossEvents.print(); + List timeBoxedLosses = lossEvents.getEventsPerTimeBox(); + // check that the last time box has far fewer lost samples than the first + Asserts.assertTrue(timeBoxedLosses.get(timeBoxedLosses.size() - 1).lostSamples <= + timeBoxedLosses.get(0).lostSamples / 2); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestFullStackTrace.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/profiling/TestFullStackTrace.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestFullStackTrace.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/profiling/TestFullStackTrace.java 2026-04-17 19:08:13.000000000 +0000 @@ -32,6 +32,7 @@ * @library /test/lib * @build jdk.jfr.event.profiling.BaseTestFullStackTrace * @run main/othervm jdk.jfr.event.profiling.TestFullStackTrace + * @run main/othervm -XX:CompileCommand=compileonly,jdk.test.lib.jfr.RecurseThread::recurse* -XX:+PreserveFramePointer jdk.jfr.event.profiling.TestFullStackTrace */ public class TestFullStackTrace { diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/runtime/StressJavaMonitorEvents.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/runtime/StressJavaMonitorEvents.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/runtime/StressJavaMonitorEvents.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/runtime/StressJavaMonitorEvents.java 2026-04-17 19:08:13.000000000 +0000 @@ -52,7 +52,7 @@ */ public class StressJavaMonitorEvents { - static final int RUN_TIME_MS = 10000; + static final int RUN_TIME_MS = 5000; static final int GC_EVERY_MS = 500; static final int THREADS = 4; static final int NUM_LOCKS = 1024; diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/runtime/TestBackToBackSensitive.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/runtime/TestBackToBackSensitive.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/runtime/TestBackToBackSensitive.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/event/runtime/TestBackToBackSensitive.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.runtime; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Instant; +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.Set; + +import jdk.jfr.Configuration; +import jdk.jfr.Event; +import jdk.jfr.Recording; +import jdk.jfr.StackTrace; +import jdk.jfr.consumer.EventStream; +import jdk.jfr.consumer.RecordedClassLoader; +import jdk.test.lib.jfr.TestClassLoader; + +/** + * @test + * @summary The test verifies that jdk.ClassLoaderStatistics and + * jdk.ThreadThreadDump are not emitted at the beginning of a chunk + * when the period is everyChunk, as is the case in default.jfc + * @requires vm.flagless + * @requires vm.hasJFR + * @library /test/lib /test/jdk + * @run main/othervm jdk.jfr.event.runtime.TestBackToBackSensitive + */ +public class TestBackToBackSensitive { + @StackTrace(false) + static class FillEvent extends Event { + String message; + } + public static Object OBJECT; + + public static void main(String... arg) throws Exception { + TestClassLoader loader = new TestClassLoader(); + Class clazz = loader.loadClass(TestBackToBackSensitive.class.getName()); + String classLoaderName = loader.getClass().getName(); + OBJECT = clazz.getDeclaredConstructor().newInstance(); + Configuration configuration = Configuration.getConfiguration("default"); + try (Recording r1 = new Recording(configuration)) { + // Start chunk 1 + r1.start(); + try (Recording r2 = new Recording()) { + // Start chunk 2 + r2.start(); + // Starts chunk 3 + r2.stop(); + } + // Start chunk 4 by filling up chunk 3 + for (int i = 0; i < 1_500_000; i++) { + FillEvent f = new FillEvent(); + f.commit(); + } + r1.stop(); + Path file = Path.of("file.jfr"); + r1.dump(file); + Set threadDumps = new LinkedHashSet<>(); + Set classLoaderStatistics = new LinkedHashSet<>(); + Set physicalMemory = new LinkedHashSet<>(); + try (EventStream es = EventStream.openFile(file)) { + es.onEvent("jdk.ThreadDump", e -> threadDumps.add(e.getStartTime())); + es.onEvent("jdk.ClassLoaderStatistics", e -> { + RecordedClassLoader cl = e.getValue("classLoader"); + if (cl != null) { + if (cl.getType().getName().equals(classLoaderName)) { + classLoaderStatistics.add(e.getStartTime()); + System.out.println("Class loader" + e); + } + } + }); + es.onEvent("jdk.PhysicalMemory", e -> physicalMemory.add(e.getStartTime())); + es.start(); + } + long chunkFiles = filesInRepository(); + System.out.println("Number of chunk files: " + chunkFiles); + // When jdk.PhysicalMemory is expected to be emitted: + // Chunk 1: begin, end + // Chunk 2: begin, end + // Chunk 3: begin, end + // Chunk 4: begin, end + assertCount("jdk.PhysicalMemory", physicalMemory, 2 * chunkFiles); + // When jdk.ClassLoaderStatistics and jdk.ThreadThreadDump are expected to be + // emitted: + // Chunk 1: begin, end + // Chunk 2: begin, end + // Chunk 3: end + // Chunk 4: end + assertCount("jdk.ThreadDump", threadDumps, 2 + 2 + (chunkFiles - 2)); + assertCount("jdk.ClassLoaderStatistics", classLoaderStatistics, 2 + 2 + (chunkFiles - 2)); + } + } + + private static long filesInRepository() throws IOException { + Path repository = Path.of(System.getProperty("jdk.jfr.repository")); + return Files.list(repository).filter(p -> p.toString().endsWith(".jfr")).count(); + } + + private static void assertCount(String eventName, Set timestamps, long expected) throws Exception { + System.out.println("Timestamps for " + eventName + ":"); + for (Instant timestamp : timestamps) { + System.out.println(timestamp); + } + int count = timestamps.size(); + if (count != expected) { + throw new Exception("Expected " + expected + " timestamps for event " + eventName + ", but got " + count); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestMaxSize.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/jmx/streaming/TestMaxSize.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestMaxSize.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/jmx/streaming/TestMaxSize.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +33,7 @@ import javax.management.MBeanServerConnection; import jdk.jfr.Event; +import jdk.jfr.StackTrace; import jdk.management.jfr.RemoteRecordingStream; /** @@ -45,6 +46,7 @@ */ public class TestMaxSize { + @StackTrace(false) static class Monkey extends Event { } @@ -92,7 +94,7 @@ m.commit(); } System.out.println("Emitted " + count + " events"); - Thread.sleep(1000); + Thread.sleep(100); } private static int fileCount(Path dir) throws IOException { diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestRemoteDump.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/jmx/streaming/TestRemoteDump.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestRemoteDump.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/jmx/streaming/TestRemoteDump.java 2026-04-17 19:08:13.000000000 +0000 @@ -97,7 +97,7 @@ } } - private static List recordWithPolicy(String filename, Consumer policy) throws Exception { + private static List recordWithPolicy(String filename, boolean awaitEvents, Consumer policy) throws Exception { CountDownLatch latch1 = new CountDownLatch(1); CountDownLatch latch2 = new CountDownLatch(2); CountDownLatch latch3 = new CountDownLatch(3); @@ -111,14 +111,18 @@ rs.startAsync(); DumpEvent e1 = new DumpEvent(); e1.commit(); - latch1.await(); + if (awaitEvents) { + latch1.await(); + } // Force chunk rotation try (Recording r = new Recording()) { r.start(); DumpEvent e2 = new DumpEvent(); e2.commit(); } - latch2.await(); + if (awaitEvents) { + latch2.await(); + } DumpEvent e3 = new DumpEvent(); e3.commit(); latch3.await(); @@ -129,7 +133,7 @@ } private static void testSetMaxSize() throws Exception { - var events = recordWithPolicy("max-size.jfr", rs -> { + var events = recordWithPolicy("max-size.jfr", false, rs -> { // keeps all events for the dump rs.setMaxSize(100_000_000); }); @@ -140,7 +144,7 @@ } private static void testSetMaxAge() throws Exception { - var events = recordWithPolicy("max-age.jfr", rs -> { + var events = recordWithPolicy("max-age.jfr", false, rs -> { // keeps all events for the dump rs.setMaxAge(Duration.ofDays(1)); }); @@ -151,7 +155,7 @@ } private static void testSetNoPolicy() throws Exception { - var events = recordWithPolicy("no-policy.jfr", rs -> { + var events = recordWithPolicy("no-policy.jfr", true, rs -> { // use default policy, remove after consumption }); // Since latch3 have been triggered at least two events/chunks diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jvm/TestWaste.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/jvm/TestWaste.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jvm/TestWaste.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/jvm/TestWaste.java 2026-04-17 19:08:13.000000000 +0000 @@ -61,7 +61,7 @@ try (Recording r = new Recording(c)) { // Old objects that are cleared out should not create waste r.enable("jdk.OldObjectSample") - .with("cutoff", "infinity") + .with("cutoff", "2 s") .withStackTrace(); // No stack trace waste from allocation sample r.enable("jdk.ObjectAllocationSample") diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/jfr/startupargs/TestMultipleStartupRecordings.java openjdk-25-25.0.3+9/test/jdk/jdk/jfr/startupargs/TestMultipleStartupRecordings.java --- openjdk-25-25.0.2+10/test/jdk/jdk/jfr/startupargs/TestMultipleStartupRecordings.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/jfr/startupargs/TestMultipleStartupRecordings.java 2026-04-17 19:08:13.000000000 +0000 @@ -74,13 +74,6 @@ test(pb, "Started recording 1", "Started recording 2", "Started recording 3"); } - private static void testDefault() throws Exception { - System.out.println("testDefault"); - launchUnary(null); - launchBinary(null, null); - launchTernary(null, null, null); - } - private static void testColonDelimited() throws Exception { launchBinary(":name=myrecording1,filename=myrecording1.jfr", ":filename=myrecording2.jfr,name=myrecording2"); } @@ -99,7 +92,6 @@ } public static void main(String[] args) throws Exception { - testDefault(); testColonDelimited(); testMixed(); testWithFlightRecorderOptions(); diff -Nru openjdk-25-25.0.2+10/test/jdk/jdk/nio/zipfs/TestPosix.java openjdk-25-25.0.3+9/test/jdk/jdk/nio/zipfs/TestPosix.java --- openjdk-25-25.0.2+10/test/jdk/jdk/nio/zipfs/TestPosix.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/jdk/nio/zipfs/TestPosix.java 2026-04-17 19:08:13.000000000 +0000 @@ -60,7 +60,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -/** +/* * @test * @bug 8213031 8273935 8324635 * @summary Test POSIX ZIP file operations. @@ -756,7 +756,7 @@ delTree(UNZIP_DIR); Files.createDirectory(UNZIP_DIR); File targetDir = UNZIP_DIR.toFile(); - try (JarFile jf = new JarFile(ZIP_FILE.toFile())) { + try (JarFile jf = new JarFile(JAR_FILE.toFile())) { Enumeration zenum = jf.entries(); while (zenum.hasMoreElements()) { JarEntry ze = zenum.nextElement(); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/DrawBitmaskImage.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/DrawBitmaskImage.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/DrawBitmaskImage.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/DrawBitmaskImage.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 6248561 6264014 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that bitmask image copies work properly with the + * OGL pipeline when a SrcOver composite with extra alpha is involved. + * @run main/othervm -Dsun.java2d.opengl=True DrawBitmaskImage + * @run main/othervm DrawBitmaskImage + */ + +/* + * @test + * @bug 6248561 6264014 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that bitmask image copies work properly with the + * OGL pipeline when a SrcOver composite with extra alpha is involved. + * @run main/othervm -Dsun.java2d.opengl=True DrawBitmaskImage + * @run main/othervm DrawBitmaskImage + */ + +import java.awt.AlphaComposite; +import java.awt.Canvas; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Transparency; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.io.File; +import javax.imageio.ImageIO; + +public class DrawBitmaskImage extends Panel { + + static final int TESTW = 200, TESTH = 200; + private static volatile DrawBitmaskImage test; + private static volatile Frame frame; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + g2d.setColor(Color.black); + g2d.fillRect(0, 0, getWidth(), getHeight()); + g2d.setComposite(AlphaComposite.SrcOver.derive(0.50f)); + + BufferedImage img = getGraphicsConfiguration().createCompatibleImage(50, 50, + Transparency.BITMASK); + Graphics2D gimg = img.createGraphics(); + gimg.setComposite(AlphaComposite.Src); + gimg.setColor(new Color(0, 0, 0, 0)); + gimg.fillRect(0, 0, 50, 50); + gimg.setColor(Color.red); + gimg.fillRect(10, 10, 30, 30); + gimg.dispose(); + + + g2d.drawImage(img, 10, 10, null); + + // draw a second time to ensure that the cached copy is used + g2d.drawImage(img, 80, 10, null); + } + + public Dimension getPreferredSize() { + return new Dimension(TESTW, TESTH); + } + + static void createUI() { + test = new DrawBitmaskImage(); + frame = new Frame("OpenGL DrawBitmaskImage Test"); + Panel p = new Panel(); + p.add(test); + frame.add(p); + frame.setSize(TESTW+100, TESTH+100); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + Robot robot = new Robot(); + + EventQueue.invokeAndWait(DrawBitmaskImage::createUI); + + robot.waitForIdle(); + robot.delay(2000); + + BufferedImage capture = null; + try { + GraphicsConfiguration gc = frame.getGraphicsConfiguration(); + if (gc.getColorModel() instanceof IndexColorModel) { + System.out.println("IndexColorModel detected: " + + "test considered PASSED"); + return; + } + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, TESTW, TESTH); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Test background color + int pixel = capture.getRGB(5, 10); + if (pixel != 0xff000000) { + saveImage(capture); + throw new RuntimeException("Failed: Incorrect color for " + + "background (actual=" + + Integer.toHexString(pixel) + ")"); + } + + // Test pixels (allow for small error in the actual red value) + pixel = capture.getRGB(25, 25); + System.out.println("pixel1 is " + Integer.toHexString(pixel)); + + if ((pixel < 0xff7e0000) || (pixel > 0xff900000)) { + saveImage(capture); + throw new RuntimeException("Failed: Incorrect color for " + + "first pixel (actual=" + + Integer.toHexString(pixel) + ")"); + } + + pixel = capture.getRGB(95, 25); + System.out.println("pixel2 is " + Integer.toHexString(pixel)); + if ((pixel < 0xff7e0000) || (pixel > 0xff900000)) { + saveImage(capture); + throw new RuntimeException("Failed: Incorrect color for " + + "second pixel (actual=" + + Integer.toHexString(pixel) + ")"); + } + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/DrawBufImgOp.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/DrawBufImgOp.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/DrawBufImgOp.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/DrawBufImgOp.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,514 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 6514990 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that calling + * Graphics2D.drawImage(BufferedImage, BufferedImageOp, x, y) to an + * OpenGL-accelerated destination produces the same results when performed + * in software via BufferedImageOp.filter(). + * @run main/othervm -Dsun.java2d.opengl=True DrawBufImgOp -ignore + */ + +/* + * @test + * @bug 6514990 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that calling + * Graphics2D.drawImage(BufferedImage, BufferedImageOp, x, y) to an + * OpenGL-accelerated destination produces the same results when performed + * in software via BufferedImageOp.filter(). + * @run main/othervm -Dsun.java2d.opengl=True DrawBufImgOp -ignore + */ + +import java.awt.AlphaComposite; +import java.awt.Canvas; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.awt.image.ByteLookupTable; +import java.awt.image.ColorModel; +import java.awt.image.ConvolveOp; +import java.awt.image.IndexColorModel; +import java.awt.image.Kernel; +import java.awt.image.LookupOp; +import java.awt.image.RescaleOp; +import java.awt.image.ShortLookupTable; +import java.awt.image.VolatileImage; +import java.io.File; +import javax.imageio.ImageIO; + +/** + * REMIND: This testcase was originally intended to automatically compare + * the results of the software BufferedImageOp implementations against + * the OGL-accelerated codepaths. However, there are just too many open + * bugs in the mediaLib-based codepaths (see below), which means that + * creating the reference image may cause crashes or exceptions, + * and even if we work around those cases using the "-ignore" flag, + * the visual results of the reference image are often buggy as well + * (so the comparison will fail even though the OGL results are correct). + * Therefore, for now we will run the testcase with the "-ignore" flag + * but without the "-compare" flag, so at least it will be checking for + * any exceptions/crashes in the OGL code. When we fix all of the + * outstanding bugs with the software codepaths, we can remove the + * "-ignore" flag and maybe even restore the "-compare" flag. In the + * meantime, it also functions well as a manual testcase (with either + * the "-show" or "-dump" options). + */ +public class DrawBufImgOp extends Canvas { + + private static final int TESTW = 600; + private static final int TESTH = 500; + + private static volatile DrawBufImgOp test; + private static volatile Frame frame; + + /* + * If true, skips tests that are known to trigger bugs (which in + * turn may cause crashes, exceptions, or other artifacts). + */ + private static boolean ignore; + + // Test both pow2 and non-pow2 sized images + private static final int[] srcSizes = { 32, 17 }; + private static final int[] srcTypes = { + BufferedImage.TYPE_INT_RGB, + BufferedImage.TYPE_INT_ARGB, + BufferedImage.TYPE_INT_ARGB_PRE, + BufferedImage.TYPE_INT_BGR, + BufferedImage.TYPE_3BYTE_BGR, + BufferedImage.TYPE_4BYTE_ABGR, + BufferedImage.TYPE_USHORT_565_RGB, + BufferedImage.TYPE_BYTE_GRAY, + BufferedImage.TYPE_USHORT_GRAY, + }; + + private static final RescaleOp + rescale1band, rescale3band, rescale4band; + private static final LookupOp + lookup1bandbyte, lookup3bandbyte, lookup4bandbyte; + private static final LookupOp + lookup1bandshort, lookup3bandshort, lookup4bandshort; + private static final ConvolveOp + convolve3x3zero, convolve5x5zero, convolve7x7zero; + private static final ConvolveOp + convolve3x3noop, convolve5x5noop, convolve7x7noop; + + static { + rescale1band = new RescaleOp(0.5f, 10.0f, null); + rescale3band = new RescaleOp( + new float[] { 0.6f, 0.4f, 0.6f }, + new float[] { 10.0f, -3.0f, 5.0f }, + null); + rescale4band = new RescaleOp( + new float[] { 0.6f, 0.4f, 0.6f, 0.9f }, + new float[] { -1.0f, 5.0f, 3.0f, 1.0f }, + null); + + // REMIND: we should probably test non-zero offsets, but that + // would require massaging the source image data to avoid going + // outside the lookup table array bounds + int offset = 0; + { + byte invert[] = new byte[256]; + byte halved[] = new byte[256]; + for (int j = 0; j < 256 ; j++) { + invert[j] = (byte) (255-j); + halved[j] = (byte) (j / 2); + } + ByteLookupTable lut1 = new ByteLookupTable(offset, invert); + lookup1bandbyte = new LookupOp(lut1, null); + ByteLookupTable lut3 = + new ByteLookupTable(offset, + new byte[][] {invert, halved, invert}); + lookup3bandbyte = new LookupOp(lut3, null); + ByteLookupTable lut4 = + new ByteLookupTable(offset, + new byte[][] {invert, halved, invert, halved}); + lookup4bandbyte = new LookupOp(lut4, null); + } + + { + short invert[] = new short[256]; + short halved[] = new short[256]; + for (int j = 0; j < 256 ; j++) { + invert[j] = (short) ((255-j) * 255); + halved[j] = (short) ((j / 2) * 255); + } + ShortLookupTable lut1 = new ShortLookupTable(offset, invert); + lookup1bandshort = new LookupOp(lut1, null); + ShortLookupTable lut3 = + new ShortLookupTable(offset, + new short[][] {invert, halved, invert}); + lookup3bandshort = new LookupOp(lut3, null); + ShortLookupTable lut4 = + new ShortLookupTable(offset, + new short[][] {invert, halved, invert, halved}); + lookup4bandshort = new LookupOp(lut4, null); + } + + // 3x3 blur + float[] data3 = { + 0.1f, 0.1f, 0.1f, + 0.1f, 0.2f, 0.1f, + 0.1f, 0.1f, 0.1f, + }; + Kernel k3 = new Kernel(3, 3, data3); + + // 5x5 edge + float[] data5 = { + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, + -1.0f, -1.0f, 24.0f, -1.0f, -1.0f, + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, + }; + Kernel k5 = new Kernel(5, 5, data5); + + // 7x7 blur + float[] data7 = { + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, 0.02f, + }; + Kernel k7 = new Kernel(7, 7, data7); + + convolve3x3zero = new ConvolveOp(k3, ConvolveOp.EDGE_ZERO_FILL, null); + convolve5x5zero = new ConvolveOp(k5, ConvolveOp.EDGE_ZERO_FILL, null); + convolve7x7zero = new ConvolveOp(k7, ConvolveOp.EDGE_ZERO_FILL, null); + + convolve3x3noop = new ConvolveOp(k3, ConvolveOp.EDGE_NO_OP, null); + convolve5x5noop = new ConvolveOp(k5, ConvolveOp.EDGE_NO_OP, null); + convolve7x7noop = new ConvolveOp(k7, ConvolveOp.EDGE_NO_OP, null); + } + + public void paint(Graphics g) { + + VolatileImage vimg = createVolatileImage(TESTW, TESTH); + vimg.validate(getGraphicsConfiguration()); + + Graphics2D g2d = vimg.createGraphics(); + renderTest(g2d); + g2d.dispose(); + + g.drawImage(vimg, 0, 0, null); + } + + /* + * foreach source image size (once with pow2, once with non-pow2) + * + * foreach BufferedImage type + * + * RescaleOp (1 band) + * RescaleOp (3 bands, if src has 3 bands) + * RescaleOp (4 bands, if src has 4 bands) + * + * foreach LookupTable type (once with ByteLUT, once with ShortLUT) + * LookupOp (1 band) + * LookupOp (3 bands, if src has 3 bands) + * LookupOp (4 bands, if src has 4 bands) + * + * foreach edge condition (once with ZERO_FILL, once with EDGE_NO_OP) + * ConvolveOp (3x3) + * ConvolveOp (5x5) + * ConvolveOp (7x7) + */ + private void renderTest(Graphics2D g2d) { + g2d.setColor(Color.white); + g2d.fillRect(0, 0, TESTW, TESTH); + + int yorig = 2; + int xinc = 34; + int yinc = srcSizes[0] + srcSizes[1] + 2 + 2; + + for (int srcType : srcTypes) { + int y = yorig; + + for (int srcSize : srcSizes) { + int x = 2; + System.out.printf("type=%d size=%d\n", srcType, srcSize); + + BufferedImage srcImg = makeSourceImage(srcSize, srcType); + ColorModel srcCM = srcImg.getColorModel(); + + // RescaleOp + g2d.drawImage(srcImg, rescale1band, x, y); + x += xinc; + // REMIND: 3-band RescaleOp.filter() throws IAE for images + // that contain an alpha channel (bug to be filed) + if (srcCM.getNumColorComponents() == 3 && + !(ignore && srcCM.hasAlpha())) + { + g2d.drawImage(srcImg, rescale3band, x, y); + } + x += xinc; + if (srcCM.getNumComponents() == 4) { + g2d.drawImage(srcImg, rescale4band, x, y); + } + x += xinc; + + // LookupOp + // REMIND: Our LUTs are only 256 elements long, so won't + // currently work with USHORT_GRAY data + if (srcType != BufferedImage.TYPE_USHORT_GRAY) { + g2d.drawImage(srcImg, lookup1bandbyte, x, y); + x += xinc; + if (srcCM.getNumColorComponents() == 3) { + g2d.drawImage(srcImg, lookup3bandbyte, x, y); + } + x += xinc; + if (srcCM.getNumComponents() == 4) { + g2d.drawImage(srcImg, lookup4bandbyte, x, y); + } + x += xinc; + + // REMIND: LookupOp.createCompatibleDestImage() throws + // IAE for 3BYTE_BGR/4BYTE_ABGR (bug to be filed) + if (!(ignore && + (srcType == BufferedImage.TYPE_3BYTE_BGR || + srcType == BufferedImage.TYPE_4BYTE_ABGR))) + { + g2d.drawImage(srcImg, lookup1bandshort, x, y); + x += xinc; + // REMIND: 3-band LookupOp.filter() throws IAE for + // images that contain an alpha channel + // (bug to be filed) + if (srcCM.getNumColorComponents() == 3 && + !(ignore && srcCM.hasAlpha())) + { + g2d.drawImage(srcImg, lookup3bandshort, x, y); + } + x += xinc; + if (srcCM.getNumComponents() == 4) { + g2d.drawImage(srcImg, lookup4bandshort, x, y); + } + x += xinc; + } else { + x += 3*xinc; + } + } else { + x += 6*xinc; + } + + // ConvolveOp + // REMIND: ConvolveOp.filter() throws ImagingOpException + // for 3BYTE_BGR (see 4957775) + if (srcType != BufferedImage.TYPE_3BYTE_BGR) { + g2d.drawImage(srcImg, convolve3x3zero, x, y); + x += xinc; + g2d.drawImage(srcImg, convolve5x5zero, x, y); + x += xinc; + g2d.drawImage(srcImg, convolve7x7zero, x, y); + x += xinc; + + g2d.drawImage(srcImg, convolve3x3noop, x, y); + x += xinc; + g2d.drawImage(srcImg, convolve5x5noop, x, y); + x += xinc; + g2d.drawImage(srcImg, convolve7x7noop, x, y); + x += xinc; + } else { + x += 6*xinc; + } + + y += srcSize + 2; + } + + yorig += yinc; + } + } + + private BufferedImage makeSourceImage(int size, int type) { + int s2 = size/2; + BufferedImage img = new BufferedImage(size, size, type); + Graphics2D g2d = img.createGraphics(); + g2d.setComposite(AlphaComposite.Src); + g2d.setColor(Color.orange); + g2d.fillRect(0, 0, size, size); + g2d.setColor(Color.red); + g2d.fillRect(0, 0, s2, s2); + g2d.setColor(Color.green); + g2d.fillRect(s2, 0, s2, s2); + g2d.setColor(Color.blue); + g2d.fillRect(0, s2, s2, s2); + g2d.setColor(new Color(255, 255, 0, 128)); + g2d.fillRect(s2, s2, s2, s2); + g2d.setColor(Color.pink); + g2d.fillOval(s2-3, s2-3, 6, 6); + g2d.dispose(); + return img; + } + + public BufferedImage makeReferenceImage() { + BufferedImage img = new BufferedImage(TESTW, TESTH, + BufferedImage.TYPE_INT_RGB); + Graphics2D g2d = img.createGraphics(); + renderTest(g2d); + g2d.dispose(); + return img; + } + + public Dimension getPreferredSize() { + return new Dimension(TESTW, TESTH); + } + + private static void compareImages(BufferedImage refImg, + BufferedImage testImg, + int tolerance) + { + int x1 = 0; + int y1 = 0; + int x2 = refImg.getWidth(); + int y2 = refImg.getHeight(); + + for (int y = y1; y < y2; y++) { + for (int x = x1; x < x2; x++) { + Color expected = new Color(refImg.getRGB(x, y)); + Color actual = new Color(testImg.getRGB(x, y)); + if (!isSameColor(expected, actual, tolerance)) { + saveImage("referenceimage", refImg); + saveImage("testimage", testImg); + throw new RuntimeException("Test failed at x="+x+" y="+y+ + " (expected="+expected+ + " actual="+actual+ + ")"); + } + } + } + } + + private static boolean isSameColor(Color c1, Color c2, int e) { + int r1 = c1.getRed(); + int g1 = c1.getGreen(); + int b1 = c1.getBlue(); + int r2 = c2.getRed(); + int g2 = c2.getGreen(); + int b2 = c2.getBlue(); + int rmin = Math.max(r2-e, 0); + int gmin = Math.max(g2-e, 0); + int bmin = Math.max(b2-e, 0); + int rmax = Math.min(r2+e, 255); + int gmax = Math.min(g2+e, 255); + int bmax = Math.min(b2+e, 255); + if (r1 >= rmin && r1 <= rmax && + g1 >= gmin && g1 <= gmax && + b1 >= bmin && b1 <= bmax) + { + return true; + } + return false; + } + + + static void createUI() { + test = new DrawBufImgOp(); + Panel panel = new Panel(); + panel.add(test); + frame = new Frame("OpenGL DrawBufImgOp Test"); + frame.add(panel); + frame.setSize(TESTW+100, TESTH+100); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + + boolean show = false; + boolean dump = false; + boolean compare = false; + + for (String arg : args) { + if (arg.equals("-show")) { + show = true; + } else if (arg.equals("-dump")) { + dump = true; + } else if (arg.equals("-compare")) { + compare = true; + } else if (arg.equals("-ignore")) { + ignore = true; + } + } + + Robot robot = new Robot(); + + EventQueue.invokeAndWait(DrawBufImgOp::createUI); + + robot.waitForIdle(); + robot.delay(2000); + + BufferedImage capture = null; + try { + GraphicsConfiguration gc = frame.getGraphicsConfiguration(); + if (gc.getColorModel() instanceof IndexColorModel) { + System.out.println("IndexColorModel detected: " + + "test considered PASSED"); + return; + } + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, TESTW, TESTH); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Compare the images (allow for +/- 1 bit differences in color comps) + if (dump || compare) { + BufferedImage ref = test.makeReferenceImage(); + if (dump) { + saveImage("DrawBufImgOp_ref", ref); + saveImage("DrawBufImgOp_cap", capture); + } + if (compare) { + test.compareImages(ref, capture, 1); + } + } + } + + static void saveImage(String name, BufferedImage img) { + try { + File file = new File(name + ".png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/DrawImageBg.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/DrawImageBg.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/DrawImageBg.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/DrawImageBg.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 4993274 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that managed image copies and transforms work properly + * with the OGL pipeline when a background color is specified. + * @run main/othervm -Dsun.java2d.opengl=True DrawImageBg + * @run main/othervm DrawImageBg + */ + +/* + * @test + * @bug 4993274 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that managed image copies and transforms work properly + * with the OGL pipeline when a background color is specified. + * @run main/othervm -Dsun.java2d.opengl=True DrawImageBg + * @run main/othervm DrawImageBg + */ + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.Transparency; +import java.awt.image.BufferedImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class DrawImageBg extends Panel { + + static volatile Frame frame; + static volatile DrawImageBg test; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + g2d.setColor(Color.black); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + BufferedImage img = getGraphicsConfiguration().createCompatibleImage(50, 50, + Transparency.BITMASK); + Graphics2D gimg = img.createGraphics(); + gimg.setComposite(AlphaComposite.Src); + gimg.setColor(new Color(0, 0, 0, 0)); + gimg.fillRect(0, 0, 50, 50); + gimg.setColor(Color.red); + gimg.fillRect(10, 10, 30, 30); + gimg.dispose(); + + g2d.drawImage(img, 10, 10, Color.blue, null); + + // draw a second time to ensure that the cached copy is used + g2d.drawImage(img, 80, 10, Color.blue, null); + } + + static void createUI() { + frame = new Frame("OpenGL DrawImageBg Test"); + test = new DrawImageBg(); + frame.add(test); + frame.setSize(300, 300); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + + BufferedImage capture = null; + Robot robot = new Robot(); + try { + EventQueue.invokeAndWait(DrawImageBg::createUI); + robot.waitForIdle(); + robot.delay(3000); + + // Grab the screen region + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x+80, pt1.y, 80, 80); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + if (capture == null) { + throw new RuntimeException("Screen capture is null"); + } + + // Test inner and outer pixels + int pixel1 = capture.getRGB(5, 10); + if (pixel1 != 0xff0000ff) { + saveImage(capture); + throw new RuntimeException(getMsg("outer", pixel1)); + } + int pixel2 = capture.getRGB(25, 25); + if (pixel2 != 0xffff0000) { + saveImage(capture); + throw new RuntimeException(getMsg("inner", pixel2)); + } + } + + static String getMsg(String r, int p1) { + return "Failed: Incorrect color for " + r + " pixel: got " + Integer.toHexString(p1); + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/LargeOps.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/LargeOps.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/LargeOps.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/LargeOps.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 6219284 6358147 6274813 6578452 + * @key headful + * @summary Verifies that OGLRenderer.drawPoly(), + * OGLTextRenderer.drawGlyphList(), and OGLMaskFill work properly when the + * operation parameters exceed the capacity of the render queue. With the + * single-threaded OpenGL pipeline, there are some operations that require + * a separate buffer to be spawned if the parameters cannot fit entirely on + * the standard buffer. This test exercises this special case. + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.lcdshader=true LargeOps + */ + +import java.awt.Canvas; +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.RenderingHints; +import java.awt.Robot; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.image.BufferedImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class LargeOps extends Canvas { + + private static final int NUM_POINTS = 8000; + private int[] xPoints, yPoints; + private String str; + + public LargeOps() { + xPoints = new int[NUM_POINTS]; + yPoints = new int[NUM_POINTS]; + for (int i = 0; i < NUM_POINTS; i++) { + xPoints[i] = (i % 2 == 0) ? 10 : 400; + yPoints[i] = (i % 2 == 1) ? i+3 : i; + } + + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < NUM_POINTS; i+=11) { + sb.append("ThisIsATest"); + } + str = sb.toString(); + } + + public void paint(Graphics g) { + Graphics2D g2d = (Graphics2D)g; + g2d.setColor(Color.white); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + // draw large polyline + g2d.setColor(Color.green); + g2d.drawPolyline(xPoints, yPoints, NUM_POINTS); + + // draw long string + g2d.setColor(Color.blue); + g2d.drawString(str, 10, 100); + + // draw long string with larger pt size + Font font = g2d.getFont(); + g2d.setFont(font.deriveFont(40.0f)); + g2d.drawString(str, 10, 150); + + // do the same with LCD hints enabled + g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); + g2d.setFont(font); + g2d.drawString(str, 10, 200); + g2d.setFont(font.deriveFont(43.0f)); + g2d.drawString(str, 10, 250); + + g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR); + g2d.setFont(font); + g2d.drawString(str, 10, 300); + g2d.setFont(font.deriveFont(37.0f)); + g2d.drawString(str, 10, 350); + } + + static volatile Frame frame; + static volatile LargeOps test; + + static void createUI() { + frame = new Frame("OpenGL LargeOps Test"); + frame.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + frame.dispose(); + } + }); + test = new LargeOps(); + frame.add(test); + frame.setSize(600, 600); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + try { + Robot robot = new Robot(); + EventQueue.invokeAndWait(LargeOps::createUI); + robot.waitForIdle(); + robot.delay(6000); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/OpaqueDest.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/OpaqueDest.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/OpaqueDest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/OpaqueDest.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 6277977 6319663 8369335 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that blending operations do not inadvertantly leave + * non-opaque alpha values in the framebuffer. Note that this test is + * intended to run on GraphicsConfigs that support a stored alpha channel + * (to verify the bug at hand), but it is also a useful for testing the + * compositing results on any configuration. + * @run main/othervm -Dsun.java2d.opengl=True OpaqueDest + * @run main/othervm OpaqueDest + */ + +/* + * @test + * @bug 6277977 6319663 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that blending operations do not inadvertantly leave + * non-opaque alpha values in the framebuffer. Note that this test is + * intended to run on GraphicsConfigs that support a stored alpha channel + * (to verify the bug at hand), but it is also a useful for testing the + * compositing results on any configuration. + * @run main/othervm -Dsun.java2d.opengl=True OpaqueDest + * @run main/othervm OpaqueDest + */ + +import java.awt.AlphaComposite; +import java.awt.Canvas; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.io.File; +import javax.imageio.ImageIO; + +public class OpaqueDest extends Canvas { + + private static volatile Frame frame; + private static volatile OpaqueDest test; + private static final int W = 100, H = 100; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + + g2d.setColor(Color.red); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + // This will clear the rectangle to black + g2d.setComposite(AlphaComposite.Clear); + g2d.fillRect(10, 10, 80, 80); + + // If everything is working properly, then this will fill the + // rectangle with red again. Before this bug was fixed, the previous + // Clear operation would leave zero values in the destination's + // alpha channel (if present), and therefore a SrcIn operation + // would result in all-black. + g2d.setComposite(AlphaComposite.SrcIn); + g2d.fillRect(10, 10, 80, 80); + } + + public Dimension getPreferredSize() { + return new Dimension(W, H); + } + + static void createUI() { + test = new OpaqueDest(); + frame = new Frame("OpenGL OpaqueDest Test"); + Panel p = new Panel(); + p.add(test); + frame.add(p); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + Robot robot = new Robot(); + + EventQueue.invokeAndWait(OpaqueDest::createUI); + + robot.waitForIdle(); + robot.delay(2000); + + BufferedImage capture = null; + try { + GraphicsConfiguration gc = frame.getGraphicsConfiguration(); + if (gc.getColorModel() instanceof IndexColorModel) { + System.out.println("IndexColorModel detected: " + + "test considered PASSED"); + return; + } + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, W, H); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + + // Test all pixels (every one should be red) + for (int y = 0; y < W; y++) { + for (int x = 0; x < H; x++) { + int actual = capture.getRGB(x, y); + int expected = 0xffff0000; + if (!similar(actual, expected)) { + String msg = "Test failed at x="+x+" y="+y+ + " (expected="+ + Integer.toHexString(expected) + + " actual="+ + Integer.toHexString(actual) + + ")"; + if ( ( x== 0) || ( x == W) || ( y == 0) || ( y == H)) { + System.err.println(msg); + } else { + saveImage(capture); + throw new RuntimeException(msg); + } + } + } + } + } + + static boolean similar(int p1, int p2) { + int a1 = (p1 >> 24) & 0xff; + int r1 = (p1 >> 16) & 0xff; + int g1 = (p1 >> 8) & 0xff; + int b1 = p1 & 0xff; + int a2 = (p2 >> 24) & 0xff; + int r2 = (p2 >> 16) & 0xff; + int g2 = (p2 >> 8) & 0xff; + int b2 = p2 & 0xff; + + int allowedDiff = 0x01; // tiny rounding error allowed. + return + (Math.abs(a1 - a2) <= allowedDiff) && + (Math.abs(r1 - r2) <= allowedDiff) && + (Math.abs(g1 - g2) <= allowedDiff) && + (Math.abs(b1 - b2) <= allowedDiff); + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,210 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 5104584 8237244 8369335 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that scaling an image works properly when the + * source parameters are outside the source bounds. + * @run main/othervm -Dsun.java2d.opengl=True ScaleParamsOOB + * @run main/othervm ScaleParamsOOB + */ + +/* + * @test + * @bug 5104584 8237244 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that scaling an image works properly when the + * source parameters are outside the source bounds. + * @run main/othervm -Dsun.java2d.opengl=True ScaleParamsOOB + * @run main/othervm ScaleParamsOOB + */ + + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class ScaleParamsOOB extends Panel { + + private static final int TOLERANCE = 12; + + private static volatile ScaleParamsOOB test; + private static volatile Frame frame; + + private BufferedImage img; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + g2d.setColor(Color.black); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + BufferedImage img = getGraphicsConfiguration().createCompatibleImage(40, 40); + Graphics2D gimg = img.createGraphics(); + gimg.setColor(Color.red); + gimg.fillRect(0, 0, 40, 40); + gimg.dispose(); + + // first time will be a sw->surface blit + g2d.drawImage(img, + 10, 10, 90, 90, + -60, -60, 100, 100, + null); + + // second time will be a texture->surface blit + g2d.drawImage(img, + 110, 10, 190, 90, + -60, -60, 100, 100, + null); + } + + public Dimension getPreferredSize() { + return new Dimension(300, 200); + } + + private static void testRegion(BufferedImage bi, + Rectangle wholeRegion, + Rectangle affectedRegion) + { + int x1 = wholeRegion.x; + int y1 = wholeRegion.y; + int x2 = x1 + wholeRegion.width; + int y2 = y1 + wholeRegion.height; + + int ax1 = affectedRegion.x; + int ay1 = affectedRegion.y; + int ax2 = ax1 + affectedRegion.width; + int ay2 = ay1 + affectedRegion.height; + + for (int y = y1; y < y2; y++) { + for (int x = x1; x < x2; x++) { + int actual = bi.getRGB(x, y); + int expected = 0; + if (affectedRegion.contains(x, y)) { + expected = Color.red.getRGB(); + } else { + expected = Color.black.getRGB(); + } + int alpha = (actual >> 24) & 0xFF; + int red = (actual >> 16) & 0xFF; + int green = (actual >> 8) & 0xFF; + int blue = (actual) & 0xFF; + + int standardAlpha = (expected >> 24) & 0xFF; + int standardRed = (expected >> 16) & 0xFF; + int standardGreen = (expected >> 8) & 0xFF; + int standardBlue = (expected) & 0xFF; + + if ((Math.abs(alpha - standardAlpha) > TOLERANCE) || + (Math.abs(red - standardRed) > TOLERANCE) || + (Math.abs(green - standardGreen) > TOLERANCE) || + (Math.abs(blue - standardBlue) > TOLERANCE)) { + + String msg = ("Test failed at x="+x+" y="+y+ + " (expected="+ + Integer.toHexString(expected) + + " actual="+ + Integer.toHexString(actual) + + ")"); + // log edge pixel differences, but don't fail the test. + if ((x == ax1) || (x == ax2) || (y == ay1) || (y == ay2)) { + System.err.println(msg); + } else { + saveImage(bi); + throw new RuntimeException(msg); + } + } + } + } + } + + private static void createAndShowGUI() { + test = new ScaleParamsOOB(); + frame = new Frame("OpenGL ScaleParamsOOB Test"); + frame.setAlwaysOnTop(true); + frame.add(test); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + Robot robot = new Robot(); + + EventQueue.invokeAndWait(() -> createAndShowGUI()); + + robot.waitForIdle(); + robot.delay(2000); + + // Grab the screen region + BufferedImage capture = null; + try { + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, 200, 200); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Test background color + int pixel = capture.getRGB(5, 5); + if (pixel != 0xff000000) { + saveImage(capture); + throw new RuntimeException("Failed: Incorrect color for " + + "background: " + Integer.toHexString(pixel)); + } + + // Test pixels + testRegion(capture, + new Rectangle(5, 5, 90, 90), + new Rectangle(40, 40, 20, 20)); + testRegion(capture, + new Rectangle(105, 5, 90, 90), + new Rectangle(140, 40, 20, 20)); + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/ShapeClip.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/ShapeClip.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/ShapeClip.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/ShapeClip.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 5002133 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that the OpenGL pipeline does not affect the color + * buffer when setting up a complex (shape) clip region. The test fails if + * the circular clip region is filled with a green color (the green region + * should not be visible at all). + * @run main/othervm -Dsun.java2d.opengl=True ShapeClip + * @run main/othervm ShapeClip + */ + +/* + * @test + * @bug 5002133 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that the OpenGL pipeline does not affect the color + * buffer when setting up a complex (shape) clip region. The test fails if + * the circular clip region is filled with a green color (the green region + * should not be visible at all). + * @run main/othervm -Dsun.java2d.opengl=True ShapeClip + * @run main/othervm ShapeClip + */ + +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.geom.Ellipse2D; +import java.awt.image.BufferedImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class ShapeClip extends Panel { + + private static volatile Frame frame; + private static volatile ShapeClip test; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + + int width = getWidth(); + int height = getHeight(); + + g2d.setColor(Color.black); + g2d.fillRect(0, 0, width, height); + + g2d.setColor(Color.green); + g2d.fillRect(0, 0, 1, 1); + g2d.setClip(new Ellipse2D.Double(10, 10, 100, 100)); + g2d.setColor(Color.blue); + g2d.fillRect(30, 30, 20, 20); + } + + static void createUI() { + test = new ShapeClip(); + frame = new Frame("OpenGL ShapeClip Test"); + frame.add(test); + frame.setSize(200, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + Robot robot = new Robot(); + + EventQueue.invokeAndWait(ShapeClip::createUI); + + robot.waitForIdle(); + robot.delay(2000); + + // Grab the screen region + BufferedImage capture = null; + try { + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, 80, 80); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Test blue rectangle + int pixel1 = capture.getRGB(40, 40); + if (pixel1 != 0xff0000ff) { + saveImage(capture); + throw new RuntimeException("Failed: Incorrect color for " + + "rectangle " + Integer.toHexString(pixel1)); + } + + // Test clip region (should be same color as background) + int pixel2 = capture.getRGB(60, 40); + if (pixel2 != 0xff000000) { + saveImage(capture); + throw new RuntimeException("Failed: Incorrect color for " + + "clip region " + Integer.toHexString(pixel2)); + } + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/SrcMaskOps.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/SrcMaskOps.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/SrcMaskOps.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/SrcMaskOps.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 4942939 4970674 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that OGLMaskFill, OGLMaskBlit, and OGLTextRenderer + * operations work properly for non-SrcOver composites. + * @run main/othervm -Dsun.java2d.opengl=True SrcMaskOps + * @run main/othervm SrcMaskOps + */ + +/* + * @test + * @bug 4942939 4970674 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that OGLMaskFill, OGLMaskBlit, and OGLTextRenderer + * operations work properly for non-SrcOver composites. + * @run main/othervm -Dsun.java2d.opengl=True SrcMaskOps + * @run main/othervm SrcMaskOps + */ + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Frame; +import java.awt.GradientPaint; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.RenderingHints; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class SrcMaskOps extends Panel { + + static volatile Frame frame; + static volatile SrcMaskOps test; + + static final int SRX = 50; + static final int SRY = 50; + static final int GPX = 90; + static final int GPY = 50; + static final int DTX = 120; + static final int DTY = 70; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + + g2d.setColor(Color.white); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g2d.setComposite(AlphaComposite.Src); + + g2d.setColor(Color.blue); + g2d.drawRect(SRX, SRY, 20, 20); + + g2d.setPaint(new GradientPaint(0.0f, 0.0f, Color.red, + 100.0f, 100.f, Color.red, true)); + g2d.drawRect(GPX, GPY, 20, 20); + + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_OFF); + + g2d.setColor(Color.red); + Font font = new Font(Font.DIALOG, Font.PLAIN, 20); + g2d.setFont(font); + g2d.drawString("HELLO", DTX, DTY); + } + + static void createUI() { + frame = new Frame("OpenGL SrcMaskOps Test"); + test = new SrcMaskOps(); + frame.add(test); + frame.setSize(300, 300); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + + Robot robot = new Robot(); + BufferedImage capture = null; + try { + EventQueue.invokeAndWait(SrcMaskOps::createUI); + robot.waitForIdle(); + robot.delay(3000); + + // Grab the screen region + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, 300, 300); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Test solid rectangle + int pixel1, pixel2; + pixel1 = capture.getRGB(SRX, SRY); + pixel2 = capture.getRGB(SRX+2, SRY+2); + if (!similar(pixel1, 0xff0000ff) || !similar(pixel2, 0xffffffff)) { + saveImage(capture); + throw new RuntimeException(getMsg("solid rectangle", pixel1, pixel2)); + } + + // Test GradientPaint rectangle + pixel1 = capture.getRGB(GPX, GPY); + pixel2 = capture.getRGB(GPX+2, GPY+2); + if (!similar(pixel1, 0xffff0000) || !similar(pixel2, 0xffffffff)) { + saveImage(capture); + throw new RuntimeException(getMsg("GradientPaint rectangle", pixel1, pixel2)); + } + + // Test solid text + pixel1 = capture.getRGB(DTX+2, DTY-5); + pixel2 = capture.getRGB(DTX+5, DTY-5); + if (!similar(pixel1, 0xffff0000) || !similar(pixel2, 0xffffffff)) { + saveImage(capture); + throw new RuntimeException(getMsg("solid text", pixel1, pixel2)); + } + + } + + static boolean similar(int p1, int p2) { + int a1 = (p1 >> 24) & 0xff; + int r1 = (p1 >> 16) & 0xff; + int g1 = (p1 >> 8) & 0xff; + int b1 = p1 & 0xff; + int a2 = (p2 >> 24) & 0xff; + int r2 = (p2 >> 16) & 0xff; + int g2 = (p2 >> 8) & 0xff; + int b2 = p2 & 0xff; + + int allowedDiff = 0x10; + return + (Math.abs(a1 - a2) <= allowedDiff) && + (Math.abs(r1 - r2) <= allowedDiff) && + (Math.abs(g1 - g2) <= allowedDiff) && + (Math.abs(b1 - b2) <= allowedDiff); + } + + static String getMsg(String r, int p1, int p2) { + return "Failed: Incorrect color[s] for " + r + " got " + + Integer.toHexString(p1) + " and " + Integer.toHexString(p2); + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/VolatileSubRegion.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/VolatileSubRegion.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/VolatileSubRegion.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/VolatileSubRegion.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 6244071 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that copying a subregion from a VolatileImage works + * properly with the OGL pipeline. + * @run main/othervm VolatileSubRegion + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=true VolatileSubRegion + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=false VolatileSubRegion + */ + +/* + * @test + * @bug 6244071 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that copying a subregion from a VolatileImage works + * properly with the OGL pipeline. + * @run main/othervm VolatileSubRegion + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=true VolatileSubRegion + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=false VolatileSubRegion + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.awt.image.IndexColorModel; +import java.awt.image.VolatileImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class VolatileSubRegion extends Panel { + + private VolatileImage img; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + + if (img == null) { + img = createVolatileImage(200, 200); + Graphics2D goff = img.createGraphics(); + goff.setColor(Color.green); + goff.fillRect(50, 0, 100, 50); + goff.setColor(Color.blue); + goff.fillRect(0, 0, 200, 200); + goff.setColor(Color.red); + goff.fillRect(50, 50, 100, 100); + goff.setColor(Color.yellow); + goff.fillRect(50, 150, 100, 50); + goff.dispose(); + } + + g2d.setColor(Color.white); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + g2d.drawImage(img, + 50, 50, 200, 200, + 50, 50, 200, 200, + null); + + } + + + private static volatile VolatileSubRegion test; + private static volatile Frame frame; + + static void createUI() { + test = new VolatileSubRegion(); + frame = new Frame("OpenGL VolatileSubRegion Test"); + frame.add(test); + frame.setSize(300, 300); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + Robot robot = new Robot(); + + EventQueue.invokeAndWait(VolatileSubRegion::createUI); + + robot.waitForIdle(); + robot.delay(2000); + + BufferedImage capture = null; + try { + GraphicsConfiguration gc = frame.getGraphicsConfiguration(); + if (gc.getColorModel() instanceof IndexColorModel) { + System.out.println("IndexColorModel detected: " + + "test considered PASSED"); + return; + } + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, 200, 200); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Test pixels + int pixel1 = capture.getRGB(49, 50); + if (pixel1 != 0xffffffff) { + saveImage(capture); + throw new RuntimeException(getMsg("background pixel", pixel1)); + } + int pixel2 = capture.getRGB(50, 50); + if (pixel2 != 0xffff0000) { + saveImage(capture); + throw new RuntimeException(getMsg("red region", pixel2)); + } + int pixel3 = capture.getRGB(50, 150); + if (pixel3 != 0xffffff00) { + saveImage(capture); + throw new RuntimeException(getMsg("yellow region", pixel3)); + } + } + + static String getMsg(String r, int p1) { + return "Failed: Incorrect color for " + r + " : got " + Integer.toHexString(p1); + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } + +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/XformVolatile.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/XformVolatile.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/OpenGL/XformVolatile.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/OpenGL/XformVolatile.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 4970836 + * @key headful + * @requires (os.family != "mac") + * @summary Verifies that transformed VolatileImage copies work properly with + * the OGL pipeline. + * @run main/othervm XformVolatile + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=true XformVolatile + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=false XformVolatile + */ + +/* + * @test + * @bug 4970836 + * @key headful + * @requires (os.family == "mac") + * @summary Verifies that transformed VolatileImage copies work properly with + * the OGL pipeline. + * @run main/othervm XformVolatile + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=true XformVolatile + * @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=false XformVolatile + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Panel; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.awt.image.VolatileImage; +import java.io.File; +import javax.imageio.ImageIO; + +public class XformVolatile extends Panel { + + private static volatile Frame frame; + private static volatile XformVolatile test; + private volatile VolatileImage img; + + public void paint(Graphics g) { + + Graphics2D g2d = (Graphics2D)g; + + if (img == null) { + img = createVolatileImage(200, 200); + Graphics2D goff = img.createGraphics(); + goff.setColor(Color.blue); + goff.fillRect(0, 0, 200, 200); + goff.setColor(Color.red); + goff.fillPolygon(new int[] {10, 100, 190}, + new int[] {190, 10, 190}, 3); + goff.dispose(); + } + + g2d.setColor(Color.black); + g2d.fillRect(0, 0, getWidth(), getHeight()); + + g2d.rotate(Math.toRadians(3.0)); + g2d.drawImage(img, 0, 0, null); + } + + static void createUI() { + test = new XformVolatile(); + frame = new Frame("OpenGL XformVolatile Test"); + frame.add(test); + frame.setSize(300, 300); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static void main(String[] args) throws Exception { + + Robot robot = new Robot(); + + EventQueue.invokeAndWait(XformVolatile::createUI); + + robot.waitForIdle(); + robot.delay(2000); + + // Grab the screen region + BufferedImage capture = null; + try { + Point pt1 = test.getLocationOnScreen(); + Rectangle rect = new Rectangle(pt1.x, pt1.y, 200, 200); + capture = robot.createScreenCapture(rect); + } finally { + if (frame != null) { + EventQueue.invokeAndWait(frame::dispose); + } + } + + // Test inner and outer pixels + int pixel1 = capture.getRGB(5, 175); + if (pixel1 != 0xff0000ff) { + saveImage(capture); + throw new RuntimeException(getMsg("inner", pixel1)); + } + int pixel2 = capture.getRGB(5, 188); + if (pixel2 != 0xffff0000) { + saveImage(capture); + throw new RuntimeException(getMsg("inner", pixel2)); + } + } + + static String getMsg(String r, int p1) { + return "Failed: Incorrect color for " + r + " pixel: got " + Integer.toHexString(p1); + } + + static void saveImage(BufferedImage img) { + try { + File file = new File("capture.png"); + ImageIO.write(img, "png", file); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/java2d/marlin/ClipShapeTest.java openjdk-25-25.0.3+9/test/jdk/sun/java2d/marlin/ClipShapeTest.java --- openjdk-25-25.0.2+10/test/jdk/sun/java2d/marlin/ClipShapeTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/java2d/marlin/ClipShapeTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -154,13 +154,12 @@ static final AtomicBoolean isMarlin = new AtomicBoolean(); static final AtomicBoolean isClipRuntime = new AtomicBoolean(); + static final Logger log = Logger.getLogger("sun.java2d.marlin"); + static { Locale.setDefault(Locale.US); // FIRST: Get Marlin runtime state from its log: - - // initialize j.u.l Looger: - final Logger log = Logger.getLogger("sun.java2d.marlin"); log.addHandler(new Handler() { @Override public void publish(LogRecord record) { diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/RFC396xTest.java openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/RFC396xTest.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/RFC396xTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/RFC396xTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 +52,7 @@ public static void main(String[] args) throws Exception { System.setProperty("sun.security.krb5.msinterop.des.s2kcharset", "utf-8"); + DkCrypto.ALLOW_WEAK_PBKDF2_ITERATION_COUNT = true; test(); } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/auto/DiffSaltParams.java openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/auto/DiffSaltParams.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/auto/DiffSaltParams.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/auto/DiffSaltParams.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * 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,11 +38,11 @@ OneKDC kdc = new OneKDC(null).writeJAASConf(); kdc.addPrincipal("user1", "user1pass".toCharArray(), - "hello", new byte[]{0, 0, 1, 0}); + "hello", new byte[]{0, 1, 0, 0}); kdc.addPrincipal("user2", "user2pass".toCharArray(), "hello", null); kdc.addPrincipal("user3", "user3pass".toCharArray(), - null, new byte[]{0, 0, 1, 0}); + null, new byte[]{0, 1, 0, 0}); kdc.addPrincipal("user4", "user4pass".toCharArray()); Context.fromUserPass("user1", "user1pass".toCharArray(), true); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/auto/KDC.java openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/auto/KDC.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/auto/KDC.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/auto/KDC.java 2026-04-17 19:08:13.000000000 +0000 @@ -366,11 +366,12 @@ name.indexOf('/') < 0 ? PrincipalName.KRB_NT_UNKNOWN : PrincipalName.KRB_NT_SRV_HST); - ktab.addEntry(pn, - getSalt(pn), - pass, - kvno, - true); + int[] etypes = EType.getDefaults("default_tkt_enctypes"); + EncryptionKey[] keys = new EncryptionKey[etypes.length]; + for (int i = 0; i < etypes.length; i++) { + keys[i] = keyForUser(pn, etypes[i], false); + } + ktab.addEntry(pn, keys, kvno, true); } else { nativeKdc.ktadd(name, tab); } @@ -671,10 +672,7 @@ */ private char[] getPassword(PrincipalName p, boolean server) throws KrbException { - String pn = p.toString(); - if (p.getRealmString() == null) { - pn = pn + "@" + getRealm(); - } + String pn = nameOf(p); char[] pass = passwords.get(pn); if (pass == null) { throw new KrbException(server? @@ -690,10 +688,7 @@ * @return the salt */ protected String getSalt(PrincipalName p) { - String pn = p.toString(); - if (p.getRealmString() == null) { - pn = pn + "@" + getRealm(); - } + String pn = nameOf(p); if (salts.containsKey(pn)) { return salts.get(pn); } @@ -725,10 +720,7 @@ case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96: case EncryptedData.ETYPE_AES128_CTS_HMAC_SHA256_128: case EncryptedData.ETYPE_AES256_CTS_HMAC_SHA384_192: - String pn = p.toString(); - if (p.getRealmString() == null) { - pn = pn + "@" + getRealm(); - } + String pn = nameOf(p); if (s2kparamses.containsKey(pn)) { return s2kparamses.get(pn); } @@ -743,6 +735,23 @@ } /** + * Returns the name of a PrincipalName inside KDC dbs. + * @param p the principal name + * @return the name + */ + private String nameOf(PrincipalName p) { + String pn = p.toString(); + if (p.getRealmString() == null) { + pn = pn + "@" + getRealm(); + } + if (pn.startsWith("krbtgt/")) { + // We always register krbtgt using REALM + pn = "krbtgt/" + pn.substring(7).toUpperCase(Locale.ROOT); + } + return pn; + } + + /** * Returns the key for a given principal of the given encryption type * @param p the principal * @param etype the encryption type diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/auto/UserIterCount.java openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/auto/UserIterCount.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/auto/UserIterCount.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/auto/UserIterCount.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8370615 + * @summary Improve Kerberos credentialing + * @library /test/lib + * @compile -XDignore.symbol.file UserIterCount.java + * @run main jdk.test.lib.FileInstaller TestHosts TestHosts + * @run main/othervm -Djdk.net.hosts.file=TestHosts UserIterCount + */ +import sun.security.krb5.PrincipalName; + +public class UserIterCount { + + static class MyKDC extends OneKDC { + public MyKDC() throws Exception { + super(null); + } + + @Override + protected byte[] getParams(PrincipalName p, int etype) { + if (etype == 18) { + if (p.toString().startsWith(OneKDC.USER)) { + return new byte[]{0, 0, 16, 01}; + } else { + return new byte[]{0, 79, (byte)255, (byte)255}; + } + } else { + return super.getParams(p, etype); + } + } + } + + public static void main(String[] args) throws Exception { + new MyKDC().writeJAASConf(); + Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); + Context.fromUserPass(OneKDC.USER2, OneKDC.PASS2, false); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/config/native/TestDynamicStore.java openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/config/native/TestDynamicStore.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/krb5/config/native/TestDynamicStore.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/krb5/config/native/TestDynamicStore.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 @@ import jdk.test.lib.Asserts; import sun.security.krb5.Config; +import javax.swing.JOptionPane; + // =================== Attention =================== // This test calls a native method implemented in libTestDynamicStore.m // to modify system-level Kerberos 5 settings stored in the dynamic store. @@ -56,6 +58,17 @@ public static void main(String[] args) throws Exception { + // Show a popup to remind to run this test as sudo user + // this will only trigger if sudo (root) user is not detected + if (!"root".equals(System.getProperty("user.name"))) { + + JOptionPane.showMessageDialog(null, """ + This test MUST be run as ROOT.\s + Please close and RESTART the test."""); + + Asserts.assertFalse(true, "This test must be run as ROOT"); + } + System.loadLibrary("TestDynamicStore"); Config cfg = Config.getInstance(); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/NISTWrapKAT.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/NISTWrapKAT.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/NISTWrapKAT.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/NISTWrapKAT.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,13 +29,19 @@ * @summary Verify that the AES-Key-Wrap and AES-Key-Wrap-Pad ciphers * work as expected using NIST test vectors. */ +import jtreg.SkippedException; + import java.security.Key; import java.security.AlgorithmParameters; import java.security.Provider; -import javax.crypto.*; -import javax.crypto.spec.*; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.util.ArrayList; import java.util.Arrays; import java.math.BigInteger; +import java.util.List; // adapted from com/sun/crypto/provider/Cipher/KeyWrap/NISTWrapKAT.java public class NISTWrapKAT extends PKCS11Test { @@ -73,8 +79,11 @@ "308D49692B5F8CF638D54BB4B985633504237329964C76EBB3F669870A708DBC"; private static String KWP_AES256_224 = "0942747DB07032A3F04CDB2E7DE1CBA038F92BC355393AE9A0E4AE8C901912AC3D3AF0F16D240607"; - // from RFC 5649 sec6 - private static String KEK2 = "5840DF6E29B02AF1AB493B705BF16EA1AE8338F4DCC176A8"; + // from RFC 5649 sec6 + private static String KEK2 = + "5840DF6E29B02AF1AB493B705BF16EA1AE8338F4DCC176A8"; + + private static final List skippedList = new ArrayList <>(); private static byte[] toBytes(String hex, int hexLen) { if (hexLen < hex.length()) { @@ -91,10 +100,18 @@ byte[] out = new byte[outLen]; if (val.length < outLen) { // enlarge - System.arraycopy(val, 0, out, outLen - val.length, val.length); + System.arraycopy(val, + 0, + out, + outLen - val.length, + val.length); } else { // truncate - System.arraycopy(val, val.length - outLen, out, 0, outLen); + System.arraycopy(val, + val.length - outLen, + out, + 0, + outLen); } return out; } @@ -143,7 +160,8 @@ "AFBEB0F07DFBF5419200F2CCB50BB24F" }, { "AES/KWP/NoPadding", KEK2, 24, "C37B7E6492584340BED12207808941155068F738", 20, - "138BDEAA9B8FA7FC61F97742E72248EE5AE6AE5360D1AE6A5F54F373FA543B6A" }, + "138BDEAA9B8FA7FC61F97742E72248EE5AE6AE5360D1AE6A5F54F373FA543B6A" + }, // some more test vectors for KW and KWP // from csrc.nist.gov/groups/STM/cavp/documents/mac/kwtestvectors.zip { "AES/KW/NoPadding", "7575da3a93607cc2bfd8cec7aadfd9a6", 16, @@ -257,6 +275,9 @@ int allowed = Cipher.getMaxAllowedKeyLength("AES"); if (keyLen > allowed) { System.out.println("=> skip, exceeds max allowed size " + allowed); + skippedList.add(algo + " Cipher with wrapping " + + dataLen + "-byte key with " + 8 * keyLen + + "-bit KEK exceeds max allowed size " + allowed); return; } Cipher c1 = Cipher.getInstance(algo, @@ -275,7 +296,8 @@ c1.init(Cipher.WRAP_MODE, cipherKey); IvParameterSpec ivSpec = new IvParameterSpec(c1.getIV()); c2.init(Cipher.WRAP_MODE, cipherKey, ivSpec); - AlgorithmParameters params = AlgorithmParameters.getInstance("AES"); + AlgorithmParameters params = + AlgorithmParameters.getInstance("AES"); params.init(ivSpec); c3.init(Cipher.WRAP_MODE, cipherKey, params); @@ -300,9 +322,12 @@ params.init(ivSpec); c3.init(Cipher.UNWRAP_MODE, cipherKey, params); - Key unwrapped = c1.unwrap(wrapped, "AES", Cipher.SECRET_KEY); - Key unwrapped2 = c2.unwrap(wrapped, "AES", Cipher.SECRET_KEY); - Key unwrapped3 = c3.unwrap(wrapped, "AES", Cipher.SECRET_KEY); + Key unwrapped = + c1.unwrap(wrapped, "AES", Cipher.SECRET_KEY); + Key unwrapped2 = + c2.unwrap(wrapped, "AES", Cipher.SECRET_KEY); + Key unwrapped3 = + c3.unwrap(wrapped, "AES", Cipher.SECRET_KEY); if (!Arrays.equals(unwrapped.getEncoded(), dataVal) || !Arrays.equals(unwrapped2.getEncoded(), dataVal) || @@ -320,6 +345,9 @@ int allowed = Cipher.getMaxAllowedKeyLength("AES"); if (keyLen > allowed) { System.out.println("=> skip, exceeds max allowed size " + allowed); + skippedList.add(algo + " Cipher with enc " + + dataLen + "-byte data with " + 8 * keyLen + + "-bit KEK exceeds max allowed size " + allowed); return; } Cipher c1 = Cipher.getInstance(algo, @@ -336,7 +364,8 @@ c1.init(Cipher.ENCRYPT_MODE, cipherKey); IvParameterSpec ivSpec = new IvParameterSpec(c1.getIV()); c2.init(Cipher.ENCRYPT_MODE, cipherKey, ivSpec); - AlgorithmParameters params = AlgorithmParameters.getInstance("AES"); + AlgorithmParameters params = + AlgorithmParameters.getInstance("AES"); params.init(ivSpec); c3.init(Cipher.ENCRYPT_MODE, cipherKey, params); @@ -384,18 +413,22 @@ @Override public void main(Provider p) throws Exception { Object[][] testDatum = testData(); - for (int i = 0; i < testDatum.length; i++) { - Object[] td = testDatum[i]; + for (Object[] td : testDatum) { String algo = (String) td[0]; if (p.getService("Cipher", algo) == null) { - System.out.println("Skip, due to no support: " + algo); - continue; + skippedList.add("No support for " + algo); } - testKeyWrap(algo, (String)td[1], (int)td[2], (String)td[3], - (int)td[4], (String)td[5], p); - testEnc(algo, (String)td[1], (int)td[2], (String)td[3], - (int)td[4], (String)td[5], p); + testKeyWrap(algo, (String) td[1], (int) td[2], (String) td[3], + (int) td[4], (String) td[5], p); + testEnc(algo, (String) td[1], (int) td[2], (String) td[3], + (int) td[4], (String) td[5], p); + } + + if (!skippedList.isEmpty()) { + throw new SkippedException("One or more tests skipped " + + skippedList); + } else { + System.out.println("All Tests Passed"); } - System.out.println("Test Passed"); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/TestGeneral.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/TestGeneral.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/TestGeneral.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/TestGeneral.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,18 +29,30 @@ * @library /test/lib ../.. * @run main/othervm TestGeneral */ +import jtreg.SkippedException; + import java.nio.ByteBuffer; +import java.security.AlgorithmParameters; +import java.security.InvalidAlgorithmParameterException; +import java.security.Key; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.util.ArrayList; import java.util.Arrays; import java.util.HexFormat; -import java.security.*; -import javax.crypto.*; -import javax.crypto.spec.*; +import java.util.List; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; // adapted from com/sun/crypto/provider/Cipher/KeyWrap/TestGeneral.java public class TestGeneral extends PKCS11Test { private static final byte[] DATA_32 = - Arrays.copyOf("1234567890123456789012345678901234".getBytes(), 32); + Arrays.copyOf("1234567890123456789012345678901234".getBytes(), + 32); private static final SecretKey KEY = new SecretKeySpec(DATA_32, 0, 16, "AES"); private static final int KW_IV_LEN = 8; @@ -49,7 +61,8 @@ private static final int MAX_KWP_PAD_LEN = 7; // 0-7 public static void testEnc(Cipher c, byte[] in, int startLen, int inc, - IvParameterSpec[] ivs, int maxPadLen) throws Exception { + IvParameterSpec[] ivs, int maxPadLen) + throws Exception { System.out.println("testEnc, input len=" + startLen + " w/ inc=" + inc); @@ -96,7 +109,7 @@ } public static void testKAT(Cipher c, String keyStr, String inStr, - String expectedStr) throws Exception { + String expectedStr) throws Exception { System.out.println("testKAT, input len: " + inStr.length()/2); @@ -245,16 +258,21 @@ SecretKey aes256 = new SecretKeySpec(DATA_32, "AES"); SecretKey any256 = new SecretKeySpec(DATA_32, "ANY"); PrivateKey priv = KeyPairGenerator.getInstance - ("RSA", System.getProperty("test.provider.name","SunRsaSign")) + ("RSA", + System.getProperty( + "test.provider.name", + "SunRsaSign")) .generateKeyPair().getPrivate(); String[] algos = { "AES/KW/PKCS5Padding", "AES/KW/NoPadding", "AES/KWP/NoPadding" }; + + final List skippedList = new ArrayList<>(); + for (String a : algos) { if (p.getService("Cipher", a) == null) { - System.out.println("Skip, due to no support: " + a); - continue; + skippedList.add(a); } System.out.println("Testing " + a); @@ -329,6 +347,12 @@ testWrap(c, keys, ivs, padLen); testIv(c, ivLen, allowCustomIv); } - System.out.println("All Tests Passed"); + + if (!skippedList.isEmpty()) { + throw new SkippedException("One or more tests skipped " + + "due to no support " + skippedList); + } else { + System.out.println("All Tests Passed"); + } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/XMLEncKAT.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/XMLEncKAT.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/XMLEncKAT.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/KeyWrap/XMLEncKAT.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,14 +28,16 @@ * @library /test/lib ../.. * @run main/othervm XMLEncKAT */ +import jtreg.SkippedException; + import java.util.Base64; import java.security.Key; -import java.security.AlgorithmParameters; import java.security.Provider; -import javax.crypto.*; -import javax.crypto.spec.*; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; import java.io.UnsupportedEncodingException; -import java.io.IOException; // adapted from com/sun/crypto/provider/Cipher/KeyWrap/XMLEncKAT.java public class XMLEncKAT extends PKCS11Test { @@ -105,7 +107,9 @@ // first test UNWRAP with known values for (int i = 0; i < base64Wrapped.length; i++) { byte[] wrappedKey = base64D.decode(base64Wrapped[i]); - key[i] = c.unwrap(wrappedKey, "AES", Cipher.SECRET_KEY); + key[i] = c.unwrap(wrappedKey, + "AES", + Cipher.SECRET_KEY); if (c.getIV() != null) { params[i] = new IvParameterSpec(c.getIV()); } @@ -131,8 +135,7 @@ String wrapAlg = "AESWrap"; if (p.getService("Cipher", wrapAlg) == null) { - System.out.println("Skip, due to no support: " + wrapAlg); - return; + throw new SkippedException("No support " + wrapAlg); } String keyAlg = "AES"; diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestDisabledAlgorithms.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/TestDisabledAlgorithms.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestDisabledAlgorithms.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/TestDisabledAlgorithms.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8244336 + * @summary Test JCE layer algorithm restriction + * @library /test/lib .. + * @run main/othervm TestDisabledAlgorithms CiPhEr.RSA/ECB/PKCS1Padding true + * @run main/othervm TestDisabledAlgorithms cIpHeR.rsA true + * @run main/othervm TestDisabledAlgorithms Cipher.what false + * @run main/othervm TestDisabledAlgorithms CiPhER.RSA/ECB/PKCS1Padding2 false + */ +import java.util.List; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Security; +import javax.crypto.Cipher; +import javax.crypto.NoSuchPaddingException; +import jdk.test.lib.Utils; + +public class TestDisabledAlgorithms extends PKCS11Test { + + boolean shouldThrow; + + TestDisabledAlgorithms(boolean shouldThrow) { + this.shouldThrow = shouldThrow; + } + + private static final String PROP_NAME = "jdk.crypto.disabledAlgorithms"; + + private static void test(String alg, Provider p, boolean shouldThrow) + throws Exception { + System.out.println("Testing " + p.getName() + ": " + alg + + ", shouldThrow=" + shouldThrow); + if (shouldThrow) { + Utils.runAndCheckException(() -> Cipher.getInstance(alg, p), + NoSuchAlgorithmException.class); + } else { + Cipher c = Cipher.getInstance(alg, p); + System.out.println("Got cipher w/ algo " + c.getAlgorithm()); + } + } + + @Override + public void main(Provider p) throws Exception { + for (String a : List.of("RSA/ECB/PKCS1Padding", "RSA")) { + test(a, p, shouldThrow); + } + System.out.println("Done"); + } + + public static void main(String[] args) throws Exception { + String propValue = args[0]; + System.out.println("Setting Security Prop " + PROP_NAME + " = " + + propValue); + Security.setProperty(PROP_NAME, propValue); + boolean shouldThrow = Boolean.valueOf(args[1]); + main(new TestDisabledAlgorithms(shouldThrow), args); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java 2026-04-17 19:08:13.000000000 +0000 @@ -321,14 +321,19 @@ System.out.println("Test Passed!"); } } catch (Exception e) { - System.out.println("Exception occured using " + p.getName() + " version " + p.getVersionStr()); + System.out.println("Exception occured using " + p.getName() + + " version " + p.getVersionStr()); if (isNSS(p)) { - double ver = getNSSInfo("nss"); + Version ver = getNSSInfo("nss"); String osName = System.getProperty("os.name"); - if (ver > 3.139 && ver < 3.15 && osName.equals("Linux")) { + + if (osName.equals("Linux") && + ver.major() == 3 && ver.minor() < 15 + && (ver.minor() > 13 && ver.patch() >= 9)) { // warn about buggy behaviour on Linux with nss 3.14 - System.out.println("Warning: old NSS " + ver + " might be problematic, consider upgrading it"); + System.out.println("Warning: old NSS " + ver + + " might be problematic, consider upgrading it"); } } throw e; diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/SecretKeysBasic.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/KeyStore/SecretKeysBasic.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/SecretKeysBasic.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/KeyStore/SecretKeysBasic.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,11 +116,14 @@ // A bug in NSS 3.12 (Mozilla bug 471665) causes AES key lengths // to be read incorrectly. Checking for improper 16 byte length // in key string. - if (isNSS(provider) && expected.getAlgorithm().equals("AES") && - (getNSSVersion() >= 3.12 && getNSSVersion() <= 3.122)) { - System.out.println("NSS 3.12 bug returns incorrect AES key "+ - "length breaking key storage. Aborting..."); - return true; + if (isNSS(provider) && expected.getAlgorithm().equals("AES")) { + Version version = getNSSVersion(); + if (version.major() == 3 && version.minor() == 12 + && version.patch() <= 2) { + System.out.println("NSS 3.12 bug returns incorrect AES key " + + "length breaking key storage. Aborting..."); + return true; + } } if (saveBeforeCheck) { @@ -168,7 +171,7 @@ private static void doTest() throws Exception { // Make sure both NSS libraries are the same version. if (isNSS(provider) && - (getLibsoftokn3Version() != getLibnss3Version())) { + (!getLibsoftokn3Version().equals(getLibnss3Version()))) { System.out.println("libsoftokn3 and libnss3 versions do not match. Aborting test..."); return; } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/PKCS11Test.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/PKCS11Test.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/PKCS11Test.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/PKCS11Test.java 2026-04-17 19:08:13.000000000 +0000 @@ -80,10 +80,10 @@ // Version of the NSS artifact. This coincides with the version of // the NSS version - private static final String NSS_BUNDLE_VERSION = "3.111"; + private static final String NSS_BUNDLE_VERSION = "3.117"; private static final String NSSLIB = "jpg.tests.jdk.nsslib"; - static double nss_version = -1; + static Version nss_version = null; static ECCState nss_ecc_status = ECCState.Basic; // The NSS library we need to search for in getNSSLibDir() @@ -93,8 +93,8 @@ // NSS versions of each library. It is simpler to keep nss_version // for quick checking for generic testing than many if-else statements. - static double softoken3_version = -1; - static double nss3_version = -1; + static Version softoken3_version = null; + static Version nss3_version = null; static Provider pkcs11 = newPKCS11Provider(); private static String PKCS11_BASE; private static Map osMap; @@ -269,13 +269,29 @@ } static boolean isBadNSSVersion(Provider p) { - double nssVersion = getNSSVersion(); - if (isNSS(p) && nssVersion >= 3.11 && nssVersion < 3.12) { - System.out.println("NSS 3.11 has a DER issue that recent " + - "version do not, skipping"); - return true; + Version nssVersion = getNSSVersion(); + if (isNSS(p)) { + // bad version is just between [3.11,3.12) + return nssVersion.major == 3 && 11 == nssVersion.minor; + } else { + return false; } - return false; + } + + public record Version(int major, int minor, int patch) {} + + protected static Version parseVersionString(String version) { + String [] parts = version.split("\\."); + int major = Integer.parseInt(parts[0]); + int minor = 0; + int patch = 0; + if (parts.length >= 2) { + minor = Integer.parseInt(parts[1]); + } + if (parts.length >= 3) { + patch = Integer.parseInt(parts[2]); + } + return new Version(major, minor, patch); } protected static void safeReload(String lib) { @@ -304,26 +320,26 @@ return p.getName().equalsIgnoreCase("SUNPKCS11-NSS"); } - static double getNSSVersion() { - if (nss_version == -1) + static Version getNSSVersion() { + if (nss_version == null) getNSSInfo(); return nss_version; } static ECCState getNSSECC() { - if (nss_version == -1) + if (nss_version == null) getNSSInfo(); return nss_ecc_status; } - public static double getLibsoftokn3Version() { - if (softoken3_version == -1) + public static Version getLibsoftokn3Version() { + if (softoken3_version == null) return getNSSInfo("softokn3"); return softoken3_version; } - public static double getLibnss3Version() { - if (nss3_version == -1) + public static Version getLibnss3Version() { + if (nss3_version == null) return getNSSInfo("nss3"); return nss3_version; } @@ -338,7 +354,7 @@ // $Header: NSS // Version: NSS // Here, stands for NSS version. - static double getNSSInfo(String library) { + static Version getNSSInfo(String library) { // look for two types of headers in NSS libraries String nssHeader1 = "$Header: NSS"; String nssHeader2 = "Version: NSS"; @@ -347,15 +363,15 @@ int i = 0; Path libfile = null; - if (library.compareTo("softokn3") == 0 && softoken3_version > -1) + if (library.compareTo("softokn3") == 0 && softoken3_version != null) return softoken3_version; - if (library.compareTo("nss3") == 0 && nss3_version > -1) + if (library.compareTo("nss3") == 0 && nss3_version != null) return nss3_version; try { libfile = getNSSLibPath(); if (libfile == null) { - return 0.0; + return parseVersionString("0.0"); } try (InputStream is = Files.newInputStream(libfile)) { byte[] data = new byte[1000]; @@ -391,7 +407,7 @@ if (!found) { System.out.println("lib" + library + " version not found, set to 0.0: " + libfile); - nss_version = 0.0; + nss_version = parseVersionString("0.0"); return nss_version; } @@ -404,26 +420,7 @@ version.append(c); } - // If a "dot dot" release, strip the extra dots for double parsing - String[] dot = version.toString().split("\\."); - if (dot.length > 2) { - version = new StringBuilder(dot[0] + "." + dot[1]); - for (int j = 2; dot.length > j; j++) { - version.append(dot[j]); - } - } - - // Convert to double for easier version value checking - try { - nss_version = Double.parseDouble(version.toString()); - } catch (NumberFormatException e) { - System.out.println("===== Content start ====="); - System.out.println(s); - System.out.println("===== Content end ====="); - System.out.println("Failed to parse lib" + library + - " version. Set to 0.0"); - e.printStackTrace(); - } + nss_version = parseVersionString(version.toString()); System.out.print("library: " + library + ", version: " + version + ". "); @@ -779,7 +776,12 @@ } private static Path fetchNssLib(Class clazz, Path libraryName) throws IOException { - Path p = ArtifactResolver.fetchOne(clazz); + Path p; + try { + p = ArtifactResolver.fetchOne(clazz); + } catch (IOException exc) { + throw new SkippedException("Could not find NSS", exc); + } return findNSSLibrary(p, libraryName); } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Provider/Absolute.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Provider/Absolute.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Provider/Absolute.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Provider/Absolute.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. * 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 @@ * @summary load DLLs and launch executables using fully qualified path */ +import jtreg.SkippedException; + import java.security.InvalidParameterException; import java.security.Provider; @@ -40,12 +42,11 @@ try { Provider p = PKCS11Test.getSunPKCS11(config); if (p == null) { - System.out.println("Skipping test - no PKCS11 provider available"); + throw new SkippedException("Skipping test - no PKCS11 provider available"); } } catch (InvalidParameterException ipe) { Throwable ex = ipe.getCause(); - if (ex.getMessage().indexOf( - "Absolute path required for library value:") != -1) { + if (ex.getMessage().contains("Absolute path required for library value:")) { System.out.println("Test Passed: expected exception thrown"); } else { // rethrow diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Provider/ConfigShortPath.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Provider/ConfigShortPath.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Provider/ConfigShortPath.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Provider/ConfigShortPath.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved. * 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,17 @@ * @bug 6581254 6986789 7196009 8062170 * @summary Allow '~', '+', and quoted paths in config file * @author Valerie Peng + * @library /test/lib */ -import java.security.*; -import java.io.*; -import java.lang.reflect.*; +import jtreg.SkippedException; + +import java.io.File; +import java.io.IOException; +import java.security.InvalidParameterException; +import java.security.Provider; +import java.security.ProviderException; +import java.security.Security; public class ConfigShortPath { @@ -43,8 +49,7 @@ public static void main(String[] args) throws Exception { Provider p = Security.getProvider("SunPKCS11"); if (p == null) { - System.out.println("Skipping test - no PKCS11 provider available"); - return; + throw new SkippedException("Skipping test - no PKCS11 provider available"); } String osInfo = System.getProperty("os.name", ""); @@ -65,7 +70,7 @@ if (cause.getClass().getName().equals ("sun.security.pkcs11.ConfigurationException")) { // Error occurred during parsing - if (cause.getMessage().indexOf("Unexpected") != -1) { + if (cause.getMessage().contains("Unexpected")) { throw (ProviderException) cause; } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Provider/LoginISE.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Provider/LoginISE.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Provider/LoginISE.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Provider/LoginISE.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * 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,16 +21,22 @@ * questions. */ -import java.io.*; -import java.util.*; -import java.security.*; -import javax.security.auth.callback.*; +import jtreg.SkippedException; + +import java.io.IOException; +import java.security.AuthProvider; +import java.security.Provider; +import java.security.Security; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.UnsupportedCallbackException; /** * @test * @bug 8130648 * @summary make sure IllegalStateException is thrown for uninitialized * SunPKCS11 provider instance + * @library /test/lib */ public class LoginISE { @@ -38,8 +44,7 @@ Provider p = Security.getProvider("SunPKCS11"); if (p == null) { - System.out.println("No un-initialized PKCS11 provider available; skip"); - return; + throw new SkippedException("No un-initialized PKCS11 provider available; skip"); } if (!(p instanceof AuthProvider)) { throw new RuntimeException("Error: expect AuthProvider!"); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Secmod/AddTrustedCert.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Secmod/AddTrustedCert.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Secmod/AddTrustedCert.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Secmod/AddTrustedCert.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 +121,10 @@ } private static boolean improperNSSVersion(Provider p) { - double nssVersion = getNSSVersion(); - if (p.getName().equalsIgnoreCase("SunPKCS11-NSSKeyStore") - && nssVersion >= 3.28 && nssVersion < 3.35) { - return true; + Version nssVersion = getNSSVersion(); + if (p.getName().equalsIgnoreCase("SunPKCS11-NSSKeyStore")) { + return nssVersion.major() == 3 && + (nssVersion.minor() >= 28 && nssVersion.minor() < 35); } return false; diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/InitAgainPSS.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/InitAgainPSS.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/InitAgainPSS.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/InitAgainPSS.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,8 +20,15 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -import java.security.*; -import java.security.spec.*; +import jtreg.SkippedException; + +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Signature; +import java.security.spec.MGF1ParameterSpec; +import java.security.spec.PSSParameterSpec; /** * @test @@ -46,9 +53,7 @@ try { s1 = Signature.getInstance(sigAlg, p); } catch (NoSuchAlgorithmException e) { - System.out.println("Skip testing " + sigAlg + - " due to no support"); - return; + throw new SkippedException("No support " + sigAlg); } byte[] msg = "hello".getBytes(); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,9 +20,18 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -import java.security.*; -import java.security.interfaces.*; -import java.security.spec.*; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.KeyPair; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.spec.AlgorithmParameterSpec; +import java.security.spec.MGF1ParameterSpec; +import java.security.spec.PSSParameterSpec; +import java.util.ArrayList; +import java.util.List; import jtreg.SkippedException; @@ -43,7 +52,7 @@ main(new KeyAndParamCheckForPSS(), args); } - private static boolean skipTest = true; + private static final List skippedAlgs = new ArrayList<>(); @Override public void main(Provider p) throws Exception { @@ -73,8 +82,8 @@ runTest(p, 1040, "SHA3-512", "SHA3-384"); runTest(p, 1040, "SHA3-512", "SHA3-512"); - if (skipTest) { - throw new SkippedException("Test Skipped"); + if (!skippedAlgs.isEmpty()) { + throw new SkippedException("Tests Skipped: " + skippedAlgs); } } @@ -84,7 +93,17 @@ System.out.println("Testing " + hashAlg + " and MGF1" + mgfHashAlg); PSSUtil.AlgoSupport s = PSSUtil.isHashSupported(p, hashAlg, mgfHashAlg); if (s == PSSUtil.AlgoSupport.NO) { - System.out.println("=> Skip; no support"); + System.out.printf("=> Skip; no support keysize: %d, hash alg: %s, mgf Hash Alg: %s%n", + keySize, + hashAlg, + mgfHashAlg); + skippedAlgs.add( + String.format( + "[keysize: %s, hash alg: %s, mgf Hash Alg: %s]", + keySize, + hashAlg, + mgfHashAlg) + ); return; } @@ -108,7 +127,6 @@ sig.setParameter(paramsGood); sig.initSign(priv); // algorithm support confirmed - skipTest = false; } catch (Exception ex) { if (s == PSSUtil.AlgoSupport.MAYBE) { // confirmed to be unsupported; skip the rest of the test diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +21,15 @@ * questions. */ -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; +import jtreg.SkippedException; + +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Signature; +import java.security.spec.MGF1ParameterSpec; +import java.security.spec.PSSParameterSpec; /* * @test @@ -53,9 +59,7 @@ try { sigPkcs11 = Signature.getInstance("RSASSA-PSS", p); } catch (NoSuchAlgorithmException e) { - System.out.println("Skip testing RSASSA-PSS" + - " due to no support"); - return; + throw new SkippedException("No support for RSASSA-PSS"); } Signature sigSunRsaSign = diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS2.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS2.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS2.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SigInteropPSS2.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 +21,16 @@ * questions. */ -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; +import jtreg.SkippedException; + +import java.security.AlgorithmParameters; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.Security; +import java.security.Signature; +import java.security.spec.PSSParameterSpec; /* * @test @@ -67,9 +74,7 @@ try { sigPkcs11 = Signature.getInstance(digest + "withRSASSA-PSS", p); } catch (NoSuchAlgorithmException e) { - System.out.println("Skip testing " + digest + "withRSASSA-PSS" + - " due to no support"); - continue; + throw new SkippedException("No support for " + digest + "withRSASSA-PSS"); } runTest(sigPkcs11, sigSunRsaSign, kp); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,29 +20,55 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -import java.security.*; -import java.security.interfaces.*; -import java.security.spec.*; -import java.util.stream.IntStream; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.KeyPair; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.SignatureException; +import java.security.spec.AlgorithmParameterSpec; +import java.security.spec.MGF1ParameterSpec; +import java.security.spec.PSSParameterSpec; +import java.util.ArrayList; +import java.util.List; + import jtreg.SkippedException; /** - * @test + * @test id=sha * @bug 8080462 8226651 8242332 * @summary Generate a RSASSA-PSS signature and verify it using PKCS11 provider * @library /test/lib .. * @modules jdk.crypto.cryptoki * @run main SignatureTestPSS */ + +/** + * @test id=sha3 + * @bug 8080462 8226651 8242332 + * @summary Generate a RSASSA-PSS signature and verify it using PKCS11 provider + * @library /test/lib .. + * @modules jdk.crypto.cryptoki + * @run main SignatureTestPSS sha3 + */ public class SignatureTestPSS extends PKCS11Test { private static final String SIGALG = "RSASSA-PSS"; private static final int[] KEYSIZES = { 2048, 3072 }; - private static final String[] DIGESTS = { + + private static String[] DIGESTS = null; + + private static final String[] SHA_DIGESTS = { "SHA-224", "SHA-256", "SHA-384" , "SHA-512", - "SHA3-224", "SHA3-256", "SHA3-384" , "SHA3-512", }; + private static final String[] SHA3_DIGESTS = { + "SHA3-224", "SHA3-256", "SHA3-384" , "SHA3-512" + }; + private static final byte[] DATA = generateData(100); /** @@ -55,9 +81,12 @@ */ private static final int UPDATE_TIMES_HUNDRED = 100; - private static boolean skipTest = true; + private static final List skippedAlgs = new ArrayList<>(); public static void main(String[] args) throws Exception { + DIGESTS = (args.length > 0 && "sha3".equals(args[0])) ? + SHA3_DIGESTS : SHA_DIGESTS; + main(new SignatureTestPSS(), args); } @@ -80,6 +109,8 @@ PSSUtil.isHashSupported(p, hash, mgfHash); if (s == PSSUtil.AlgoSupport.NO) { System.out.println(" => Skip; no support"); + skippedAlgs.add("[Hash = " + hash + + ", MGF1 Hash = " + mgfHash + "]"); continue; } checkSignature(p, DATA, pubKey, privKey, hash, mgfHash, s); @@ -87,17 +118,15 @@ }; } - // start testing below - if (skipTest) { - throw new SkippedException("Test Skipped"); + if (!skippedAlgs.isEmpty()) { + throw new SkippedException("Test Skipped :" + skippedAlgs); } } private static void checkSignature(Provider p, byte[] data, PublicKey pub, PrivateKey priv, String hash, String mgfHash, PSSUtil.AlgoSupport s) throws NoSuchAlgorithmException, InvalidKeyException, - SignatureException, NoSuchProviderException, - InvalidAlgorithmParameterException { + SignatureException { // only test RSASSA-PSS signature against the supplied hash/mgfHash // if they are supported; otherwise PKCS11 library will throw @@ -112,14 +141,27 @@ } catch (InvalidAlgorithmParameterException iape) { if (s == PSSUtil.AlgoSupport.MAYBE) { // confirmed to be unsupported; skip the rest of the test - System.out.println(" => Skip; no PSS support"); + System.out.printf(" => Skip; no PSS support public key: %s, private key: %s, " + + "hash: %s, mgf hash: %s, Algo Support: %s%n", + pub, + priv, + hash, + mgfHash, + s); + skippedAlgs.add(String.format( + "[public key: %s, private key: %s, " + + "hash: %s, mgf hash: %s, Algo Support: %s]", + pub, + priv, + hash, + mgfHash, + s) + ); return; } else { throw new RuntimeException("Unexpected Exception", iape); } } - // start testing below - skipTest = false; for (int i = 0; i < UPDATE_TIMES_HUNDRED; i++) { sig.update(data); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,13 +20,23 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -import java.security.*; -import java.security.interfaces.*; -import java.security.spec.*; +import jtreg.SkippedException; + +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.SignatureException; import java.util.stream.IntStream; /** - * @test + * @test id=sha * @bug 8244154 8242332 * @summary Generate a withRSASSA-PSS signature and verify it using * PKCS11 provider @@ -34,13 +44,28 @@ * @modules jdk.crypto.cryptoki * @run main SignatureTestPSS2 */ + +/** + * @test id=sha3 + * @bug 8244154 8242332 + * @summary Generate a withRSASSA-PSS signature and verify it using + * PKCS11 provider + * @library /test/lib .. + * @modules jdk.crypto.cryptoki + * @run main SignatureTestPSS2 sha3 + */ public class SignatureTestPSS2 extends PKCS11Test { // PKCS11 does not support RSASSA-PSS keys yet private static final String KEYALG = "RSA"; - private static final String[] SIGALGS = { + + private static String[] SIGALGS = null; + + private static final String[] SHA_SIGALGS = { "SHA224withRSASSA-PSS", "SHA256withRSASSA-PSS", - "SHA384withRSASSA-PSS", "SHA512withRSASSA-PSS", + "SHA384withRSASSA-PSS", "SHA512withRSASSA-PSS" + }; + private static final String[] SHA3_SIGALGS = { "SHA3-224withRSASSA-PSS", "SHA3-256withRSASSA-PSS", "SHA3-384withRSASSA-PSS", "SHA3-512withRSASSA-PSS" }; @@ -53,6 +78,8 @@ private static final int UPDATE_TIMES = 2; public static void main(String[] args) throws Exception { + SIGALGS = (args.length > 0 && "sha3".equals(args[0])) ? SHA3_SIGALGS : SHA_SIGALGS; + main(new SignatureTestPSS2(), args); } @@ -63,9 +90,7 @@ try { sig = Signature.getInstance(sa, p); } catch (NoSuchAlgorithmException e) { - System.out.println("Skip testing " + sa + - " due to no support"); - return; + throw new SkippedException("No support for " + sa); } for (int i : KEYSIZES) { runTest(sig, i); @@ -94,7 +119,7 @@ SignatureException | NoSuchProviderException ex) { throw new RuntimeException(ex); } catch (InvalidAlgorithmParameterException ex2) { - System.out.println("Skip test due to " + ex2); + throw new SkippedException(ex2.toString()); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/TestDSA.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/TestDSA.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/TestDSA.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/TestDSA.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * 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,8 @@ * @run main/othervm TestDSA */ +import jtreg.SkippedException; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.StringReader; @@ -122,8 +124,7 @@ System.out.println("Testing provider " + provider + "..."); if (provider.getService("Signature", "SHA1withDSA") == null) { - System.out.println("DSA not supported, skipping"); - return; + throw new SkippedException("DSA not supported"); } KeyFactory kf = KeyFactory.getInstance("DSA", provider); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. * 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,13 +47,15 @@ @Override protected boolean skipTest(Provider provider) { - double version = getNSSVersion(); - String[] versionStrs = Double.toString(version).split("\\."); - int major = Integer.parseInt(versionStrs[0]); - int minor = Integer.parseInt(versionStrs[1]); - if (isNSS(provider) && (version == 0.0 || (major >= 3 && minor >= 14))) { - System.out.println("Skip testing NSS " + version); - return true; + if (isNSS(provider)) { + Version version = getNSSVersion(); + if (version == null) { + return true; + } + if (version.major() >= 3 && version.minor() >= 14){ + System.out.println("Skip testing NSS " + version); + return true; + } } return false; diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/TestNONEwithRSA.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/TestNONEwithRSA.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Signature/TestNONEwithRSA.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/Signature/TestNONEwithRSA.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.security.*; +import java.security.interfaces.*; +import java.security.spec.*; +import java.util.stream.IntStream; +import jtreg.SkippedException; + +/** + * @test + * @bug 8244336 + * @summary Test the NONEwithRSA signature refactoring for JCE layer + * algorithm restriction + * @library /test/lib .. + * @modules jdk.crypto.cryptoki + */ +public class TestNONEwithRSA extends PKCS11Test { + + private static final String SIGALG = "NONEwithRSA"; + + private static final int[] KEYSIZES = { 2048, 3072 }; + private static final byte[] DATA = generateData(100); + + public static void main(String[] args) throws Exception { + main(new TestNONEwithRSA(), args); + } + + @Override + public void main(Provider p) throws Exception { + try { + Signature.getInstance(SIGALG, p); + } catch (NoSuchAlgorithmException nsae) { + throw new SkippedException("Skip due to no support for " + SIGALG); + } + + for (int kSize : KEYSIZES) { + System.out.println("[KEYSIZE = " + kSize + "]"); + KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p); + kpg.initialize(kSize); + KeyPair kp = kpg.generateKeyPair(); + PrivateKey privKey = kp.getPrivate(); + PublicKey pubKey = kp.getPublic(); + checkSignature(p, DATA, pubKey, privKey); + } + } + + private static void checkSignature(Provider p, byte[] data, PublicKey pub, + PrivateKey priv) + throws NoSuchAlgorithmException, InvalidKeyException, + SignatureException, NoSuchProviderException, + InvalidAlgorithmParameterException { + + Signature sig = Signature.getInstance(SIGALG, p); + sig.initSign(priv); + + sig.update(data); + byte[] signedData = sig.sign(); + + // Make sure signature verifies with original data + sig.initVerify(pub); + sig.update(data); + if (!sig.verify(signedData)) { + throw new RuntimeException("Failed to verify signature"); + } + + // Make sure signature does NOT verify when the original data + // has changed + sig.initVerify(pub); + sig.update(data); + sig.update(data); + if (sig.verify(signedData)) { + throw new RuntimeException("Failed to detect bad signature"); + } + System.out.println(" => Passed"); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/ec/TestECDH.java openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/ec/TestECDH.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/ec/TestECDH.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/pkcs11/ec/TestECDH.java 2026-04-17 19:08:13.000000000 +0000 @@ -111,6 +111,7 @@ * PKCS11Test.main will remove this provider if needed */ Providers.setAt(p, 1); + System.out.println("Testing provider " + p.getName()); if (false) { KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", p); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/provider/acvp/Launcher.java openjdk-25-25.0.3+9/test/jdk/sun/security/provider/acvp/Launcher.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/provider/acvp/Launcher.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/provider/acvp/Launcher.java 2026-04-17 19:08:13.000000000 +0000 @@ -24,7 +24,9 @@ import jdk.test.lib.artifacts.Artifact; import jdk.test.lib.artifacts.ArtifactResolver; import jdk.test.lib.json.JSONValue; +import jtreg.SkippedException; +import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; import java.security.Provider; @@ -114,7 +116,14 @@ public static void main(String[] args) throws Exception { - Path archivePath = ArtifactResolver.fetchOne(ACVP_SERVER_TESTS.class); + Path archivePath = null; + try { + archivePath = ArtifactResolver.fetchOne(ACVP_SERVER_TESTS.class); + } catch (IOException e) { + if (e.getMessage().contains("Cannot find the artifact ACVP-Server")) { + throw new SkippedException("ACVP-Server not available."); + } + } System.out.println("Data path: " + archivePath); if (PROVIDER != null) { diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksClient.java openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksClient.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksClient.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksClient.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * 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 8206929 8212885 + * @bug 8206929 8212885 8333857 * @summary ensure that client only resumes a session if certain properties * of the session are compatible with the new connection * @library /javax/net/ssl/templates @@ -47,6 +47,9 @@ import java.security.*; import java.net.*; import java.util.*; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; public class ResumeChecksClient extends SSLContextTemplate { enum TestMode { @@ -56,49 +59,60 @@ CIPHER_SUITE, SIGNATURE_SCHEME } + static TestMode testMode; public static void main(String[] args) throws Exception { - new ResumeChecksClient(TestMode.valueOf(args[0])).run(); + testMode = TestMode.valueOf(args[0]); + new ResumeChecksClient().test(); } - private final TestMode testMode; - public ResumeChecksClient(TestMode mode) { - this.testMode = mode; - } - - private void run() throws Exception { - Server server = startServer(); - server.signal(); + private void test() throws Exception { + Server server = new Server(); SSLContext sslContext = createClientSSLContext(); - while (!server.started) { - Thread.yield(); - } - SSLSession firstSession = connect(sslContext, server.port, testMode, false); + HexFormat hex = HexFormat.of(); + long firstStartTime = System.currentTimeMillis(); + SSLSession firstSession = connect(sslContext, server.port, true); + System.err.println("firstStartTime = " + firstStartTime); + System.err.println("firstId = " + hex.formatHex(firstSession.getId())); + System.err.println("firstSession.getCreationTime() = " + + firstSession.getCreationTime()); - server.signal(); long secondStartTime = System.currentTimeMillis(); - Thread.sleep(10); - SSLSession secondSession = connect(sslContext, server.port, testMode, true); - - server.go = false; - server.signal(); + SSLSession secondSession = connect(sslContext, server.port, false); + System.err.println("secondStartTime = " + secondStartTime); + // Note: Ids will never match with TLS 1.3 due to spec + System.err.println("secondId = " + hex.formatHex(secondSession.getId())); + System.err.println("secondSession.getCreationTime() = " + + secondSession.getCreationTime()); switch (testMode) { case BASIC: // fail if session is not resumed - checkResumedSession(firstSession, secondSession); + try { + checkResumedSession(firstSession, secondSession); + } catch (Exception e) { + throw new AssertionError("secondSession did not resume: FAIL", + e); + } + System.out.println("secondSession used resumption: PASS"); break; case VERSION_2_TO_3: case VERSION_3_TO_2: case CIPHER_SUITE: case SIGNATURE_SCHEME: // fail if a new session is not created - if (secondSession.getCreationTime() <= secondStartTime) { - throw new RuntimeException("Existing session was used"); + try { + checkResumedSession(firstSession, secondSession); + System.err.println("firstSession = " + firstSession); + System.err.println("secondSession = " + secondSession); + throw new AssertionError("Second connection should not " + + "have resumed first session: FAIL"); + } catch (Exception e) { + System.out.println("secondSession didn't use resumption: PASS"); } break; default: - throw new RuntimeException("unknown mode: " + testMode); + throw new AssertionError("unknown mode: " + testMode); } } @@ -134,51 +148,29 @@ } private static SSLSession connect(SSLContext sslContext, int port, - TestMode mode, boolean second) { + boolean first) { try { SSLSocket sock = (SSLSocket) sslContext.getSocketFactory().createSocket(); SSLParameters params = sock.getSSLParameters(); - switch (mode) { - case BASIC: - // do nothing to ensure resumption works - break; - case VERSION_2_TO_3: - if (second) { - params.setProtocols(new String[] {"TLSv1.3"}); - } else { - params.setProtocols(new String[] {"TLSv1.2"}); - } - break; - case VERSION_3_TO_2: - if (second) { - params.setProtocols(new String[] {"TLSv1.2"}); - } else { - params.setProtocols(new String[] {"TLSv1.3"}); - } - break; - case CIPHER_SUITE: - if (second) { - params.setCipherSuites( - new String[] {"TLS_AES_256_GCM_SHA384"}); - } else { - params.setCipherSuites( - new String[] {"TLS_AES_128_GCM_SHA256"}); - } - break; - case SIGNATURE_SCHEME: - AlgorithmConstraints constraints = - params.getAlgorithmConstraints(); - if (second) { - params.setAlgorithmConstraints(new NoSig("ecdsa")); - } else { - params.setAlgorithmConstraints(new NoSig("rsa")); - } - break; - default: - throw new RuntimeException("unknown mode: " + mode); + switch (testMode) { + case BASIC -> {} // do nothing + case VERSION_2_TO_3 -> params.setProtocols(new String[]{ + first ? "TLSv1.2" : "TLSv1.3"}); + case VERSION_3_TO_2 -> params.setProtocols(new String[]{ + first ? "TLSv1.3" : "TLSv1.2"}); + case CIPHER_SUITE -> params.setCipherSuites( + new String[]{ + first ? "TLS_AES_128_GCM_SHA256" : + "TLS_AES_256_GCM_SHA384"}); + case SIGNATURE_SCHEME -> + params.setAlgorithmConstraints(new NoSig( + first ? "rsa" : "ecdsa")); + default -> + throw new AssertionError("unknown mode: " + + testMode); } sock.setSSLParameters(params); sock.connect(new InetSocketAddress("localhost", port)); @@ -195,7 +187,7 @@ return result; } catch (Exception ex) { // unexpected exception - throw new RuntimeException(ex); + throw new AssertionError(ex); } } @@ -274,65 +266,63 @@ } } - private static Server startServer() { - Server server = new Server(); - new Thread(server).start(); - return server; - } - - private static class Server extends SSLContextTemplate implements Runnable { + private static class Server extends SSLContextTemplate { + public int port; + private final SSLServerSocket ssock; + ExecutorService threadPool = Executors.newFixedThreadPool(1); + CountDownLatch serverLatch = new CountDownLatch(1); - public volatile boolean go = true; - private boolean signal = false; - public volatile int port = 0; - public volatile boolean started = false; - - private synchronized void waitForSignal() { - while (!signal) { - try { - wait(); - } catch (InterruptedException ex) { - // do nothing - } - } - signal = false; - } - public synchronized void signal() { - signal = true; - notify(); - } - - @Override - public void run() { + Server() { try { - SSLContext sc = createServerSSLContext(); ServerSocketFactory fac = sc.getServerSocketFactory(); - SSLServerSocket ssock = (SSLServerSocket) - fac.createServerSocket(0); - this.port = ssock.getLocalPort(); - - waitForSignal(); - started = true; - while (go) { + ssock = (SSLServerSocket) fac.createServerSocket(0); + port = ssock.getLocalPort(); + + // Thread to allow multiple clients to connect + new Thread(() -> { try { - System.out.println("Waiting for connection"); - Socket sock = ssock.accept(); - BufferedReader reader = new BufferedReader( - new InputStreamReader(sock.getInputStream())); - String line = reader.readLine(); - System.out.println("server read: " + line); - PrintWriter out = new PrintWriter( - new OutputStreamWriter(sock.getOutputStream())); - out.println(line); - out.flush(); - waitForSignal(); + System.err.println("Server starting to accept"); + serverLatch.countDown(); + do { + threadPool.submit( + new ServerThread((SSLSocket) ssock.accept())); + } while (true); } catch (Exception ex) { - ex.printStackTrace(); + throw new AssertionError("Server Down", ex); + } finally { + threadPool.close(); } + }).start(); + + } catch (Exception e) { + throw new AssertionError(e); + } + } + + static class ServerThread extends Thread { + SSLSocket sock; + + ServerThread(SSLSocket s) { + this.sock = s; + System.err.println("(Server) client connection on port " + + sock.getPort()); + } + + public void run() { + try { + BufferedReader reader = new BufferedReader( + new InputStreamReader(sock.getInputStream())); + String line = reader.readLine(); + System.out.println("server read: " + line); + PrintWriter out = new PrintWriter( + new OutputStreamWriter(sock.getOutputStream())); + out.println(line); + out.flush(); + out.close(); + } catch (Exception e) { + throw new AssertionError("Server thread error", e); } - } catch (Exception ex) { - throw new RuntimeException(ex); } } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksServer.java openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksServer.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksServer.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/SSLSessionImpl/ResumeChecksServer.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,7 +23,7 @@ /* * @test - * @bug 8206929 + * @bug 8206929 8333857 * @summary ensure that server only resumes a session if certain properties * of the session are compatible with the new connection * @modules java.base/sun.security.x509 @@ -49,6 +49,10 @@ import java.security.*; import java.net.*; import java.util.*; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + import sun.security.x509.X509CertImpl; public class ResumeChecksServer extends SSLContextTemplate { @@ -63,60 +67,56 @@ LOCAL_CERTS } - public static void main(String[] args) throws Exception { - - new ResumeChecksServer(TestMode.valueOf(args[0])).run(); - } - private final TestMode testMode; + static CountDownLatch latch = new CountDownLatch(1); + static TestMode testMode; + static int serverPort; - public ResumeChecksServer(TestMode testMode) { - this.testMode = testMode; + public static void main(String[] args) throws Exception { + testMode = TestMode.valueOf(args[0]); + new ResumeChecksServer().test(); } - private void run() throws Exception { - SSLSession firstSession; - SSLSession secondSession = null; - - SSLContext sslContext = createServerSSLContext(); - ServerSocketFactory fac = sslContext.getServerSocketFactory(); - SSLServerSocket ssock = (SSLServerSocket) - fac.createServerSocket(0); - - Client client = startClient(ssock.getLocalPort()); - - try { - firstSession = connect(client, ssock, testMode, null); - } catch (Exception ex) { - throw new RuntimeException(ex); - } + private void test() throws Exception { + SSLSession firstSession, secondSession; + HexFormat hex = HexFormat.of(); + + serverPort = new Server().port; + latch.await(); + Client c = new Client(serverPort); + + System.out.println("Waiting for connection"); + long firstStartTime = System.currentTimeMillis(); + firstSession = c.test(); + + System.err.println("firstStartTime = " + firstStartTime); + System.err.println("firstId = " + hex.formatHex(firstSession.getId())); + System.err.println("firstSession.getCreationTime() = " + + firstSession.getCreationTime()); long secondStartTime = System.currentTimeMillis(); - Thread.sleep(10); - try { - secondSession = connect(client, ssock, testMode, firstSession); - } catch (SSLHandshakeException ex) { - // this is expected - } catch (Exception ex) { - throw new RuntimeException(ex); - } + secondSession = c.test(); - client.go = false; - client.signal(); + System.err.println("secondStartTime = " + secondStartTime); + // Note: Ids will never match with TLS 1.3 due to spec + System.err.println("secondId = " + hex.formatHex(secondSession.getId())); + System.err.println("secondSession.getCreationTime() = " + + secondSession.getCreationTime()); switch (testMode) { case BASIC: // fail if session is not resumed - if (secondSession.getCreationTime() > secondStartTime) { - throw new RuntimeException("Session was not reused"); + if (firstSession.getCreationTime() != + secondSession.getCreationTime()) { + throw new AssertionError("Session was not reused: FAIL"); } // Fail if session's certificates are not restored correctly. - if (!java.util.Arrays.equals( + if (!Arrays.equals( firstSession.getLocalCertificates(), secondSession.getLocalCertificates())) { - throw new RuntimeException("Certificates do not match"); + throw new AssertionError("Certificates do not match: FAIL"); } - + System.out.println("secondSession used resumption: PASS"); break; case CLIENT_AUTH: // throws an exception if the client is not authenticated @@ -128,24 +128,23 @@ case SIGNATURE_SCHEME: case LOCAL_CERTS: // fail if a new session is not created - if (secondSession.getCreationTime() <= secondStartTime) { - throw new RuntimeException("Existing session was used"); + if (secondSession.getCreationTime() < secondStartTime) { + throw new AssertionError("Existing session was used: FAIL"); } + System.out.println("secondSession not resumed: PASS"); break; default: - throw new RuntimeException("unknown mode: " + testMode); + throw new AssertionError("unknown mode: " + testMode); } } private static class NoSig implements AlgorithmConstraints { - private final String alg; NoSig(String alg) { this.alg = alg; } - private boolean test(String a) { return !a.toLowerCase().contains(alg.toLowerCase()); } @@ -153,176 +152,151 @@ public boolean permits(Set primitives, Key key) { return true; } + public boolean permits(Set primitives, String algorithm, AlgorithmParameters parameters) { - return test(algorithm); } + public boolean permits(Set primitives, String algorithm, Key key, AlgorithmParameters parameters) { - return test(algorithm); } } - private static SSLSession connect(Client client, SSLServerSocket ssock, - TestMode mode, SSLSession firstSession) throws Exception { + private static class Client extends SSLContextTemplate { + private final int port; + private final SSLContext sc; + public SSLSession session; - boolean second = firstSession != null; + Client(int port) throws Exception { + sc = createClientSSLContext(); + this.port = port; + } - try { - client.signal(); - System.out.println("Waiting for connection"); - SSLSocket sock = (SSLSocket) ssock.accept(); - SSLParameters params = sock.getSSLParameters(); - - switch (mode) { - case BASIC: - // do nothing to ensure resumption works - break; - case CLIENT_AUTH: - if (second) { - params.setNeedClientAuth(true); - } else { - params.setNeedClientAuth(false); - } - break; - case VERSION_2_TO_3: - if (second) { - params.setProtocols(new String[] {"TLSv1.3"}); - } else { - params.setProtocols(new String[] {"TLSv1.2"}); - } - break; - case VERSION_3_TO_2: - if (second) { - params.setProtocols(new String[] {"TLSv1.2"}); - } else { - params.setProtocols(new String[] {"TLSv1.3"}); - } - break; - case CIPHER_SUITE: - if (second) { - params.setCipherSuites( - new String[] {"TLS_AES_128_GCM_SHA256"}); - } else { - params.setCipherSuites( - new String[] {"TLS_AES_256_GCM_SHA384"}); - } - break; - case SIGNATURE_SCHEME: - params.setNeedClientAuth(true); - AlgorithmConstraints constraints = - params.getAlgorithmConstraints(); - if (second) { - params.setAlgorithmConstraints( - new NoSig("ecdsa_secp384r1_sha384")); - } else { - params.setAlgorithmConstraints( - new NoSig("ecdsa_secp521r1_sha512")); - } - break; - case LOCAL_CERTS: - if (second) { - // Add first session's certificate signature - // algorithm to constraints so local certificates - // can't be restored from the session ticket. - params.setAlgorithmConstraints( - new NoSig(X509CertImpl.toImpl((X509CertImpl) - firstSession.getLocalCertificates()[0]) - .getSigAlgName())); + public SSLSession test() throws Exception { + SSLSocket sock = null; + latch.await(); + do { + try { + sock = (SSLSocket) sc.getSocketFactory().createSocket(); + } catch (IOException e) { + // If the server never starts, test will time out. + System.err.println("client trying again to connect"); + Thread.sleep(500); } - break; - default: - throw new RuntimeException("unknown mode: " + mode); - } - sock.setSSLParameters(params); - BufferedReader reader = new BufferedReader( - new InputStreamReader(sock.getInputStream())); - String line = reader.readLine(); - System.out.println("server read: " + line); + } while (sock == null); + sock.connect(new InetSocketAddress("localhost", port)); PrintWriter out = new PrintWriter( new OutputStreamWriter(sock.getOutputStream())); - out.println(line); + out.println("message"); out.flush(); + BufferedReader reader = new BufferedReader( + new InputStreamReader(sock.getInputStream())); + String inMsg = reader.readLine(); + System.out.println("Client received: " + inMsg); out.close(); - SSLSession result = sock.getSession(); + session = sock.getSession(); sock.close(); - return result; - } catch (SSLHandshakeException ex) { - if (!second) { - throw ex; - } + return session; } - return null; - } - - private static Client startClient(int port) { - Client client = new Client(port); - new Thread(client).start(); - return client; } - private static class Client extends SSLContextTemplate implements Runnable { - - public volatile boolean go = true; - private boolean signal = false; - private final int port; + // The server will only have two connections each tests + private static class Server extends SSLContextTemplate { + public int port; + ExecutorService threadPool = Executors.newFixedThreadPool(1); + // Stores the certs from the first connection in mode LOCAL_CERTS + static X509CertImpl localCerts; + // first connection to the server + static boolean first = true; + + Server() throws Exception { + SSLContext sc = createServerSSLContext(); + ServerSocketFactory fac = sc.getServerSocketFactory(); + SSLServerSocket ssock = (SSLServerSocket) fac.createServerSocket(0); + port = ssock.getLocalPort(); - Client(int port) { - this.port = port; - } - - private synchronized void waitForSignal() { - while (!signal) { + // Thread to allow multiple clients to connect + new Thread(() -> { try { - wait(); - } catch (InterruptedException ex) { - // do nothing + System.err.println("Server starting to accept"); + latch.countDown(); + do { + threadPool.submit(new ServerThread(ssock.accept())); + } while (true); + } catch (Exception ex) { + throw new AssertionError("Server Down", ex); + } finally { + threadPool.close(); } - } - signal = false; - - try { - Thread.sleep(1000); - } catch (InterruptedException ex) { - // do nothing - } - } - public synchronized void signal() { - signal = true; - notify(); + }).start(); } - public void run() { - try { + static class ServerThread implements Runnable { + final SSLSocket sock; - SSLContext sc = createClientSSLContext(); + ServerThread(Socket s) { + this.sock = (SSLSocket) s; + System.err.println("(Server) client connection on port " + + sock.getPort()); + } - waitForSignal(); - while (go) { - try { - SSLSocket sock = (SSLSocket) - sc.getSocketFactory().createSocket(); - sock.connect(new InetSocketAddress("localhost", port)); - PrintWriter out = new PrintWriter( - new OutputStreamWriter(sock.getOutputStream())); - out.println("message"); - out.flush(); - BufferedReader reader = new BufferedReader( - new InputStreamReader(sock.getInputStream())); - String inMsg = reader.readLine(); - System.out.println("Client received: " + inMsg); - out.close(); - sock.close(); - waitForSignal(); - } catch (Exception ex) { - ex.printStackTrace(); + public void run() { + try { + SSLParameters params = sock.getSSLParameters(); + switch (testMode) { + case BASIC -> {} // do nothing + case CLIENT_AUTH -> params.setNeedClientAuth(!first); + case VERSION_2_TO_3 -> params.setProtocols(new String[]{ + first ? "TLSv1.2" : "TLSv1.3"}); + case VERSION_3_TO_2 -> params.setProtocols(new String[]{ + first ? "TLSv1.3" : "TLSv1.2"}); + case CIPHER_SUITE -> params.setCipherSuites( + new String[]{ + first ? "TLS_AES_256_GCM_SHA384" : + "TLS_AES_128_GCM_SHA256"}); + case SIGNATURE_SCHEME -> { + params.setNeedClientAuth(true); + params.setAlgorithmConstraints(new NoSig( + first ? "ecdsa_secp521r1_sha512" : + "ecdsa_secp384r1_sha384")); + } + case LOCAL_CERTS -> { + if (!first) { + // Add first session's certificate signature + // algorithm to constraints so local certificates + // can't be restored from the session ticket. + params.setAlgorithmConstraints( + new NoSig(X509CertImpl.toImpl(localCerts) + .getSigAlgName())); + } + } + default -> + throw new AssertionError("Server: " + + "unknown mode: " + testMode); + } + sock.setSSLParameters(params); + BufferedReader reader = new BufferedReader( + new InputStreamReader(sock.getInputStream())); + String line = reader.readLine(); + System.err.println("server read: " + line); + PrintWriter out = new PrintWriter( + new OutputStreamWriter(sock.getOutputStream())); + out.println(line); + out.flush(); + out.close(); + SSLSession session = sock.getSession(); + if (testMode == TestMode.LOCAL_CERTS && first) { + localCerts = (X509CertImpl) session. + getLocalCertificates()[0]; } + first = false; + System.err.println("server socket closed: " + session); + } catch (Exception e) { + throw new AssertionError("Server error", e); } - } catch (Exception ex) { - throw new RuntimeException(ex); } } } -} +} \ No newline at end of file diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SSLSocketImpl/ReuseAddr.java openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/SSLSocketImpl/ReuseAddr.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SSLSocketImpl/ReuseAddr.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/SSLSocketImpl/ReuseAddr.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * 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 ReuseAddr extends SSLSocketTemplate { - private static final int MAX_ATTEMPTS = 3; + private static final int MAX_ATTEMPTS = 15; @Override protected void doServerSide() throws Exception { @@ -65,6 +65,7 @@ System.err.println(msg); throw new AssertionError("Failed to reuse address: " + msg, x); } else { + Thread.sleep(100*i); System.out.println("Retrying..."); } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Chunghwa.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.net.ssl.X509TrustManager; +import java.io.File; +import java.security.Security; +import java.time.LocalDate; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.util.Date; + +/* + * @test + * @bug 8369282 + * @summary Check that TLS Server certificates chaining back to distrusted + * Chunghwa root are invalid + * @library /test/lib + * @modules java.base/sun.security.validator + * @run main/othervm Chunghwa after policyOn invalid + * @run main/othervm Chunghwa after policyOff valid + * @run main/othervm Chunghwa before policyOn valid + * @run main/othervm Chunghwa before policyOff valid + */ + +public class Chunghwa { + + private static final String CERT_PATH = "chains" + File.separator + "chunghwa"; + + // The ePKI root has a test certificate chain stored in a file + // named "-chain.pem". + private static final String ROOT_TO_TEST = "chunghwaepkirootca"; + + // Date after the restrictions take effect + private static final ZonedDateTime DISTRUST_DATE = + LocalDate.of(2026, 03, 18).atStartOfDay(ZoneOffset.UTC); + + public static void main(String[] args) throws Exception { + + Distrust distrust = new Distrust(args); + + X509TrustManager[] tms = new X509TrustManager[]{ + distrust.getTMF("PKIX", null), + distrust.getTMF("SunX509", null) + }; + + Date notBefore = distrust.getNotBefore(DISTRUST_DATE); + distrust.testCertificateChain(CERT_PATH, notBefore, tms, ROOT_TO_TEST); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/chunghwa/chunghwaepkirootca-chain.pem openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/chunghwa/chunghwaepkirootca-chain.pem --- openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/chunghwa/chunghwaepkirootca-chain.pem 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/chunghwa/chunghwaepkirootca-chain.pem 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,50 @@ +Owner: CN=HiPKI Root CA - G1, + O="Chunghwa Telecom Co., Ltd.", C=TW +Issuer: OU=ePKI Root Certification Authority, + O="Chunghwa Telecom Co., Ltd.", C=TW +Serial number: 23fba648360e15e92ba78aedb67a0ae5 +Valid from: Wed Dec 20 19:11:23 MST 2023 until: Tue Dec 19 08:59:59 MST 2034 +Certificate fingerprints: + SHA1: 87:F1:DD:3B:8E:F1:E0:8C:A8:CA:CB:9B:CE:4E:26:5A:E4:4E:05:F2 + SHA256: 68:07:C9:72:35:C5:EC:60:90:26:9A:4B:5F:ED:FA:B4:69:86:E4:2F:4D:67:D2:ED:DD:CF:6E:45:CF:0D:FA:80 +Signature algorithm name: SHA256withRSA +Subject Public Key Algorithm: 4096-bit RSA key +Version: 3 + +-----BEGIN CERTIFICATE----- +MIIGjDCCBHSgAwIBAgIQI/umSDYOFekrp4rttnoK5TANBgkqhkiG9w0BAQsFADBe +MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0 +ZC4xKjAoBgNVBAsMIWVQS0kgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe +Fw0yMzEyMjEwMjExMjNaFw0zNDEyMTkxNTU5NTlaME8xCzAJBgNVBAYTAlRXMSMw +IQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQ +S0kgUm9vdCBDQSAtIEcxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA +9B5/UnMyDHPkvRN0o9QwqNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh +8Ge6zCFovkRTv4354twvVcg3Px+kwJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux5 +5199QmQ5eiY29yTw1S+6lZgRZq2XNdZ1AYDgr/SEYYwNHl98h5ZeQa/rh+r4XfEu +iAU+TCK72h8q3VJGZDnzQs7ZngyzsHeXZJzA9KMuH5UHsBffMNsAGJZMoYFL3QRt +U6M9/Aes1MU3guvklQgZKILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfd +hSi8MEyr48KxRURHH+CKFgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXT +T3OUM3ECoWqj1jOXTyFjHluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK +9p/7qxj3ccC2HTHsOyDry+K49a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8 +b3ti6RZsR1pl8w4Rm0bZ/W3c1pzAtH2lsN0/Vm+h+fbkEkj9Bn8SV7apI09bA8Pg +cSojt/ewsTu8mL3WmKgMa/aOEmem8rJY5AIJEzypuxC00jBF8ez3ABHfZfjcK0NV +vxaXxA/VLGGEqnKG/uY6fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaOCAVMwggFPMB8G +A1UdIwQYMBaAFB4M97Zn8uGSJglFwFU5Lnc/QkqiMB0GA1UdDgQWBBTydxf6Xqj+ +9j1x1Wi6yUYMONivsDAOBgNVHQ8BAf8EBAMCAYYwQAYDVR0fBDkwNzA1oDOgMYYv +aHR0cDovL2VjYS5oaW5ldC5uZXQvcmVwb3NpdG9yeS9DUkxfU0hBMi9DQS5jcmww +gYIGCCsGAQUFBwEBBHYwdDA7BggrBgEFBQcwAoYvaHR0cDovL2VjYS5oaW5ldC5u +ZXQvcmVwb3NpdG9yeS9DZXJ0cy9lQ0FHMS5jcnQwNQYIKwYBBQUHMAGGKWh0dHA6 +Ly9vY3NwLmVjYS5oaW5ldC5uZXQvT0NTUC9vY3NwRzFzaGEyMBIGA1UdEwEB/wQI +MAYBAf8CAQEwIgYDVR0gBBswGTAIBgZngQwBAgIwDQYLKwYBBAGBtyNkAAMwDQYJ +KoZIhvcNAQELBQADggIBACY9pps8fqk3p8Xqv/qr26I1aFA4jOEG3VWd2bqn68Y9 +InOMZozTMVh7iOnOfat7mEqn/RNhikvR5MOV3qAeg4gwgNb1OMuGltwfXWGiuGeT +vhimsV6E2hhJFAmZyXtfuoV9vSrnr1a5pCWqhVYWSCvoAQ/8Kv0tATKbIe21CYXz +NIo7O9QBSXt0BiaP9+CVQtJAYYuy2MNAcXgzgL4rownrYYAixhPmkxQE0Dt1gVbW +s2htBLJGse0z1fJDblY0Zar4t2ly+kIScx5DhRrrd8XKMK0YvID9Ythb+ao8m7Wd +Kymqr36benGL3GsvmSypLPlqZtfEqVITFhXwQiL8ruxoL+3WfNQJ09x0iV4xaP+E +bZSLLVzIiyhU49YdFHaqKyAJQvzgF2Za3DOwQWlP7OngtUx0ScEGHsoo78AM+Y0T +eLFxmr82kuyH18wZkUT9bLZlot11P2aC8VTprBGr+jEAMJjpmEjSA83ja/ttmqgh +qjj29Jnw3Lgy91XIhzBFMxMYo+hhYeBRmBFWl5+Y5oxBgPVLZpDJvg2rKa8xdqim +KgvF0DMKHntE0hhVy7JfUCnKovNQ0pf0NodLfjpqcCS2GBZ1mNcsW2MG2uBPANcn +LRXmt7N4XX11mctQTADwt8yZZ+2HDrST4kghOz+FXgftrPBdtDtM0T6WJcHWR1uS +-----END CERTIFICATE----- diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/DefaultOptions.java openjdk-25-25.0.3+9/test/jdk/sun/security/tools/jarsigner/DefaultOptions.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/DefaultOptions.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/tools/jarsigner/DefaultOptions.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * 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,10 @@ keytool("-genkeypair -dname CN=CA -alias ca -keyalg rsa -ext bc:c") .shouldHaveExitValue(0); keytool("-alias a -certreq -file a.req"); - keytool("-alias ca -gencert -infile a.req -outfile a.cert"); + + // The start date is set to -1M to prevent the certificate not yet + // valid during fast enough execution. + keytool("-alias ca -gencert -infile a.req -outfile a.cert -startdate -1M"); keytool("-alias a -import -file a.cert").shouldHaveExitValue(0); Files.write(Path.of("js.conf"), List.of( diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/tools/keytool/EchoPassword.java openjdk-25-25.0.3+9/test/jdk/sun/security/tools/keytool/EchoPassword.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/tools/keytool/EchoPassword.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/tools/keytool/EchoPassword.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8354469 + * @summary keytool password does not echo in multiple cases + * @library /java/awt/regtesthelpers + * @modules java.base/jdk.internal.util + * @build PassFailJFrame + * @run main/manual/othervm EchoPassword + */ + +import jdk.internal.util.OperatingSystem; + +import javax.swing.JEditorPane; +import javax.swing.JLabel; +import javax.swing.event.HyperlinkEvent; + +import java.awt.Toolkit; +import java.awt.datatransfer.StringSelection; +import java.io.File; +import java.nio.file.Path; + +public class EchoPassword { + + static JLabel label; + + public static void main(String[] args) throws Exception { + + var ks1 = "\"" + Path.of("8354469.ks1").toAbsolutePath() + "\""; + var ks2 = "\"" + Path.of("8354469.ks2").toAbsolutePath() + "\""; + var ks3 = "\"" + Path.of("8354469.ks3").toAbsolutePath() + "\""; + + final String keytool = "\"" + System.getProperty("java.home") + + File.separator + "bin" + File.separator + "keytool\""; + final String nonASCII = "äöäöäöäö"; + + final String[][] commands = { + // Input password from real Console + {"First command", keytool + " -keystore " + ks1 + + " -genkeypair -keyalg ec -dname cn=a -alias first"}, + // Input password from limited Console (when stdout is redirected) + {"Second command", keytool + " -keystore " + ks2 + + " -genkeypair -keyalg ec -dname cn=b -alias second | sort"}, + // Input password from System.in stream + {"Third command", "echo changeit| " + keytool + " -keystore " + ks1 + + " -genkeypair -keyalg ec -dname cn=c -alias third"}, + // Ensure limited Console does not write a newline to System.out + {"Fourth command", keytool + " -keystore " + ks1 + + " -exportcert -alias first | " + + keytool + " -printcert -rfc"}, + // Non-ASCII password from System.in + {"Fifth command", "(" + // Solution 2 of https://stackoverflow.com/a/29747723 + + (OperatingSystem.isWindows() + ? ("echo " + nonASCII + "^&echo " + nonASCII + "^&rem.") + : ("echo " + nonASCII + "; echo " + nonASCII)) + + ") | " + keytool + " -keystore " + ks3 + + " -genkeypair -alias a -keyalg ec -dname cn=a"}, + // Non-ASCII password from Console + {"Sixth command", keytool + " -keystore " + ks3 + + " -exportcert -alias a -rfc"}, + {"The password", nonASCII} + }; + + final String message = String.format(""" + Open a terminal or Windows Command Prompt window, perform + the following steps, and record the final result. Each time you + click a link to copy something, make sure the status line at the + bottom shows the link has been successfully clicked. +

Part I: Password Echoing Tests

+
+

Part II: Interoperability on Non-ASCII Passwords

+
    +
  1. Click Copy Fifth Command to copy the + following command into the system clipboard. Paste it into the + terminal window and execute the command. +

    + %s +

    + Verify that a key pair is generated successfully. + +

  2. Click Copy Sixth Command to copy the + following command into the system clipboard. Paste it into the + terminal window and execute the command. +

    + %s +

    + When prompted, click Copy Password to copy the + password. Paste it into the terminal window and press Enter. + Verify that the password is hidden and a PEM certificate is + correctly shown. +

+ Press "pass" if the behavior matches expectations; + otherwise, press "fail". + """, commands[0][1], commands[1][1], commands[2][1], commands[3][1], + commands[4][1], commands[5][1], commands[6][1]); + + PassFailJFrame.builder() + .instructions(message) + .rows(40).columns(100) + .hyperlinkListener(e -> { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + int pos = Integer.parseInt(e.getDescription().substring(1)); + Toolkit.getDefaultToolkit().getSystemClipboard().setContents( + new StringSelection(commands[pos][1]), null); + label.setText(commands[pos][0] + " copied"); + if (e.getSource() instanceof JEditorPane ep) { + ep.getCaret().setVisible(false); + } + } + }) + .splitUIBottom(() -> { + label = new JLabel("Status"); + return label; + }) + .build() + .awaitAndCheck(); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/tools/keytool/SetInPassword.java openjdk-25-25.0.3+9/test/jdk/sun/security/tools/keytool/SetInPassword.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/tools/keytool/SetInPassword.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/tools/keytool/SetInPassword.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8354469 + * @summary ensure password can be read from user's System.in + * @library /test/lib + * @modules java.base/sun.security.tools.keytool + */ + +import jdk.test.lib.SecurityTools; + +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; + +public class SetInPassword { + public static void main(String[] args) throws Exception { + SecurityTools.keytool("-keystore ks -storepass changeit -genkeypair -alias a -dname CN=A -keyalg EC") + .shouldHaveExitValue(0); + System.setIn(new ByteArrayInputStream("changeit".getBytes(StandardCharsets.UTF_8))); + sun.security.tools.keytool.Main.main("-keystore ks -alias a -certreq".split(" ")); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/tools/keytool/i18n.java openjdk-25-25.0.3+9/test/jdk/sun/security/tools/keytool/i18n.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/tools/keytool/i18n.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/tools/keytool/i18n.java 2026-04-17 19:08:13.000000000 +0000 @@ -28,7 +28,7 @@ * @author charlie lai * @modules java.base/sun.security.tools.keytool * @library /test/lib - * @run main/manual/othervm -Duser.language=en i18n + * @run main/manual/othervm -Duser.language=en -Duser.country=USA i18n */ /* @@ -38,7 +38,7 @@ * @author charlie lai * @modules java.base/sun.security.tools.keytool * @library /test/lib - * @run main/manual/othervm -Duser.language=de i18n + * @run main/manual/othervm -Duser.language=de -Duser.country=DE i18n */ /* @@ -48,7 +48,7 @@ * @author charlie lai * @modules java.base/sun.security.tools.keytool * @library /test/lib - * @run main/manual/othervm -Duser.language=ja i18n + * @run main/manual/othervm -Duser.language=ja -Duser.country=JP i18n */ /* @@ -63,11 +63,21 @@ import jdk.test.lib.UIBuilder; -import javax.swing.*; +import javax.swing.JDialog; +import javax.swing.SwingUtilities; +import javax.swing.JTextArea; +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JFrame; +import java.awt.FlowLayout; +import java.awt.BorderLayout; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Locale; +import static javax.swing.BorderFactory.createEmptyBorder; + public class i18n { private static final String[][] TABLE = new String[][]{ {"-help", "All the output in this test should be in ${LANG}. " @@ -234,11 +244,12 @@ "Output in ${LANG}. Check keytool error: java.lang" + ".IllegalArgumentException: if -protected is " + "specified, then -storepass, -keypass, and -new " - + "must not be specified."}, + + "must not be specified."} }; private static String TEST_SRC = System.getProperty("test.src"); private static int TIMEOUT_MS = 120000; private volatile boolean failed = false; + private volatile String failureReason = ""; private volatile boolean aborted = false; private Thread currentThread = null; @@ -330,6 +341,7 @@ if (failed) { System.out.println(command + ": TEST FAILED"); + System.out.println("REASON: " + failureReason); System.out.println(message); } else { System.out.println(command + ": TEST PASSED"); @@ -348,6 +360,7 @@ public void fail() { failed = true; + failureReason = requestFailDescription(); currentThread.interrupt(); } @@ -355,4 +368,33 @@ aborted = true; currentThread.interrupt(); } + + /** + * Opens a prompt to enter a failure reason to be filled by the tester + */ + public static String requestFailDescription() { + + final JDialog dialogWindow = new JDialog(new JFrame(), "Failure Description", true); + final JTextArea reasonTextArea = new JTextArea(5, 20); + + final JButton okButton = new JButton("OK"); + okButton.addActionListener(_ -> dialogWindow.setVisible(false)); + + final JPanel okayBtnPanel = new JPanel( + new FlowLayout(FlowLayout.CENTER, 4, 0)); + okayBtnPanel.setBorder(createEmptyBorder(4, 0, 0, 0)); + okayBtnPanel.add(okButton); + + final JPanel mainPanel = new JPanel(new BorderLayout()); + mainPanel.add(new JScrollPane(reasonTextArea), BorderLayout.CENTER); + mainPanel.add(okayBtnPanel, BorderLayout.SOUTH); + + dialogWindow.add(mainPanel); + dialogWindow.pack(); + dialogWindow.setVisible(true); + + dialogWindow.dispose(); + + return reasonTextArea.getText(); + } } diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/util/AlgorithmConstraints/InvalidCryptoDisabledAlgos.java openjdk-25-25.0.3+9/test/jdk/sun/security/util/AlgorithmConstraints/InvalidCryptoDisabledAlgos.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/util/AlgorithmConstraints/InvalidCryptoDisabledAlgos.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/util/AlgorithmConstraints/InvalidCryptoDisabledAlgos.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact 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 8244336 + * @modules java.base/sun.security.util + * @summary Check that invalid property values for + * "jdk.crypto.disabledAlgorithms" are rejected + * @run main/othervm InvalidCryptoDisabledAlgos "*" + * @run main/othervm InvalidCryptoDisabledAlgos "." + * @run main/othervm InvalidCryptoDisabledAlgos ".AES" + * @run main/othervm InvalidCryptoDisabledAlgos "Cipher." + * @run main/othervm InvalidCryptoDisabledAlgos "A.B" + * @run main/othervm InvalidCryptoDisabledAlgos "KeyStore.MY,." + * @run main/othervm InvalidCryptoDisabledAlgos "KeyStore.MY,.AES" + * @run main/othervm InvalidCryptoDisabledAlgos "KeyStore.MY,Cipher." + * @run main/othervm InvalidCryptoDisabledAlgos "KeyStore.MY,A.B" + */ +import java.security.Security; +import sun.security.util.CryptoAlgorithmConstraints; + +public class InvalidCryptoDisabledAlgos { + + public static void main(String[] args) throws Exception { + System.out.println("Invalid Property Value = " + args[0]); + Security.setProperty("jdk.crypto.disabledAlgorithms", args[0]); + try { + // Trigger the check to parse and validate property value + CryptoAlgorithmConstraints.permits("x", "y"); + throw new AssertionError( + "CryptoAlgorithmConstraints.permits() did not generate expected exception"); + } catch (Throwable t) { + if (!(t instanceof ExceptionInInitializerError) + || !(t.getCause() instanceof IllegalArgumentException)) { + // unexpected exception, propagate it + throw t; + } + // got expected + System.out.println("Received expected exception: " + t); + } + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/util/Debug/DebugOptions.java openjdk-25-25.0.3+9/test/jdk/sun/security/util/Debug/DebugOptions.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/util/Debug/DebugOptions.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/util/Debug/DebugOptions.java 2026-04-17 19:08:13.000000000 +0000 @@ -29,16 +29,20 @@ * @run junit DebugOptions */ -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - import java.security.KeyStore; import java.security.Security; -import java.util.stream.Stream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; public class DebugOptions { @@ -47,54 +51,133 @@ "properties\\[.*\\|main|" + DATE_REGEX + ".*\\]:"; static final String EXPECTED_PROP_KEYSTORE_REGEX = "properties\\[.*\\|main|" + DATE_REGEX + - ".*\\Rkeystore\\[.*\\|main|" + DATE_REGEX + ".*\\]:"; + ".*\\Rkeystore\\[.*\\|main|" + DATE_REGEX + ".*\\]:"; static final String EXPECTED_ALL_REGEX = "properties\\[.*\\|main.*\\|" + DATE_REGEX + - ".*\\]((.*\\R)*)keystore\\[.*\\|main.*\\|" - + DATE_REGEX + ".*\\]:"; - - private static Stream patternMatches() { - return Stream.of( - // test for thread and timestamp info - Arguments.of("properties", - EXPECTED_PROP_REGEX, - "properties:"), - // test for thread and timestamp info - Arguments.of("properties+thread", - EXPECTED_PROP_REGEX, - "properties:"), - // flip the arguments of previous test - Arguments.of("properties+thread+timestamp", - EXPECTED_PROP_REGEX, - "properties:"), - // regular keystore,properties component string - Arguments.of("keystore,properties", - EXPECTED_PROP_KEYSTORE_REGEX, - "properties:"), - // turn on all - Arguments.of("all", - EXPECTED_ALL_REGEX, - "properties:"), - // expect thread and timestamp info - Arguments.of("all+thread", - EXPECTED_ALL_REGEX, - "properties:") - ); - } + ".*\\]((.*\\R)*)keystore\\[.*\\|main.*\\|" + + DATE_REGEX + ".*\\]:"; - @ParameterizedTest - @MethodSource("patternMatches") - public void shouldContain(String params, String expected, String notExpected) throws Exception { - OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava( - "-Djava.security.debug=" + params, - "DebugOptions" - ); + private static final List patternMatches = List.of( + // test for thread and timestamp info + new String[]{"properties", + EXPECTED_PROP_REGEX, + "properties:"}, + // test for thread and timestamp info + new String[]{"properties+thread", + EXPECTED_PROP_REGEX, + "properties:"}, + // flip the arguments of previous test + new String[]{"properties+thread+timestamp", + EXPECTED_PROP_REGEX, + "properties:"}, + // regular keystore,properties component string + new String[]{"keystore,properties", + EXPECTED_PROP_KEYSTORE_REGEX, + "properties:"}, + // turn on all + new String[]{"all", + EXPECTED_ALL_REGEX, + "properties:"}, + // expect thread and timestamp info + new String[]{"all+thread", + EXPECTED_ALL_REGEX, + "properties:"} + ); + + /** + * This will execute the test logic, but first change the param + * to be mixed case + * + * @param paramName name of the parameter e.g. -Djava.security.debug= + * @param paramVal value of the parameter + * @param expected expected output + * @param notExpected not expected output + */ + public void testMixedCaseParameter(String paramName, + String paramVal, + String expected, + String notExpected) throws Exception { + + final String formattedParam = makeFirstAndLastLetterUppercase(paramVal); + System.out.printf("Executing: {%s%s DebugOptions}%n", + paramName, + formattedParam); + + final OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava( + paramName + formattedParam, + "DebugOptions"); outputAnalyzer.shouldHaveExitValue(0) .shouldMatch(expected) .shouldNotMatch(notExpected); } + /** + * This method will change the input string to have + * first and last letters uppercase + *

+ * e.g.: + * hello -> HellO + * + * @param paramString string to change. Must not be null or empty + * @return resulting string + */ + private String makeFirstAndLastLetterUppercase(final String paramString) { + Assertions.assertTrue(paramString != null && !paramString.isEmpty()); + + final int length = paramString.length(); + final String firstLetter = paramString.substring(0, 1); + final String lastLetter = paramString.substring((length - 1), + length); + + return firstLetter.toUpperCase() + + paramString.substring(1, length - 1) + + lastLetter.toUpperCase(); + } + + /** + * This test will run all options in parallel with all param names + * in mixed case + */ + @Test + public void debugOptionsMixedCaseTest() throws Exception { + + try (final ExecutorService executorService = Executors.newVirtualThreadPerTaskExecutor()) { + final List> testsCallables = new ArrayList<>(); + + patternMatches.forEach(params -> { + testsCallables.add(() -> { + testMixedCaseParameter( + "-Djava.security.debug=", + params[0], + params[1], + params[2]); + return null; + }); + testsCallables.add(() -> { + testMixedCaseParameter( + "-Djava.security.auth.debug=", + params[0], + params[1], + params[2]); + return null; + }); + + System.out.println("Option added to all mixed case tests " + Arrays.toString(params)); + }); + + System.out.println("Starting all the threads"); + final List> res = executorService.invokeAll(testsCallables); + for (final Future future : res) { + future.get(); + } + } + } + + /** + * This is used for the test logic itself + */ public static void main(String[] args) throws Exception { + // something to trigger "properties" debug output Security.getProperty("test"); // trigger "keystore" debug output diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/util/Password/EmptyIn.java openjdk-25-25.0.3+9/test/jdk/sun/security/util/Password/EmptyIn.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/util/Password/EmptyIn.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/util/Password/EmptyIn.java 2026-04-17 19:08:13.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please 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.Asserts; +import sun.security.util.Password; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +/* + * @test + * @bug 8374555 + * @summary only print warning when reading from System.in + * @modules java.base/sun.security.util + * @library /test/lib + */ +public class EmptyIn { + public static void main(String[] args) throws Exception { + testSystemIn(); + testNotSystemIn(); + } + + static void testSystemIn() throws Exception { + var in = new ByteArrayInputStream(new byte[0]); + var err = new ByteArrayOutputStream(); + var oldErr = System.err; + var oldIn = System.in; + try { + System.setIn(in); + System.setErr(new PrintStream(err)); + Password.readPassword(System.in); + } finally { + System.setIn(oldIn); + System.setErr(oldErr); + } + // Read from System.in. Should warn. + Asserts.assertNotEquals(0, err.size()); + } + + static void testNotSystemIn() throws Exception { + var in = new ByteArrayInputStream(new byte[0]); + var err = new ByteArrayOutputStream(); + var oldErr = System.err; + try { + System.setErr(new PrintStream(err)); + Password.readPassword(in); + } finally { + System.setErr(oldErr); + } + // Not read from System.in. Should not warn. + Asserts.assertEQ(0, err.size()); + } +} diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/util/Resources/Usages.java openjdk-25-25.0.3+9/test/jdk/sun/security/util/Resources/Usages.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/util/Resources/Usages.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/util/Resources/Usages.java 2026-04-17 19:08:13.000000000 +0000 @@ -23,7 +23,7 @@ /* * @test - * @bug 8215937 8345940 + * @bug 8215937 8345940 8354469 * @modules java.base/sun.security.util * java.base/sun.security.util.resources * java.base/sun.security.tools.keytool.resources @@ -139,6 +139,8 @@ List.of(MGR_GETSTRING)), new Pair("java.base/share/classes/sun/security/provider/PolicyParser.java", List.of(LOC_GETNONLOC, NEW_LOC)), + new Pair("java.base/share/classes/sun/security/util/Password.java", + List.of(MGR_GETSTRING)), new Pair("java.base/share/classes/javax/security/auth/", List.of(MGR_GETSTRING))) ); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/CRLReadTimeout.java openjdk-25-25.0.3+9/test/jdk/sun/security/x509/URICertStore/CRLReadTimeout.java --- openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/CRLReadTimeout.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/security/x509/URICertStore/CRLReadTimeout.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * 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,45 +22,101 @@ */ /* - * @test + * @test id=0 * @bug 8191808 8179502 * @summary check that CRL download is interrupted if it takes too long * @modules java.base/sun.security.x509 * java.base/sun.security.util * @library /test/lib - * @run main/othervm -Dcom.sun.security.crl.readtimeout=1 + * @run main/othervm -Djava.security.debug=certpath -Dcom.sun.security.crl.readtimeout=1 * CRLReadTimeout 5000 false - * @run main/othervm -Dcom.sun.security.crl.readtimeout=1s + */ + +/* + * @test id=1 + * @bug 8191808 8179502 + * @summary check that CRL download is interrupted if it takes too long + * @modules java.base/sun.security.x509 + * java.base/sun.security.util + * @library /test/lib + * @run main/othervm -Djava.security.debug=certpath -Dcom.sun.security.crl.readtimeout=1s * CRLReadTimeout 5000 false - * @run main/othervm -Dcom.sun.security.crl.readtimeout=4 + */ + +/* + * @test id=2 + * @bug 8191808 8179502 + * @summary check that CRL download is interrupted if it takes too long + * @modules java.base/sun.security.x509 + * java.base/sun.security.util + * @library /test/lib + * @run main/othervm -Djava.security.debug=certpath -Dcom.sun.security.crl.readtimeout=200 * CRLReadTimeout 1000 true - * @run main/othervm -Dcom.sun.security.crl.readtimeout=1500ms + */ + +/* + * @test id=3 + * @bug 8191808 8179502 + * @summary check that CRL download is interrupted if it takes too long + * @modules java.base/sun.security.x509 + * java.base/sun.security.util + * @library /test/lib + * @run main/othervm -Djava.security.debug=certpath -Dcom.sun.security.crl.readtimeout=1500ms * CRLReadTimeout 5000 false - * @run main/othervm -Dcom.sun.security.crl.readtimeout=4500ms - * CRLReadTimeout 1000 true */ -import java.io.*; +/* + * @test id=4 + * @bug 8191808 8179502 + * @summary check that CRL download is interrupted if it takes too long + * @modules java.base/sun.security.x509 + * java.base/sun.security.util + * @library /test/lib + * @run main/othervm -Djava.security.debug=certpath -Dcom.sun.security.crl.readtimeout=4500ms + * CRLReadTimeout 100 true + */ + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.math.BigInteger; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketTimeoutException; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.PrivateKey; -import java.security.cert.*; +import java.security.cert.CRLException; +import java.security.cert.CertPath; +import java.security.cert.CertPathValidator; +import java.security.cert.CertPathValidatorException; +import java.security.cert.CertificateFactory; +import java.security.cert.PKIXParameters; +import java.security.cert.PKIXRevocationChecker; +import java.security.cert.TrustAnchor; +import java.security.cert.X509CRL; +import java.security.cert.X509Certificate; import java.util.Date; import java.util.EnumSet; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; -import static java.security.cert.PKIXRevocationChecker.Option.*; +import static java.security.cert.PKIXRevocationChecker.Option.NO_FALLBACK; +import static java.security.cert.PKIXRevocationChecker.Option.PREFER_CRLS; +import static java.security.cert.PKIXRevocationChecker.Option.SOFT_FAIL; import com.sun.net.httpserver.HttpServer; import jdk.test.lib.SecurityTools; import jdk.test.lib.process.OutputAnalyzer; import sun.security.util.SignatureUtil; -import sun.security.x509.*; +import sun.security.x509.AuthorityKeyIdentifierExtension; +import sun.security.x509.CRLExtensions; +import sun.security.x509.CRLNumberExtension; +import sun.security.x509.KeyIdentifier; +import sun.security.x509.X500Name; +import sun.security.x509.X509CRLImpl; public class CRLReadTimeout { @@ -117,9 +173,10 @@ // unwrap soft fail exceptions and check for SocketTimeoutException List softExc = prc.getSoftFailExceptions(); if (expectedPass) { - if (softExc.size() > 0) { + if (!softExc.isEmpty()) { throw new RuntimeException("Expected to pass, found " + - softExc.size() + " soft fail exceptions"); + softExc.size() + + " soft fail exceptions"); } } else { boolean foundSockTOExc = false; @@ -182,7 +239,7 @@ } public void start() throws IOException { - server.bind(new InetSocketAddress(0), 0); + server.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0), 0); server.createContext("/crl", t -> { try (InputStream is = t.getRequestBody()) { is.readAllBytes(); diff -Nru openjdk-25-25.0.2+10/test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java openjdk-25-25.0.3+9/test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java --- openjdk-25-25.0.2+10/test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -162,12 +162,7 @@ long startTime = System.currentTimeMillis(); try { JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jshell"); - if (doSleep) { - launcher.addVMArgs(Utils.getTestJavaOpts()); - } else { - // Don't allow use of SerialGC. See JDK-8313655. - launcher.addVMArgs(Utils.getFilteredTestJavaOpts("-XX:\\+UseSerialGC")); - } + launcher.addVMArgs(Utils.getTestJavaOpts()); ProcessBuilder pb = new ProcessBuilder(launcher.getCommand()); // Needed so we can properly parse the "Welcome to JShell" output. pb.command().add("-J-Duser.language=en"); diff -Nru openjdk-25-25.0.2+10/test/jdk/tools/jar/ReproducibleJar.java openjdk-25-25.0.3+9/test/jdk/tools/jar/ReproducibleJar.java --- openjdk-25-25.0.2+10/test/jdk/tools/jar/ReproducibleJar.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/tools/jar/ReproducibleJar.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * 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,9 @@ private static final TimeZone TZ = TimeZone.getDefault(); private static final boolean DST = TZ.inDaylightTime(new Date()); private static final String UNIX_2038_ROLLOVER_TIME = "2038-01-19T03:14:07Z"; + private static final String UNIX_EPOCH_TIME = "1970-01-01T00:00:00Z"; private static final Instant UNIX_2038_ROLLOVER = Instant.parse(UNIX_2038_ROLLOVER_TIME); + private static final Instant UNIX_EPOCH = Instant.parse(UNIX_EPOCH_TIME); private static final File DIR_OUTER = new File("outer"); private static final File DIR_INNER = new File(DIR_OUTER, "inner"); private static final File FILE_INNER = new File(DIR_INNER, "foo.txt"); @@ -231,12 +233,15 @@ if (Math.abs(now - original) > PRECISION) { // If original time is after UNIX 2038 32bit rollover - // and the now time is exactly the rollover time, then assume + // and the now time is exactly the rollover time or UNIX epoch time, then assume // running on a file system that only supports to 2038 (e.g.XFS) and pass test - if (FileTime.fromMillis(original).toInstant().isAfter(UNIX_2038_ROLLOVER) && - FileTime.fromMillis(now).toInstant().equals(UNIX_2038_ROLLOVER)) { - System.out.println("Checking file time after Unix 2038 rollover," + - " and extracted file time is " + UNIX_2038_ROLLOVER_TIME + ", " + + Instant originalInstant = FileTime.fromMillis(original).toInstant(); + Instant nowInstant = FileTime.fromMillis(now).toInstant(); + if (originalInstant.isAfter(UNIX_2038_ROLLOVER) && + (nowInstant.equals(UNIX_2038_ROLLOVER) || + nowInstant.equals(UNIX_EPOCH))) { + System.out.println("Checking file time after Unix 2038 rollover," + + " and extracted file time is " + nowInstant + ", " + " Assuming restricted file system, pass file time check."); } else { throw new AssertionError("checkFileTime failed," + diff -Nru openjdk-25-25.0.2+10/test/jdk/tools/launcher/ChangeDataModel.java openjdk-25-25.0.3+9/test/jdk/tools/launcher/ChangeDataModel.java --- openjdk-25-25.0.2+10/test/jdk/tools/launcher/ChangeDataModel.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/tools/launcher/ChangeDataModel.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ * @compile -XDignore.symbol.file ChangeDataModel.java * @run main ChangeDataModel * @summary Verify -d32, -d64 and -J prefixed data-model options are rejected on all platforms - * @author Joseph D. Darcy, ksrini */ import java.util.Arrays; diff -Nru openjdk-25-25.0.2+10/test/jdk/tools/launcher/I18NTest.java openjdk-25-25.0.3+9/test/jdk/tools/launcher/I18NTest.java --- openjdk-25-25.0.2+10/test/jdk/tools/launcher/I18NTest.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/tools/launcher/I18NTest.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. * 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,7 +27,6 @@ * @compile -XDignore.symbol.file I18NTest.java * @run main I18NTest * @summary Test to see if class files with non-ASCII characters can be run - * @author Joseph D. Darcy, Kumar Srinivasan */ diff -Nru openjdk-25-25.0.2+10/test/jdk/tools/launcher/UnresolvedExceptions.java openjdk-25-25.0.3+9/test/jdk/tools/launcher/UnresolvedExceptions.java --- openjdk-25-25.0.2+10/test/jdk/tools/launcher/UnresolvedExceptions.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/jdk/tools/launcher/UnresolvedExceptions.java 2026-04-17 19:08:13.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * 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,6 @@ * @compile -XDignore.symbol.file UnresolvedExceptions.java * @run main UnresolvedExceptions * @summary Verifying jvm won't segv if exception not available - * @author Joseph D. Darcy, ksrini */ import java.io.File; diff -Nru openjdk-25-25.0.2+10/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java openjdk-25-25.0.3+9/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java --- openjdk-25-25.0.2+10/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java 2026-04-17 19:08:13.000000000 +0000 @@ -83,7 +83,7 @@

Document Title

""", """ -
""", +
""", """ bottom text""" ); @@ -113,7 +113,7 @@

Document Title

""", """ -
""", +
""", """ bottom text"""); } @@ -150,7 +150,7 @@ """
A sample doc file""", """ -
""", +
""", """ bottom text""" ); diff -Nru openjdk-25-25.0.2+10/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java openjdk-25-25.0.3+9/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java --- openjdk-25-25.0.2+10/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java 2025-12-18 08:04:02.000000000 +0000 +++ openjdk-25-25.0.3+9/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java 2026-04-17 19:08:13.000000000 +0000 @@ -85,7 +85,7 @@
    +
  1. Click Copy First Command to copy the + following command into the system clipboard. Paste it into the + terminal window and execute the command. +

    + %s +

    + When prompted, enter "changeit" and press Enter. When prompted + again, enter "changeit" again and press Enter. Verify that the + two password prompts show up on different lines, both + passwords are hidden, and a key pair is generated successfully. + +

  2. Click Copy Second Command to copy the + following command into the system clipboard. Paste it into the + terminal window and execute the command. +

    + %s +

    + When prompted, enter "changeit" and press Enter. When prompted + again, enter "changeit" again and press Enter. Verify that the + two password prompts show up on different lines, both + passwords are hidden, and a key pair is generated successfully. + +

  3. Click Copy Third Command to copy the + following command into the system clipboard. Paste it into the + terminal window and execute the command. +

    + %s +

    + You will see a prompt but you don't need to enter anything. + Verify that the password "changeit" is not shown in the command + output and a key pair is generated successfully. + +

  4. Click Copy Fourth Command to copy the + following command into the system clipboard. Paste it into the + terminal window and execute the command. +

    + %s +

    + When prompted, enter "changeit" and press Enter. Verify that the + password is hidden and a PEM certificate is correctly shown. +